Compare commits

..
513 Commits
Author SHA1 Message Date
SVN Migration 7203320201 This commit was manufactured by cvs2svn to create tag 'php_4_2_3'. 2002-09-05 23:20:51 +00:00
Zeev Suraski 27176de818 Go with 4.2.3 (will be posted tomorrow) 2002-09-05 23:20:50 +00:00
Edin Kadribasic 5245a0dc9e Added UTF-8 support to pcre on windows as suggested by Wez Furlong. 2002-09-05 13:51:29 +00:00
foobar 0cb9d15e73 MFH: Fix the missing libgcc problems. 2002-09-04 18:17:41 +00:00
Dan Kalowsky 4a1ca49acb Taking out the PWRITE functions too... 2002-09-04 13:50:38 +00:00
Dan Kalowsky 2dd9fdfd85 MFH, removing PREAD for Bug #15983 2002-09-04 13:49:58 +00:00
Dan Kalowsky 85db415f29 No more C++ comments again 2002-09-04 04:04:36 +00:00
Dan Kalowsky e22cec443e No C++ comments 2002-09-04 03:56:18 +00:00
Marcus Boerger 7a6418cad2 Fix warnings again....
#So many different compilers...
2002-09-03 19:09:03 +00:00
foobar cc7433870c Patch by Melvyn to make ttf/ft string functions work again. 2002-09-03 13:09:29 +00:00
Markus Fischer 0151cb75cf - Update 2002-09-03 11:42:38 +00:00
Derick Rethans 80756295f6 - Fix #ifdefs 2002-09-03 07:39:10 +00:00
Markus Fischer 3131aafe57 - MFH as suggested by Derick, see HEAD commit for more on this
# This is a blind commit, I don't have the resources to build the 4_2_0 branch
# on win32, can someone test it?
2002-09-02 18:18:19 +00:00
Zeev Suraski ca9cfc7525 Make it stick - please do not revert 2002-09-02 15:28:26 +00:00
Zeev Suraski e12aaa6d09 Backport license from 4.3 2002-09-02 15:06:12 +00:00
foobar e60f1d01b0 reset version to 4.2.3-dev (why is the change committed anyway?) 2002-09-02 14:41:28 +00:00
Derick Rethans f2400ce576 - Fix the segmentation fault when magic_quotes_runtime was disabled as
introduced in http://news.php.net/article.php?group=php.cvs&article=13690
2002-09-02 14:36:20 +00:00
Zeev Suraski b9b6338d5e Go RC2 2002-09-02 12:10:20 +00:00
foobar b251c34bc0 Fix the shared build for real. (thanks to Brian France) 2002-09-01 00:19:41 +00:00
foobar 22122649f4 MFH: Fix for bug: #19124 (shared extension build fixes) 2002-08-30 03:06:53 +00:00
Ilia Alshanetsky b2f263a5ee Fixed the \0 check in previous patch. 2002-08-29 15:59:54 +00:00
Ilia Alshanetsky 8cb45d3f37 MFH fix for bug: #18966 2002-08-29 15:48:00 +00:00
Marcus Boerger e4cf66c00a MFH (not with cli) 2002-08-29 09:36:19 +00:00
Marcus Boerger 3dc2d1e958 MFH (One zero to much) 2002-08-29 08:35:47 +00:00
foobar ec4594ed4b MFH fix for bug: #19159 2002-08-29 01:18:28 +00:00
Christian Stocker d1f35cd2a3 MFH (fix some to long property strings) 2002-08-27 08:41:25 +00:00
Christian Stocker ab15fed03d stupid typo 2002-08-27 07:26:33 +00:00
Christian Stocker 638471d549 MFH (fix memleak in php_domxslt_string_to_xpathexpr) 2002-08-27 06:56:36 +00:00
Marcus Boerger c0f896f1f6 MFH 2002-08-27 01:07:36 +00:00
Marcus Boerger cea2f49da8 MFH 2002-08-27 00:24:08 +00:00
foobar b1a629c370 MFH: bug fixes; #14410, #17503, #17999, #15595. Also some performance improvements. 2002-08-26 01:58:32 +00:00
Zeev Suraski 2c1f9fc486 Fixlet 2002-08-24 13:16:23 +00:00
Zeev Suraski f66dc118eb mysql_db_query() should not have been deprecated 2002-08-24 13:13:19 +00:00
Marcus Boerger eb53114d5e MFH (skip if cli)
#no NEWS for changing tests
2002-08-24 13:06:57 +00:00
Stefan Esser d518d02384 Added news entry 2002-08-24 11:52:19 +00:00
Stefan Esser 380f1a7943 MFH 2002-08-24 11:38:13 +00:00
Derick Rethans 8940b0ad3c - MFH 2002-08-24 09:44:01 +00:00
foobar c7fee7b851 switch the version back to 4.2.3-dev here. 2002-08-24 01:56:43 +00:00
Zeev Suraski 6b9440661f Zend and TSRM already get checked out in php4 2002-08-24 01:07:31 +00:00
foobar 0aa551f125 MFH 2002-08-24 00:57:06 +00:00
Zeev Suraski 303da734d9 Update version number, prepare for release 2002-08-24 00:53:54 +00:00
Zeev Suraski 474dcb486e Fix bug #15106 2002-08-24 00:44:03 +00:00
Zeev Suraski 90609154cc MFH security fix 2002-08-23 23:48:48 +00:00
Marcus Boerger bbd3f25d23 MFH 2002-08-23 20:15:38 +00:00
Marcus Boerger 5e56f05afa fixes magically mentioned in NEWS before being commited 2002-08-23 19:59:00 +00:00
Marcus Boerger 1ba9d5eea0 differentiate: Makus, Marcus
#k = Markus Fischer
#c = Marcus Boerger alias helly
2002-08-23 18:25:01 +00:00
foobar a8a233102e I like periods..:) 2002-08-23 17:16:31 +00:00
Edin Kadribasic 139316bfa8 One more 2002-08-23 13:41:26 +00:00
Rasmus Lerdorf c303e2c9f6 Should probably mention this fix too. 2002-08-23 13:02:26 +00:00
Edin Kadribasic fb599af3ed Due credit to Steph. 2002-08-23 09:34:17 +00:00
Zeev Suraski dd81f500c7 Update NEWS (got as far as ext/standard (not inclusive) in the ext/ dir)
Please take a look at it and update it if you find 'bugs'.
2002-08-23 09:17:20 +00:00
Zeev Suraski 416fcc197e Avoid changing behavior in a bug-fix release 2002-08-23 09:14:42 +00:00
Zeev Suraski c17c4e6344 Update, remove somewhat useless entry (we'd have to figure out a way
to update it)
2002-08-23 08:43:14 +00:00
Zeev Suraski 71e7ee097f Fix ob_gzhandler()'s handling of requests without compression, but that do
have an Accept-Encoding header
2002-08-23 08:36:28 +00:00
Zeev Suraski 273a2bf38a Fix a few warnings (MFH) 2002-08-23 08:00:49 +00:00
foobar 48880dc48b Sync with HEAD 2002-08-23 01:18:34 +00:00
Edin Kadribasic 725aa965af Sync install.txt file with the one provided in other 4.2.x distro's. 2002-08-22 15:27:17 +00:00
Rasmus Lerdorf d7ae4db7fe MFH the xbithack fix 2002-08-22 14:45:56 +00:00
foobar 3deb7d765c MFH 2002-08-22 00:34:33 +00:00
foobar ed4a0fb2be MFH 2002-08-21 15:17:16 +00:00
Dan Kalowsky 333e94c183 MFH or MSG... your choice... 2002-08-20 23:09:01 +00:00
Dan Kalowsky 52bd0e67c4 Bug fix for #18999 2002-08-20 23:06:46 +00:00
Sander Roobol 86dc20c4b8 MFH 2002-08-20 19:45:44 +00:00
Sander Roobol 4083feba29 MFH (var_unserializer.c follows in a second) 2002-08-20 19:44:51 +00:00
Sascha Schumann 26d7374ce0 MFH 2002-08-20 19:02:59 +00:00
Edin Kadribasic 45c5d641ca MFH (Remove C++ comments, bug #17628) 2002-08-20 08:55:27 +00:00
Edin Kadribasic 32e538969e MFH (Fix for bug #14657, patch by Steph Fox) 2002-08-20 07:10:22 +00:00
Edin Kadribasic 3ac117a19b MFH (Fix for bug #11214, patch by Steph Fox) 2002-08-20 07:07:41 +00:00
Dan Kalowsky 3c97c82ee7 WS fix 2002-08-20 05:19:04 +00:00
Edin Kadribasic 507cc75d92 MFH 2002-08-19 14:06:03 +00:00
Dan Kalowsky 04e94d6f30 MFH 2002-08-19 13:21:45 +00:00
Christian Stocker 9350e18e55 MFH 1.174 (Make domxml_xslt_process() working again.)
MDH 1.187 (DOMXML crash on removing previously created attributes)
2002-08-19 07:27:33 +00:00
Dan Kalowsky 973312e1c5 MFH 2002-08-18 04:33:42 +00:00
Zeev Suraski dd920328ee Fix build 2002-08-17 21:00:43 +00:00
Dan Kalowsky d98ac26bfd MFH - fix Irix compiler errors 2002-08-17 20:03:50 +00:00
Ilia Alshanetsky 19d3cf09f6 Backported memory leak fixes from the 4.3 branch 2002-08-17 16:47:54 +00:00
Dan Kalowsky ad43336c68 MFH 2002-08-17 16:29:32 +00:00
Dan Kalowsky f12fcf4384 MFH, builds and reportadly re-enables nsapi support 2002-08-17 16:25:33 +00:00
Dan Kalowsky bdae3ed4a4 MFH, fixing close crash case on Windows 2002-08-17 16:20:10 +00:00
Zeev Suraski 31660f3c61 MFH Apache threading fix 2002-08-17 15:50:20 +00:00
Stefan Esser f1790b8616 MFH 2002-08-17 12:01:28 +00:00
Edin Kadribasic 137c2c02d9 MFH (make apache2filter work with Apache 2.0.40) 2002-08-15 22:27:03 +00:00
foobar 760e82dd0a MFH 2002-08-15 11:19:54 +00:00
Yasuo Ohgaki fda52535e1 Add 4.2.2 news just in case it's released. 2002-08-15 03:14:49 +00:00
Yasuo Ohgaki 7e9d022dfd MFH. Trans SID related changes. 2002-08-14 22:35:36 +00:00
Sascha Schumann fc2d7434d6 MFH *.a check 2002-08-01 10:19:17 +00:00
Zeev Suraski 19a8ef214e MFH per Rui's request 2002-08-01 05:47:56 +00:00
Yasuo Ohgaki a852f13e62 MFH
Cannot take NULL w/o mbstring.
2002-08-01 02:21:00 +00:00
foobar 28a8a70970 MFH: Fix for Apache version check. 2002-07-29 02:15:19 +00:00
foobar d06b046e86 MFH 2002-07-28 22:58:26 +00:00
Yasuo Ohgaki a713a88392 FHM 2002-07-28 21:03:51 +00:00
Stefan Esser 10e8ca4b3b MFH 2 2002-07-28 18:41:48 +00:00
Stefan Esser 02dafdc9b0 MFH 2002-07-28 18:39:48 +00:00
Yasuo Ohgaki 154fe2b566 MFH 2002-07-28 09:44:18 +00:00
Yasuo Ohgaki 261c2ac79a MFH 2002-07-28 09:26:43 +00:00
Rui Hirokawa a5c8d3aef2 fixed: output encoding translation by mb_output_handler() in ext/mbstring was not usable when Content-Type is set by header(). 2002-07-27 13:15:42 +00:00
foobar 7b475f7004 MFH: fix bug #18570 2002-07-25 17:38:01 +00:00
Stefan Esser 3ba2d54217 MFH 2002-07-25 09:35:18 +00:00
Derick Rethans c07f85ceb4 - MFH for fix for bug #16939 2002-07-25 08:16:40 +00:00
Stefan Esser df15a2e57e MFH 2002-07-24 11:25:55 +00:00
Derick Rethans b5d1bf2a67 - MFH for fix for bug #16626 2002-07-24 10:03:49 +00:00
Derick Rethans 82dfeee01d - MFH for fix for bug #18268 2002-07-24 10:01:31 +00:00
Sascha Schumann f0b94e8796 Working on 4.2.3 now 2002-07-23 13:54:07 +00:00
Sascha Schumann 490894cb44 MFH remove \r 2002-07-23 13:48:11 +00:00
Edin Kadribasic 5f25ab414f Allow pcre.h to be in $PREFIX/include/pcre since this is the case
with some Linux distributions (patch by Troels Arvin <troels@arvin.dk>).
2002-07-23 13:03:03 +00:00
Jan Lehnardt 343c47e24b - merge forgotten WS fix which makes non gcc compilers groan. (#17621) 2002-07-22 22:07:11 +00:00
Georg Richter 27c282d34a Automatic rollback for non committed transactions 2002-07-21 22:19:51 +00:00
Sascha Schumann 4d99f3e4e3 Fix warning
Noticed by: Derick
2002-07-21 12:43:02 +00:00
Sascha Schumann 4e0b6d1e15 MFH fix for wrongly detected CPP on platforms such as Solaris where
a package might be installed which actually does not contain a real
compiler.
2002-07-20 16:25:28 +00:00
Yasuo Ohgaki 154b12f2b5 MFH
@ Trans SID is disabled by default in php.ini
2002-07-19 09:47:06 +00:00
Edin Kadribasic 02d7a70809 MFH 2002-07-15 18:02:09 +00:00
Stefan Esser 7780655d38 use Zend API to access llist count 2002-07-15 16:40:57 +00:00
Edin Kadribasic 12063cbf71 MFH (fixes linking errors when --enable-mbstring is used) 2002-07-14 08:31:45 +00:00
foobar 1586c176f6 .php files are in .cvsignore here 2002-07-14 00:22:52 +00:00
foobar 3cdcc6a201 MFH 2002-07-12 21:47:37 +00:00
SVN Migration 5f6e25342f This commit was manufactured by cvs2svn to create branch 'PHP_4_2_0'. 2002-07-12 13:02:46 +00:00
foobar 38155bfcb2 MFH: Fix for #16337 2002-07-11 02:41:52 +00:00
Jason Greene 6793119e36 Fix socket_set_timeout on win32 ( was not being included ) 2002-07-10 14:59:22 +00:00
foobar d52283eef8 MFH 2002-07-07 00:47:46 +00:00
foobar 60cf7403e0 MFH 2002-07-05 18:33:03 +00:00
Rui Hirokawa 7c9479388f fixed shift_jis character corruption including 0x5c as second byte following a slash on uploaded filename. 2002-07-05 15:02:40 +00:00
Rui Hirokawa 1ac7b33e48 fixed ZTS build. 2002-07-03 22:18:43 +00:00
Rui Hirokawa 2bfd9402b1 fixed ZTS build and added language check. 2002-07-03 22:14:14 +00:00
Edin Kadribasic ae430bfba8 MFH (win32 build fix) 2002-07-03 11:06:10 +00:00
Christian Stocker 765ebf8eee - Not maintained (and maybe not working) anymore
- There's a new project PEAR_Frontend_Web which does a much better job
2002-07-03 09:53:46 +00:00
Rui Hirokawa dadaee4171 *** empty log message *** 2002-07-02 15:28:14 +00:00
Rui Hirokawa dfa9fab613 fixed shift_jis character corruption including 0x5c as second byte on uploaded filename. 2002-07-02 15:27:07 +00:00
Rui Hirokawa 64d489900a fixed shift_jis character corruption including 0x5c as second byte. 2002-07-02 15:26:25 +00:00
foobar 0a65579c76 MFH: Fix for bug #16252 2002-06-30 05:12:22 +00:00
foobar 4279002766 Removing libs/ is not a good idea 2002-06-29 00:59:32 +00:00
foobar 34c3cfa849 MFH: fix for bug: #17999 2002-06-26 23:31:09 +00:00
foobar e5610b3b47 ..unless someone adds all the missing ones.. :) 2002-06-24 11:51:42 +00:00
foobar b891ee9361 Fix the shared build properly. 2002-06-24 11:37:19 +00:00
Edin Kadribasic cac83f87a0 MFH
# Tested build on Linux and Win32.
# Wanted: testers on other platforms.
2002-06-24 09:34:06 +00:00
Derick Rethans 13dcb49db5 - Fix make install to respect the prefix= argument (patch by Troels Arvin
<troels@arvin.dk>)
2002-06-24 08:46:26 +00:00
Derick Rethans 468a3c4f56 - Fix building a shared extension (patch by Troels Arvin <troels@arvin.dk>) 2002-06-24 08:44:42 +00:00
Derick Rethans d94ae09341 - MFH 2002-06-24 08:42:30 +00:00
Derick Rethans f585c6ce18 - MFH 2002-06-24 08:24:21 +00:00
Edin Kadribasic 2af4859c3f MFH 2002-06-24 08:21:28 +00:00
Derick Rethans 17cd2e4cf8 - Fix the MFH :) 2002-06-24 08:18:54 +00:00
Derick Rethans cbdca16521 - MFH 2002-06-24 08:07:40 +00:00
Derick Rethans 76e641e8b7 - Partly MFH 2002-06-24 08:04:01 +00:00
Derick Rethans 322ce93714 - MFH 2002-06-24 08:00:51 +00:00
Derick Rethans e6522b68e9 - MFH 2002-06-24 07:55:32 +00:00
Derick Rethans e5bb3f348e - MFH 2002-06-23 22:28:15 +00:00
Stefan Esser 782fb51ad7 MFH: several fixes to fileupload code 2002-06-23 17:26:03 +00:00
Stefan Esser 3e05989a83 merged in the filtering control chars patch 2002-06-23 17:22:52 +00:00
Stefan Esser 336ca133d3 MFH: link/symlink safe_mode/open_base_dir fix 2002-06-23 17:18:17 +00:00
Stefan Esser 7b04ffa0c5 MFH: replace header fix, content-type header handling fix 2002-06-23 17:15:07 +00:00
Yasuo Ohgaki 30f0b61415 Added missing NEWS entry for a bug fix. 2002-06-20 01:43:32 +00:00
Andrei Zmievski a3b0f8e645 *** empty log message *** 2002-06-17 15:12:40 +00:00
Andrei Zmievski 252d12ce1c MFH 2002-06-17 15:11:39 +00:00
Edin Kadribasic adc45bc653 MFH (fix for #17733) 2002-06-13 08:40:33 +00:00
Christian Stocker ec51555630 MFH (fixed domxml_get_element_by_id() ) 2002-06-12 11:13:35 +00:00
Jan Lehnardt e5f1bf0f83 - MFH (WS-fix) 2002-06-10 16:36:28 +00:00
Daniela Mariaschi 9b087754d1 Add control on Ib version. ibase_add_user(), ibase_modify_user()
and ibase_delete_user() available with IB6 or later.
fix bug #17184
2002-06-06 21:35:38 +00:00
foobar 6c50fdabdf MFH: fix bug #17535 2002-06-04 02:35:00 +00:00
Harald Radi 4fba6307c0 fix build 2002-06-03 20:04:15 +00:00
Edin Kadribasic cbcb6e1936 MFH 2002-06-03 17:57:41 +00:00
Harald Radi 4885bd6361 MFH 2002-05-31 10:08:08 +00:00
Harald Radi 834a71b67e MFH 2002-05-31 09:59:53 +00:00
Edin Kadribasic a4a777fd97 I case we ever release 4.2.2. 2002-05-26 21:22:45 +00:00
Edin Kadribasic fb8a88da3d MFH (fix for exit()) 2002-05-26 21:16:31 +00:00
Edin Kadribasic f2dac4a25a MFH (patch for allowing strings in pow() args, fixes #17374) 2002-05-23 14:38:08 +00:00
Edin Kadribasic d033a0c3fd MFH (fix for #17315) 2002-05-21 01:04:42 +00:00
Markus Fischer fef95081c1 - MFH fix for #17323. 2002-05-20 23:31:02 +00:00
Yasuo Ohgaki b33b5991e1 MFH 2002-05-20 10:30:49 +00:00
foobar 641db909ff MFH 2002-05-19 00:03:34 +00:00
Christian Stocker 62210bef1d MFH for memleak fixes in domxml_dump_mem and domxml_html_dump_mem 2002-05-18 14:43:14 +00:00
Christian Stocker 4cf414e0e1 MFH for memleak patch 2002-05-18 10:21:54 +00:00
foobar d3bc482bf4 MFH 2002-05-16 15:27:50 +00:00
Rasmus Lerdorf 32511e9c55 MFH just in case 2002-05-16 14:53:12 +00:00
Harald Radi 11b294c74d MFH
# found the appropriate branch following the
# 'innsbrugga-style' paradigm markus suggested
2002-05-15 18:05:13 +00:00
Christian Stocker c66a9fdc22 libxml2 >= 2.4.14 is needed (since quite some time ...) 2002-05-15 12:43:00 +00:00
foobar e615a0d3cf Nuke 4.1 for good this time. 2002-05-15 10:22:51 +00:00
foobar ffb9c99cfc MFH 2002-05-15 10:20:36 +00:00
Markus Fischer 974913cf23 - MFH fix for Cc: crash 2002-05-14 14:17:04 +00:00
Jan Lehnardt 23534f667d - MFH 2002-05-14 10:34:14 +00:00
Rasmus Lerdorf 0f9cf6eb18 MFH 2002-05-13 18:12:25 +00:00
Jan Lehnardt 769f1a8564 - MFH 2002-05-13 18:10:53 +00:00
Derick Rethans 4b064814e5 - Bumb version number 2002-05-13 17:14:08 +00:00
Derick Rethans fb1b7c9060 - Fix version 2002-05-12 21:23:57 +00:00
foobar f39b4a8582 short is good 2002-05-12 21:07:40 +00:00
Edin Kadribasic 06ceb7da90 Merged safe_mode fixes into one entry. 2002-05-12 20:54:29 +00:00
Edin Kadribasic 934b4388cb Fixed typo. 2002-05-12 20:36:05 +00:00
Edin Kadribasic 055710e95a MFH 2002-05-12 20:27:37 +00:00
Rasmus Lerdorf 12e6c6d95f MFH 2002-05-12 16:08:31 +00:00
Daniela Mariaschi cd11446263 fix bug #17040
User can't close a connection if there are blobs opened.
He must close them before to not lose data....
2002-05-12 13:01:28 +00:00
Rasmus Lerdorf 844c90a395 Damn, forgot a debug line 2002-05-11 20:02:21 +00:00
Rasmus Lerdorf f9ee6d3d9e Argh! Horrible logic here. The safemode include dir check defaulted
to letting stuff through if no safemode include dir was defined.
@ Another safe-mode fix related to the safemode incdir feature (Rasmus)
2002-05-11 19:56:10 +00:00
Rasmus Lerdorf 2d73699721 MFH - parse_ini_file() safe-mode fix 2002-05-11 19:23:05 +00:00
Rasmus Lerdorf 4caca1d6eb MFH - safe-mode show_source() fix 2002-05-11 18:50:28 +00:00
Zeev Suraski 64595cc959 MFH - avoid choking on 0 byte files 2002-05-11 11:58:52 +00:00
Sebastian Bergmann fb49473192 MFH: Patch by Justin Erenkrantz <jerenkrantz@apache.org>. 2002-05-11 09:49:54 +00:00
Sander Roobol 5c6ec3c7bf Added notes that php.exe and not php-cli.exe should be used. 2002-05-09 09:56:45 +00:00
Jason Greene a86833cc06 Merge overflow fix 2002-05-08 15:33:49 +00:00
Jason Greene dc1ff44e37 MFH BSD fix 2002-05-07 21:34:19 +00:00
Jason Greene ed235cf8b7 MFH 2002-05-06 23:10:54 +00:00
Jason Greene adb0cb5c01 MFH
Fix for ZTS and crash bugs
2002-05-06 20:44:58 +00:00
Derick Rethans 964d412062 - Swap back version number 2002-05-06 18:56:54 +00:00
Derick Rethans 3cb5d4790a - Fix release date 2002-05-06 18:55:55 +00:00
jim winstead a6faca14b7 MFH: fix problem with mkdir() on freebsd 2002-05-06 17:32:05 +00:00
Aaron Bannert 4bbf5a04ed Merge two SEGV fixes from the trunk:
- startup SEGV caused by delaying the initialization too long.
- graceful restart SEGV caused by not re-initializing.
2002-05-06 15:42:23 +00:00
Derick Rethans 99a15a90c7 - Fix release day 2002-05-06 15:22:24 +00:00
Derick Rethans b7e1d6a196 - GO with rc2 2002-05-06 15:19:36 +00:00
foobar 7d884d8e7b MFH 2002-05-05 17:12:27 +00:00
Rui Hirokawa 106d6a77ce fixed problem that ereg_replace() couldn't match with line stand/end marker. 2002-05-05 08:39:57 +00:00
foobar d10a337f00 MFH 2002-05-03 21:31:19 +00:00
Christian Stocker 43b21ea95f full MFH as discussed with derick
#  could someone copy the NEWS entries for domxml from HEAD to PHP_4_2_0
2002-05-03 15:16:15 +00:00
Sander Roobol 42bb3ed035 MFH 2002-05-02 17:20:41 +00:00
Derick Rethans e88d05b9a5 - MFH 2002-05-02 14:20:38 +00:00
Harald Radi 5771743122 MFH 2002-05-02 13:41:30 +00:00
Sascha Schumann dbe6bdca91 Readd warning 2002-05-02 13:23:20 +00:00
foobar ed101fb57d MFH: Do not use the old expat libs. 2002-05-02 10:24:11 +00:00
foobar d689414621 Added the usual search paths where to look for expat. 2002-05-02 10:21:52 +00:00
foobar 05729165c3 MFH 2002-05-02 08:32:45 +00:00
Derick Rethans 192c93ce8e - MFH 2002-05-01 20:12:51 +00:00
Sascha Schumann 1fbcdd2102 MFH 2002-05-01 13:34:53 +00:00
Derick Rethans 474aa9fbdf - Update version number 2002-05-01 12:40:28 +00:00
Derick Rethans 37fb4ddb51 - Go with 4.2.1rc1 2002-05-01 12:11:18 +00:00
Wez Furlong 242cb5ca83 Fix for #16885 2002-05-01 08:23:02 +00:00
Wez Furlong f9f1414172 No asserts in branch 2002-05-01 08:01:36 +00:00
Wez Furlong 4f005f63d5 MFH fix for #16940, compiler warnings and TSRMLS build fixes. 2002-05-01 07:53:53 +00:00
Markus Fischer 53584a7dfd - Mention the socket_select() API change 2002-05-01 07:25:23 +00:00
Markus Fischer 1784f408bc - MFH fix for socket_select() and some minor memory leak; NEWS entry follows. 2002-05-01 07:21:50 +00:00
Harald Radi 811b353f22 MFH 2002-04-30 14:37:39 +00:00
Sascha Schumann a94cc66d1c Touch file 2002-04-30 13:48:06 +00:00
Dan Kalowsky c5f264a8e0 re-setting the CURSOR back to DYNAMIC rather than FORWARD_ONLY. This change
broke many other ODBC drivers (obviously testing wasn't extensive).
# oops, well time to make the proper fix
2002-04-30 13:16:01 +00:00
foobar e78a9cc5d7 MFH: Add the shared extension check. 2002-04-29 22:33:56 +00:00
Harald Radi eb9ce1f481 MFH 2002-04-29 17:57:17 +00:00
Stanislav Malyshev c0c2b6916e MFH 2002-04-29 16:03:57 +00:00
Harald Radi 57edb51964 MFH 2002-04-29 15:54:02 +00:00
Stanislav Malyshev 3d1401d458 MFH serializer fix 2002-04-29 15:45:58 +00:00
Yasuo Ohgaki bd7cb92852 Added touch fix 2002-04-29 09:55:39 +00:00
Yasuo Ohgaki 18e00ac0a3 MFH touch bag fix 2002-04-29 09:43:48 +00:00
Yasuo Ohgaki 1bc1289953 Added NEWS entry for PostgreSQL function rename.
Removed duplicate entry.
2002-04-29 09:20:37 +00:00
foobar 6adaa2c394 Fixed bug: #16858 2002-04-28 23:55:06 +00:00
Sascha Schumann ac1f6d72cd touch file 2002-04-28 21:26:41 +00:00
Stanislav Malyshev fe130827b6 MFH: serializer/unserializer fix 2002-04-28 17:02:11 +00:00
foobar c43d9ad351 Fix bug: #16823 2002-04-28 01:40:05 +00:00
Harald Radi 568e301e46 MFH 2002-04-27 10:28:52 +00:00
foobar a47cc80ad9 MFH: fix for bug #16743 2002-04-27 01:09:56 +00:00
foobar 3f12d0f2e7 MFH: fix bug: #16791 (more reliable version check) 2002-04-26 03:13:00 +00:00
Edin Kadribasic aa431db411 MFH 2002-04-25 21:08:47 +00:00
Edin Kadribasic f36bc79e87 Fix the fix. 2002-04-25 17:18:31 +00:00
Edin Kadribasic e763001682 Fix win32 build 2002-04-25 17:03:17 +00:00
Rui Hirokawa 53da694542 fixed directory access problem when direcory name is encoded in japanese Shift_JIS encoding. 2002-04-25 14:52:58 +00:00
foobar 3af0eb20a0 MFH: fix for bug #16811 2002-04-25 14:02:51 +00:00
Derick Rethans 5c46b61769 - MFH: fix for bug #14353 2002-04-25 06:37:58 +00:00
foobar 0752ba8bc9 MFH 2002-04-24 18:01:10 +00:00
Stanislav Malyshev c5790584df MFH 2002-04-24 16:58:59 +00:00
Andrei Zmievski bc015f22c9 *** empty log message *** 2002-04-24 15:31:41 +00:00
foobar f02b9373c0 MFH 2002-04-24 15:30:16 +00:00
Andrei Zmievski c2ed94ed04 MFH. 2002-04-24 15:29:38 +00:00
Yasuo Ohgaki 86d9796c17 Fixed typo. Compiler compiled with this typo somehow.
# This is not in HEAD since I did this typo when marging :(
2002-04-24 09:46:23 +00:00
Derick Rethans 21c10baabc - Layout and release date 2002-04-24 06:38:35 +00:00
Yasuo Ohgaki 00f74e44b3 Added NEWS for recent multibyte related fixes. 2002-04-24 06:34:50 +00:00
foobar 43ae28411d Forgot this one.. 2002-04-24 02:06:08 +00:00
foobar a69c752d39 Added entry for the SID fix. 2002-04-24 02:04:01 +00:00
foobar 72cee8e34f This was not supposed to be committed.. 2002-04-24 01:53:54 +00:00
foobar 62a7f935b8 MFH 2002-04-24 01:51:50 +00:00
foobar be955c576f Make sure the extension will be named java.so 2002-04-23 23:47:06 +00:00
foobar 691a5a5314 MFH 2002-04-23 23:30:33 +00:00
foobar 30291f81e3 MFH 2002-04-23 23:18:06 +00:00
Markus Fischer 72c4458108 - MFH fix for #16766. 2002-04-23 21:25:50 +00:00
Derick Rethans 71f5acedf9 Fix TSRMLS_CC 2002-04-23 18:59:59 +00:00
Sascha Schumann 86cb47ea9c MFH: Rip out use of O_EXCL 2002-04-23 18:10:49 +00:00
Sascha Schumann 544a3a93a9 MFH define_sid issue 2002-04-23 18:10:06 +00:00
Rui Hirokawa d126bace5f fixed access problem when japanese Shift_JIS character is used as directory name. Some characters in Shift_JIS are including 0x5c (slash) as second byte. 2002-04-23 14:55:10 +00:00
Yasuo Ohgaki f5e96952d8 MFH
Fix empty output when no conversion is done.
Fix possible problem with wide chars.
2002-04-23 12:50:10 +00:00
foobar eb1ef0b37b MFH the possible crash bug fix and warning -> notice change. 2002-04-23 03:08:49 +00:00
Derick Rethans 56b6d7b555 - Fix date 2002-04-22 10:20:23 +00:00
Yasuo Ohgaki dd9ab596d2 Removed for consistency with current build system. 2002-04-20 15:21:18 +00:00
Wez Furlong 83f57e0381 The PECL version probably will not compile with PHP 4.2 unless they
check it out on the branch.
I have a tarball ready-to-go from my site, so add a not about it.
2002-04-20 14:29:06 +00:00
Derick Rethans 3fe419e7a2 - Fix mailparse dir for release 2002-04-20 12:26:32 +00:00
Derick Rethans f334499cec - Update version numbers 2002-04-20 12:14:01 +00:00
Derick Rethans ed253b36ee Go with 4.2.0 2002-04-20 11:14:06 +00:00
Derick Rethans bb41e69096 MFH: Missing .cvsignore file 2002-04-20 11:12:12 +00:00
Adam Dickmeiss f193a2ca40 fix warning 2002-04-19 20:39:27 +00:00
Derick Rethans a67ba9a314 - MFH for bug in Sambar 5.2 2002-04-18 22:52:20 +00:00
Aaron Bannert 34b94f143e Fix an intermittent SEGV when an error bubbled up from PHP before our
server context was set. Now if that happens we simply don't log against
any particular server config (vhost).

Obtained from bug report by:  Balazs Nagy <js@iksz.hu>
2002-04-18 16:34:49 +00:00
Aaron Bannert 23390048f0 It makes more sense to do the null-pointer check *before* trying to use it.
(Also fix a typo that Cliff pointed out: "safe" --> "save".)

Obtained from:  Ryan Morgan <rmorgan@covalent.net>
2002-04-18 16:25:50 +00:00
Stig Bakken 4d518b1a2e * another file that should not have been MFH'ed 2002-04-18 13:08:07 +00:00
Derick Rethans 41806af161 - Make DBA compile as a shared module 2002-04-18 12:31:19 +00:00
Hartmut Holzgraefe b71a29c587 MFH fix for #16473 2002-04-18 10:31:11 +00:00
Harald Radi fb9c8f841f MFH 2002-04-18 10:15:33 +00:00
Stig Bakken 1d03836951 * revert buildv5 changes 2002-04-17 13:35:59 +00:00
Sander Roobol bec22b1ce4 MFH (#16628) 2002-04-16 14:20:57 +00:00
Derick Rethans dd1cedd5ca - Remove version number here 2002-04-16 10:13:00 +00:00
Sterling Hughes 9c999b3d71 this news entry reports a new mailparse addition
a later news entry reports that mailparse has been moved to pecl
1+1 = 2
2002-04-14 23:26:29 +00:00
Thies C. Arntzen 1bb515dc2c fix crash bug introduced by last commit (damncvs diff!) 2002-04-14 18:28:32 +00:00
Derick Rethans d89eed693b - Swap back version numbers after tagging 2002-04-14 15:53:15 +00:00
Derick Rethans fa002563bc - Go with RC4 2002-04-14 15:43:47 +00:00
foobar b605fd9ec6 Make the configure fail if someone tries to use --with-apache with Apache2 2002-04-14 15:00:40 +00:00
Derick Rethans 3d77a3087c - MFH: Fix NULL-termination issue 2002-04-14 08:50:22 +00:00
Rui Hirokawa d7f9043378 fixed error output handler when 'pass' is choosed as output encoding. 2002-04-14 08:12:36 +00:00
foobar e4c4689c3e This is experimental still 2002-04-14 03:52:16 +00:00
foobar 783a4a7d74 Make this work as it was supposed to work. 2002-04-14 03:50:40 +00:00
foobar 2a6153f007 MFH (use of correct javac/jar binaries) 2002-04-14 00:40:59 +00:00
Thies C. Arntzen 9f3f7701f8 MFH: ocibind: avoid warning in debug mode 2002-04-13 18:59:38 +00:00
Thies C. Arntzen e70afa0c54 MFH: Mixing OCIPlogon and OCINLogon no longer leak Oracle-Sessions. (thies)
to RM: this is a real fix that _should_ be in 4.2!
2002-04-13 12:14:02 +00:00
foobar c213d9392c - Makefile.frag is not supposed to be here..
- Net/Socket.php doesn't exist anymore
2002-04-13 04:32:22 +00:00
foobar 5985d044b1 MFH: For example the compile in AIX does not like these at all.. 2002-04-13 00:34:42 +00:00
foobar 9905ed2b05 MFH.
(Prevent users from trying to build Apache 1.x module with Apache 2.x and
vice-versa)
2002-04-13 00:18:54 +00:00
foobar 0b81ec337c MFH (forgot to commit this..sorry Derick..) 2002-04-13 00:17:37 +00:00
Aaron Bannert e0fb69cfc4 Fix a typo and a build error detected by the lovely HPUX11 ANSI C compiler. 2002-04-12 22:26:28 +00:00
Derick Rethans 58b07a4f2c - Swap back development version numbers 2002-04-12 19:29:27 +00:00
Derick Rethans 0ed61df9d5 - Go with RC3 2002-04-12 19:14:18 +00:00
Jan Lehnardt de9cf6516f - fix testcase
- patch by: Roman Neuhauser <neuhauser@mail.cz>
2002-04-12 16:53:34 +00:00
Sander Roobol 24440f1df2 MFH 2002-04-12 15:27:00 +00:00
Rui Hirokawa fd4fb6bddc fixed a bug which causes crash when charset is not set. 2002-04-12 15:07:48 +00:00
Sebastian Bergmann 3bfd4173a2 MFH (Reduce warning level for re2c generated files. 2002-04-12 05:34:45 +00:00
Harald Radi 8dc6530c67 fixed type 2002-04-11 20:35:49 +00:00
Aaron Bannert a032a7e82a Fix a problem where php-generated data was pushed down the entire output
filter chain instead of just down the rest of the chain. This fix will
speed up some unnecessary overhead introduced in the last patch.

Suggested by:  Cliff Woolley <jwoolley@apache.org>
2002-04-11 20:34:31 +00:00
Aaron Bannert f44cd6f30e PHP filters and Apache 2 aren't quite a perfect match yet, so we have
to do some trickery with the server_context to make sure it is always
valid within the current thread.

This patch makes sure the server_context is created in apache's
post_read_request hook phase, and then registeres a cleanup that
will NULL out the server context when the request goes out of scope.
Then, inside the output filters, if the server_context is null we
throw an error. Finally, instead of saving the output filter in
the server_context, now we store the entire request_rec pointer
in there.

POST bodies appear to be working now, although they are very inefficient.
The input filter is still just realloc()ing for whatever data comes
down the input pipe, and then sending this to PHP. This means that
we are doing some really nasty memory management on big POST bodies.
For now this it allows for unlimited input bodies, which means that
a big POST could potentially DoS a box by making it run out of memory.
We might want to put a limit on here just in case, at least until
we figure out how to consume input data more efficiently into php.
2002-04-11 19:27:27 +00:00
Sebastian Bergmann 3dcb8f933f Disable ext/overload. 2002-04-11 18:15:58 +00:00
Aaron Bannert 5d2bb8b8d5 Don't depend on the context provided by the filter (f->ctx) anymore. In
Apache 2 the input and output filter contexts are kept unique. We now
only depend on SG(server_context) for each request, and assume that
the same thread will process the entire request. At some point it
would be wise to separate the input and output contexts.
2002-04-11 17:32:37 +00:00
Aaron Bannert 2721e6afa7 Return the number of bytes consumed, not the number of bytes left.
Suggested by:  Brian Havard <brianh@kheldar.apana.org.au>
2002-04-11 17:18:48 +00:00
Sebastian Bergmann 77b892c26e MFH (Update README). 2002-04-11 17:02:32 +00:00
Derick Rethans b89c43519a - Mark Apache2, overload and aggregation as experimental 2002-04-11 12:53:24 +00:00
Stig Bakken 54175c5fe6 * no more pear/scripts/pear-get 2002-04-11 10:03:02 +00:00
Sebastian Bergmann 3df45d6dd8 MFH (Patch by Aaron Bannert <aaron@clove.org> and Cliff Woolley <jwoolley@virginia.edu>). 2002-04-11 06:04:21 +00:00
foobar 453d7c8e4d Note about Apache2 support being experimental. 2002-04-10 09:45:01 +00:00
foobar c959af2365 MFH 2002-04-10 09:43:07 +00:00
Stig Bakken 827b7998f9 * add missing continuation 2002-04-10 07:59:31 +00:00
Stig Bakken 819a2fc1fd * tabify instead of untabify :-P 2002-04-10 07:58:17 +00:00
Stig Bakken 605682b3c8 * remove pear-get if installed 2002-04-10 07:44:28 +00:00
Stig Bakken 44a43188a6 * keep installing the bundled files in 4.2 too 2002-04-10 07:12:06 +00:00
Derick Rethans 452e8a0660 - Reverse patch 2002-04-10 06:37:49 +00:00
Derick Rethans b5e60437a0 MFH 2002-04-10 06:22:42 +00:00
jim winstead be71676a11 MFH 2002-04-09 20:19:04 +00:00
Stig Bakken 2ea4681ff1 * MFH Makefile 2002-04-09 19:07:52 +00:00
Stig Bakken 76cde0e16e * PEAR MFH
# using rsync this time, does it work?
2002-04-09 19:04:25 +00:00
SVN Migration 8a06e8c6c7 This commit was manufactured by cvs2svn to create branch 'PHP_4_2_0'. 2002-04-09 18:50:55 +00:00
Stig Bakken 09d7728c0a * partial PEAR MFH 2002-04-09 18:04:33 +00:00
SVN Migration 618fe005e6 This commit was manufactured by cvs2svn to create branch 'PHP_4_2_0'. 2002-04-09 17:15:18 +00:00
Stig Bakken 205b621002 * MFH: install the right expat header files 2002-04-09 16:08:18 +00:00
Sterling Hughes b866eac68f fix compile warnings 2002-04-09 06:13:01 +00:00
foobar 9c65107094 MFH 2002-04-08 22:21:30 +00:00
Sebastian Bergmann d3b47d4b2c MFH (MS VS.Net Fix). 2002-04-08 15:40:22 +00:00
Wez Furlong f1d78e3ef5 remove streams option from branch 2002-04-08 12:42:01 +00:00
Edin Kadribasic b1cf064c35 Finished syncing win32 build and docs with the unix counterpart.
Renamed the cli executable to php-cli.exe so somebody doesn't overwrite
cgi by mistake.
# To the packager: php4ts_cli.dsp (php-cli.exe) shouldn't be bundled
# with the binary distribution of PHP 4.2.0.
2002-04-08 08:24:23 +00:00
Sebastian Bergmann 590f13da18 Rename Win32 executable to php.exe. 2002-04-08 07:37:43 +00:00
Derick Rethans a30a24dc0b - MFH 2002-04-08 06:36:39 +00:00
foobar d1ded86a63 MFH 2002-04-08 01:15:16 +00:00
Marcus Boerger 205c2235fa -found userland solution to fix UNICODE comments (see tests/003.phpt)
#solution from HEAD would mean new functionality
#so this fix makes it work without adding new functionality
2002-04-07 19:45:36 +00:00
SVN Migration 0e1a181b47 This commit was manufactured by cvs2svn to create branch 'PHP_4_2_0'. 2002-04-07 19:42:06 +00:00
Derick Rethans 5a673f727c - MFH zip_entry_read_bug 2002-04-06 17:29:44 +00:00
Wez Furlong 32562cac4e Inform the masses about where to get a 4.2 compatible mailparse package 2002-04-06 16:58:49 +00:00
Sebastian Bergmann 79100113a7 MFH (.dsp fixes) 2002-04-06 16:12:52 +00:00
Sterling Hughes 1491b7a07d MFH changes per doug's request 2002-04-05 21:23:30 +00:00
Joseph Tate 28b6e435bf MFH added unlink_node alias 2002-04-05 19:13:58 +00:00
foobar 3eec585f05 MFH the fixed entries 2002-04-05 12:00:18 +00:00
Wez Furlong ea0d37a507 let people know about mailparse being pickled 2002-04-05 09:07:48 +00:00
Wez Furlong 4f2d14d7da MFH: add mbstring headers to those for pear/pecl extensions 2002-04-05 09:04:38 +00:00
Yasuo Ohgaki 14a77654c1 Forgot mention fixed bug that is reported by user. 2002-04-05 07:14:35 +00:00
Yasuo Ohgaki 254485dbea MFH.
Fixed pg_last_notice() double free.
2002-04-05 06:45:25 +00:00
Marcus Boerger bd30c3c17c removed calls to wctomb, wcstombs
#leave UNICODE to user
2002-04-04 20:42:47 +00:00
Sterling Hughes e4f620f894 mfh 2002-04-04 20:27:24 +00:00
Daniela Mariaschi f096c0ca6f Fixed sigfault in ibase_close (bug #15419-#15992) 2002-04-04 20:13:41 +00:00
jim winstead fad7db9695 MFH. mailparse moved to pear/PECL. 2002-04-04 18:44:33 +00:00
Yasuo Ohgaki aa6046f941 MFH
# Fixed crash with pg_escape_*()
# Added test for pg_escape_*()
2002-04-04 15:29:34 +00:00
SVN Migration 401f3711f6 This commit was manufactured by cvs2svn to create branch 'PHP_4_2_0'. 2002-04-04 15:25:47 +00:00
foobar e672133aa8 MFH 2002-04-04 14:33:35 +00:00
foobar c1a5d08fe1 missing .cvsignore 2002-04-04 13:37:57 +00:00
Sterling Hughes 20c3de56d5 MFH 2002-04-04 00:04:25 +00:00
foobar f8113293d3 Fix the test..somehow got corrupted? 2002-04-03 23:05:39 +00:00
foobar f4166f11e9 Partial MFH 2002-04-03 23:04:53 +00:00
foobar 7f4ff662fe - Added the autom4te.cache to be cleaned too with cvsclean 2002-04-03 19:58:45 +00:00
Derick Rethans 37461bd51f - Swap back version numbers for development 2002-04-03 19:53:54 +00:00
Derick Rethans 653273f34f - Fix build (Patch by Marcus Boerger) 2002-04-03 19:51:26 +00:00
Derick Rethans 361b97226e - Fix version number 2002-04-03 19:47:13 +00:00
Kirill Maximov 96a9a83f15 #Fix for the quot_print - remove unneeded char. 2002-04-02 08:54:23 +00:00
foobar c622d74952 MFH 2002-04-01 23:29:19 +00:00
Kirill Maximov 496133babd (PHP quoted_printable_decode) Fixed CR/LF processing for Windows/OS2
@ Fixed CR/LF processing for Windows/OS2 in quoted_printable_decode (kir)
2002-04-01 19:27:16 +00:00
Marcus Boerger 2c7866cf8b MFH finding test files 2002-04-01 13:27:47 +00:00
Yasuo Ohgaki e00cf495f7 MFH.
Forgot to commit this when I commit fix build with PostgreSQL 6.5.x
2002-04-01 11:44:52 +00:00
Derick Rethans c10647f7f0 - MFH for fix for bug #14966 2002-04-01 09:21:29 +00:00
Rui Hirokawa cac350dc27 moved static constant definitions for separeted files to fix compilation problem in Tru64. 2002-03-31 05:16:27 +00:00
Rui Hirokawa 83fa61ef7b revert Sascha's patch to fix compile error in Tru64. 2002-03-31 00:29:51 +00:00
Rui Hirokawa 8fbfb292d0 fixed crash bug in Tru64. 2002-03-31 00:19:17 +00:00
Yasuo Ohgaki 3e13ac26e9 MFH. 6.5.3 libpq build fix. 2002-03-30 23:23:58 +00:00
Marcus Boerger 8aa98687fa - corrected test-image 2002-03-30 19:11:44 +00:00
Marcus Boerger 131f5cfce2 MFH - corrected test-image 2002-03-30 18:32:09 +00:00
Marcus Boerger 3f9001850e -memory leaks 2002-03-30 18:31:08 +00:00
foobar 4462ee40ec another missing .cvsignore 2002-03-30 03:23:42 +00:00
foobar eb13b12855 missing .cvsignore 2002-03-30 03:14:40 +00:00
foobar 1206b0c1e7 missing entry (still needed here..) 2002-03-30 03:14:19 +00:00
foobar 9e14a25a81 MFH 2002-03-30 03:07:47 +00:00
Markus Fischer ce1bd6d110 - MFH fix for #16348. 2002-03-30 01:58:24 +00:00
foobar 8c5a1a03db - MFH fixes for these tests. 2002-03-29 15:15:16 +00:00
Derick Rethans 0d10b7dead - Backout Makefile patch, it caused problems 2002-03-28 10:58:39 +00:00
Derick Rethans 231b8e147f - Fix build for BSD: BSD_MAKEFILE and resolver functions. (Patch by Melvyn
Sopacua <msopacua@idg.nl>)
2002-03-28 07:56:35 +00:00
Derick Rethans 000eaf4a5a - MFH for bug 16314 2002-03-28 07:48:50 +00:00
Derick Rethans 20d1c8d5d0 - Fix build on BSDI 2002-03-28 07:35:09 +00:00
foobar ec92b77e22 MFH: fixed bug: #16237 2002-03-27 23:47:42 +00:00
Derick Rethans 408a8dfead - MFH for multiple To: lines 2002-03-27 20:39:27 +00:00
Yasuo Ohgaki 9080907ed7 MFH error message consistency changes 2002-03-27 00:14:30 +00:00
Sander Roobol 3757566d4f MFH 2002-03-26 18:18:18 +00:00
SVN Migration 8b4e565285 This commit was manufactured by cvs2svn to create branch 'PHP_4_2_0'. 2002-03-26 18:17:39 +00:00
Derick Rethans 6277583f69 - MFH for bug #11244 2002-03-26 08:57:18 +00:00
Derick Rethans beb3b6b44a - No asserts in the branch 2002-03-26 08:47:41 +00:00
Derick Rethans 8b416f0334 - Fix comments 2002-03-26 08:28:31 +00:00
Derick Rethans 9d277028e5 - MFH for passphrase bug 2002-03-26 07:40:00 +00:00
foobar 2b411094db MFH the use of correct header file -fix 2002-03-26 00:16:01 +00:00
foobar a618edb5dd MFH fixes for the iconv stuff 2002-03-26 00:15:34 +00:00
SVN Migration 5064f0781f This commit was manufactured by cvs2svn to create branch 'PHP_4_2_0'. 2002-03-26 00:03:12 +00:00
foobar 7ed66b20e5 MFH dl() error message fix 2002-03-25 23:22:05 +00:00
Edin Kadribasic 910cb1be81 Hidden the existance of CLI SAPI by:
- removing the NEWS entry
- removing cli from make install chain
- marking it EXPERIMENTAL
- reverting installed name of cgi from php-cgi to php

Marged max_execution_time override from head.
# I really hope that people who found cli to be "inconsistent" and
# "unstable" will find time to help rectify those problems.
2002-03-25 17:02:30 +00:00
Jan Lehnardt 9a78224278 - MFH 2002-03-24 23:17:06 +00:00
SVN Migration 718a1eb400 This commit was manufactured by cvs2svn to create branch 'PHP_4_2_0'. 2002-03-24 23:16:43 +00:00
Alex Waugh c325305a7c MFH 2002-03-24 22:58:08 +00:00
Jan Lehnardt 3c612c6432 - finally MFH. sorry for the inconveniance, especially Derick ;) 2002-03-24 16:43:58 +00:00
SVN Migration abd6206fee This commit was manufactured by cvs2svn to create branch 'PHP_4_2_0'. 2002-03-24 16:22:51 +00:00
Derick Rethans 016b308031 - MFH for bug #16232 (Patch by Alan Knowles <alan@akbkhome.com>) 2002-03-24 10:42:07 +00:00
Jan Lehnardt de30eedb5e - MFH 2002-03-23 23:26:27 +00:00
jim winstead fe8b66a4fe MFH 2002-03-23 18:40:59 +00:00
jim winstead 5819639209 MFH. 2002-03-23 18:38:25 +00:00
Marcus Boerger 5ba7dbb89f -no german in NEWS 2002-03-23 17:36:53 +00:00
Edin Kadribasic edd5bf9267 MFH (crypt on win32) 2002-03-23 14:51:30 +00:00
Rui Hirokawa e3f5063ec2 fixed some compilation warning. 2002-03-23 01:12:54 +00:00
Rui Hirokawa 3e348ed92f fixed POST/GET argument handling. 2002-03-23 01:12:29 +00:00
Derick Rethans 8a0805cd3a - Oops... I didn't mean to commit this 2002-03-22 14:28:46 +00:00
Derick Rethans 8a7354d1fd MFH 2002-03-22 14:26:09 +00:00
foobar 9d5d693cf6 MFH 2002-03-22 12:48:28 +00:00
Derick Rethans c808eacefb MFH for bug 14664 2002-03-22 12:15:34 +00:00
Derick Rethans 454666e36c MFH: Fix phpinfo() output 2002-03-22 09:19:53 +00:00
foobar a0ab5d239e MFH fix for bug #16182 2002-03-22 01:12:52 +00:00
Rasmus Lerdorf 5b2f73c7ac Fix for bug #15667 2002-03-21 21:53:26 +00:00
Derick Rethans 324eb12388 - Fix PGSql Compile 2002-03-21 21:49:11 +00:00
foobar ca6c23c5db - MFH iconv fixes. 2002-03-21 20:25:25 +00:00
foobar e5876039bb This file is generated, not supposed to be here. 2002-03-21 20:24:30 +00:00
SVN Migration d8a09a7c5b This commit was manufactured by cvs2svn to create branch 'PHP_4_2_0'. 2002-03-21 20:10:25 +00:00
Daniela Mariaschi 4edfec2b6c fixed numeric number incorrectly rendered 2002-03-21 16:53:06 +00:00
Ludovico Magnocavallo 4756d3234b synched with HEAD, tests 1-2-3-6 pass, 5 fails but ok, 4 needs work 2002-03-21 14:51:45 +00:00
Sander Roobol 29b19d979f MFH: more tests for pow() and count() 2002-03-21 14:23:24 +00:00
Sebastian Bergmann 529a68d134 MFH: ext/overload is a 'built-in' extension on Win32. 2002-03-21 06:26:49 +00:00
Boian Bonev 8251af93d9 MFH vpopmail 5.2 version compatibility fix 2002-03-20 20:09:58 +00:00
Boian Bonev 730634bbb4 ws fix 2002-03-20 19:44:29 +00:00
foobar b8ef38a0e2 MFH 2002-03-20 19:00:35 +00:00
Derick Rethans 58c70caf41 MFH makedist 2002-03-20 18:54:47 +00:00
Stefan Esser 85ca6a5fb7 MFH: filepro fixes 2002-03-20 18:21:19 +00:00
Derick Rethans f07d389ef2 - MFH iconv fix
- Configure Fix for vpopmail
2002-03-20 18:16:06 +00:00
Stefan Esser c3a9018ac4 MFH of bufferoverflow fix 2002-03-20 16:08:04 +00:00
Stefan Esser 72ff5105ef MFH of safe_mode.c text fix 2002-03-20 09:02:54 +00:00
Derick Rethans 1fd19dc38d MFH Sascha's fix 2002-03-20 08:56:15 +00:00
Markus Fischer 911042faeb - MFH fix for #16176. 2002-03-20 08:40:33 +00:00
Markus Fischer 9ecbb3cfd1 - MFH fix for #16120 (this also MFHs the proto fix by Sebastion which
I hope is ok).
2002-03-20 07:53:27 +00:00
foobar fc7bb77cd5 - Fixed bug: #14147 (partial MFH, the uncompress issue) 2002-03-20 01:58:34 +00:00
foobar 5336747ece MFH 2002-03-20 00:40:53 +00:00
foobar 7662c57e57 - MFH iconv fix 2002-03-19 22:40:29 +00:00
Stig Bakken 474f6007e2 MFH: Jani's fix to my iconv fix 2002-03-19 01:08:18 +00:00
Vlad Krupin ea25cdd7b7 MFH (rev. 1.49) 2002-03-18 23:16:57 +00:00
Derick Rethans 4d65bfe327 MFH socket fix 2002-03-18 22:12:57 +00:00
Derick Rethans e2ecf549e1 - MFH for bugfix for bug #10001 2002-03-18 21:40:55 +00:00
Edin Kadribasic 8daa261b97 MFH 2002-03-18 15:13:47 +00:00
Derick Rethans 5065f8bcb8 - MFH: backing out requirement on C++ compiler 2002-03-18 14:52:41 +00:00
jim winstead 6fa911f091 MFH 2002-03-18 02:05:06 +00:00
Stefan Esser 6ac350d1b8 move_uploaded_files checks open_basedir now 2002-03-17 20:54:57 +00:00
Marcus Boerger c998e8137e -fix bug with not correctly terminated comments 2002-03-16 20:02:12 +00:00
Rui Hirokawa c104474c3c fixed errors of mbstring in regression tests. 2002-03-16 07:13:14 +00:00
foobar 0555ad1f5d MFH 2002-03-15 21:46:18 +00:00
Harald Radi 2671926476 MFH 2002-03-15 21:03:20 +00:00
Harald Radi 30d72b04b5 MFH 2002-03-15 20:54:35 +00:00
foobar 663b247700 MFH 2002-03-15 20:22:32 +00:00
Stig Bakken f2135637e9 * MFH: "new and improved" iconv test 2002-03-15 14:16:52 +00:00
Stig Bakken 4f8ae68563 * MFH: yet another iconv fix 2002-03-15 14:15:04 +00:00
Marcus Boerger 5933b60dc0 #according to my ideas/patches 2002-03-15 11:24:55 +00:00
Rasmus Lerdorf 05e13601c9 MFH of safe_mode.c typo 2002-03-14 19:17:23 +00:00
Zeev Suraski af5e1c0364 MFH 2002-03-14 18:39:37 +00:00
Sebastian Bergmann 0b1db2afae MFH (Apache2Filter update). 2002-03-14 10:57:00 +00:00
Stefan Roehrich 30c35d4330 Added NEWS entry for gzencode() change. 2002-03-14 08:55:54 +00:00
foobar 61aa311e62 MFH fix for the include_path issue 2002-03-14 01:46:42 +00:00
Stefan Roehrich 8a010b513e Fix for #15930 in release branch.
@- The second parameter of gzencode() now is the compression level
@  like in the documentation. The encoding mode is a third (optional)
@  parameter. (Stefan)
2002-03-13 20:49:45 +00:00
Stefan Roehrich 29b1a4e97d Fix for #14939 in release branch. 2002-03-13 20:39:26 +00:00
Marcus Boerger e57cb388e2 -release merge
#discussed with derick
2002-03-13 19:49:35 +00:00
Jason Greene fa742989b5 Regenerate Credits for Release 2002-03-13 18:54:18 +00:00
Jason Greene 72f7116854 Merge credits fixes 2002-03-13 18:53:12 +00:00
Jason Greene 8c5aad339d Update credits in release branch 2002-03-13 14:41:15 +00:00
Jason Greene 6cd5cc0fa0 Update Credits in release branch 2002-03-13 14:22:51 +00:00
Stig Bakken 33f08d0231 * MFH: another libconv->libiconv typo 2002-03-13 09:59:54 +00:00
Christian Stocker 20120ecff3 Return attribute name in node_name(), if it's a XML_ATTRIBUTE_NODE 2002-03-13 08:15:54 +00:00
Christian Stocker 53b34e0e34 Return #document in node_name(), if it's a XML_DOCUMENT_NODE 2002-03-13 07:38:14 +00:00
Marcus Boerger 4ac3fdc8d9 -remove filetime from test
# that's magic - now the test should work on all installations
2002-03-13 00:27:19 +00:00
Stig Bakken 9363eaae3d * MFH: fix compile problem on platforms without iconv in libc 2002-03-12 15:16:44 +00:00
Marcus Boerger 1c1401787a -merged a wrong line
#this comes later, i left the documentation onthat)
-one compiling issue
#maybe some comilers get angry on the old form
2002-03-12 05:57:28 +00:00
foobar 902167c255 MFH 2002-03-12 02:27:47 +00:00
Derick Rethans 12cb33af5d - MFH for bug #16008 2002-03-11 23:11:37 +00:00
Marcus Boerger a810e44570 -Change status of ext/exif 2002-03-11 19:06:46 +00:00
Marcus Boerger 8ec3b47402 -fixes: memory handling & corrupted files
#don't worry i spend the whole day merging code
#and differenciating what was new functionality and what are
#necessary fixes.
2002-03-11 19:04:29 +00:00
Sascha Schumann f893cc65e1 MFH: refining supported thttpd version 2002-03-11 12:28:58 +00:00
Markus Fischer 98e8dede11 - MFH fix for #15799. 2002-03-10 23:00:35 +00:00
Rui Hirokawa c87a849a3e fixed module name iconv->mbstring. 2002-03-10 12:22:27 +00:00
Stefan Esser 3d343076ee Fix: Now returns correct Content-Type for Opera 6.01 2002-03-10 11:04:20 +00:00
foobar 86733d3b4f - Fixed bug #15748 (fixed otherwise in 4.3.0-dev) 2002-03-09 23:37:49 +00:00
foobar 1b7d024e5c MFH fix for bug #15686 and some exslt fix. 2002-03-09 21:38:35 +00:00
foobar cfafb32049 MFH fix for #15190 2002-03-09 18:17:37 +00:00
Jason Greene c68550c45d MFH: Recent Bug Fixes 2002-03-09 07:20:35 +00:00
foobar 74d82d0cb7 MFH 2002-03-09 00:26:40 +00:00
foobar 4e98e2d832 MFH the MacosX compile fix. 2002-03-09 00:26:09 +00:00
Joseph Tate 0d03789fb9 - Fixed a coredump involved in the domxml_unlink() function. Refer to bug #14522
for more details.
@ Fixed seg fault in domxml_unlink() (jtate)
2002-03-08 23:39:26 +00:00
foobar a8677aafbc - MFH (fix for the phpinfo() output) 2002-03-08 07:35:07 +00:00
Rui Hirokawa 4f9949dc2a revert my patch to fix freetype2 related problem. 2002-03-07 22:27:14 +00:00
Jason Greene 05d1e6d88f Merge News Entry 2002-03-07 20:50:52 +00:00
Jon Parise 5fcc8ca854 MFH r1.45: header file correction 2002-03-07 20:41:50 +00:00
Jason Greene 760add1c63 Disallow mysql's 'LOAD LOCAL' when safe mode is enabled 2002-03-07 20:39:55 +00:00
Derick Rethans 35d8b9408e - Fix typo in warning suppressor 2002-03-07 20:00:33 +00:00
Joseph Tate e1e8ee1924 Reverting the reverted patch. I hope this is the last time. No added functionality. Just a bug fix of #15918 2002-03-07 18:53:55 +00:00
Joseph Tate 15c658f21f Reverting patch at Derick's request. Reverted to 1.118 2002-03-07 18:47:25 +00:00
Joseph Tate 58269f1769 Added type attributes to XML_DTD_NODE and XML_ATTRIBUTE_NODE element types.
Reported in bug #15918.
2002-03-07 16:48:43 +00:00
Derick Rethans b736409e52 - Update NEWS 2002-03-07 08:18:02 +00:00
Jason Greene dd955a3b41 MFH 2002-03-07 00:24:30 +00:00
SVN Migration c5c68f4d36 This commit was manufactured by cvs2svn to create branch 'PHP_4_2_0'. 2002-03-06 22:08:26 +00:00
926 changed files with 24288 additions and 133872 deletions

No files matched your search

+3 -13
View File
@@ -60,19 +60,9 @@ Exceptions:
check its man page again, and only then, consider using it, and even then,
try avoiding it.
[7] Use ZEND_* macros instead of PHP_* macros. Use of PHP_* macros is not
recommended. Since most of the PHP_* macros are ZEND_* macro aliases, using
the PHP_* macros makes browsing the source code with a tag search harder.
[8] Use assert(). assert.h is included in php.h if it is available. Not only
does good assertion catch bugs, but it also helps with code readability.
- Do not use assert for error handling. Use assert only for the
condition that must be always true.
- Do not use assignments in assert conditions. If you assign inside an
assert condition, you risk an elusive bug that would be very difficult
to spot in a debug build, due to the side effect of the assignment.
Function calls in assert conditions may also cause this problem, if
they modify one of their arguments or global variables.
[7] Use ZEND_* macro instead of PHP_* macro. Use of PHP_* macros are
not recommended. Since most of PHP_* macros are ZEND_* macro alias, use of
PHP_* macro makes browsing source with tag search harder.
Naming Conventions
------------------
+1 -1
View File
@@ -1,2 +1,2 @@
For the list of people who've put work into PHP, please see
For the list of people who've put work into PHP 4.0, please see
http://www.php.net/credits.php
-11316
View File
File diff suppressed because it is too large. Load diff
-10
View File
@@ -36,11 +36,6 @@ PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: apache2
PRIMARY MAINTAINER: Aaron Bannert <aaron@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: cgi
MAINTENANCE: Unknown
STATUS: Working
@@ -221,11 +216,6 @@ MAINTENANCE: Unknown
STATUS: Experimental
SINCE: 4.0.5
-------------------------------------------------------------------------------
EXTENSION: ctype
PRIMARY MAINTAINER: Hartmut Holzgraefe <hartmut@six.de>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: curl
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
MAINTENANCE: Maintained
+21 -17
View File
@@ -1,5 +1,5 @@
--------------------------------------------------------------------
The PHP License, version 3.0a1
The PHP License, version 3.0
Copyright (c) 1999 - 2002 The PHP Group. All rights reserved.
--------------------------------------------------------------------
@@ -8,34 +8,38 @@ modification, is permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. The name "PHP" must not be used to endorse or promote products
derived from this software without prior permission from the
PHP Group. This does not apply to add-on libraries or tools
that work in conjunction with PHP. In such a case the PHP
name may be used to indicate that the product supports PHP.
3. The name "PHP" must not be used to endorse or promote products
derived from this software without prior written permission. For
written permission, please contact group@php.net.
4. Products derived from this software may not be called "PHP", nor
may "PHP" appear in their name, without prior written permission
from group@php.net. You may indicate that your software works in
conjunction with PHP by saying "Foo for PHP" instead of calling
it "PHP Foo" or "phpfoo"
4. The PHP Group may publish revised and/or new versions of the
5. The PHP Group may publish revised and/or new versions of the
license from time to time. Each version will be given a
distinguishing version number.
Once covered code has been published under a particular version
of the license, you may always continue to use it under the
terms of that version. You may also choose to use such covered
code under the terms of any subsequent version of the license
of the license, you may always continue to use it under the terms
of that version. You may also choose to use such covered code
under the terms of any subsequent version of the license
published by the PHP Group. No one other than the PHP Group has
the right to modify the terms applicable to covered code created
under this License.
5. Redistributions of any form whatsoever must retain the following
6. Redistributions of any form whatsoever must retain the following
acknowledgment:
"This product includes PHP, freely available from
http://www.php.net/".
<http://www.php.net/>".
THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-18
View File
@@ -1,18 +0,0 @@
$(builddir)/zend_language_scanner.lo: $(builddir)/zend_language_parser.h
$(builddir)/zend_ini_scanner.lo: $(builddir)/zend_ini_parser.h
$(builddir)/zend_language_scanner.c: $(srcdir)/zend_language_scanner.l
$(LEX) -Pzend -S$(srcdir)/flex.skl -o$@ -i $(srcdir)/zend_language_scanner.l
$(builddir)/zend_language_parser.h: $(builddir)/zend_language_parser.c
$(builddir)/zend_language_parser.c: $(srcdir)/zend_language_parser.y
$(YACC) -p zend -v -d $(srcdir)/zend_language_parser.y -o $@
$(builddir)/zend_ini_parser.h: $(builddir)/zend_ini_parser.c
$(builddir)/zend_ini_parser.c: $(srcdir)/zend_ini_parser.y
$(YACC) -p ini_ -v -d $(srcdir)/zend_ini_parser.y -o $@
$(builddir)/zend_ini_scanner.c: $(srcdir)/zend_ini_scanner.l
$(LEX) -Pini_ -S$(srcdir)/flex.skl -o$@ -i $(srcdir)/zend_ini_scanner.l
$(builddir)/zend_indent.lo $(builddir)/zend_highlight.lo $(builddir)/zend_compile.lo: $(builddir)/zend_language_parser.h
-72
View File
@@ -1,72 +0,0 @@
mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p
INSTALL = $(top_srcdir)/build/shtool install -c
INSTALL_DATA = $(INSTALL) -m 644
DEFS = -DPHP_ATOM_INC -I$(top_builddir)/include -I$(top_builddir)/main -I$(top_srcdir)
COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS)
all: $(all_targets)
build-modules: $(PHP_MODULES)
libphp4.la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
libs/libphp4.bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp4.so
php: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(LIBTOOL) --mode=link $(CC) -export-dynamic $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
sapi/cli/php: $(PHP_GLOBAL_OBJS) $(PHP_CLI_OBJS)
$(LIBTOOL) --mode=link $(CC) -export-dynamic $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_CLI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
install: $(install_targets)
install-cli: sapi/cli/php
$(INSTALL_CLI)
install-sapi: libphp4.la
-@$(LIBTOOL) --silent --mode=install cp libphp4.la $(phptempdir)/libphp4.la >/dev/null 2>&1
-@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
-@if test ! -r $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME); then \
for i in 0.0.0 0.0 0; do \
if test -r $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME).$$i; then \
$(LN_S) $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME).$$i $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME); \
break; \
fi; \
done; \
fi
$(INSTALL_IT)
install-modules:
@test -d modules && \
$(mkinstalldirs) $(INSTALL_ROOT)$(EXTENSION_DIR) && \
echo "installing shared modules into $(EXTENSION_DIR)" && \
rm -f modules/*.la && \
cp modules/* $(INSTALL_ROOT)$(EXTENSION_DIR) >/dev/null 2>&1 || true
install-tester:
@echo "Installing regression tester"
@$(mkinstalldirs) $(PEAR_INSTALLDIR)
@$(INSTALL) -m 755 $(top_srcdir)/run-tests.php $(INSTALL_ROOT)$(PEAR_INSTALLDIR)
install-su: install-pear install-tester
test: sapi/cli/php
@TEST_PHP_EXECUTABLE=$(top_builddir)/sapi/cli/php \
$(top_builddir)/sapi/cli/php -c php.ini-dist $(top_srcdir)/run-tests.php
clean:
find . -name \*.lo -o -name \*.o -o -name \*.la -o -name \*.a| xargs rm -f
find . -name .libs -a -type d|xargs rm -rf
rm -f libphp4.la php sapi/cli/php modules/* libs/*
distclean: clean
rm -f config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h php4.spec sapi/apache/libphp4.module buildmk.stamp
find . -name Makefile | xargs rm -f
.PHONY: all clean install distclean test
.NOEXPORT:
+66
View File
@@ -0,0 +1,66 @@
ZEND_DIR = $(srcdir)/Zend
SUBDIRS = Zend main ext sapi $(TSRM_DIR) $(REGEX_DIR) $(CLI_DIR) . $(PEAR_DIR)
LTLIBRARY_NAME = libphp4.la
LTLIBRARY_SOURCES = stub.c
LTLIBRARY_DEPENDENCIES = \
Zend/libZend.la \
sapi/$(PHP_SAPI)/libsapi.la \
main/libmain.la \
$(REGEX_LIB) \
$(EXT_LTLIBS) \
$(TSRM_LIB)
LTLIBRARY_LDFLAGS = -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS)
LTLIBRARY_LIBADD = $(LTLIBRARY_DEPENDENCIES) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS)
PROGRAM_NAME = php
PROGRAM_SOURCES = stub.c
PROGRAM_LDADD = libphp4.la $(EXT_PROGRAM_LDADD)
PROGRAM_LDFLAGS = -export-dynamic
PROGRAM_DEPENDENCIES = $(PROGRAM_LDADD)
targets = $(LTLIBRARY_NAME) $(PHP_PROGRAM)
install_targets = install-sapi install-modules
include $(top_srcdir)/build/rules.mk
include $(top_srcdir)/build/library.mk
include $(top_srcdir)/build/program.mk
install-sapi:
@$(LIBTOOL) --silent --mode=install cp libphp4.la $(phptempdir)/libphp4.la >/dev/null 2>&1
-@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
-@if test ! -r $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME); then \
for i in 0.0.0 0.0 0; do \
if test -r $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME).$$i; then \
$(LN_S) $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME).$$i $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME); \
break; \
fi; \
done; \
fi
$(INSTALL_IT)
install-modules:
@test -d modules && \
$(mkinstalldirs) $(INSTALL_ROOT)$(moduledir) && \
echo "installing shared modules into $(moduledir)" && \
rm -f modules/*.la && \
cp modules/* $(INSTALL_ROOT)$(moduledir) >/dev/null 2>&1 || true
install-tester:
@echo "Installing regression tester"
@$(mkinstalldirs) $(INSTALL_ROOT)$(PEAR_INSTALLDIR)
@$(INSTALL) -m 755 $(srcdir)/run-tests.php $(INSTALL_ROOT)$(PEAR_INSTALLDIR)
install-pear: install-modules
(cd pear && $(MAKE) install)
install-su: install-pear install-tester
clean-modules:
rm -f modules/*
.NOEXPORT:
+38 -131
View File
@@ -1,127 +1,42 @@
PHP 4 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2002, Version 4.3.0
- Added preliminary SAX-Input support. It's now possible to build a DomDocument
with SAX-Events (added domxml_parser_start_document(), domxml_parser_end_document(),
domxml_parser_start_element(tagname[,attributes]), domxml_parser_end_element(tagname),
domxml_parser_characters(characters), domxml_parser_cdata_block(cdata),
domxml_parser_comment(comment), domxml_parser_get_document(). (chregu)
- Bundle gd library 2.0.1 with php (ext/gd/libgd) (Rasmus), tweak config.m4 to
work with it (Jani), smallers tweaks for Win32 (Markus, Edin)
- Fixed bug with Apache which let PHP_AUTH_* variables to be set when
external basic auth mechanism was used. (Jani)
- Fixed bzopen() crash in thread-safe mode. (Andrei)
- Added better error-messages (3rd parameter) and validating of DTDs (2nd
parameter) to domxml_open_mem() and domxml_open_file(). (Christian)
- Added domxml_doc_validate() for validating existing DomDocuments with a DTD.
(Christian)
- Added ability to capture string offsets in preg_match_*() results.
(David Brown, Andrei)
- Fixed set_error_handler() to accept methods as callbacks and also report
invalid callbacks. (Andrei)
- Fixed a memory corruption bug in overload extension. (Andrei)
- Fixed error handling in fsockopen() on win32. (Jason)
- Added win32 support for the timeout parameter of fsockopen(). (Jason)
- Fixed shuffle() to provide equal distribution of values. (Andrei)
- Added --with-mysql-sock configure option which can be used to override
the unix socket location. (e.g. NFS compiles, etc.) (James Cox)
- Fixed is_a() to properly work on extension registered classes. (Andrei)
- Added new constants: PHP_PREFIX and PHP_SHLIB_SUFFIX. (Stig)
- Added STDIN, STDOUT and STDERR constants for CLI sapi reflecting opened
streams to their respective I/O counterparts. (Edin)
- Added pctnl_alarm() function. (Edin)
06 Sep 2002, Version 4.2.3
- Enabled strcoll() on win32. (Markus)
- Fixed possible ASCII control char injection in mail(). (Stefan Esser)
- Fixed a potential crash bug in import_request_variables() (Zeev)
- Fixed several problems with directory functions on Windows. (Steph)
- Fixed xbithack bug in Apache module. (Rasmus)
- Fixed a bug that prevented touch() from working on various platforms. (Steph)
- Fixed ob_gzhandler()'s handling of requests that do have the Accept-Encoding
header, but do not allow compression. (Zeev)
- Fixed several bugs in the multithreaded version that could cause random parse
errors, especially on machines with multiple CPUs. (Zeev, Zend Engine)
- Fixed a build problem in bcmath. (Alan)
- Fixed several bzip2 issues. (Andrei, kalowsky)
- Fixed several COM issues. (Harald)
- Various exif fixes. (Marcus)
- Fixed domxml_xslt_process() and domxml_get_element_by_id() and several
other issues in DOMXML. (Christian)
- Fixed DOMXML crash on removing previously created attributes. (Christian)
- Fixed crash when converting $GLOBALS to an object. (Zeev, Zend Engine)
- Fixed ImageCreateFromGD2Part() (Jani)
- Fixed a build issue in the IMAP extension under IRIX. (kalowsky)
- Fixed a bug in imap_last_error() (Jani)
- Various mbstring fixes. (Yasuo, Rui)
- Fixed a build problem in the mcal extension. (Jani)
- Made MySQL rollback open transactions when the request ends. (Georg)
- Fixed a crash in the shutdown order of the ODBC module. (kalowsky)
- Fixed PCRE build problems. (troels@arvin.dk)
- Fixed a crash in pg_lo_write() (Yasuo)
- Fixed posix_isatty() and posix_ttyname(). (Markus)
- Fixed accidental pg_lo_import() API change. (Yasuo)
- Fixed ereg_replace() crash when the backreference number was greater than the
number of captured subpatterns. (oliver@billix.franken.de)
- Fixed array_rand() on thread-safe platforms such as Windows. (Edin)
- If zlib.output_compression is enabled and a page is compressed
a "Vary: Accept-Encoding" header is added. (Stefan)
- Renamed getallheaders() to apache_request_headers() and kept getallheaders()
as an alias to it. Also added apache_response_headers() which returns the
current response headers from Apache. (Rasmus)
- Added missing AddRef() calls in the COM extension. This should fix weird
behaviour (in particular with ADODB). (Harald)
- Fixed some dummy errors. (dets)
- Fix segfault in version_compare(). (Stig)
- Added compressed Flash MX files support to getimagesize(). (Derick)
- Added ability to capture string offsets in preg_split() results.
(David Brown, Andrei)
- Fixed a crash bug in token_get_all(). (Andrei)
- Implemented glob() for Unix/Win32. (Hartmut, Edin, Markus)
- Added domxml_doc_set_root() to change the root node. (Lukas Schroeder)
- Fixed a crash bug in stripslashes() when working in sybase mode. (Rasmus)
- Added experimental support for Simplified Chinese, Traditional Chinese and
Korean encodings into mbstring. (Rui)
- Misc. Win32 mail() enhancements: support 'From:' header (msisolak@yahoo.com),
support Bcc header, case-insensitive headers, enhanced error reporting,
automatic proper line ending conversion, fix crash with Cc, fix buffer
overflows with $header. (Markus)
- Improved IMAP extension performance. (adam.kauffman@mindspring.com,
rjs3@andrew.cmu.edu, Jon)
- Added optional 5th parameter to domxml_xslt_process(). When set, profiling
information is saved to the specified file. (chregu)
- Added MD5 support for crypt() on Windows. (Edin)
- Fixed resource bug in LDAP extension. (Stig Venaas)
- Fixed crash in output buffering when buffer is overwritten in a callback.
(Yasuo)
- Added output_add_rewrite_var() and output_remove_rewrite_var() to inject
and remove variables from the URL-Rewriter. (Thies)
- The Windows build can now be configured more comfortably, for example
when dealing with built-in extensions. (Sebastian)
- Added optional 3rd parameter to mysql_select_db() which makes it return
the previously selected database name. (Jani)
- Added large OID value (2^31 to 2^32) support for pg_lo_import(),
pg_lo_unlink(), pg_lo_open() and pg_lo_export(). (Yasuo)
- Made the mbstring extension to be enabled by default. (Yasuo)
- Fixed mixing OCIPlogon() and OCINLogon() to not leak Oracle-Sessions. (Thies)
- Added php.ini options for EXIF extension to encode and decode Unicode/JIS
user comments. (Marcus)
- Changed the "-c" CLI/CGI option to allow both 'filename' and
'path to php.ini'. (Yasuo)
- Added version information to the .dll and .exe files created under Windows.
(jtate)
- Added __FUNCTION__ and __CLASS__ constants. (Jani, Zend Engine)
- Added pg_metadate(), pg_convert(), pg_insert(), pg_select(), pg_update()
and pg_delete(). (Yasuo)
- Added optional 2nd parameter for pg_result_status() to specify return type.
(Yasuo)
- Added "log_errors_max_len" php.ini option which controls maximum length for
error messages. (Marcus)
- Added "ignore_repeated_errors" and "ignore_repeated_source" php.ini options
which can be used to disable logging of repeated error messages. (Marcus)
- Made pg_last_notice() work correctly. (Yasuo)
- Added "pgsql.ignore_notice" and "pgsql.log_notice" php.ini options. (Yasuo)
- Added "zlib.output_compression_level" php.ini option. (Stig)
- Added support for --with-apxs build on Mac OS X / Darwin. (markonen)
- Added support for dynamically loaded extensions on OS X / Darwin.
NOTE: This requires Apache 1.3.25 or later. (kalowsky, markonen)
- Fixed CR/LF processing in quoted_printable_decode() on Win32. (kir)
- Made crack extension available on Win32. Cracklib libraries for Win32 are
available at http://www.jtatesoftware.com/cracklib/. (jtate)
- Added mysql_info() function. (Jan)
- Added mysql_list_processes() and mysql_stat() functions. (Georg)
- Added file_get_contents() which returns the contents of a file as a string.
This function also supports the URL wrappers. (Wez)
- Changed 'zlib:' fopen wrapper to 'compress.zlib://' to avoid ambiguities
when filenames have ':' characters. (Wez)
- Added URL-wrapper support to exif. (Marcus)
- PHP now has a new stream system that allows it to do some clever stuff with
fopen() and fsockopen(). As a result:
. URL wrappers natively supports https:// URLs
. fsockopen() adds support for ssl:// and tls:// connections via TCP/IP
. copy($srcfilename, $destfilename) can now be used with URL wrappers
. zlib wrappers/streams can be used even on systems without fopencookie()
. Added 'compress.bzip2://' stream and wrapper support.
. Added user-space streams - it is now possible to define a class in PHP
code and register it as a URL wrapper.
. Most extensions now support streams when passing files, which means
that those extensions will support URL wrappers. (Wez)
. Added memory stream support. (Marcus)
- Fixed memory allocation problem on systems that have iconv() support in libc.
(Yasuo)
- Made var_dump() handle recursive structures better. (Yasuo)
- Added exif_imagetype() function. (Marcus)
- New improved build system. Among other improvements, replaces the slow
recursive make with one global Makefile and eases the integration of proper
dependencies. Automake is only needed for its aclocal tool. The build
process is now more portable and less resource-consuming. (Sascha)
- Report the right exit code after a call to exit(). (Edin)
22 Jul 2002, Version 4.2.2
- Fixed serious security vulnerability. (Stefan Esser)
13 May 2002, Version 4.2.1
- Added safe-mode checks to show_source(), parse_ini_file() and rmdir(). Also
@@ -165,19 +80,13 @@ PHP 4 NEWS
- ATTENTION!! register_globals defaults to 'off' now !!!
- Note: Apache2 support is EXPERIMENTAL.
- PostgreSQL functions are renamed, but all old function names are available.
Old function names will be available long enough. User can safely use old
Old function names will be available long enough. User can safely use old
function names. (Yasuo)
- Moved ext/mailparse to PECL. See http://thebrainroom.com/opensource/php/
for more information and to download the extension. (Wez/Jim)
- Fixed pg_last_notice() crash. (Yasuo)
- Modified the mysql extension to disable 'LOAD LOCAL' when safe mode is
- Modified the mysql extension to disable 'LOAD LOCAL' when safe mode is
enabled. (Jason)
- Added CLI (command line interface) sapi which is more suitable for writing
shell scripts. Some of the differences to CGI sapi are: no HTTP headers,
plain text error messages, does not change working directory, have a new -r
option which executes a piece of PHP code directly from the commmand line, etc.
"make install" will install CLI SAPI version of php in {PREFIX}/bin/php while
CGI is renamed and installed as {PREFIX}/bin/php-cgi. (Edin)
- Fixed HTTP file upload support to handle big files better. (Jani)
- Major modifications to the Sockets Extension and its API (Jason):
. Fixed numerous bugs.
@@ -367,8 +276,6 @@ PHP 4 NEWS
in itself. (Andrei)
- Added ini_get_all() function which returns all registered ini entries
or entries for the specified extension. (Jani)
- Added mailparse_uudecode_all() which extracts all uuencoded attachments.
(Wez)
- Added support for chinese encodings in htmlentities() and htmlspecialchars().
(Patch by Alan Knowles <alan_k@hklc.com> and Wez)
- Improved support for autoconf-2.50+/libtool 1.4b+. (Jan Kneschke, Sascha)
+5 -10
View File
@@ -13,16 +13,11 @@ HOW TO USE IT
./ext_skel --extname=module_name
and everything you need is placed in directory module_name.
[ Note that GNU awk is likely required for this script to work. Debian
systems seem to default to using mawk, so you may need to change the
#! line in skeleton/create_stubs to use gawk explicitly. ]
If you don't need to test the existence of any external header files,
libraries or functions in them, the module is already almost ready to be
compiled in PHP. Just remove 3 comments in your_module_name/config.m4,
cd back up to PHP sources top directory, and do
and everything you need is placed in directory module_name. In fact, if you
don't need to test the existence of any external header files, libraries or
functions in them, the module is already almost ready to be compiled in PHP.
Just remove 3 comments in your_module_name/config.m4, cd back up to PHP
sources top directory, and do
./buildconf; ./configure --enable-module_name; make
+32 -12
View File
@@ -7,6 +7,7 @@ HOW TO CREATE A SELF-CONTAINED PHP EXTENSION
the PHP source. To create such an extension, three things are
required:
- Makefile template (Makefile.in)
- Configuration file (config.m4)
- Source code for your module
@@ -73,9 +74,28 @@ DEFINING THE NEW EXTENSION
need to specify anything).
CREATING THE MAKEFILE TEMPLATE
The Makefile Template (Makefile.in) contains three lines:
------------------------------------------------------------------------------
LTLIBRARY_SHARED_NAME = foobar.la
LTLIBRARY_SOURCES = foo.c bar.c
include $(top_srcdir)/build/dynlib.mk
------------------------------------------------------------------------------
LTLIBRARY_SHARED_NAME specifies the name of the extension.
It must be of the form `ext-name.la'.
LTLIBRARY_SOURCES specifies the names of the sources files. You can
name an arbitrary number of source files here.
The final include directive includes the build rules (you usually
don't need to care about what happens there). rules.mk and other
files are installed by phpize which we will cover later.
CREATING THE M4 CONFIGURATION FILE
The m4 configuration can perform additional checks. For a
@@ -87,17 +107,13 @@ PHP_ARG_ENABLE(foobar,whether to enable foobar,
[ --enable-foobar Enable foobar])
if test "$PHP_FOOBAR" != "no"; then
PHP_NEW_EXTENSION(foobar, foo.c bar.c, $ext_shared)
PHP_EXTENSION(foobar, $ext_shared)
fi
------------------------------------------------------------------------------
PHP_ARG_ENABLE will automatically set the correct variables, so
that the extension will be enabled by PHP_NEW_EXTENSION in shared mode.
that the extension will be enabled by PHP_EXTENSION in shared mode.
The first argument of PHP_NEW_EXTENSION describes the name of the
extension. The second names the source-code files. The third passes
$ext_shared which is set by PHP_ARG_ENABLE/WITH to PHP_NEW_EXTENSION.
Please use always PHP_ARG_ENABLE or PHP_ARG_WITH. Even if you do not
plan to distribute your module with PHP, these facilities allow you
to integrate your module easily into the main PHP module framework.
@@ -115,8 +131,8 @@ CREATING SOURCE FILES
CREATING THE SELF-CONTAINED EXTENSION
Put config.m4 and the source files into one directory. Afterwards,
run phpize (this is installed during make install by PHP 4.0).
Put Makefile.in, config.m4 and the source files into one directory.
Then run phpize (this is installed during make install by PHP 4.0).
For example, if you configured PHP with --prefix=/php, you would run
$ /php/bin/phpize
@@ -141,13 +157,17 @@ ADDING SHARED MODULE SUPPORT TO A MODULE
support to an existing module called foo.
1. In config.m4, use PHP_ARG_WITH/PHP_ARG_ENABLE. Then you will
automatically be able to use --with-foo=shared[,..] or
--enable-foo=shared[,..].
automatically be able to use --with-foo=shared or
--enable-foo=shared.
2. In config.m4, use PHP_NEW_EXTENSION(foo,.., $ext_shared) to enable
2. In config.m4, use PHP_EXTENSION(foo, $ext_shared) to enable
building the extension.
3. Add the following lines to your C source file:
3. Add the following line to Makefile.in:
LTLIBRARY_SHARED_NAME = foo.la
4. Add the following lines to your C source file:
#ifdef COMPILE_DL_FOO
ZEND_GET_MODULE(foo)
+57 -181
View File
@@ -4,6 +4,9 @@ $Id$
Please send comments to: Wez Furlong <wez@thebrainroom.com>
Note: this doc is preliminary and is intended to give the reader an idea of
how streams work and should be used.
Why Streams?
============
You may have noticed a shed-load of issock parameters flying around the PHP
@@ -23,7 +26,7 @@ The main functions are:
PHPAPI size_t php_stream_read(php_stream * stream, char * buf, size_t count);
PHPAPI size_t php_stream_write(php_stream * stream, const char * buf, size_t
count);
count);
PHPAPI int php_stream_eof(php_stream * stream);
PHPAPI int php_stream_getc(php_stream * stream);
PHPAPI char *php_stream_gets(php_stream * stream, char *buf, size_t maxlen);
@@ -37,119 +40,16 @@ names: fread, fwrite, feof, fgetc, fgets, fclose, fflush, fseek, ftell.
Opening Streams
===============
In most cases, you should use this API:
Ultimately, I aim to implement an fopen_wrapper-like call to do this with
minimum fuss.
Currently, mostly for testing purposes, you can use php_stream_fopen to open a
stream on a regular file.
PHPAPI php_stream *php_stream_open_wrapper(char *path, char *mode,
int options, char **opened_path TSRMLS_DC);
PHPAPI php_stream * php_stream_fopen(const char * filename, const char *
mode);
Where:
path is the file or resource to open.
mode is the stdio compatible mode eg: "wb", "rb" etc.
options is a combination of the following values:
IGNORE_PATH (default) - don't use include path to search for the file
USE_PATH - use include path to search for the file
IGNORE_URL - do not use plugin wrappers
REPORT_ERRORS - show errors in a standard format if something
goes wrong.
STREAM_MUST_SEEK - If you really need to be able to seek the stream
and don't need to be able to write to the original
file/URL, use this option to arrange for the stream
to be copied (if needed) into a stream that can
be seek()ed.
opened_path is used to return the path of the actual file opened,
but if you used STREAM_MUST_SEEK, may not be valid. You are
responsible for efree()ing opened_path. opened_path may be (and usually
is) NULL.
If you need to open a specific stream, or convert standard resources into
streams there are a range of functions to do this defined in php_streams.h.
A brief list of the most commonly used functions:
PHPAPI php_stream *php_stream_fopen_from_file(FILE *file, const char *mode);
Convert a FILE * into a stream.
PHPAPI php_stream *php_stream_fopen_tmpfile(void);
Open a FILE * with tmpfile() and convert into a stream.
PHPAPI php_stream *php_stream_fopen_temporary_file(const char *dir,
const char *pfx, char **opened_path TSRMLS_DC);
Generate a temporary file name and open it.
There are some network enabled relatives in php_network.h:
PHPAPI php_stream *php_stream_sock_open_from_socket(int socket, int persistent);
Convert a socket into a stream.
PHPAPI php_stream *php_stream_sock_open_host(const char *host, unsigned short port,
int socktype, int timeout, int persistent);
Open a connection to a host and return a stream.
PHPAPI php_stream *php_stream_sock_open_unix(const char *path, int persistent,
struct timeval *timeout);
Open a UNIX domain socket.
Stream Utilities
================
If you need to copy some data from one stream to another, you will be please
to know that the streams API provides a standard way to do this:
PHPAPI size_t php_stream_copy_to_stream(php_stream *src,
php_stream *dest, size_t maxlen);
If you want to copy all remaining data from the src stream, pass
PHP_STREAM_COPY_ALL as the maxlen parameter, otherwise maxlen indicates the
number of bytes to copy.
This function will try to use mmap where available to make the copying more
efficient.
If you want to read the contents of a stream into an allocated memory buffer,
you should use:
PHPAPI size_t php_stream_copy_to_mem(php_stream *src, char **buf,
size_t maxlen, int persistent);
This function will set buf to the address of the buffer that it allocated,
which will be maxlen bytes in length, or will be the entire length of the
data remaining on the stream if you set maxlen to PHP_STREAM_COPY_ALL.
The buffer is allocated using pemalloc(); you need to call pefree() to
release the memory when you are done.
As with copy_to_stream, this function will try use mmap where it can.
If you have an existing stream and need to be able to seek() it, you
can use this function to copy the contents into a new stream that can
be seek()ed:
PHPAPI int php_stream_make_seekable(php_stream *origstream, php_stream **newstream);
It returns one of the following values:
#define PHP_STREAM_UNCHANGED 0 /* orig stream was seekable anyway */
#define PHP_STREAM_RELEASED 1 /* newstream should be used; origstream is no longer valid */
#define PHP_STREAM_FAILED 2 /* an error occurred while attempting conversion */
#define PHP_STREAM_CRITICAL 3 /* an error occurred; origstream is in an unknown state; you should close origstream */
make_seekable will always set newstream to be the stream that is valid
if the function succeeds.
When you have finished, remember to close the stream.
NOTE: If you only need to seek forwards, there is no need to call this
function, as the php_stream_seek can emulate forward seeking when the
whence parameter is SEEK_CUR.
NOTE: Writing to the stream may not affect the original source, so it
only makes sense to use this for read-only use.
NOTE: If the origstream is network based, this function will block
until the whole contents have been downloaded.
NOTE: Never call this function with an origstream that is referenced
as a resource! It will close the origstream on success, and this
can lead to a crash when the resource is later used/released.
NOTE: If you are opening a stream and need it to be seekable, use the
STREAM_MUST_SEEK option to php_stream_open_wrapper();
This call behaves just like fopen(), except it returns a stream instead of a
FILE *
Casting Streams
===============
@@ -159,14 +59,14 @@ You need to "cast" the stream into a FILE*, and this is how you do it:
FILE * fp;
php_stream * stream; /* already opened */
if (php_stream_cast(stream, PHP_STREAM_AS_STDIO, (void*)&fp, REPORT_ERRORS) == FAILURE) {
RETURN_FALSE;
if (php_stream_cast(stream, PHP_STREAM_AS_STDIO, &fp, 1) == FAILURE) {
RETURN_FALSE;
}
The prototype is:
PHPAPI int php_stream_cast(php_stream * stream, int castas, void ** ret, int
show_err);
show_err);
The show_err parameter, if non-zero, will cause the function to display an
appropriate error message of type E_WARNING if the cast fails.
@@ -183,14 +83,8 @@ if you mix ANSI stdio calls on the FILE* with php stream calls on the stream.
If your system has the fopencookie function, php streams can synthesize a
FILE* on top of any stream, which is useful for SSL sockets, memory based
streams, data base streams etc. etc.
In situations where this is not desireable, you should query the stream
to see if it naturally supports FILE *. You can use this code snippet
for this purpose:
if (php_stream_is(stream, PHP_STREAM_IS_STDIO)) {
/* can safely cast to FILE* with no adverse side effects */
}
NOTE: There might be situations where this is not desireable, and we need to
provide a flag to inform the casting routine of this.
You can use:
@@ -199,15 +93,10 @@ PHPAPI int php_stream_can_cast(php_stream * stream, int castas)
to find out if a stream can be cast, without actually performing the cast, so
to check if a stream is a socket you might use:
if (php_stream_can_cast(stream, PHP_STREAM_AS_SOCKETD) == SUCCESS) {
/* it can be a socket */
if (php_stream_can_cast(stream, PHP_STREAM_AS_SOCKETD) == SUCCESS) {
/* it's a socket */
}
Please note the difference between php_stream_is and php_stream_can_cast;
stream_is tells you if the stream is a particular type of stream, whereas
can_cast tells you if the stream can be forced into the form you request.
The former doesn't change anything, while the later *might* change some
state in the stream.
Stream Internals
================
@@ -220,10 +109,10 @@ underlying implementation.
The php_streams ops struct consists of pointers to methods that implement
read, write, close, flush, seek, gets and cast operations. Of these, an
implementation need only implement write, read, close and flush. The gets
method is intended to be used for streams if there is an underlying method
that can efficiently behave as fgets. The ops struct also contains a label
for the implementation that will be used when printing error messages - the
stdio implementation has a label of "STDIO" for example.
method is intended to be used for non-buffered streams if there is an
underlying method that can efficiently behave as fgets. The ops struct also
contains a label for the implementation that will be used when printing error
messages - the stdio implementation has a label of "STDIO" for example.
The idea is that a stream implementation defines a php_stream_ops struct, and
associates it with a php_stream using php_stream_alloc.
@@ -232,17 +121,17 @@ As an example, the php_stream_fopen() function looks like this:
PHPAPI php_stream * php_stream_fopen(const char * filename, const char * mode)
{
FILE * fp = fopen(filename, mode);
php_stream * ret;
if (fp) {
ret = php_stream_alloc(&php_stream_stdio_ops, fp, 0, 0, mode);
if (ret)
return ret;
FILE * fp = fopen(filename, mode);
php_stream * ret;
if (fp) {
ret = php_stream_alloc(&php_stream_stdio_ops, fp, 0, 0, mode);
if (ret)
return ret;
fclose(fp);
}
return NULL;
fclose(fp);
}
return NULL;
}
php_stream_stdio_ops is a php_stream_ops structure that can be used to handle
@@ -254,7 +143,7 @@ to be passed back to fopen_wrapper (or it's yet to be implemented successor).
The prototype for php_stream_alloc is this:
PHPAPI php_stream * php_stream_alloc(php_stream_ops * ops, void * abstract,
size_t bufsize, int persistent, const char * mode)
size_t bufsize, int persistent, const char * mode)
ops is a pointer to the implementation,
abstract holds implementation specific data that is relevant to this instance
@@ -275,19 +164,6 @@ into a FILE*, so it should be compatible with the mode parameter of fopen().
Writing your own stream implementation
======================================
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
RULE #1: when writing your own streams: make sure you have configured PHP with
--enable-debug.
I've taken some great pains to hook into the zend memory manager to help track
down allocation problems. It will also help you spot incorrect use of the
STREAMS_DC, STREAMS_CC and the semi-private STREAMS_REL_CC macros for function
definitions.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
RULE #2: Please use the stdio stream as a reference; it will help you
understand the semantics of the stream operations, and it will always
be more up to date than these docs :-)
First, you need to figure out what data you need to associate with the
php_stream. For example, you might need a pointer to some memory for memory
based streams, or if you were making a stream to read data from an RDBMS like
@@ -300,9 +176,9 @@ appropriately), and use the abstract pointer to refer to it.
For structured state you might have this:
struct my_state {
MYSQL conn;
MYSQL_RES * result;
struct my_state {
MYSQL conn;
MYSQL_RES * result;
};
struct my_state * state = pemalloc(sizeof(struct my_state), persistent);
@@ -325,32 +201,32 @@ For example, for reading from this wierd mysql stream:
static size_t php_mysqlop_read(php_stream * stream, char * buf, size_t count)
{
struct my_state * state = (struct my_state*)stream->abstract;
struct my_state * state = (struct my_state*)stream->abstract;
if (buf == NULL && count == 0) {
/* in this special case, php_streams is asking if we have reached the
* end of file */
if (... at end of file ...)
return EOF;
else
return 0;
}
/* pull out some data from the stream and put it in buf */
... mysql_fetch_row(state->result) ...
/* we could do something strange, like format the data as XML here,
and place that in the buf, but that brings in some complexities,
such as coping with a buffer size too small to hold the data,
so I won't even go in to how to do that here */
if (buf == NULL && count == 0) {
/* in this special case, php_streams is asking if we have reached the
* end of file */
if (... at end of file ...)
return EOF;
else
return 0;
}
/* pull out some data from the stream and put it in buf */
... mysql_fetch_row(state->result) ...
/* we could do something strange, like format the data as XML here,
and place that in the buf, but that brings in some complexities,
such as coping with a buffer size too small to hold the data,
so I won't even go in to how to do that here */
}
Implement the other operations - remember that write, read, close and flush
are all mandatory. The rest are optional. Declare your stream ops struct:
php_stream_ops my_ops = {
php_mysqlop_write, php_mysqlop_read, php_mysqlop_close,
php_mysqlop_flush, NULL, NULL, NULL,
"Strange mySQL example"
php_mysqlop_write, php_mysqlop_read, php_mysqlop_close,
php_mysqlop_flush, NULL, NULL, NULL,
"Strange mySQL example"
}
Thats it!
@@ -364,4 +240,4 @@ connection and then use pefree to dispose of the struct you allocated.
You may read the stream->persistent field to determine if your struct was
allocated in persistent mode or not.
vim:tw=78:et
vim:tw=78
-121
View File
@@ -1,121 +0,0 @@
Submitting Patch for PHP
========================
This document describes how to submit a patch for PHP. Since you are
reading this document, you are willing to submit a patch for PHP.
Please keep reading! Submitting a patch for PHP is easy. The hard
part is making it acceptable for inclusion into our repository. :-)
How to create patch?
--------------------
We are working with CVS. You need to get CVS source to create a patch
that we accept. Visit http://www.php.net/anoncvs.php to get CVS
source. You can check out older versions, but make sure you get
the default branch (i.e. Do not use -r option when you check out the
CVS source)
Read CODING_STANDARDS file before you start working.
Now you are ready to create a patch. Modify source to fix a bug in PHP or
add a new feature to PHP. After you finished editing, please test your
patch. Read README.TESTING for testing.
After you finish testing your patch, take diff file using
"cvs diff > your.patch" command.
Read README.TESTING for submitting a test script for your patch. This is
not strictly required, but it is preferred to submit a test script along
with your patch. Making new test script is very easy. It also helps us
to understand what you have been fixed or added to PHP.
Tips for creating patch
-----------------------
If you would like to fix multiple bugs. It is easier for us if you
could create 1 patch for 1 bug, but this is not strictly required.
Note though that you might get little response, if your patch is
too hard to review.
If you would like change/add many lines, it is better to ask module
maintainer and/or php-dev@lists.php.net, or pear-dev@lists.php.net if
you are patching PEAR. Official module maintainers can be found in
EXTENSIONS file in PHP source.
If you are new to CVS (Concurrent Versions System), visit
http://cvshome.org/ for details.
Recommended CVS client settings for creating patch file
------------------------------------------------------
Recommended ~/.cvsrc file setting is:
------
cvs -z3
update -d -P
checkout -P
diff -u
------
diff -u means:
-u Use the unified output format.
With this CVS setting, you don't have to worry about adding/deleting
newlines and spaces.
Check list for submitting patch
-------------------------------
- Did you run "make test" to check if your patch didn't break
other features?
- Did you compile PHP with --enable-debug and check php/webserver
error logs when you test your patch?
- Did you build PHP for multi-threaded web servers. (Optional)
- Did you create test script for "make test"? (Recommended)
- Did you check your patch is unified format and it does not
contain white space changes? (If you are not using recommended
cvs setting)
- Did you update CVS source before you take final patch?
- Did you read the patch again?
Where to send your patch?
-------------------------
If you are patching C source, send the patch to php-dev@lists.php.net.
If you are patching a module, you should also send the patch to the
maintainer. Official module maintainers are listed in EXTENSION file
in source.
If you are patching PEAR, send the patch to pear-dev@lists.php.net.
Please add the prefix "[PATCH]" to your email subject and make sure
to include the patch as a MIME attachment even if it is short.
Test scripts should be included in the same email.
Explain what has been fixed/added/changed by your patch.
Finally, add the bug Id(s) which can be closed by your patch, if any.
What happens after you submit your patch
--------------------------------------
If your patch is easy to review and has obviously no side-effects,
it might take up to a few hours until someone commits it.
Because this is a volunteer-driven effort, more complex patches will
require more patience on your side.
If you did not receive any feedback in a few days, please consider
resubmitting the description of your patch, along-side with
these questions:
- Is my patch too hard to review? Because of which factors?
- Should I split it up in multiple parts?
- Are there any unwanted whitespace changes?
What happens when your patch is applied?
----------------------------------------
Your name will be included together with your email address in the CVS
commit log. If your patch affects end-users, a brief description
and your name might be added to the NEWS file.
Thank you for submitting patch for PHP!
-175
View File
@@ -1,175 +0,0 @@
[IMPORTANT NOTICE]
------------------
Do _not_ ask to developers why some or all tests are failed under
your environment! Let us know if you find why it fails. Thank you.
[Testing Basics]
----------------
To execute test scripts, you must build PHP with some SAPI, then you
type "make test" to execute all or some test scripts saved under
"tests" directory under source root directory.
Usage:
make test
"make test" basically executes "run-tests.php" script
under source root. Therefore you can execute the script
as follows
./sapi/cli/php -c /path/to/php.ini/ run-tests.php [ext/some_extension_name]
[Which "php" executable "make test" look for]
---------------------------------------------
"make test" executes "run-tests.php" script with "php" binary. Some
test scripts such as session must be executed by CGI SAPI. Therefore,
you must build PHP with CGI SAPI to perform all tests.
If PHP is not build with CGI SAPI, "run-tests.php" script uses CLI
SAPI. Tests that may not executed by CLI SAPI will be skipped.
NOTE: PHP binary executing "run-tests.php" and php binary used for
executing test scripts may differ. If you use different PHP binary for
executing "run-tests.php" script, you may get errors.
[Which php.ini is used]
-----------------------
"make test" force to use php.ini-dist as default config file. If
you would like to test with other configuration file, user
"run-tests.php" script.
Example:
./sapi/cli/php -c /path/to/php.ini/ ext/standard
If you use php.ini other than php.ini-dist, you may see more failed
tests.
[Which test scripts are executed]
---------------------------------
"run-tests.php" ("make test") executes all test scripts by default
by looking all directory named "tests". If there are files have "phpt"
extension, "run-tests.php" takes test php code from the file and
executes it.
Tester can easily executes tests selectively with as follows.
Example:
./sapi/cli/php -c /path/to/php.ini/ run-tests.php ext/mbstring
[Test results]
--------------
Test results are printed to standard output. If there is a failed test,
"run-tests.php" script saves the result, expected result and code
executed to the test script directory. For example, if
ext/myext/tests/myext.phpt is failed to pass, following files are
created:
ext/myext/tests/myext.out - output from test script
ext/myext/tests/myext.exp - expected output
ext/myext/tests/myext.php - test script executed
Tester can verify these files, if failed test is actually a bug
or not.
[Creating new test files]
-------------------------
Writing test file is very easy if you are used to PHP. Test file
has following format. Here is a actual test file from iconv module.
===== ext/iconv/002.phpt =======
--TEST--
UCS4BE to ASCII
--SKIPIF--
<?php include('skipif.inc'); ?>
--POST--
--GET--
--FILE--
<?php include('002.inc'); ?>
--EXPECT--
&#97;&#98;&#99;&#100;
abcd
===== end of ext/iconv/002.phpt =======
"--TEST--" is title of the test.
"--SKIPIF--" is condition when to skip this test.
"--POST--" is POST variable passed to test script.
"--GET--" is GET variable passed to test script.
"--FILE--" is the test script.
"--EXPECT--" is the expected output from the test script.
ext/iconv/002.phpt uses 2 files. "skipif.inc" is used to skip
test when test cannot be performed such as iconv module is not
compiled or loaded.
==== ext/iconv/skipif.inc ====
<?php
// This script prints "skip" if condition does not meet.
if (!extension_loaded("iconv") && ini_get("enable_dl")) {
$dlext = (substr(PHP_OS, 0, 3) == "WIN") ? ".dll" : ".so";
@dl("iconv$dlext");
}
if (!extension_loaded("iconv")) {
die("skip\n");
}
?>
==== end of ext/iconv/skipif.inc ====
ext/inconv/002.inc is the test script. "run-tests.php" script
executes test script with CGI executable.
==== ext/iconv/002.inc ===
<?php
/*
Expected output:
&#97;&#98;&#99;&#100;
abcd
*/
$s = unpack("V*", iconv("ascii","UCS-4LE", "abcd"));
foreach($s as $c) { print "&#$c;"; } print "\n";
$s = pack("NNNN", 97, 98, 99, 100);
$q = iconv("UCS-4BE", "ascii", $s);
print $q; print "\n";
?>
=== end of ext/iconv/002.inc ===
Test script and skipif code may be directly write into *.phpt.
However, it is recommended to use other files for ease of writing
test script. For instance, you can execute test script under
ext/iconv as follows:
./sapi/cli/php -c /path/to/php.ini/ ext/iconv
[How to help us]
----------------
If you find bug in PHP, you can submit bug report AND test script
for us. You don't have to write complete script, just give us test
script with following format. Please test the script and make sure
you write the correct ACTUAL OUTPUT and EXPECTED OUTPUT before you
submit.
<?php
/*
Bug #12345
substr() bug. Do not return expected string.
ACTUAL OUTPUT
XYXA
EXPECTED OUTPUT
ABCD
*/
$str = "XYZABCD";
echo substr($str,3,7);
?>
-123
View File
@@ -1,123 +0,0 @@
PHP Build System V5 Overview
- supports Makefile.ins during transition phase
- not-really-portable Makefile includes have been eliminated
- supports seperate build directories without VPATH by using
explicit rules only
- does not waste disk-space/CPU-time for building temporary libraries
=> especially noticeable on slower systems
- slow recursive make replaced with one global Makefile
- eases integration of proper dependencies
- adds PHP_DEFINE(what[, value]) which creates a single include-file
per what. This will allow more fine-grained dependencies.
- abandoning the "one library per directory" concept
- improved integration of the CLI
- several new targets
build-modules: builds and copies dynamic modules into modules/
install-cli: installs the CLI only, so that the install-sapi
target does only what its name says
- finally abandoned automake (still requires aclocal at this time)
- changed some configure-time constructs to run at buildconf-time
- upgraded shtool to 1.5.4
- removed $(moduledir) (use EXTENSION_DIR)
The Reason For a New System
It became more and more apparent that there is a severe need
for addressing the portability concerns and improving the chance
that your build is correct (how often have you been told to
"make clean"? When this is done, you won't need to anymore).
If You Build PHP on a Unix System
You, as a user of PHP, will notice no changes. Of course, the build
system will be faster, look better and work smarter.
If You Are Developing PHP
Extension developers:
Makefile.ins are abandoned. The files which are to be compiled
are specified in the config.m4 now using the following macro:
PHP_NEW_EXTENSION(foo, foo.c bar.c baz.cpp, $ext_shared)
E.g. this enables the extension foo which consists of three source-code
modules, two in C and one in C++. And dependending on the user's
wishes, the extension will even be built as a dynamic module.
The full syntax:
PHP_NEW_EXTENSION(extname, sources [, shared [,sapi_class[, extra-cflags]]])
Please have a look at acinclude.m4 for the gory details and meanings
of the other parameters.
And that's basically it for the extension side.
If you previously built sub-libraries for this module, add
the source-code files here as well. If you need to specify
separate include directories, do it this way:
PHP_NEW_EXTENSION(foo, foo.c mylib/bar.c mylib/gregor.c,,,-I@ext_srcdir@/lib)
E.g. this builds the three files which are located relative to the
extension source directory and compiles all three files with the
special include directive (@ext_srcdir@ is automatically replaced).
Now, you need to tell the build system that you want to build files
in a directory called $ext_builddir/lib:
PHP_ADD_BUILD_DIR($ext_builddir/lib)
Make sure to call this after PHP_NEW_EXTENSION, because $ext_builddir
is only set by the latter.
If you have a complex extension, you might to need add special
Make rules. You can do this by calling PHP_ADD_MAKEFILE_FRAGMENT
in your config.m4 after PHP_NEW_EXTENSION.
This will read a file in the source-dir of your extension called
Makefile.frag. In this file, $(builddir) and $(srcdir) will be
replaced by the values which are correct for your extension
and which are again determined by the PHP_NEW_EXTENSION macro.
Make sure to prefix *all* relative paths correctly with either
$(builddir) or $(srcdir). Because the build system does not
change the working directory anymore, we must use either
absolute paths or relative ones to the top build-directory.
Correct prefixing ensures that.
SAPI developers:
Instead of using PHP_SAPI=foo/PHP_BUILD_XYZ, you will need to type
PHP_SELECT_SAPI(name, type, sources.c)
I.e. specify the source-code files as above and also pass the
information regarding how PHP is supposed to be built (shared
module, program, etc).
For example for APXS:
PHP_SELECT_SAPI(apache, shared, sapi_apache.c mod_php4.c php_apache.c)
General info
The foundation for the new system is the flexible handling of
sources and their contexts. With the help of macros you
can define special flags for each source-file, where it is
located, in which target context it can work, etc.
Have a look at the well documented macros
PHP_ADD_SOURCES(_X) in acinclude.m4.
+186
View File
@@ -0,0 +1,186 @@
Advisory on the PHP Release Cycle
Copyright & Liciencing
This Document is (c) Copyright 2000,2001 by The PHP Group
This Document is distributed under the terms of the GNU General
Public License as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later
version.
Table of Contents
1. Introduction
2. Dealing with bugs
2.1 As a QA Team Member
2.2 As a Developer
3. Releaseing another RC
4. CVS During the Release Process
4.1 Useful CVS Commands
5 The Final Release
6 Summary
1. Introduction
This cycle should take place over roughly 10 days. When it is
decided it is time for an Release to occur Andi/Zeev (Or
Whoever) will tarball RC1, Tag & Branch CVS (see section 4)
and then announce the RC on PHP-QA and PHP-DEV. At this
point the build tracker and QA Bug System come into play.
If you successfully build PHP then report it in the build
tracker, If you then run and complete all the tests you
should report this too in the build tracker when
these features become avalible.
2. Dealing with Bugs
2.1 As a QA Team member
If you find a bug in an RC that you think is a showstopper
then, even if it is a known bug, you should report it in the
QA Bug system. This marks the bug for discussion at least,
and preferably fixing before the actual release. This system
is separate from the main bugs system so that important bugs
dont get lost in the midst if lots of feature/change request
in the approach to a release. It is imperitive where
appropraite that as a QA'er a test script, Configure options
and PHP.ini files are provided to enable the developer to
reproduce the bug, this is an important part of our job. If
you have a serious bug then you should also create a test
script to be added to the tests dir of the php source so
that at the end of the process to enable us to make sure bug
does not return. It is not difficult to create these test
scripts and a readme on it can be found in
php4/tests/README.
2.2 As a Developer
What should happen is that when a bug is reported it
is send to php-dev and php-qa as with other bugs. We should
have far stricter assignment system in this bug cycle rather
than just leaving them. Once again bugs should be able to be
marked as To Be Fixed Before release or moved to other bug
system. (This is currently the Release Masters responsibility)
Then before the actual release the qa bugs system can be
checked and if there are outstanding To Be Fixed Before
release bugs the Developers can see this easyly rather than
show stoppers being dismissed and not worried about.
When a bug is fixed the QAer who reported the bug is emailed
and asked to test again and see if the bug is fixed.
3 Releasing another RC
If it is felt necessary that a 2nd RC is needed then it
should be packaged as before and announced to both lists
again. The testing process then starts again, the RC2 is
added to the build tracker and QA'ers are asked to build and
retest the scripts as appropriate, espectially if you
reported a bug, you should test thourghly for your
bug and make sure it no longer occurs. This will normally
add anouther 3 days to the cycle, giving QA'ers time to
build test and report back, then for developers to
fix any problems.
4 CVS during the release process
At the point where the first RC is create a branch is
formed. This branch is not altered form that point onward
other than major bug fixes. Minor non important bug
fixes should not be applied to this branch but to the main
tree instead. Any major bug fixes should be applied to both
trees. The developer should test and check the RC tree then
also test and check the MAIN tree. This is their
responsibility to make sure (as far as possible) that the
bug fix works on both trees.
4.1 Useful CVS Commands
To create a Branch <Should only be done by person tarballing
the RC (The Release Master)>:
$ cvs tag -b php_4_0_<Version>RC<NUMBER>
IE:
$ cvs tag -b php_4_0_1RC1
This should be executed in the PHP directory of an up to
date checkout. Remember to also tag the Zend and TSRM repositories.
You can retrieve a branch in one of two ways: by checking it
out fresh from the repository, or by switching an existing
working copy over to the branch, I would suggest you
checkout a new copy.
To check out a new copy:
$ cvs checkout -r php_4_0_<Version>RC<NUMBER> php4
IE:
$ cvs checkout -r php_4_0_1RC1 php4
To switch a working copy (Not recomended due to possible
commiting to wrong branch)
$ cvs update -r php_4_0_<Version>RC<NUMBER> php4
IE:
$ cvs update -r php_4_0_1RC1 php4
This should be done in the PHP4 directory itself.
To revert back to normal branch you should use the
following:
$ cvs update -A
To Commit to the branch you follow exactly the same
procedure as normal
$ cvs commit file.c
MAKE SURE YOU DO NOT COMMIT TO THE WRONG BRANCH.
5 The Final Release
When it is time to make the final release the following
proceedure should be followed. The person who is tarballing
the final release should check the QA bugs system and make
sure there are no showstoppers left unfixed. If there are
then bug the person the bug is assigned to until they fix
it. If there are no more qa bugs then they should tag the
branch as php_4_0_<Version> and tarball as usual. An email
should be sent to PHP-GEN, PHP_DEV and PHP-QA about the new
release and it should be added to php.net. The windows
binaries and servelets should be built as soon as possible
and added too, as should the windows installer.
6 Summary
Here is a summary of what a release cycle might look like:
Thurs: RC is agreed on and packaged, an email is sent to
PHP_QA and PHP-DEV, the CVS is Branched and the
Release Cycle Begins.
Mon: After a weekends testing most show stoppers should
have been found (Hopefully) and the developers get to
work on fixing them.
Thurs: A second RC is released if needed with the new bug
fixes in and the QAers test again.
Sun: A review is made of all outstanding bugs and any show
stoppers should be fixed. if there are no show
stoppers then the final release is packaged and
released on the monday morning on php.net
Mon: Release is made.
James
--
James Moore
PHP QA Team
jmoore@php.net
+16 -16
View File
@@ -22,6 +22,8 @@ Zend
* Const'ify APIs. Right now, many functions leave parameters untouched,
but don't declare those as const. This makes interaction with other
interfaces difficult which pass const parameters to us.
* Add try..catch/throw exception handling.
* Fix Zend shallow copy issues with objects and arrays.
global
@@ -41,6 +43,10 @@ global
* on some platforms unimplemented function will just do nothing
(e.g. symlink) they should print a warning or not even be defined!
(DONE ?)
* Finish PHP streams abstraction, nuke all that issock stuff, implement SSL
socket support. (wez)
- ext/ftp/ -> all FILEs to streams
- ext/bz2/ -> convert to stream impl.
* Use arg_separator.input to implode args in the CGI sapi extension
and arg_separator.input to explode in php_build_argv(). (DONE?)
* Change the odbc_fetch_into() function to require ALWAYS the first two
@@ -81,16 +87,10 @@ documentation
* Add developer documentation.
* Add detailed documentation for Java extension.
ext/bz2
-------
* Add ini setting for decompression buffer size. The default 4k is to small
for big files and takes ages to decompress. However, 40k which perform
quite good with big files may be to much under certain environments as
default setting. There should be consideren different default sizes for
different SAPIS (e.g. apache and cli).
ext/curl
--------
* Use the cURL write handler to save data for use when returning data or
outputting data.
* Have a warning scheme for when people use unsupported features.
ext/oci8
@@ -105,12 +105,6 @@ ext/pcre
--------
* Allow user to set PCRE_NOTEMPTY, PCRE_ANCHORED at execution time, maybe
ext/pcntl
---------
* Change internal callback handler to use TICKS
* Remove all zend_extension code
* Add object callback support to pcntl_signal()
ext/pgsql
---------
For PHP 4.3.0:
@@ -135,8 +129,8 @@ ext/session
ext/sockets
-----------
* Implement IPv6
* Review/Fix vectors
* Make the extension work on windows (Daniel Beulshausen)
* Make the extension work with Solaris and the Sun GCC
ext/standard
------------
@@ -153,6 +147,12 @@ ext/standard
strrpos()
strrchr()
strip_tags()
* Rewrite win32 SMTP code to be usable for *ix to, maybe as a (default)
module of its own (Hartmut)
ext/zziplib
------------
* More fully support the zziplib API
ext/wddx
--------
-3
View File
@@ -1,3 +0,0 @@
- clean up .cvsignores
- purge Makefile.ins and replace PHP_EXTENSION in config.m4s
with appropiate calls to PHP_NEW_EXTENSION
-15
View File
@@ -412,8 +412,6 @@ TSRM_API THREAD_T tsrm_thread_id(void)
{
#ifdef TSRM_WIN32
return GetCurrentThreadId();
#elif defined(NETWARE)
return NXThreadGetId();
#elif defined(GNUPTH)
return pth_self();
#elif defined(PTHREADS)
@@ -432,17 +430,10 @@ TSRM_API THREAD_T tsrm_thread_id(void)
TSRM_API MUTEX_T tsrm_mutex_alloc(void)
{
MUTEX_T mutexp;
#ifdef NETWARE
long flags = 0; /* Don't require NX_MUTEX_RECURSIVE, I guess */
NXHierarchy_t order = 0;
NX_LOCK_INFO_ALLOC (lockInfo, "PHP-TSRM", 0);
#endif
#ifdef TSRM_WIN32
mutexp = malloc(sizeof(CRITICAL_SECTION));
InitializeCriticalSection(mutexp);
#elif defined(NETWARE)
mutexp = NXMutexAlloc(flags, order, &lockInfo); /* return value ignored for now */
#elif defined(GNUPTH)
mutexp = (MUTEX_T) malloc(sizeof(*mutexp));
pth_mutex_init(mutexp);
@@ -469,8 +460,6 @@ TSRM_API void tsrm_mutex_free(MUTEX_T mutexp)
if (mutexp) {
#ifdef TSRM_WIN32
DeleteCriticalSection(mutexp);
#elif defined(NETWARE)
NXMutexFree(mutexp);
#elif defined(GNUPTH)
free(mutexp);
#elif defined(PTHREADS)
@@ -497,8 +486,6 @@ TSRM_API int tsrm_mutex_lock(MUTEX_T mutexp)
#ifdef TSRM_WIN32
EnterCriticalSection(mutexp);
return 1;
#elif defined(NETWARE)
return NXLock(mutexp);
#elif defined(GNUPTH)
return pth_mutex_acquire(mutexp, 0, NULL);
#elif defined(PTHREADS)
@@ -520,8 +507,6 @@ TSRM_API int tsrm_mutex_unlock(MUTEX_T mutexp)
#ifdef TSRM_WIN32
LeaveCriticalSection(mutexp);
return 1;
#elif defined(NETWARE)
return NXUnlock(mutexp);
#elif defined(GNUPTH)
return pth_mutex_release(mutexp);
#elif defined(PTHREADS)
+1 -8
View File
@@ -13,8 +13,7 @@
#ifndef TSRM_H
#define TSRM_H
/* #ifndef WIN32 */
#if !defined(WIN32) && !defined(NETWARE)
#ifdef HAVE_CONFIG_H
# include "tsrm_config.h"
#endif
@@ -37,9 +36,6 @@
#ifdef TSRM_WIN32
# include <windows.h>
#elif defined(NETWARE)
# include <nks/thread.h>
# include <nks/synch.h>
#elif defined(GNUPTH)
# include <pth.h>
#elif defined(PTHREADS)
@@ -54,9 +50,6 @@ typedef int ts_rsrc_id;
#ifdef TSRM_WIN32
# define THREAD_T DWORD
# define MUTEX_T CRITICAL_SECTION *
#elif defined(NETWARE)
# define THREAD_T NXThreadId_t
# define MUTEX_T NXMutex_t *
#elif defined(GNUPTH)
# define THREAD_T pth_t
# define MUTEX_T pth_mutex_t *
-9
View File
@@ -1,9 +0,0 @@
#ifndef TSRM_CONFIG_NW_H
#define TSRM_CONFIG_NW_H
#define HAVE_UTIME 1
/* Though we have alloca(), this seems to be causing some problem with the stack pointer -- hence not using it */
/* #define HAVE_ALLOCA 1 */
#endif
+3 -5
View File
@@ -5,13 +5,11 @@
# define TSRM_WIN32
#endif
#ifdef TSRM_WIN32
# include "tsrm_config.w32.h"
#elif defined(NETWARE)
# include "tsrm_config.nw.h"
#else
#ifndef TSRM_WIN32
# include "tsrm_config.h"
# include <sys/param.h>
#else
# include "tsrm_config.w32.h"
#endif
#ifdef TSRM_WIN32
-260
View File
@@ -1,260 +0,0 @@
/*
+----------------------------------------------------------------------+
| PHP Version 4 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2002 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Venkat Raghavan S <rvenkat@novell.com> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include "TSRM.h"
#ifdef NETWARE
#ifdef USE_MKFIFO
#include <sys/stat.h>
#elif !defined(USE_PIPE_OPEN) /* NXFifoOpen */
#include <nks/fsio.h>
#endif
#include <nks/vm.h>
#include <nks/memory.h>
#include <string.h>
#include "mktemp.h"
/* strtok() call in LibC is abending when used in a different address space -- hence using
PHP's version itself for now : Venkat (30/4/02) */
#include "tsrm_strtok_r.h"
#define tsrm_strtok_r(a,b,c) strtok((a),(b))
#define WHITESPACE " \t"
#define MAX_ARGS 10
TSRM_API FILE* popen(const char *commandline, const char *type)
{
char *command = NULL, *argv[MAX_ARGS] = {'\0'}, **env = NULL;
char *tempName = "sys:/php/temp/phpXXXXXX.tmp";
char *filePath = NULL;
char *ptr = NULL;
int ptrLen = 0, argc = 0, i = 0, envCount = 0, err = 0;
FILE *stream = NULL;
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
int pipe_handle;
int mode = O_RDONLY;
#else
NXHandle_t pipe_handle;
NXMode_t mode = NX_O_RDONLY;
#endif
NXExecEnvSpec_t envSpec;
NXNameSpec_t nameSpec;
NXVmId_t newVM = 0;
/* Check for validity of input parameters */
if (!commandline || !type)
return NULL;
/* Get temporary file name */
filePath = mktemp(tempName);
/*consoleprintf ("PHP | popen: file path = %s, mode = %s\n", filePath, type);*/
if (!filePath)
return NULL;
/* Set pipe mode according to type -- for now allow only "r" or "w" */
if (strcmp(type, "r") == 0)
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
mode = O_RDONLY;
#else
mode = NX_O_RDONLY;
#endif
else if (strcmp(type, "w") == 0)
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
mode = O_WRONLY;
#else
mode = NX_O_WRONLY;
#endif
else
return NULL;
#ifdef USE_PIPE_OPEN
pipe_handle = pipe_open(filePath, mode);
/*consoleprintf ("PHP | popen: pipe_open() returned %d\n", pipe_handle);*/
if (pipe_handle == -1)
return NULL;
#elif defined(USE_MKFIFO)
pipe_handle = mkfifo(filePath, mode);
consoleprintf ("PHP | popen: mkfifo() returned %d\n", pipe_handle);
if (pipe_handle == -1)
return NULL;
#else
/*
- NetWare doesn't require first parameter
- Allowing LibC to choose the buffer size for now
*/
err = NXFifoOpen(0, filePath, mode, 0, &pipe_handle);
/*consoleprintf ("PHP | popen: NXFifoOpen() returned %d\n", err);*/
if (err)
return NULL;
#endif
/* Copy the environment variables in preparation for the spawn call */
envCount = NXGetEnvCount() + 1; /* add one for NULL */
env = (char**)NXMemAlloc(sizeof(char*) * envCount, 0);
if (!env)
return NULL;
err = NXCopyEnv(env, envCount);
consoleprintf ("PHP | popen: NXCopyEnv() returned %d\n", err);
if (err)
{
NXMemFree (env);
return NULL;
}
/* Separate commandline string into words */
consoleprintf ("PHP | popen: commandline = %s\n", commandline);
ptr = tsrm_strtok_r((char*)commandline, WHITESPACE, NULL);
ptrLen = strlen(ptr);
command = (char*)malloc(ptrLen + 1);
if (!command)
{
NXMemFree (env);
return NULL;
}
strcpy (command, ptr);
ptr = tsrm_strtok_r(NULL, WHITESPACE, NULL);
while (ptr && (argc < MAX_ARGS))
{
ptrLen = strlen(ptr);
argv[argc] = (char*)malloc(ptrLen + 1);
if (!argv[argc])
{
NXMemFree (env);
if (command)
free (command);
for (i = 0; i < argc; i++)
{
if (argv[i])
free (argv[i]);
}
return NULL;
}
strcpy (argv[argc], ptr);
argc++;
ptr = tsrm_strtok_r(NULL, WHITESPACE, NULL);
}
consoleprintf ("PHP | popen: commandline string parsed into tokens\n");
/* Setup the execution environment and spawn new process */
envSpec.esFlags = 0; /* Not used */
envSpec.esArgc = argc;
envSpec.esArgv = (void**)argv;
envSpec.esEnv = (void**)env;
envSpec.esStdin.ssType =
envSpec.esStdout.ssType = NX_OBJ_FIFO;
envSpec.esStderr.ssType = NX_OBJ_FILE;
/*
envSpec.esStdin.ssHandle =
envSpec.esStdout.ssHandle =
envSpec.esStderr.ssHandle = -1;
*/
envSpec.esStdin.ssPathCtx =
envSpec.esStdout.ssPathCtx =
envSpec.esStderr.ssPathCtx = NULL;
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
if (mode == O_RDONLY)
#else
if (mode == NX_O_RDONLY)
#endif
{
envSpec.esStdin.ssPath = filePath;
envSpec.esStdout.ssPath = stdout;
}
else /* Write Only */
{
envSpec.esStdin.ssPath = stdin;
envSpec.esStdout.ssPath = filePath;
}
envSpec.esStderr.ssPath = stdout;
nameSpec.ssType = NX_OBJ_FIFO;
/* nameSpec.ssHandle = 0; */ /* Not used */
nameSpec.ssPathCtx = NULL; /* Not used */
nameSpec.ssPath = argv[0];
consoleprintf ("PHP | popen: environment setup\n");
err = NXVmSpawn(&nameSpec, &envSpec, 0, &newVM);
consoleprintf ("PHP | popen: NXVmSpawn() returned %d\n", err);
if (!err)
/* Get file pointer corresponding to the pipe (file) opened */
stream = fdopen(pipe_handle, type);
/* Clean-up */
if (env)
NXMemFree (env);
if (pipe_handle)
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
close(pipe_handle);
#else
NXClose(pipe_handle);
#endif
if (command)
free (command);
for (i = 0; i < argc; i++)
{
if (argv[i])
free (argv[i]);
}
consoleprintf ("PHP | popen: all clean-up done, returning...\n");
return stream;
}
TSRM_API int pclose(FILE* stream)
{
int err = 0;
NXHandle_t fd = 0;
/* Get the process associated with this pipe (file) handle and terminate it */
fd = fileno(stream);
NXClose (fd);
err = fclose(stream);
return err;
}
#endif
-28
View File
@@ -1,28 +0,0 @@
/*
+----------------------------------------------------------------------+
| PHP Version 4 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2002 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Venkat Raghavan S <rvenkat@novell.com> |
+----------------------------------------------------------------------+
*/
#ifndef TSRM_NW_H
#define TSRM_NW_H
#include "TSRM.h"
TSRM_API FILE* popen(const char *command, const char *type);
TSRM_API int pclose(FILE* stream);
#endif
+39 -128
View File
@@ -36,17 +36,12 @@
#include "tsrm_win32.h"
#endif
#ifdef NETWARE
/*#include "pipe.h"*/
#include "tsrm_nw.h"
#endif
#define VIRTUAL_CWD_DEBUG 0
#include "TSRM.h"
/* Only need mutex for popen() in Windows and NetWare, because it doesn't chdir() on UNIX */
#if (defined(TSRM_WIN32) || defined(NETWARE)) && defined(ZTS)
/* Only need mutex for popen() in Windows because it doesn't chdir() on UNIX */
#if defined(TSRM_WIN32) && defined(ZTS)
MUTEX_T cwd_mutex;
#endif
@@ -90,13 +85,6 @@ static int php_check_dots(const char *element, int n)
#define IS_DIRECTORY_CURRENT(element, len) \
(len == 1 && ptr[0] == '.')
#elif defined(NETWARE)
/* NetWare has strtok() (in LibC) and allows both slashes in paths, like Windows --
but rest of the stuff is like Unix */
/* strtok() call in LibC is abending when used in a different address space -- hence using
PHP's version itself for now */
/*#define tsrm_strtok_r(a,b,c) strtok((a),(b))*/
#define TOKENIZER_STRING "/\\"
#else
#define TOKENIZER_STRING "/"
@@ -133,15 +121,9 @@ static int php_check_dots(const char *element, int n)
static int php_is_dir_ok(const cwd_state *state)
{
#if !(defined(NETWARE) && defined(CLIB_STAT_PATCH))
struct stat buf;
if (stat(state->cwd, &buf) == 0 && S_ISDIR(buf.st_mode))
#else
struct stat_libc buf;
if (stat(state->cwd, (struct stat*)(&buf)) == 0 && S_ISDIR(buf.st_mode))
#endif
return (0);
return (1);
@@ -149,15 +131,9 @@ static int php_is_dir_ok(const cwd_state *state)
static int php_is_file_ok(const cwd_state *state)
{
#if !(defined(NETWARE) && defined(CLIB_STAT_PATCH))
struct stat buf;
if (stat(state->cwd, &buf) == 0 && S_ISREG(buf.st_mode))
#else
struct stat_libc buf;
if (stat(state->cwd, (struct stat*)(&buf)) == 0 && S_ISREG(buf.st_mode))
#endif
return (0);
return (1);
@@ -298,7 +274,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
if (path_length == 0)
return (0);
#if !defined(TSRM_WIN32) && !defined(__BEOS__) && !defined(NETWARE)
#if !defined(TSRM_WIN32) && !defined(__BEOS__)
if (IS_ABSOLUTE_PATH(path, path_length)) {
if (realpath(path, resolved_path)) {
path = resolved_path;
@@ -333,12 +309,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
fprintf(stderr,"cwd = %s path = %s\n", state->cwd, path);
#endif
if (IS_ABSOLUTE_PATH(path_copy, path_length)) {
/* COPY_WHEN_ABSOLUTE needs to account for volume name that is unique to NetWare absolute paths */
#ifndef NETWARE
copy_amount = COPY_WHEN_ABSOLUTE;
#else
copy_amount = COPY_WHEN_ABSOLUTE(path_copy);
#endif
is_absolute = 1;
#ifdef TSRM_WIN32
} else if (IS_UNC_PATH(path_copy, path_length)) {
@@ -393,15 +364,10 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
state->cwd = (char *) realloc(state->cwd, state->cwd_length+ptr_length+1+1);
#ifdef TSRM_WIN32
/* Windows 9x will consider C:\\Foo as a network path. Avoid it. */
if ((state->cwd[state->cwd_length-1]!='\\' && state->cwd[state->cwd_length-1]!='/') ||
if ((state->cwd[state->cwd_length-1]!='\\' && state->cwd[state->cwd_length-1]!='/') ||
IsDBCSLeadByte(state->cwd[state->cwd_length-2])) {
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
}
#elif defined(NETWARE)
/* If the token is a volume name, it will have colon at the end -- so, no slash before it */
if (ptr[ptr_length-1] != ':') {
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
}
#else
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
#endif
@@ -411,12 +377,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
ptr = tsrm_strtok_r(NULL, TOKENIZER_STRING, &tok);
}
/* COPY_WHEN_ABSOLUTE needs to account for volume name that is unique to NetWare absolute paths */
#ifndef NETWARE
if (state->cwd_length == COPY_WHEN_ABSOLUTE) {
#else
if (state->cwd_length == COPY_WHEN_ABSOLUTE(state->cwd)) {
#endif
state->cwd = (char *) realloc(state->cwd, state->cwd_length+1+1);
state->cwd[state->cwd_length] = DEFAULT_SLASH;
state->cwd[state->cwd_length+1] = '\0';
@@ -466,12 +427,7 @@ CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path
return -1;
}
/* COPY_WHEN_ABSOLUTE needs to account for volume name that is unique to NetWare absolute paths */
#ifndef NETWARE
if (length == COPY_WHEN_ABSOLUTE && IS_ABSOLUTE_PATH(path, length+1)) { /* Also use trailing slash if this is absolute */
#else
if (length == COPY_WHEN_ABSOLUTE(path) && IS_ABSOLUTE_PATH(path, length+1)) { /* Also use trailing slash if this is absolute */
#endif
length++;
}
temp = (char *) tsrm_do_alloca(length+1);
@@ -570,7 +526,7 @@ CWD_API int virtual_chmod(const char *filename, mode_t mode TSRMLS_DC)
return ret;
}
#if !defined(TSRM_WIN32) && !defined(NETWARE)
#ifndef TSRM_WIN32
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group TSRMLS_DC)
{
cwd_state new_state;
@@ -646,7 +602,6 @@ CWD_API int virtual_rename(char *oldname, char *newname TSRMLS_DC)
return retval;
}
#if !(defined(NETWARE) && defined(CLIB_STAT_PATCH))
CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC)
{
cwd_state new_state;
@@ -660,23 +615,9 @@ CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC)
CWD_STATE_FREE(&new_state);
return retval;
}
#else
CWD_API int virtual_stat(const char *path, struct stat_libc *buf TSRMLS_DC)
{
cwd_state new_state;
int retval;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, path, NULL);
#ifndef TSRM_WIN32
retval = stat(new_state.cwd, (struct stat*)buf);
CWD_STATE_FREE(&new_state);
return retval;
}
#endif
#if !defined(TSRM_WIN32) && !defined(NETWARE)
CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC)
{
cwd_state new_state;
@@ -690,6 +631,7 @@ CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC)
CWD_STATE_FREE(&new_state);
return retval;
}
#endif
CWD_API int virtual_unlink(const char *path TSRMLS_DC)
@@ -755,69 +697,7 @@ CWD_API DIR *virtual_opendir(const char *pathname TSRMLS_DC)
return retval;
}
#ifdef TSRM_WIN32
/* On Windows the trick of prepending "cd cwd; " doesn't work so we need to perform
a real chdir() and mutex it
*/
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
{
char prev_cwd[MAXPATHLEN];
char *getcwd_result;
FILE *retval;
getcwd_result = getcwd(prev_cwd, MAXPATHLEN);
if (!getcwd_result) {
return NULL;
}
#ifdef ZTS
tsrm_mutex_lock(cwd_mutex);
#endif
chdir(CWDG(cwd).cwd);
retval = popen(command, type);
chdir(prev_cwd);
#ifdef ZTS
tsrm_mutex_unlock(cwd_mutex);
#endif
return retval;
}
#elif defined(NETWARE)
/* On NetWare, the trick of prepending "cd cwd; " doesn't work so we need to perform
a VCWD_CHDIR() and mutex it
*/
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
{
char prev_cwd[MAXPATHLEN];
char *getcwd_result;
FILE *retval;
getcwd_result = VCWD_GETCWD(prev_cwd, MAXPATHLEN);
if (!getcwd_result) {
return NULL;
}
#ifdef ZTS
tsrm_mutex_lock(cwd_mutex);
#endif
VCWD_CHDIR(CWDG(cwd).cwd);
retval = popen(command, type);
VCWD_CHDIR(prev_cwd);
#ifdef ZTS
tsrm_mutex_unlock(cwd_mutex);
#endif
return retval;
}
#else /* Unix */
#ifndef TSRM_WIN32
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
{
@@ -853,6 +733,37 @@ CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
return retval;
}
#else
/* On Windows the trick of prepending "cd cwd; " doesn't work so we need to perform
a real chdir() and mutex it
*/
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
{
char prev_cwd[MAXPATHLEN];
char *getcwd_result;
FILE *retval;
getcwd_result = getcwd(prev_cwd, MAXPATHLEN);
if (!getcwd_result) {
return NULL;
}
#ifdef ZTS
tsrm_mutex_lock(cwd_mutex);
#endif
chdir(CWDG(cwd).cwd);
retval = popen(command, type);
chdir(prev_cwd);
#ifdef ZTS
tsrm_mutex_unlock(cwd_mutex);
#endif
return retval;
}
#endif
+6 -23
View File
@@ -58,19 +58,6 @@ typedef unsigned short mode_t;
#define IS_UNC_PATH(path, len) \
(len >= 2 && IS_SLASH(path[0]) && IS_SLASH(path[1]))
#elif defined(NETWARE)
#ifdef HAVE_DIRENT_H
#include <dirent.h>
#endif
#define DEFAULT_SLASH '/'
#define DEFAULT_DIR_SEPARATOR ';'
#define IS_SLASH(c) ((c) == '/' || (c) == '\\')
#define COPY_WHEN_ABSOLUTE(path) \
(strchr(path, ':') - path + 1) /* Take the volume name which ends with a colon */
#define IS_ABSOLUTE_PATH(path, len) \
(strchr(path, ':') != NULL) /* Colon indicates volume name */
#else
#ifdef HAVE_DIRENT_H
#include <dirent.h>
@@ -133,12 +120,8 @@ CWD_API FILE *virtual_fopen(const char *path, const char *mode TSRMLS_DC);
CWD_API int virtual_open(const char *path TSRMLS_DC, int flags, ...);
CWD_API int virtual_creat(const char *path, mode_t mode TSRMLS_DC);
CWD_API int virtual_rename(char *oldname, char *newname TSRMLS_DC);
#if !(defined(NETWARE) && defined(CLIB_STAT_PATCH))
CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC);
#else
CWD_API int virtual_stat(const char *path, struct stat_libc *buf TSRMLS_DC);
#endif
#if !defined(TSRM_WIN32) && !defined(NETWARE)
#ifndef TSRM_WIN32
CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC);
#endif
CWD_API int virtual_unlink(const char *path TSRMLS_DC);
@@ -150,7 +133,7 @@ CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC);
CWD_API int virtual_utime(const char *filename, struct utimbuf *buf TSRMLS_DC);
#endif
CWD_API int virtual_chmod(const char *filename, mode_t mode TSRMLS_DC);
#if !defined(TSRM_WIN32) && !defined(NETWARE)
#ifndef TSRM_WIN32
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group TSRMLS_DC);
#endif
@@ -185,7 +168,7 @@ typedef struct _virtual_cwd_globals {
#define VCWD_REALPATH(path, real_path) virtual_realpath(path, real_path TSRMLS_CC)
#define VCWD_RENAME(oldname, newname) virtual_rename(oldname, newname TSRMLS_CC)
#define VCWD_STAT(path, buff) virtual_stat(path, buff TSRMLS_CC)
#if !defined(TSRM_WIN32) && !defined(NETWARE)
#ifdef TSRM_WIN32
#define VCWD_LSTAT(path, buff) virtual_stat(path, buff TSRMLS_CC)
#else
#define VCWD_LSTAT(path, buff) virtual_lstat(path, buff TSRMLS_CC)
@@ -199,7 +182,7 @@ typedef struct _virtual_cwd_globals {
#define VCWD_UTIME(path, time) virtual_utime(path, time TSRMLS_CC)
#endif
#define VCWD_CHMOD(path, mode) virtual_chmod(path, mode TSRMLS_CC)
#if !defined(TSRM_WIN32) && !defined(NETWARE)
#ifndef TSRM_WIN32
#define VCWD_CHOWN(path, owner, group) virtual_chown(path, owner, group TSRMLS_CC)
#endif
@@ -222,7 +205,7 @@ typedef struct _virtual_cwd_globals {
#define VCWD_OPENDIR(pathname) opendir(pathname)
#define VCWD_POPEN(command, type) popen(command, type)
#if !defined(TSRM_WIN32) && !defined(NETWARE)
#ifndef TSRM_WIN32
#define VCWD_REALPATH(path, real_path) realpath(path, real_path)
#else
#define VCWD_REALPATH(path, real_path) strcpy(real_path, path)
@@ -232,7 +215,7 @@ typedef struct _virtual_cwd_globals {
#define VCWD_UTIME(path, time) utime(path, time)
#endif
#define VCWD_CHMOD(path, mode) chmod(path, mode)
#if !defined(TSRM_WIN32) && !defined(NETWARE)
#ifndef TSRM_WIN32
#define VCWD_CHOWN(path, owner, group) chown(path, owner, group)
#endif
+176 -351
View File
@@ -2,140 +2,7 @@ dnl $Id$
dnl
dnl This file contains local autoconf functions.
dnl PHP_ADD_MAKEFILE_FRAGMENT([srcfile[, ext_srcdir[, ext_builddir]]])
dnl
dnl Processes a file called Makefile.frag in the source directory
dnl of the most recently added extension. $(srcdir) and $(builddir)
dnl are substituted with the proper paths. Can be used to supply
dnl custom rules and/or additional targets.
dnl
AC_DEFUN(PHP_ADD_MAKEFILE_FRAGMENT,[
ifelse($1,,src=$ext_srcdir/Makefile.frag,src=$1)
ifelse($2,,ac_srcdir=$ext_srcdir,ac_srcdir=$2)
ifelse($3,,ac_builddir=$ext_builddir,ac_builddir=$3)
sed -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src >> Makefile.fragments
])
dnl PHP_DEFINE(WHAT[, value])
dnl
dnl Creates builddir/include/what.h and in there #define WHAT value
dnl
AC_DEFUN(PHP_DEFINE,[
[echo "#define ]$1[]ifelse([$2],,[ 1],[ $2])[" > include/php_]translit($1,A-Z,a-z)[.h]
])
dnl PHP_INIT_BUILD_SYSTEM
dnl
AC_DEFUN(PHP_INIT_BUILD_SYSTEM,[
mkdir include >/dev/null 2>&1
> Makefile.objects
> Makefile.fragments
dnl We need to play tricks here to avoid matching the egrep line itself
pattern=define
egrep $pattern'.*include/php' $srcdir/configure|sed 's/.*>//'|xargs touch 2>/dev/null
])
dnl PHP_GEN_GLOBAL_MAKEFILE
dnl
dnl Generates the global makefile.
dnl
AC_DEFUN(PHP_GEN_GLOBAL_MAKEFILE,[
cat >Makefile <<EOF
srcdir = $abs_srcdir
builddir = $abs_builddir
top_srcdir = $abs_srcdir
top_builddir = $abs_builddir
EOF
for i in $PHP_VAR_SUBST; do
eval echo "$i = \$$i" >> Makefile
done
cat $abs_srcdir/Makefile.global Makefile.fragments Makefile.objects >> Makefile
])
dnl PHP_ADD_SOURCES(source-path, sources[, special-flags[, type]])
dnl
dnl Adds sources which are located relative to source-path to the
dnl array of type type. Sources are processed with optional
dnl special-flags which are passed to the compiler. Sources
dnl can be either written in C or C++ (filenames shall end in .c
dnl or .cpp, respectively).
dnl
dnl Note: If source-path begins with a "/", the "/" is removed and
dnl the path is interpreted relative to the top build-directory.
dnl
dnl which array to append to?
AC_DEFUN(PHP_ADD_SOURCES,[
PHP_ADD_SOURCES_X($1, $2, $3, ifelse($4,cli,PHP_CLI_OBJS,ifelse($4,sapi,PHP_SAPI_OBJS,PHP_GLOBAL_OBJS)))
])
dnl
dnl PHP_ASSIGN_BUILD_VARS(type)
dnl internal, don't use
AC_DEFUN(PHP_ASSIGN_BUILD_VARS,[
ifelse($1,shared,[
b_c_pre=$shared_c_pre
b_cxx_pre=$shared_cxx_pre
b_c_meta=$shared_c_meta
b_cxx_meta=$shared_cxx_meta
b_c_post=$shared_c_post
b_cxx_post=$shared_cxx_post
],[
b_c_pre=$php_c_pre
b_cxx_pre=$php_cxx_pre
b_c_meta=$php_c_meta
b_cxx_meta=$php_cxx_meta
b_c_post=$php_c_post
b_cxx_post=$php_cxx_post
])dnl
b_lo=[$]$1_lo
])
dnl PHP_ADD_SOURCES_X(source-path, sources[, special-flags[, target-var[, shared[, special-post-flags]]]])
dnl
dnl Additional to PHP_ADD_SOURCES (see above), this lets you set the
dnl name of the array target-var directly, as well as whether
dnl shared objects will be built from the sources. Should not be
dnl used directly.
dnl
AC_DEFUN(PHP_ADD_SOURCES_X,[
dnl relative to source- or build-directory?
dnl ac_srcdir/ac_bdir include trailing slash
case $1 in
""[)] ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
/*[)] ac_srcdir=`echo $ac_n "$1$ac_c"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
*[)] ac_srcdir="$abs_srcdir/$1/"; ac_bdir="$1/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
esac
dnl how to build .. shared or static?
ifelse($5,yes,PHP_ASSIGN_BUILD_VARS(shared),PHP_ASSIGN_BUILD_VARS(php))
dnl iterate over the sources
old_IFS=[$]IFS
for ac_src in $2; do
dnl remove the suffix
IFS=.
set $ac_src
ac_obj=[$]1
IFS=$old_IFS
dnl append to the array which has been dynamically chosen at m4 time
$4="[$]$4 [$]ac_bdir[$]ac_obj.lo"
dnl choose the right compiler/flags/etc. for the source-file
case $ac_src in
*.c[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;;
*.cpp[)] ac_comp="$b_cxx_pre $3 $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_cxx_post" ;;
esac
dnl create a rule for the object/source combo
cat >>Makefile.objects<<EOF
$ac_bdir[$]ac_obj.lo: $ac_srcdir[$]ac_src
$ac_comp
EOF
done
])
sinclude(dynlib.m4)
dnl
dnl Disable building CLI
@@ -185,35 +52,29 @@ AC_DEFUN(PHP_REMOVE_USR_LIB,[
])
AC_DEFUN(PHP_SETUP_OPENSSL,[
if test "$PHP_OPENSSL" = "yes"; then
if test "$PHP_OPENSSL" = "no"; then
PHP_OPENSSL="/usr/local/ssl /usr/local /usr /usr/local/openssl"
fi
for i in $PHP_OPENSSL; do
if test -r $i/include/openssl/evp.h; then
OPENSSL_INCDIR=$i/include
fi
if test -r $i/lib/libssl.a -o -r $i/lib/libssl.$SHLIB_SUFFIX_NAME; then
OPENSSL_LIBDIR=$i/lib
OPENSSL_DIR=$i
OPENSSL_INC=$i/include
fi
done
if test -z "$OPENSSL_INCDIR"; then
if test -z "$OPENSSL_DIR"; then
AC_MSG_ERROR([Cannot find OpenSSL's <evp.h>])
fi
if test -z "$OPENSSL_LIBDIR"; then
AC_MSG_ERROR([Cannot find OpenSSL's libraries])
fi
old_CPPFLAGS=$CPPFLAGS
CPPFLAGS=-I$OPENSSL_INCDIR
CPPFLAGS=-I$OPENSSL_INC
AC_MSG_CHECKING([for OpenSSL version])
AC_EGREP_CPP(yes,[
#include <openssl/opensslv.h>
#if OPENSSL_VERSION_NUMBER >= 0x0090500fL
#include <openssl/opensslv.h>
#if OPENSSL_VERSION_NUMBER >= 0x0090500fL
yes
#endif
#endif
],[
AC_MSG_RESULT([>= 0.9.5])
],[
@@ -221,27 +82,20 @@ AC_DEFUN(PHP_SETUP_OPENSSL,[
])
CPPFLAGS=$old_CPPFLAGS
PHP_ADD_INCLUDE($OPENSSL_INCDIR)
PHP_ADD_LIBPATH($OPENSSL_LIBDIR)
PHP_ADD_LIBPATH($OPENSSL_DIR/lib)
PHP_CHECK_LIBRARY(crypto, CRYPTO_free, [
AC_CHECK_LIB(crypto, CRYPTO_free, [
PHP_ADD_LIBRARY(crypto)
],[
AC_MSG_ERROR([libcrypto not found!])
],[
-L$OPENSSL_LIBDIR
])
PHP_CHECK_LIBRARY(ssl, SSL_CTX_set_ssl_version, [
AC_CHECK_LIB(ssl, SSL_CTX_set_ssl_version, [
PHP_ADD_LIBRARY(ssl)
],[
AC_MSG_ERROR([libssl not found!])
],[
-L$OPENSSL_LIBDIR
])
OPENSSL_INCDIR_OPT=-I$OPENSSL_INCDIR
AC_SUBST(OPENSSL_INCDIR_OPT)
PHP_ADD_INCLUDE($OPENSSL_INC)
])
dnl PHP_EVAL_LIBLINE(LINE, SHARED-LIBADD)
@@ -255,7 +109,7 @@ AC_DEFUN(PHP_EVAL_LIBLINE,[
case $ac_i in
-l*)
ac_ii=`echo $ac_i|cut -c 3-`
PHP_ADD_LIBRARY($ac_ii,,$2)
PHP_ADD_LIBRARY($ac_ii,1,$2)
;;
-L*)
ac_ii=`echo $ac_i|cut -c 3-`
@@ -488,14 +342,16 @@ AC_DEFUN(PHP_LIBGCC_LIBPATH,[
changequote([,])
])
AC_DEFUN(PHP_ARG_ANALYZE_EX,[
ext_output="yes, shared"
ext_shared=yes
AC_DEFUN(PHP_ARG_ANALYZE,[
case [$]$1 in
shared,*)
ext_output="yes, shared"
ext_shared=yes
$1=`echo "[$]$1"|sed 's/^shared,//'`
;;
shared)
ext_output="yes, shared"
ext_shared=yes
$1=yes
;;
no)
@@ -508,12 +364,15 @@ no)
;;
esac
PHP_ALWAYS_SHARED([$1])
])
if test "$php_always_shared" = "yes"; then
ext_output="yes, shared"
ext_shared=yes
test "[$]$1" = "no" && $1=yes
fi
AC_DEFUN(PHP_ARG_ANALYZE,[
PHP_ARG_ANALYZE_EX([$1])
ifelse([$2],,,[AC_MSG_RESULT([$ext_output])])
if test -n "$2"; then
AC_MSG_RESULT([$ext_output])
fi
])
dnl
@@ -527,7 +386,9 @@ PHP_REAL_ARG_WITH([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z0-9-,A-Z0-9_))
])
AC_DEFUN(PHP_REAL_ARG_WITH,[
ifelse([$2],,,[AC_MSG_CHECKING([$2])])
if test -n "$2"; then
AC_MSG_CHECKING([$2])
fi
AC_ARG_WITH($1,[$3],$5=[$]withval,$5=ifelse($4,,no,$4))
PHP_ARG_ANALYZE($5,[$2])
])
@@ -543,7 +404,9 @@ PHP_REAL_ARG_ENABLE([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z-,A-Z_))
])
AC_DEFUN(PHP_REAL_ARG_ENABLE,[
ifelse([$2],,,[AC_MSG_CHECKING([$2])])
if test -n "$2"; then
AC_MSG_CHECKING([$2])
fi
AC_ARG_ENABLE($1,[$3],$5=[$]enableval,$5=ifelse($4,,no,$4))
PHP_ARG_ANALYZE($5,[$2])
])
@@ -630,6 +493,10 @@ AC_DEFUN(PHP_SUBST_OLD,[
AC_SUBST($1)
])
AC_DEFUN(PHP_FAST_OUTPUT,[
PHP_FAST_OUTPUT_FILES="$PHP_FAST_OUTPUT_FILES $1"
])
AC_DEFUN(PHP_MKDIR_P_CHECK,[
AC_CACHE_CHECK(for working mkdir -p, ac_cv_mkdir_p,[
test -d conftestdir && rm -rf conftestdir
@@ -645,6 +512,19 @@ dnl `mkdir -p' must be quiet about creating existing directories
])
])
AC_DEFUN(PHP_GEN_CONFIG_VARS,[
PHP_MKDIR_P_CHECK
echo creating config_vars.mk
> config_vars.mk
for i in $PHP_VAR_SUBST; do
eval echo "$i = \$$i" | sed 's%#%\\#%g' >> config_vars.mk
done
])
AC_DEFUN(PHP_GEN_MAKEFILES,[
$SHELL $srcdir/build/fastgen.sh $srcdir $ac_cv_mkdir_p $BSD_MAKEFILE $1
])
AC_DEFUN(PHP_TM_GMTOFF,[
AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff,
[AC_TRY_COMPILE([#include <sys/types.h>
@@ -765,34 +645,13 @@ dnl
dnl PHP_BUILD_SHARED
dnl
AC_DEFUN(PHP_BUILD_SHARED,[
PHP_BUILD_PROGRAM
OVERALL_TARGET=libphp4.la
php_build_target=shared
php_c_pre=$shared_c_pre
php_c_meta=$shared_c_meta
php_c_post=$shared_c_post
php_cxx_pre=$shared_cxx_pre
php_cxx_meta=$shared_cxx_meta
php_cxx_post=$shared_cxx_post
php_lo=$shared_lo
])
dnl
dnl PHP_BUILD_STATIC
dnl
AC_DEFUN(PHP_BUILD_STATIC,[
PHP_BUILD_PROGRAM
OVERALL_TARGET=libphp4.la
php_build_target=static
])
dnl
dnl PHP_BUILD_BUNDLE
dnl
AC_DEFUN(PHP_BUILD_BUNDLE,[
PHP_BUILD_PROGRAM
OVERALL_TARGET=libs/libphp4.bundle
php_build_target=static
])
@@ -800,23 +659,6 @@ dnl
dnl PHP_BUILD_PROGRAM
dnl
AC_DEFUN(PHP_BUILD_PROGRAM,[
OVERALL_TARGET=php
php_c_pre='$(CC)'
php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
php_c_post=' && echo > $[@]'
php_cxx_pre='$(CXX)'
php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
php_cxx_post=' && echo > $[@]'
php_lo=o
shared_c_pre='$(LIBTOOL) --mode=compile $(CC)'
shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -prefer-pic'
shared_c_post=
shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'
shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -prefer-pic'
shared_cxx_post=
shared_lo=lo
php_build_target=program
])
@@ -852,17 +694,7 @@ AC_DEFUN(PHP_EXPAND_PATH,[
$2="$ep_realdir/`basename \"$1\"`"
fi
])
dnl
dnl internal, don't use
AC_DEFUN(PHP_ADD_LIBPATH_GLOBAL,[
AC_PHP_ONCE(LIBPATH, $1, [
test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$1"
LDFLAGS="$LDFLAGS -L$1"
PHP_RPATHS="$PHP_RPATHS $1"
])
])dnl
dnl
dnl
dnl
dnl PHP_ADD_LIBPATH(path[, shared-libadd])
dnl
@@ -871,15 +703,15 @@ dnl
AC_DEFUN(PHP_ADD_LIBPATH,[
if test "$1" != "/usr/lib"; then
PHP_EXPAND_PATH($1, ai_p)
ifelse([$2],,[
PHP_ADD_LIBPATH_GLOBAL([$ai_p])
],[
if test "$ext_shared" = "yes"; then
$2="-R$ai_p -L$ai_p [$]$2"
else
PHP_ADD_LIBPATH_GLOBAL([$ai_p])
fi
])
if test "$ext_shared" = "yes" && test -n "$2"; then
$2="-R$1 -L$1 [$]$2"
else
AC_PHP_ONCE(LIBPATH, $ai_p, [
test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
LDFLAGS="$LDFLAGS -L$ai_p"
PHP_RPATHS="$PHP_RPATHS $ai_p"
])
fi
fi
])
@@ -890,7 +722,7 @@ dnl builds RPATH from PHP_RPATHS
dnl
AC_DEFUN(PHP_BUILD_RPATH,[
if test "$PHP_RPATH" = "yes" && test -n "$PHP_RPATHS"; then
OLD_RPATHS=$PHP_RPATHS
OLD_RPATHS="$PHP_RPATHS"
unset PHP_RPATHS
for i in $OLD_RPATHS; do
PHP_LDFLAGS="$PHP_LDFLAGS -L$i"
@@ -918,36 +750,31 @@ AC_DEFUN(PHP_ADD_INCLUDE,[
])
fi
])
dnl
dnl internal, don't use
AC_DEFUN(PHP_X_ADD_LIBRARY,[dnl
ifelse([$2],,$3="-l$1 [$]$3", $3="[$]$3 -l$1") dnl
])dnl
dnl
dnl internal, don't use
AC_DEFUN(PHP_ADD_LIBRARY_SKELETON,[
case $1 in
c|c_r|pthread*) ;;
*) ifelse($3,,[
PHP_X_ADD_LIBRARY($1,$2,$5)
],[
if test "$ext_shared" = "yes"; then
PHP_X_ADD_LIBRARY($1,$2,$3)
else
$4($1,$2)
fi
]) ;;
esac
])dnl
dnl
dnl
AC_DEFUN(PHP_X_ADD_LIBRARY,[
ifelse($2,,$3="-l$1 [$]$3", $3="[$]$3 -l$1")
])
dnl
dnl PHP_ADD_LIBRARY(library[, append[, shared-libadd]])
dnl
dnl add a library to the link line
dnl
AC_DEFUN(PHP_ADD_LIBRARY,[
PHP_ADD_LIBRARY_SKELETON([$1],[$2],[$3],[PHP_ADD_LIBRARY],[LIBS])
case $1 in
c|c_r|pthread*) ;;
*)
ifelse($3,,[
PHP_X_ADD_LIBRARY($1,$2,LIBS)
],[
if test "$ext_shared" = "yes"; then
PHP_X_ADD_LIBRARY($1,$2,$3)
else
PHP_ADD_LIBRARY($1,$2)
fi
])
;;
esac
])
dnl
@@ -956,9 +783,22 @@ dnl
dnl add a library to the link line (deferred)
dnl
AC_DEFUN(PHP_ADD_LIBRARY_DEFER,[
PHP_ADD_LIBRARY_SKELETON([$1],[$2],[$3],[PHP_ADD_LIBRARY_DEFER],[DLIBS])
case $1 in
c|c_r|pthread*) ;;
*)
ifelse($3,,[
PHP_X_ADD_LIBRARY($1,$2,DLIBS)
],[
if test "$ext_shared" = "yes"; then
PHP_X_ADD_LIBRARY($1,$2,$3)
else
PHP_ADD_LIBRARY_DEFER($1,$2)
fi
])
;;
esac
])
dnl
dnl PHP_ADD_LIBRARY_WITH_PATH(library, path[, shared-libadd])
dnl
@@ -998,8 +838,8 @@ AC_DEFUN(PHP_ADD_LIBRARY_DEFER_WITH_PATH,[
dnl
dnl Set libtool variable
dnl
AC_DEFUN(PHP_SET_LIBTOOL_VARIABLE,[
LIBTOOL='$(SHELL) libtool $1'
AC_DEFUN(AM_SET_LIBTOOL_VARIABLE,[
LIBTOOL='$(SHELL) $(top_builddir)/libtool $1'
])
dnl
@@ -1030,15 +870,21 @@ AC_DEFUN(PHP_CHECK_CC_OPTION,[
AC_DEFUN(PHP_REGEX,[
if test "$REGEX_TYPE" = "php"; then
REGEX_LIB=regex/libregex.la
REGEX_DIR=regex
AC_DEFINE(HSREGEX,1,[ ])
AC_DEFINE(REGEX,1,[ ])
PHP_ADD_SOURCES(regex, regcomp.c regexec.c regerror.c regfree.c)
PHP_FAST_OUTPUT(regex/Makefile)
elif test "$REGEX_TYPE" = "system"; then
AC_DEFINE(REGEX,0,[ ])
fi
AC_MSG_CHECKING([which regex library to use])
AC_MSG_RESULT([$REGEX_TYPE])
PHP_SUBST(REGEX_DIR)
PHP_SUBST(REGEX_LIB)
PHP_SUBST(HSREGEX)
])
dnl
@@ -1075,115 +921,60 @@ AC_DEFUN(PHP_AC_BROKEN_SPRINTF,[
fi
])
dnl PHP_SHARED_MODULE(module-name, object-var, build-dir)
dnl
dnl Basically sets up the link-stage for building module-name
dnl from object_var in build-dir.
dnl
AC_DEFUN(PHP_SHARED_MODULE,[
PHP_MODULES="$PHP_MODULES \$(phplibdir)/$1.la"
PHP_SUBST($2)
cat >>Makefile.objects<<EOF
\$(phplibdir)/$1.la: $3/$1.la
\$(LIBTOOL) --mode=install cp $3/$1.la \$(phplibdir)
$3/$1.la: \$($2) \$(translit($1,a-z-,A-Z_)_SHARED_DEPENDENCIES)
\$(LIBTOOL) --mode=link \$(CC) \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \[$]@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$($2) \$(translit($1,a-z-,A-Z_)_SHARED_LIBADD)
EOF
])
dnl
dnl PHP_SELECT_SAPI(name, type[, sources [, extra-cflags]])
dnl
dnl Selects the SAPI name and type (static, shared, programm)
dnl and optionally also the source-files for the SAPI-specific
dnl objects.
dnl
AC_DEFUN(PHP_SELECT_SAPI,[
PHP_SAPI=$1
case "$2" in
static) PHP_BUILD_STATIC;;
shared) PHP_BUILD_SHARED;;
bundle) PHP_BUILD_BUNDLE;;
program) PHP_BUILD_PROGRAM;;
esac
ifelse($3,,,[PHP_ADD_SOURCES([sapi/$1],[$3],[$4],[sapi])])
])
dnl deprecated
AC_DEFUN(PHP_EXTENSION,[
sources=`awk -f $abs_srcdir/scan_makefile_in.awk < []PHP_EXT_SRCDIR($1)[]/Makefile.in`
PHP_NEW_EXTENSION($1, $sources, $2, $3)
if test -r "$ext_srcdir/Makefile.frag"; then
PHP_ADD_MAKEFILE_FRAGMENT
fi
])
AC_DEFUN(PHP_ADD_BUILD_DIR,[
BUILD_DIR="$BUILD_DIR $1"
])
AC_DEFUN(PHP_GEN_BUILD_DIRS,[
PHP_MKDIR_P_CHECK
if test "$ac_cv_mkdir_p" = "yes"; then
mkdir -p $BUILD_DIR
fi
])
dnl
dnl PHP_NEW_EXTENSION(extname, sources [, shared [,sapi_class[, extra-cflags]]])
dnl PHP_EXTENSION(extname [, shared [,sapi_class]])
dnl
dnl Includes an extension in the build.
dnl
dnl "extname" is the name of the ext/ subdir where the extension resides.
dnl "sources" is a list of files relative to the subdir which are used
dnl to build the extension.
dnl "extname" is the name of the ext/ subdir where the extension resides
dnl "shared" can be set to "shared" or "yes" to build the extension as
dnl a dynamically loadable library. Optional parameter "sapi_class" can
dnl be set to "cli" to mark extension build only with CLI or CGI sapi's.
dnl extra-cflags are passed to the compiler, with @ext_srcdir@ being
dnl substituted.
AC_DEFUN(PHP_NEW_EXTENSION,[
ext_builddir=[]PHP_EXT_BUILDDIR($1)
ext_srcdir=[]PHP_EXT_SRCDIR($1)
dnl If "nocli" is passed the extension will be built only with a non-cli
dnl sapi.
dnl
AC_DEFUN(PHP_EXTENSION,[
EXT_SUBDIRS="$EXT_SUBDIRS $1"
if test -d "$abs_srcdir/ext/$1"; then
dnl ---------------------------------------------- Internal Module
ext_builddir=ext/$1
ext_srcdir=$abs_srcdir/ext/$1
else
dnl ---------------------------------------------- External Module
ext_builddir=.
ext_srcdir=$abs_srcdir
fi
ifelse($5,,ac_extra=,[ac_extra=`echo $ac_n "$5$ac_c"|sed s#@ext_srcdir@#$ext_srcdir#g`])
if test "$3" != "shared" && test "$3" != "yes" && test "$4" != "cli"; then
if test "$2" != "shared" && test "$2" != "yes" && test "$3" != "cli"; then
dnl ---------------------------------------------- Static module
PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,)
LIB_BUILD($ext_builddir)
EXT_LTLIBS="$EXT_LTLIBS $abs_builddir/$ext_builddir/lib$1.la"
EXT_STATIC="$EXT_STATIC $1"
if test "$3" != "nocli"; then
EXT_CLI_LTLIBS="$EXT_CLI_LTLIBS $abs_builddir/$ext_builddir/lib$1.la"
EXT_CLI_STATIC="$EXT_CLI_STATIC $1"
fi
else
if test "$3" = "shared" || test "$3" = "yes"; then
if test "$2" = "shared" || test "$2" = "yes"; then
dnl ---------------------------------------------- Shared module
PHP_ADD_SOURCES_X(PHP_EXT_DIR($1),$2,$ac_extra,shared_objects_$1,yes)
PHP_SHARED_MODULE($1,shared_objects_$1, $ext_builddir)
LIB_BUILD($ext_builddir,yes)
AC_DEFINE_UNQUOTED([COMPILE_DL_]translit($1,a-z-,A-Z_), 1, Whether to build $1 as dynamic module)
fi
fi
if test "$3" != "shared" && test "$3" != "yes" && test "$4" = "cli"; then
dnl ---------------------------------------------- CLI static module
if test "$2" != "shared" && test "$2" != "yes" && test "$3" = "cli"; then
dnl ---------------------------------------------- CLI only static module
LIB_BUILD($ext_builddir)
if test "$PHP_SAPI" = "cgi"; then
PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,)
EXT_LTLIBS="$EXT_LTLIBS $abs_builddir/$ext_builddir/lib$1.la"
EXT_STATIC="$EXT_STATIC $1"
else
PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cli)
fi
EXT_CLI_LTLIBS="$EXT_CLI_LTLIBS $abs_builddir/$ext_builddir/lib$1.la"
EXT_CLI_STATIC="$EXT_CLI_STATIC $1"
fi
PHP_ADD_BUILD_DIR($ext_builddir)
PHP_FAST_OUTPUT($ext_builddir/Makefile)
])
dnl
@@ -1218,9 +1009,22 @@ dnl and sets $shared to "yes" or "no", and removes "shared,?" stuff
dnl from $withval.
dnl
AC_DEFUN(PHP_WITH_SHARED,[
PHP_ARG_ANALYZE_EX(withval)
shared=$ext_shared
unset ext_shared ext_output
case $withval in
shared)
shared=yes
withval=yes
;;
shared,*)
shared=yes
withval=`echo $withval | sed -e 's/^shared,//'`
;;
*)
shared=no
;;
esac
if test -n "$php_always_shared"; then
shared=yes
fi
])
dnl The problem is that the default compilation flags in Solaris 2.6 won't
@@ -1323,6 +1127,11 @@ int main(void) {
fi
])
AC_DEFUN(AC_ADD_LIBPATH, [indir([PHP_ADD_LIBPATH], $@)])
AC_DEFUN(AC_ADD_LIBRARY, [indir([PHP_ADD_LIBRARY], $@)])
AC_DEFUN(AC_ADD_LIBRARY_WITH_PATH, [indir([PHP_ADD_LIBRARY_WITH_PATH], $@)])
AC_DEFUN(AC_ADD_INCLUDE, [indir([PHP_ADD_INCLUDE], $@)])
AC_DEFUN(PHP_FOPENCOOKIE,[
AC_CHECK_FUNC(fopencookie, [ have_glibc_fopencookie=yes ])
@@ -1381,6 +1190,7 @@ AC_DEFUN(PHP_CHECK_LIBRARY, [
])dnl
])
dnl
dnl PHP_SETUP_ICONV(shared-add [, action-found [, action-not-found]])
dnl
@@ -1395,11 +1205,10 @@ AC_DEFUN(PHP_SETUP_ICONV, [
dnl
if test "$PHP_ICONV" = "yes"; then
AC_CHECK_FUNC(iconv, [
PHP_DEFINE(HAVE_ICONV)
found_iconv=yes
],[
AC_CHECK_FUNC(libiconv,[
PHP_DEFINE(HAVE_LIBICONV)
AC_DEFINE(HAVE_LIBICONV, 1, [ ])
found_iconv=yes
])
])
@@ -1409,7 +1218,7 @@ AC_DEFUN(PHP_SETUP_ICONV, [
dnl Check external libs for iconv funcs
dnl
if test "$found_iconv" = "no"; then
for i in $PHP_ICONV /usr/local /usr; do
if test -r $i/include/giconv.h; then
AC_DEFINE(HAVE_GICONV_H, 1, [ ])
@@ -1432,11 +1241,10 @@ AC_DEFUN(PHP_SETUP_ICONV, [
then
PHP_CHECK_LIBRARY($iconv_lib_name, libiconv, [
found_iconv=yes
PHP_DEFINE(HAVE_LIBICONV)
AC_DEFINE(HAVE_LIBICONV, 1, [ ])
], [
PHP_CHECK_LIBRARY($iconv_lib_name, iconv, [
found_iconv=yes
PHP_DEFINE(HAVE_ICONV)
], [], [
-L$ICONV_DIR/lib
])
@@ -1445,10 +1253,10 @@ AC_DEFUN(PHP_SETUP_ICONV, [
])
fi
fi
if test "$found_iconv" = "yes"; then
AC_DEFINE(HAVE_ICONV, 1, [ ])
if test -n "$ICONV_DIR"; then
AC_DEFINE(HAVE_ICONV, 1, [ ])
PHP_ADD_LIBRARY_WITH_PATH($iconv_lib_name, $ICONV_DIR/lib, $1)
PHP_ADD_INCLUDE($ICONV_DIR/include)
fi
@@ -1456,3 +1264,20 @@ AC_DEFUN(PHP_SETUP_ICONV, [
ifelse([$3],[],,[else $3])
fi
])
dnl
dnl PHP_AP_EXTRACT_VERSION(/path/httpd)
dnl This macro is used to get a comparable
dnl version for apache1/2.
dnl
AC_DEFUN(PHP_AP_EXTRACT_VERSION,[
ac_output=`$1 -v 2>&1`
ac_IFS=$IFS
IFS="- /.
"
set $ac_output
IFS=$ac_IFS
APACHE_VERSION=`expr [$]4 \* 1000000 + [$]5 \* 1000 + [$]6`
])
+34
View File
@@ -0,0 +1,34 @@
#! /bin/sh
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id$
#
# cwd must be top_srcdir
test -f build/bsd_makefile || exit 2
test -f bsd_converted && exit 0
tmpfile=`mktemp /tmp/bsd_makefile.XXXXXX 2>/dev/null` || tmpfile="tmp.$$"
for i in build/*.mk; do
sed 's/^include \(.*\)/.include "\1"/' $i >$tmpfile \
&& cp $tmpfile $i
done
rm -f $tmpfile
touch bsd_converted
exit 0
+24 -6
View File
@@ -30,16 +30,37 @@ config_h_in = main/php_config.h.in
acconfig_h_SOURCES = acconfig.h.in $(config_h_files)
targets = $(TOUCH_FILES) configure $(config_h_in)
targets = $(TOUCH_FILES) $(makefile_in_files) configure $(config_h_in)
all: $(targets)
all: Zend/Makefile.am TSRM/Makefile.am $(targets)
Zend/Makefile.am:
test -d Zend || (test -d ../Zend && ln -s ../Zend Zend)
TSRM/Makefile.am:
test -d TSRM || (test -d ../TSRM && ln -s ../TSRM TSRM)
acconfig.h: $(acconfig_h_SOURCES)
@echo rebuilding $@
cat $(acconfig_h_SOURCES) > $@
SUPPRESS_WARNINGS = (egrep -v '(AC_TRY_RUN called without default to allow cross compiling|AC_PROG_CXXCPP was called before AC_PROG_CXX|defined in acinclude.m4 but never used|AC_PROG_LEX invoked multiple times|AC_PROG_CPP was called before AC_PROG_CC)'||true)
$(makefile_in_files): $(makefile_am_files) aclocal.m4 configure.in $(config_m4_files)
@echo rebuilding Makefile templates
@for i in $(LT_TARGETS); do \
if test -f "$$i"; then \
mv $$i $$i.bak; \
cp $$i.bak $$i; \
fi; \
done
@test -f want_dependencies || flag=-i; \
automake -a $$flag $(AMFLAGS) $(makefile_files) 2>&1 | $(SUPPRESS_WARNINGS)
@for i in $(LT_TARGETS); do mv $$i.bak $$i; done
aclocal.m4: configure.in acinclude.m4 dynlib.m4
aclocal 2>&1 | $(SUPPRESS_WARNINGS)
SUPPRESS_WARNINGS = (egrep -v '(AC_TRY_RUN called without default to allow cross compiling|AC_PROG_CXXCPP was called before AC_PROG_CXX|.*AM_PROG_LEX.*|defined in acinclude.m4 but never used|AC_PROG_LEX invoked multiple times|AC_PROG_CPP was called before)'||true)
$(config_h_in): configure acconfig.h
# explicitly remove target since autoheader does not seem to work
@@ -51,9 +72,6 @@ $(config_h_in): configure acconfig.h
$(TOUCH_FILES):
touch $(TOUCH_FILES)
aclocal.m4: configure.in acinclude.m4
aclocal 2>&1 | $(SUPPRESS_WARNINGS)
configure: aclocal.m4 configure.in $(config_m4_files)
@echo rebuilding $@
@autoconf 2>&1 | $(SUPPRESS_WARNINGS)
+24
View File
@@ -0,0 +1,24 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id$
#
all: all-recursive
include $(builddir)/libs.mk
include $(top_srcdir)/build/rules.mk
+80
View File
@@ -0,0 +1,80 @@
#! /bin/sh
#
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id: fastgen.sh,v 1.14 2002-02-28 08:25:33 sebastian Exp $
#
if test "$#" = "0"; then
echo "Usage: fastgen.sh <srcdir> <mkdir_p> <bsdmakefile_p> <file>"
fi
srcdir=$1
shift
mkdir_p=$1
shift
bsd_makefile=$1
shift
top_srcdir=`(cd $srcdir; pwd)`
top_builddir=`pwd`
if test "$mkdir_p" = "yes"; then
mkdir_p="mkdir -p"
else
mkdir_p="$top_srcdir/build/shtool mkdir -p"
fi
if test "$bsd_makefile" = "yes"; then
(cd $top_srcdir; ./build/bsd_makefile)
for makefile in $@; do
echo "fastgen.sh: creating $makefile"
dir=`echo $makefile|sed 's%/*[^/][^/]*$%%'`
$mkdir_p "$dir/"
cat - $top_srcdir/$makefile.in <<EOF |sed 's/^include \(.*\)/.include "\1"/' >$makefile
top_srcdir = $top_srcdir
top_builddir = $top_builddir
srcdir = $top_srcdir/$dir
builddir = $top_builddir/$dir
VPATH = $top_srcdir/$dir
EOF
test -z "$dir" && dir=.
touch $dir/.deps
done
else
for makefile in $@; do
echo "fastgen.sh: creating $makefile"
dir=`echo $makefile|sed 's%/*[^/][^/]*$%%'`
$mkdir_p "$dir/"
cat - $top_srcdir/$makefile.in <<EOF >$makefile
top_srcdir = $top_srcdir
top_builddir = $top_builddir
srcdir = $top_srcdir/$dir
builddir = $top_builddir/$dir
VPATH = $top_srcdir/$dir
EOF
test -z "$dir" && dir=.
touch $dir/.deps
done
fi
+8 -8
View File
@@ -1,24 +1,24 @@
#! /bin/sh
# $Id: genif.sh,v 1.3 2002-03-22 10:22:41 sas Exp $
# $Id: genif.sh,v 1.2 2001-03-30 14:02:20 sas Exp $
# replacement for genif.pl
infile=$1
infile="$1"
shift
srcdir=$1
srcdir="$1"
shift
extra_module_ptrs=$1
extra_module_ptrs="$1"
shift
awk=$1
awk="$1"
shift
if test -z "$infile" || test -z "$srcdir"; then
if test "$infile" = "" -o "$srcdir" = ""; then
echo "please supply infile and srcdir"
exit 1
fi
module_ptrs=$extra_module_ptrs
header_list=
module_ptrs="$extra_module_ptrs"
header_list=""
olddir=`pwd`
cd $srcdir
+23
View File
@@ -0,0 +1,23 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id$
#
LTLIBRARY_OBJECTS = $(LTLIBRARY_SOURCES:.c=.lo) $(LTLIBRARY_OBJECTS_X)
$(LTLIBRARY_NAME): $(LTLIBRARY_OBJECTS) $(LTLIBRARY_DEPENDENCIES)
$(LINK) $(LTLIBRARY_LDFLAGS) $(LTLIBRARY_OBJECTS) $(LTLIBRARY_LIBADD)
+24
View File
@@ -0,0 +1,24 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id$
#
targets = $(LTLIBRARY_NAME)
include $(top_srcdir)/build/rules.mk
include $(top_srcdir)/build/library.mk
+23
View File
@@ -0,0 +1,23 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id$
#
PROGRAM_OBJECTS = $(PROGRAM_SOURCES:.c=.lo)
$(PROGRAM_NAME): $(PROGRAM_DEPENDENCIES) $(PROGRAM_OBJECTS)
$(LINK_CLEAN) $(PROGRAM_LDFLAGS) $(PROGRAM_OBJECTS) $(PROGRAM_LDADD)
+70
View File
@@ -0,0 +1,70 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id$
#
include $(top_srcdir)/build/rules_common.mk
all: all-recursive
install: install-recursive
distclean-recursive depend-recursive clean-recursive all-recursive install-recursive:
@otarget=`echo $@|sed s/-recursive//`; \
list='$(SUBDIRS)'; for i in $$list; do \
target="$$otarget"; \
echo "Making $$target in $$i"; \
if test "$$i" = "."; then \
ok=yes; \
target="$$target-p"; \
fi; \
(cd $$i && $(MAKE) $$target) || exit 1; \
done; \
if test "$$otarget" = "all" && test -z '$(targets)'; then ok=yes; fi; \
if test "$$ok" != "yes"; then $(MAKE) "$$otarget-p" || exit 1; fi
all-p: $(targets)
install-p: $(targets) $(install_targets)
distclean-p depend-p clean-p:
depend: depend-recursive
@echo $(top_srcdir) $(top_builddir) $(srcdir) $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) $(DEFS) $(CPPFLAGS) $(srcdir)/*.c *.c | $(AWK) -f $(top_srcdir)/build/mkdep.awk > $(builddir)/.deps || true
clean: clean-modules clean-recursive clean-x
clean-modules:
clean-x:
rm -f $(targets) *.lo *.slo *.la *.o $(CLEANFILES)
rm -rf .libs libs/*
distclean: distclean-recursive clean-x
rm -f config.cache config.log config.status config_vars.mk libtool \
php_config.h stamp-h Makefile build-defs.h php4.spec libphp4.module
test: $(top_builddir)/sapi/cli/php
@if test "$(TESTS)" = ""; then \
TOP_BUILDDIR=$(top_builddir) TOP_SRCDIR=$(top_srcdir) $(top_builddir)/sapi/cli/php -c $(top_srcdir)/php.ini-dist $(top_srcdir)/run-tests.php $(srcdir); \
else \
TOP_BUILDDIR=$(top_builddir) TOP_SRCDIR=$(top_srcdir) $(top_builddir)/sapi/cli/php -c $(top_srcdir)/php.ini-dist $(top_srcdir)/run-tests.php $(TESTS); \
fi
include $(builddir)/.deps
.PHONY: all-recursive clean-recursive install-recursive \
$(install_targets) install all clean depend depend-recursive shared \
distclean-recursive distclean clean-x all-p install-p distclean-p \
depend-p clean-p
+77
View File
@@ -0,0 +1,77 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id$
#
include $(top_builddir)/config_vars.mk
COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS)
COMPILE = $(CC) $(COMMON_FLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
CXX_COMPILE = $(CXX) $(COMMON_FLAGS) $(CXXFLAGS) $(EXTRA_CXXFLAGS)
SHARED_COMPILE = $(SHARED_LIBTOOL) --mode=compile $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) -prefer-pic $(EXTRA_CFLAGS) -c $< && touch $@
CXX_SHARED_COMPILE = $(SHARED_LIBTOOL) --mode=compile $(CXX) $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) -prefer-pic $(EXTRA_CXXFLAGS) -c $< && touch $@
LINK = $(LIBTOOL) --mode=link $(COMPILE) $(LDFLAGS) -o $@
LINK_CLEAN = $(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@
mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p
INSTALL = $(top_srcdir)/build/shtool install -c
INSTALL_DATA = $(INSTALL) -m 644
DEFS = -I. -I$(srcdir) -I$(top_builddir)/main -I$(top_srcdir)
moduledir = $(EXTENSION_DIR)
CXX_SUFFIX = .cpp
.SUFFIXES:
.SUFFIXES: .slo .c $(CXX_SUFFIX) .lo .o .s .y .l
.c.o:
$(COMPILE) -c $<
$(CXX_SUFFIX).o:
$(CXX_COMPILE) -c $<
.s.o:
$(COMPILE) -c $<
.c.lo:
$(PHP_COMPILE)
$(CXX_SUFFIX).lo:
$(CXX_PHP_COMPILE)
.s.lo:
$(PHP_COMPILE)
.c.slo:
$(SHARED_COMPILE)
$(CXX_SUFFIX).slo:
$(CXX_SHARED_COMPILE)
.y.c:
$(YACC) $(YFLAGS) $< && mv y.tab.c $*.c
if test -f y.tab.h; then \
if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \
else :; fi
.l.c:
$(LEX) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@
+76
View File
@@ -0,0 +1,76 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id$
#
include $(top_srcdir)/build/rules_common.mk
install_targets = install-modules
all: all-recursive
install: install-recursive
distclean-recursive depend-recursive clean-recursive all-recursive install-recursive:
@otarget=`echo $@|sed s/-recursive//`; \
list='$(SUBDIRS)'; for i in $$list; do \
target="$$otarget"; \
echo "Making $$target in $$i"; \
if test "$$i" = "."; then \
ok=yes; \
target="$$target-p"; \
fi; \
(cd $$i && $(MAKE) $$target) || exit 1; \
done; \
if test "$$otarget" = "all" && test -z '$(targets)'; then ok=yes; fi; \
if test "$$ok" != "yes"; then $(MAKE) "$$otarget-p" || exit 1; fi
all-p: $(targets)
install-p: $(targets) $(install_targets)
distclean-p depend-p clean-p:
depend: depend-recursive
@echo $(top_srcdir) $(top_builddir) $(srcdir) $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) $(DEFS) $(CPPFLAGS) $(srcdir)/*.c *.c | $(AWK) -f $(top_srcdir)/build/mkdep.awk > $(builddir)/.deps || true
clean: clean-recursive clean-x
clean-x:
rm -f $(targets) *.lo *.slo *.la *.o $(CLEANFILES)
rm -rf .libs
distclean: distclean-recursive clean-x
rm -f config.cache config.log config.status config_vars.mk libtool \
config.h stamp-h Makefile build-defs.h php4.spec libphp4.module
cvsclean:
@for i in `find . -name .cvsignore`; do \
(cd `dirname $$i` 2>/dev/null && rm -rf `cat .cvsignore` *.o *.a || true); \
done
@rm -f $(SUBDIRS) 2>/dev/null || true
install-modules:
@test -d modules && \
$(mkinstalldirs) $(moduledir) && \
echo "installing shared modules into $(moduledir)" && \
rm -f modules/*.la && \
cp modules/* $(moduledir) || true
include $(builddir)/.deps
.PHONY: all-recursive clean-recursive install-recursive \
$(install_targets) install all clean depend depend-recursive shared \
distclean-recursive distclean clean-x all-p install-p distclean-p \
depend-p clean-p
+110 -181
View File
@@ -1,13 +1,13 @@
#!/bin/sh
##
## GNU shtool -- The GNU Portable Shell Tool
## Copyright (c) 1994-2001 Ralf S. Engelschall <rse@engelschall.com>
## Copyright (c) 1994-2000 Ralf S. Engelschall <rse@engelschall.com>
##
## See http://www.gnu.org/software/shtool/ for more information.
## See ftp://ftp.gnu.org/gnu/shtool/ for latest version.
##
## Version: 1.5.4 (14-Jun-2001)
## Contents: 3/17 available modules
## Version 1.4.9 (16-Apr-2000)
## Ingredients: 3/17 available modules
##
##
@@ -26,7 +26,7 @@
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
## USA, or contact Ralf S. Engelschall <rse@engelschall.com>.
##
## NOTICE: Given that you include this file verbatim into your own
## Notice: Given that you include this file verbatim into your own
## source tree, you are justified in saying that it remains separate
## from your package, and that this way you are simply just using GNU
## shtool. So, in this situation, there is no requirement that your
@@ -55,7 +55,7 @@
## arx Extended archive command
## slo Separate linker options by library class
## scpp Sharing C Pre-Processor
## version Maintain a version information file
## version Generate and maintain a version information file
## path Deal with program paths
##
@@ -65,22 +65,21 @@ if [ $# -eq 0 ]; then
exit 1
fi
if [ ".$1" = ".-h" -o ".$1" = ".--help" ]; then
echo "This is GNU shtool, version 1.5.4 (14-Jun-2001)"
echo "Copyright (c) 1994-2001 Ralf S. Engelschall <rse@engelschall.com>"
echo "This is GNU shtool, version 1.4.9 (16-Apr-2000)"
echo "Copyright (c) 1994-2000 Ralf S. Engelschall <rse@engelschall.com>"
echo "Report bugs to <bug-shtool@gnu.org>"
echo ''
echo "Usage: shtool [<options>] [<cmd-name> [<cmd-options>] [<cmd-args>]]"
echo "Usage: shtool [<options>] [<cmd-name> [<cmd-options>] [<cmd-args>]]"
echo ''
echo 'Available global <options>:'
echo ' -v, --version display shtool version information'
echo ' -h, --help display shtool usage help page (this one)'
echo ' -d, --debug display shell trace information'
echo ' -r, --recreate recreate this shtool script via shtoolize'
echo ''
echo 'Available <cmd-name> [<cmd-options>] [<cmd-args>]:'
echo ' echo [-n] [-e] [<str> ...]'
echo ' install [-v] [-t] [-c] [-C] [-s] [-m<mode>] [-o<owner>] [-g<group>]'
echo ' [-e<sed-cmd>] <file> [<file> ...] <path>'
echo ' [-e<ext>] <file> <path>'
echo ' mkdir [-t] [-f] [-p] [-m<mode>] <dir> [<dir> ...]'
echo ''
echo 'Not available <cmd-name> (because module was not built-in):'
@@ -91,25 +90,21 @@ if [ ".$1" = ".-h" -o ".$1" = ".--help" ]; then
echo ' mkln [-t] [-f] [-s] <src-path> [<src-path> ...] <dst-path>'
echo ' mkshadow [-v] [-t] [-a] <src-dir> <dst-dir>'
echo ' fixperm [-v] [-t] <path> [<path> ...]'
echo ' tarball [-t] [-v] [-o<tarball>] [-c<prog>] [-d<dir>] [-u<user>]'
echo ' [-g<group>] [-e<pattern>] <path> [<path> ...]'
echo ' tarball [-t] [-v] [-o <tarball>] [-c <prog>] [-d <dir>] [-u'
echo ' <user>] [-g <group>] [-e <pattern>] <path> [<path> ...]'
echo ' guessos '
echo ' arx [-t] [-C<cmd>] <op> <archive> [<file> ...]'
echo ' slo [-p<str>] -- -L<dir> -l<lib> [-L<dir> -l<lib> ...]'
echo ' scpp [-v] [-p] [-f<filter>] [-o<ofile>] [-t<tfile>] [-M<mark>]'
echo ' [-D<dname>] [-C<cname>] <file> [<file> ...]'
echo ' version [-l<lang>] [-n<name>] [-p<prefix>] [-s<version>] [-e]'
echo ' [-i<knob>] [-d<type>] <file>'
echo ' version [-l<lang>] [-n<name>] [-p<prefix>] [-s<version>] [-i<knob>]'
echo ' [-d<type>] <file>'
echo ' path [-s] [-r] [-d] [-b] [-m] [-p<path>] <str> [<str> ...]'
echo ''
exit 0
fi
if [ ".$1" = ".-v" -o ".$1" = ."--version" ]; then
echo "GNU shtool 1.5.4 (14-Jun-2001)"
exit 0
fi
if [ ".$1" = ".-r" -o ".$1" = ."--recreate" ]; then
shtoolize -ofoo echo install mkdir
echo "GNU shtool 1.4.9 (16-Apr-2000)"
exit 0
fi
if [ ".$1" = ".-d" -o ".$1" = ."--debug" ]; then
@@ -147,15 +142,15 @@ case $tool in
;;
install )
str_tool="install"
str_usage="[-v] [-t] [-c] [-C] [-s] [-m<mode>] [-o<owner>] [-g<group>] [-e<sed-cmd>] <file> [<file> ...] <path>"
arg_spec="2+"
opt_spec="v.t.c.C.s.m:o:g:e+"
str_usage="[-v] [-t] [-c] [-C] [-s] [-m<mode>] [-o<owner>] [-g<group>] [-e<ext>] <file> <path>"
arg_spec="2="
opt_spec="v.t.c.C.s.m:o:g:e:"
opt_v=no
opt_t=no
opt_c=no
opt_C=no
opt_s=no
opt_m="0755"
opt_m=""
opt_o=""
opt_g=""
opt_e=""
@@ -317,7 +312,6 @@ if [ ".$gen_tmpfile" = .yes ]; then
tmpfile="$tmpdir/.shtool.$$"
rm -f $tmpfile >/dev/null 2>&1
touch $tmpfile
chmod 600 $tmpfile
fi
##
@@ -329,7 +323,7 @@ case $tool in
echo )
##
## echo -- Print string with optional construct expansion
## Copyright (c) 1998-2001 Ralf S. Engelschall <rse@engelschall.com>
## Copyright (c) 1998-2000 Ralf S. Engelschall <rse@engelschall.com>
## Originally written for WML as buildinfo
##
@@ -353,7 +347,7 @@ echo )
fi
# determine terminal bold sequence
term_bold=''
term_bold=''
term_norm=''
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%[Bb]'`" != . ]; then
case $TERM in
@@ -404,7 +398,7 @@ echo )
# determine user name
username=''
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%[uUgG]'`" != . ]; then
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%[uU]'`" != . ]; then
username="$LOGNAME"
if [ ".$username" = . ]; then
username="$USER"
@@ -446,38 +440,8 @@ echo )
fi
fi
# determine (primary) group id
groupid=''
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%[gG]'`" != . ]; then
groupid=`egrep "^${username}:" /etc/passwd 2>/dev/null | \
sed -e 's/[^:]*:[^:]*:[^:]*://' -e 's/:.*$//'`
if [ ".$groupid" = . ]; then
groupid=`(ypcat passwd) 2>/dev/null | egrep "^${username}:" | \
sed -e 's/[^:]*:[^:]*:[^:]*://' -e 's/:.*$//'`
if [ ".$groupid" = . ]; then
groupid='?'
fi
fi
fi
# determine (primary) group name
groupname=''
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%g'`" != . ]; then
groupname=`egrep "^[^:]*:[^:]*:${groupid}:" /etc/group 2>/dev/null | \
sed -e 's/:.*$//'`
if [ ".$groupname" = . ]; then
groupname=`(ypcat group) 2>/dev/null | \
egrep "^[^:]*:[^:]*:${groupid}:" | \
sed -e 's/:.*$//'`
if [ ".$groupname" = . ]; then
groupname='?'
fi
fi
fi
# determine host and domain name
# determine host name
hostname=''
domainname=''
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%h'`" != . ]; then
hostname="`(uname -n) 2>/dev/null |\
awk '{ printf("%s", $1); }'`"
@@ -495,6 +459,9 @@ echo )
;;
esac
fi
# determine domain name
domainname=''
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%d'`" != . ]; then
if [ ".$domainname" = . ]; then
if [ -f /etc/resolv.conf ]; then
@@ -554,8 +521,6 @@ echo )
-e "s/%b/${term_norm}/g" \
-e "s/%u/${username}/g" \
-e "s/%U/${userid}/g" \
-e "s/%g/${groupname}/g" \
-e "s/%G/${groupid}/g" \
-e "s/%h/${hostname}/g" \
-e "s/%d/${domainname}/g" \
-e "s/%D/${time_day}/g" \
@@ -581,144 +546,114 @@ echo )
install )
##
## install -- Install a program, script or datafile
## Copyright (c) 1997-2001 Ralf S. Engelschall <rse@engelschall.com>
## Copyright (c) 1997-2000 Ralf S. Engelschall <rse@engelschall.com>
## Originally written for shtool
##
# determine source(s) and destination
argc=$#
srcs=""
while [ $# -gt 1 ]; do
srcs="$srcs $1"
shift
done
dstpath="$1"
src="$1"
dst="$2"
# type check for destination
dstisdir=0
if [ -d $dstpath ]; then
dstpath=`echo "$dstpath" | sed -e 's:/$::'`
dstisdir=1
# If destination is a directory, append the input filename
if [ -d $dst ]; then
dst=`echo "$dst" | sed -e 's:/$::'`
dstfile=`echo "$src" | sed -e 's;.*/\([^/]*\)$;\1;'`
dst="$dst/$dstfile"
fi
# consistency check for destination
if [ $argc -gt 2 -a $dstisdir = 0 ]; then
echo "$msgprefix:Error: multiple sources require destination to be directory" 1>&2
# Add a possible extension to src and dst
if [ ".$opt_e" != . ]; then
src="$src$opt_e"
dst="$dst$opt_e"
fi
# Check for correct arguments
if [ ".$src" = ".$dst" ]; then
echo "$msgprefix:Error: source and destination are the same" 1>&2
exit 1
fi
# iterate over all source(s)
for src in $srcs; do
dst=$dstpath
# Make a temp file name in the destination directory
dstdir=`echo $dst | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;' -e 's;^$;.;'`
dsttmp="$dstdir/#INST@$$#"
# if destination is a directory, append the input filename
if [ $dstisdir = 1 ]; then
dstfile=`echo "$src" | sed -e 's;.*/\([^/]*\)$;\1;'`
dst="$dst/$dstfile"
fi
# Verbosity
if [ ".$opt_v" = .yes ]; then
echo "$src -> $dst" 1>&2
fi
# check for correct arguments
if [ ".$src" = ".$dst" ]; then
echo "$msgprefix:Warning: source and destination are the same - skipped" 1>&2
continue
# Copy or move the file name to the temp name
# (because we might be not allowed to change the source)
if [ ".$opt_C" = .yes ]; then
opt_c=yes
fi
if [ ".$opt_c" = .yes ]; then
if [ ".$opt_t" = .yes ]; then
echo "cp $src $dsttmp" 1>&2
fi
if [ -d "$src" ]; then
echo "$msgprefix:Warning: source \`$src' is a directory - skipped" 1>&2
continue
cp $src $dsttmp || exit $?
else
if [ ".$opt_t" = .yes ]; then
echo "mv $src $dsttmp" 1>&2
fi
mv $src $dsttmp || exit $?
fi
# make a temp file name in the destination directory
dsttmp=`echo $dst |\
sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;' -e 's;^$;.;' \
-e "s;\$;/#INST@$$#;"`
# Adjust the target file
# (we do chmod last to preserve setuid bits)
if [ ".$opt_s" = .yes ]; then
if [ ".$opt_t" = .yes ]; then
echo "strip $dsttmp" 1>&2
fi
strip $dsttmp || exit $?
fi
if [ ".$opt_o" != . ]; then
if [ ".$opt_t" = .yes ]; then
echo "chown $opt_o $dsttmp" 1>&2
fi
chown $opt_o $dsttmp || exit $?
fi
if [ ".$opt_g" != . ]; then
if [ ".$opt_t" = .yes ]; then
echo "chgrp $opt_g $dsttmp" 1>&2
fi
chgrp $opt_g $dsttmp || exit $?
fi
if [ ".$opt_m" != . ]; then
if [ ".$opt_t" = .yes ]; then
echo "chmod $opt_m $dsttmp" 1>&2
fi
chmod $opt_m $dsttmp || exit $?
fi
# verbosity
if [ ".$opt_v" = .yes ]; then
echo "$src -> $dst" 1>&2
# Determine whether to do a quick install
# (has to be done _after_ the strip was already done)
quick=no
if [ ".$opt_C" = .yes ]; then
if [ -r $dst ]; then
if cmp -s $src $dst; then
quick=yes
fi
fi
fi
# copy or move the file name to the temp name
# (because we might be not allowed to change the source)
if [ ".$opt_C" = .yes ]; then
opt_c=yes
# Finally install the file to the real destination
if [ $quick = yes ]; then
if [ ".$opt_t" = .yes ]; then
echo "rm -f $dsttmp" 1>&2
fi
if [ ".$opt_c" = .yes ]; then
if [ ".$opt_t" = .yes ]; then
echo "cp $src $dsttmp" 1>&2
fi
cp $src $dsttmp || exit $?
else
if [ ".$opt_t" = .yes ]; then
echo "mv $src $dsttmp" 1>&2
fi
mv $src $dsttmp || exit $?
rm -f $dsttmp
else
if [ ".$opt_t" = .yes ]; then
echo "rm -f $dst && mv $dsttmp $dst" 1>&2
fi
# adjust the target file
if [ ".$opt_e" != . ]; then
sed='sed'
for e in $opt_e; do
sed="$sed -e '$e'"
done
cp $dsttmp $dsttmp.old
eval "$sed <$dsttmp.old >$dsttmp" || exit $?
rm -f $dsttmp.old
fi
if [ ".$opt_s" = .yes ]; then
if [ ".$opt_t" = .yes ]; then
echo "strip $dsttmp" 1>&2
fi
strip $dsttmp || exit $?
fi
if [ ".$opt_o" != . ]; then
if [ ".$opt_t" = .yes ]; then
echo "chown $opt_o $dsttmp" 1>&2
fi
chown $opt_o $dsttmp || exit $?
fi
if [ ".$opt_g" != . ]; then
if [ ".$opt_t" = .yes ]; then
echo "chgrp $opt_g $dsttmp" 1>&2
fi
chgrp $opt_g $dsttmp || exit $?
fi
if [ ".$opt_m" != ".-" ]; then
if [ ".$opt_t" = .yes ]; then
echo "chmod $opt_m $dsttmp" 1>&2
fi
chmod $opt_m $dsttmp || exit $?
fi
# determine whether to do a quick install
# (has to be done _after_ the strip was already done)
quick=no
if [ ".$opt_C" = .yes ]; then
if [ -r $dst ]; then
if cmp -s $src $dst; then
quick=yes
fi
fi
fi
# finally, install the file to the real destination
if [ $quick = yes ]; then
if [ ".$opt_t" = .yes ]; then
echo "rm -f $dsttmp" 1>&2
fi
rm -f $dsttmp
else
if [ ".$opt_t" = .yes ]; then
echo "rm -f $dst && mv $dsttmp $dst" 1>&2
fi
rm -f $dst && mv $dsttmp $dst
fi
done
rm -f $dst && mv $dsttmp $dst
fi
;;
mkdir )
##
## mkdir -- Make one or more directories
## Copyright (c) 1996-2001 Ralf S. Engelschall <rse@engelschall.com>
## Copyright (c) 1996-2000 Ralf S. Engelschall <rse@engelschall.com>
## Originally written for public domain by Noah Friedman <friedman@prep.ai.mit.edu>
## Cleaned up and enhanced for shtool
##
@@ -727,7 +662,7 @@ mkdir )
for p in ${1+"$@"}; do
# if the directory already exists...
if [ -d "$p" ]; then
if [ ".$opt_f" = .no -a ".$opt_p" = .no ]; then
if [ ".$opt_f" = .no ] && [ ".$opt_p" = .no ]; then
echo "$msgprefix:Error: directory already exists: $p" 1>&2
errstatus=1
break
@@ -741,12 +676,6 @@ mkdir )
echo "mkdir $p" 1>&2
fi
mkdir $p || errstatus=$?
if [ ".$opt_m" != . ]; then
if [ ".$opt_t" = .yes ]; then
echo "chmod $opt_m $p" 1>&2
fi
chmod $opt_m $p || errstatus=$?
fi
else
# the smart situation
set fnord `echo ":$p" |\
+34
View File
@@ -0,0 +1,34 @@
#! /bin/sh
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id$
#
# cwd must be top_srcdir
test -f build/sysv_makefile || exit 2
test -f bsd_converted || exit 1
tmpfile=`mktemp /tmp/sysv_makefile.XXXXXX` || tmpfile="tmp.$$"
for i in build/*.mk; do
sed 's/^\.include "\(.*\)"/include \1/' $i >$tmpfile \
&& cp $tmpfile $i
done
rm -f $tmpfile
rm bsd_converted
exit 0
+172 -214
View File
@@ -24,6 +24,7 @@ dnl ## All of these are normally in the extension directories.
dnl ## Diversion 5 is the last one. Here we generate files and clean up.
dnl Basic autoconf + automake initialization, generation of config.nice.
dnl -------------------------------------------------------------------------
@@ -35,19 +36,11 @@ for arg in $0 "$@"; do
done
AC_CANONICAL_HOST
AC_CONFIG_HEADER(main/php_config.h)
AM_INIT_AUTOMAKE(php, 4.2.3, nodefine)
AM_CONFIG_HEADER(main/php_config.h)
AM_MAINTAINER_MODE
MAJOR_VERSION=4
MINOR_VERSION=3
RELEASE_VERSION=0
EXTRA_VERSION="-dev"
VERSION="$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION"
dnl Define where extension directories are located in the configure context
AC_DEFUN(PHP_EXT_BUILDDIR,[ext/$1])dnl
AC_DEFUN(PHP_EXT_DIR,[ext/$1])dnl
AC_DEFUN(PHP_EXT_SRCDIR,[$abs_srcdir/ext/$1])dnl
AC_DEFUN(PHP_ALWAYS_SHARED,[])dnl
dnl Setting up the PHP version based on the information above.
dnl -------------------------------------------------------------------------
@@ -55,17 +48,13 @@ dnl -------------------------------------------------------------------------
PHP_VERSION=$VERSION
echo "/* automatically generated by configure */" > php_version.h.new
echo "/* edit configure.in to change version number */" >> php_version.h.new
echo "#define PHP_MAJOR_VERSION $MAJOR_VERSION" >> php_version.h.new
echo "#define PHP_MINOR_VERSION $MINOR_VERSION" >> php_version.h.new
echo "#define PHP_RELEASE_VERSION $RELEASE_VERSION" >> php_version.h.new
echo "#define PHP_EXTRA_VERSION \"$EXTRA_VERSION\"" >> php_version.h.new
echo "#define PHP_VERSION \"$PHP_VERSION\"" >> php_version.h.new
cmp php_version.h.new php_version.h >/dev/null 2>&1
if test $? -ne 0 ; then
rm -f php_version.h && mv php_version.h.new php_version.h && \
echo 'Updated php_version.h'
else
rm -f php_version.h.new
rm -f php_version.h.new
fi
@@ -81,47 +70,11 @@ if test -n "$with_apache" && test -n "$with_apxs"; then
AC_MSG_ERROR([--with-apache and --with-apxs cannot be used together])
fi
dnl Platform-specific compile settings.
dnl -------------------------------------------------------------------------
dnl if host_alias is empty, ac_cv_host_alias may still have the info
if test -z "$host_alias"; then
host_alias=$ac_cv_host_alias
fi
BSD_MAKEFILE=no
case $host_alias in
*solaris*)
CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
if test "${enable_libgcc+set}" != "set" && test "$GCC" = "yes"; then
enable_libgcc=yes
fi
;;
*dgux*)
CPPFLAGS="$CPPFLAGS -D_BSD_TIMEOFDAY_FLAVOR";;
*darwin*|*rhapsody*)
CPPFLAGS="$CPPFLAGS -no-cpp-precomp";;
*bsdi*)
BSD_MAKEFILE=yes;;
*beos*)
beos_threads=1
LIBS="$LIBS -lbe -lroot";;
*mips*)
CPPFLAGS="$CPPFLAGS -D_XPG_IV";;
esac
dnl Settings we want to make before the checks.
dnl -------------------------------------------------------------------------
cwd=`pwd`
PHP_INIT_BUILD_SYSTEM
php_shtool=$srcdir/build/shtool
T_MD=`$php_shtool echo -n -e %B`
T_ME=`$php_shtool echo -n -e %b`
@@ -129,15 +82,10 @@ T_ME=`$php_shtool echo -n -e %b`
dnl We want this one before the checks, so the checks can modify CFLAGS.
test -z "$CFLAGS" && auto_cflags=1
dnl AC_AIX needs to be before any macros that run the C compiler.
AC_AIX
abs_srcdir=`(cd $srcdir; pwd)`
abs_builddir=`pwd`
php_abs_top_srcdir=$abs_srcdir
php_abs_top_builddir=$abs_builddir
dnl Because ``make install'' is often performed by the superuser,
dnl we create the libs subdirectory as the user who configures PHP.
dnl Otherwise, the current user will not be able to delete libs
@@ -146,42 +94,44 @@ dnl or the contents of libs.
$php_shtool mkdir -p libs
rm -f libs/*
PHP_FAST_OUTPUT(sapi/Makefile ext/Makefile Makefile pear/Makefile main/Makefile sapi/cli/Makefile)
dnl Checks for programs.
dnl -------------------------------------------------------------------------
AC_PROG_CC
AC_PROG_CC_C_O
dnl Change to AC_PROG_CC_STDC when we start requiring a post-2.13 autoconf
dnl AC_PROG_CC_STDC
AC_PROG_CPP
AC_AIX
dnl Change to AC_PROG_CC_STDC when we start requiring a post-2.13 autoconf
AM_PROG_CC_STDC
dnl AC_PROG_CXX
dnl AC_PROG_CXXCPP
dnl check for -R, etc. switch
AC_MSG_CHECKING([whether compiler supports -R])
AC_CACHE_VAL(php_cv_cc_dashr,[
SAVE_LIBS=$LIBS
LIBS="-R /usr/lib $LIBS"
AC_TRY_LINK([], [], php_cv_cc_dashr=yes, php_cv_cc_dashr=no)
LIBS=$SAVE_LIBS
])
SAVE_LIBS=$LIBS
LIBS="-R /usr/lib $LIBS"
AC_TRY_LINK([], [], php_cv_cc_dashr=yes, php_cv_cc_dashr=no)
LIBS=$SAVE_LIBS])
AC_MSG_RESULT([$php_cv_cc_dashr])
if test $php_cv_cc_dashr = "yes"; then
ld_runpath_switch=-R
ld_runpath_switch=-R
else
AC_MSG_CHECKING([whether compiler supports -Wl,-rpath,])
AC_CACHE_VAL(php_cv_cc_rpath, [
SAVE_LIBS=$LIBS
LIBS="-Wl,-rpath,/usr/lib $LIBS"
AC_TRY_LINK([], [], php_cv_cc_rpath=yes, php_cv_cc_rpath=no)
LIBS=$SAVE_LIBS
])
AC_MSG_RESULT([$php_cv_cc_rpath])
if test $php_cv_cc_rpath = "yes"; then
ld_runpath_switch=-Wl,-rpath,
else
dnl something innocuous
ld_runpath_switch=-L
fi
AC_MSG_CHECKING([whether compiler supports -Wl,-rpath,])
AC_CACHE_VAL(php_cv_cc_rpath,[
SAVE_LIBS=$LIBS
LIBS="-Wl,-rpath,/usr/lib $LIBS"
AC_TRY_LINK([], [], php_cv_cc_rpath=yes, php_cv_cc_rpath=no)
LIBS=$SAVE_LIBS])
AC_MSG_RESULT([$php_cv_cc_rpath])
if test $php_cv_cc_rpath = "yes"; then
ld_runpath_switch=-Wl,-rpath,
else
dnl something innocuous
ld_runpath_switch=-L
fi
fi
AC_PROG_RANLIB
AC_PROG_LN_S
@@ -211,6 +161,36 @@ if test "$ac_cv_c_const" = "yes" ; then
fi
dnl Platform-specific compile settings.
dnl -------------------------------------------------------------------------
dnl if host_alias is empty, ac_cv_host_alias may still have the info
if test -z "$host_alias"; then
host_alias=$ac_cv_host_alias
fi
BSD_MAKEFILE=no
case $host_alias in
*solaris*)
CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
if test "${enable_libgcc+set}" != "set" && test "$GCC" = "yes"; then
enable_libgcc=yes
fi
;;
*dgux*)
CPPFLAGS="$CPPFLAGS -D_BSD_TIMEOFDAY_FLAVOR";;
*darwin*|*rhapsody*)
CPPFLAGS="$CPPFLAGS -traditional-cpp";;
*bsdi*)
BSD_MAKEFILE=yes;;
*beos*)
beos_threads=1
LIBS="$LIBS -lbe -lroot";;
*mips*)
CPPFLAGS="$CPPFLAGS -D_XPG_IV";;
esac
dnl Include Zend and TSRM configurations.
dnl -------------------------------------------------------------------------
@@ -235,7 +215,7 @@ dnl -------------------------------------------------------------------------
PTHREADS_CHECK
PHP_HELP_SEPARATOR([SAPI modules:])
PHP_SHLIB_SUFFIX_NAME
PHP_SAPI=default
PHP_SAPI=cgi
PHP_BUILD_PROGRAM
@@ -253,10 +233,6 @@ PHP_CONFIGURE_PART(Configuring SAPI modules)
esyscmd(./scripts/config-stubs sapi)
if test "$PHP_SAPI" = "default"; then
PHP_SELECT_SAPI(cgi, program, cgi_main.c getopt.c)
fi
AC_MSG_CHECKING([for chosen SAPI module])
AC_MSG_RESULT([$PHP_SAPI])
@@ -266,6 +242,7 @@ if test "$enable_experimental_zts" = "yes"; then
fi
divert(3)
dnl ## In diversion 3 we check for compile-time options to the PHP
@@ -307,18 +284,10 @@ AC_CHECK_LIB(socket, socket, [
dnl Some systems (OpenServer 5) dislike -lsocket -lnsl, so we try
dnl to avoid -lnsl checks, if we already have the functions which
dnl are usually in libnsl
dnl Also, uClibc will bark at linking with glibc's libnsl.
unset ac_cv_func_gethostname
unset ac_cv_func_yp_get_default_domain
AC_CHECK_FUNC(gethostname, [
php_no_nsl_checks=yes
],[
AC_CHECK_FUNC(yp_get_default_domain, [
php_no_nsl_checks=yes
])
])
unset ac_cv_func_gethostname
AC_CHECK_FUNC(yp_get_default_domain,
[php_no_nsl_checks=yes],[])
unset ac_cv_func_yp_get_default_domain
if test "$php_no_nsl_checks" != "yes"; then
@@ -374,9 +343,9 @@ AC_HEADER_STDC
dnl In QNX opendir resides in libc but dirent.h is still required
if test "`uname -s 2>/dev/null`" != "QNX"; then
AC_HEADER_DIRENT
AC_HEADER_DIRENT
else
AC_CHECK_HEADERS(dirent.h)
AC_CHECK_HEADERS(dirent.h)
fi
PHP_MISSING_FCLOSE_DECL
dnl QNX requires unix.h to allow functions in libunix to work properly
@@ -385,7 +354,6 @@ ApplicationServices/ApplicationServices.h \
alloca.h \
arpa/inet.h \
arpa/nameser.h \
assert.h \
crypt.h \
fcntl.h \
grp.h \
@@ -393,7 +361,6 @@ ieeefp.h \
langinfo.h \
limits.h \
locale.h \
mach-o/dyld.h \
netinet/in.h \
pwd.h \
resolv.h \
@@ -406,7 +373,6 @@ sysexits.h \
sys/file.h \
sys/mman.h \
sys/mount.h \
sys/poll.h \
sys/resource.h \
sys/select.h \
sys/socket.h \
@@ -421,7 +387,6 @@ sys/wait.h \
unistd.h \
unix.h \
utime.h \
sys/utsname.h \
)
@@ -444,10 +409,10 @@ AC_STRUCT_ST_BLKSIZE
dnl AC_STRUCT_ST_BLOCKS will screw QNX because fileblocks.o does not exists
dnl The WARNING_LEVEL required because cc in QNX hates -w option without an argument
if test "`uname -s 2>/dev/null`" != "QNX"; then
AC_STRUCT_ST_BLOCKS
AC_STRUCT_ST_BLOCKS
else
AC_MSG_WARN([warnings level for cc set to 0])
WARNING_LEVEL=0
AC_MSG_WARN([warnings level for cc set to 0])
WARNING_LEVEL=0
fi
AC_STRUCT_ST_RDEV
@@ -634,20 +599,20 @@ if test "$PHP_CONFIG_FILE_PATH" = "DEFAULT"; then
fi
# compatibility
if test -z "$with_pear" && test "$enable_pear" = "no"; then
with_pear=no
if test "x$with_pear" = "x" -a "x$enable_pear" = "xno"; then
with_pear=no
fi
PHP_ARG_WITH(pear, [whether to install PEAR, and where],
[ --with-pear=DIR Install PEAR in DIR (default PREFIX/lib/php)
--without-pear Do not install PEAR], DEFAULT)
if test "$PHP_PEAR" != "no" && test "$disable_cli" != "1"; then
install_pear="install-pear install-build install-headers install-programs"
if test "$PHP_PEAR" != "no"; then
PEAR_DIR=pear
PEAR_INSTALLDIR=$PHP_PEAR
fi
if test "$PHP_PEAR" = "DEFAULT" || test "$PHP_PEAR" = "yes"; then
if test "$PHP_PEAR" = "DEFAULT" -o "x$PHP_PEAR" = "xyes"; then
case $PHP_LAYOUT in
GNU) PEAR_INSTALLDIR=$datadir/pear;;
*) PEAR_INSTALLDIR=$libdir/php;;
@@ -671,27 +636,29 @@ AC_ARG_WITH(exec-dir,
defaults to /usr/local/php/bin],
[
if test "$withval" != "no"; then
if test "$withval" = "yes"; then
AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ])
AC_MSG_RESULT([/usr/local/php/bin])
else
AC_DEFINE_UNQUOTED(PHP_SAFE_MODE_EXEC_DIR,"$withval", [ ])
AC_MSG_RESULT([$withval])
fi
if test "$withval" = "yes"; then
AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ])
AC_MSG_RESULT([/usr/local/php/bin])
else
AC_DEFINE_UNQUOTED(PHP_SAFE_MODE_EXEC_DIR,"$withval", [ ])
AC_MSG_RESULT([$withval])
fi
else
AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ])
AC_MSG_RESULT([/usr/local/php/bin])
AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ])
AC_MSG_RESULT([/usr/local/php/bin])
fi
],[
AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ])
AC_MSG_RESULT([/usr/local/php/bin])
AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ])
AC_MSG_RESULT([/usr/local/php/bin])
])
PHP_ARG_WITH(openssl,for OpenSSL support,
[ --with-openssl[=DIR] Include OpenSSL support (requires OpenSSL >= 0.9.5) ])
if test "$PHP_OPENSSL" = "yes"; then
PHP_OPENSSL="/usr/local/ssl /usr/local /usr /usr/local/openssl"
fi
if test "$PHP_OPENSSL" != "no"; then
ext_openssl_shared=$ext_shared
PHP_SETUP_OPENSSL
fi
@@ -788,6 +755,9 @@ PHP_CONFIGURE_PART(Configuring extensions)
# reading config stubs
esyscmd(./scripts/config-stubs ext)
PHP_FAST_OUTPUT(sapi/$PHP_SAPI/Makefile)
dnl Other settings.
dnl -------------------------------------------------------------------------
@@ -818,17 +788,28 @@ unset with_pic
case $php_build_target in
program|static)
standard_libtool_flag='-prefer-non-pic -static'
if test -z "$PHP_MODULES"; then
if test "$lib_build_shared" != "yes"; then
enable_shared=no
fi
PHP_COMPILE='$(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c $< && touch $@'
CXX_PHP_COMPILE='$(CXX) $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c $< && touch $@'
;;
shared)
enable_static=no
standard_libtool_flag=-prefer-pic
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -avoid-version -module"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -avoid-version"
;;
esac
if test "$PHP_SAPI" = "cgi"; then
PHP_PROGRAM=php
fi
if test "$PHP_SAPI" = "fastcgi"; then
PHP_PROGRAM=php
fi
PHP_REGEX
EXTRA_LIBS="$EXTRA_LIBS $DLIBS $LIBS"
@@ -913,16 +894,16 @@ if test -z "$EXTENSION_DIR"; then
part2=non-zts
fi
extbasedir=$part1-$part2-$extbasedir
EXTENSION_DIR=$libdir/extensions/$extbasedir
EXTENSION_DIR=$libdir/extensions/$extbasedir
else
if test "$enable_experimental_zts" = "yes"; then
extbasedir=$extbasedir-zts
fi
if test "$PHP_DEBUG" = "1"; then
extbasedir=$extbasedir-debug
fi
EXTENSION_DIR=$libdir/$extbasedir
if test "$enable_experimental_zts" = "yes"; then
extbasedir=$extbasedir-zts
fi
if test "$PHP_DEBUG" = "1"; then
extbasedir=$extbasedir-debug
fi
EXTENSION_DIR=$libdir/$extbasedir
fi
fi
@@ -965,26 +946,23 @@ AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[uname -a output])
PHP_OS=`uname`
AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS",[uname output])
if test "$disable_cli" != "1"; then
PHP_CLI_TARGET=sapi/cli/php
PHP_INSTALL_CLI_TARGET="install-cli"
PHP_ADD_SOURCES(sapi/cli, php_cli.c getopt.c,, cli)
if test "$disable_cli" = "1"; then
CLI_DIR=
else
CLI_DIR=sapi/cli
fi
PHP_SUBST(PHP_CLI_TARGET)
PHP_SUBST(PHP_SAPI_OBJS)
PHP_SUBST(PHP_CLI_OBJS)
PHP_SUBST(PHP_GLOBAL_OBJS)
PHP_SUBST(PHP_MODULES)
PHP_SUBST(CLI_DIR)
PHP_SUBST(EXT_SUBDIRS)
PHP_SUBST(EXT_STATIC)
PHP_SUBST(EXT_SHARED)
PHP_SUBST(EXT_LIBS)
PHP_SUBST(EXT_LTLIBS)
PHP_SUBST(EXT_CLI_LTLIBS)
PHP_SUBST_OLD(abs_builddir)
PHP_SUBST_OLD(abs_srcdir)
PHP_SUBST_OLD(php_abs_top_builddir)
PHP_SUBST_OLD(php_abs_top_srcdir)
PHP_SUBST(bindir)
PHP_SUBST(exec_prefix)
PHP_SUBST(includedir)
@@ -1013,8 +991,7 @@ PHP_SUBST_OLD(EXTENSION_DIR)
PHP_SUBST(EXTRA_LDFLAGS)
PHP_SUBST_OLD(EXTRA_LIBS)
PHP_SUBST_OLD(ZEND_EXTRA_LIBS)
PHP_SUBST_OLD(INCLUDES)
PHP_SUBST_OLD(EXTRA_INCLUDES)
PHP_SUBST(INCLUDES)
PHP_SUBST_OLD(INCLUDE_PATH)
PHP_SUBST_OLD(INSTALL_IT)
PHP_SUBST(LEX)
@@ -1023,15 +1000,16 @@ PHP_SUBST(LFLAGS)
PHP_SUBST(LIBTOOL)
PHP_SUBST(LN_S)
PHP_SUBST_OLD(NATIVE_RPATHS)
PHP_SUBST(PEAR_DIR)
PHP_SUBST_OLD(PEAR_INSTALLDIR)
PHP_SUBST(PHP_BUILD_DATE)
PHP_SUBST(PHP_COMPILE)
PHP_SUBST_OLD(PHP_LDFLAGS)
PHP_SUBST_OLD(PHP_LIBS)
PHP_SUBST(OVERALL_TARGET)
PHP_SUBST(PHP_PROGRAM)
PHP_SUBST(PHP_RPATHS)
PHP_SUBST(PHP_SAPI)
PHP_SUBST_OLD(PHP_VERSION)
PHP_SUBST(PHP_VERSION)
PHP_SUBST(PROG_SENDMAIL)
PHP_SUBST(SHELL)
PHP_SUBST(SHARED_LIBTOOL)
@@ -1039,7 +1017,6 @@ PHP_SUBST(TSRM_DIR)
PHP_SUBST(TSRM_LIB)
PHP_SUBST(WARNING_LEVEL)
PHP_SUBST_OLD(YACC)
PHP_SUBST_OLD(SHLIB_SUFFIX_NAME)
old_CC=$CC
@@ -1060,9 +1037,9 @@ if test "$PHP_THREAD_SAFETY" = "yes" && test "$PHP_MYSQL" = "yes"; then
CPPFLAGS="$CPPFLAGS -DTHREAD=1"
fi
AC_PROG_LIBTOOL
AM_PROG_LIBTOOL
if test "$enable_debug" != "yes"; then
PHP_SET_LIBTOOL_VARIABLE([--silent])
AM_SET_LIBTOOL_VARIABLE([--silent])
fi
@@ -1076,80 +1053,33 @@ PHP_CONFIGURE_PART(Generating files)
CXXFLAGS_CLEAN=$CXXFLAGS
CFLAGS_CLEAN=$CFLAGS
CFLAGS="\$(CFLAGS_CLEAN) $standard_libtool_flag"
CFLAGS="$CFLAGS $standard_libtool_flag"
INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag"
CXXFLAGS="$CXXFLAGS $standard_libtool_flag"
all_targets='$(OVERALL_TARGET) $(PHP_MODULES) $(PHP_CLI_TARGET)'
install_targets="install-sapi install-modules $PHP_INSTALL_CLI_TARGET $install_pear"
PHP_SUBST(all_targets)
PHP_SUBST(install_targets)
PHP_ADD_SOURCES(TSRM, TSRM.c tsrm_strtok_r.c tsrm_virtual_cwd.c)
PHP_ADD_SOURCES(main, main.c snprintf.c spprintf.c php_sprintf.c \
safe_mode.c fopen_wrappers.c alloca.c \
php_ini.c SAPI.c rfc1867.c php_content_types.c strlcpy.c \
strlcat.c mergesort.c reentrancy.c php_variables.c php_ticks.c \
streams.c network.c php_open_temporary_file.c php_logos.c \
output.c memory_streams.c user_streams.c)
PHP_ADD_SOURCES(/main, internal_functions.c,, sapi)
PHP_ADD_SOURCES(/main, internal_functions_cli.c,, cli)
PHP_ADD_SOURCES(/Zend, zend_language_parser.c zend_language_scanner.c \
zend_ini_parser.c zend_ini_scanner.c)
PHP_ADD_SOURCES(Zend, \
zend_alloc.c zend_compile.c zend_constants.c zend_dynamic_array.c \
zend_execute_API.c zend_highlight.c zend_llist.c \
zend_opcode.c zend_operators.c zend_ptr_stack.c zend_stack.c \
zend_variables.c zend.c zend_API.c zend_extensions.c zend_hash.c \
zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c \
zend_ini.c zend_qsort.c zend_multibyte.c)
if test -r "$abs_srcdir/Zend/zend_objects.c"; then
PHP_ADD_SOURCES(Zend, zend_objects.c zend_object_handlers.c zend_objects_API.c)
fi
dnl Selectively disable optimization due to high RAM usage during
dnl compiling the executor.
if test -n "$GCC" && test "$ZEND_INLINE_OPTIMIZATION" != "yes"; then
flag=-O0
else
flag=
fi
PHP_ADD_SOURCES_X(Zend, zend_execute.c,,PHP_GLOBAL_OBJS,,$flag)
PHP_ADD_BUILD_DIR(main)
PHP_ADD_BUILD_DIR(regex)
PHP_ADD_BUILD_DIR(sapi/$PHP_SAPI sapi/cli)
PHP_ADD_BUILD_DIR(TSRM)
PHP_ADD_BUILD_DIR(Zend)
PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/pear/Makefile.frag,$abs_srcdir/pear,pear)
PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/Makefile.frag,$abs_srcdir/Zend,Zend)
PHP_GEN_BUILD_DIRS
PHP_GEN_GLOBAL_MAKEFILE
PHP_GEN_CONFIG_VARS
$php_shtool mkdir -p pear/scripts
ALL_OUTPUT_FILES="php4.spec main/build-defs.h \
pear/scripts/phpize pear/scripts/php-config \
$PHP_OUTPUT_FILES"
ALL_OUTPUT_FILES="php4.spec Zend/Makefile main/build-defs.h \
pear/scripts/pear pear/scripts/phpize pear/scripts/php-config \
pear/scripts/pearize pear/scripts/phptar \
TSRM/Makefile $PHP_OUTPUT_FILES"
AC_OUTPUT($ALL_OUTPUT_FILES, [], [
if test "\$CONFIG_FILES" = "$ALL_OUTPUT_FILES" || test "\$CONFIG_FILES" = " $ALL_OUTPUT_FILES" || test -z "\$CONFIG_FILES"; then
if test "\$CONFIG_FILES" = "$ALL_OUTPUT_FILES" || test -z "\$CONFIG_FILES"; then
REDO_ALL=yes
fi
if test -n "\$REDO_ALL"; then
PHP_GEN_MAKEFILES($PHP_FAST_OUTPUT_FILES)
fi
if test ! -f $srcdir/ext/bcmath/number.c; then
echo "creating number.c"
echo "/* Dummy File */" > $srcdir/ext/bcmath/number.c
echo "creating number.h"
echo "/* Dummy File */" > $srcdir/ext/bcmath/number.h
echo "creating number.c"
echo "/* Dummy File */" > $srcdir/ext/bcmath/number.c
echo "creating number.h"
echo "/* Dummy File */" > $srcdir/ext/bcmath/number.h
fi
################################################################
@@ -1188,6 +1118,33 @@ dnl else
dnl rm -f main/internal_functions.c.old
dnl fi
# experimental things
if test $PHP_SAPI = "apache2filter" ; then
echo "+--------------------------------------------------------------------+"
echo "| *** WARNING *** |"
echo "| |"
echo "| Apache 2 Support is EXPERIMENTAL and should NOT be used in |"
echo "| production environment. Before submitting bug reports, try the |"
echo "| latest CVS snapshot from http://snaps.php.net |"
fi
if test "$PHP_OVERLOAD" != "no"; then
echo "+--------------------------------------------------------------------+"
echo "| *** WARNING *** |"
echo "| |"
echo "| The overload extension is highly EXPERIMENTAL and will most |"
echo "| certainly change in newer versions. You have been warned! |"
fi
if test "$PHP_AGGREGATE" != "no"; then
echo "+--------------------------------------------------------------------+"
echo "| *** WARNING *** |"
echo "| |"
echo "| The aggregate functions are highly EXPERIMENTAL and will most |"
echo "| certainly change in newer versions. You have been warned! |"
fi
if test $UNAME = "FreeBSD" && test $PHP_SAPI = "apache2filter" && test $TSRM_PTH != "pth-config" ; then
echo "+--------------------------------------------------------------------+"
echo "| *** WARNING *** |"
@@ -1239,7 +1196,7 @@ cat <<X
X
fi
if test "$MYSQL_MODULE_TYPE" = "builtin" && test "$PHP_SAPI" != "cgi" && test "$PHP_SAPI" != "cli"; then
if test "$MYSQL_MODULE_TYPE" = "builtin" ; then
cat <<X
+--------------------------------------------------------------------+
| *** WARNING *** |
@@ -1300,6 +1257,7 @@ cat<<X
+--------------------------------------------------------------------+
Thank you for using PHP.
X
+88
View File
@@ -0,0 +1,88 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id$
#
AC_DEFUN(LIB_SHARED_CONVENIENCE,[
lib_target="\$(LTLIBRARY_NAME)"
cat >>$1<<EOF
\$(LTLIBRARY_NAME): \$(LTLIBRARY_SHARED_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
\$(SHARED_LIBTOOL) --mode=link \$(COMPILE) \$(LDFLAGS) -o \[$]@ \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_SHARED_LIBADD)
EOF
])
AC_DEFUN(LIB_SHARED_MODULE,[
lib_target="\$(LTLIBRARY_SHARED_NAME)"
cat >>$1<<EOF
\$(LTLIBRARY_SHARED_NAME): \$(LTLIBRARY_SHARED_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
\$(SHARED_LIBTOOL) --mode=link \$(CC) \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \[$]@ -avoid-version -module -rpath \$(phplibdir) \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_SHARED_LIBADD)
\$(SHARED_LIBTOOL) --mode=install cp \[$]@ \$(phplibdir)
EOF
])
AC_DEFUN(LIB_STATIC_CONVENIENCE,[
lib_target="\$(LTLIBRARY_NAME)"
cat >>$1<<EOF
\$(LTLIBRARY_NAME): \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
\$(LINK) \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_LIBADD)
EOF
])
dnl LIB_BUILD(path, shared, convenience)
dnl sets up path to build a shared/static convenience/module
AC_DEFUN(LIB_BUILD,[
lib_makefile="$1/libs.mk"
lib_target=""
$php_shtool mkdir -p $1
if test "$BSD_MAKEFILE" = "yes"; then
lib_include_conf=".include \"\$(top_builddir)/config_vars.mk\""
else
lib_include_conf="include \$(top_builddir)/config_vars.mk"
fi
cat >$lib_makefile<<EOF
$lib_include_conf
LTLIBRARY_OBJECTS = \$(LTLIBRARY_SOURCES:.c=.lo) \$(LTLIBRARY_OBJECTS_X)
LTLIBRARY_SHARED_OBJECTS = \$(LTLIBRARY_OBJECTS:.lo=.slo)
EOF
if test "$2" = "shared" || test "$2" = "yes"; then
lib_build_shared=yes
if test -n "$3"; then
dnl ---------------------------------------- Shared Convenience
LIB_SHARED_CONVENIENCE($lib_makefile)
else
dnl ---------------------------------------- Shared Module
LIB_SHARED_MODULE($lib_makefile)
fi
else
dnl ---------------------------------------- Static Convenience = Static Module
LIB_STATIC_CONVENIENCE($lib_makefile)
fi
dnl ---------------------------------------- Generate build targets
if test -n "$lib_target"; then
cat >>$lib_makefile<<EOF
targets = $lib_target
EOF
fi
])
+4
View File
@@ -0,0 +1,4 @@
SUBDIRS = $(EXT_SUBDIRS)
include $(top_srcdir)/build/rules.mk
+5
View File
@@ -0,0 +1,5 @@
LTLIBRARY_NAME = libaspell.la
LTLIBRARY_SOURCES = aspell.c
include $(top_srcdir)/build/dynlib.mk
+1 -1
View File
@@ -21,7 +21,7 @@ AC_ARG_WITH(aspell,
fi
AC_DEFINE(HAVE_ASPELL,1,[Whether you have aspell])
AC_MSG_RESULT(yes)
PHP_NEW_EXTENSION(aspell, aspell.c)
PHP_EXTENSION(aspell)
else
AC_MSG_RESULT(no)
fi
+11
View File
@@ -0,0 +1,11 @@
LTLIBRARY_NAME = libbcmath.la
LTLIBRARY_SOURCES = bcmath.c number.c
LTLIBRARY_SHARED_NAME = bcmath.la
LTLIBRARY_DEPENDENCIES = libbcmath/libbcmath.la
LTLIBRARY_LIBADD = $(LTLIBRARY_DEPENDENCIES)
LTLIBRARY_SHARED_LIBADD = $(LTLIBRARY_LIBADD)
SUBDIRS = libbcmath
include $(top_srcdir)/build/dynlib.mk
+1 -1
View File
@@ -28,7 +28,7 @@
#include "ext/standard/info.h"
#include "php_bcmath.h"
#include "ext/bcmath/libbcmath/src/bcmath.h"
#include "libbcmath/src/bcmath.h"
function_entry bcmath_functions[] = {
PHP_FE(bcadd, NULL)
+4 -7
View File
@@ -7,11 +7,8 @@ PHP_ARG_ENABLE(bcmath, whether to enable bc style precision math functions,
if test "$PHP_BCMATH" != "no"; then
AC_DEFINE(WITH_BCMATH, 1, [Whether you have bcmath])
PHP_NEW_EXTENSION(bcmath, bcmath.c number.c \
libbcmath/src/add.c libbcmath/src/div.c libbcmath/src/init.c libbcmath/src/neg.c libbcmath/src/outofmem.c libbcmath/src/raisemod.c libbcmath/src/rt.c libbcmath/src/sub.c \
libbcmath/src/compare.c libbcmath/src/divmod.c libbcmath/src/int2num.c libbcmath/src/num2long.c libbcmath/src/output.c libbcmath/src/recmul.c \
libbcmath/src/sqrt.c libbcmath/src/zero.c libbcmath/src/debug.c libbcmath/src/doaddsub.c libbcmath/src/nearzero.c libbcmath/src/num2str.c libbcmath/src/raise.c \
libbcmath/src/rmzero.c libbcmath/src/str2num.c,
$ext_shared,,-I@ext_srcdir@/libbcmath/src)
PHP_ADD_BUILD_DIR($ext_builddir/libbcmath/src)
PHP_EXTENSION(bcmath, $ext_shared)
PHP_FAST_OUTPUT($ext_builddir/libbcmath/Makefile $ext_builddir/libbcmath/src/Makefile)
LIB_BUILD($ext_builddir/libbcmath,$ext_shared,yes)
LIB_BUILD($ext_builddir/libbcmath/src,$ext_shared,yes)
fi
+9
View File
@@ -0,0 +1,9 @@
LTLIBRARY_NAME = libbcmath.la
LTLIBRARY_DEPENDENCIES = src/libbcmath.la
LTLIBRARY_LIBADD = $(LTLIBRARY_DEPENDENCIES)
LTLIBRARY_SHARED_LIBADD = $(LTLIBRARY_LIBADD)
SUBDIRS = src
include $(top_srcdir)/build/dynlib.mk
+3
View File
@@ -0,0 +1,3 @@
# Documentation makefile
MAINTAINERCLEANFILES= Makefile.in
+171
View File
@@ -0,0 +1,171 @@
# Makefile.in generated automatically by automake 1.4 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
# Documentation makefile
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
CC = @CC@
MAKEINFO = @MAKEINFO@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
VERSION = @VERSION@
MAINTAINERCLEANFILES = Makefile.in
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES =
DIST_COMMON = Makefile.am Makefile.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps doc/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
tags: TAGS
TAGS:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = doc
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am
check: check-am
installcheck-am:
installcheck: installcheck-am
install-exec-am:
install-exec: install-exec-am
install-data-am:
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am:
uninstall: uninstall-am
all-am: Makefile
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
mostlyclean-am: mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-generic clean-am
distclean: distclean-am
maintainer-clean-am: maintainer-clean-generic distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am
.PHONY: tags distdir info-am info dvi-am dvi check check-am \
installcheck-am installcheck install-exec-am install-exec \
install-data-am install-data install-am install uninstall-am uninstall \
all-redirect all-am all installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
+1
View File
@@ -0,0 +1 @@
./" bcmath library documentation
+7
View File
@@ -0,0 +1,7 @@
LTLIBRARY_NAME = libbcmath.la
LTLIBRARY_SOURCES = add.c div.c init.c neg.c outofmem.c raisemod.c rt.c sub.c \
compare.c divmod.c int2num.c num2long.c output.c recmul.c \
sqrt.c zero.c debug.c doaddsub.c nearzero.c num2str.c raise.c \
rmzero.c str2num.c
include $(top_srcdir)/build/dynlib.mk
+6
View File
@@ -0,0 +1,6 @@
# $Source$
# $Id$
define_option enable-bcmath 'Enable bc style precision math functions' yesno \
yes \
' Enables bc style arbitrary precision math functions.'
+6
View File
@@ -0,0 +1,6 @@
LTLIBRARY_NAME = libcalendar.la
LTLIBRARY_SOURCES = calendar.c dow.c french.c gregor.c jewish.c julian.c easter.c cal_unix.c
LTLIBRARY_SHARED_NAME = calendar.la
include $(top_srcdir)/build/dynlib.mk
+1 -5
View File
@@ -127,11 +127,7 @@ PHP_MINIT_FUNCTION(calendar)
REGISTER_LONG_CONSTANT("CAL_MONTH_JULIAN_LONG", CAL_MONTH_JULIAN_LONG, CONST_CS|CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CAL_MONTH_JEWISH", CAL_MONTH_JEWISH, CONST_CS|CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CAL_MONTH_FRENCH", CAL_MONTH_FRENCH, CONST_CS|CONST_PERSISTENT);
/* constants for easter calculation */
REGISTER_LONG_CONSTANT("CAL_EASTER_DEFAULT", CAL_EASTER_DEFAULT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CAL_EASTER_ROMAN", CAL_EASTER_ROMAN, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CAL_EASTER_ALWAYS_GREGORIAN", CAL_EASTER_ALWAYS_GREGORIAN, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CAL_EASTER_ALWAYS_JULIAN", CAL_EASTER_ALWAYS_JULIAN, CONST_CS | CONST_PERSISTENT);
return SUCCESS;
}
+1 -1
View File
@@ -7,5 +7,5 @@ PHP_ARG_ENABLE(calendar,whether to enable calendar conversion support,
if test "$PHP_CALENDAR" = "yes"; then
AC_DEFINE(HAVE_CALENDAR,1,[ ])
PHP_NEW_EXTENSION(calendar, calendar.c dow.c french.c gregor.c jewish.c julian.c easter.c cal_unix.c, $ext_shared)
PHP_EXTENSION(calendar, $ext_shared)
fi
+21 -20
View File
@@ -29,35 +29,36 @@ static void _cal_easter(INTERNAL_FUNCTION_PARAMETERS, int gm)
/* based on code by Simon Kershaw, <webmaster@ely.anglican.org> */
struct tm te;
pval *year_arg;
struct tm *ta, te;
time_t the_time;
long year, golden, solar, lunar, pfm, dom, tmp, easter;
long method = CAL_EASTER_DEFAULT;
/* Default to the current year if year parameter is not given */
{
time_t a;
struct tm b;
time(&a);
php_localtime_r(&a, &b);
year = 1900 + b.tm_year;
}
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
"|ll", &year, &method) == FAILURE) {
return;
switch(ZEND_NUM_ARGS()) {
case 0:
the_time = time(NULL);
ta = localtime(&the_time);
year = ta->tm_year + 1900;
break;
case 1:
if (getParameters(ht, 1, &year_arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(year_arg);
year = Z_LVAL_P(year_arg);
break;
default:
WRONG_PARAM_COUNT;
}
if (gm && (year<1970 || year>2037)) { /* out of range for timestamps */
php_error(E_WARNING, "easter_date() is only valid for years between 1970 and 2037 inclusive");
php3_error(E_WARNING, "easter_date() is only valid for years between 1970 and 2037 inclusive");
RETURN_FALSE;
}
golden = (year % 19) + 1; /* the Golden number */
if ((year <= 1582 && method != CAL_EASTER_ALWAYS_GREGORIAN) ||
(year >= 1583 && year <= 1752 && method != CAL_EASTER_ROMAN && method != CAL_EASTER_ALWAYS_GREGORIAN) ||
method == CAL_EASTER_ALWAYS_JULIAN) { /* JULIAN CALENDAR */
if ( year <= 1752 ) { /* JULIAN CALENDAR */
dom = (year + (year/4) + 5) % 7; /* the "Dominical number" - finding a Sunday */
if (dom < 0) {
dom += 7;
@@ -125,7 +126,7 @@ PHP_FUNCTION(easter_date)
}
/* }}} */
/* {{{ proto int easter_days([int year, [int method]])
/* {{{ proto int easter_days([int year])
Return the number of days after March 21 that Easter falls on for a given year (defaults to current year) */
PHP_FUNCTION(easter_days)
{
-15
View File
@@ -32,19 +32,4 @@ PHP_FUNCTION(cal_info);
#define phpext_calendar_ptr calendar_module_ptr
/*
* Specifying the easter calculation method
*
* DEFAULT is Anglican, ie. use Julian calendar before 1753
* and Gregorian after that. With ROMAN, the cutoff year is 1582.
* ALWAYS_GREGORIAN and ALWAYS_JULIAN force the calendar
* regardless of date.
*
*/
#define CAL_EASTER_DEFAULT 0
#define CAL_EASTER_ROMAN 1
#define CAL_EASTER_ALWAYS_GREGORIAN 2
#define CAL_EASTER_ALWAYS_JULIAN 3
#endif
+8
View File
@@ -0,0 +1,8 @@
# $Id$
LTLIBRARY_NAME = libccvs.la
LTLIBRARY_SOURCES = ccvs.c
LTLIBRARY_SHARED_NAME = ccvs.la
LTLIBRARY_SHARED_LIBADD = $(CCVS_SHARED_LIBADD)
include $(top_srcdir)/build/dynlib.mk
+1 -1
View File
@@ -22,6 +22,6 @@ if test "$PHP_CCVS" != "no"; then
PHP_ADD_INCLUDE($CCVS_DIR/include)
PHP_ADD_LIBRARY_WITH_PATH(ccvs, $CCVS_DIR/lib, CCVS_SHARED_LIBADD)
PHP_NEW_EXTENSION(ccvs, ccvs.c, $ext_shared)
PHP_EXTENSION(ccvs, $ext_shared)
PHP_SUBST(CCVS_SHARED_LIBADD)
fi
+12 -13
View File
@@ -1,28 +1,27 @@
1) Multi-dimenstional array support
-- done 2) IErrorInfo
-- done 13) export VARIANT through the COM module
14) trap exceptions and errors
3) WithEvents
4) Documentation (internal and user) and howtos
5) IEnumVariant::All() which would be like IEnumVariant::Next(IDispatch::Count)
6) Look for memory leaks and AdRef/Release problems - I KNOW there are some...
7) Test component (goes with the docs)
8) Test suite (Needs test component)
9) reduce the need for VARIANT()
10) lets try if we are able to call non IDispatch - only Typelib components
-- delayed till PHP5: 3) WithEvents
-- delayed till PHP5: 9) reduce the need for VARIANT()
ad 6.) check vbsample.php (new VARIANT(*, *|VT_BYREF)) GPs
-- done 2) IErrorInfo
-- done 6) Look for memory leaks and AdRef/Release problems - I KNOW there are some...
-- done 11) IEnumVariant::Next() without parameter should only return an object, not an array with one element
-- done 12) VARIANT->value as lvalue
-- done 13) export VARIANT through the COM module
-- done 14) trap exceptions and errors
-- donne ad 4.) faq (i've collected a few questions from various lists)
ad 6.) check vbsample.php (new VARIANT(*, *|VT_BYREF)) GPs
ad 4.) faq (i've collected a few questions from various lists)
variant attributes !!
to be discussed:
- dcom inporc issue
- mts support (getcontext)
- adsi support (ads* functions)
-- delayed till PHP 5: try serialisation support (if component implements IPersist)
- winapi interface
- try serialisation support (if component implements IPersist)
-1
View File
@@ -660,7 +660,6 @@ PHPAPI int php_variant_to_pval(VARIANT *var_arg, pval *pval_arg, int codepage TS
ZVAL_NULL(pval_arg);
}
}
break;
case VT_DATE: {
+5
View File
@@ -0,0 +1,5 @@
LTLIBRARY_NAME = libcpdf.la
LTLIBRARY_SOURCES = cpdf.c
include $(top_srcdir)/build/dynlib.mk
+2 -2
View File
@@ -9,7 +9,7 @@ AC_ARG_WITH(cpdflib,
AC_MSG_RESULT(no) ;;
yes)
AC_MSG_RESULT(yes)
PHP_NEW_EXTENSION(cpdf, cpdf.c)
PHP_EXTENSION(cpdf)
AC_CHECK_LIB(cpdf, cpdf_open, [AC_DEFINE(HAVE_CPDFLIB,1,[Whether you have cpdflib])],
[AC_MSG_ERROR([Cpdf module requires cpdflib >= 2.])])
PHP_ADD_LIBRARY(cpdf)
@@ -20,7 +20,7 @@ AC_ARG_WITH(cpdflib,
test -f $withval/include/cpdflib.h && CPDFLIB_INCLUDE=$withval/include
if test -n "$CPDFLIB_INCLUDE" ; then
AC_MSG_RESULT(yes)
PHP_NEW_EXTENSION(cpdf, cpdf.c)
PHP_EXTENSION(cpdf)
old_LIBS=$LIBS
old_withval=$withval
-2
View File
@@ -1,4 +1,2 @@
crack
Alexander Feldman
Windows Port:
Joseph Tate
+8
View File
@@ -0,0 +1,8 @@
# $Id$
LTLIBRARY_NAME = libcrack.la
LTLIBRARY_SOURCES = crack.c
LTLIBRARY_SHARED_NAME = crack.la
LTLIBRARY_SHARED_LIBADD = $(CRACK_SHARED_LIBADD)
include $(top_srcdir)/build/dynlib.mk
+1 -1
View File
@@ -26,7 +26,7 @@ if test "$PHP_CRACK" != "no"; then
PHP_ADD_INCLUDE($CRACK_INCLUDEDIR)
PHP_ADD_LIBRARY_WITH_PATH(crack, $CRACK_LIBDIR, CRACK_SHARED_LIBADD)
PHP_NEW_EXTENSION(crack, crack.c, $ext_shared)
PHP_EXTENSION(crack, $ext_shared)
PHP_SUBST(CRACK_SHARED_LIBADD)
AC_DEFINE(HAVE_CRACK, 1, [ ])
fi
-114
View File
@@ -1,114 +0,0 @@
# Microsoft Developer Studio Project File - Name="crack" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=crack - Win32 Release_TS
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "crack.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "crack.mak" CFG="crack - Win32 Release_TS"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "crack - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "crack - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "crack - Win32 Release_TS"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release_TS"
# PROP BASE Intermediate_Dir "Release_TS"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release_TS"
# PROP Intermediate_Dir "Release_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I "..\..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_CRACK" /D ZTS=1 /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D "WIN32" /D "CRACK_EXPORTS" /D "COMPILE_DL_CRACK" /D ZTS=1 /D HAVE_CRACK=1 /D ZEND_DEBUG=0 /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ZEND_WIN32" /D "PHP_WIN32" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x406 /d "NDEBUG"
# ADD RSC /l 0x406 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386
# ADD LINK32 cracklib_Win32.lib wsock32.lib php4ts.lib resolv.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_crack.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline"
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "crack - Win32 Debug_TS"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Debug_TS"
# PROP BASE Intermediate_Dir "Debug_TS"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Debug_TS"
# PROP Intermediate_Dir "Debug_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "mssql-70" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPILE_DL_CRACK" /D ZTS=1 /YX /FD /c
# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CRACK_EXPORTS" /D "COMPILE_DL_CRACK" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_CRACK=1 /FR /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x406 /d "NDEBUG"
# ADD RSC /l 0x406 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib /nologo /dll /machine:I386
# ADD LINK32 cracklib_Win32.lib php4ts_debug.lib resolv.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /debug /machine:I386 /out:"..\..\Debug_TS/php_crack.dll" /libpath:"..\..\Debug_TS"
!ENDIF
# Begin Target
# Name "crack - Win32 Release_TS"
# Name "crack - Win32 Debug_TS"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\crack.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\php_crack.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project
+8
View File
@@ -0,0 +1,8 @@
# $Id$
LTLIBRARY_NAME = libctype.la
LTLIBRARY_SOURCES = ctype.c
LTLIBRARY_SHARED_NAME = ctype.la
LTLIBRARY_SHARED_LIBADD = $(CTYPE_SHARED_LIBADD)
include $(top_srcdir)/build/dynlib.mk
+1 -1
View File
@@ -7,5 +7,5 @@ PHP_ARG_ENABLE(ctype, whether to enable ctype functions,
if test "$PHP_CTYPE" != "no"; then
AC_DEFINE(HAVE_CTYPE, 1, [ ])
PHP_NEW_EXTENSION(ctype, ctype.c, $ext_shared)
PHP_EXTENSION(ctype, $ext_shared)
fi
+1 -1
View File
@@ -84,7 +84,7 @@ ZEND_GET_MODULE(ctype)
PHP_MINFO_FUNCTION(ctype)
{
php_info_print_table_start();
php_info_print_table_row(2, "ctype functions", "enabled");
php_info_print_table_row(2, "ctype functions", "enabled (experimental)");
php_info_print_table_end();
}
/* }}} */
+21 -28
View File
@@ -6,22 +6,17 @@ ctype on strings
--GET--
--FILE--
<?php
setlocale(LC_ALL,"C");
setlocale(LC_ALL,"C");
print "LOCALE is '" . setlocale(LC_ALL,0) . "'\n";
function ctype_test_002($function) {
$n1 = $n2 = $n3 = 0;
// test portable POSIX characters 0..127
for ($a=0;$a<128;$a++) {
$c = chr($a);
if($function($a)) $n1++;
if($function("$c$c$c")) $n2++;
if($function("1-$c$c$c-x")) $n3++;
}
print "$function $n1 $n2 $n3\n";
}
function ctype_test_002($function) {
$n=0; $m=0;
for($a=0;$a<256;$a++) {
$c = chr($a);
if($function("$c$c$c")) $n++;
if($function("1-$c$c$c-x")) $m++;
}
echo "$function $n $m\n";
}
ctype_test_002("ctype_lower");
ctype_test_002("ctype_upper");
ctype_test_002("ctype_alpha");
@@ -33,18 +28,16 @@ ctype_test_002("ctype_print");
ctype_test_002("ctype_punct");
ctype_test_002("ctype_space");
ctype_test_002("ctype_xdigit");
?>
--EXPECT--
LOCALE is 'C'
ctype_lower 26 26 0
ctype_upper 26 26 0
ctype_alpha 52 52 0
ctype_digit 10 10 0
ctype_alnum 62 62 0
ctype_cntrl 33 33 0
ctype_graph 94 94 94
ctype_print 95 95 95
ctype_punct 32 32 0
ctype_space 6 6 0
ctype_xdigit 22 22 0
ctype_lower 26 0
ctype_upper 26 0
ctype_alpha 52 0
ctype_digit 10 0
ctype_alnum 62 0
ctype_cntrl 33 0
ctype_graph 94 94
ctype_print 95 95
ctype_punct 32 0
ctype_space 6 0
ctype_xdigit 22 0
+7
View File
@@ -0,0 +1,7 @@
LTLIBRARY_NAME = libcurl.la
LTLIBRARY_SOURCES = curl.c
LTLIBRARY_SHARED_NAME = curl.la
LTLIBRARY_SHARED_LIBADD = $(CURL_SHARED_LIBADD)
include $(top_srcdir)/build/dynlib.mk
+1 -1
View File
@@ -57,6 +57,6 @@ if test "$PHP_CURL" != "no"; then
$CURL_LIBS -L$CURL_DIR/lib
])
PHP_NEW_EXTENSION(curl, curl.c, $ext_shared)
PHP_EXTENSION(curl, $ext_shared)
PHP_SUBST(CURL_SHARED_LIBADD)
fi
+8 -15
View File
@@ -553,7 +553,7 @@ static void alloc_curl_handle(php_curl **ch)
}
/* }}} */
/* {{{ proto resource curl_init([string url])
/* {{{ proto int curl_init([string url])
Initialize a CURL session */
PHP_FUNCTION(curl_init)
{
@@ -602,7 +602,7 @@ PHP_FUNCTION(curl_init)
}
/* }}} */
/* {{{ proto bool curl_setopt(resource ch, string option, mixed value)
/* {{{ proto bool curl_setopt(int ch, string option, mixed value)
Set an option for a CURL transfer */
PHP_FUNCTION(curl_setopt)
{
@@ -692,14 +692,7 @@ PHP_FUNCTION(curl_setopt)
case CURLOPT_WRITEHEADER:
case CURLOPT_STDERR: {
FILE *fp = NULL;
int type;
void * what;
what = zend_fetch_resource(zvalue TSRMLS_CC, -1, "File-Handle", &type, 1, php_file_le_stream());
ZEND_VERIFY_RESOURCE(what);
if (FAILURE == php_stream_cast((php_stream*)what, PHP_STREAM_AS_STDIO, (void*)&fp, REPORT_ERRORS))
RETURN_FALSE;
ZEND_FETCH_RESOURCE(fp, FILE *, zvalue, -1, "File-Handle", php_file_le_fopen());
if (!fp) {
RETURN_FALSE;
}
@@ -866,7 +859,7 @@ PHP_FUNCTION(curl_setopt)
}
/* }}} */
/* {{{ proto bool curl_exec(resource ch)
/* {{{ proto bool curl_exec(int ch)
Perform a CURL session */
PHP_FUNCTION(curl_exec)
{
@@ -902,7 +895,7 @@ PHP_FUNCTION(curl_exec)
#define CAAD(s, v) add_assoc_double_ex(return_value, s, sizeof(s), v);
#define CAAS(s, v) add_assoc_string_ex(return_value, s, sizeof(s), v, 1);
/* {{{ proto string curl_getinfo(resource ch, int opt)
/* {{{ proto string curl_getinfo(int ch, int opt)
Get information regarding a specific transfer */
PHP_FUNCTION(curl_getinfo)
{
@@ -1002,7 +995,7 @@ PHP_FUNCTION(curl_getinfo)
}
/* }}} */
/* {{{ proto string curl_error(resource ch)
/* {{{ proto string curl_error(int ch)
Return a string contain the last error for the current session */
PHP_FUNCTION(curl_error)
{
@@ -1020,7 +1013,7 @@ PHP_FUNCTION(curl_error)
}
/* }}} */
/* {{{ proto int curl_errno(resource ch)
/* {{{ proto int curl_errno(int ch)
Return an integer containing the last error number */
PHP_FUNCTION(curl_errno)
{
@@ -1037,7 +1030,7 @@ PHP_FUNCTION(curl_errno)
}
/* }}} */
/* {{{ proto void curl_close(resource ch)
/* {{{ proto void curl_close(int ch)
Close a CURL session */
PHP_FUNCTION(curl_close)
{
+5
View File
@@ -0,0 +1,5 @@
LTLIBRARY_NAME = libcybercash.la
LTLIBRARY_SOURCES = cybercash.c
include $(top_srcdir)/build/dynlib.mk
+1 -1
View File
@@ -12,7 +12,7 @@ AC_ARG_WITH(cybercash,
test -f $withval/c-api/mckcrypt.h && MCK_DIR=$withval/c-api
if test -n "$MCK_DIR"; then
AC_MSG_RESULT(yes)
PHP_NEW_EXTENSION(cybercash, cybercash.c)
PHP_EXTENSION(cybercash)
old_LIBS=$LIBS
LIBS="$LIBS -L$MCK_DIR/lib"
AC_CHECK_LIB(mckcrypto,base64_encode,[AC_DEFINE(HAVE_MCK,1,[ ])],
+8
View File
@@ -0,0 +1,8 @@
# $Id$
LTLIBRARY_NAME = libcybermut.la
LTLIBRARY_SOURCES = cybermut.c
LTLIBRARY_SHARED_NAME = cybermut.la
LTLIBRARY_SHARED_LIBADD = $(CYBERMUT_SHARED_LIBADD)
include $(top_srcdir)/build/dynlib.mk
+1 -1
View File
@@ -44,5 +44,5 @@ if test "$PHP_CYBERMUT" != "no"; then
AC_DEFINE(HAVE_CYBERMUT, 1, [ ])
PHP_NEW_EXTENSION(cybermut, cybermut.c, $ext_shared)
PHP_EXTENSION(cybermut, $ext_shared)
fi
+8
View File
@@ -0,0 +1,8 @@
# $Id$
LTLIBRARY_NAME = libcyrus.la
LTLIBRARY_SOURCES = cyrus.c
LTLIBRARY_SHARED_NAME = cyrus.la
LTLIBRARY_SHARED_LIBADD = $(CYRUS_SHARED_LIBADD)
include $(top_srcdir)/build/dynlib.mk
+1 -1
View File
@@ -43,5 +43,5 @@ if test "$PHP_CYRUS" != "no"; then
AC_DEFINE(HAVE_CYRUS,1,[ ])
PHP_NEW_EXTENSION(cyrus, cyrus.c, $ext_shared)
PHP_EXTENSION(cyrus, $ext_shared)
fi
+5
View File
@@ -0,0 +1,5 @@
LTLIBRARY_NAME = libdb.la
LTLIBRARY_SOURCES = db.c
include $(top_srcdir)/build/dynlib.mk
+1 -1
View File
@@ -54,5 +54,5 @@ if test "$PHP_DB" != "no"; then
EXTRA_LIBS="$EXTRA_LIBS $DBM_LIB"
fi
PHP_NEW_EXTENSION(db, db.c)
PHP_EXTENSION(db)
fi
+16 -44
View File
@@ -439,7 +439,6 @@ PHP_FUNCTION(dbmclose)
*/
void php_dbm_close(zend_rsrc_list_entry *rsrc TSRMLS_DC)
{
int ret = 0;
dbm_info *info = (dbm_info *)rsrc->ptr;
DBM_TYPE dbf;
int lockfd;
@@ -491,46 +490,12 @@ PHP_FUNCTION(dbminsert)
RETURN_FALSE;
}
ret = php_dbm_insert(info, Z_STRVAL_P(key), Z_STRVAL_P(value) TSRMLS_CC);
ret = php_dbm_insert_replace(info, Z_STRVAL_P(key), Z_STRVAL_P(value), 0 TSRMLS_CC);
RETURN_LONG(ret);
}
/* }}} */
/* {{{ php_dbm_insert
*/
int php_dbm_insert(dbm_info *info, char *key, char *value TSRMLS_DC) {
datum key_datum, value_datum;
int ret;
DBM_TYPE dbf;
php_stripslashes(key, NULL TSRMLS_CC);
php_stripslashes(value, NULL TSRMLS_CC);
value_datum.dptr = estrdup(value);
value_datum.dsize = strlen(value);
key_datum.dptr = estrdup(key);
key_datum.dsize = strlen(key);
#if GDBM_FIX
key_datum.dsize++;
#endif
dbf = info->dbf;
if (!dbf) {
php_error(E_WARNING, "Unable to locate dbm file");
return 1;
}
ret = DBM_STORE(dbf, key_datum, value_datum, DBM_INSERT);
/* free the memory */
efree(key_datum.dptr); efree(value_datum.dptr);
return(ret);
}
/* }}} */
/* {{{ proto int dbmreplace(int dbm_identifier, string key, string value)
Replaces the value for a key in a dbm database */
PHP_FUNCTION(dbmreplace)
@@ -551,28 +516,31 @@ PHP_FUNCTION(dbmreplace)
RETURN_FALSE;
}
ret = php_dbm_replace(info, Z_STRVAL_P(key), Z_STRVAL_P(value) TSRMLS_CC);
ret = php_dbm_insert_replace(info, Z_STRVAL_P(key), Z_STRVAL_P(value), 1 TSRMLS_CC);
RETURN_LONG(ret);
}
/* }}} */
/* {{{ php_dbm_replace
*/
int php_dbm_replace(dbm_info *info, char *key, char *value TSRMLS_DC)
int php_dbm_insert_replace(dbm_info *info, char *key, char *value, int replace_mode TSRMLS_DC)
{
DBM_TYPE dbf;
int ret;
datum key_datum, value_datum;
key = estrdup(key);
value = estrdup(value);
if (PG(magic_quotes_runtime)) {
php_stripslashes(key, NULL TSRMLS_CC);
php_stripslashes(value, NULL TSRMLS_CC);
}
value_datum.dptr = estrdup(value);
value_datum.dptr = value;
value_datum.dsize = strlen(value);
key_datum.dptr = estrdup(key);
key_datum.dptr = key;
key_datum.dsize = strlen(key);
#if GDBM_FIX
key_datum.dsize++;
@@ -580,12 +548,16 @@ int php_dbm_replace(dbm_info *info, char *key, char *value TSRMLS_DC)
dbf = info->dbf;
if (!dbf) {
php_error(E_WARNING, "Unable to locate dbm file");
return 1;
php_error(E_WARNING, "%s(): Unable to locate dbm file", get_active_function_name(TSRMLS_C));
ret = 1;
} else {
if (!replace_mode) {
ret = DBM_STORE(dbf, key_datum, value_datum, DBM_INSERT);
} else {
ret = DBM_STORE(dbf, key_datum, value_datum, DBM_REPLACE);
}
}
ret = DBM_STORE(dbf, key_datum, value_datum, DBM_REPLACE);
/* free the memory */
efree(key_datum.dptr); efree(value_datum.dptr);
+1 -2
View File
@@ -54,9 +54,8 @@ typedef struct dbm_info {
dbm_info *php_find_dbm(pval *id TSRMLS_DC);
void php_dbm_close(zend_rsrc_list_entry *rsrc TSRMLS_DC);
dbm_info *php_dbm_open(char *filename, char *mode TSRMLS_DC);
int php_dbm_insert(dbm_info *info, char *key, char *value TSRMLS_DC);
char *php_dbm_fetch(dbm_info *info, char *key TSRMLS_DC);
int php_dbm_replace(dbm_info *info, char *key, char *value TSRMLS_DC);
int php_dbm_insert_replace(dbm_info *info, char *key, char *value, int insert_mode TSRMLS_DC);
int php_dbm_exists(dbm_info *info, char *key);
int php_dbm_delete(dbm_info *info, char *key);
char *php_dbm_first_key(dbm_info *info);
+8
View File
@@ -0,0 +1,8 @@
LTLIBRARY_NAME = libdba.la
LTLIBRARY_SOURCES = dba.c dba_cdb.c dba_db2.c dba_dbm.c dba_gdbm.c \
dba_ndbm.c dba_db3.c
LTLIBRARY_SHARED_NAME = dba.la
LTLIBRARY_SHARED_LIBADD = $(DBA_SHARED_LIBADD)
include $(top_srcdir)/build/dynlib.mk
+3 -6
View File
@@ -152,10 +152,7 @@ AC_ARG_WITH(db3,
[ --with-db3[=DIR] Include Berkeley DB3 support],[
if test "$withval" != "no"; then
for i in /usr/local /usr /usr/local/BerkeleyDB.3.0 $withval; do
if test -f "$i/include/db3/db.h"; then
THIS_PREFIX=$i
DB3_EXTRA=db3/db.h
elif test -f "$i/include/db.h" ; then
if test -f "$i/include/db.h" ; then
THIS_PREFIX=$i
DB3_EXTRA=db.h
fi
@@ -165,7 +162,7 @@ AC_ARG_WITH(db3,
AC_DEFINE_UNQUOTED(DB3_INCLUDE_FILE, "$DB3_EXTRA", [ ])
fi
for LIB in db-3 db3 db; do
for LIB in db db-3 db3; do
PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib,[
AC_CHECK_LIB($LIB, db_create, [AC_DEFINE(DBA_DB3,1,[ ]) THIS_LIBS=$LIB])
])
@@ -229,7 +226,7 @@ AC_MSG_CHECKING(whether to enable DBA interface)
if test "$HAVE_DBA" = "1"; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_DBA, 1, [ ])
PHP_NEW_EXTENSION(dba, dba.c dba_cdb.c dba_db2.c dba_dbm.c dba_gdbm.c dba_ndbm.c dba_db3.c, $ext_shared)
PHP_EXTENSION(dba,$ext_shared)
PHP_SUBST(DBA_SHARED_LIBADD)
else
AC_MSG_RESULT(no)
+46 -39
View File
@@ -35,9 +35,9 @@
#define DB2_DATA dba_db2_data *dba = info->dbf
#define DB2_GKEY \
DBT gkey = {0}; \
gkey.data = (char *) key; \
gkey.size = keylen
DBT gkey; \
memset(&gkey, 0, sizeof(gkey)); \
gkey.data = (char *) key; gkey.size = keylen
typedef struct {
DB *dbp;
@@ -53,7 +53,7 @@ DBA_OPEN_FUNC(db2)
struct stat check_stat;
int s = VCWD_STAT(info->path, &check_stat);
type = info->mode == DBA_READER ? DB_UNKNOWN :
type = info->mode == DBA_READER ? DB_UNKNOWN :
info->mode == DBA_TRUNC ? DB_BTREE :
s ? DB_BTREE : DB_UNKNOWN;
@@ -63,73 +63,75 @@ DBA_OPEN_FUNC(db2)
info->mode == DBA_WRITER ? 0 :
info->mode == DBA_TRUNC ? DB_CREATE | DB_TRUNCATE : -1;
if (gmode == -1)
if(gmode == -1)
return FAILURE;
if (info->argc > 0) {
if(info->argc > 0) {
convert_to_long_ex(info->argv[0]);
filemode = Z_LVAL_PP(info->argv[0]);
}
if (db_open(info->path, type, gmode, filemode, NULL, NULL, &dbp)) {
return FAILURE;
if(!db_open(info->path, type, gmode, filemode, NULL, NULL, &dbp)) {
info->dbf = malloc(sizeof(dba_db2_data));
memset(info->dbf, 0, sizeof(dba_db2_data));
((dba_db2_data *) info->dbf)->dbp = dbp;
return SUCCESS;
}
info->dbf = calloc(sizeof(dba_db2_data), 1);
((dba_db2_data *) info->dbf)->dbp = dbp;
return SUCCESS;
return FAILURE;
}
DBA_CLOSE_FUNC(db2)
{
DB2_DATA;
if (dba->cursor)
dba->cursor->c_close(dba->cursor);
if(dba->cursor) dba->cursor->c_close(dba->cursor);
dba->dbp->close(dba->dbp, 0);
free(dba);
}
DBA_FETCH_FUNC(db2)
{
DBT gval = {0};
DBT gval;
char *new = NULL;
DB2_DATA;
DB2_GKEY;
if (dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) {
return NULL;
memset(&gval, 0, sizeof(gval));
if(!dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) {
if(newlen) *newlen = gval.size;
new = estrndup(gval.data, gval.size);
}
if (newlen) *newlen = gval.size;
return estrndup(gval.data, gval.size);
return new;
}
DBA_UPDATE_FUNC(db2)
{
DBT gval = {0};
DBT gval;
DB2_DATA;
DB2_GKEY;
memset(&gval, 0, sizeof(gval));
gval.data = (char *) val;
gval.size = vallen;
if (dba->dbp->put(dba->dbp, NULL, &gkey, &gval,
if(!dba->dbp->put(dba->dbp, NULL, &gkey, &gval,
mode == 1 ? DB_NOOVERWRITE : 0)) {
return FAILURE;
return SUCCESS;
}
return SUCCESS;
return FAILURE;
}
DBA_EXISTS_FUNC(db2)
{
DBT gval = {0};
DBT gval;
DB2_DATA;
DB2_GKEY;
if (dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) {
return FAILURE;
memset(&gval, 0, sizeof(gval));
if(!dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) {
return SUCCESS;
}
return SUCCESS;
return FAILURE;
}
DBA_DELETE_FUNC(db2)
@@ -144,15 +146,15 @@ DBA_FIRSTKEY_FUNC(db2)
{
DB2_DATA;
if (dba->cursor) {
if(dba->cursor) {
dba->cursor->c_close(dba->cursor);
dba->cursor = NULL;
}
dba->cursor = NULL;
#if (DB_VERSION_MAJOR > 2) || (DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR > 6) || (DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR == 6 && DB_VERSION_PATCH >= 4)
if (dba->dbp->cursor(dba->dbp, NULL, &dba->cursor, 0)) {
if(dba->dbp->cursor(dba->dbp, NULL, &dba->cursor, 0)) {
#else
if (dba->dbp->cursor(dba->dbp, NULL, &dba->cursor)) {
if(dba->dbp->cursor(dba->dbp, NULL, &dba->cursor)) {
#endif
return NULL;
}
@@ -164,14 +166,19 @@ DBA_FIRSTKEY_FUNC(db2)
DBA_NEXTKEY_FUNC(db2)
{
DB2_DATA;
DBT gkey = {0}, gval = {0};
DBT gkey, gval;
char *nkey = NULL;
memset(&gkey, 0, sizeof(gkey));
memset(&gval, 0, sizeof(gval));
if (dba->cursor->c_get(dba->cursor, &gkey, &gval, DB_NEXT)
|| !gkey.data)
return NULL;
if (newlen) *newlen = gkey.size;
return estrndup(gkey.data, gkey.size);
if(!dba->cursor->c_get(dba->cursor, &gkey, &gval, DB_NEXT)) {
if(gkey.data) {
nkey = estrndup(gkey.data, gkey.size);
if(newlen) *newlen = gkey.size;
}
}
return nkey;
}
DBA_OPTIMIZE_FUNC(db2)
+6
View File
@@ -0,0 +1,6 @@
# $Source$
# $Id$
define_option with-dba 'dba support?' yesnodir no \
' Whether to build the dba extension.'
+6
View File
@@ -0,0 +1,6 @@
LTLIBRARY_NAME = libdbase.la
LTLIBRARY_SOURCES = dbf_head.c dbf_rec.c dbf_misc.c dbf_ndx.c dbase.c
LTLIBRARY_SHARED_NAME = dbase.la
include $(top_srcdir)/build/dynlib.mk
+1 -1
View File
@@ -9,5 +9,5 @@ PHP_ARG_ENABLE(dbase,whether to enable dbase support,
if test "$PHP_DBASE" = "yes"; then
AC_DEFINE(DBASE,1,[ ])
PHP_NEW_EXTENSION(dbase, dbf_head.c dbf_rec.c dbf_misc.c dbf_ndx.c dbase.c, $ext_shared)
PHP_EXTENSION(dbase, $ext_shared)
fi
+4
View File
@@ -0,0 +1,4 @@
# $Id$ -*- sh -*-
define_option with-dbase 'dBase support? ' yesno no \
' Whether to use the bundled dbase library.'
@@ -1,2 +1,2 @@
mime_magic
dbplus
Hartmut Holzgraefe
+5
View File
@@ -0,0 +1,5 @@
this extension is experimental,
its functions may change their names
or move to extension all together
so do not rely to much on them
you have been warned!
+8
View File
@@ -0,0 +1,8 @@
# $Id$
LTLIBRARY_NAME = libdbplus.la
LTLIBRARY_SOURCES = dbplus.c php_dbplus.c
LTLIBRARY_SHARED_NAME = dbplus.la
LTLIBRARY_SHARED_LIBADD = $(DBPLUS_SHARED_LIBADD)
include $(top_srcdir)/build/dynlib.mk
+3
View File
@@ -0,0 +1,3 @@
experimental db++ extension
for more information on db++ see
http://www.concept-asa.de
+47
View File
@@ -0,0 +1,47 @@
dnl
dnl $Id$
dnl
PHP_ARG_WITH(dbplus, for dbplus support,
[ --with-dbplus Include dbplus support])
if test "$PHP_DBPLUS" != "no"; then
# --with-dbplus -> check with-path
SEARCH_PATH="/usr/dbplus /usr/local/dbplus /opt/dbplus"
SEARCH_FOR="/include/dbconfig.h"
if test -r $PHP_DBPLUS/; then # path given as parameter
DBPLUS_DIR=$PHP_DBPLUS
else # search default path list
AC_MSG_CHECKING(for dbplus files in default path)
for i in $SEARCH_PATH ; do
if test -r $i/$SEARCH_FOR; then
DBPLUS_DIR=$i
AC_MSG_RESULT(found in $i)
fi
done
fi
if test -z "$DBPLUS_DIR"; then
AC_MSG_RESULT(not found)
AC_MSG_ERROR(Please reinstall the dbplus distribution)
fi
# --with-dbplus -> add include path
AC_ADD_INCLUDE($DBPLUS_DIR/include)
# --with-dbplus -> chech for lib and symbol presence
LIBNAME=Ddb
LIBSYMBOL=Db_Init
old_LIBS=$LIBS
LIBS="-L$DBPLUS_DIR/lib -lm -ldl -lDmacc -lDracc"
AC_CHECK_LIB($LIBNAME, $LIBSYMBOL, [AC_DEFINE(HAVE_DBPLUSLIB,1,[ ])],
[AC_MSG_ERROR(wrong dbplus lib version or lib not found)])
LIBS=$old_LIBS
PHP_SUBST(DBPLUS_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $DBPLUS_DIR/lib, DBPLUS_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH(Dmacc, $DBPLUS_DIR/lib, DBPLUS_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH(Dracc, $DBPLUS_DIR/lib, DBPLUS_SHARED_LIBADD)
PHP_EXTENSION(dbplus, $ext_shared)
fi
+247
View File
@@ -0,0 +1,247 @@
/*
+----------------------------------------------------------------------+
| PHP Version 4 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2002 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Hartmut Holzgraefe <hartmut@six.de> |
+----------------------------------------------------------------------+
*/
#include "php.h"
#include "ext/standard/info.h"
#include "php_ini.h"
#include "php_dbplus.h"
#include <saccess.h>
#include <relation.h>
#include <dblight.h>
/* If you declare any globals in php_dbplus.h uncomment this:
ZEND_DECLARE_MODULE_GLOBALS(dbplus)
*/
#ifdef COMPILE_DL_DBPLUS
ZEND_GET_MODULE(dbplus)
#endif
/* {{{ Resource handling */
/* True global resources - no need for thread safety here */
int le_dbplus_relation;
int le_dbplus_tupel;
void dbplus_destruct_relation(zend_rsrc_list_entry *rsrc TSRMLS_DC)
{
relf *conn = (relf *)(rsrc->ptr);
cdb_close(conn);
}
void dbplus_destruct_tupel(zend_rsrc_list_entry *rsrc TSRMLS_DC)
{
tuple *t = (tuple *)(rsrc->ptr);
efree(t);
}
/* }}} */
/* {{{ function table */
/* Every user visible function must have an entry in dbplus_functions[].
*/
function_entry dbplus_functions[] = {
PHP_FE(dbplus_add, NULL)
PHP_FE(dbplus_aql, NULL)
PHP_FE(dbplus_chdir, NULL)
PHP_FE(dbplus_close, NULL)
PHP_FE(dbplus_curr, NULL)
PHP_FE(dbplus_errno, NULL)
PHP_FE(dbplus_errcode, NULL)
PHP_FE(dbplus_find, NULL)
PHP_FE(dbplus_first, NULL)
PHP_FE(dbplus_flush, NULL)
PHP_FE(dbplus_freealllocks, NULL)
PHP_FE(dbplus_freelock, NULL)
PHP_FE(dbplus_freerlocks, NULL)
PHP_FE(dbplus_getlock, NULL)
PHP_FE(dbplus_getunique, NULL)
PHP_FE(dbplus_info, NULL)
PHP_FE(dbplus_last, NULL)
PHP_FE(dbplus_next, NULL)
PHP_FE(dbplus_open, NULL)
PHP_FE(dbplus_prev, NULL)
PHP_FE(dbplus_rchperm, NULL)
PHP_FE(dbplus_rcreate, NULL)
PHP_FE(dbplus_rcrtexact, NULL)
PHP_FE(dbplus_rcrtlike, NULL)
PHP_FE(dbplus_resolve, NULL)
PHP_FE(dbplus_restorepos, NULL)
PHP_FE(dbplus_rkeys, NULL)
PHP_FE(dbplus_ropen, NULL)
PHP_FE(dbplus_rquery, NULL)
PHP_FE(dbplus_rrename, NULL)
PHP_FE(dbplus_rsecindex, NULL)
PHP_FE(dbplus_runlink, NULL)
PHP_FE(dbplus_rzap, NULL)
PHP_FE(dbplus_savepos, NULL)
PHP_FE(dbplus_setindex, NULL)
PHP_FE(dbplus_setindexbynumber, NULL)
PHP_FE(dbplus_sql, NULL)
PHP_FE(dbplus_tcl, NULL)
PHP_FE(dbplus_tremove, NULL)
PHP_FE(dbplus_undo, NULL)
PHP_FE(dbplus_undoprepare, NULL)
PHP_FE(dbplus_unlockrel, NULL)
PHP_FE(dbplus_unselect, NULL)
PHP_FE(dbplus_update, NULL)
PHP_FE(dbplus_xlockrel, NULL)
PHP_FE(dbplus_xunlockrel, NULL)
{NULL, NULL, NULL} /* Must be the last line in dbplus_functions[] */
};
/* }}} */
/* {{{ module entry */
zend_module_entry dbplus_module_entry = {
STANDARD_MODULE_HEADER,
"dbplus",
dbplus_functions,
PHP_MINIT(dbplus),
PHP_MSHUTDOWN(dbplus),
PHP_RINIT(dbplus), /* Replace with NULL if there's nothing to do at request start */
PHP_RSHUTDOWN(dbplus), /* Replace with NULL if there's nothing to do at request end */
PHP_MINFO(dbplus),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
/* }}} */
/* {{{ ini parameters */
/* Remove comments and fill if you need to have entries in php.ini
PHP_INI_BEGIN()
PHP_INI_END()
*/
/* }}} */
/* {{{ module init */
PHP_MINIT_FUNCTION(dbplus)
{
/* resource id for cdb connections */
le_dbplus_relation = zend_register_list_destructors_ex(dbplus_destruct_relation, NULL, "dbplus_relation", module_number);
le_dbplus_tupel = zend_register_list_destructors_ex(dbplus_destruct_tupel , NULL, "dbplus_tuple" , module_number);
/* constants for DBPLUS error codes */
REGISTER_LONG_CONSTANT("DBPLUS_ERR_NOERR", ERR_NOERR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_DUPLICATE", ERR_DUPLICATE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_EOSCAN", ERR_EOSCAN, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_EMPTY", ERR_EMPTY, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_CLOSE", ERR_CLOSE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_WLOCKED", ERR_WLOCKED, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_LOCKED", ERR_LOCKED, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_NOLOCK", ERR_NOLOCK, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_READ", ERR_READ, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_WRITE", ERR_WRITE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_CREATE", ERR_CREATE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_LSEEK", ERR_LSEEK, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_LENGTH", ERR_LENGTH, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_OPEN", ERR_OPEN, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_WOPEN", ERR_WOPEN, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_MAGIC", ERR_MAGIC, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_VERSION", ERR_VERSION, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_PGSIZE", ERR_PGSIZE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_CRC", ERR_CRC, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_PIPE", ERR_PIPE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_NIDX", ERR_NIDX, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_MALLOC", ERR_MALLOC, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_NUSERS", ERR_NUSERS, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_PREEXIT", ERR_PREEXIT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_ONTRAP", ERR_ONTRAP, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_PREPROC", ERR_PREPROC, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_DBPARSE", ERR_DBPARSE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_DBRUNERR", ERR_DBRUNERR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_DBPREEXIT", ERR_DBPREEXIT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_WAIT", ERR_WAIT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_CORRUPT_TUPLE", ERR_CORRUPT_TUPLE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_WARNING0", ERR_WARNING0, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_PANIC", ERR_PANIC, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_FIFO", ERR_FIFO, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_PERM", ERR_PERM, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_TCL", ERR_TCL, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_RESTRICTED", ERR_RESTRICTED, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_USER", ERR_USER, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_UNKNOWN", ERR_UNKNOWN, CONST_CS | CONST_PERSISTENT);
return SUCCESS;
}
/* }}} */
/* {{{ module shutdown */
PHP_MSHUTDOWN_FUNCTION(dbplus)
{
return SUCCESS;
}
/* }}} */
/* {{{ request init */
/* Remove if there's nothing to do at request start */
PHP_RINIT_FUNCTION(dbplus)
{
return SUCCESS;
}
/* }}} */
/* {{{ request shutdown */
/* Remove if there's nothing to do at request end */
PHP_RSHUTDOWN_FUNCTION(dbplus)
{
return SUCCESS;
}
/* }}} */
/* {{{ module information */
PHP_MINFO_FUNCTION(dbplus)
{
php_info_print_table_start();
php_info_print_table_header(2, "dbplus support", "enabled");
php_info_print_table_end();
/* Remove comments if you have entries in php.ini
DISPLAY_INI_ENTRIES();
*/
}
/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
File diff suppressed because it is too large. Load diff
Loaded 100 of 926 files, more files were not shown because too many files have changed in this diff. Show more