Compare commits

..
1120 Commits
Author SHA1 Message Date
SVN Migration e0411a0187 This commit was manufactured by cvs2svn to create tag 'php_4_4_0'. 2005-07-11 07:45:15 +00:00
Derick Rethans 7902154f46 - Go with 4.4.0. 2005-07-11 07:45:14 +00:00
Derick Rethans 44bf966ae7 - MFH: Fixed memory corruption in pg_copy_from() in case the as_null parameter
was passed. (Derick)
2005-07-05 12:50:03 +00:00
Edin Kadribasic caf18b2bfa BFN: now in the correct place :) 2005-07-02 23:07:50 +00:00
Edin Kadribasic a55d32948b BFN 2005-07-02 23:05:37 +00:00
Edin Kadribasic f5d89321e8 MFH 2005-07-02 22:53:11 +00:00
Derick Rethans 201569c7f9 - Back to -dev 2005-07-01 10:05:42 +00:00
Derick Rethans 7e1fa145ee - GO with RC2. 2005-07-01 09:54:01 +00:00
Pierre Joye d5a7368d72 - really remove xmp-rpc 1.2.2 2005-07-01 09:48:53 +00:00
Pierre Joye 97073a0517 - remove xml_rpc 1.2.2 (step #2)
- add 1.3.1 archive (step #3)
2005-07-01 09:42:15 +00:00
Pierre Joye e6dd1bee42 - update xmp_rpc to 1.3.1 (step #1/3) 2005-07-01 09:41:04 +00:00
Derick Rethans 2be36d43e8 - Added missing .cvsignore. 2005-07-01 09:35:18 +00:00
Derick Rethans cacba2613e - Backport config.m4 from HEAD so that pg_config can be used. 2005-07-01 09:10:14 +00:00
Stefan Esser b10466c3ee MFH: Also check FTP password 2005-06-27 08:27:23 +00:00
Holger Zimmermann 313ace007d Replaced PCHAR by CHAR * (not defined in pi3web_sapi header) 2005-06-26 09:17:40 +00:00
Dmitry Stogov 8301424d57 Fixed bug #28377 (debug_backtrace is intermittently passing args) 2005-06-23 12:21:01 +00:00
foobar 7d96c874b9 MFH 2005-06-21 13:07:40 +00:00
Dmitry Stogov fc4dabbbf6 Fixed bug #31213 (Sideeffects caused by fix of bug #29493) 2005-06-21 12:11:19 +00:00
Antony Dovgal 10a123f2f8 MFH: reorder and prevent memleak: bailout after free() 2005-06-20 19:59:43 +00:00
foobar 490617c780 fix VPATH testing (partial MFH) 2005-06-18 22:54:07 +00:00
foobar 97e89bfb82 BFN 2005-06-18 18:58:55 +00:00
foobar 317c7ae225 MFH 2005-06-18 18:55:12 +00:00
foobar a29aa6577d MFH 2005-06-17 16:23:04 +00:00
Dmitry Stogov a07fe81c38 Fixed bug #31402 (unserialize creates a field containing a reference when it should not) 2005-06-17 13:52:58 +00:00
foobar 1b9a2471bd MFH 2005-06-15 17:13:52 +00:00
Edin Kadribasic fd6a541974 MSVC++ 6.0 doesn't support long long type 2005-06-13 19:32:15 +00:00
Derick Rethans a0207767c4 - Back to dev 2005-06-13 14:34:26 +00:00
Derick Rethans ba7a46ba54 - Go with 4.4.0RC1. 2005-06-13 14:23:34 +00:00
foobar d233c60165 touch 2005-06-13 14:14:39 +00:00
Derick Rethans 093bc03fd5 - MFH: Fixed bug with unserialize() with "exotic" letters in class names 2005-06-13 14:13:11 +00:00
Antony Dovgal 450348fd7a MFH:
destroy session after destroying error handle
SQLT_CHR is allowed too
2005-06-13 09:37:57 +00:00
foobar 13f4cdcca7 MFH 2005-06-12 01:15:43 +00:00
foobar f4058a30fa Revert. re2c 0.9.7 obviously does not work properly (or our .re files are buggy) 2005-06-11 23:55:39 +00:00
foobar d3b74b0ec5 regenerated with re2c 0.9.7 2005-06-11 20:21:50 +00:00
foobar ddf0954eec MFH 2005-06-10 12:35:00 +00:00
Ilia Alshanetsky 544beecc55 MFH: Fixed compiler warning. 2005-06-09 16:13:34 +00:00
Dmitry Stogov 780b300fcf Fixed bug #25922 (In error handler, modifying 5th arg (errcontext) may result in seg fault) 2005-06-09 10:14:38 +00:00
Dmitry Stogov a82e35c290 Fixed memory allocation bugs in array_reduce() with initial value (#22463 & #24980) 2005-06-08 19:55:01 +00:00
foobar eb43932fb1 MFH 2005-06-08 10:34:41 +00:00
foobar 63626d1c68 MFH 2005-06-07 21:57:13 +00:00
foobar 3dc32f41a9 MFH 2005-06-07 21:40:36 +00:00
foobar 4d83ad6282 MFH 2005-06-07 17:23:12 +00:00
Derick Rethans 1a3b493d9a - MFH: Added the --disable-zend-memory-manager switch to disable the Zend
memory manager.
#- I discussed this with Dmitry today - we found it useful.
2005-06-07 13:37:33 +00:00
Derick Rethans 858745ddf9 - Fixed bug #32685, #29423 (Segfault when using assignment by reference within
function).
2005-06-07 09:57:44 +00:00
Ilia Alshanetsky a17e5fe163 MFH: Better storage size for output length. 2005-06-06 16:31:08 +00:00
Ilia Alshanetsky 44518f05f8 MFH: Fixed strval to not print notices on strval(array()). 2005-06-06 12:50:57 +00:00
Derick Rethans d1602669bc - MFH: Fixed bug #33242 (Mangled error message when stream fails). 2005-06-06 12:42:51 +00:00
Derick Rethans 76d392d3a9 - We've man pages just fine 2005-06-06 11:24:16 +00:00
Derick Rethans 94a2ab1990 - Update NEWS with the bz fix 2005-06-06 11:07:55 +00:00
Uwe Schindler ada89376b4 MFH: Fix bug #33166 for other branches and new bug #33255, no man pages for 4.4 2005-06-06 11:06:22 +00:00
Derick Rethans c479074f98 - Merge back changes which where in 4.3 but somehow didn't make it into the new
branch.
2005-06-06 10:59:47 +00:00
Edin Kadribasic e5788c2eb7 Sync with recent config.m4 changes 2005-06-06 09:38:53 +00:00
Derick Rethans 4f64bc6cfe - Commit the reference problem bug fix. 2005-06-06 09:30:09 +00:00
Derick Rethans 94801d1206 - Rename version. 2005-06-06 09:23:58 +00:00
SVN Migration 0cf43df604 This commit was manufactured by cvs2svn to create branch 'PHP_4_4'. 2005-06-02 21:32:50 +00:00
foobar a4ecfdb08c MFH: - Fixed bug #28605 (Need to use -[m]ieee option for Alpha CPUs) 2005-06-02 21:32:49 +00:00
Antony Dovgal 1a733ccbdd MFH: fix bug #33222 (segfault when CURL handle is closed in a callback). 2005-06-02 21:05:06 +00:00
Antony Dovgal 473e88e574 MFH: fix bug #33214 (odbc_next_result does not signal SQL errors with 2-statement SQL batches).
Path by rich at kastle dot com.
2005-06-02 15:42:58 +00:00
Derick Rethans 5955cb64bb - That should have been removed, not commented out. 2005-06-02 08:50:52 +00:00
Derick Rethans 0d3b976c03 - MFH: Fixed memory corruption in stristr(). 2005-06-02 08:31:38 +00:00
Ilia Alshanetsky a02c9cf4f1 MFH: Fixed bug #33210 (relax jpeg recursive loop protection). 2005-06-01 22:29:20 +00:00
foobar ca66964530 MFH: - Fixed bug #33200 (preg_replace(): magic_quotes_sybase=On makes 'e' modifier misbehave) 2005-05-31 12:56:00 +00:00
foobar b73fec0d9f MFH 2005-05-31 12:22:27 +00:00
Andrei Zmievski 1233878300 Upgrade PCRE library to 5.0. 2005-05-27 18:12:43 +00:00
Andrei Zmievski 7cb6bc0d50 MFH 2005-05-26 21:49:04 +00:00
Ilia Alshanetsky b57e6a484a MFH: Added scheme validation for parse_url(). 2005-05-26 03:56:45 +00:00
Andrei Zmievski 0943b7909a MFH (pcre cache flush) 2005-05-24 21:12:16 +00:00
Antony Dovgal 6305213066 MFH: make it compile on Win32 2005-05-24 10:14:16 +00:00
Ilia Alshanetsky 04d0a78649 MFH: Fixed bug #32810 (temporary files not using plain file wrapper). 2005-05-23 21:51:00 +00:00
Antony Dovgal 64ddf44bd5 revert by Wez's request 2005-05-23 15:37:29 +00:00
Antony Dovgal 1650db955c MFH: fix bug #32810 (fread after tmpfile() reads only 8192 bytes) 2005-05-23 11:52:44 +00:00
Antony Dovgal 4e03cdce32 MFH: fix test 2005-05-23 11:39:05 +00:00
foobar 8a6bb7e993 MFH: Upgrade bundled shtool to 2.0.1 2005-05-23 09:46:32 +00:00
foobar 0031c498a3 MFH: - Fixed bug #33017 ("make distclean" gives an error with VPATH build). 2005-05-23 09:43:59 +00:00
Ilia Alshanetsky add1f2f783 MFH: Fixed bug #29338 (unencoded spaces get ignored after certain tags). 2005-05-22 16:45:41 +00:00
Antony Dovgal cd98638298 MFH: fix compile warning 2005-05-22 12:59:29 +00:00
Rasmus Lerdorf dd5c63bc18 Fixed bug #33072 - Add a safemode/open_basedir check for runtime save_path
change
2005-05-21 19:46:34 +00:00
Grant Croker 50292aaff9 - Fixed bug #30593 (--with-ingres option generates broken Makefile). 2005-05-20 15:57:13 +00:00
Derick Rethans 456eba04a2 Update NEWS 2005-05-20 11:15:33 +00:00
Derick Rethans 379c4af44a - Fixed bug #33013: "next month" was done wrong. 2005-05-20 11:13:14 +00:00
Antony Dovgal e5f04e5d2f MFH: fix bug #32944 (Disabling session.use_cookies doesn't prevent reading session cookies) 2005-05-20 10:28:35 +00:00
foobar 30d0600769 reorder 2005-05-20 06:36:56 +00:00
Rasmus Lerdorf f0a7020898 NEWS file update for Jani 2005-05-19 16:16:44 +00:00
Rasmus Lerdorf bb9223391e Fix for bug #33057 - Don't send extraneous entity-headers on a 304 as per
RFC 2616 section 10.3.5
2005-05-19 16:14:46 +00:00
Ilia Alshanetsky f4a39b5314 Fixed bug #32802 (broken MFH) 2005-05-17 18:42:35 +00:00
Antony Dovgal 75a3ee0284 MFH: gdImageGifCtx() is always available in bundled lib 2005-05-17 12:23:09 +00:00
Antony Dovgal 4c5d775dd1 MFH: fix bug #32742 (segmentation fault when the stream with a wrapper is not closed) 2005-05-16 08:55:31 +00:00
Antony Dovgal 804d8f2183 MFH: fix bug #29975 (memory leaks when set_error_handler() is used inside error handler) 2005-05-13 23:11:17 +00:00
Rasmus Lerdorf e48af012eb I am reverting this patch:
http://cvs.php.net/diff.php/php-src/main/php_variables.c?r1=1.45.2.9&r2=1.45.2.10&ty=u

It consistently causes this segfault:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 2837)]
0x405313ff in zend_hash_find (ht=0x8266682, arKey=0x8266660 "fud_session_1109269364_referer_id", nKeyLength=34, pData=0x0)
    at /home/rasmus/php43/Zend/zend_hash.c:897
897                                     *pData = p->pData;
(gdb) bt
#0  0x405313ff in zend_hash_find (ht=0x8266682, arKey=0x8266660 "fud_session_1109269364_referer_id", nKeyLength=34, pData=0x0)
    at /home/rasmus/php43/Zend/zend_hash.c:897
#1  0x4050c39c in php_register_variable_ex (var=0x8266660 "fud_session_1109269364_referer_id", val=0xbffff730, track_vars_array=0x823e908)
    at /home/rasmus/php43/main/php_variables.c:201
#2  0x4050c031 in php_register_variable_safe (var=0x823e908 "?m\031\b", strval=0x0, str_len=0, track_vars_array=0x823e908)
    at /home/rasmus/php43/main/php_variables.c:56
#3  0x4050c6fb in php_default_treat_data (arg=2, str=0x0, destArray=0x823e908) at /home/rasmus/php43/main/php_variables.c:318
#4  0x40502af2 in php_hash_environment () at /home/rasmus/php43/main/main.c:1442
#5  0x4050187f in php_request_startup () at /home/rasmus/php43/main/main.c:936
#6  0x4053e746 in apache_php_module_main (r=0x818c894, display_source_mode=0) at /home/rasmus/php43/sapi/apache/sapi_apache.c:33
#7  0x4053f1e9 in send_php (r=0x818c894, display_source_mode=0, filename=0x0) at /home/rasmus/php43/sapi/apache/mod_php4.c:621
#8  0x4053f36d in send_parsed_php (r=0x823e908) at /home/rasmus/php43/sapi/apache/mod_php4.c:636
2005-05-13 05:27:14 +00:00
Antony Dovgal a570698425 MFH: fix #33019 (socket errors cause memory leaks in php_strerror())
patch by jwozniak23 at poczta dot onet dot pl
2005-05-12 16:27:22 +00:00
Antony Dovgal 4ca2a45a0c use & and check for the right value of result_type
btw, nobody noticed that result_type wasn't ever working in 4.3, because it was absent in parse_params()..
also, I prefer "Tony" just for uniformity =)
2005-05-10 23:15:06 +00:00
foobar 0d12de2d75 Tony or Antony? :) 2005-05-10 21:47:11 +00:00
Antony Dovgal 180e1501bb MFH: fix #32904 (pg_get_notify() ignores result_type parameter) 2005-05-10 20:14:11 +00:00
foobar d6597ad37d - Fixed bugs #32800, #32830 (ext/odbc: Problems with 64bit systems) 2005-05-10 13:21:36 +00:00
foobar 295719fa32 Revert the memleak fix due to net-snmp oddity (see also bug #32613) 2005-05-10 11:21:19 +00:00
Georg Richter 6e516e2214 fix for bug #32116 (mysql compressed connection doesn't work under win) 2005-05-09 17:45:50 +00:00
foobar e213ff37c3 MFH: - getlogin() / getgroups() are not necessarily available everywhere 2005-05-09 12:16:19 +00:00
foobar ae85316906 Remove dos crap 2005-05-09 07:08:42 +00:00
foobar 79cbb4b143 MFH: - Fixed putenv() under win32 (see bug #32957) 2005-05-08 19:50:39 +00:00
Rasmus Lerdorf fcfd9f78ab Oops, wrong place. It was in the logo stuff instead. 2005-05-08 17:20:57 +00:00
Rasmus Lerdorf 0b7fbabd80 Let's not XSS ourself at least 2005-05-08 17:09:24 +00:00
foobar 49b5d46a76 MFH: - Fixed bug #32932 (Oracle LDAP: ldap_get_entries invalid pointer)
# also partial sync with HEAD (just some ws/cs changes)
2005-05-08 16:06:25 +00:00
Wez Furlong 01ee1225dc Fix #32974 2005-05-07 14:55:39 +00:00
Rasmus Lerdorf c227ea05c4 Fix what I assume was a typo 2005-05-07 09:25:31 +00:00
Ilia Alshanetsky 6b582b2c85 MFH: Check ftp user name for control characters. 2005-05-06 18:43:31 +00:00
Antony Dovgal 91f96ef1d7 MFH: fix off-by-one in _php_image_output()
and prevent such errors in php_do_open_temporary_file()
2005-05-06 16:51:54 +00:00
Ilia Alshanetsky 394662b4a2 MFH: Fixed bug #32936 (http redirects URLs are not checked for control chars). 2005-05-06 02:19:04 +00:00
Ilia Alshanetsky 65af72474e Bug fixing news. 2005-05-03 01:30:19 +00:00
Pierre Joye 0512d70c33 - MFH (#32893, imagettf crashes)
uses long for zval
2005-05-02 09:39:26 +00:00
Pierre Joye 2253f7dbf7 - #32891, init old y positions to non possible values. -1 being used if the
center start a (x,0)
2005-05-01 05:45:55 +00:00
foobar c006bbb006 MFH: - Fix problems with phpized ext/imap 2005-04-30 09:31:09 +00:00
foobar a4f461f9df MFH: - Added man pages for "phpize" and "php-config" scripts. (Jakub Vrana) 2005-04-30 04:28:24 +00:00
foobar 681c35bc17 MFH 2005-04-30 04:12:24 +00:00
foobar 58ba05c901 MFH: Moved phpextdist to dev/ 2005-04-30 03:02:10 +00:00
foobar 5b6edac5bc MFH 2005-04-28 14:24:47 +00:00
Antony Dovgal 49470fdc74 MFH: handle unsupported datatypes and prevent segfault 2005-04-28 14:13:08 +00:00
foobar 3f573827c2 MFH 2005-04-28 13:14:46 +00:00
Rob Richards 2f69536e0e BFN 2005-04-28 12:20:13 +00:00
Rob Richards fbf441a447 MFH: Fix bug #32245 (xml_parser_free() in function assigned to the xml parser
gives a segfault)
2005-04-28 12:19:38 +00:00
foobar 58a6e8f921 MFH 2005-04-27 23:27:53 +00:00
Andrey Hristov c9a701c4d1 change names 2005-04-27 21:22:18 +00:00
Ilia Alshanetsky e000385d10 MFH: Fixed bug #32813 (parse_url() does not handle scheme-only urls properly). 2005-04-25 23:49:27 +00:00
foobar 4be5f46e50 MFH: Revert. Nokia didn't pay me enough. :) 2005-04-25 21:22:48 +00:00
Stanislav Malyshev 218f2b42e0 rm unneeded 2005-04-25 12:04:35 +00:00
Stanislav Malyshev 3158315a54 fix for #32773 2005-04-25 12:03:53 +00:00
Stanislav Malyshev cc83a160ee Fix #32773 and made right fix for GMP FPEs 2005-04-25 12:03:27 +00:00
Stanislav Malyshev ba9ef20412 add test 2005-04-25 11:18:44 +00:00
Dmitry Stogov 1296a72aff Test case fnd news entriey for bug #29944 2005-04-25 10:51:39 +00:00
Stanislav Malyshev 3c7723a674 Remove broken fix - second operand of GMP operation certainly can be 0 in general case 2005-04-25 10:21:58 +00:00
Dmitry Stogov e3c797aed4 Fixed call to estrndup() with invalid length 2005-04-25 06:14:50 +00:00
Ilia Alshanetsky 44a7348d22 MFH: Fixed bug #32802 (General cookie overrides more specific cookie). 2005-04-24 18:10:30 +00:00
foobar a67ec786cc typo 2005-04-23 23:57:40 +00:00
foobar fbd807a7b8 MFH: fix memleak 2005-04-23 21:15:39 +00:00
foobar 95c6aa35c7 MFH: - Fixed bug #32111 (Cookies can also be separated by colon) 2005-04-23 20:34:15 +00:00
Joe Orton 362db6cec6 MFH: Fixed bug #32797 (invalid C code in xmlrpc extension). 2005-04-22 11:57:53 +00:00
Antony Dovgal ba4e292b20 add missing entries in .cvsignore 2005-04-22 09:22:23 +00:00
Antony Dovgal 7c33078b31 fix C++ comments 2005-04-22 09:21:49 +00:00
Andrey Hristov 5393ff76f4 MFH
introduce INT_MAX and INT_SIZE
#would be wonderful if the doc team takes care of that
#defined since 4.3.12, missing in 5.0.0-5.0.4, available in 5.0.5+
2005-04-22 07:27:45 +00:00
Masaki Fujimoto 588fc6e846 - MFH: Fix mbfl_encoding_detector_feed() and mbfl_mbfl_identify_encoding() behaviour 2005-04-22 05:03:38 +00:00
foobar 1c32084d9d MFH 2005-04-21 23:02:23 +00:00
foobar 078f3abb05 MFH: - Fixed bug #32647 (Using register_shutdown_function() with invalid callback can crash PHP) 2005-04-21 14:47:13 +00:00
foobar 8fe6e70d72 Fix test 2005-04-21 14:38:27 +00:00
foobar 6567ab4932 MFH: Added test for bug #32647 2005-04-21 14:18:51 +00:00
Brian France a9c0b4eaa6 MFH: Added support for .cc files in extensions. 2005-04-20 20:51:45 +00:00
foobar cd387e3f9a MFH 2005-04-19 22:06:50 +00:00
foobar 8fd7c98196 MFH: - Remove relic 2005-04-17 13:37:29 +00:00
foobar 52105b88b4 - Fixed bug #32730 (ext/crack.c fails to compile with cracklib-2.8.3) 2005-04-17 13:27:18 +00:00
foobar 0bf8ea8b03 MFH: - Fixed bug #31887 (ISAPI: Custom 5xx error does not return correct HTTP response message) 2005-04-17 03:39:39 +00:00
foobar 35b7a1e3f7 retype 2005-04-16 12:25:36 +00:00
foobar 89347c7c20 typofix 2005-04-16 12:15:48 +00:00
Uwe Schindler bd36484d85 MFH: use streams api for md5_file() and sha1_file() 2005-04-16 09:49:53 +00:00
foobar 73bc800428 MFH 2005-04-15 22:25:29 +00:00
foobar 6b38c14911 MFH 2005-04-15 22:20:43 +00:00
foobar 626d78118d MFH: - Use correct type (bug #32720) 2005-04-15 22:08:43 +00:00
Uwe Schindler a9c24d9728 correct copy/paste problem 2005-04-15 09:44:45 +00:00
Uwe Schindler 9cfdc3a4da correct copy/paste problem 2005-04-15 09:24:45 +00:00
Uwe Schindler 080e6fd89f MFH: fix various solaris problems by replacing stdio with posix io where possible 2005-04-15 09:15:03 +00:00
foobar 7f1754653c - Regenerated with re2c 0.9.6 (fixes severe bugs) 2005-04-14 22:41:39 +00:00
foobar 7f84c5e32b MFH: - Add support for latest Birdstep 2005-04-14 21:17:49 +00:00
foobar 7e4495a66f BFN 2005-04-14 15:48:38 +00:00
foobar 2e63e4f923 MFH: Fixes & cleanup + some minor new features 2005-04-14 15:41:50 +00:00
Ilia Alshanetsky 2745fef293 Fixed bug #31583 (php_std_date() uses short day names in non-y2k_compliance
mode).

Patch by: mike at php dot net
2005-04-14 13:30:27 +00:00
Antony Dovgal febe0e0caf MFH: disable pg_cmdtuples() too, if there is no pg_affected_rows() 2005-04-13 22:12:06 +00:00
Derick Rethans c1e9d3433d - Fixed bug #32699 (pg_affected_rows() was defined when it was not available). 2005-04-13 21:27:35 +00:00
Antony Dovgal e58545fde9 MFH: add testcase for bug #30833 2005-04-13 08:24:12 +00:00
Moriyoshi Koizumi 40d6477fe5 - MFH: commit the pending patch (bug #32311). 2005-04-13 08:08:28 +00:00
Frank M. Kromann e681512beb MFH: Fix for #32682. Error on module shutdown when called from activescript 2005-04-12 17:46:45 +00:00
foobar b3acf2c5c4 MFH: - Fixed bug #32587 (Apache2: errors sent to error_log do not include timestamps)
# Also nuked the deprecated APLOG_NOERRNO's
2005-04-08 20:35:02 +00:00
foobar 2ed05398fc regenerated with re2c 0.9.4 2005-04-08 20:18:21 +00:00
foobar a5fa2525c8 typo 2005-04-08 20:17:41 +00:00
foobar 4ee1f9830d Missing $Id$ tag 2005-04-08 20:16:41 +00:00
Ilia Alshanetsky 3aaec591c2 MFH: Missing part of the patch for bug #32589 2005-04-08 15:04:52 +00:00
foobar 5ccc67cc8a MFH: for the s*printf* stuff 2005-04-08 13:37:53 +00:00
foobar 2b865616f1 MFH and Fixes bug #32482 (ap_php_snprintf broken) 2005-04-08 05:44:53 +00:00
Jon Parise 03aa84f955 MFH 1.36: Spell "overridden" correctly. 2005-04-07 23:33:50 +00:00
foobar 83b353de2c BFN 2005-04-07 22:24:21 +00:00
foobar 0a9d87e630 - Fixed bug #32591 (ext/mysql: Unsatisfied symbol: ntohs with HP-UX) 2005-04-07 22:23:01 +00:00
foobar 4942272466 MFH 2005-04-07 22:04:26 +00:00
foobar 001a39d7fb MFH 2005-04-07 20:49:01 +00:00
Uwe Schindler 85a028b891 Bug #32614 - prevent from crahsing with segfault on solaris if fdopen() fails - this fixes NOT the stdio-problem on solaris! 2005-04-07 07:28:08 +00:00
foobar 9a6cf59744 MFH 2005-04-06 22:16:11 +00:00
Antony Dovgal 6dce4e78ab MFH: remove proto 2005-04-05 20:32:01 +00:00
Ilia Alshanetsky 6f871656df MFH: Fixed bug #32589 (Possible crash inside imap_mail_compose, with charsets). 2005-04-05 14:49:10 +00:00
Sara Golemon a4d454fdcf MFH rev 1.72 (of main/streams/streams.c) 2005-04-04 20:26:49 +00:00
foobar 782736f277 update 2005-04-04 18:53:47 +00:00
Antony Dovgal 7350e8b884 fix #32567 (ext/gmp fails to compile with thread safety enabled) 2005-04-04 16:30:42 +00:00
Uwe Schindler 34486b7aae Bug #32491 (File upload error - unable to create a temporary file) - Changing file upload from stdio to posix 2005-04-04 14:59:58 +00:00
Ilia Alshanetsky fbdc2a9d10 MFH: Fixed bug #32530 (chunk_split() does not append endstr if chunklen is
longer then the original string).
2005-04-03 18:09:55 +00:00
Antony Dovgal a384315b3a MFH: fix typo 2005-04-03 13:06:58 +00:00
Antony Dovgal 68e170bec8 MFH: fix output_reset_rewrite_vars() returning false 2005-04-03 12:20:51 +00:00
foobar 34a310de8c - Sync with HEAD:
. php_error -> php_error_docref (fixes test)
  . pval -> zval
  . use modern parameter parsing
# No new functionality was added!
2005-04-03 11:39:43 +00:00
foobar 430b4a6531 MFH 2005-04-03 11:18:05 +00:00
Greg Beaver d7d721c96c allow local install, remove -n switch 2005-04-02 23:52:12 +00:00
foobar 50a7757f0c MFH 2005-04-02 23:19:53 +00:00
foobar e528918061 MFH 2005-04-02 23:04:41 +00:00
foobar 40ebf7dbc1 - Fixed bug #32538 (ext/swf/swf.c does not compile with gcc-3.4.x or newer) 2005-04-02 06:03:14 +00:00
foobar 70a222560d MFH: Added SORT_LOCALE_STRING for array sorting 2005-03-31 08:18:40 +00:00
foobar 71e6b9e504 MFH: c++ fix 2005-03-31 07:40:30 +00:00
Ilia Alshanetsky 8b06c5cda1 back to dev. 2005-03-30 22:10:25 +00:00
Ilia Alshanetsky 9b736b4d22 Tag 4.3.11 2005-03-30 14:18:37 +00:00
Edin Kadribasic 22d260995e Updated install instructions from the documentation project (Philip Olson) 2005-03-30 13:15:34 +00:00
Ilia Alshanetsky 547fa41064 patch was reverted. 2005-03-29 17:32:18 +00:00
Greg Beaver ff707e14e2 update to current bundle ideal 2005-03-28 17:02:29 +00:00
Greg Beaver 152fdf118a merge in PEAR 1.3.5 2005-03-28 16:57:01 +00:00
Ilia Alshanetsky 0674cfae43 MFH: revert copy patch. 2005-03-27 15:53:59 +00:00
Moriyoshi Koizumi 3ae4e31064 - Temporary reversion as per release masters' requests. 2005-03-23 23:57:42 +00:00
Moriyoshi Koizumi fd423c6b1d - Reorder. 2005-03-23 23:32:12 +00:00
Moriyoshi Koizumi db52703bc2 - MFH: fix bug #32311 (mb_encode_mimeheader() does not properly escape
characters).
2005-03-23 23:30:18 +00:00
Ilia Alshanetsky 3fcf9b11be Back to dev. 2005-03-23 21:33:56 +00:00
Ilia Alshanetsky c3738fdca7 4.3.11RC2 2005-03-23 20:42:33 +00:00
foobar d6e0e5f7ea MFH 2005-03-23 00:39:58 +00:00
Edin Kadribasic df26ef5475 Fix exif win32 build 2005-03-22 22:07:04 +00:00
foobar eeba2141bc MFH 2005-03-22 16:03:28 +00:00
foobar 2285d9bdcc MFH 2005-03-22 15:39:42 +00:00
Antony Dovgal b951e33f8d MFH: fix #28803 (enabled debug causes bailout errors with CLI on AIX
because of fflush() called on already closed filedescriptor)
2005-03-22 15:09:36 +00:00
Derick Rethans 6a1c9f5810 - MFH: Changed to reflect "current practise" 2005-03-22 09:05:48 +00:00
Zeev Suraski 874f07c893 MFH 2005-03-20 09:04:03 +00:00
Antony Dovgal 65b3d94fac MFH: fix segfault in bzopen() 2005-03-19 13:56:56 +00:00
Greg Beaver 747d019bd3 update to Archive_Tar 1.3.1 2005-03-18 01:58:20 +00:00
Moriyoshi Koizumi 4b4f30017b - Add missing entries. 2005-03-18 00:49:32 +00:00
Ilia Alshanetsky 06c2ce0a0d MFH: Fixed build of exif extension on win32. 2005-03-17 17:21:02 +00:00
Ilia Alshanetsky a35b6ffd5d MFH: Fixed compiler warning on win32. 2005-03-17 17:16:53 +00:00
Rob Richards 8224851858 BFN 2005-03-17 13:13:08 +00:00
Rob Richards fab647746c Fixed bug #32340 (insert_before($node,NULL) does not return) 2005-03-17 13:11:47 +00:00
foobar fd1280c6ef remove unused subst 2005-03-17 08:13:21 +00:00
foobar f6dd7f00db fix build 2005-03-17 08:13:03 +00:00
Harrie Hazewinkel 5e97bf3de8 Adding SNMPv2 community based (i.e. protocol version) functions. 2005-03-16 16:19:59 +00:00
foobar 4b012f7244 MFH: - Remove these relics from era when TSRM was optional. 2005-03-16 06:37:03 +00:00
Ilia Alshanetsky e2b2ea667f MFH: Fixed possible usage of str without being initialized. 2005-03-15 00:30:05 +00:00
Greg Beaver 6dd737d8ea add go-pear-list (probably won't do anything, but it's worth a try) 2005-03-15 00:11:47 +00:00
foobar 7380c23ab2 MFH 2005-03-14 21:11:45 +00:00
foobar c3894108b6 MFH: - Fixed bug #18613 (Multiple OUs in x509 certificate not handled properly) 2005-03-14 21:01:02 +00:00
Zeev Suraski dde65251f7 Fix an age old bug in parsing paths when reading
INI values from the registry
2005-03-14 12:41:18 +00:00
foobar 1be9cff9d3 MFH: - Fixed bug #30609 (cURL functions bypass open_basedir) 2005-03-14 09:03:09 +00:00
Ilia Alshanetsky 91855505b5 Back to dev. 2005-03-13 21:54:56 +00:00
Ilia Alshanetsky 36c0a0859a 4.3.11RC1 2005-03-13 20:18:44 +00:00
Ilia Alshanetsky 49de3e701c MFH: Final set of fixes for bug #27633. 2005-03-10 23:38:18 +00:00
Marcus Boerger 73d689f230 - MFH rename 2005-03-10 14:20:55 +00:00
Joe Orton 6cd9eb9736 MFH: - Fixed bug #31717: Reject PATH_INFO if "AcceptPathInfo off" is used. 2005-03-10 11:39:04 +00:00
Marcus Boerger 1147c223ad - BFN 2005-03-10 02:04:17 +00:00
Marcus Boerger 16a2a11bee - MFH 2005-03-10 02:01:40 +00:00
Ilia Alshanetsky 47a02a0bdf MFH: Fixes to ascii downloads on win32. 2005-03-09 20:53:01 +00:00
Derick Rethans afce7aafae - Fixed bug #28067 (partially incorrect utf8 to htmlentities mapping). (Derick,
Benjamin Greiner)
2005-03-09 10:11:15 +00:00
foobar 827f18e200 MFH 2005-03-08 21:45:51 +00:00
foobar 75db37c82c MFH 2005-03-08 21:22:20 +00:00
foobar 44abd52206 RBFN 2005-03-07 18:14:41 +00:00
Zeev Suraski 166713abac Remove test case for a Won't Fix bug 2005-03-07 16:55:21 +00:00
Ilia Alshanetsky 3dffe40cc4 MFH: Fixed bug #29424 (width and height inverted for JPEG2000 files). 2005-03-06 17:05:41 +00:00
Rasmus Lerdorf 574306adf4 wtf? 2005-03-05 18:30:47 +00:00
foobar a00bdd925a MFH 2005-03-04 15:16:27 +00:00
Johannes Schlüter 855224c8e6 - Remove <b>-Tag from error message 2005-03-03 10:41:19 +00:00
Zeev Suraski 4c452ea58f MFH 2005-03-03 09:58:20 +00:00
Ilia Alshanetsky 6b0c663c40 MFH: Fixed bug #32160 (file truncation in copy() when source & destination are
the same).
2005-03-03 03:31:59 +00:00
foobar 3c20b13648 typofix 2005-03-02 21:46:45 +00:00
Stefan Esser b7d81e26b1 MFH 2005-03-02 18:23:49 +00:00
foobar d8f6c856af touch 2005-03-01 21:56:40 +00:00
Ilia Alshanetsky 7aa8901413 MFH: Fixed bug #31792 (getrusage() does not provide ru_nswap value). 2005-03-01 21:34:30 +00:00
Andrei Zmievski 0e230a77d0 Allow = sign in long option argument.
Fixes PEAR bug #1831.
2005-03-01 18:19:48 +00:00
Stefan Esser 62ef5f3566 MFH 2005-03-01 13:53:35 +00:00
Antony Dovgal 3fdc0745f1 MFH: checks for negative values to gmp_sqrt(), gmp_powm(), gmp_sqrtrem()
and gmp_fact() to prevent SIGFPE
changed zend_error() to php_error_docref()
2005-03-01 13:18:31 +00:00
foobar 802b4b00bb MFH: - Fixed bug #31672 (</script> not considered closing tag if
MFH:   preceded by one-line comment
2005-03-01 02:22:42 +00:00
Stefan Esser 342bafdb2f MFH 2005-02-28 16:33:23 +00:00
Frank M. Kromann c0bb17abcc FreeTDS does not have support for DBTEXTLIMIT 2005-02-25 23:23:54 +00:00
Rob Richards ed3db800b6 no message 2005-02-25 22:13:37 +00:00
Antony Dovgal a085abe036 MFH: allow building oci8 as shared 2005-02-25 11:33:24 +00:00
Marcus Boerger 1679c7b062 - MFH 2005-02-24 20:54:18 +00:00
Ilia Alshanetsky 80a2e3b4be pack() issues were resolved. 2005-02-23 22:40:18 +00:00
Moriyoshi Koizumi 19b28876dc - MFH: Synch with the latest checkouts. (include fix by Joe Orton. Thanks.) 2005-02-23 13:36:14 +00:00
Ilia Alshanetsky 897ac11952 MFH: Fixed bug #31288 (Possible crash in mysql_fetch_field(), if
mysql_list_fields() was not called previously).
2005-02-22 15:00:49 +00:00
foobar 8f1cde33ab MFH: nuke unused variables when PCRE is not compiled statically into PHP 2005-02-22 14:46:24 +00:00
Moriyoshi Koizumi c8869bea69 - MFH: fix bug #32063 (mb_convert_encoding ignores named entity 'alpha') 2005-02-22 10:09:58 +00:00
Stanislav Malyshev 0f97c6a0e3 packport fix from PHP5: read post data if they wreen't read
# this is needed for FCGI correct functioning
2005-02-21 12:29:02 +00:00
Moriyoshi Koizumi 1816823b2e - MFH: fix bug #30573 (compiler warning due to invalid type cast). 2005-02-21 10:15:03 +00:00
Moriyoshi Koizumi b8c4f047cd - MFH: fix compiler warnings. 2005-02-21 08:03:48 +00:00
Moriyoshi Koizumi c8d6f45983 - MFH: add testcases for bug #28220, #30549 and #31911. 2005-02-21 07:46:35 +00:00
SVN Migration dd21c3fd8d This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2005-02-21 07:45:38 +00:00
Moriyoshi Koizumi ebc27e8dce - Upgrade libmbfl (fixers bug #28220, #30549 and #31911). 2005-02-21 07:10:14 +00:00
SVN Migration 2ef3c88773 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2005-02-20 22:20:24 +00:00
Derick Rethans c811399720 - Added test case for bug #32021. 2005-02-18 13:41:28 +00:00
SVN Migration 631b23ce67 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2005-02-18 13:37:24 +00:00
Andi Gutmans a410c71e10 - Commit NEWS Entry for:
- Fixed bug #31960 (msql_fetch_row() and msql_fetch_array() dropping columns
  with NULL values). (Daniel Convissor)
2005-02-17 22:08:29 +00:00
Andi Gutmans 7faaa41ec2 - MFH 2005-02-17 20:14:03 +00:00
Ilia Alshanetsky 1f5baf17a0 MFH: Fixed bug #27633 (Double \r problem on ftp_get in ASCII mode on Win32). 2005-02-17 15:38:34 +00:00
foobar 243b5f2300 ws/cs 2005-02-17 09:26:12 +00:00
Ilia Alshanetsky bce951557b MFH: MFH: Fixed bug #31440 ($GLOBALS can be overwritten via GPC when
register_globals is enabled).
2005-02-17 04:46:52 +00:00
foobar 77d8f41d03 MFH: - Compile fix for systems without int32_t typedef 2005-02-17 04:45:21 +00:00
foobar 6c1566eec1 MFH:- Fixed bug #29554 (compile failure when using --with-pspell=/usr/local) 2005-02-17 03:51:50 +00:00
Edin Kadribasic fc666e9a95 MFH 2005-02-16 12:23:06 +00:00
Ilia Alshanetsky 8c4df4a8df MFH: Fixed bug #31986 (Max nesting limit set too low). 2005-02-15 21:56:39 +00:00
foobar 59e8612456 MFH 2005-02-15 08:52:33 +00:00
Marcus Boerger 689a54513c - MFH 2005-02-15 08:12:29 +00:00
Ilia Alshanetsky 5d455016e5 MFH: file upload prunning. 2005-02-15 00:28:39 +00:00
foobar 3f0ed932d3 MFH 2005-02-14 23:46:07 +00:00
foobar 1d7164f92f Fix typo 2005-02-14 22:18:46 +00:00
foobar 5b7fbcf658 MFH: - Removed duplicate error + reset error in new sockets 2005-02-14 22:17:30 +00:00
foobar aeec3f4abc MFH: nuke non-existing ini option 2005-02-14 08:26:10 +00:00
foobar ae0e54dfee MFH: nuke unused code 2005-02-14 08:23:20 +00:00
foobar 2b4628c336 MFH: missing $Id$ tags 2005-02-13 17:54:56 +00:00
foobar 3f076e4814 MFH: - Added the alias session_commit() (more intuitive name for session_write_close())
MFH: - Partial sync of the file by adding macro SESSION_CHECK_ACTIVE_STATE
2005-02-13 17:51:32 +00:00
foobar 6d640d80dc MFH 2005-02-12 18:30:03 +00:00
foobar 43796d1f56 - Fixed bug #31936 (set_h_errno() is redefined incompatibly) 2005-02-12 18:16:04 +00:00
foobar e2d002e7c0 Revert 2005-02-11 03:34:04 +00:00
foobar 028b68cc1e Revert broken patch 2005-02-11 02:12:30 +00:00
foobar 3d43f71772 MFH: - Multiple fixes for nasty leaks in ZTS mode 2005-02-10 22:50:47 +00:00
foobar a3623adb8c - Fixed bug #31920 (zend_strtod.c error: conflicting types for 'int8_t') 2005-02-10 22:20:27 +00:00
Frank M. Kromann c0b28e5484 MFH: change return value from false to true, when a statement was executed with warnings 2005-02-09 19:33:32 +00:00
Frank M. Kromann 9dc8030478 MFH: Check for warnings and return the warning texts 2005-02-09 18:50:49 +00:00
Rasmus Lerdorf b935947ca8 MFH fix for bug #31901 2005-02-09 16:23:49 +00:00
Ilia Alshanetsky e2381946db MFH: Fixed bug #31527 (crash in msg_send() when non-string is stored without
being serialized).
2005-02-07 22:32:31 +00:00
Antony Dovgal 32214bf3b2 MFH: fix leaks in ext/filepro 2005-02-07 13:33:04 +00:00
foobar 3da25b53bc MFH: - Fixed bug #31858 (--disable-cli does not force --without-pear) 2005-02-07 12:51:52 +00:00
foobar 146ca108b0 fix test 2005-02-04 23:24:22 +00:00
Derick Rethans 163099f2a9 - MFH: Fixed bug #31754 (dbase_open() fails for mode = 1). (Mehdi, Derick) 2005-02-04 14:29:21 +00:00
SVN Migration 4bfa2b800e This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2005-02-04 14:28:51 +00:00
foobar 4db1177ee1 MFH: Fixed bug #31842 (*date('r') does not return RFC2822 conforming date string). 2005-02-04 13:09:24 +00:00
foobar bfccdca1d8 MFH: - Fixed bug #28227 (PHP CGI depends upon non-standard SCRIPT_FILENAME)
# patch by: lukem at NetBSD dot org
2005-02-04 10:42:01 +00:00
Ilia Alshanetsky c0eef1a170 MFH: Proper fix for bug #31796 . 2005-02-04 00:22:03 +00:00
Ilia Alshanetsky a8a212dbd8 MFH: Fixed bug #31796 (readline completion handler does not handle empty
return values).
2005-02-03 22:46:55 +00:00
foobar 91c962da95 MFH: Fix buildconf with BSD make 2005-02-03 17:43:04 +00:00
foobar 73b74e1418 - MFH: Fixed bug #28804 (ini-file section parsing pattern is buggy). 2005-02-03 03:02:07 +00:00
Ilia Alshanetsky 68574f5cdd MFH: Fixed bug #31514 (open_basedir uses path_translated rather then cwd for .
translation).
2005-02-02 23:44:07 +00:00
Ilia Alshanetsky 59e73f08ff MFH: Fixed bug #31797 (exif_read_data() uses too low nesting limit). 2005-02-01 23:29:01 +00:00
Ilia Alshanetsky 917a493fae MFH: Final version of filename upload handling. 2005-02-01 02:33:25 +00:00
Ilia Alshanetsky 1afbc301f1 MFH: Fix handling of INF/NAN in unserialize(). 2005-01-30 16:39:55 +00:00
Antony Dovgal 81e281f58e improve CS & error messages 2005-01-28 16:50:38 +00:00
Antony Dovgal 36872f7754 MFB: explain why ftok() failed 2005-01-28 16:35:10 +00:00
Antony Dovgal 2a853b7065 MFH: change return type from NULL to FALSE when parameter parsing failed 2005-01-28 01:39:42 +00:00
Frank M. Kromann db7b8083c5 MFH: Hack to fix crash caused by FBCAccess not returning errors when creating an index that exists in the database. 2005-01-27 20:22:27 +00:00
Ilia Alshanetsky a1b9bf56cb MFH: Fixed bug #31705 (parse_url() does not recognize http://foo.com#bar) 2005-01-27 16:38:30 +00:00
Derick Rethans c61f31defe - MFH: There is no --with-apache2, only apxs2 2005-01-26 18:03:30 +00:00
Ilia Alshanetsky ce5c630614 MFH: Fixed bug #31699 (unserialize() float problem on non-English locales). 2005-01-26 16:56:14 +00:00
Ilia Alshanetsky 8e93d757b3 MFH: Fixed bug #29733 (printf() handles repeated placeholders wrong). 2005-01-26 00:03:19 +00:00
foobar 214091ee77 massage 2005-01-25 23:42:38 +00:00
Ilia Alshanetsky 13c9761b16 MFH: Fixed bug #31465 (False warning in unpack() when working with *). 2005-01-25 22:52:19 +00:00
Andrei Zmievski 147db82b24 Fix several egregious leaks in ext/browscap and sapi/embed. 2005-01-25 21:26:42 +00:00
Antony Dovgal 379f891a21 MFH: fix segfault in imap_bodystruct() 2005-01-25 14:23:37 +00:00
foobar 0926b0d102 MFH: - Fixed bug #31684 (dio_tcsetattr(): misconfigured termios settings) 2005-01-25 13:43:37 +00:00
foobar d16912b12a MFH: - Fix macosx shared extension build 2005-01-25 13:03:06 +00:00
foobar 440eae3412 MFH: - Return of the automake requirement 2005-01-25 12:55:55 +00:00
Ilia Alshanetsky 72818b5c0d MFH: Use multibyte specific code for handling files and generic basename
based code in all other instances.
2005-01-24 23:52:27 +00:00
Moriyoshi Koizumi a10855c574 - MFH: revert irrelevant part. 2005-01-24 16:47:53 +00:00
Antony Dovgal 164cff8586 MFH: fix msg_recieve() & add test 2005-01-24 14:23:37 +00:00
SVN Migration bf41267c52 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2005-01-24 14:19:54 +00:00
Joe Orton 54a1e6c07a MFH: Fixed regression #31645 - only flush before running the subrequest. 2005-01-24 11:48:35 +00:00
Ilia Alshanetsky f04cf8344c Fixed compiler warning. 2005-01-23 20:17:27 +00:00
foobar 70ae8d742a MFH: - Memory leak fixes from ZE2 + HEAD CLI 2005-01-22 20:36:35 +00:00
foobar e384dee1a2 MFH: - Remove also autom4te.cache dir with phpize --clean 2005-01-22 20:30:15 +00:00
foobar 8463cfb5e3 MFH: - Typofix + removed unnecessary unsets caused by it 2005-01-22 01:37:12 +00:00
foobar f9e8717683 massage news 2005-01-22 01:19:48 +00:00
Andrei Zmievski 19ec49afc1 *** empty log message *** 2005-01-21 23:48:33 +00:00
Andrei Zmievski 3666ad8b1a Protect against corrupt EXIF headers that feature unlimited IFD tag
nesting.
2005-01-21 23:47:06 +00:00
Stefan Esser 75cb09dec4 MFH 2005-01-21 16:04:54 +00:00
Derick Rethans 3d37f4d2cd - MFH: php_error_docref() adoption. 2005-01-21 10:34:46 +00:00
Ilia Alshanetsky 7e76730796 Fixed bug #28086 (crash inside overload() function). 2005-01-21 00:32:18 +00:00
Edin Kadribasic e3c883e74b Fixed bug #29492 - missing ldap_parse_reference() 2005-01-20 22:48:13 +00:00
Antony Dovgal 6509c6edc7 fix error message =/ 2005-01-20 18:46:14 +00:00
Antony Dovgal c4bef7c8a1 MFH: fix bug #31623 (OCILogin does not support password grace period) 2005-01-20 18:44:10 +00:00
Antony Dovgal 27136014a4 MFH: fix segfault in imap_sort() 2005-01-20 18:10:07 +00:00
Ilia Alshanetsky 4ff3a50a06 MFH: Fixed bug #31398 (When magic_guotes_gpc are enabled filenames with '
get cutoff).
2005-01-20 17:57:41 +00:00
Antony Dovgal e9b08d1631 MFH: fix segfault in imap_headerinfo() when fromlength or subjectlength are less than 0
+ fix protos
2005-01-20 14:18:10 +00:00
Antony Dovgal 41491a5199 MFH: fix typos in error messages 2005-01-20 10:08:45 +00:00
Antony Dovgal c45f9ec668 MFH: fix typos in error messages & resource name 2005-01-20 10:06:31 +00:00
foobar 6dcfd9d13f MFH: Removed obsolete AC_PROG_RANLIB 2005-01-20 01:46:57 +00:00
foobar e5a163091e MFH: - Changed phpize not to require automake and libtool. (Jani)
MFH: - Fixed build system to always use bundled libtool files. (Jani)
MFH: - Rewrote of phpize routines
2005-01-20 01:43:19 +00:00
foobar 09e807d295 MFH: Added --debug option to buildconf 2005-01-19 23:04:21 +00:00
foobar f0baa2345b Revert the multiple autoconf versions patch 2005-01-19 22:27:59 +00:00
Ilia Alshanetsky fc4ccde386 MFH: Stricter cc header check 2005-01-19 18:54:57 +00:00
SVN Migration 1b26a19293 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2005-01-19 17:52:33 +00:00
foobar b478e36dba BFN 2005-01-19 17:41:00 +00:00
foobar f056a94455 MFH: - Fixed bug #28976 (use From: from headers if sendmail_from is empty) 2005-01-19 17:38:41 +00:00
foobar c79b0caf03 MFH: - Fix the pic patch 2005-01-19 17:36:21 +00:00
foobar cd2456bc76 MFH: - WS & CS fixes
MFH: - php_error -> php_error_docref
MFH: - Removed pointless checks (array_init, emalloc, etc.)
MFH: - Force ldapv3 for ldap_start_tls()
2005-01-19 00:28:49 +00:00
Ilia Alshanetsky be970c09b4 MFH: Fixed bug #31142 (crash, memory leak and data loss by imap_mail_compose). 2005-01-18 23:36:49 +00:00
Antony Dovgal 511e5c4385 MFH: add checks for libs & headers required by IBM DB2 2005-01-18 21:21:16 +00:00
Ilia Alshanetsky 9ccca60a1f MFH: Fixed bug #31480 (Possible infinite loop in imap_mail_compose()). 2005-01-18 16:34:04 +00:00
Ilia Alshanetsky aec129db7f MFH: Fixed bug #31479 (Fixed crash in chunk_split(), when chunklen > strlen). 2005-01-18 15:51:24 +00:00
foobar 2572c0a0e3 MFH: - Use FD_CLOEXEC with fcntl() and make sure it is always defined 2005-01-18 15:45:01 +00:00
Antony Dovgal 7447137453 MFH: fix bug #30430 (odbc_next_result() doesn't bind values and that results in segfault)
fix protos
2005-01-18 15:11:22 +00:00
foobar be64d7c3de MFH 2005-01-18 11:54:12 +00:00
foobar c0417eebe7 MFH: Add test for bug #31402 2005-01-18 11:37:37 +00:00
SVN Migration db10c7e0f1 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2005-01-18 11:36:45 +00:00
foobar 4dd9df846a - Files generated with re2c 0.9.2 2005-01-18 11:08:20 +00:00
foobar fdab057113 MFH: - Move hash table destruction to proper location 2005-01-18 11:01:21 +00:00
Magnus M��tt� 3d06228b53 Add test case for bug #30726. 2005-01-18 09:57:27 +00:00
SVN Migration b4996c4e6a This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2005-01-18 09:56:32 +00:00
Ilia Alshanetsky ba335a66ac MFH: Fixed bug #30726 (-.1 like numbers are not being handled correctly). 2005-01-18 00:31:26 +00:00
Ilia Alshanetsky 6029240086 Fixed bug #31580 (fgetcsv() problematic with "" escape sequences). 2005-01-18 00:14:56 +00:00
Antony Dovgal fc6b941f63 MFH: fix wierd DB2 issue 2005-01-17 18:12:06 +00:00
foobar 4a32bb0cbb MFZE2: - Fixed bug #31444 (Memory leak in zend_language_scanner.c) 2005-01-17 17:22:21 +00:00
foobar d6900eee6b MFH: - Added some sanity checks by changing to the parameter parsing API 2005-01-17 17:07:57 +00:00
foobar cba2b199cb MFH: CS / WS / proto fixes 2005-01-17 16:59:23 +00:00
Antony Dovgal b003639e70 MFH: fix leak 2005-01-17 15:07:46 +00:00
Joe Orton 5934470390 MFH - Fixed bug #31519: Set r->status_line to SAPI-provided status-line. 2005-01-17 12:36:44 +00:00
Stefan Esser 46e1055288 MFH: 64bit fixes 2005-01-17 12:28:08 +00:00
Stefan Esser 68b899703c Fix compiler warning. 2005-01-17 11:46:11 +00:00
Moriyoshi Koizumi 854b50e6e0 - MFH: Fix a critical bug that request-local settings leak to another request. 2005-01-16 15:56:05 +00:00
Stefan Esser bbd0a00aed MFH 2005-01-15 18:45:00 +00:00
foobar 7190976fe9 MFH: ws & proto fix 2005-01-15 04:35:40 +00:00
foobar d9da89ef29 MFH: - Fixed bug #31060 (imageftbbox() does not use linespacing parameter) 2005-01-14 23:08:48 +00:00
foobar 17ccfe0c42 MFH: - Fixed bug #30120 (imagettftext() and imagettfbbox() accept too many parameters) 2005-01-14 22:44:35 +00:00
foobar 3f191da6f1 MFH 2005-01-14 20:45:34 +00:00
foobar c1d8014e28 BFN 2005-01-14 04:45:32 +00:00
Ard Biesheuvel 6c8d41a8fc Fixed unregistered bug: corrupted 32-bit LONGs on 64-bit systems 2005-01-13 21:22:13 +00:00
Rasmus Lerdorf 7606d9483e Should probably note this 2005-01-11 22:33:08 +00:00
Moriyoshi Koizumi 5b10ee806f - MFH: Fix the fix 2005-01-11 20:59:27 +00:00
Moriyoshi Koizumi 9d701ce256 - MFH: fix htmlentities() / html_decode_entity() UTF-8 related bugs
initially reported by Kamesh Jayachandrana
# UTF-8 feature doesn't work in PHP 4.3 anyway, so I'm not going to add the
# testcase.
2005-01-11 20:50:23 +00:00
Joe Orton 15a00ec902 MFH: Fixed bug #30446 - virtual() includes files out of sequence,
work around 2.0 subrequest/internal redirect issue.
2005-01-11 14:09:56 +00:00
foobar 8391424f4d MFH: Fix ZTS build 2005-01-11 13:36:39 +00:00
foobar f835eba6b3 MFH: - Added check for IMAP 2004 versions 2005-01-11 04:56:57 +00:00
Antony Dovgal cba8f9ce99 MFH: fix Konstantin's last name 2005-01-10 21:38:56 +00:00
foobar 772260fa09 MFH: update test to include negative floats as strings too 2005-01-10 16:00:32 +00:00
foobar 2a28c3b94a MFH: - Fixed bug #28074 (FastCGI: stderr should be written in a FCGI stderr stream). 2005-01-10 15:39:20 +00:00
foobar eaf9597c04 - The pic/no-pic patch by Joe Orton. 2005-01-10 01:11:50 +00:00
foobar ef771fa4d1 Forgot this from the outside-source-dir patch 2005-01-09 23:47:33 +00:00
foobar 176a6e48ec MFH: - Fix outside-source-tree builds. Always include generated header files
with #include <some_header.h> to make sure the correct file is used.
2005-01-09 21:05:39 +00:00
Antony Dovgal 6f3bf7b276 BFN & end of cvs spam 2005-01-09 18:27:27 +00:00
Antony Dovgal c865371dc1 add skipif section 2005-01-09 18:21:25 +00:00
Antony Dovgal 8ba43faa20 MFH: add test 2005-01-09 18:18:18 +00:00
SVN Migration 9140025206 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2005-01-09 18:15:50 +00:00
Antony Dovgal 964e59d7d5 MFH: fix bug #31454 2005-01-09 17:57:50 +00:00
foobar 411f43f226 MFH: - Fix leaks with registered shutdown functions. 2005-01-09 16:30:22 +00:00
foobar 541d8e10bb MFH: - Fix memleak in ZTS mode 2005-01-09 16:12:23 +00:00
foobar 72249d7eb0 Remove done stuff 2005-01-09 00:18:06 +00:00
foobar 2d69dc25fe MFH: - Fix possible crash (PR#26223). Leaks remain. 2005-01-08 20:45:43 +00:00
foobar 4de08a612f MFH: - Fix some memory leaks 2005-01-08 12:02:50 +00:00
Antony Dovgal 2feb748513 MFH: remove duplicated include 2005-01-07 21:14:23 +00:00
foobar 1e9fbe762f BFN 2005-01-07 06:29:50 +00:00
foobar f772c8195a MFH: - Fixed bug #31055 (apache2filter: per request leak proportional to the full path of the request URI) 2005-01-07 06:28:36 +00:00
foobar 155e725a5e MFH: - Make sure $host_alias is never empty 2005-01-07 06:21:42 +00:00
Wez Furlong 040729e867 update by steph 2005-01-07 05:39:15 +00:00
Joe Orton bc95def9ca MFH: - Fixed bug #31413 (curl POSTFIELDS crashes on 64-bit platforms). 2005-01-06 10:34:03 +00:00
Ilia Alshanetsky e20661c622 Fixed test case. 2005-01-04 23:09:13 +00:00
foobar fc34db9f96 - Fix bug #31403 (php_hostconnect not defined as PHPAPI) 2005-01-04 10:35:56 +00:00
foobar 27e6105b7d BFN 2005-01-04 06:53:42 +00:00
foobar dbaa0bc367 MFH: - Fixed bug #31396 (compile fails with gd 2.0.33 without freetype) 2005-01-04 06:52:18 +00:00
Ilia Alshanetsky 76144335e9 MFH: Fixed bug #31371 (highlight_file() trims new line after heredoc). 2005-01-02 23:55:19 +00:00
Moriyoshi Koizumi eb701d3fba - MFH: add testcases for bug #29493 and #31213. 2005-01-02 06:52:06 +00:00
SVN Migration 6d8bba6a4a This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2005-01-02 06:51:04 +00:00
foobar 2614e6c26a Revert part of the previous commit: autoheader 2.13 does not have this option 2004-12-31 07:10:57 +00:00
Ilia Alshanetsky f2ede86923 Don't forget to init a variable. 2004-12-31 03:16:50 +00:00
Ilia Alshanetsky 8326f69ebf Detect libcrack with Kerberos 5 support built-in. 2004-12-31 03:10:59 +00:00
Ilia Alshanetsky 9c83000422 Fixed compiler warning when using newer versions of libzip. 2004-12-31 02:57:08 +00:00
Rasmus Lerdorf ac19bb8811 Remove a few more warnings. I don't think we need to scare people with
a warning about the cvsclean stuff.  We'll just tell them we are
running cvsclean.
2004-12-30 19:54:46 +00:00
Rasmus Lerdorf d327665b56 Slightly safer check here. 2004-12-30 15:43:52 +00:00
foobar 31705420ae - MFH: - Fixed bug #28930 (PHP sources pick wrong header files generated by bison) 2004-12-30 15:22:52 +00:00
foobar d4af6e030c MFH: Fix buildconf failure with autoconf > 2.13 2004-12-30 14:56:38 +00:00
foobar 86bcb9d8e6 MFH: - Fixed bug #31101 (missing kerberos header file path with --with-openssl) 2004-12-30 14:54:35 +00:00
foobar 912c7fc107 - Quote macro names in AC_DEFUN()
# Fixes also bug #29160
# for i in `grep -r -l AC_DEFUN *`; do perl -i -pe "s#AC_DEFUN\(([^\[])(.*)\,#AC_DEFUN([\1\2],#g" $i; done;
2004-12-30 07:02:19 +00:00
foobar f08edd43dc MFH: Fixed crash + leak 2004-12-30 05:33:53 +00:00
foobar eeb4106f00 - Fixed crap removal 2004-12-30 04:44:59 +00:00
Ilia Alshanetsky f6994812bd A leak is better(?) then a crash. 2004-12-30 04:38:40 +00:00
Ilia Alshanetsky 173630503a Fixed test case. 2004-12-30 04:11:56 +00:00
foobar f39b13f070 BFN 2004-12-30 01:01:54 +00:00
Ilia Alshanetsky 4f56135eb8 Fixed typo. 2004-12-29 21:56:57 +00:00
Ilia Alshanetsky 948be2022a MFH: Fixed compiler warnings. 2004-12-29 21:41:07 +00:00
Ilia Alshanetsky a2cef56c12 MFH: Fixed memory leaks. 2004-12-29 21:34:09 +00:00
Ilia Alshanetsky 7d1bab90e7 Don't perform pointless operations (MFH5). 2004-12-29 21:24:00 +00:00
Ilia Alshanetsky c6fea156f0 MFH: Don't forget to unload t1lib. 2004-12-29 21:08:42 +00:00
Frank M. Kromann 90925d817f MFH: Fix typo 2004-12-29 20:20:52 +00:00
Zeev Suraski 47a2f22ac8 Update desc 2004-12-28 09:01:48 +00:00
Ilia Alshanetsky 81cb38ed75 MFH: Fixed several buffer overflows. 2004-12-23 19:29:36 +00:00
Ilia Alshanetsky 8a03620e1a Fixed potential buffer overflow inside swf_definepoly(). 2004-12-23 18:29:36 +00:00
Ilia Alshanetsky c75458bac3 Fixed bug #31270 (missing safe_mode/open_basedir check in swf_openfile()). 2004-12-23 18:04:10 +00:00
Antony Dovgal 66b5a3680b MFH: destroy return_value and fix leak in array_fill() 2004-12-23 16:40:03 +00:00
Antony Dovgal 0e58251e38 news entry 2004-12-23 16:29:00 +00:00
Antony Dovgal 288fdf242b MFH: add Oracle Instant Client support (patch by cjbj at hotmail dot com) 2004-12-23 16:23:22 +00:00
Edin Kadribasic 7259e7e0d1 BFN 2004-12-23 01:47:37 +00:00
Wez Furlong 4e84c36fba Black magic bad.
This will probably fixed reported COM problems (multiple bug #s)
2004-12-23 01:10:48 +00:00
Ilia Alshanetsky 26420231c8 MFH: Fixed bug #31142 (imap_mail_compose() fails to generate correct output). 2004-12-22 17:29:14 +00:00
SVN Migration e97b63540d This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-12-22 17:27:40 +00:00
foobar bd9fbc11da Removed unneeded file. 2004-12-22 03:09:07 +00:00
Ilia Alshanetsky 10e87da1d6 MFH: Fixed possible crash in imap_mail_compose(). 2004-12-21 15:47:38 +00:00
Edin Kadribasic 17ba387824 Avoid autoheader warning 2004-12-21 15:40:19 +00:00
Ilia Alshanetsky d653cf740b Added missing bug fix news. 2004-12-21 14:32:32 +00:00
foobar 84c91b3135 MFH: - Fixed bug #28385 (some files in $(prefix)/lib/php/build/* installed with wrong permissions) 2004-12-21 04:59:34 +00:00
Magnus M��tt� 539598db31 MFH: Fix test so it doesn't hang make test on HP-UX. 2004-12-21 04:36:20 +00:00
foobar 0f490b39f0 MFH: - Fixed bug #31145 (configure is using -lcpdf instead of -lcpdfm)
# Also backported some previous fixes that weren't in this branch yet.
2004-12-21 04:23:35 +00:00
foobar 69093d5dfd MFH: - Use correct header files (in c99 compliant way). uint32_t is preferred. 2004-12-21 01:08:09 +00:00
foobar e0b9d42d25 MFH: endian compile problem fix 2004-12-20 20:38:18 +00:00
foobar b5d9948f32 MFH: Fix buildconf when multiple autoconf versions installed 2004-12-20 20:24:23 +00:00
Ilia Alshanetsky 787ad5fd12 Fixed bug #31174 (compile warning in url.c). 2004-12-20 19:29:38 +00:00
foobar 6fe420def0 MFH: Use FREE_HASHTABLE() instead of efree() 2004-12-20 19:15:24 +00:00
foobar 7224f5355d typofix 2004-12-20 12:38:16 +00:00
Ilia Alshanetsky 7b7d26ccb0 Added missing bug fixing entries. 2004-12-19 19:28:58 +00:00
Ilia Alshanetsky 334a3cefe3 MFH: Fixed bug #31103 (Better error message when c-client cannot be found). 2004-12-19 18:18:20 +00:00
foobar 112e43d87f BFN 2004-12-18 03:57:25 +00:00
foobar 5efdcb0696 MFH: - Fixed bug #7782 (Cannot use PATH_INFO fully with php isapi) 2004-12-18 03:56:11 +00:00
foobar 1cb5b5e139 Missing CVS id tag 2004-12-18 03:15:10 +00:00
Antony Dovgal 33803e48e9 fix typo 2004-12-17 15:43:21 +00:00
Derick Rethans ec34a3876a - Fixed bug #31072 (var_export() does not output an array element with an empty
string key). (Derick)
2004-12-17 14:38:45 +00:00
Derick Rethans 0c48159953 - Fixed weird types, this also makes it compile on IRIX again. 2004-12-17 13:07:57 +00:00
foobar 5f5a17d741 typo 2004-12-17 02:20:04 +00:00
Moriyoshi Koizumi 8e0084d522 - MFH 2004-12-16 23:14:29 +00:00
Frank M. Kromann 5f859e2830 Fix #31120 and #31135. mssql_query returns false on successfill inserts and stored procedures 2004-12-16 21:48:17 +00:00
Antony Dovgal 7fcb28749a MFH: fix leak (init array only if we got valid start key) 2004-12-16 19:23:59 +00:00
Derick Rethans 5e4c8ca731 - Fixed bug #31107 (strtod on solaris9/intel) 2004-12-16 13:06:32 +00:00
foobar efbaf4327a MFH: Fix typo (avaliable -> available). (bug #28725) 2004-12-16 12:36:49 +00:00
foobar 39413a6022 MFH: - Fixed compile error with HP-UX using GCC. 2004-12-16 11:50:46 +00:00
Derick Rethans 66e397f2c9 - Fixed bug #31110 and #31111 (Zend/zend_strtod.c problems) 2004-12-16 10:38:16 +00:00
Ilia Alshanetsky 50c1182c4f MFH: Fixed bug #31056 (php_std_date() returns invalid formatted date if
y2k_compliance is On).
2004-12-16 00:10:55 +00:00
Ilia Alshanetsky b201d00bde Back to dev. 2004-12-15 15:05:11 +00:00
foobar c3f10ff73e MFH: fix tests 2004-12-15 08:30:53 +00:00
foobar 9bab20fbab MFH: missing files 2004-12-15 02:31:04 +00:00
Ilia Alshanetsky 84a696da20 Fixed test. 2004-12-14 17:42:28 +00:00
Ilia Alshanetsky 19d0000632 Fixed build. 2004-12-14 17:22:10 +00:00
Ilia Alshanetsky 5a4b7f9c30 4.3.10 2004-12-14 16:07:50 +00:00
Derick Rethans bb2e9ef00c - Fixed compile error related to bug #28605.
#- But it does not *fix* bug #28605.
2004-12-14 08:35:26 +00:00
Ilia Alshanetsky 6cd0a77372 MFH: Fixed bug #28228 (NULL decimal separator is not being handled correctly). 2004-12-14 00:40:01 +00:00
Derick Rethans f137de1506 - MFH: Generate all iconv headers by default 2004-12-11 11:17:21 +00:00
Antony Dovgal aea9676eb0 CS changes 2004-12-09 17:16:57 +00:00
Pierre Joye 67524ef7c9 - update, MFH #28598 2004-12-09 14:26:39 +00:00
Antony Dovgal a5d9c87d49 MFH: fix segfault in session_module_name() when session.save_handler is empty 2004-12-09 14:21:13 +00:00
Pierre Joye 87cae0e01b - MFH: #28598, attempt to restore MS Symbol ttf support 2004-12-09 14:20:20 +00:00
Derick Rethans b4b338a8d1 - Fixed bug #31034 (Problem with non-existing iconv header file). (Derick) 2004-12-09 09:04:46 +00:00
Ilia Alshanetsky fe29c8def5 MFH: Fixed bug #31024 (Crash in fgetcsv() with negative length). 2004-12-08 21:15:02 +00:00
Frank M. Kromann 251851dbb3 MFH: Fix possible leaks 2004-12-08 19:02:29 +00:00
Frank M. Kromann 6416003e95 MFH: Fix logic for file checking. Bug #31019 2004-12-08 18:59:11 +00:00
Joe Orton db633a0760 MFH: Fix VPATH build again. 2004-12-08 12:52:12 +00:00
foobar aff3259a25 MFH: Fix build. This was not supposed to halt configure if test fails. 2004-12-08 06:48:13 +00:00
Brad House 9b72bcfd99 backport from 5.0/head. Newer versions of libmonetra broke compatability with one function. Make workaround that detects version, and works with both. 2004-12-08 03:11:32 +00:00
Ilia Alshanetsky d2bf5faa4f Back to dev. 2004-12-08 01:11:43 +00:00
Ilia Alshanetsky eea7fbdd4f 4.3.10RC2 2004-12-08 01:09:53 +00:00
Antony Dovgal dcfe66f9d7 MFH: fix leak 2004-12-07 17:04:42 +00:00
Antony Dovgal 61442c339f revert it 2004-12-07 14:01:56 +00:00
Derick Rethans 3d2bc043a7 - Tidy up NEWS a bit. 2004-12-07 08:42:50 +00:00
Antony Dovgal 2381aecca9 fix bug #30232 (session_start() sends Set-Cookie header only if the cookie is not set yet)
# looks like somebody fixed it in HEAD and forgot to MFH it..
2004-12-07 08:21:38 +00:00
Ilia Alshanetsky 14c6cd1788 MFh: Fixed bug #30995 (snmp extension does not build with net-snmp 5.2). 2004-12-07 00:34:33 +00:00
Ilia Alshanetsky d059006b67 MFH: Fixed bug #30990 (allow popen() on *NIX to accept 'b' flag). 2004-12-06 23:31:58 +00:00
Derick Rethans 95d9d7069a - Install the iconv extension headers to <installpath>/ext/iconv so that
external extensions can use them.
2004-12-06 20:37:56 +00:00
Ilia Alshanetsky aea33db8bb Revert, this is not needed after all. 2004-12-06 19:44:33 +00:00
Stanislav Malyshev 9ab7598560 fix startup - if startup did not succeed, do not continue with execution 2004-12-06 18:55:16 +00:00
Stanislav Malyshev a21c4e544f do not zero out peak - MM shutdown would do that 2004-12-06 18:51:40 +00:00
Ilia Alshanetsky ccbb17575a As per discussion on internals and pecl, domxml is no longer experimental. 2004-12-05 19:08:56 +00:00
Holger Zimmermann 0cd60dedad Replaced static server variables by function call and configurable list at the Pi3Web server side. 2004-12-05 09:48:48 +00:00
Stefan Esser 1686229772 fix compile 2004-12-03 16:09:19 +00:00
Stefan Esser 0520c88818 MFH 2004-12-03 16:04:26 +00:00
Christian Stocker bc0b61d250 - remove EXPERIMENTAL tag 2004-12-03 15:53:02 +00:00
Ilia Alshanetsky fa3568d490 MFH: Fixed bug #30962 (mssql returns space for NULL columns). 2004-12-03 02:27:11 +00:00
Antony Dovgal 84b568c4be MFH: revert my last patch 2004-12-02 16:36:41 +00:00
Stefan Esser ef56c2d1ee MFH 2004-12-02 01:04:46 +00:00
Stefan Esser aa65def360 MFH 2004-12-02 00:44:33 +00:00
Stefan Esser 26b45cf15f Fixed missing opening bracket 2004-12-01 23:47:54 +00:00
Stefan Esser 8aa0e89801 MFH 2004-12-01 22:56:33 +00:00
Stefan Esser 0c23ef8d85 MFH 2004-12-01 22:42:26 +00:00
Derick Rethans aa3971b119 - Update INSTALL file (to add static instructions) 2004-12-01 09:15:06 +00:00
Derick Rethans 5cc3311229 - MFH: Added testcase for bug #30695 2004-11-29 10:15:22 +00:00
SVN Migration 78388bd7c5 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-11-29 10:15:04 +00:00
Derick Rethans 5742bd2c52 - Make it work with PDFLib 5 again (And the check for PDFLib 6 is gone). 2004-11-29 09:13:39 +00:00
Sergey Kartashoff 169205c41a # - MnoGoSearch extension latest patch reverted (part3) 2004-11-28 20:33:12 +00:00
Sergey Kartashoff 7335ef4d30 - MnoGoSearch extension latest patch reverted (part2) 2004-11-28 20:31:37 +00:00
Sergey Kartashoff fb8f2ff8e4 - MnoGoSearch extension latest patch reverted 2004-11-28 20:30:09 +00:00
Sergey Kartashoff 918be06876 - MnoGoSearch extension updated to fix compilation issues with
mnogosearch-3.2.25+
2004-11-28 20:03:30 +00:00
Antony Dovgal 909ad657e1 BFN + change my mail to my name 2004-11-28 17:15:30 +00:00
Antony Dovgal 2abee83ee1 MFH: fix #29954 (array_reduce segfaults when initial value is array) 2004-11-28 17:12:59 +00:00
Stefan Esser a09961a655 MFH 2004-11-28 12:44:56 +00:00
Jon Parise 07392ae5f1 Distribute Net_SMTP 1.2.6 instead of 1.2.3. The former includes a year's
worth of additional bug fixes and improvements, and it has been a stable
release for over six months.

PEAR Bug: 2839
2004-11-27 21:31:10 +00:00
Ilia Alshanetsky 6fcaae369a MFH: Improve offset check inside shmop_write(). 2004-11-27 18:18:19 +00:00
Ilia Alshanetsky c30a032552 Back to dev. 2004-11-23 14:56:29 +00:00
Ilia Alshanetsky a3ee846047 RC1 release date. 2004-11-23 14:08:19 +00:00
Ilia Alshanetsky 6b59cbbdd7 tagging 4.3.10RC1 2004-11-23 14:03:27 +00:00
Edin Kadribasic 2cf6532d17 (Sort of) MFH: export PHP iconv symbols using the old build too 2004-11-23 12:14:20 +00:00
Derick Rethans fc627a4fa1 - MFH: export "php_iconv_string()" 2004-11-23 09:45:23 +00:00
Derick Rethans 0a2b8eb991 - MFH: Added test case for bug #28599 2004-11-23 09:41:53 +00:00
SVN Migration ec7db7ced2 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-11-23 09:40:08 +00:00
Frank M. Kromann 41dca25055 Fix #30860 configure fails when tds is compiled as shared 2004-11-22 19:42:31 +00:00
Marcus Boerger 57c2b685d7 - Add missing .cvsignore 2004-11-21 17:47:26 +00:00
Stefan Esser 4eb5de66a4 MFH 2004-11-20 20:16:44 +00:00
Pierre Joye 0823cf28da - Entry for #30229 2004-11-20 13:40:30 +00:00
Pierre Joye 3775b78197 - Fix #30229, imagerectangle draw the corners twice, making it useless
with alpha channel.
  Fix it to work well with thick>1 as well, both filled and wired rectangle
2004-11-20 13:34:52 +00:00
Antony Dovgal be6160f0f9 BFN 2004-11-19 17:03:52 +00:00
Antony Dovgal 6db1b839c8 MFH: fix bug #30587 (array_multisort doesn't separate zvals before changing them) 2004-11-19 16:58:38 +00:00
Ilia Alshanetsky 581e6a7ea8 Fixed bug #30826 (Certain reference relations cannot be unserialized
properly).
2004-11-18 22:14:42 +00:00
Ilia Alshanetsky 4bd84a5e69 MFH: Gracefully handle allocation failure. 2004-11-17 23:43:31 +00:00
Pierre Joye b5d739b88b - Fix #30739, imagefill does not set back the alphablending mode 2004-11-17 17:13:42 +00:00
Edin Kadribasic ef30fa2ee0 Fix windows build 2004-11-17 00:10:26 +00:00
Frank M. Kromann 0e33da898f MFH: Fix win32 build. 2004-11-15 23:27:26 +00:00
Frank M. Kromann e018da1aa3 MFH: Avoid renaming of sprintf to php_sprintf 2004-11-15 23:26:40 +00:00
Derick Rethans 963d068fd5 - Cleaned up some of the locale mess:
* all internal use of sprintf, snprintf and the like will always
    use the . as thousands seperator (if php.h is included only!).
  * echo, printf() and sprintf() always render locale-aware
  * added the %F modifier for non-locale aware rendering for floats
2004-11-15 13:40:31 +00:00
Rainer Schaaf 189654d882 fixed Bug #29297
Configure now only allows to work with PDFlib up to PDFlib 4, as newer
PDFlib versions need the code from the PDFlib PECL module.
2004-11-13 23:42:08 +00:00
Antony Dovgal 4ac1241426 MFH: fix #30751 (phpinfo() shows the same ini path after reconfigure with --with-config-file-path) 2004-11-11 07:01:16 +00:00
Ilia Alshanetsky edd4e6525a MFH: Fixed bug #30750 (Meaningful error message when upload directory is not
accessible).
2004-11-11 00:40:18 +00:00
Wez Furlong 2c14b8fd21 MFH: CloseHandle 2004-11-10 20:28:27 +00:00
Ilia Alshanetsky 4c04d243da MFH: Fixed possible overflow. 2004-11-10 01:44:58 +00:00
Ilia Alshanetsky 9f38730cf9 MFH: Fixed crash inside cpdf_setdash() if called before page init. 2004-11-09 00:45:39 +00:00
Ilia Alshanetsky b9a5843251 MFH: Fixed possible crash on fstat() failure. 2004-11-08 04:55:14 +00:00
Marcus Boerger ac0a29b046 MFH Bug #30627 2004-11-04 20:17:25 +00:00
Derick Rethans 92c8f6ce9b - MFH: Fixed bug #30630: Added a BSD based strtod function that is
locale-independent. (PHP part)
2004-11-03 23:36:03 +00:00
Antony Dovgal cdac193f9f BFN 2004-11-03 13:42:51 +00:00
Antony Dovgal 81c614a1ef fix bug #30654 (persistent connection is deleted from hash if there was exclusive connection with the same credentials)
No need for MFB here - 5.x.x branches work fine.
2004-11-03 13:35:56 +00:00
Ilia Alshanetsky 21c8eb93ba MFH: Fixed bug #30658 (Ensure that temporary files created by GD are removed). 2004-11-02 16:42:13 +00:00
Ilia Alshanetsky e0fc58c29f MFH: Fixed open_basedir & safe_mode bypass inside readlink() function. 2004-11-02 00:38:07 +00:00
Ilia Alshanetsky a451f1c9e4 MFH: Fixed bug #30613 (Prevent infinite recursion in url redirection). 2004-11-01 04:56:10 +00:00
Andi Gutmans 26ed6ea8b2 - [PATCH] Bug fix for #29770, but for PHP 4.3.9 (Vladimir Zidar) 2004-10-29 00:38:44 +00:00
Antony Dovgal a4e90790c4 fix Win32 & Netware build 2004-10-28 05:05:57 +00:00
Antony Dovgal 2b2129c057 BFN 2004-10-27 12:06:13 +00:00
Antony Dovgal e4fadfcd89 MFH: fix bug #30388 (rename across filesystems loses ownership and permission info) 2004-10-27 12:01:20 +00:00
Wez Furlong 02b50acd93 Fix possible crash; patch by Kamesh Jayachandran 2004-10-27 11:11:28 +00:00
Wez Furlong 4ab0cd7dcb BFN 2004-10-26 09:31:20 +00:00
Wez Furlong 8cb520a855 Fix for Bug #29418 (double free when openssl_csr_new fails).
Also hook up MSHUTDOWN function which appears to have never been enabled.

Patch by Kamesh Jayachandran
2004-10-26 09:29:22 +00:00
Edin Kadribasic 06a0021a55 Revert Linux LFS patch 2004-10-22 10:46:07 +00:00
Edin Kadribasic 63b0419766 BFN 2004-10-22 00:00:41 +00:00
Edin Kadribasic 1701079235 BFN 2004-10-21 23:59:11 +00:00
Edin Kadribasic 9a27a01007 Enable LFS (large file support) for Linux. Support for other operating
systems can be added later. FreeBSD does not seem to require any
special compile flags to enable LFS.
Fixes #27792.
2004-10-21 23:47:59 +00:00
Edin Kadribasic 045499b31f MFH: bugfix #30133 2004-10-21 23:43:41 +00:00
Joe Orton bcb3eb98a8 MFH: Fix case where php_handle_aborted_connection was called
outside a try/end_try block (#25570).
2004-10-21 19:43:37 +00:00
Joe Orton 3b3ef4c5ee MFH: Fixed apache2* SAPI build against httpd 2.1. 2004-10-21 19:41:55 +00:00
Stanislav Malyshev 62e23967ee fix HEAD problem: if some output is attempted in shutdown,
it bails out from shutdown sequence, which is bad
2004-10-20 15:27:25 +00:00
Ilia Alshanetsky 5b683f14f5 MFH: Fixed bug #30475 (curl_getinfo() may crash in some situations). 2004-10-18 22:43:29 +00:00
Antony Dovgal 75ae21df6d BFN 2004-10-18 15:16:21 +00:00
Antony Dovgal f890a666a8 MFH: fix bug #30442 ( segmentation fault when parsing ?getvariable[][ ) 2004-10-18 15:08:46 +00:00
Ilia Alshanetsky db953cd7ff MFH: Fixed a bug in addslashes() handling of the '\0' character. 2004-10-17 18:41:30 +00:00
Sebastian Bergmann bf3ad32af1 MFH: Add *.gcda and *.gcno (from gcc -fprofile-{use|generate}) to .cvsignore. 2004-10-10 16:24:30 +00:00
SVN Migration 018f7b5094 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-10-10 16:10:39 +00:00
Antony Dovgal 2a4fc5e0ee MFH: fix possible segfault 2004-10-10 15:06:20 +00:00
Marcus Boerger 388504729f MFH speling 2004-10-08 19:03:14 +00:00
Ilia Alshanetsky a360086291 MFH: Fixed bug #30027 (Possible crash inside ftp_get()). 2004-10-05 23:55:21 +00:00
Ilia Alshanetsky 6abde062a9 MFH: Fixed bug #30281 (Prevent non-wbmp images from being detected as such) 2004-10-04 20:44:07 +00:00
Rasmus Lerdorf 972ec73cb1 Not sure when this BC breaking change snuck in, but the output method
didn't take an argument before and this compression argument is documented
to be optional but in the code it wasn't.  This patch fixes the BC break
by making the compression argument optional.
2004-10-01 19:18:40 +00:00
Magnus M��tt� 637a9710a1 The length should be passed to the function,
so no need to check it inside the function too.
Will also fix a compile failure with gcc 3.4.
2004-10-01 18:28:44 +00:00
Ilia Alshanetsky d564087e47 MFH: Make PHP_EOL constant available. 2004-10-01 14:27:13 +00:00
Antony Dovgal 9e8ce192df BFN 2004-09-30 15:02:06 +00:00
Antony Dovgal 48a22e8997 MFH: fix segfaults and bug #30282 and suppress compile warnings 2004-09-30 14:18:25 +00:00
Ilia Alshanetsky f3313b21b6 MFH: Fixed bug #30276 (Possible crash in ctype_digit on large numbers). 2004-09-30 01:24:03 +00:00
Ilia Alshanetsky 8f5de28871 MFH: Fix compilation 2004-09-29 12:40:09 +00:00
foobar c6a4f91836 - Fixed bug #30205 (Missing <unistd.h> in crypt() configure test). 2004-09-28 20:42:36 +00:00
Antony Dovgal e2cea361db MFH: fix bug #29652 2004-09-28 17:28:27 +00:00
Ilia Alshanetsky 545e42675d MFH: Fixed bug #30224 (Sybase date strings are sometimes not null
terminated).
2004-09-28 14:09:01 +00:00
Wez Furlong 70e1858a92 MFH: fix for #30057 2004-09-26 01:17:42 +00:00
Marcus Boerger 5a91c43301 MFH lib substituation 2004-09-25 15:32:20 +00:00
Marcus Boerger 98b81c2a4e BFN 2004-09-24 22:00:47 +00:00
Marcus Boerger c3f72d45ec - MFH Several serialize/unserialize fixes 2004-09-24 21:57:19 +00:00
Marcus Boerger 7952ed122a - MFH Several serialize/unserialize fixes
# first commit .re
2004-09-24 21:56:59 +00:00
Derick Rethans 6efc4c4940 - Backported Marcus' foreach() speedup patch from PHP 5.x. 2004-09-24 13:15:12 +00:00
Derick Rethans 31f503c1aa [0.25]
- Fixed some signed issues.
2004-09-24 13:07:18 +00:00
Ilia Alshanetsky 70b35bb580 MFH: Fixed bug #29913 (parse_url() is now binary safe). (Ilia) 2004-09-22 00:51:51 +00:00
Ilia Alshanetsky 13effac5aa Fixed minor version #. 2004-09-21 23:38:55 +00:00
Uwe Schindler 97dbc366c7 Fixed bug #29805 (HTTP Authentication Issues) 2004-09-21 22:00:39 +00:00
Ilia Alshanetsky 21d9578e52 Back to dev. 2004-09-20 23:29:49 +00:00
Ilia Alshanetsky ca25d91f13 4.3.9 2004-09-20 22:28:35 +00:00
Ilia Alshanetsky b663137e04 Prepare news file for release. 2004-09-20 22:27:55 +00:00
Ilia Alshanetsky 6175cec8a7 MFH: Fixed bug #30050 (Possible crash inside php_shutdown_config()). 2004-09-17 02:49:48 +00:00
Uwe Schindler 2b5c855143 Sorry REVERT bevor 4.3.9 is out because of not critical!!!! 2004-09-15 21:51:29 +00:00
Uwe Schindler 4fdd5249fb Fixed bug #29805 (HTTP Authentication Issues) 2004-09-15 21:25:31 +00:00
foobar 35b1b345c4 MFH: Test for bug #30069 2004-09-15 13:55:32 +00:00
SVN Migration 15b4d3dc78 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-09-15 13:54:17 +00:00
Rasmus Lerdorf ef6d751b04 Stefano did the real work tracking this one down 2004-09-14 06:10:02 +00:00
Ilia Alshanetsky 0938da3685 Back to dev. 2004-09-14 04:33:09 +00:00
Ilia Alshanetsky b30885d8a3 4.3.9RC3 2004-09-14 04:28:47 +00:00
Rainer Schaaf 4a202474ef undo of removal of these files.
The removal was done because of Bug #29297, but it was the wrong time to do this now.
2004-09-13 17:12:13 +00:00
Stefan Esser a975e43310 MFH 2004-09-13 16:00:50 +00:00
Rainer Schaaf 0abfed95e3 removed PDFlib extension from PHP_4_3 branch too (is available in PECL now). 2004-09-13 15:12:25 +00:00
Stefan Esser 3e7f149be6 MFH 2004-09-12 10:46:49 +00:00
Rasmus Lerdorf 18fdb3b33e Stop at the index on an unmatched [ 2004-09-09 16:07:53 +00:00
Ilia Alshanetsky 5949c3968e MFH: Adjusted input check. 2004-09-03 03:36:21 +00:00
Ilia Alshanetsky ab4433e348 MFH: Fixed bug #29925 (Added a check to prevent illegal characters in
session key).
2004-09-03 00:53:46 +00:00
Stanislav Malyshev d84d278900 this crashed if some of the shutdown handlers called some file stat function 2004-09-02 09:38:56 +00:00
Derick Rethans 8a17d68216 - MFH: Added test for bug #29944. 2004-09-02 06:34:12 +00:00
Sara Golemon 8c9126e101 MFH: Use user_agent ini setting if it's available. 2004-08-31 20:12:56 +00:00
Stanislav Malyshev 3a27e5a0c1 if not using Zend's alloc, don't touch _emalloc 2004-08-31 15:32:09 +00:00
Ilia Alshanetsky 8a12f7d72d back to dev. 2004-08-31 14:27:09 +00:00
Ilia Alshanetsky 54ec8a53d3 4.3.9RC2 2004-08-31 14:05:30 +00:00
Joe Orton 4265c3d6f4 MFH: Do not rely on handling of integers which might be outside the
range of a 32-bit signed long.
2004-08-31 12:13:41 +00:00
Joe Orton 51452106e7 MFH: fix gettimeofday() tests to not fail if the same time is
returned by successive calls.
2004-08-31 10:34:15 +00:00
Antony Dovgal 4ed862d6fb MFH: this file shouldn't be in the repository at all 2004-08-31 08:32:25 +00:00
Ilia Alshanetsky 62a06abf37 MFH: Added missing input validation to dio_write(). 2004-08-30 22:21:18 +00:00
Antony Dovgal 66b8788497 MFH: add testcase for bug #29893 2004-08-30 09:14:55 +00:00
SVN Migration bc7fd9511f This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-08-30 09:07:18 +00:00
Marcus Boerger 77b928515a MFH: Bugfix #29882 isset crashes on arrays 2004-08-29 16:53:32 +00:00
Sergey Kartashoff 4cebdf96d6 - A fix for building of shared mnogosearch module 2004-08-29 14:18:15 +00:00
Ilia Alshanetsky 92b51bfe9d MFH: Fixed a nasty resource/memory/disk-space leak when opening zlib files
via wrapper stacking ala compress.zlib://http://...
2004-08-26 23:36:11 +00:00
Thies C. Arntzen 5fd50121a2 @- Fixed bug #29838 Memory leak in sprintf argument swapping. (Thies)
# by backporting one line from HEAD.
2004-08-26 13:41:59 +00:00
Andrei Zmievski ef38483ca3 Rewrite cache clean-up using zend_hash_apply_with_argument(). 2004-08-25 20:47:40 +00:00
Ilia Alshanetsky 1efef3488f Fixed operations on remote bzip2 compressed files ala:
compress.bzip2://http://downloads.php.net/ilia/php-4.3.5RC1.tar.bz2

Patch by Wez (MFH from HEAD)
2004-08-25 14:22:48 +00:00
Sara Golemon 0d73873aad MFH (r1.160) TSRM fix 2004-08-25 04:42:54 +00:00
Andrei Zmievski 6c42291ed6 Implement periodic PCRE compiled regexp cache cleanup, to avoid memory
exhaustion.
2004-08-24 20:57:32 +00:00
Frank M. Kromann 70e839b911 Fix a possible crash in fbsql_database() if the function was called before a connection was made. 2004-08-24 18:00:05 +00:00
Ilia Alshanetsky 3bdf8fda7f MFH: Fixed possible crash inside dio_read(). 2004-08-23 17:27:53 +00:00
Ilia Alshanetsky 53b3b33aae Removed unneeded bits. 2004-08-20 13:52:15 +00:00
Ilia Alshanetsky a05ffc841e MFH: Added more missing cURL options. 2004-08-20 00:57:35 +00:00
Ilia Alshanetsky 1b480cd24b MFH: Fixed bug #29753 (mcal_fetch_event() allows 2nd argument to be optional). 2004-08-20 00:46:49 +00:00
Brian France 88e1d65564 [MFH] If you send a post with a content-type header and then the next post without the content-type header, raw_post_data will not be set. This is because SG(request_info).post_entry is set to the first requests function pointer which makes it follow the wrong code path. 2004-08-19 20:35:36 +00:00
Ilia Alshanetsky 64245f3654 MFH: Fixed bug #29727 (Added missing CURL authentication directives). 2004-08-18 21:30:40 +00:00
Antony Dovgal 74bbb513a2 typo in config.m4 (potential configuration problem with Stronghold) 2004-08-18 07:16:46 +00:00
Antony Dovgal 35bf13d97f fix #29625 (no quotes around the shell variable's value cause ./configure to fail) 2004-08-18 05:14:16 +00:00
Antony Dovgal 4d03a6980d MFH: fix more typos in php.ini 2004-08-18 05:05:23 +00:00
Ilia Alshanetsky a0902bfa37 Fixed bug #29719 (fgetcsv() has problem parsing strings ending with escaped
enclosures).
2004-08-17 14:10:03 +00:00
Antony Dovgal 2086644e2b MFH: fix typo 2004-08-17 10:58:34 +00:00
Ilia Alshanetsky 7be45c1573 MFH: Fixed bug #29594 (Use PHP's own tmpfile() implementation). 2004-08-16 23:08:54 +00:00
Zeev Suraski e749e406d8 *** empty log message *** 2004-08-16 12:34:46 +00:00
Zeev Suraski a7a797726e Fix an OLDIE fd leak 2004-08-16 12:23:06 +00:00
Rob Richards 541f96e1b6 BFN 2004-08-13 11:38:48 +00:00
Rob Richards 11d323faae Fixed bug #29599 (domxml_error segfaults another apache module) 2004-08-13 11:38:03 +00:00
Chuck Hagenbuch 61ff34a945 More spaces -> tabs. 2004-08-12 19:32:59 +00:00
Ilia Alshanetsky c6debc5600 MFH: Properly fix the msgno check inside imap_fetchbody(). 2004-08-12 19:20:19 +00:00
Chuck Hagenbuch d6316ebef3 MFH: fix. 2004-08-12 18:02:14 +00:00
Marcus Boerger 0e39d9932a MFH: Change to use md5_file() 2004-08-12 00:38:20 +00:00
Marcus Boerger 4577ef345d MFH: make bison --version independant 2004-08-11 23:56:56 +00:00
Ilia Alshanetsky c38946f838 MFH: Fixed memory leak. 2004-08-11 23:25:54 +00:00
Ilia Alshanetsky 9409252d3f back to dev. 2004-08-11 23:19:44 +00:00
Ilia Alshanetsky 2e63531d77 4.3.9RC1 is a go. 2004-08-11 22:42:47 +00:00
Ilia Alshanetsky 54b5111a98 Bug fixing news. 2004-08-11 22:40:46 +00:00
Sara Golemon bc8dccc7e2 MFH: Fix format specifiers 2004-08-11 04:31:03 +00:00
Andi Gutmans 8592a15028 - MF PHP_5_0 2004-08-10 07:00:11 +00:00
Moriyoshi Koizumi de231c928c - MFH: Bugfix #29493 (extract(array, EXTR_REFS) misbehaves with elements
referred twice or more times)
2004-08-10 06:04:12 +00:00
Ilia Alshanetsky ca19c39b62 MFH: Fixed bug #29581 (Typo inside php.ini comments for mysql.trace_mode). 2004-08-10 00:44:26 +00:00
Andi Gutmans 3dd7a7f8b4 - Update credits for PHP docs 2004-08-09 21:52:45 +00:00
Antony Dovgal 35a2f5306d MFH: remove all references to @ thing, as it's not recommended 2004-08-05 14:18:55 +00:00
Edin Kadribasic c008ca83c4 MFH: make it build on windows 2004-08-04 00:08:16 +00:00
Frank M. Kromann d0bfbece1a Oops. remember to save the project file before commiting. 2004-08-03 22:06:15 +00:00
Frank M. Kromann 1f13e32204 Updating library name to iconv.lib 2004-08-03 22:04:34 +00:00
Greg Beaver bcac9d3773 commit for win32 - binary so line endings are always preserved 2004-08-03 04:31:59 +00:00
Frank M. Kromann 041b586c59 Add missing header for def. of struct timeval. 2004-07-30 17:07:03 +00:00
Frank M. Kromann 77d6edf304 Adding new win32 globals to project 2004-07-30 17:06:07 +00:00
Frank M. Kromann bb1624acd9 Add missing header for win32 builds 2004-07-30 16:52:35 +00:00
Frank M. Kromann e212b6c56c Fix line endings 2004-07-30 16:49:38 +00:00
Wez Furlong 043fdb5fb1 MFH: win32 zts fix 2004-07-30 14:38:29 +00:00
Wez Furlong 429a6bc483 MFH: win32 zts fixes 2004-07-30 14:37:17 +00:00
Ilia Alshanetsky ef6cfdbec3 MFH: Fixed bug #29443 (Sanity check for wbmp detection). 2004-07-30 01:10:46 +00:00
SVN Migration 00f869c0a7 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-07-29 03:58:01 +00:00
Ilia Alshanetsky 7869874e5a MFH: Added missing comma. 2004-07-27 12:44:44 +00:00
Ilia Alshanetsky 7456da1533 MFH: Fixed bug #29349 (imagecreatefromstring() crashes with external GD
library).
2004-07-27 00:27:10 +00:00
Ilia Alshanetsky 9cb224eafe MFH: Fixed bug #29369 (Uploaded files with ' or " in their names get their
names truncated at those characters).
2004-07-25 19:19:32 +00:00
Edin Kadribasic cd774e73fb Fix .dsp 2004-07-23 02:43:10 +00:00
Edin Kadribasic 0d1c4f234b MFH: Updated version number 2004-07-23 02:28:51 +00:00
Ilia Alshanetsky 2b73a58a4c MFH: Fixed bug #29333 (output_buffering + trans_sess_id can corrupt output) 2004-07-23 02:05:55 +00:00
Stefan Esser f647379a3d MFH 2004-07-22 23:09:24 +00:00
SVN Migration 098de0df5d This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-07-22 22:39:00 +00:00
Edin Kadribasic 510a2806b3 MFH 2004-07-21 23:26:47 +00:00
Ilia Alshanetsky cc47667fb0 MFH: Fixed bug #29209 (imap_fetchbody() doesn't check message index). 2004-07-21 21:57:13 +00:00
Stefan Esser 42a50158bc Merge all not yet merged security fixes into the 4_3 branch 2004-07-21 16:25:37 +00:00
Moriyoshi Koizumi 6957c8ab5a - MFH (sapi_apache2.c: 1.41): request_dtor() should be called if a fatal
error occurs during activation phase.
# 4.3.8 patches need to be committed to this branch, otherwise...
2004-07-20 20:48:01 +00:00
Moriyoshi Koizumi 1802b2c9dd - MFH (ctype.c: 1.31): Correct range checks.
- MFH (ctype.c: 1.31): Normalize negative values.
2004-07-20 20:10:04 +00:00
Ilia Alshanetsky e3a480faf8 MFH: Fixed bug #29226 (ctype_* functions missing validation of numeric
string representations).
2004-07-20 01:03:34 +00:00
Ilia Alshanetsky 53cc10e1c2 MFH: Fixed bug #28633 (sprintf incorrectly adding padding to floats). 2004-07-18 17:29:45 +00:00
SVN Migration 619f6faa20 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-07-18 17:27:50 +00:00
Sara Golemon 184917eb1f Bugfix# 29114 Potential double free in php_stat 2004-07-16 05:08:15 +00:00
Ilia Alshanetsky 4bed8c9537 MFH: Fixed bug #28800 (strings beginning with "inf" improperly converted). 2004-07-16 02:24:46 +00:00
SVN Migration 235ef76a89 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-07-16 02:03:26 +00:00
Ilia Alshanetsky 9638f4c8ff MFH: Fixed Bug #29075 (strnatcmp() incorrectly handles whitespace). 2004-07-15 01:46:28 +00:00
SVN Migration d61681ffe8 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-07-15 01:26:04 +00:00
Edin Kadribasic bfe60f6a55 MFH: Made php -m output sorted case-insensitevly 2004-07-14 22:38:18 +00:00
Stefan Esser 53f837720f Ups... CAN-2004-0595 regression test went into wrong branch... 2004-07-14 11:32:47 +00:00
Marcus Boerger 5a3f8c4864 BFN 2004-07-13 19:33:35 +00:00
Marcus Boerger ca71f35892 BFN 2004-07-13 19:30:24 +00:00
Wez Furlong 14e3bbd0ca MFH: add missing break 2004-07-13 17:15:13 +00:00
Derick Rethans 2419d2e170 - Bump version numbers in the PHP_4_3 branch. 2004-07-13 12:58:49 +00:00
Timm Friebe c94734d283 - Fixed bug #29064 (Exact numeric/decimal/money datatypes lose precision)
- Fixed bug #27843 (sybase_query() triggers (spurious?) notices when
  query is a stored procedure)
- Fixed multiple memory leaks with sybase_unbuffered_query()
- Changed sybase_query() to ignore store_results = false in  buffering
  mode, it would yield unpredictable results
- Fixed sybase_unbuffered_query() when used with store_results = false
- Changed sybase_fetch_object() to ignore second argument when passed
  as NULL
- Made sybase_data_seek() error message more verbose
- Fixed memory leak in shutdown when not all rows where selected in an
  unbuffered query
CVS ----------------------------------------------------------------------
2004-07-12 21:07:21 +00:00
Antony Dovgal a47aa0e936 MFH: fix #28978 (multiple OCIBindByName on the same placeholder eats memory) 2004-07-12 07:42:41 +00:00
Andrey Hristov 87631a8713 news stuff 2004-07-11 21:38:56 +00:00
Andrey Hristov 6b2dc66a5b MFH:
fixing bug #29038
2004-07-11 21:30:19 +00:00
Andrey Hristov 9947c89d6e MFH:
fixed bug #28974 : overflow in array_slice()
The same kind of overflow appeared in array_splice(), substr() and
substr_replace()
2004-07-11 21:24:47 +00:00
SVN Migration 0fb6cde415 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-07-11 21:15:05 +00:00
Wez Furlong 9fb029f257 MFH: RIP: Greedy read problems 2004-07-10 10:54:27 +00:00
Ilia Alshanetsky aaaa6ce403 MFH: Fixed bug #29049 (array sorting via user function/method does not
validate it).
2004-07-08 17:07:25 +00:00
Ilia Alshanetsky 3e7cb1286f MFH: Fixed bug #29034 (wordwrap() returns a boolean when passed empty
string).
2004-07-06 22:16:47 +00:00
Sascha Schumann ff9097524c add 2004-07-05 11:44:19 +00:00
Sascha Schumann d8e1afab0b - revert to proper behaviour. The environment variable PHP_FCGI_CHILDREN
must be explicitly set to != 0 to make the fastcgi-enabled binary
  act as a standalone fcgi server.
2004-07-05 11:40:28 +00:00
Ilia Alshanetsky fea008a67f MFH: Fixed bug #28963 (Missing space for \0 in address allocation). 2004-07-04 16:53:02 +00:00
Pierre Joye 1857c0d17f - Fix #28984, using full transparent segfauls in imagefill
(NB: imagefill is broken in HEAD, same code)
- Add testcase
2004-07-03 15:32:33 +00:00
Wez Furlong a7067ff166 Fix #28996: unix sockets leak when connection fails 2004-07-02 17:23:07 +00:00
Zeev Suraski 8b504aad98 MFH (more or less) registry-based setting for the location of php.ini 2004-07-01 15:43:40 +00:00
Sterling Hughes 8dfbcec9a6 mfh 2004-07-01 06:51:48 +00:00
Frank M. Kromann 4b40bdbc00 Fix for #28512. news entry 2004-06-30 19:53:13 +00:00
Frank M. Kromann f4c286ce51 MFH: Fix for #28512. Allocate enough space to store data 2004-06-30 19:47:18 +00:00
Ilia Alshanetsky 549b2ae9fe MFH: Another instance where alloca() is not needed. 2004-06-30 13:43:22 +00:00
Ilia Alshanetsky d5edc8497b MFH: Do not use alloca() where it can be abused through user input. 2004-06-30 01:12:09 +00:00
Wez Furlong 8cafde7940 Fix for Bug #28964 fread "greedy" behaviour 2004-06-29 21:51:28 +00:00
Derick Rethans f864a93b00 - MFH: Fixed bug with leap year checking. 2004-06-28 14:35:41 +00:00
Ard Biesheuvel 1556fa2665 BFN 2004-06-28 11:30:03 +00:00
Ard Biesheuvel fe68f62429 Fixed bug #28897 (-1 returned as -0.000 for 64-bit scaled int) 2004-06-28 11:24:55 +00:00
Moriyoshi Koizumi 1d14c2f46f - This one should've been here, not in HEAD. 2004-06-26 17:06:22 +00:00
Uwe Schindler a4b9d8117f MFH: replace strncpy with strlcpy 2004-06-26 10:30:22 +00:00
Stefan Esser e7252868ce MFH 2004-06-26 07:47:30 +00:00
Edin Kadribasic 435da1b34e Memory leak fix (patch by Joe Orton) 2004-06-25 12:51:38 +00:00
Ilia Alshanetsky 0a968e6e62 MFH: Added missing safe_mode & open_basedir checks. 2004-06-24 00:48:56 +00:00
Sara Golemon 78e6f958af BFN and order fix 2004-06-23 23:31:18 +00:00
Moriyoshi Koizumi 384900bd89 - Modify test case for wider coverage. 2004-06-23 22:20:44 +00:00
Moriyoshi Koizumi a3a9ff1309 - Fix buf #28466 (mbstring_convert_variables() problem). 2004-06-23 22:07:01 +00:00
Sascha Schumann 0cc1014ebf - fix logic. if the client already sent us the cookie, we don't
need to send it again.  if the id has been changed, we need to
  update the client side.
2004-06-23 16:29:16 +00:00
Uwe Schindler aed8e18415 Addendum to bug #28878: change ini keys as PHP_INI_SYSTEM
Also: Adding "bucket" parameter to non-ini-keys, Elemination of double CONTENT_TYPE/_LENGTH environment variables
2004-06-23 13:05:12 +00:00
Andrei Zmievski 669897add1 pcre_info() is deprecated. Hence, update to pcre_fullinfo() and do more
rigorous checking of return values.
2004-06-22 22:20:38 +00:00
Ilia Alshanetsky 5584e5ef18 MFH: Fixed possible buffer overflow. 2004-06-22 20:27:50 +00:00
Uwe Schindler a84df36b1e Fix bug #28878: php.ini values in php4_execute 2004-06-22 15:55:05 +00:00
Uwe Schindler de54f321b3 Fix bug #28878: php.ini values in php4_execute 2004-06-22 15:37:55 +00:00
Ilia Alshanetsky cba1c57ac6 MFH: Added missing safe_mode check. 2004-06-21 22:53:59 +00:00
Sara Golemon 4240a5d3cf BFN 2004-06-21 19:34:58 +00:00
Sara Golemon 10a0500ad9 MFH: BugFix#28868 Wrapper hash not thread-safe 2004-06-21 19:33:48 +00:00
Jan Lehnardt 7e965d8661 - MFH (fix for #28847) 2004-06-19 20:37:55 +00:00
Stefan Esser 2d18951de4 Fixed some 64bit and other zend_parse_parameters bugs 2004-06-19 15:09:47 +00:00
Ilia Alshanetsky d2be511ea2 MFH: Fixed possible memory leak. 2004-06-18 00:44:40 +00:00
Ilia Alshanetsky b67e80ea4f MFH: Fixed bug #28818 (Apache 2 sapis do not export st_dev). 2004-06-18 00:37:02 +00:00
Brad House 3b9b9a4bbd merge name change from mcve -> monetra
add compatability layer for v3.2 functionality, so existing scripts
will work without any migration needed.
This patch has been sitting in PHP 5 for some time, and seems to
be working quite well. A quick backport of that patch to php4.
2004-06-17 03:16:59 +00:00
Ilia Alshanetsky 0a766591b8 MFH: Properly handly high ascii values in soundex(). 2004-06-17 00:17:52 +00:00
Ilia Alshanetsky 63dc7bd0ce New & improved strspn() & strcspn(), ~30% in most cases.
# In part based on patch by Alexander Valyalkin
2004-06-16 01:53:59 +00:00
Ilia Alshanetsky d564f6dda8 A faster & more memory efficient php_addslashes() implementation. 2004-06-15 02:02:45 +00:00
Edin Kadribasic 0314e61193 Part of fix for #28745: link agains extension against iconv 2004-06-13 01:02:31 +00:00
Greg Beaver 67d56970b9 MFH bugfixes 2004-06-12 06:16:17 +00:00
Greg Beaver 115ba4988e MFH: Installer and ErrorStack bugfixes/ErrorStack features 2004-06-12 05:50:51 +00:00
Ilia Alshanetsky 06c716589e MFH: hypot() is not experimental. 2004-06-10 19:38:26 +00:00
Derick Rethans 45b4b82fe4 - Fixed bug #28730 (Wrong website in configure output) 2004-06-10 14:48:46 +00:00
Ilia Alshanetsky 323a19116c MFH: Fixed bug #28723 (Fixed mbstring config.m4 to work on OSes where test
command does not support -e parameter).
2004-06-10 14:06:20 +00:00
Frank M. Kromann 1b88577508 MFH: Fix win32 build 2004-06-09 18:12:29 +00:00
Ilia Alshanetsky a7aa47c46d Correct alt text for easter egg logo. 2004-06-09 15:10:19 +00:00
Ilia Alshanetsky eef33e863b MFH: Fixed bug #28175 (Allow bundled GD to compile against freetype 2.1.2). 2004-06-09 14:50:33 +00:00
Ilia Alshanetsky 0f78991ac6 MFH: Fixed bug #28525 (gmp_powm() does not work with hexadecimal string
modulo represented as a string).
2004-06-09 14:39:36 +00:00
Ilia Alshanetsky d6d59e9609 MFH: Fixed memory leak on error in win32's opendir() emulation. 2004-06-09 14:18:16 +00:00
Greg Beaver 0fba197478 MFH partial fix, bug #1163: rpm build doesn't build properly 2004-06-08 18:26:32 +00:00
Greg Beaver eae73713eb MFH fix bug #1550: Builder does not set path to match bin_dir 2004-06-08 18:15:22 +00:00
Greg Beaver f6c1bcfb4d MFH fix bug #1378: user/pass must be urldecoded from parse_url in Remote.php 2004-06-08 18:04:00 +00:00
Greg Beaver d8afde1799 MFH
fix bug #1158
fix bug #1153
2004-06-08 17:56:45 +00:00
Ilia Alshanetsky 70ad496213 MFH: Fixed bug #28692 (\0 in Authenticate header passed via safe_mode). 2004-06-08 13:23:46 +00:00
Ilia Alshanetsky 4d861228c3 MFH: Fixed bug #28668 (glob() does not work with relative paths on Windows) 2004-06-07 18:31:15 +00:00
Ilia Alshanetsky a21f7c4998 MFH: Fixed bug #28670 (WWW-Authentication header mangling with PCRE in
safe_mode adds extra spaces).
2004-06-07 13:51:59 +00:00
Sara Golemon 2080e2fb4a Missing length limit parameter. 2004-06-07 04:42:40 +00:00
Ilia Alshanetsky 80616e818e MFH: Fixed bug #28649 (Proper glob() return value on Linux when there are
no matches).
2004-06-06 16:21:30 +00:00
Ilia Alshanetsky 0b69477a1d MFH: Fixed bug #28632 (Prevent open_basedir bypass in MySQL's LOAD DATA
LOCAL).
2004-06-04 15:27:05 +00:00
Ilia Alshanetsky 08887c2067 MFH: Fixed bug #28627 (When multiple MySQL links are used default link is
leaked).
2004-06-04 13:49:44 +00:00
Sara Golemon 254451337c BugFix# 28626 You can't #ifdef check a typedef. Just give it another name since it's only used once anyway. 2004-06-04 01:02:21 +00:00
Ilia Alshanetsky c5eb0540e0 Back to dev. 2004-06-03 12:42:06 +00:00
Ilia Alshanetsky 2053bc60d2 Prepare for 4.3.7 release. 2004-06-02 13:25:45 +00:00
Ilia Alshanetsky 25f5ea0398 MFH: No need to NULL terminate manually, snprintf() does it for us already. 2004-06-01 21:05:33 +00:00
Ilia Alshanetsky 1618452e53 MFH: Fixed bug #28597 (xmlrpc_encode_request() incorrectly encodes chars in
200-210 range).
2004-06-01 20:16:18 +00:00
Andrei Zmievski 307eedeffe *** empty log message *** 2004-06-01 16:55:55 +00:00
Ard Biesheuvel aad180c93f #28569 2004-06-01 01:12:01 +00:00
Ard Biesheuvel b38423c7f6 MFH: Fixed bug #28569 (connection id is not thread safe) 2004-06-01 00:52:22 +00:00
Ilia Alshanetsky f62069244a MFH: Added missing argument check. 2004-05-31 21:01:38 +00:00
Pierre Joye 6aecc4c6d6 - Missing ';' 2004-05-31 20:59:57 +00:00
Ard Biesheuvel a8d2d22d9b Fix build 2004-05-31 08:33:43 +00:00
Ilia Alshanetsky 8f5c250266 MFH: Fixed memory leak on ifx_error(). 2004-05-30 18:58:49 +00:00
Ilia Alshanetsky 8ee3553aa4 MFH: Fixed bug #28564 (Problem building informix as a shared extension). 2004-05-30 17:57:37 +00:00
Brad House 12e1c89041 Manually check for egrep 2004-05-30 14:33:16 +00:00
Ilia Alshanetsky 40329bff38 MFH: Fixed bug #28311 (Transparency detection code is off by 1). 2004-05-28 13:47:26 +00:00
Stefan Esser b9d3aafe55 MFH 2004-05-28 13:38:19 +00:00
Stefan Esser 7966bb1186 MFH 2004-05-28 11:33:42 +00:00
Ilia Alshanetsky 5e2f6ea744 MFH: Turn off session.auto_start to prevent test failures. 2004-05-26 18:23:23 +00:00
Ilia Alshanetsky 354eff7e1e MFH: Prevent test failure when fi_FI locale is not available. 2004-05-26 18:18:19 +00:00
Ilia Alshanetsky 9a5f0ef61a Fixed test failure due to incorrect library check. 2004-05-26 18:08:32 +00:00
Wez Furlong df0d52bd78 Fix build 2004-05-26 12:29:56 +00:00
Derick Rethans baed8167d6 - MFH: Fixed bug #28523 (Typo in ext/sockets/sockets.c) 2004-05-26 06:54:00 +00:00
Stefan Esser 47b6b1e28a MFH 2004-05-25 22:13:10 +00:00
Brad House a063cc2956 PHP_SETUP_OPENSSL is NOT SNMP_SHARED_LIBADD, it's MCVE_SHARED_LIBADD
requires AC_PROG_EGREP when you phpize
2004-05-25 17:05:57 +00:00
Ilia Alshanetsky 5e5de1960f Back to dev. 2004-05-25 13:52:04 +00:00
Ilia Alshanetsky 893aee30e8 Prepare for 4.3.7RC1. 2004-05-25 13:02:53 +00:00
Pierre Joye 30b2af9511 - MFH: Fix #28506, negative angle returns "random arcs"
while (s < 0) s += 360 is used now
2004-05-24 20:03:08 +00:00
Ilia Alshanetsky 03edfa1677 MFH: Fixed bug #28508 (Do not make hypot() available if not supported by
libc).
2004-05-24 17:02:31 +00:00
Wez Furlong 1a9d759fc4 BFN 2004-05-23 11:05:17 +00:00
Wez Furlong b8a8640846 MFH: Bugfix for #23220: IIS messes up SSL shutdown 2004-05-23 10:43:15 +00:00
Stefan Esser e384ab1666 MFH. 2004-05-23 10:15:24 +00:00
Edin Kadribasic c50ef2e715 The other bit of MFH 2004-05-21 21:00:19 +00:00
Timm Friebe f17eff3a6c - MFH: Fixed bug #28354 2004-05-21 20:30:44 +00:00
Timm Friebe e7e54fccac - MFH: Fixed TSRM build 2004-05-21 19:39:01 +00:00
Derick Rethans 9c488ef4f2 - MFH: Fixed TSRM problem in latest commit. 2004-05-21 08:16:26 +00:00
Derick Rethans 5a3baf610b - MFH: Fixed bug #28456 (Problem with enclosed / in uploaded files). 2004-05-21 08:14:24 +00:00
Ilia Alshanetsky 9dd0472573 MFH: Fixed stream leak on error. 2004-05-20 23:38:05 +00:00
Ilia Alshanetsky 900eaa32f3 MFH: Free vars before calling E_ERROR. 2004-05-20 00:11:33 +00:00
Ilia Alshanetsky 8635889231 MFH: Fixed possible memory leak. 2004-05-18 23:27:03 +00:00
Ilia Alshanetsky c0cea96139 MFH: Fixed command line escaping routines for win32. 2004-05-18 13:43:33 +00:00
Edin Kadribasic 45fa60d315 MFH 2004-05-18 12:17:40 +00:00
Ilia Alshanetsky b7479f6c29 MFH: Correct output. 2004-05-17 20:59:07 +00:00
Derick Rethans 27c3401da5 - MFH: Document the smtp_post setting in php.ini* 2004-05-17 16:31:14 +00:00
Marcus Boerger 8761f766d4 MFH: Fix printf with floats 2004-05-16 21:20:30 +00:00
Timm Friebe 22214bc11e - MFH: Fixed auto-conversion from long to double when LONG_MAX /
LONG_MIN where overflown
2004-05-16 20:36:41 +00:00
Ilia Alshanetsky 5eaf82b6eb MFH: Do not allocate error buffer at the start of every request. 2004-05-16 15:34:56 +00:00
SVN Migration f93672da8e This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-05-16 14:48:46 +00:00
Ilia Alshanetsky 7be44d2b6d MFH: Added missing safe_mode & open_basedir checks. 2004-05-16 14:38:26 +00:00
Brad House e864dc5b13 update config.m4 for libmonetra 4.0 compatability.
Library no longer has MCVE_ symbols, the header file has #define\'s to
convert MCVE_ -> M_ to reflect the Monetra name change from MCVE.
More updates to follow.
2004-05-16 03:01:38 +00:00
Ilia Alshanetsky 41da69f20f MFH: Fixed possible memory leak inside popen(). 2004-05-14 16:12:06 +00:00
Ilia Alshanetsky 879cbe7961 MFH: Fixed bug #28386 (wordwrap() wraps lines 1 character too soon). 2004-05-13 17:44:33 +00:00
SVN Migration 739846a6a8 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-05-13 17:44:24 +00:00
Ilia Alshanetsky e5d7aef143 MFH: Make isapi more compatible with apache sapis as far as the creation
$_COOKIE super-global and various $_SERVER values.
2004-05-13 17:21:42 +00:00
Edin Kadribasic 47692de95f Make curl compile with the latest win32 libcurl 2004-05-13 16:54:45 +00:00
Ilia Alshanetsky 6be3e2d751 MFH: Skip session tests if session.save_path is not writable. 2004-05-13 12:53:49 +00:00
Ilia Alshanetsky e69edbeac2 MFH: Fixed various possible memory leaks. 2004-05-12 20:17:21 +00:00
Ilia Alshanetsky 86b31b56de MFH: Fixed bug #28374 (Possible unterminated loop inside
_php_pgsql_trim_message()).
2004-05-12 16:49:56 +00:00
Wez Furlong efb6da662d Avoid Bug #28363 by not seeking if we don't have a read buffer 2004-05-12 10:46:30 +00:00
Ilia Alshanetsky 7f8bbde609 MFH: Make vprintf() and printf() return the length of the string printed. 2004-05-11 19:51:50 +00:00
Ilia Alshanetsky 338de41cf9 MFH: Fixed bug #28355 (glob() does not return error on Linux when it does
not have permission to open the directory).
2004-05-11 13:34:31 +00:00
Ilia Alshanetsky 139deb5ddb MFH: Fixed crash inside cpdf_place_inline_image() when working with
truecolor images.
2004-05-10 22:13:39 +00:00
Marcus Boerger 6d859da0da MFH Decouple NAN and INF 2004-05-10 07:25:11 +00:00
Ilia Alshanetsky 8f242bb48b Added missing upgrade bit. 2004-05-10 02:19:22 +00:00
Marcus Boerger 7afbc02392 BFN 2004-05-10 02:12:17 +00:00
Marcus Boerger e3aa91d3f3 MFH Fix problems with c mode 2004-05-10 01:47:51 +00:00
Ilia Alshanetsky 8838b0f114 MFH: Fixed bug #28289 (incorrect resolving of relative paths by glob() in
windows).
2004-05-09 19:01:27 +00:00
Ilia Alshanetsky 349514ed2d MFH:
Upgrade bundled GD library to 2.0.23.
Fixed bug #28175 (build problem for people using FreeType 2.1.0-2.1.2).
2004-05-09 17:34:02 +00:00
Sara Golemon d676db7541 MFH: if statement logic would never eval to false. 2004-05-08 06:01:11 +00:00
Ard Biesheuvel b7c800e6fb MFH: fixed unregistered pointer juggling bug 2004-05-07 15:17:12 +00:00
Uwe Schindler ba9faa42a0 Security fix: Put '\0' string termination before loop 2004-05-03 12:22:54 +00:00
Stefan Esser 164703f306 MFH 2004-05-02 10:17:36 +00:00
Marcus Boerger a9d700c5c7 MFH Bugfix #28229 (PATCH run-tests tripped up by spaces in names) 2004-04-30 17:54:45 +00:00
Greg Beaver a750e94013 MFH fix included files and put error messages in PEAR_Downloader where they are needed 2004-04-30 16:37:41 +00:00
Ilia Alshanetsky bbf5e08fa3 MFH: Fixed bug #28228 (number_format() does not allow empty decimal
separator).
2004-04-30 13:26:06 +00:00
SVN Migration 1be1a0b472 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-04-30 13:26:02 +00:00
Greg Beaver 072961be7b MFH update to begin process for next release (release is not imminent) 2004-04-30 02:09:01 +00:00
Greg Beaver 9f7829fb47 MFH fix 1186: notice in PEAR_Common undeclared $_packageName 2004-04-30 02:05:47 +00:00
Ilia Alshanetsky 80dfa0ba37 MFH: Fixed bug #28196 (missing error constants in cURL extension). 2004-04-29 16:25:54 +00:00
Sara Golemon d1be87446b MFH Don't strip off those []s, it'll only create problems in wrappers and elsewhere. 2004-04-27 19:28:21 +00:00
Sara Golemon 4c9527044b MFH BugFix 28187 parse_url does not handle scheme://[0123:4567::89]:12345/etc style IPv6 embedded address URLs 2004-04-27 19:21:36 +00:00
Ilia Alshanetsky 7de0f803d1 MFH: Removed C++ style comments. 2004-04-27 17:34:05 +00:00
Ilia Alshanetsky 208a735a85 MFH: Fixed bug #28184 (C++ comments in GD library sources). 2004-04-27 14:59:25 +00:00
Derick Rethans 58466f957f - Fixed bug #28147 (Crash with drawing anti-aliased lines) 2004-04-25 19:43:30 +00:00
Derick Rethans 06fd453fb9 Reorder NEWS 2004-04-23 18:20:39 +00:00
Rasmus Lerdorf 2d9549455d bug #27810 from Joe Orton 2004-04-23 17:51:39 +00:00
Ilia Alshanetsky 7aa63c6209 MFH: Fixed bug #28087 (Do not force mysql.trace_mode to 0 on every request) 2004-04-23 17:04:36 +00:00
Marcus Boerger bc594f1506 BFN 2004-04-22 22:53:18 +00:00
Ilia Alshanetsky b5d2a4aa12 MFH: Fixed possible crash inside pg_copy_(to|from) function if delimiter is
more then 1 character long.
2004-04-22 00:32:07 +00:00
Ilia Alshanetsky a20b67c30f Correct news entry order. 2004-04-21 00:12:12 +00:00
Ilia Alshanetsky 1aad1b4291 MFH:
Fixed possible memory leaks.
	Prevent shm_attach() from destroying non-shm resources.
2004-04-21 00:11:30 +00:00
Frank M. Kromann 6fc504ce16 mssql related fixes 2004-04-20 23:54:20 +00:00
Frank M. Kromann b24de2d58a MFH: Fix #28007. Compile fails when the SHORT type is undefined (older versions of FreeTDS) 2004-04-20 23:37:26 +00:00
Frank M. Kromann 4c5521ad81 MFH: Fix problem getting return value from stored procedure when it returns multiple results 2004-04-20 23:31:39 +00:00
Wez Furlong 808dee23d7 news! 2004-04-19 13:37:43 +00:00
Wez Furlong 4c722bee9c MFH: timeout duration too long in liveness checks for sockets.
Fixes Bug #28055
2004-04-19 12:43:26 +00:00
Derick Rethans 19db79ff1d - Fix for bug #28042 (greek letters in html to entitity mapping not correct) 2004-04-17 23:07:27 +00:00
Uwe Schindler e3727d1061 MFH: set Sybase default APPNAME to ("PHP " PHP_VERSION) 2004-04-16 16:28:01 +00:00
Ilia Alshanetsky 43d81b700a MFH: Fixed test failure if session.use_trans_sid is enabled. 2004-04-15 13:37:58 +00:00
Ilia Alshanetsky a6ea6cc87c Fixed bug #27995 (imagefilltoborder() stops the fill process prematurely).
# Already in PHP5
2004-04-14 22:40:16 +00:00
Ilia Alshanetsky 9f6f2471f0 Back to dev. 2004-04-14 16:39:03 +00:00
Ilia Alshanetsky 90adf3ec54 Prepare for 4.3.6 2004-04-14 15:00:36 +00:00
Edin Kadribasic de83567151 News update 2004-04-14 14:51:24 +00:00
Ilia Alshanetsky c6af3e463a MFH: Fixed bug #27963 (Session lifetime setting may leak between requests). 2004-04-13 18:23:10 +00:00
Derick Rethans 09d9532952 - MFH: Add default fontpath for win98/xp 2004-04-12 21:43:19 +00:00
Greg Beaver 4e9e5c1913 re-organize as per PEAR-Core discussion 2004-04-09 07:43:52 +00:00
SVN Migration 9a9864a0e9 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-04-09 07:38:49 +00:00
foobar 065d0986aa fix typo 2004-04-08 23:56:45 +00:00
foobar 8a088529c9 PHP_ADD_LIBPATH checks that the path is not /usr/lib.. 2004-04-08 23:54:10 +00:00
Andi Gutmans 908f37b08b - News 2004-04-08 21:23:31 +00:00
Derick Rethans ea2fa14acb - Added missing CEST zone 2004-04-08 19:21:46 +00:00
Ilia Alshanetsky ebf7a4f847 Back to dev. 2004-04-08 19:15:13 +00:00
Ilia Alshanetsky 46d273a2b9 4.3.6RC3 2004-04-08 19:13:58 +00:00
Ilia Alshanetsky 4293672558 Prepare news file for release. 2004-04-08 12:42:29 +00:00
Ilia Alshanetsky f5865d02d0 Missing news entries. 2004-04-07 22:44:07 +00:00
Edin Kadribasic cf3d459815 Merged wrongly s/#ifdef/#if/ 2004-04-07 22:31:29 +00:00
Edin Kadribasic fcfe6ff818 MFH: Allow compilation with gdlib 1.8 2004-04-07 22:28:29 +00:00
Ilia Alshanetsky 88b30630b2 Removed test for a problem inside the GD library. 2004-04-07 20:52:44 +00:00
Adam Dickmeiss 9d4bd52adf Fixed bug #27803 (YAZ lib path) 2004-04-07 19:37:22 +00:00
foobar bf45f6d5ba MFH: Revert the patch to "fix" #27664 and added more informal error msg. 2004-04-07 13:56:48 +00:00
Greg Beaver 76c42836b2 developer -> lead for cellog 2004-04-07 00:29:46 +00:00
Greg Beaver fd4dea3500 MFH 2004-04-06 23:22:16 +00:00
Greg Beaver c1134d6bb9 change release date 2004-04-06 22:09:05 +00:00
Derick Rethans 9166d10260 - Update NEWS with fugbix. 2004-04-06 18:12:03 +00:00
Rob Richards fa843198d4 Fix Bug #27769 crash using domxml_xmltree 2004-04-06 17:56:11 +00:00
foobar e5a94e640e update credits 2004-04-06 10:10:41 +00:00
foobar 3a95b4b173 rtd 2004-04-06 09:38:27 +00:00
Ilia Alshanetsky 8a6f9ab5c0 Back to dev. 2004-04-05 15:43:52 +00:00
Ilia Alshanetsky 9a87c59f72 Prepare for 4.3.6RC2 2004-04-05 15:34:37 +00:00
Ilia Alshanetsky 831caad432 Restore wddx tests, without the troublesome date conversions. 2004-04-05 14:10:19 +00:00
Moriyoshi Koizumi 0ef09b9609 - MFH(r-1.49): Let it work safely 2004-04-04 19:23:43 +00:00
Moriyoshi Koizumi df1e5064e7 - Remove test, as it's never worked as expected. 2004-04-04 19:19:45 +00:00
Ilia Alshanetsky ad63c6c086 MFH: Fixed a bug that prevented building of the GD extension against
external GD lib 1.X.
2004-04-04 18:00:23 +00:00
Derick Rethans 8d802f10f0 - MFH: Fixed comment and double 0 2004-04-04 12:45:34 +00:00
Derick Rethans 6c192034a2 - MFH: One more test for DST bugs. 2004-04-04 12:43:17 +00:00
SVN Migration 3bab4824f0 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-04-04 12:42:14 +00:00
Marcus Boerger 951f80976b MFH: Add comment 2004-04-04 12:31:38 +00:00
Ard Biesheuvel 0e00c049c7 MFH: gcc-2.95/sparc test 2004-04-04 10:24:09 +00:00
Derick Rethans e85ca0efce - Fixed bug #27849 (configure craps out on trivial syntax error). 2004-04-03 17:23:14 +00:00
Greg Beaver 56c1fec8d8 MFH
fixed #534 for real (remove notice if state=stable doesn't exist, and use "none" for stable version number)
2004-04-03 15:56:11 +00:00
Ard Biesheuvel 4b1deca2e1 2nd try for glibc2.2/sparc64 2004-04-03 12:37:45 +00:00
Ard Biesheuvel c40ac6b268 Changed test to include returning HUGE_VAL as well (intended to resolve #27830) 2004-04-03 09:46:20 +00:00
Greg Beaver 8e07a4fd52 MFH
fix Bug #937 throwError() treats every call as static
fix Bug #964 PEAR_ERROR_EXCEPTION causes fatal error
2004-04-03 06:28:48 +00:00
Greg Beaver 5336ad6dbd MFH fix #534: pear search doesn't list unstable releases 2004-04-03 06:09:27 +00:00
Greg Beaver e1fa70df9a not devel any more 2004-04-03 00:42:14 +00:00
Ilia Alshanetsky 85923625fe Fixed bug #27730. 2004-04-02 16:54:44 +00:00
Derick Rethans de9e6e1f1b - Fixed unintialized variables. 2004-04-02 09:33:49 +00:00
Ilia Alshanetsky b145f87d40 MFH: Fixed reversed condition for error reporting. 2004-04-01 22:05:38 +00:00
Ilia Alshanetsky f579d02059 Back to dev. 2004-04-01 21:48:32 +00:00
Ilia Alshanetsky 2058fec25b Prepare for 4.3.6RC1. 2004-04-01 20:51:34 +00:00
Derick Rethans 6c63a9e153 - Fixed bug #27780 (strtotime(+1 xxx) returns a wrong date/time) 2004-04-01 20:35:41 +00:00
Ilia Alshanetsky 4de55b50dc Revert patch for bug #27782. 2004-04-01 19:07:02 +00:00
Ilia Alshanetsky bbdbfa8563 Bug fixing news & test for bug #27819. 2004-04-01 17:49:21 +00:00
Derick Rethans cc5e0df571 - MFH: Fixed bug #27822 (is_resource() returns TRUE for closed resources) 2004-04-01 08:56:33 +00:00
SVN Migration d528916296 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-04-01 08:54:45 +00:00
Ilia Alshanetsky 0cd7e11430 Bug fixing news. 2004-03-31 23:27:40 +00:00
Ilia Alshanetsky 772523e4a8 MFH: Fixed bug #27809 (ftp_systype returns null on some ftp servers). 2004-03-31 20:44:04 +00:00
Hartmut Holzgraefe 5f1a942add MFH 2004-03-31 17:59:28 +00:00
Ilia Alshanetsky ddbc35b39c MFH: Fixed bug #27802 (default number of children to 8 when
PHP_FCGI_CHILDREN is not defined).
2004-03-31 17:01:45 +00:00
Ard Biesheuvel ea3c36078c MFH 2004-03-31 10:31:43 +00:00
Ilia Alshanetsky 24e9c2b3ff MFH: Fixed bug #27782 (Wrong behaviour of next(), prev() and each()). 2004-03-30 19:09:10 +00:00
SVN Migration 6241abce94 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-03-30 19:08:44 +00:00
Frank M. Kromann 53b5689016 MFH: Fix for #27764. Get return value from a stored procedure not returning any result sets 2004-03-30 17:54:38 +00:00
Stanislav Malyshev 7eed89deb7 Disabled calling dtors on tsrm_shutdown - calling dtors in tsrm_shutdown makes
modules registering TSRM ids to crash, if they have dtors,
since the module is unloaded before tsrm_shutdown is called.
Can be re-enabled after tsrm_free_id is implemented.
2004-03-30 16:54:20 +00:00
Ilia Alshanetsky 06f91140fe Bug fixing news. 2004-03-30 13:43:53 +00:00
Wez Furlong 0825bb2386 Fix for Bug #27762: SCO Openserver doesn't have S_ISSOCK
Possible side effect from this is that CLI scripts run from inetd won't
realize that stdin/stdout are sockets.  But thats not our problem.
2004-03-30 11:04:32 +00:00
Marcus Boerger 64fe4952b6 MFH: NAN==NAN doest work (Ard) 2004-03-29 23:26:32 +00:00
Ilia Alshanetsky 96b2eaca0d MFH: Removed extra spaces that cause the test to fail. 2004-03-29 21:57:54 +00:00
Wez Furlong ffe1113b3d Fix for Bug #26757: session.save_path default is bogus for win32
Based on a patch found in the bug report.
Concept approved by Ilia.
2004-03-29 21:28:47 +00:00
Ilia Alshanetsky db9a8f2f5e Bug fixing news. 2004-03-29 19:35:19 +00:00
Marcus Boerger 6efb1b369c MFH: Found a NAN/INF solution that should be portable everywhere(?) 2004-03-29 19:03:59 +00:00
Frank M. Kromann 538a818db0 MFH: Fix for #27743. Make sure Money types are converted and returned correct 2004-03-29 18:33:13 +00:00
Ilia Alshanetsky 9934670186 MFH: Synchronized bundled GD library with GD 2.0.22. 2004-03-29 18:21:00 +00:00
Ilia Alshanetsky 89206cfca4 MFH: Fixed bug #27731 (error_reporting() inside @ block fails to set
error_reporting level).
2004-03-29 00:52:20 +00:00
Ilia Alshanetsky cb8e1f16ee Fixed build. 2004-03-29 00:27:17 +00:00
Ilia Alshanetsky 1af4d7724f Fixed bug #27732 (Fixed compilation bug inside php_sab_info.h). 2004-03-29 00:09:34 +00:00
Marcus Boerger 7e941eefe8 MFH: Improve portability (idea by Ard) 2004-03-28 21:50:01 +00:00
Rasmus Lerdorf 885e837b2a - Merge whitespace and trivial changes from HEAD back to the branch so the
diff between HEAD and PHP_4_3 only shows feature changes
- Fix test case for bug #27719 (TZ=EST means no DST so the test was wrong)
2004-03-28 14:57:32 +00:00
Marcus Boerger 6a3fc10b05 MFH: Add new #undef's 2004-03-27 01:53:18 +00:00
Marcus Boerger e96b4d55bd BFN 2004-03-27 01:48:04 +00:00
Marcus Boerger 5188dd875f Fixed bug #27687 (Bug Adding Default Charset to 'text/*' Content-Type Header 2004-03-27 01:45:44 +00:00
Marcus Boerger 6f431d5d6d MFH: Move defines to proper location 2004-03-27 01:41:46 +00:00
Marcus Boerger 4e78551db1 Touch after .c 2004-03-27 01:28:00 +00:00
Marcus Boerger 9de151b2ce BFN 2004-03-27 01:18:40 +00:00
Marcus Boerger 91786ab7a5 MFH: bugfix #27646 2004-03-27 01:17:07 +00:00
SVN Migration 0bf404dbeb This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-03-27 00:50:42 +00:00
Derick Rethans e566c744d1 - MFH: Fix for bug #27717. 2004-03-26 22:14:35 +00:00
Ard Biesheuvel a96a6a2b7f Alignment fix 2004-03-26 20:53:09 +00:00
Ard Biesheuvel f51237d726 MFH 2004-03-26 20:07:34 +00:00
Ard Biesheuvel b1061c7443 MFH: Calculate pow(long,long) in a way that works on 64-bit platforms 2004-03-26 20:01:53 +00:00
Derick Rethans 5d3a542a08 - COmmit the test, not the diff 2004-03-26 19:50:45 +00:00
Ilia Alshanetsky 20c0fb5e9c MFH: Fixed bug #27664 (--disable-cli doesn't force --without-pear). 2004-03-26 19:48:53 +00:00
Derick Rethans e89ac09125 - Add test for #27719 2004-03-26 19:44:18 +00:00
Rasmus Lerdorf 94728f7301 The 2am offset was a bad choice as this hour doesn't necessarily exist
on a DST switch.  So use 4am instead.  Fixes bug #27719
2004-03-26 19:29:31 +00:00
Ilia Alshanetsky e65f145d46 Bug fixing news. 2004-03-26 19:07:49 +00:00
Ilia Alshanetsky 2986565c79 MFH: Fixes to allow curl extension to compile against libcurl 7.11.1 2004-03-26 19:04:17 +00:00
Ilia Alshanetsky e2088baab4 Back to dev. 2004-03-25 14:14:21 +00:00
Ilia Alshanetsky 3263cdd42e Go with 4.3.5 2004-03-25 13:57:01 +00:00
Ilia Alshanetsky c6a2f0628d Prepare NEWS file for 4.3.5 release. 2004-03-23 19:53:27 +00:00
Frank M. Kromann 39dc110f91 MFH Fix for #26589. Crash when selecting many columns of type Money 2004-03-19 18:47:02 +00:00
Greg Beaver a3b179d916 MFH update to 1.3.1dev 2004-03-19 03:16:45 +00:00
Greg Beaver 84b6a9dfb3 MFH new PEAR_ErrorStack and tests 2004-03-19 00:55:53 +00:00
SVN Migration c6b98d3891 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-03-19 00:48:40 +00:00
Ilia Alshanetsky 8621923a5e Back to dev. 2004-03-18 18:02:42 +00:00
Ilia Alshanetsky c096e54196 Go for PHP 4.3.5RC4 2004-03-18 17:17:25 +00:00
Ilia Alshanetsky 663841fd31 MFH: Fixed bug #27633 (Incorrect EOL translation by ftp_get() in ASCII
mode).
2004-03-18 17:15:47 +00:00
Uwe Schindler 02ab9ce41d hint to raise stacksize (bug #27231) 2004-03-18 13:37:41 +00:00
Ard Biesheuvel 442c6c9c6f Added myself 2004-03-18 10:55:35 +00:00
Ilia Alshanetsky 5df1e69be1 MFH: Fixed bug #27300 (Improved regex for pg_convert()). 2004-03-18 01:35:50 +00:00
Pierre Joye f7226bcc2d - Add entry, crash in imagecolortransparent 2004-03-17 17:26:13 +00:00
Pierre Joye 0b9b69be38 - MFH (crash in imagecolortransparent with invalid color index) 2004-03-17 17:25:24 +00:00
Ilia Alshanetsky 5888fd4024 MFH: Fixed bug #27498 (bogus safe_mode error on nonexistent directories for
chdir() and opendir() functions).
2004-03-16 23:23:26 +00:00
Ilia Alshanetsky 1b2b9a6a0d MFH:
Fixed bug #27580 (pre-initialization errors in ap2 handler are not
	being written to vhost error log).
	Stop using depreciated and ignored APLOG_NOERRNO directive.
	Make file not found & directory as script invocation error messages
	more descriptive.
2004-03-16 22:38:17 +00:00
Stanislav Malyshev a207ace664 MFH registry fixes:
fix off-by-one in registry per-dir values
add IniFilePath value for setting php.ini path via registry
2004-03-16 18:27:55 +00:00
Stanislav Malyshev 38b637bdfc MFH: export session globals 2004-03-16 18:21:02 +00:00
Ilia Alshanetsky a96582f13b MFH: Fixed bug #27600 (GCC 3.0.4 does not like __attribute__ directive). 2004-03-16 16:38:00 +00:00
Ilia Alshanetsky 8cf790dea1 MFH: Fixed bug #27559 (Corrected open_basedir resolving logic). 2004-03-16 00:32:09 +00:00
Jay Smith e58b48e89c MFH: Fixed bug #27291 (get_browser matches browscap.ini patterns
incorrectly).
2004-03-15 21:27:01 +00:00
Frank M. Kromann 210d34a088 MFH: Fix for #27594. Comuted columns does not return a column source 2004-03-15 19:45:39 +00:00
Rasmus Lerdorf ed5a974ab0 Forgot to add NEWS entries for these 2004-03-15 18:20:16 +00:00
Jon Parise bb7f2e4210 MFH 1.243:
Fixed crash in php_ini_scanned_files() when no additional INI files were
actually parsed.
2004-03-15 16:39:53 +00:00
foobar 31b2848051 BFN 2004-03-15 16:07:57 +00:00
Zeev Suraski 5ebe7edcb3 Add misisng library path 2004-03-15 10:04:12 +00:00
Ilia Alshanetsky ed68bc6095 Bug fixing news. 2004-03-14 20:12:17 +00:00
Sascha Schumann 6a9e52543b Renaming cvsclean target -- IRIX make seems to ignore the .PHONY target. 2004-03-14 17:43:46 +00:00
foobar f1c31423d7 reorder 2004-03-14 10:45:51 +00:00
Pierre Joye 441dc97d75 - missing restoreAlphaBleding declaration 2004-03-14 00:46:45 +00:00
Pierre Joye 8378373527 - entry for fix #27582 2004-03-13 23:41:00 +00:00
Pierre Joye d76514d892 - MFH bug #27582 (imagefilltoborder crashes) 2004-03-13 23:36:29 +00:00
SVN Migration 2bbfddb533 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-03-13 23:22:57 +00:00
Greg Beaver 85e5585a1c oops 2004-03-13 18:29:29 +00:00
Greg Beaver e6840ed921 fix #1008: safe mode raises warning
fix register_argc_argv in pear.bat
2004-03-13 17:34:36 +00:00
Sara Golemon cb20f5cafe BFN 2004-03-12 21:49:01 +00:00
Ilia Alshanetsky a95a14cebf MFH: Add checks of return values from user callback functions. 2004-03-12 17:43:17 +00:00
Rasmus Lerdorf 8b9cc5ba81 MFH
getopt() doesn't work if variables_order does not include "S" because it
  only looks in $_SERVER for argv.  So, if we don't find argv in $_SERVER
  fall back to looking in the global symbol table where register_argc_argv
  would have put it.
2004-03-12 17:42:09 +00:00
Rasmus Lerdorf 259a07f733 Fix/workaround for http://bugs.php.net/27533 2004-03-12 17:27:55 +00:00
Ilia Alshanetsky a9674113d1 MFH: Fixed bug #22127 (Invalid response code when force-cgi-redirect safety
mechanism is triggered).
2004-03-12 14:07:14 +00:00
Sara Golemon 168786cfcf Test getaddrinfo() for brokenness. Pretend it doesn't exist if it misbehaves. 2004-03-12 00:16:38 +00:00
Sara Golemon 3f43cfbb6a BFN 2004-03-11 18:44:26 +00:00
Moriyoshi Koizumi 93578a5789 - MFH (r-1.212): Revert ini setting patch as I notified in... 2004-03-10 20:56:07 +00:00
Rasmus Lerdorf 89eaec22b5 Make curl_setopt($ch,CURLOPT_RETURNTRANSFER,0) reset the RETURNTRANSFER to
stdout as is implied in the documentation.  Currently it simply does
absolutely nothing and there is no way to reset it to stdout.
2004-03-09 17:06:53 +00:00
foobar a99c6916f3 test for bug #27457 2004-03-09 14:20:14 +00:00
SVN Migration 30c8d9b166 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-03-09 14:19:51 +00:00
foobar 5a6d9048e5 order 2004-03-09 12:52:08 +00:00
Ilia Alshanetsky 0e9275fb37 MFH: Fixed bug #27530 (broken http auth when safe_mode is on and PCRE is
disabled).
2004-03-09 02:24:20 +00:00
Ard Biesheuvel b08b041503 Possible fix for #27408 (wordsize/alignment issue) 2004-03-08 18:52:40 +00:00
Ilia Alshanetsky 9c340ef86f MFH: Fixed bug #27424 (headers missing on flush() in apache 2 SAPIs). 2004-03-08 03:16:13 +00:00
Marcus Boerger baf702a009 MFH: recognize db-4.2.x 2004-03-08 00:01:03 +00:00
Ilia Alshanetsky 65ab4040fc MFH: Fixed bug #27421 (mbstring.func_overload should be system ini setting) 2004-03-06 19:30:35 +00:00
Ilia Alshanetsky c3d0c735b8 MFH: Fixed bug #27460 (base64_decode() does not handle extra padding). 2004-03-06 19:06:12 +00:00
Ilia Alshanetsky 1a5342e468 MFH: Fixed bug #27505 (htmlentities() does not handle BIG5 correctly). 2004-03-06 18:35:53 +00:00
Ilia Alshanetsky eeaaaf7fce Fixed bug #27437 (wrong freetype include inside GD library). 2004-03-06 18:26:06 +00:00
Pierre Joye 5dd18df5eb - Add #27238 entry 2004-03-06 17:47:16 +00:00
Pierre Joye 6deb70d17d - MFH #27238 fix (ilia ok) 2004-03-06 17:41:31 +00:00
Sara Golemon 5babe27344 MFH: Don't rely on ANSI tmpfile(), use the streams layer instead, it'll deal with platform issues. 2004-03-04 22:29:23 +00:00
Christian Stocker ac4adcc2f7 MFH (fix a linefeed problem, if more than one configureoption) 2004-03-04 13:38:10 +00:00
Derick Rethans 46e793d8dc - MFH: Fixed bug #27443 (defined() returns wrong type). 2004-03-01 08:11:46 +00:00
SVN Migration cc2149097f This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-03-01 08:07:26 +00:00
Anil Madhavapeddy cdb852e21f MFH 'pear install -R' fix, ilia@ ok 2004-02-29 15:59:18 +00:00
Ilia Alshanetsky c18cbd0f35 MFH: Remove unused variable. 2004-02-28 22:59:03 +00:00
Ilia Alshanetsky 40fe027642 MFH: Memory allocation check. 2004-02-28 21:00:40 +00:00
Greg Beaver 2184a5a584 MFH 2004-02-27 02:27:12 +00:00
foobar b2f06ce507 Remove bogus test: see bug #20993 2004-02-26 01:07:32 +00:00
foobar 80553d8fc7 typofix 2004-02-26 00:13:02 +00:00
Ilia Alshanetsky 5b4eeb628c MFH: Handle situation where feof() occurs before the HTTP header is
retrieved.
2004-02-26 00:03:57 +00:00
Ilia Alshanetsky 2af0c3bbdf MFH:
Fixed bug #21760 (Use of uninitialized pointer inside php_read()).
	Fixed 3 possible crashes due to integer overflow or invalid user input
	inside the sockets extension.
2004-02-25 22:12:03 +00:00
foobar d4e86c36ed MFH: Test for bug #27395 2004-02-25 18:54:33 +00:00
SVN Migration fe4a118383 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-02-25 18:54:16 +00:00
foobar ada04f382d MFH: ZTS build fix 2004-02-25 13:20:31 +00:00
foobar e1505662ad MFH: Fixed bug #27384 (unpack() misbehaves with 1 char string). (GeorgeS) 2004-02-25 12:36:24 +00:00
Ilia Alshanetsky 3766f870d4 MFH: Fixed bug #27383 (Potential crash inside fopen_wrapper, while parsing
response code).
2004-02-24 21:53:57 +00:00
Christian Stocker e4c30e6b89 fix for bug 27349 "Invalid parsing of CDATA sections in XSL templates" 2004-02-24 14:26:27 +00:00
foobar 9543e9c111 MFH: - Fixed bug #26005 (Random "cannot change the session ini settings" errors). 2004-02-24 08:49:41 +00:00
Ilia Alshanetsky d0551c2a7c MFH: Fixed bug #27341 (HEAD requests fail to return data). 2004-02-23 19:50:47 +00:00
foobar 66df106383 MFH: fixed bug #27337 (missing sapi_shutdown()) 2004-02-23 19:15:05 +00:00
Christian Stocker 4c6e92bdb8 skip test, if no XSLT support is compiled in 2004-02-23 10:33:51 +00:00
Derick Rethans b2732089f2 - MFH: Fixed bug #27354 (Modulus operator crashes PHP). 2004-02-22 20:07:17 +00:00
SVN Migration 8e8f8ece29 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-02-22 20:04:31 +00:00
Ilia Alshanetsky 7275b5a177 MFH: wbmp conversion warning fix. 2004-02-22 18:03:24 +00:00
Sara Golemon 5f0305e605 MFH 2004-02-21 19:37:59 +00:00
Sara Golemon 2a0e69c111 MFH: long is not always 32-bit 2004-02-20 21:09:08 +00:00
Greg Beaver 74c2e50253 stupid oversight, no 4.2 dep 2004-02-20 17:17:04 +00:00
Pierre Joye cb915e0498 - Update to DB-1.6.0 2004-02-20 15:38:29 +00:00
SVN Migration 3379ffa7ed This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-02-20 15:36:25 +00:00
Pierre Joye 0053324a83 - 1.3b6=>1.3 stable, prepare stable release 2004-02-20 15:33:59 +00:00
Ilia Alshanetsky a0c001aa70 MFH: missing safe_mode & open_basedir checks. 2004-02-20 01:09:25 +00:00
Greg Beaver 7b6a710bd0 MFH 2004-02-19 15:55:37 +00:00
Ilia Alshanetsky 221d4b346b MFH: Fixed possible resource/memory leak. 2004-02-19 02:20:14 +00:00
foobar 1e60e670ba MFH: emalloc -> safe_emalloc 2004-02-19 02:13:39 +00:00
foobar fdec1ab00e MFH: improve error message 2004-02-19 01:54:44 +00:00
Ilia Alshanetsky 1aac6063a4 MFH: Fixed bug #27295 (memory leak inside sscanf()). 2004-02-18 19:49:17 +00:00
SVN Migration 0808ccd417 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-02-18 19:48:14 +00:00
foobar 61c00477b4 MFH 2004-02-18 00:01:05 +00:00
SVN Migration 9ea8c7ddd4 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-02-18 00:00:37 +00:00
Ilia Alshanetsky d6cc9d4f01 MFH: Fixed bug #27293 (two crashes inside image2wbmp()). 2004-02-17 21:30:57 +00:00
Ard Biesheuvel c07cd30cd0 Really disallow persistent connections if ini option is set 2004-02-17 20:57:26 +00:00
foobar c9af2f28e2 - Fixed bug #26753 (zend_fetch_list_dtor_id() does not check NULL strings). 2004-02-17 10:39:17 +00:00
foobar ea54e26972 MFH 2004-02-16 17:44:55 +00:00
foobar 0ac2170517 typofix :) 2004-02-16 17:42:22 +00:00
Ilia Alshanetsky bd6b53c1d8 MFH: Fixed bug #27278 (*printf() functions treat arguments as if passed by
reference).
2004-02-16 17:09:52 +00:00
foobar ca90ec2cac MFH 2004-02-16 16:51:23 +00:00
SVN Migration 91abce9917 This commit was manufactured by cvs2svn to create branch 'PHP_4_3'. 2004-02-16 16:50:54 +00:00
Sergey Kartashoff 4cc252ca16 - A fix to make UDM_LIMIT_DATE work was applied. Thanks to
d.rousseau at nnx.com
2004-02-16 16:40:27 +00:00
Ilia Alshanetsky 1ed5d89106 Back to dev. 2004-02-16 16:03:35 +00:00
570 changed files with 49357 additions and 12049 deletions

No files matched your search

+10 -10
View File
@@ -148,9 +148,9 @@
* Changed all argument parsing to use the new zend_parse_parameters()
* If a function is unavailable due to lack of support for a certain
feature,
do not make the function avaliable, rather then making it print an
do not make the function available, rather then making it print an
error
saying that the functionality offered by the function is not avaliable.
saying that the functionality offered by the function is not available.
* Lots of WS fixes all over the file.
* Change strcpy() to strncpy() to prevent possible buffer overflows.
Fixed a bug in ncurses_pair_content(), 1st parameter was wrong.
@@ -1384,7 +1384,7 @@
2002-12-11 Ilia Alshanetsky <ilia@prohost.org>
* ext/exif/exif.c:
decode variable is only used when mbstring is avaliable.
decode variable is only used when mbstring is available.
* ext/openssl/openssl.c:
ZTS fix.
@@ -2193,7 +2193,7 @@
2002-12-04 Ilia Alshanetsky <ilia@prohost.org>
* ext/gd/gd.c:
MFH (build fix, when xpm support is not avaliable).
MFH (build fix, when xpm support is not available).
2002-12-04 Rasmus Lerdorf <rasmus@lerdorf.on.ca>
@@ -5864,7 +5864,7 @@
Compile warning fix.
* ext/mbstring/tests/overload.phpt:
Added a skip condition for when mail() function is not avaliable.
Added a skip condition for when mail() function is not available.
* ext/mbstring/tests/mb_send_mail05.phpt
ext/mbstring/tests/mb_send_mail06.phpt:
@@ -6758,7 +6758,7 @@
ext/standard/tests/strings/htmlentities07.phpt
ext/standard/tests/strings/htmlentities08.phpt
ext/standard/tests/strings/htmlentities09.phpt:
Added skip conditions in the event the required charset is not avaliabled.
Added skip conditions in the event the required charset is not availabled.
Removed old (commented out) module loading code.
* run-tests.php:
@@ -6766,11 +6766,11 @@
* ext/pspell/tests/01pspell_basic.phpt:
Added a skip condition if the English dictionary needed for the test is not
avaliable.
available.
* ext/pcntl/tests/001.phpt:
Added a skip condition in the event posix_kill(), which is used by the test
is not avaliable.
is not available.
* ext/exif/exif.c:
@@ -6903,7 +6903,7 @@
main/safe_mode.c:
Instead of checking whether realpath exists based on OS. Use the
HAVE_REALPATH define, which is set if realpath() is avaliable. This patch
HAVE_REALPATH define, which is set if realpath() is available. This patch
also resolves bug #18868.
2002-11-06 Sascha Schumann <sascha@schumann.cx>
@@ -9030,7 +9030,7 @@
* ext/standard/tests/strings/strtoupper.phpt:
Added 'skip logic' to the test on platforms where the locale required by
this test is not avaliable.
this test is not available.
2002-10-23 Melvyn Sopacua <msopacua@idg.nl>
+156 -135
View File
@@ -26,26 +26,33 @@ Status legend
== Server APIs ==
-------------------------------------------------------------------------------
EXTENSION: activescript
COMMENT: See http://pecl.php.net/package/PHPScript
-------------------------------------------------------------------------------
EXTENSION: aolserver
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: activescript
PRIMARY MAINTAINER: Wez Furlong <wez@php.net>
MAINTENANCE: Odd Fixes
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: apache
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: apache2
EXTENSION: apache2filter
PRIMARY MAINTAINER: Aaron Bannert <aaron@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: apache2handler
PRIMARY MAINTAINER: Aaron Bannert <aaron@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: caudium
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: cgi
MAINTENANCE: Unknown
STATUS: Working
@@ -54,9 +61,10 @@ EXTENSION: cli
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: fhttpd
MAINTENANCE: Unknown
STATUS: Unknown
EXTENSION: embed
PRIMARY MAINTAINER: Edin Kadribasic <edink@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: isapi
MAINTENANCE: Unknown
@@ -80,7 +88,7 @@ MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: servlet
PRIMARY MAINTAINER: Sam Ruby <rubys@us.ibm.com>
PRIMARY MAINTAINER: Sam Ruby <rubys@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
@@ -88,8 +96,12 @@ EXTENSION: thttpd
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: tux
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: webjames
PRIMARY MAINTAINER: Alex Waugh <alex@alexwaugh.com>
PRIMARY MAINTAINER: Alex Waugh <alexwaugh@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
-------------------------------------------------------------------------------
@@ -97,6 +109,11 @@ STATUS: Experimental
== Database extensions ==
-------------------------------------------------------------------------------
EXTENSION: db
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: dba
PRIMARY MAINTAINER: Marcus Börger <helly@php.net>
@@ -109,23 +126,19 @@ MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: dbx
PRIMARY MAINTAINER: Marc Boeren <M.Boeren@guidance.nl>
PRIMARY MAINTAINER: Marc Boeren <mboeren@php.net>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 4.0.6
COMMENT: DB abstraction for odbc, mysql, pgsql, mssql, fbsql and more, see documentation
-------------------------------------------------------------------------------
EXTENSION: filepro
EXTENSION: fbsql
PRIMARY MAINTAINER: Frank M. Kromann <fmk@php.net>
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: hyperwave
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: informix
PRIMARY MAINTAINER: Danny Heijl <Danny.Heijl@cevi.be>
PRIMARY MAINTAINER: Danny Heijl <danny@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
@@ -136,7 +149,7 @@ STATUS: Experimental
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: interbase
PRIMARY MAINTAINER: Jouni Ahto <jouni.ahto@exdec.fi>, Ard Biesheuvel <ard@ard.nu>
PRIMARY MAINTAINER: Jouni Ahto <jah@php.net>, Ard Biesheuvel <abies@php.net>
MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
@@ -144,23 +157,37 @@ EXTENSION: msql
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: msession
PRIMARY MAINTAINER Mark L. Woodward mlwmohawk@mohawksoft.com
MAINTENANCE: Maintained
STATUS: Working/Experimental
COMMENT: Tested on Linux, should work on other UNIX platforms. Backend server code can compile under Windows.
-------------------------------------------------------------------------------
EXTENSION: mssql
PRIMARY MAINTAINER: Frank M. Kromann <fmk@swwwing.com>
PRIMARY MAINTAINER: Frank M. Kromann <fmk@php.net>
MAINTENANCE: Maintained
STATUS: Working
COMMENT: Tested on phpts and isapi versions
-------------------------------------------------------------------------------
EXTENSION: mysql
PRIMARY MAINTAINER: Zak Greant <zak@mysql.com>, Georg Richter <georg@php.net>
PRIMARY MAINTAINER: Zak Greant <zak@php.net>, Georg Richter <georg@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: oci8
PRIMARY MAINTAINER: Antony Dovgal <tony2001@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: odbc
PRIMARY MAINTAINER: Dan Kalowsky <kalowsky@php.net>
MAINTENANCE: Maintained
STATUS: Working
COMMENT: Working
-------------------------------------------------------------------------------
EXTENSION: oracle
MAINTENANCE: Orphaned
STATUS: Working
COMMENT: Using the new OCI8 driver is encouraged where possible.
-------------------------------------------------------------------------------
EXTENSION: ovrimos
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: pgsql
PRIMARY MAINTAINER: Yasuo Ohgaki <yohgaki@php.net>
MAINTENANCE: Maintained
@@ -175,61 +202,25 @@ EXTENSION: sybase_ct
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: oci8
PRIMARY MAINTAINER: Antony Dovgal <tony2001@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: odbc
PRIMARY MAINTAINER: Daniel R. Kalowsky <kalowsky@php.net>
MAINTENANCE: Maintained
STATUS: Working
COMMENT: Working
-------------------------------------------------------------------------------
EXTENSION: oracle
MAINTENANCE: Orphaned
STATUS: Working
COMMENT: Using the new OCI8 driver is encouraged where possible.
-------------------------------------------------------------------------------
== Other extensions ==
-------------------------------------------------------------------------------
EXTENSION: aspell
MAINTENANCE: Unknown
STATUS: Working
COMMENT: For aspell .27 and greater, check out the pspell extension
-------------------------------------------------------------------------------
EXTENSION: bcmath
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: bz2
PRIMARY MAINTAINER: Hartmut Holzgraefe <hartmut@six.de>
MAINTENANCE: Odd Fixes
STATUS: Working
SINCE: 4.0.3
-------------------------------------------------------------------------------
EXTENSION: dio
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
MAINTENANCE: Orphaned
STATUS: Working
SINCE: 4.0.6
-------------------------------------------------------------------------------
EXTENSION: cyrus
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
MAINTENANCE: Orphaned
STATUS: Working
SINCE: 4.0.6
COMMENT: See http://pecl.php.net/package/bz2
-------------------------------------------------------------------------------
EXTENSION: calendar
PRIMARY MAINTAINER: Hartmut Holzgraefe <hartmut@six.de>
PRIMARY MAINTAINER: Hartmut Holzgraefe <hholzgra@php.net>
MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: com
PRIMARY MAINTAINER: Harald Radi <h.radi@nme.at>
PRIMARY MAINTAINER: Harald Radi <phanto@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
@@ -239,12 +230,10 @@ MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: crack
MAINTENANCE: Unknown
STATUS: Experimental
SINCE: 4.0.5
COMMENT: See http://pecl.php.net/package/crack
-------------------------------------------------------------------------------
EXTENSION: ctype
PRIMARY MAINTAINER: Hartmut Holzgraefe <hartmut@six.de>
PRIMARY MAINTAINER: Hartmut Holzgraefe <hholzgra@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
@@ -254,23 +243,27 @@ MAINTENANCE: Maintained
STATUS: Working
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: cybercash
PRIMARY MAINTAINER: Evan Klinger <evan715@sirius.com>
MAINTENANCE: Maintained
STATUS: Unknown
EXTENSION: cyrus
COMMENT: See http://pecl.php.net/package/cyrus
-------------------------------------------------------------------------------
EXTENSION: dio
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
MAINTENANCE: Orphaned
STATUS: Working
SINCE: 4.0.6
-------------------------------------------------------------------------------
EXTENSION: domxml
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: dotnet
PRIMARY MAINTAINER: Sam Ruby <rubys@us.ibm.com>
PRIMARY MAINTAINER: Sam Ruby <rubys@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: exif
PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>
PRIMARY MAINTAINER: Marcus Börger <helly@php.net>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 4.2
@@ -280,13 +273,15 @@ PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
MAINTENANCE: Maintained
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: filepro
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: fribidi
PRIMARY MAINTAINER: Tal Peer <tal@php.net>
MAINTENANCE: Maintained
STATUS: Working
COMMENT: See http://pecl.php.net/package/fribidi
-------------------------------------------------------------------------------
EXTENSION: ftp
PRIMARY MAINTAINER: Stefan Esser (sesser@php.net)
PRIMARY MAINTAINER: Stefan Esser <sesser@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
@@ -304,9 +299,15 @@ MAINTENANCE: Unknown
STATUS: Unknown
SINCE: 4.0.4
-------------------------------------------------------------------------------
EXTENSION: icap
EXTENSION: hwapi
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
MAINTENANCE: Unknown
STATUS: Obsolete
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: hyperwave
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: iconv
PRIMARY MAINTAINER: Moriyoshi Koizumi <moriyoshi@php.net>
@@ -314,12 +315,17 @@ MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: imap
PRIMARY MAINTAINER: Chuck Hagenbuch <chuck@horde.org>
PRIMARY MAINTAINER: Chuck Hagenbuch <chagenbu@php.net>
MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: ircg
PRIMARY MAINTAINER: Sascha Schumann <sas@php.net>
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: java
PRIMARY MAINTAINER: Sam Ruby <rubys@us.ibm.com>
PRIMARY MAINTAINER: Sam Ruby <rubys@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
@@ -334,26 +340,50 @@ MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: mcal
PRIMARY MAINTAINER: Chuck Hagenbuch <chuck@horde.org>
PRIMARY MAINTAINER: Chuck Hagenbuch <chagenbu@php.net>
MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: mcrypt
PRIMARY MAINTAINER: Derick Rethans <derick@derickrethans.nl>
PRIMARY MAINTAINER: Derick Rethans <derick@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: mhash
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
PRIMARY MAINTAINER: Sascha Schumann <sas@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: muscat
PRIMARY MAINTAINER: Sam Liddicott <sam@ananova.com>
EXTENSION: mime_magic
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Unknown
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: ming
PRIMARY MAINTAINER: Frank M. Kromann <fmk@php.net>
MAINTENANCE: Unknown
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: mnogosearch
PRIMARY MAINTAINER: Sergey Kartashoff <gluke@php.net>
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: msession
PRIMARY MAINTAINER Mark L. Woodward <mlwmohawk@php.net>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 4.0.5
COMMENT: Not tested against windows, only core API completed, rest under development
STATUS: Working/Experimental
COMMENT: Tested on Linux, should work on other UNIX platforms. Backend server code can compile under Windows.
-------------------------------------------------------------------------------
EXTENSION: notes
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: ncurses
PRIMARY MAINTAINER Ilia Alshanetsky <iliaa@php.net>, Wez Furlong <wez@php.net>, Hartmut Holzgraefe <hholzgra@php.net>, Georg Richter <georg@php.net>
MAINTENANCE: Unknown
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: openssl
PRIMARY MAINTAINER: Wez Furlong <wez@php.net>
@@ -366,6 +396,10 @@ PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: pcntl
MAINTENANCE: Unknown
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: pcre
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
MAINTENANCE: Maintained
@@ -377,25 +411,18 @@ MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: pfpro
PRIMARY MAINTAINER: David Croft <david@infotrek.co.uk>
PRIMARY MAINTAINER: David Croft <david@php.net>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: posix
PRIMARY MAINTAINER: Kristian Köhntopp <kris@koehntopp.de>
PRIMARY MAINTAINER: Kristian Köhntopp <kk@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: printer
PRIMARY MAINTAINER: Daniel Beulshausen <daniel@php4win.de>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 4.0.4
COMMENT: Only for Win32
-------------------------------------------------------------------------------
EXTENSION: pspell
PRIMARY MAINTAINER: Vlad Krupin <phpdevel@echospace.com>
PRIMARY MAINTAINER: Vlad Krupin <vlad@php.net>
MAINTENANCE: Unknown
STATUS: Unknown
SINCE: 4.0.2
@@ -410,24 +437,12 @@ MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: recode
PRIMARY MAINTAINER: Kristian Köhntopp <kris@koehntopp.de>
PRIMARY MAINTAINER: Kristian Köhntopp <kk@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: sablot
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
MAINTENANCE: Obsolete
STATUS: Experimental
SINCE: 4.0.3
-------------------------------------------------------------------------------
EXTENSION: satellite
PRIMARY MAINTAINER: David Eriksson <eriksson@php.net>
MAINTENANCE: Odd Fixes
STATUS: Experimental
SINCE: 4.0.3
-------------------------------------------------------------------------------
EXTENSION: session
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
PRIMARY MAINTAINER: Sascha Schumann <sas@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
@@ -443,7 +458,7 @@ MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: sockets
PRIMARY MAINTAINER: Chris Vandomelen <chrisv@b0rked.dhs.org>
PRIMARY MAINTAINER: Chris Vandomelen <chrisv@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
SINCE: 4.0.2
@@ -454,6 +469,10 @@ MAINTENANCE: Orphaned
STATUS: Deprecated (Use the ming swf extension instead)
COMMENT: Only for Unix (won't change)
-------------------------------------------------------------------------------
EXTENSION: sysvmsg
MAINTENANCE: Unknown
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: sysvsem
MAINTENANCE: Unknown
STATUS: Unknown
@@ -462,10 +481,14 @@ EXTENSION: sysvshm
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: vpopmail
EXTENSION: tokenizer
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: w32api
MAINTENANCE: Unknown
STATUS: Experimental
SINCE: 4.0.5
-------------------------------------------------------------------------------
EXTENSION: wddx
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
@@ -473,34 +496,32 @@ MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: xml
PRIMARY MAINTAINER: Thies C. Arntzen <thies@thieso.net>
PRIMARY MAINTAINER: Thies C. Arntzen <thies@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: xmlrpc
MAINTENANCE: Unknown
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: xslt
PRIMARY MAINTAINER: Hartmut Holzgraefe <hartmut@six.de>
PRIMARY MAINTAINER: Hartmut Holzgraefe <hholzgra@php.net>
MAINTENANCE: Odd Fixes
STATUS: Working (mostly)
-------------------------------------------------------------------------------
EXTENSION: yaz
PRIMARY MAINTAINER: Adam Dickmeiss <adam@indexdata.dk>
MAINTENANCE: Maintained
STATUS: Unknown
SINCE: 4.0.1
COMMENT: See http://pecl.php.net/package/yaz
-------------------------------------------------------------------------------
EXTENSION: yp
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: zip
COMMENT: See http://pecl.php.net/package/zip
-------------------------------------------------------------------------------
EXTENSION: zlib
PRIMARY MAINTAINER: Stefan Roehrich <sr@linux.de>
PRIMARY MAINTAINER: Stefan Roehrich <sr@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: zziplib
PRIMARY MAINTAINER: Hartmut Holzgraefe <hartmut@six.de>
MAINTENANCE: Odd Fixes
STATUS: Working
SINCE: 4.0.5
-------------------------------------------------------------------------------
# iptc?
+1491 -378
View File
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -71,7 +71,7 @@ clean:
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
egrep define'.*include/php' configure|sed 's/.*>//'|xargs rm -f
egrep define'.*include/php' $(top_srcdir)/configure|sed 's/.*>//'|xargs rm -f
find . -name Makefile | xargs rm -f
.PHONY: all clean install distclean test
+590 -100
View File
@@ -1,83 +1,457 @@
PHP 4 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
16 Feb 2004, Version 4.3.5RC3
11 Jul 2005, Version 4.4.0
- Added man pages for "phpize" and "php-config" scripts. (Jakub Vrana)
- Added support for .cc files in extensions. (Brian)
- Added the sorting flag SORT_LOCALE_STRING to the sort() functions which makes
them sort based on the current locale. (Derick)
- Changed sha1_file() and md5_file() functions to use streams instead of
low level IO. (Uwe)
- Fixed memory corruptions when using references in a wrong way. (Marcus,
Dmitry, Derick)
- Fixed memory corruption in pg_copy_from() in case the as_null parameter was
passed. (Derick)
- Fixed memory corruption in stristr(). (Derick)
- Fixed bug #32685, #29423 (Segfault when using assignment by reference within
function). (Dmitry, Derick)
- Fixed bug #33242 (Mangled error message when stream fails). (Derick)
- Fixed bug #33222 (segfault when CURL handle is closed in a callback). (Tony)
- Fixed bug #33214 (odbc_next_result does not signal SQL errors with
2-statement SQL batches). (rich at kastle dot com, Tony)
- Fixed bug #33210 (relax jpeg recursive loop protection). (Ilia)
- Fixed bug #33200 (preg_replace(): magic_quotes_sybase=On makes 'e' modifier
misbehave). (Jani)
- Fixed bug #33150 (shtool: insecure temporary file creation). (Jani)
- Fixed bug #33072 (Add a safemode/open_basedir check for runtime save_path
change) (Rasmus)
- Fixed bug #33070 (Improved performance of bzdecompress() by several orders
of magnitude). (Ilia)
- Fixed bug #33057 (Don't send extraneous entity-headers on a 304 as per
RFC 2616 section 10.3.5) (Rasmus, Choitel)
- Fixed bug #33019 (socket errors cause memory leaks in php_strerror()).
(jwozniak23 at poczta dot onet dot pl, Tony).
- Fixed bug #33017 ("make distclean" gives an error with VPATH build). (Jani)
- Fixed bug #33013 ("next month" was handled wrong while parsing dates).
(Derick)
- Fixed bug #32974 (pcntl calls malloc() from a signal handler). (Wez)
- Fixed bug #32944 (Disabling session.use_cookies doesn't prevent reading
session cookies). (Jani, Tony)
- Fixed bug #32936 (http redirects URLs are not checked for control chars). (Ilia)
- Fixed bug #32932 (Oracle LDAP: ldap_get_entries invalid pointer). (Jani)
- Fixed bug #32904 (pg_get_notify() ignores result_type parameter). (Tony)
- Fixed bug #32813 (parse_url() does not handle scheme-only urls properly). (Ilia)
- Fixed bug #32810 (temporary files not using plain file wrapper). (Ilia)
- Fixed bug #32802 (General cookie overrides more specific cookie). (Ilia)
- Fixed bugs #32800, #32830 (ext/odbc: Problems with 64bit systems). (Jani)
- Fixed bug #32773 (GMP functions break when second parameter is 0). (Stas)
- Fixed bug #32742 (segmentation fault when the stream with a wrapper
is not closed). (Tony, Dmitry)
- Fixed bug #32730 (ext/crack.c fails to compile with cracklib-2.8.3). (Jani)
- Fixed bug #32670 (foreach() does not issue warning on unset array arg). (Ilia)
- Fixed bug #32699 (pg_affected_rows() was defined when it was not available).
(Derick)
- Fixed bug #32682 (ext/mssql: Error on module shutdown when called from
activescript). (Frank)
- Fixed bug #32647 (Using register_shutdown_function() with invalid callback
can crash PHP). (Jani)
- Fixed bug #32591 (ext/mysql: Unsatisfied symbol: ntohs with HP-UX). (Jani)
- Fixed bug #32589 (Possible crash inside imap_mail_compose, with charsets).
(Ilia)
- Fixed bug #32587 (Apache2: errors sent to error_log do not include
timestamps). (Jani)
- Fixed bug #32567 (ext/gmp fails to compile in threadsafe mode). (Tony)
- Fixed bug #32538 (ext/swf/swf.c does not compile with gcc-3.4.x or newer).
(adam dot greenfield at gmail dot com)
- Fixed bug #32530 (chunk_split() does not append endstr if chunklen is
longer then the original string). (Ilia)
- Fixed bug #32491 (File upload error - unable to create a temporary file).
(Uwe Schindler)
- Fixed bug #32311 (mb_encode_mimeheader() does not properly escape characters).
(Moriyoshi)
- Fixed bug #32245 (xml_parser_free() in a function assigned to the xml parser
gives a segfault). (Rob)
- Fixed bug #32116 (mysql compressed connection doesn't work under windows)
(Georg)
- Fixed bug #31887 (ISAPI: Custom 5xx error does not return correct HTTP
response message). (Jani)
- Fixed bug #31583 (php_std_date() uses short day names in non-y2k_compliance mode).
(mike at php dot net)
- Fixed bug #31213 (Sideeffects caused by fix of bug #29493). (Dmitry)
- Fixed bug #30052 (Crash on shutdown after odbc_pconnect()). (Edin)
- Fixed bug #29975 (memory leaks when set_error_handler() is used inside error
handler). (Tony)
- Fixed bug #29944 (Function defined in switch, crashes). (Dmitry)
- Fixed bug #29338 (unencoded spaces get ignored after certain tags). (Ilia)
- Fixed bug #28605 (Need to use -[m]ieee option for Alpha CPUs). (Jani)
- Fixed bug #28377 (debug_backtrace is intermittently passing args). (Dmitry)
31 Mar 2005, Version 4.3.11
- Added Oracle Instant Client support. (cjbj at hotmail dot com, Tony)
- Added checks for negative values to gmp_sqrt(), gmp_powm(), gmp_sqrtrem()
and gmp_fact() to prevent SIGFPE. (Tony)
- Changed phpize not to require libtool. (Jani)
- Updated bundled libmbfl library (used for multibyte functions). (Moriyoshi)
- Fixed several leaks in ext/browscap and sapi/embed. (Andrei)
- Fixed several leaks in ext/filepro. (Tony)
- Fixed build system to always use bundled libtool files. (Jani)
- Fixed MacOSX shared extensions crashing on Apache startup. (Rasmus)
- Fixed bug #32373 (segfault in bzopen() if supplied path to non-existent
file). (Tony)
- Fixed bug #32340 (insert_before($node,NULL) does not return). (Rob)
- Fixed bug #32200 (Prevent using both --with-apxs2 and --with-apxs2filter).
(Jani)
- Fixed bug #32114 (DOM crashing when attribute appended to Document). (Rob)
- Fixed bug #32063 (mb_convert_encoding ignores named entity 'alpha').
(Moriyoshi)
- Fixed bug #31960 (msql_fetch_row() and msql_fetch_array() dropping columns
with NULL values). (Daniel Convissor)
- Fixed bug #31936 (set_h_errno() is redefined incompatibly). (Jani)
- Fixed bug #31911 (mb_decode_mimeheader() is case-sensitive to hex escapes).
(Moriyoshi)
- Fixed bug #31858 (--disable-cli does not force --without-pear). (Jani)
- Fixed bug #31842 (*date('r') does not return RFC2822 conforming date string).
(Jani)
- Fixed bug #31797 (exif_read_data() uses too low nesting limit). (Ilia)
- Fixed bug #31796 (readline completion handler does not handle empty return
values). (Ilia)
- Fixed bug #31792 (getrusage() does not provide ru_nswap value). (Ilia)
- Fixed bug #31754 (dbase_open() fails for mode = 1). (Mehdi, Derick)
- Fixed bug #31705 (parse_url() does not recognize http://foo.com#bar). (Ilia)
- Fixed bug #31684 (dio_tcsetattr(): misconfigured termios settings).
(elod at itfais dot com)
- Fixed bug #31699 (unserialize() float problem on non-English locales). (Ilia)
- Fixed bug #31623 (OCILogin does not support password grace period).
(daniel dot beet at accuratesoftware dot com, Tony)
- Fixed bug #31580 (fgetcsv() problematic with "" escape sequences). (Ilia)
- Fixed bug #31527 (crash in msg_send() when non-string is stored without
being serialized). (Ilia)
- Fixed bug #31514 (open_basedir uses path_translated rather then cwd for .
translation). (Ilia)
- Fixed bug #31480 (Possible infinite loop in imap_mail_compose()). (Ilia)
- Fixed bug #31479 (Fixed crash in chunk_split(), when chunklen > strlen). (Ilia)
- Fixed bug #31465 (False warning in unpack() when working with *). (Ilia)
- Fixed bug #31454 (session_set_save_handler crashes PHP when supplied
non-existent object ref). (Tony)
- Fixed bug #31444 (Memory leak in zend_language_scanner.c).
(hexer at studentcenter dot org)
- Fixed bug #31442 (unserialize broken on 64-bit systems). (Marcus)
- Fixed bug #31440 ($GLOBALS can be overwritten via GPC when
register_globals is enabled). (Ilia)
- Fixed bug #31413 (curl POSTFIELDS crashes on 64-bit platforms). (Joe)
- Fixed bug #31396 (compile fails with gd 2.0.33 without freetype). (Jani)
- Fixed bug #31371 (highlight_file() trims new line after heredoc). (Ilia)
- Fixed bug #31270 (missing safe_mode/open_basedir check in swf_openfile()). (Ilia)
- Fixed bug #31174 (compile warning in url.c). (Ilia, lukem at NetBSD dot org)
- Fixed bug #31159 (COM object access is not working). (Wez)
- Fixed bug #31142 (imap_mail_compose() fails to generate correct output). (Ilia)
- Fixed bug #31398 (When magic_guotes_gpc are enabled filenames with ' get cutoff).
(Ilia)
- Fixed bug #31288 (Possible crash in mysql_fetch_field(), if mysql_list_fields()
was not called previously). (Ilia)
- Fixed bug #31120 (mssql_query returns false on successfull inserts and
stored procedures). (Frank)
- Fixed bugs #31107, #31110, #31111, #31249 (Compile failure of zend_strtod.c).
(Jani)
- Fixed bug #31106 (Fixed crash in overloaded objects). (Stas)
- Fixed bug #31103 (Better error message when c-client cannot be found). (Ilia)
- Fixed bug #31101 (missing kerberos header file path with --with-openssl). (Jani)
- Fixed bug #31072 (var_export() does not output an array element with an empty
string key). (Derick)
- Fixed bug #31060 (imageftbbox() does not use linespacing parameter). (Jani)
- Fixed bug #31056 (php_std_date() returns invalid formatted date if
y2k_compliance is On). (Ilia)
- Fixed bug #31055 (apache2filter: per request leak proportional to the full
path of the request URI). (kameshj at fastmail dot fm)
- Fixed bug #30726 (-.1 like numbers are not being handled correctly). (Ilia)
- Fixed bug #30609 (cURL functions bypass open_basedir). (Jani)
- Fixed bug #30573 (compiler warnings in libmbfl due to invalid type cast).
(Moriyoshi)
- Fixed bug #30549 (incorrect character translations for some ISO8859 charsets).
(Moriyoshi)
- Fixed bug #30446 (apache2handler: virtual() includes files out of sequence)
- Fixed bug #30430 (odbc_next_result() doesn't bind values and that results
in segfault). (pdan-php at esync dot org, Tony)
- Fixed bug #30120 (imagettftext() and imagettfbbox() accept too many
parameters). (Jani)
- Fixed bug #29733 (printf() handles repeated placeholders wrong).
(bugs dot php dot net at bluetwanger dot de, Ilia)
- Fixed bug #29424 (width and height inverted for JPEG2000 files). (Ilia)
- Fixed bug #28976 (mail(): use "From:" from headers if sendmail_from is empty).
(Jani)
- Fixed bug #28930 (PHP sources pick wrong header files generated by bison).
(eggert at gnu dot org)
- Fixed bug #28804 (ini-file section parsing pattern is buggy).
(wendland at scan-plus dot de)
- Fixed bug #28803 (enabled debug causes bailout errors with CLI on AIX
because of fflush() called on already closed filedescriptor). (Tony)
- Fixed bug #28451 (corupt EXIF headers have unlimited recursive IFD directory
entries). (Andrei)
- Fixed bug #28220 (mb_strwidth() returns wrong width values for some hangul chars). (Moriyoshi)
- Fixed bug #28086 (crash inside overload() function). (Tony)
- Fixed bug #28074 (FastCGI: stderr should be written in a FCGI stderr stream).
(chris at ex-parrot dot com)
- Fixed bug #28067 (partially incorrect utf8 to htmlentities mapping). (Derick,
Benjamin Greiner)
- Fixed bug #27633 (Double \r problem on ftp_get in ASCII mode on Win32). (Ilia)
- Fixed bug #18613 (Multiple OUs in x509 certificate not handled properly). (Jani)
- Fixed bug #7782 (Cannot use PATH_INFO fully with php isapi). (Unknown)
15 Dec 2004, Version 4.3.10
- Added the %F modifier to *printf to render a non-locale-aware representation
of a float with the . as decimal separator. (Derick)
- Backported Marcus' foreach() speedup patch from PHP 5.x. (Derick)
- Fixed a bug in addslashes() handling of the '\0' character. (Ilia)
- Fixed potential problems with unserializing invalid serialize data. (Marcus)
- Fixed bug #31034 (Problem with non-existing iconv header file). (Derick)
- Fixed bug #31024 (Crash in fgetcsv() with negative length). (Ilia)
- Fixed bug #31019 (Logic error mssql library checking). (Frank)
- Fixed bug #30995 (snmp extension does not build with net-snmp 5.2). (Ilia)
- Fixed bug #30990 (allow popen() on *NIX to accept 'b' flag). (Ilia)
- Fixed bug #30826 (Certain reference relations cannot be unserialized
properly). (Ilia)
- Fixed bug #30750 (Meaningful error message when upload directory is not
accessible). (Ilia)
- Fixed bug #30739 (imagefill does not set back alphablending mode). (Pierre)
- Fixed bug #30672 (Problem handling exif data in jpeg images at unusual
places). (Marcus)
- Fixed bug #30658 (Ensure that temporary files created by GD are removed).
(Ilia)
- Fixed bug #30654 (oci8 persistent connection is deleted from hash
if there was exclusive connection with the same credentials). (Tony)
- Fixed bug #30613 (Prevent infinite recursion in url redirection). (Ilia)
- Fixed bug #30587 (array_multisort doesn't separate zvals before
changing them). (Tony)
- Fixed bug #30475 (curl_getinfo() may crash in some situations). (Ilia)
- Fixed bug #30442 (segfault when parsing ?getvariable[][ ). (Tony)
- Fixed bug #30388 (rename across filesystems loses ownership and
permission info). (Tony)
- Fixed bug #30282 (segfault when using unknown/unsupported
session.save_handler and/or session.serialize_handler). (Tony)
- Fixed bug #30281 (Prevent non-wbmp images from being detected as such).
(Ilia)
- Fixed bug #30276 (Possible crash in ctype_digit on large numbers). (Ilia)
- Fixed bug #30229 (imagerectangle and imagefilledrectangle do work well
with alpha channel, corners are drawn twice). (Pierre)
- Fixed bug #30224 (Sybase date strings are sometimes not null terminated).
(Ilia)
- Fixed bug #30133 (get_current_user() crashes on Windows). (Edin)
- Fixed bug #30057 (did not detect IPV6 on FreeBSD 4.1). (Wez)
- Fixed bug #30027 (Possible crash inside ftp_get()).
(cfield at affinitysolutions dot com)
- Fixed bug #29805 (HTTP Authentication Issues). (Uwe Schindler)
- Fixed bug #29418 (double free when openssl_csr_new fails).
(Kamesh Jayachandran).
- Fixed bug #28598 (Lost support for MS Symbol fonts). (Pierre)
- Fixed bug #28325 (Circular references not properly serialized). (Moriyoshi)
- Fixed bug #28228 (NULL decimal separator is not being handled correctly).
(Ilia)
- Fixed bug #27469 (serialize() objects of incomplete class). (Dmitry)
22 Sep 2004, Version 4.3.9
- GPC input processing fixes (Stefano Di Paola, Rasmus, Stefan)
- Implemented periodic PCRE compiled regexp cache cleanup, to avoid memory
exhaustion. (Andrei)
- Fixed bug with raw_post_data not getting set (Brian)
- Fixed a file-descriptor leak with phpinfo() and other 'special' URLs (Zeev)
- Rewritten UNIX and Windows install help files. (Documentation Team)
- Updated PCRE to provide better error handling in certain cases. (Andrei)
- NSAPI: added "bucket" parameter to list of non-php.ini-keys of php4_execute
for doing performance stats without warnings in server-log. (Uwe Schindler)
- Fixed bug preventing from building oci8 as shared.
(stanislav dot voroniy at portavita dot nl, Tony)
- Fixed leap year checking with idate(). (Christian Schneider, Derick)
- Fixed strip_tags() to correctly handle '\0' characters. (Stefan)
- Fixed funny forking effect in FastCGI when PHP_FCGI_CHILDREN was not set.
- Fixed bug #30050 (Possible crash inside php_shutdown_config()).
(Ilia, nw at softwarekombinat dot de)
- Fixed bug #29954 (array_reduce segfaults when initial value is array). (Tony)
- Fixed bug #29882 (isset crashes on arrays). (Marcus)
- Fixed bug #29753 (mcal_fetch_event() allows 2nd argument to be optional).
(Ilia, Vrana)
- Fixed bug #29727 (Added missing CURL authentication directives). (Ilia)
- Fixed bug #29719 (fgetcsv() has problem parsing strings ending with escaped
enclosures). (Ilia)
- Fixed bug #29607 (highlighting code with HEREDOC produces invalid output).
(Ilia)
- Fixed bug #29599 (domxml_error segfaults another apache module). (Rob)
- Fixed bug #29594 (Use PHP's own tmpfile() implementation). (Ilia)
- Fixed bug #29581 (Typo inside php.ini comments for mysql.trace_mode). (Ilia)
- Fixed bug #29493 (extract(array, EXTR_REFS) misbehaves with elements referred
twice or more times). (Moriyoshi)
- Fixed bug #29443 (Sanity check for wbmp detection). (Ilia)
- Fixed bug #29369 (Uploaded files with ' or " in their names get their names
truncated at those characters). (Ilia)
- Fixed bug #29349 (imagecreatefromstring() crashes with external GD library).
(Ilia, adconrad at debian dot org)
- Fixed bug #29333 (output_buffering+trans_sess_id can corrupt output). (Ilia)
- Fixed bug #29226 (ctype_* functions missing validation of numeric string
representations). (Ilia)
- Fixed bug #29209 (imap_fetchbody() doesn't check message index).
(Ilia, Tony)
- Fixed bug #29116 (Zend constant warning uses memory after free).
(Marcus, jdolecek at NetBSD dot org)
- Fixed bug #29114 (Potential double free in php_stat). (Sara)
- Fixed bug #29075 (strnatcmp() incorrectly handles whitespace).
(Curt, Ilia)
- Fixed bug #29049 (array sorting via user function/method does not
validate it). (Ilia)
- Fixed bug #29038 (extract() with EXTR_PREFIX_SAME prefixes empty strings).
(Andrey)
- Fixed bug #29034 (wordwrap() returns a boolean when passed empty string).
(Ilia)
- Fixed bug #28974 (overflow in array_slice(), array_splice(), substr,
substr_replace(), strspn(), strcspn()). (Andrey)
- Fixed bug #28897 (ibase: -1 returned as -0.000 for 64-bit scaled int). (Ard)
- Fixed bug #28879 (Implicit/Explicit array creation inconsistency when using
Resources, Arrays, or Objects as indices). (Sara)
- Fixed bug #28878 (Setting of inikey's in obj.conf fails). (Uwe Schindler)
- Fixed bug #28868 (Internal wrapper registry not thread safe). (Sara)
- Fixed bug #28818 (Apache 2 sapis do not export st_dev).
(xuefer at 21cn dot com, Ilia).
- Fixed bug #28800 (strings beginning with "inf" improperly converted). (Ilia)
- Fixed bug #28723 (Fixed mbstring config.m4 to work on OSes where test
command does not support -e parameter). (Ilia)
- Fixed bug #28692 (\0 in Authenticate header passed via safe_mode). (Ilia)
- Fixed bug #28670 (WWW-Authentication header mangling with PCRE in safe_mode
adds extra spaces). (Ilia)
- Fixed bug #28668 (glob() does not work with relative paths on Windows). (Ilia)
- Fixed bug #28649 (Proper glob() return value on Linux when there are no
matches). (Ilia)
- Fixed bug #28633 (sprintf incorrectly adding padding to floats). (Ilia)
- Fixed bug #28627 (When multiple MySQL links are used default link is leaked).
(gavin at ipalsoftware dot com, Ilia)
- Fixed bug #28525 (gmp_powm() does not work with hexadecimal string modulo
represented as a string). (pickett at sumu dot org, Ilia)
- Fixed bug #28512 (Allocate enough space to store MSSQL data). (Frank)
- Fixed bug #28466 (mbstring_convert_variables() array separation problem).
(Moriyoshi)
- Fixed bug #28175 (Allow bundled GD to compile against freetype 2.1.2).
(Elf, Ilia)
14 Jul 2004, Version 4.3.8
- Fixed strip_tags() to correctly handle '\0' characters. (Stefan)
- Fixed memory_limit during request startup. (Stefan)
- Replace alloca() with emalloc() for better stack protection. (Ilia)
- Added missing safe_mode checks inside ftok and itpc. (Ilia)
- Fixed bug #28963 (Missing space for \0 in address allocation in IMAP). (Ilia)
- Fixed bug #28632 (Prevent open_basedir bypass via MySQL's LOAD DATA LOCAL).
(Ilia)
03 Jun 2004, Version 4.3.7
- Upgraded bundled GD library to 2.0.23. (Ilia)
- Changed user error handler mechanism to relay to built-in error handler if it
returns false. (Andrei)
- Fixed command line escaping routines for win32. (Ilia)
- Fixed problems with *printf() functions and '%f' formatting. (Marcus)
- Fixed possible crash inside pg_copy_(to|from) function if delimiter is more
then 1 character long. (Ilia)
- Fixed crash inside cpdf_place_inline_image() when working with truecolor
images. (Ilia)
- Fixed handling of return values from storred procedures in mssql_execute()
with multiple result sets returned. (Frank)
- Fixed logic bug in session_register() which allowed registering _SESSION
and/or HTTP_SESSION_VARS. (Sara)
- Fixed bug #28597 (xmlrpc_encode_request() incorrectly encodes chars in
200-210 range). (fernando dot nemec at folha dot com dot br, Ilia)
- Fixed bug #28569 (informix connection id is not thread safe).
(novicky at aarongroup dot cz, Ard)
- Fixed bug #28564 (Problem building informix as a shared extension).
(roques at mti dot ag, Ilia)
- Fixed bug #28508 (Do not make hypot() available if not supported by libc).
(Ilia)
- Fixed bug #28506 (Allow negative start angle in imagearc and imagefilledarc.
(Pierre)
- Fixed bug #28456 (Problem with enclosed / in uploaded files). (Antony)
- Fixed bug #28386 (wordwrap() wraps lines 1 character too soon). (Ilia)
- Fixed bug #28374 (Possible unterminated loop inside
_php_pgsql_trim_message()). (Ilia)
- Fixed bug #28355 (glob() does not return error on Linux when it does not
have permission to open the directory). (Ilia)
- Fixed bug #28289 (incorrect resolving of relative paths by glob() in
windows). (Ilia)
- Fixed bug #28229 (run-tests tripped up by spaces in names). (Marcus)
- Fixed bug #28228 (number_format() does not allow empty decimal separator).
(Ilia)
- Fixed bug #28196 (missing error constants in cURL extension). (Ilia)
- Fixed bug #28187 (parse_url() not handling embedded IPv6 in URLs). (Sara)
- Fixed bug #28175 (build problem for people using FreeType 2.1.0-2.1.2).
(Ilia)
- Fixed bug #28147 (Crash with drawing anti-aliased lines). (Derick)
- Fixed bug #28122 (dba_open db3: Permission denied). (Marcus)
- Fixed bug #28112 (sqlite_query() crashing apache on malformed query). (Ilia,
Marcus)
- Fixed bug #28055 (timeout duration too long in feof()/pfsockopen() liveness
checks). (Wez)
- Fixed bug #28087 (Do not force mysql.trace_mode to 0 on every request).
(Ilia)
- Fixed bug #28042 (greek letters in html to entitity mapping not correct).
(Derick)
- Fixed bug #28007 (compile mssql extension with old versions of FreeTDS
fails). (Frank)
- Fixed bug #27995 (imagefilltoborder() stops the fill process prematurely).
(Ilia)
- Fixed bug #27810 (don't use php's pemalloc in ext/pcre). (Joe Orton)
- Fixed bug #23220 (SSL: fatal protocol error when talking to IIS). (Wez)
15 Apr 2004, Version 4.3.6
- Updated bundled PDFLib library to version 5.0.3p1 in Windows distribution.
(Edin)
- Fixed a crash in multi-threaded environments when a thread is shutdown by
the web server. (Stas)
- Fixed a bug that prevented building of the GD extension against external GD
lib 1.X. (Ilia, Edin, Nick Talbott).
- Synchronized bundled GD library with GD 2.0.22. (Ilia)
- Fixed bug #27963 (Session lifetime setting may leak between requests). (Ilia)
- Fixed bug #27849 (configure craps out on trivial syntax error). (Derick)
- Fixed bug #27822 (is_resource() returns TRUE for closed resources). (Derick)
- Fixed bug #27819 (problems returning reference to a reference parameter).
(Ilia)
- Fixed bug #27809 (ftp_systype returns null on some ftp servers). (Ilia)
- Fixed bug #27802 (default number of children to 8 when PHP_FCGI_CHILDREN is
not defined). (Ilia)
- Fixed bug #27780 (strtotime(+1 xxx) returns a wrong date/time). (Derick)
- Fixed bug #27769 (domxml_xmltree crashes). (Rob)
- Fixed bug #27764 (Get return value from a stored procedure not returning any
result sets). (Frank)
- Fixed bug #27762 (SCO Openserver doesn't have S_ISSOCK). (Wez)
- Fixed bug #27743 (Make sure Money types are converted and returned
correctly). (Frank)
- Fixed bug #27732 (Fixed compilation bug inside php_sab_info.h). (Ilia)
- Fixed bug #27731 (error_reporting() inside @ block fails to set
error_reporting level). (Ilia)
- Fixed bug #27719 (mktime issues on and around DST changeover). (Rasmus)
- Fixed bug #27717 (Test Failures when compiled on 64-bit mode). (Ard, Derick)
- Fixed bug #27687 (Bug Adding Default Charset to 'text/*' Content-Type
Header). (Marcus)
- Fixed bug #27663 (compile failure with cURL 7.11.1). (Ilia)
- Fixed bug #27646 (Cannot serialize/unserialize non-finite numeric values).
(Marcus)
- Fixed bug #26757 (session.save_path default is bogus for win32). (Wez)
- Fixed bug #26589 (Crash inside mssql extension when selecting many columns
of type money). (Frank)
- Fixed bug #25547 (error_handler and array index with function call).
(cschneid at cschneid dot com)
26 Mar 2004, Version 4.3.5
- Fixed possible crash using an invalid color index with a palette image in
imagecolortransparent. (Pierre)
- Fixed php-cgi to not ignore command-line switches when run in a web context.
This fixes our test cases allowing INI with GET sections to work. (Rasmus)
- Fixed getopt() so it works without $_SERVER. (Rasmus, bfrance)
- Fixed crash in php_ini_scanned_files() when no additional INI files were
actually parsed. (Jon)
- Fixed possible crashes inside socket extension, due to missing check inside
allocation functions. (Ilia)
- Fixed zero bytes memory allocation when no extra ini files are found in the
--with-config-file-scan-dir specified directory. (Eric Colinet, Derick)
- Fixed bug #27235 (Interbase NUMERIC x.0 field returns empty string on 0).
(Ard)
- Fixed bug #27196 (Missing content_length initialization in apache 2 sapis).
(Ilia, pdoru at kappa dot ro)
- Fixed bug #27183 (userland stream wrapper segfaults on stream_write).
(Moriyoshi)
- Fixed bug #27175 (tzset() is not being called by PHP on startup).
(Ilia, sagawa at sohgoh dot net)
- Fixed bug #27172 (Possible floating point exception in gmp_powm()). (Ilia)
- Fixed bug #27171 (crash inside gmp_hamdist()). (Jani)
- Fixed bug #27157 (Compile Failure on Solaris 8). (Timm)
- Fixed bug #27149 (broken CLOB support in oci8 extension). (Antony)
- Fixed bug #27135 (Possible crash inside mb_strlen()). (Moriyoshi)
- Fixed bug #27104 (CLI/CGI SAPI module variable name conflict). (Marcus)
- Fixed bug #27026 (Added "cgi.nph" php.ini option to allow forcing of
the 'Status: 200' header that is not normally needed). (Ilia)
- Fixed bug #26862 (ob_flush() followed by output_reset_rewrite_vars() may
result in data loss). (Ilia, scottmacvicar at ntlworld dot com)
- Fixed bug #26758 (FastCGI exits immediately with status 255). (Ilia,
tcarter at noggin dot com dot au)
- Fixed bug #26653 (open_basedir incorrectly resolved on win32). (Ilia,
scottmacvicar at ntlworld dot com)
- Fixed bug #26407 (Result set fetching broken around transactions). (Timm)
- Fixed bug #24773 (unsetting string as array causes a crash). (Sara)
- Fixed bug #23467 (date('T') outputs incorrect Time Zone).
(Jani, scottmacvicar at ntlworld dot com)
03 Feb 2004, Version 4.3.5RC2
- Changed "allow_url_fopen" php.ini option to be PHP_INI_SYSTEM. (Sara)
- Improved the sybase_ct module: (Timm)
. Added ability to define a message handler not only globally, but also per
. Added ability to define a message handler not only globally, but also per
connection.
. Added "sybct.packet_size" php.ini option.
. Changed "sybct.login_timeout" php.ini option changeable at runtime.
. Fixed memory leak in sybase_set_message_handler().
- Fixed bug #27058 (crash in sybase_connect() with 2 arguments). (Ilia)
- Fixed bug #27056 (ints used instead of longs inside some GD functions).
(Ilia)
- Fixed bug #27040 (passing an array of form-fields to CURLOPT_POSTFIELDS
does not work). (Ilia, Jani)
- Fixed bug #27037 (fixed possible crash in apache2handler output code). (Ilia)
- Fixed bug #27011 (64bit int/long confusion in preg_match*() functions).
(Ilia)
- Fixed bug #27007 (missing connection closure when connect fails in pgsql).
(Ilia)
- Fixed bug #26974 (rename() doesn't check the destination file against
safe_mode/open_basedir). (Ilia)
- Fixed bug #26973 (*printf() '+' modifier broken). (Jani)
- Fixed bug #26969 (--with-openssl=shared build fails). (Jani)
- Fixed bug #26968 (Segfault with Interbase module built as shared). (Ard)
- Fixed bug #26949 (rand(min,max) always returns min when ZTS enabled). (Jani)
- Fixed bug #26937 (Warning in xml.c). (Jani)
- Fixed Bug #26927 (preg_quote() does not escape \0). (Ilia)
- Fixed bug #26923 (ext/imap: pam and crypt libraries missing when build as
shared extension). (Jani)
- Fixed bug #26909 (crash in imap_mime_header_decode() when no encoding is
used). (Ilia)
- Fixed bug #26892 (ORA-21301 in ocinewcollection() call). (Antony)
- Fixed bug #26878 (problem with multiple references to the same variable
with different types). (Ilia)
- Fixed bug #26896 (ext/ftp does not work as shared extension). (Jani)
- Fixed bug #26814 (When included file has a parse error, terminate script
execution). (Ilia)
- Fixed bug #26772, #26967 (file operations return NULL instead of FALSE).
(Wez, Ilia)
- Fixed bug #26381 (rand() without srand() doesn't work with certain php.ini).
(Jani)
- Fixed bug #25753 (php.ini settings "leak" from vhosts/.htaccess files).
(Patch by: rover at tob dot ru)
- Fixed bug #22403 (PHP crashes when executing a sql procedure without
parameters). (Timm)
- Fixed bug #21513 (shutdown functions not executed if timed out). (Zeev)
12 Jan 2004, Version 4.3.5RC1
- Synchronized bundled GD library with GD 2.0.17
- Synchronized bundled GD library with GD 2.0.17. (Ilia)
- Upgraded PCRE library to version 4.5. (Andrei)
- Updated bundled PostgreSQL library to version 7.4 in Windows distribution.
(Edin)
@@ -86,27 +460,123 @@ PHP 4 NEWS
- Added a warning when creating temp stream fails with ftp_(n)list(). (Sara)
- Fixed header handler in NSAPI SAPI module (header->replace was ignored,
send_default_content_type now sends value from php.ini). (Uwe Schindler)
- Fixed bug #27633 (Incorrect EOL translation by ftp_get() in ASCII mode).
(Ilia)
- Fixed bug #27600 (GCC 3.0.4 does not like __attribute__ directive). (Sascha)
- Fixed bug #27590 (crash during shutdown when freeing persistent resources in
ZTS mode). (Ilia)
- Fixed bug #27582 (possible crashes in imagefilltoborder()). (Pierre)
- Fixed bug #27580 (pre-initialization errors in ap2 handler are not being
written to vhost error log). (Ilia)
- Fixed bug #27559 (Corrected open_basedir resolving logic). (Ilia)
- Fixed bug #27530 (broken http auth when safe_mode is on and PCRE is disabled).
(Ilia)
- Fixed bug #27509 (broken getaddrinfo() causes fsockopen() error). (Sara)
- Fixed bug #27505 (htmlentities() does not handle BIG5 correctly). (Ilia,
ywliu at hotmail dot com)
- Fixed bug #27498 (bogus safe_mode error on nonexistent directories for
chdir() and opendir() functions). (Ilia)
- Fixed bug #27460 (base64_decode() does not handle extra padding).
(Ilia, naish at klanen dot net)
- Fixed bug #27443 (defined() returns wrong type). (Derick)
- Fixed bug #27437 (wrong freetype include inside GD library). (Ilia)
- Fixed bug #27424 (headers missing on flush() in apache 2 SAPIs). (Ilia)
- Fixed bug #27421 (mbstring.func_overload should be system ini setting).
(Ilia)
- Fixed bug #27384 (unpack() misbehaves with 1 char string). (GeorgeS)
- Fixed bug #27383 (Potential crash inside fopen_wrapper, while
parsing response code). (Ilia)
- Fixed bug #27354 (Modulus operator crashes PHP). (Derick)
- Fixed bug #27341 (HEAD requests fail to return data). (Ilia)
- Fixed bug #27337 (missing sapi_shutdown() in sapi/isapi causes memory leak).
(Jani, msisolak at yahoo dot com)
- Fixed bug #27328 (ftp extension relies on 32-bit longs). (Sara)
- Fixed bug #27300 (Improved regex for pg_convert()).
(benjcarson at digitaljunkies dot ca, Ilia)
- Fixed bug #27295 (memory leak inside sscanf()). (Ilia)
- Fixed bug #27293 (two crashes inside image2wbmp()). (Ilia)
- Fixed bug #27291 (get_browser matches browscap.ini patterns incorrectly).
(Jay)
- Fixed bug #27278 (*printf() functions treat arguments as if passed by
reference). (Ilia)
- Fixed bug #27238 (iptcparse() function misses some fields). (Pierre)
- Fixed bug #27235 (Interbase NUMERIC x.0 field returns empty string on 0).
(Ard)
- Fixed bug #27196 (Missing content_length initialization in apache 2 sapis).
(Ilia, pdoru at kappa dot ro)
- Fixed bug #27183 (userland stream wrapper segfaults on stream_write).
(Moriyoshi)
- Fixed bug #27175 (tzset() is not being called by PHP on startup).
(Ilia, sagawa at sohgoh dot net)
- Fixed bug #27172 (Possible floating point exception in gmp_powm()).
(Ilia)
- Fixed bug #27171 (crash inside gmp_hamdist()). (Jani)
- Fixed bug #27157 (Compile Failure on Solaris 8). (Timm)
- Fixed bug #27149 (broken CLOB support in oci8 extension). (Antony)
- Fixed bug #27135 (Possible crash inside mb_strlen()). (Moriyoshi)
- Fixed bug #27104 (CLI/CGI SAPI module variable name conflict). (Marcus)
- Fixed bug #27058 (crash in sybase_connect() with 2 arguments). (Ilia)
- Fixed bug #27056 (ints used instead of longs inside some GD functions).
(Ilia)
- Fixed bug #27040 (passing an array of form-fields to CURLOPT_POSTFIELDS
does not work). (Ilia, Jani)
- Fixed bug #27037 (fixed possible crash in apache2handler output code).
(Ilia)
- Fixed bug #27026 (Added "cgi.nph" php.ini option to allow forcing of the
'Status: 200' header that is not normally needed). (Ilia)
- Fixed bug #27011 (64bit int/long confusion in preg_match*() functions).
(Ilia)
- Fixed bug #27007 (missing connection closure when connect fails in pgsql).
(Ilia)
- Fixed bug #26974 (rename() doesn't check the destination file against
safe_mode/open_basedir). (Ilia)
- Fixed bug #26973 (*printf() '+' modifier broken). (Jani)
- Fixed bug #26969 (--with-openssl=shared build fails). (Jani)
- Fixed bug #26968 (Segfault with Interbase module built as shared). (Ard)
- Fixed bug #26949 (rand(min,max) always returns min when ZTS enabled). (Jani)
- Fixed bug #26937 (Warning in xml.c). (Jani)
- Fixed bug #26927 (preg_quote() does not escape \0). (Ilia)
- Fixed bug #26923 (ext/imap: pam and crypt libraries missing when build as
shared extension). (Jani)
- Fixed bug #26909 (crash in imap_mime_header_decode() when no encoding is
used). (Ilia)
- Fixed bug #26896 (ext/ftp does not work as shared extension). (Jani)
- Fixed bug #26892 (ORA-21301 in ocinewcollection() call). (Antony)
- Fixed bug #26878 (problem with multiple references to the same variable with
different types). (Ilia)
- Fixed bug #26864 (pg_(update|delete) ignore PGSQL_DML_EXEC option). (Ilia)
- Fixed bug #26862 (ob_flush() followed by output_reset_rewrite_vars() may
result in data loss). (Ilia, scottmacvicar at ntlworld dot com)
- Fixed bug #26847 (memory leak in mail() when to/subject contain only spaces).
(Ilia)
- Fixed bug #26814 (When included file has a parse error, terminate script
execution). (Ilia)
- Fixed bug #26777 (ext/interbase: Let DB handle NULL params). (Ard)
- Fixed bug #26755 (CLI now overrides php.ini settings and switches off
output buffering). (Edin)
- Fixed bug #26752 (Silent unterminated loop when length parameter for
fgets(), fread() and fgetss() is 0). (Ilia)
- Fixed bug #26772, #26967 (file operations return NULL instead of FALSE).
(Wez, Ilia)
- Fixed bug #26758 (FastCGI exits immediately with status 255).
(Ilia, tcarter at noggin dot com dot au)
- Fixed bug #26755 (CLI now overrides php.ini settings and switches off output
buffering). (Edin)
- Fixed bug #26753 (zend_fetch_list_dtor_id() doesn't check NULL strings).
(Jani, Markus dot Lidel at shadowconnect dot com)
- Fixed bug #26752 (Silent unterminated loop when length parameter for fgets(),
fread() and fgetss() is 0). (Ilia)
- Fixed bug #26751 (PHP can't find the MySQL socket on a case sensitive file
system). (Derick)
- Fixed Bug #26703 (Certain characters inside strings incorrectly treated as
keywords). (vrana [at] php [dot] net, Ilia)
- Fixed bug #26703 (Certain characters inside strings incorrectly treated
as keywords). (vrana [at] php [dot] net, Ilia)
- Fixed bug #26699 (mbstring doesn't identify "binary" as a valid encoding).
(nirva-php at ishiboo dot com, Moriyoshi)
- Fixed bug #26667 (Added safety checks to ip2long()). (Ilia)
- Fixed bug #26653 (open_basedir incorrectly resolved on win32).
(Ilia, scottmacvicar at ntlworld dot com)
- Fixed bug #26639 (mb_convert_variables() clutters variables beyond the
references). (Moriyoshi)
- Fixed bug #26635 (fixed look up for fonts in the current directory w/ZTS).
(Ilia)
- Fixed Bug #26625 (pg_convert sets NULL incorrectly for character data
types). (Ilia)
- Fixed bug #26625 (pg_convert sets NULL incorrectly for character data types).
(Ilia)
- Fixed bug #26604 (Apache2 SAPIs implicitly disable Keep-Alive). (Ilia)
- Fixed bug #26595 (ext/domxml: XSLT_NAMESPACE undeclared). (Christian)
- Fixed bug #26565 (strtotime("this month") resolving to the wrong month).
@@ -116,24 +586,25 @@ PHP 4 NEWS
- Fixed bug #26531 (ext/domxml: get_elements_by_tag_name() wildcard fails).
(Rob Richards)
- Fixed bug #26488 (Missing declaration of CRTSCTS in ext/dio/dio.c). (Jani)
- Fixed bug #26467 (flock() does not force the "wouldblock" parameter to be
- Fixed bug #26467 (flock() does not force the "wouldblock" parameter to be
passed by reference). (Wez)
- Fixed bug #26463 (Incorrect handling of semicolons after heredoc). (Ilia)
- Fixed bug #26462 (phpize + ext/bcmath -> compile error). (Jani)
- Fixed bug #26461 (-lssl missing from LIBS). (Jani)
- Fixed bug #26458 (var_dump(), var_export(), debug_zval_dump() not binary
safe for array keys). (Ilia)
- Fixed bug #26458 (var_dump(), var_export(), debug_zval_dump() not binary safe
for array keys). (Ilia)
- Fixed bug #26447 (--with-openssl=shared causes compile errors). (Jani)
- Fixed bug #26446 (domxml_open_file() returns an empty error-Array). (Rob)
- Fixed bug #26440 (MFH missing context options). (Ilia)
- Fixed bug #26438 (error in thttpd SAPI installation). (Jani)
- Fixed bug #26391 (parse_url() destroys strings that contain a character
in range of \x80-\xff)). (Moriyoshi)
- Fixed bug #26415 (Updated bundled OpenSSL DLLs in the Windows
distribution to 0.9.7c). (Edin)
- Fixed bug #25963 (PostgreSQL error message include \n characters).
(Marcus, Ilia)
- Fixed bug #26415 (Updated bundled OpenSSL DLLs in the Windows distribution
to 0.9.7c). (Edin)
- Fixed bug #26407 (Result set fetching broken around transactions). (Timm)
- Fixed bug #26391 (parse_url() destroys strings that contain a character in
range of \x80-\xff)). (Moriyoshi)
- Fixed bug #26384 (crash in domxslt->process()). (Christian)
- Fixed bug #26381 (rand() without srand() doesn't work with certain php.ini).
(Jani)
- Fixed bug #26376 (typo in ext/odbc/config.m4: DBMaker test fails). (Jani)
- Fixed bug #26355 (flock() doesn't initialize the wouldblock argument). (Ilia)
- Fixed bug #26309 (Fixed argument parsing for imageftbbox()). (Ilia)
@@ -150,36 +621,55 @@ PHP 4 NEWS
- Fixed bug #26194 (iconv() not properly defined with libiconv).
(Steph, Frank, Moriyoshi)
- Fixed bug #26176 (Fixed handling of numeric keys in INI files). (Ilia)
- Fixed bug #26168 (shtool availability check in phpize).
- Fixed bug #26168 (shtool availability check in phpize).
(robbat2 at gentoo dot org, Ilia)
- Fixed bug #26148 (Print the notice before modifying variable on type
mismatch). (morten-bugs dot php dot net at afdelingp dot dk, Ilia)
- Fixed bug #26128 (mbstring prints out wrong information on phpinfo()).
(Moriyoshi)
- Fixed bug #26113 (remove leftover local file when ftp_get/ftp_nb_get fails).
(Ilia)
- Fixed bug #26105 (Compile failure on gcc version 3.0.X). (Ilia)
- Fixed bug #26113 (remove leftover local file when ftp_get/ftp_nb_get
fails). (Ilia)
- Fixed bug #26105 (Compile failure on GCC version 3.0.X). (Ilia)
- Fixed bug #26103 (ext/mime_magic causes compile failure in ext/mssql). (Jani)
- Fixed bug #26097 (gdImageColorClosestAlpha() returns incorrect results).
(sprice at wisc dot edu, Ilia)
- Fixed bug #26042 (memory leak if mcrypt_generic_deinit() is not called
after every mcrypt_generic_init() call). (Ilia)
- Fixed bug #26042 (memory leak if mcrypt_generic_deinit() is not called after
every mcrypt_generic_init() call). (Ilia)
- Fixed bug #26025 (Segfault on glob() without GLOB_NOCHECK or GLOB_NOMAGIC
under *BSD platforms). (Moriyoshi)
- Fixed bug #26005 (Random "cannot change the session ini settings" errors).
(Jani, jsnajdr at kerio dot com)
- Fixed bug #26003 (Make fgetcsv() binary safe). (Ilia, Moriyoshi)
- Fixed bug #25963 (PostgreSQL error message include \n characters).
(Marcus, Ilia)
- Fixed bug #25939 (feof() not working correctly for sockets). (Wez)
- Fixed bug #25916 (get_browser() -> PHP Fatal error: Nesting level
too deep - recursive dependency?). (Uwe Schindler)
- Fixed bug #25916 (get_browser() -> PHP Fatal error: Nesting level too
deep - recursive dependency?). (Uwe Schindler)
- Fixed bug #25794 (Cannot open existing hash db3 file with write" ext/dba).
(Marcus)
- Fixed Bug #25694 (round() and number_format() give inconsistent results).
- Fixed bug #25753 (php.ini settings "leak" from vhosts/.htaccess files).
(Patch by: rover at tob dot ru)
- Fixed bug #25694 (round() and number_format() give inconsistent results).
(Ilia)
- Fixed bug #25664 (calling ITypeInfo::Invoke with bogus params). (Wez)
- Fixed bug #25581 (getimagesize () return incorrect values on bitmap
(os2) files). (Marcus)
- Fixed bug #25329 (sqlite_create_function with method and reference to $this).
(Marcus).
- Fixed bug #25581 (getimagesize () return incorrect values on bitmap (os2)
files). (Marcus)
- Fixed bug #25329 (sqlite_create_function with method and reference to
$this). (Marcus).
- Fixed bug #24773 (unsetting string as array causes a crash). (Sara)
- Fixed bug #24773 (Unsetting string offsets crashes PHP). (Moriyoshi, Sara)
- Fixed bug #24582 (extensions can't be loaded dynamically in Solaris/iPlanet).
(Jani)
- Fixed bug #23467 (date('T') outputs incorrect Time Zone).
(Jani, scottmacvicar at ntlworld dot com)
- Fixed bug #22403 (PHP crashes when executing a sql procedure without
parameters). (Timm)
- Fixed bug #22127 (Invalid response code when force-cgi-redirect safety
mechanism is triggered). (Ilia, scottmacvicar at ntlworld dot com)
- Fixed bug #21760 (Use of uninitialized pointer inside php_read()).
(Ilia, uce at ftc dot gov)
- Fixed bug #21513 (shutdown functions not executed if timed out). (Zeev)
- Fixed bug #21070 (ftp_genlist/ANSI-tmpfile() fail w/ some platform). (Sara)
3 Nov 2003, Version 4.3.4
- Made MCVE extension available on win32. (Jani)
+28 -28
View File
@@ -29,7 +29,14 @@ Having said that, here are the organizational rules:
5. If you don't know how to do something, ask first!
6. Test your changes before committing them. We mean it. Really.
Currently we have the following branches in use:
HEAD Will become PHP 5.1. This CVS branch is for active development.
PHP_5_0 Is used to release the PHP 5.0.x series. Only minor feature
enhancements may go in here, but please keep that as infrequent as
possible.
PHP_4_3 Is used to release the PHP 4.3.x series. Only bugfixes are permitted
on this branch.
The next few rules are more of a technical nature.
@@ -37,8 +44,11 @@ The next few rules are more of a technical nature.
messages every day. Woe be to those who attempt to mess with it.
2. All news updates intended for public viewing, such as new features,
bug fixes, improvements, etc., should go into the NEWS file. Also see
the note below about automatically updating NEWS in your commit message.
bug fixes, improvements, etc., should go into the NEWS file.
NB! Lines, starting with @ will go automagically into NEWS file, but
this is NOT recommended, though. Please, add news entries directly to
NEWS file and don't forget to keep them adjusted and sorted.
3. Do not commit multiple file and dump all messages in one commit. If you
modified several unrelated files, commit each group separately and
@@ -58,37 +68,29 @@ The next few rules are more of a technical nature.
The format of the commit messages is pretty simple.
Use a - to start a new item in your commit message.
If a line begins with #, it is taken to be a comment and will not appear
in the ChangeLog. If the line begins with @, it will be redirected to the
NEWS file. Everything else goes into the ChangeLog.
in the ChangeLog. Everything else goes into the ChangeLog.
It is important to note that if your comment or news logline spans multiple
lines, you have to put # or @ at the beginning of _every_ such line. Every
entry in NEWS has to have a name after it, so if you did it with someone's
help, put both your names there. Your name WILL NOT be automatically put
at the end of the NEWS entry - so, please provide it yourself.
lines, you have to put # at the beginning of _every_ such line.
Example. Say you modified two files, datetime.c and string.c. In datetime.c
you added a new format option for date() function, and in string.c you fixed
a memory leak in php_trim(). Don't commit both of these at once. Commit them
Example. Say you modified two files, datetime.c and string.c. In datetime.c you
added a new format option for the date() function, and in string.c you fixed a
memory leak in php_trim(). Don't commit both of these at once. Commit them
separately and try to make sure your commit messages look something like the
following.
For datetime.c:
(PHP date) Added new 'K' format modifier for printing out number of
days until New Year's Eve.
@- Added new 'K' format modifier that will output the number of days
@ until New Year's Eve. (Bob)
- Added new 'K' format modifier to date() for printing out number of days until
New Year's Eve.
For string.c:
(php_trim) Fixed a memory leak resulting from improper use of zval_dtor().
# Man, that thing was leaking all over the place!
@- Fixed memory leak in trim(). (Bob)
- Fixed a memory leak in php_trim() resulting from improper use of zval_dtor().
#- Man, that thing was leaking all over the place!
The lines above marked with @ will go into NEWS file automagically, and the
# lines will be omitted from the ChangeLog. Alternatively, you might want
to modify NEWS file directly and not use the @ lines.
The # lines will be omitted from the ChangeLog automagically.
If you fix some bugs, you should note the bug ID numbers in your
commit message. Bug ID should be prefixed by "#" for easier access to
@@ -96,13 +98,11 @@ bug report when developers are browsing CVS via. LXR or Bonsai.
Example:
Fixed pgsql notice handler double free crash bug. Bug #14016
@ Fixed pgsql notice handler double free crash bug. Bug #14016
Fixed bug #14016 (pgsql notice handler double free crash bug.)
If you don't see your messages in ChangeLog and NEWS right away, don't worry!
If you don't see your messages in ChangeLog right away, don't worry!
These files are updated once a day, so your stuff will not show up until
somewhat later. Don't go adding stuff to NEWS by hand if you already put @
lines in the commit message.
somewhat later.
You can use LXR (http://lxr.php.net/) and Bonsai (http://bonsai.php.net/)
to look at PHP CVS repository in various ways.
-3
View File
@@ -13,9 +13,6 @@ Zend
* Allow to set a default value for call-by-reference-parameters.
eg: function hello (&$pallo = NULL) {}
* Disallow function(method) redefinition in class.
* Add configure test to determine if dlsym() requires underscore and set
DLSYM_NEEDS_UNDERSCORE accordingly. Perl and zsh have it in configure,
for example. (DONE?)
For PHP 5.0.0:
* Native large number support (probably with GNU GMP)
+1 -3
View File
@@ -25,12 +25,12 @@ Fixed:
mb_strcut('', [number greater than the length of first arg]) (Moriyoshi)
ext/exif, ext/dba (Marcus)
php_base64_encode (Moriyoshi)
pack (Ilia)
Open:
the dbase extension (1)
socket_select (2)
pack (3)
(1) heap corruption, mostly visible in malloc-related calls. Whether you see
this or not might depend on your libc/compiler. Hard to track down,
@@ -70,8 +70,6 @@ Methodology
echo dbase_open | php do_crash.txt
(3) multiple integer overflows, ex. pack("d4294967297", 2);
Amendment 1.
CFLAGS='-O0 -g' \
+8 -2
View File
@@ -158,9 +158,15 @@ TSRM_API void tsrm_shutdown(void)
next_p = p->next;
for (j=0; j<p->count; j++) {
/* Disabled - calling dtors in tsrm_shutdown makes
modules registering TSRM ids to crash, if they have
dtors, since the module is unloaded before tsrm_shutdown
is called. Can be re-enabled after tsrm_free_id is
implemented.
if (resource_types_table && resource_types_table[j].dtor) {
resource_types_table[j].dtor(p->storage[j], &p->storage);
}
*/
free(p->storage[j]);
}
free(p->storage);
@@ -279,11 +285,11 @@ static void allocate_new_resource(tsrm_tls_entry **thread_resources_ptr, THREAD_
}
}
tsrm_mutex_unlock(tsmm_mutex);
if (tsrm_new_thread_end_handler) {
tsrm_new_thread_end_handler(thread_id, &((*thread_resources_ptr)->storage));
}
tsrm_mutex_unlock(tsmm_mutex);
}
+1 -1
View File
@@ -15,7 +15,7 @@
/* #ifndef WIN32 */
#if !defined(WIN32) && !defined(NETWARE)
# include "tsrm_config.h"
# include <tsrm_config.h>
#endif
#ifdef WIN32
+1 -1
View File
@@ -1,5 +1,5 @@
AC_DEFUN(AM_SET_LIBTOOL_VARIABLE,[
AC_DEFUN([AM_SET_LIBTOOL_VARIABLE],[
LIBTOOL='$(SHELL) $(top_builddir)/libtool $1'
])
+4 -4
View File
@@ -30,7 +30,7 @@ dnl PTHREADS_FLAGS
dnl
dnl Set some magic defines to achieve POSIX threads conformance
dnl
AC_DEFUN(PTHREADS_FLAGS,[
AC_DEFUN([PTHREADS_FLAGS],[
if test -z "$host_alias" && test -n "$host"; then
host_alias=$host
fi
@@ -65,7 +65,7 @@ dnl PTHREADS_CHECK_COMPILE
dnl
dnl Check whether the current setup can use POSIX threads calls
dnl
AC_DEFUN(PTHREADS_CHECK_COMPILE, [
AC_DEFUN([PTHREADS_CHECK_COMPILE], [
AC_TRY_RUN( [
#include <pthread.h>
#include <stddef.h>
@@ -100,7 +100,7 @@ dnl -pthreads gcc (Solaris)
dnl -qthreaded AIX cc V5
dnl -threads gcc (HP-UX)
dnl
AC_DEFUN(PTHREADS_CHECK,[
AC_DEFUN([PTHREADS_CHECK],[
if test "$beos_threads" = "1"; then
pthreads_working="yes"
@@ -154,7 +154,7 @@ fi
])dnl
dnl
dnl
AC_DEFUN(PTHREADS_ASSIGN_VARS,[
AC_DEFUN([PTHREADS_ASSIGN_VARS],[
if test -n "$ac_cv_pthreads_lib"; then
LIBS="$LIBS -l$ac_cv_pthreads_lib"
fi
+6 -6
View File
@@ -1,6 +1,6 @@
dnl TSRM_CHECK_GCC_ARG(ARG, ACTION-IF-FOUND, ACTION-IF-NOT_FOUND)
AC_DEFUN(TSRM_CHECK_GCC_ARG,[
AC_DEFUN([TSRM_CHECK_GCC_ARG],[
gcc_arg_name=[ac_cv_gcc_arg]translit($1,A-Z-,a-z_)
AC_CACHE_CHECK([whether $CC supports $1], [ac_cv_gcc_arg]translit($1,A-Z-,a-z_), [
echo 'void somefunc() { };' > conftest.c
@@ -21,7 +21,7 @@ AC_DEFUN(TSRM_CHECK_GCC_ARG,[
fi
])
AC_DEFUN(TSRM_BASIC_CHECKS,[
AC_DEFUN([TSRM_BASIC_CHECKS],[
AC_REQUIRE([AC_PROG_CC])dnl
dnl AC_REQUIRE([AM_PROG_CC_STDC])dnl
@@ -33,7 +33,7 @@ AC_CHECK_HEADERS(stdarg.h)
])
AC_DEFUN(TSRM_CHECK_PTH,[
AC_DEFUN([TSRM_CHECK_PTH],[
AC_MSG_CHECKING(for GNU Pth)
PTH_PREFIX="`$1 --prefix`"
@@ -50,7 +50,7 @@ AC_MSG_RESULT(yes - installed in $PTH_PREFIX)
])
AC_DEFUN(TSRM_CHECK_ST,[
AC_DEFUN([TSRM_CHECK_ST],[
if test -r "$1/include/st.h"; then
CPPFLAGS="$CPPFLAGS -I$1/include"
LDFLAGS="$LDFLAGS -L$1/lib"
@@ -70,7 +70,7 @@ AC_DEFUN(TSRM_CHECK_ST,[
sinclude(threads.m4)
sinclude(TSRM/threads.m4)
AC_DEFUN(TSRM_CHECK_PTHREADS,[
AC_DEFUN([TSRM_CHECK_PTHREADS],[
PTHREADS_CHECK
@@ -89,7 +89,7 @@ fi
])
AC_DEFUN(TSRM_THREADS_CHECKS,[
AC_DEFUN([TSRM_THREADS_CHECKS],[
dnl For the thread implementations, we always use --with-*
dnl to maintain consistency
+1 -1
View File
@@ -10,7 +10,7 @@
#elif defined(NETWARE)
# include "tsrm_config.nw.h"
#else
# include "tsrm_config.h"
# include <tsrm_config.h>
# include <sys/param.h>
#endif
+51 -10
View File
@@ -301,15 +301,22 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
if (path_length == 0)
return (0);
if (path_length >= MAXPATHLEN)
return (1);
#if !defined(TSRM_WIN32) && !defined(NETWARE)
/* cwd_length can be 0 when getcwd() fails.
* This can happen under solaris when a dir does not have read permissions
* but *does* have execute permissions */
if (IS_ABSOLUTE_PATH(path, path_length) || (state->cwd_length < 1)) {
if (use_realpath && realpath(path, resolved_path)) {
path = resolved_path;
path_length = strlen(path);
if (use_realpath) {
if (realpath(path, resolved_path)) {
path = resolved_path;
path_length = strlen(path);
} else {
/* disable for now
return 1; */
}
}
} else { /* Concat current directory with relative path and then run realpath() on it */
char *tmp;
@@ -325,9 +332,19 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
memcpy(ptr, path, path_length);
ptr += path_length;
*ptr = '\0';
if (use_realpath && realpath(tmp, resolved_path)) {
path = resolved_path;
path_length = strlen(path);
if (strlen(tmp) >= MAXPATHLEN) {
free(tmp);
return 1;
}
if (use_realpath) {
if (realpath(tmp, resolved_path)) {
path = resolved_path;
path_length = strlen(path);
} else {
/* disable for now
free(tmp);
return 1; */
}
}
free(tmp);
}
@@ -818,13 +835,24 @@ CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
{
int command_length;
int dir_length, extra = 0;
char *command_line;
char *ptr;
char *ptr, *dir;
FILE *retval;
command_length = strlen(command);
ptr = command_line = (char *) malloc(command_length + sizeof("cd ; ") + CWDG(cwd).cwd_length+1);
dir_length = CWDG(cwd).cwd_length;
dir = CWDG(cwd).cwd;
while (dir_length > 0) {
if (*dir == '\'') extra+=3;
dir++;
dir_length--;
}
dir_length = CWDG(cwd).cwd_length;
dir = CWDG(cwd).cwd;
ptr = command_line = (char *) malloc(command_length + sizeof("cd '' ; ") + dir_length +extra+1+1);
if (!command_line) {
return NULL;
}
@@ -834,8 +862,21 @@ CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
if (CWDG(cwd).cwd_length == 0) {
*ptr++ = DEFAULT_SLASH;
} else {
memcpy(ptr, CWDG(cwd).cwd, CWDG(cwd).cwd_length);
ptr += CWDG(cwd).cwd_length;
*ptr++ = '\'';
while (dir_length > 0) {
switch (*dir) {
case '\'':
*ptr++ = '\'';
*ptr++ = '\\';
*ptr++ = '\'';
/* fall-through */
default:
*ptr++ = *dir;
}
dir++;
dir_length--;
}
*ptr++ = '\'';
}
*ptr++ = ' ';
+167 -26
View File
@@ -1,4 +1,4 @@
dnl $Id$
dnl $Id$ -*- autoconf -*-
dnl
dnl This file contains local autoconf functions.
@@ -16,21 +16,35 @@ AC_DEFUN([PHP_ADD_MAKEFILE_FRAGMENT],[
sed -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src >> Makefile.fragments
])
AC_DEFUN(PHP_PROG_RE2C,[
AC_DEFUN([PHP_PROG_RE2C],[
AC_CHECK_PROG(RE2C, re2c, re2c, [exit 0;])
])
dnl PHP_DEFINE(WHAT[, value])
dnl PHP_DEFINE(WHAT[, value[, directory]])
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]
[echo "#define ]$1[]ifelse([$2],,[ 1],[ $2])[" > ]ifelse([$3],,[include],[$3])[/php_]translit($1,A-Z,a-z)[.h]
])
dnl PHP_CANONICAL_HOST
dnl
AC_DEFUN([PHP_CANONICAL_HOST],[
AC_REQUIRE([AC_CANONICAL_HOST])dnl
dnl Make sure we do not continue if host_alias is empty.
if test -z "$host_alias" && test -n "$host"; then
host_alias=$host
fi
if test -z "$host_alias"; then
AC_MSG_ERROR([host_alias is not set!])
fi
])
dnl PHP_INIT_BUILD_SYSTEM
dnl
AC_DEFUN([PHP_INIT_BUILD_SYSTEM],[
AC_REQUIRE([PHP_CANONICAL_HOST])dnl
test -d include || mkdir include
> Makefile.objects
> Makefile.fragments
@@ -129,7 +143,7 @@ dnl append to the array which has been dynamically chosen at m4 time
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" ;;
*.cpp|*.cc[)] 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
@@ -277,6 +291,7 @@ int readdir_r(DIR *, struct dirent *);
])
AC_DEFUN([PHP_SHLIB_SUFFIX_NAME],[
AC_REQUIRE([PHP_CANONICAL_HOST])dnl
PHP_SUBST(SHLIB_SUFFIX_NAME)
SHLIB_SUFFIX_NAME=so
case $host_alias in
@@ -775,12 +790,17 @@ AC_DEFUN([PHP_BUILD_PROGRAM],[
php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
php_cxx_post=' && echo > $[@]'
php_lo=o
case $with_pic in
yes) pic_setting='-prefer-pic';;
no) pic_setting='-prefer-non-pic';;
esac
shared_c_pre='$(LIBTOOL) --mode=compile $(CC)'
shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -prefer-pic'
shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting
shared_c_post=
shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'
shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -prefer-pic'
shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting
shared_cxx_post=
shared_lo=lo
@@ -1160,14 +1180,26 @@ dnl from object_var in build-dir.
dnl
AC_DEFUN([PHP_SHARED_MODULE],[
install_modules="install-modules"
PHP_MODULES="$PHP_MODULES \$(phplibdir)/$1.la"
case $host_alias in
*darwin*[)]
suffix=so
link_cmd='ifelse($4,,[$(CC)],[$(CXX)]) -dynamic -flat_namespace -bundle -undefined suppress $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o [$]@ $(EXTRA_LDFLAGS) $($2) $(translit($1,a-z_-,A-Z__)_SHARED_LIBADD)'
;;
*[)]
suffix=la
link_cmd='$(LIBTOOL) --mode=link ifelse($4,,[$(CC)],[$(CXX)]) $(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)'
;;
esac
PHP_MODULES="$PHP_MODULES \$(phplibdir)/$1.$suffix"
PHP_SUBST($2)
cat >>Makefile.objects<<EOF
\$(phplibdir)/$1.la: $3/$1.la
\$(LIBTOOL) --mode=install cp $3/$1.la \$(phplibdir)
\$(phplibdir)/$1.$suffix: $3/$1.$suffix
\$(LIBTOOL) --mode=install cp $3/$1.$suffix \$(phplibdir)
$3/$1.la: \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_DEPENDENCIES)
\$(LIBTOOL) --mode=link ifelse($4,,[\$(CC)],[\$(CXX)]) \$(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)
$3/$1.$suffix: \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_DEPENDENCIES)
$link_cmd
EOF
])
@@ -1559,7 +1591,7 @@ AC_DEFUN([PHP_CHECK_LIBRARY], [
],[
LDFLAGS=$save_old_LDFLAGS
ext_shared=$save_ext_shared
unset ac_cv_func_$1
unset ac_cv_lib_$1[]_$2
$4
])dnl
])
@@ -1584,6 +1616,64 @@ AC_DEFUN([PHP_CHECK_FRAMEWORK], [
])
])
dnl
dnl PHP_SETUP_KERBEROS(shared-add [, action-found [, action-not-found]])
dnl
dnl Common setup macro for kerberos
dnl
AC_DEFUN([PHP_SETUP_KERBEROS],[
found_kerberos=no
unset KERBEROS_CFLAGS
unset KERBEROS_LIBS
dnl First try to find krb5-config
if test -z "$KRB5_CONFIG"; then
AC_PATH_PROG(KRB5_CONFIG, krb5-config, no, [$PATH:/usr/kerberos/bin:/usr/local/bin])
fi
dnl If krb5-config is found try using it
if test "$PHP_KERBEROS" = "yes" && test -x "$KRB5_CONFIG"; then
KERBEROS_LIBS=`$KRB5_CONFIG --libs gssapi`
KERBEROS_CFLAGS=`$KRB5_CONFIG --cflags gssapi`
if test -n "$KERBEROS_LIBS" && test -n "$KERBEROS_CFLAGS"; then
found_kerberos=yes
PHP_EVAL_LIBLINE($KERBEROS_LIBS, $1)
PHP_EVAL_INCLINE($KERBEROS_CFLAGS)
fi
fi
dnl If still not found use old skool method
if test "$found_kerberos" = "no"; then
if test "$PHP_KERBEROS" = "yes"; then
PHP_KERBEROS="/usr/kerberos /usr/local /usr"
fi
for i in $PHP_KERBEROS; do
if test -f $i/lib/libkrb5.a || test -f $i/lib/libkrb5.$SHLIB_SUFFIX_NAME; then
PHP_KERBEROS_DIR=$i
break
fi
done
if test "$PHP_KERBEROS_DIR"; then
found_kerberos=yes
PHP_ADD_LIBPATH($PHP_KERBEROS_DIR/lib, $1)
PHP_ADD_LIBRARY(gssapi_krb5, 1, $1)
PHP_ADD_LIBRARY(krb5, 1, $1)
PHP_ADD_LIBRARY(k5crypto, 1, $1)
PHP_ADD_LIBRARY(com_err, 1, $1)
PHP_ADD_INCLUDE($PHP_KERBEROS_DIR/include)
fi
fi
if test "$found_kerberos" = "yes"; then
ifelse([$2],[],:,[$2])
ifelse([$3],[],,[else $3])
fi
])
dnl
dnl PHP_SETUP_OPENSSL(shared-add [, action-found [, action-not-found]])
dnl
@@ -1594,13 +1684,24 @@ AC_DEFUN([PHP_SETUP_OPENSSL],[
unset OPENSSL_INCDIR
unset OPENSSL_LIBDIR
dnl Empty variable means 'no'
test -z "$PHP_OPENSSL" && PHP_OPENSSL=no
test -z "$PHP_IMAP_SSL" && PHP_IMAP_SSL=no
dnl Fallbacks for different configure options
if test "$PHP_OPENSSL" != "no"; then
PHP_OPENSSL_DIR=$PHP_OPENSSL
elif test "$PHP_IMAP_SSL" != "no"; then
PHP_OPENSSL_DIR=$PHP_IMAP_SSL
fi
dnl First try to find pkg-config
if test -z "$PKG_CONFIG"; then
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
fi
dnl If pkg-config is found try using it
if test "$PHP_OPENSSL" = "yes" && test -x "$PKG_CONFIG" && $PKG_CONFIG --exists openssl; then
if test "$PHP_OPENSSL_DIR" = "yes" && test -x "$PKG_CONFIG" && $PKG_CONFIG --exists openssl; then
if $PKG_CONFIG --atleast-version=0.9.6 openssl; then
found_openssl=yes
OPENSSL_LIBS=`$PKG_CONFIG --libs openssl`
@@ -1614,15 +1715,16 @@ AC_DEFUN([PHP_SETUP_OPENSSL],[
PHP_EVAL_LIBLINE($OPENSSL_LIBS, $1)
PHP_EVAL_INCLINE($OPENSSL_INCS)
fi
fi
else
dnl If pkg-config fails for some reason, revert to the old method
if test "$PHP_OPENSSL" = "yes"; then
PHP_OPENSSL="/usr/local/ssl /usr/local /usr /usr/local/openssl"
dnl If pkg-config fails for some reason, revert to the old method
if test "$found_openssl" = "no"; then
if test "$PHP_OPENSSL_DIR" = "yes"; then
PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
fi
for i in $PHP_OPENSSL; do
for i in $PHP_OPENSSL_DIR; do
if test -r $i/include/openssl/evp.h; then
OPENSSL_INCDIR=$i/include
fi
@@ -1680,11 +1782,11 @@ AC_DEFUN([PHP_SETUP_OPENSSL],[
PHP_ADD_LIBPATH($OPENSSL_LIBDIR, $1)
fi
if test "$found_openssl" = "yes"; then
dnl For apache 1.3.x static build
OPENSSL_INCDIR_OPT=-I$OPENSSL_INCDIR
AC_SUBST(OPENSSL_INCDIR_OPT)
if test "$found_openssl" = "yes"; then
ifelse([$2],[],:,[$2])
ifelse([$3],[],,[else $3])
fi
@@ -1699,16 +1801,28 @@ AC_DEFUN([PHP_SETUP_ICONV], [
found_iconv=no
unset ICONV_DIR
# Create the directories for a VPATH build:
test -d ext || mkdir ext
test -d ext/iconv || mkdir ext/iconv
echo > ext/iconv/php_have_bsd_iconv.h
echo > ext/iconv/php_have_glibc_iconv.h
echo > ext/iconv/php_have_libiconv.h
echo > ext/iconv/php_have_iconv.h
echo > ext/iconv/php_php_iconv_impl.h
echo > ext/iconv/php_php_iconv_h_path.h
echo > ext/iconv/php_iconv_supports_errno.h
dnl
dnl Check libc first if no path is provided in --with-iconv
dnl
if test "$PHP_ICONV" = "yes"; then
AC_CHECK_FUNC(iconv, [
PHP_DEFINE(HAVE_ICONV)
PHP_DEFINE(HAVE_ICONV,1,[ext/iconv])
found_iconv=yes
],[
AC_CHECK_FUNC(libiconv,[
PHP_DEFINE(HAVE_LIBICONV)
PHP_DEFINE(HAVE_LIBICONV,1,[ext/iconv])
found_iconv=yes
])
])
@@ -1741,11 +1855,11 @@ AC_DEFUN([PHP_SETUP_ICONV], [
then
PHP_CHECK_LIBRARY($iconv_lib_name, libiconv, [
found_iconv=yes
PHP_DEFINE(HAVE_LIBICONV)
PHP_DEFINE(HAVE_LIBICONV,1,[ext/iconv])
], [
PHP_CHECK_LIBRARY($iconv_lib_name, iconv, [
found_iconv=yes
PHP_DEFINE(HAVE_ICONV)
PHP_DEFINE(HAVE_ICONV,1,[ext/iconv])
], [], [
-L$ICONV_DIR/lib
])
@@ -1850,3 +1964,30 @@ IFS="- /.
APACHE_VERSION=`expr [$]4 \* 1000000 + [$]5 \* 1000 + [$]6`
])
dnl
dnl PHP_C_BIGENDIAN
dnl Replacement macro for AC_C_BIGENDIAN
dnl
AC_DEFUN([PHP_C_BIGENDIAN],
[AC_CACHE_CHECK([whether byte ordering is bigendian], ac_cv_c_bigendian_php,
[
ac_cv_c_bigendian_php=unknown
AC_TRY_RUN(
[
int main(void)
{
short one = 1;
char *cp = (char *)&one;
if (*cp == 0) {
return(0);
} else {
return(1);
}
}
], [ac_cv_c_bigendian_php=yes], [ac_cv_c_bigendian_php=no], [ac_cv_c_bigendian_php=unknown])
])
if test $ac_cv_c_bigendian_php = yes; then
AC_DEFINE(WORDS_BIGENDIAN, [], [Define if processor uses big-endian word])
fi
])
+1 -1
View File
@@ -65,7 +65,7 @@ snapshot:
md5sum $$distname.tar.bz2; \
bzip2 -t $$distname.tar.bz2
cvsclean:
cvsclean-work:
@for i in `find . -name .cvsignore`; do \
(cd `dirname $$i` 2>/dev/null && rm -rf `cat .cvsignore | grep -v config.nice` *.o *.a .libs || true); \
done
+9 -10
View File
@@ -14,7 +14,7 @@
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id$
# $Id$
#
include generated_lists
@@ -32,6 +32,10 @@ acconfig_h_SOURCES = acconfig.h.in $(config_h_files)
targets = $(TOUCH_FILES) configure $(config_h_in)
PHP_AUTOCONF ?= 'autoconf'
PHP_AUTOHEADER ?= 'autoheader'
SUPPRESS_WARNINGS ?= 2>&1 | (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_DECL_YYTEXT is expanded from...|the top level)'||true)
all: $(targets)
@@ -39,26 +43,21 @@ 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)'||true)
$(config_h_in): configure acconfig.h
# explicitly remove target since autoheader does not seem to work
# correctly otherwise (timestamps are not updated)
@echo rebuilding $@
@rm -f $@
@autoheader 2>&1 | $(SUPPRESS_WARNINGS)
$(PHP_AUTOHEADER) $(SUPPRESS_WARNINGS)
$(TOUCH_FILES):
touch $(TOUCH_FILES)
aclocal.m4: configure.in acinclude.m4
@echo rebuilding $@
@libtoolize=`./build/shtool path glibtoolize libtoolize`; \
$$libtoolize --copy --automake; \
ltpath=`dirname $$libtoolize`; \
ltfile=`cd $$ltpath/../share/aclocal; pwd`/libtool.m4; \
cat acinclude.m4 $$ltfile > $@
cat acinclude.m4 ./build/libtool.m4 > $@
configure: aclocal.m4 configure.in $(config_m4_files)
@echo rebuilding $@
@autoconf 2>&1 | $(SUPPRESS_WARNINGS)
$(PHP_AUTOCONF) $(SUPPRESS_WARNINGS)
+7 -41
View File
@@ -16,15 +16,20 @@
# | Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id: buildcheck.sh,v 1.21.2.6 2003-09-28 13:37:59 tal Exp $
# $Id: buildcheck.sh,v 1.21.2.13 2005-04-07 23:33:50 jon Exp $
#
echo "buildconf: checking installation..."
stamp=$1
# Allow the autoconf executable to be overridden by $PHP_AUTOCONF.
if test -z "$PHP_AUTOCONF"; then
PHP_AUTOCONF='autoconf'
fi
# autoconf 2.13 or newer
ac_version=`autoconf --version 2>/dev/null|head -n 1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
ac_version=`$PHP_AUTOCONF --version 2>/dev/null|head -n 1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
if test -z "$ac_version"; then
echo "buildconf: autoconf not found."
echo " You need autoconf version 2.13 or newer installed"
@@ -41,7 +46,6 @@ else
echo "buildconf: autoconf version $ac_version (ok)"
fi
if test "$1" = "2" && test "$2" -ge "50"; then
echo "buildconf: Your version of autoconf likely contains buggy cache code."
echo " Running cvsclean for you."
@@ -50,44 +54,6 @@ if test "$1" = "2" && test "$2" -ge "50"; then
stamp=
fi
# libtoolize 1.4.3 or newer
# Prefer glibtoolize over libtoolize for Mac OS X compatibility
libtoolize=`./build/shtool path glibtoolize libtoolize 2> /dev/null`
lt_pversion=`$libtoolize --version 2>/dev/null|head -n 1|sed -e 's/^[^0-9]*//'`
if test "$lt_pversion" = ""; then
echo "buildconf: libtool not found."
echo " You need libtool version 1.4.3 or newer installed"
echo " to build PHP from CVS."
exit 1
fi
IFS=.; set $lt_pversion; IFS=' '
if test "$3" = ""; then
third=0
else
third=$3
fi
if test "$1" -gt "1" || test "$2" -ge "5" || (test "$2" -ge "4" && test "$third" -ge "3")
then
echo "buildconf: libtool version $lt_pversion (ok)"
else
echo "buildconf: libtool version $lt_pversion found."
echo " You need libtool version 1.4.3 or newer installed"
echo " to build PHP from CVS."
exit 1
fi
ltpath=`echo $libtoolize | sed -e 's#/[^/]*/[^/]*$##'`
ltfile="$ltpath/share/aclocal/libtool.m4"
if test -r "$ltfile"; then
:
else
echo "buildconf: $ltfile does not exist."
echo " Please reinstall libtool."
exit 1
fi
test -n "$stamp" && touch $stamp
exit 0
+3713
View File
File diff suppressed because it is too large. Load diff
+228 -151
View File
@@ -1,12 +1,12 @@
#!/bin/sh
##
## GNU shtool -- The GNU Portable Shell Tool
## Copyright (c) 1994-2002 Ralf S. Engelschall <rse@engelschall.com>
## Copyright (c) 1994-2005 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.6.2 (02-Nov-2002)
## Version: 2.0.2 (15-Jun-2005)
## Contents: 4/19 available modules
##
@@ -54,7 +54,7 @@
## rotate Logfile rotation
## tarball Roll distribution tarballs
## subst Apply sed(1) substitution operations
## guessos Simple operating system guesser
## platform Platform Identification Utility
## arx Extended archive command
## slo Separate linker options by library class
## scpp Sharing C Pre-Processor
@@ -66,9 +66,9 @@ if [ $# -eq 0 ]; then
echo "$0:Hint: run \`$0 -h' for usage" 1>&2
exit 1
fi
if [ ".$1" = ".-h" -o ".$1" = ".--help" ]; then
echo "This is GNU shtool, version 1.6.2 (02-Nov-2002)"
echo "Copyright (c) 1994-2002 Ralf S. Engelschall <rse@engelschall.com>"
if [ ".$1" = ".-h" ] || [ ".$1" = ".--help" ]; then
echo "This is GNU shtool, version 2.0.2 (15-Jun-2005)"
echo "Copyright (c) 1994-2005 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>]]"
@@ -80,7 +80,7 @@ if [ ".$1" = ".-h" -o ".$1" = ".--help" ]; then
echo ' -r, --recreate recreate this shtool script via shtoolize'
echo ''
echo 'Available <cmd-name> [<cmd-options>] [<cmd-args>]:'
echo ' echo [-n|--newline] [-e|--expand] [<str> ...]'
echo ' echo [-n|--newline] [-e|--expand] [<string> ...]'
echo ' install [-v|--verbose] [-t|--trace] [-d|--mkdir] [-c|--copy]'
echo ' [-C|--compare-copy] [-s|--strip] [-m|--mode <mode>]'
echo ' [-o|--owner <owner>] [-g|--group <group>] [-e|--exec'
@@ -106,17 +106,21 @@ if [ ".$1" = ".-h" -o ".$1" = ".--help" ]; then
echo ' rotate [-v|--verbose] [-t|--trace] [-f|--force] [-n|--num-files'
echo ' <count>] [-s|--size <size>] [-c|--copy] [-r|--remove]'
echo ' [-a|--archive-dir <dir>] [-z|--compress [<tool>:]<level>]'
echo ' [-b|--background] [-d|--delay] [-p|--pad <len>] [-o|--owner'
echo ' <owner>] [-g|--group <group>] [-m|--mode <mode>] [-M|--migrate'
echo ' [-b|--background] [-d|--delay] [-p|--pad <len>] [-m|--mode'
echo ' <mode>] [-o|--owner <owner>] [-g|--group <group>] [-M|--migrate'
echo ' <cmd>] [-P|--prolog <cmd>] [-E|--epilog <cmd>] <file> [...]'
echo ' tarball [-t|--trace] [-v|--verbose] [-o|--output <tarball>]'
echo ' [-c|--compress <prog>] [-d|--directory <dir>] [-u|--user'
echo ' <user>] [-g|--group <group>] [-e|--exclude <pattern>]'
echo ' <path> [<path> ...]'
echo ' subst [-v|--verbose] [-t|--trace] [-n|--nop] [-s|--stealth]'
echo ' [-i|--interactive] [-b|--backup <ext>] [-e|--exec <cmd>]'
echo ' [-f|--file <cmd-file>] [<file>] [...]'
echo ' guessos '
echo ' subst [-v|--verbose] [-t|--trace] [-n|--nop] [-w|--warning]'
echo ' [-q|--quiet] [-s|--stealth] [-i|--interactive] [-b|--backup'
echo ' <ext>] [-e|--exec <cmd>] [-f|--file <cmd-file>] [<file>]'
echo ' [...]'
echo ' platform [-F|--format <format>] [-S|--sep <string>] [-C|--conc'
echo ' <string>] [-L|--lower] [-U|--upper] [-v|--verbose]'
echo ' [-c|--concise] [-n|--no-newline] [-t|--type <type>]'
echo ' [-V|--version] [-h|--help]'
echo ' arx [-t|--trace] [-C|--command <cmd>] <op> <archive> [<file>'
echo ' ...]'
echo ' slo [-p|--prefix <str>] -- -L<dir> -l<lib> [-L<dir> -l<lib>'
@@ -131,15 +135,15 @@ if [ ".$1" = ".-h" -o ".$1" = ".--help" ]; then
echo ''
exit 0
fi
if [ ".$1" = ".-v" -o ".$1" = ."--version" ]; then
echo "GNU shtool 1.6.2 (02-Nov-2002)"
if [ ".$1" = ".-v" ] || [ ".$1" = ".--version" ]; then
echo "GNU shtool 2.0.2 (15-Jun-2005)"
exit 0
fi
if [ ".$1" = ".-r" -o ".$1" = ."--recreate" ]; then
if [ ".$1" = ".-r" ] || [ ".$1" = ".--recreate" ]; then
shtoolize -oshtool echo install mkdir path
exit 0
fi
if [ ".$1" = ".-d" -o ".$1" = ."--debug" ]; then
if [ ".$1" = ".-d" ] || [ ".$1" = ".--debug" ]; then
shift
set -x
fi
@@ -166,7 +170,7 @@ gen_tmpfile=no
case $tool in
echo )
str_tool="echo"
str_usage="[-n|--newline] [-e|--expand] [<str> ...]"
str_usage="[-n|--newline] [-e|--expand] [<string> ...]"
arg_spec="0+"
opt_spec="n.e."
opt_alias="n:newline,e:expand"
@@ -261,7 +265,7 @@ eval `echo h.$opt_spec |\
# parse option alias string
eval `echo h:help,$opt_alias |\
tr 'x-' 'x_' | sed -e 's/\([a-zA-Z0-9]\):\([^,]*\),*/opt_ALIAS_\2=\1;/g'`
sed -e 's/-/_/g' -e 's/\([a-zA-Z0-9]\):\([^,]*\),*/opt_ALIAS_\2=\1;/g'`
# interate over argument line
opt_PREV=''
@@ -286,12 +290,12 @@ while [ $# -gt 0 ]; do
--[a-zA-Z0-9]*=*)
eval `echo "x$1" |\
sed -e 's/^x--\([a-zA-Z0-9-]*\)=\(.*\)$/opt_OPT="\1";opt_ARG="\2"/'`
opt_STR=`echo $opt_OPT | tr 'x-' 'x_'`
opt_STR=`echo $opt_OPT | sed -e 's/-/_/g'`
eval "opt_OPT=\${opt_ALIAS_${opt_STR}-${opt_OPT}}"
;;
--[a-zA-Z0-9]*)
opt_OPT=`echo "x$1" | cut -c4-`
opt_STR=`echo $opt_OPT | tr 'x-' 'x_'`
opt_STR=`echo $opt_OPT | sed -e 's/-/_/g'`
eval "opt_OPT=\${opt_ALIAS_${opt_STR}-${opt_OPT}}"
opt_ARG=''
;;
@@ -315,8 +319,8 @@ while [ $# -gt 0 ]; do
# determine whether option needs an argument
eval "opt_MODE=\$opt_MODE_${opt_OPT}"
if [ ".$opt_ARG" = . -a ".$opt_ARG_OK" != .yes ]; then
if [ ".$opt_MODE" = ".:" -o ".$opt_MODE" = ".+" ]; then
if [ ".$opt_ARG" = . ] && [ ".$opt_ARG_OK" != .yes ]; then
if [ ".$opt_MODE" = ".:" ] || [ ".$opt_MODE" = ".+" ]; then
opt_PREV="$opt_OPT"
continue
fi
@@ -375,6 +379,7 @@ esac
# establish a temporary file on request
if [ ".$gen_tmpfile" = .yes ]; then
# create (explicitly) secure temporary directory
if [ ".$TMPDIR" != . ]; then
tmpdir="$TMPDIR"
elif [ ".$TEMPDIR" != . ]; then
@@ -382,12 +387,40 @@ if [ ".$gen_tmpfile" = .yes ]; then
else
tmpdir="/tmp"
fi
tmpfile="$tmpdir/.shtool.$$"
rm -f $tmpfile >/dev/null 2>&1
touch $tmpfile
chmod 600 $tmpfile
tmpdir="$tmpdir/.shtool.$$"
( umask 077
rm -rf "$tmpdir" >/dev/null 2>&1 || true
mkdir "$tmpdir" >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "$msgprefix:Error: failed to create temporary directory \`$tmpdir'" 1>&2
exit 1
fi
)
# create (implicitly) secure temporary file
tmpfile="$tmpdir/shtool.tmp"
touch "$tmpfile"
fi
# utility function: map string to lower case
util_lower () {
echo "$1" | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'
}
# utility function: map string to upper case
util_upper () {
echo "$1" | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
}
# cleanup procedure
shtool_exit () {
rc="$1"
if [ ".$gen_tmpfile" = .yes ]; then
rm -rf "$tmpdir" >/dev/null 2>&1 || true
fi
exit $rc
}
##
## DISPATCH INTO SCRIPT BODY
##
@@ -397,12 +430,11 @@ case $tool in
echo )
##
## echo -- Print string with optional construct expansion
## Copyright (c) 1998-2002 Ralf S. Engelschall <rse@engelschall.com>
## Originally written for WML as buildinfo
## Copyright (c) 1998-2005 Ralf S. Engelschall <rse@engelschall.com>
##
text="$*"
# check for broken escape sequence expansion
seo=''
bytes=`echo '\1' | wc -c | awk '{ printf("%s", $1); }'`
@@ -412,18 +444,18 @@ echo )
seo='-E'
fi
fi
# check for existing -n option (to suppress newline)
minusn=''
bytes=`echo -n 123 2>/dev/null | wc -c | awk '{ printf("%s", $1); }'`
if [ ".$bytes" = .3 ]; then
minusn='-n'
fi
# determine terminal bold sequence
term_bold=''
term_norm=''
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%[Bb]'`" != . ]; then
if [ ".$opt_e" = .yes ] && [ ".`echo $text | grep '%[Bb]'`" != . ]; then
case $TERM in
# for the most important terminal types we directly know the sequences
xterm|xterm*|vt220|vt220*)
@@ -459,96 +491,139 @@ echo )
break
fi
done
if [ ".$term_bold" != . -a ".$term_norm" != . ]; then
if [ ".$term_bold" != . ] && [ ".$term_norm" != . ]; then
break;
fi
done
;;
esac
if [ ".$term_bold" = . -o ".$term_norm" = . ]; then
if [ ".$term_bold" = . ] || [ ".$term_norm" = . ]; then
echo "$msgprefix:Warning: unable to determine terminal sequence for bold mode" 1>&2
term_bold=''
term_norm=''
fi
fi
# determine user name
username=''
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%[uUgG]'`" != . ]; then
username="$LOGNAME"
if [ ".$opt_e" = .yes ] && [ ".`echo $text | grep '%[uUgG]'`" != . ]; then
username="`(id -un) 2>/dev/null`"
if [ ".$username" = . ]; then
username="$USER"
if [ ".$username" = . ]; then
username="`(whoami) 2>/dev/null |\
awk '{ printf("%s", $1); }'`"
if [ ".$username" = . ]; then
username="`(who am i) 2>/dev/null |\
awk '{ printf("%s", $1); }'`"
if [ ".$username" = . ]; then
username='unknown'
fi
fi
fi
fi
fi
# determine user id
userid=''
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%U'`" != . ]; then
userid="`(id -u) 2>/dev/null`"
if [ ".$userid" = . ]; then
str="`(id) 2>/dev/null`"
if [ ".`echo $str | grep '^uid[ ]*=[ ]*[0-9]*('`" != . ]; then
userid=`echo $str | sed -e 's/^uid[ ]*=[ ]*//' -e 's/(.*//'`
username=`echo $str | sed -e 's/^uid[ ]*=[ ]*[0-9]*(//' -e 's/).*$//'`
fi
if [ ".$userid" = . ]; then
userid=`egrep "^${username}:" /etc/passwd 2>/dev/null | \
sed -e 's/[^:]*:[^:]*://' -e 's/:.*$//'`
if [ ".$userid" = . ]; then
userid=`(ypcat passwd) 2>/dev/null |
egrep "^${username}:" | \
sed -e 's/[^:]*:[^:]*://' -e 's/:.*$//'`
if [ ".$userid" = . ]; then
userid='?'
if [ ".$username" = . ]; then
username="$LOGNAME"
if [ ".$username" = . ]; then
username="$USER"
if [ ".$username" = . ]; then
username="`(whoami) 2>/dev/null |\
awk '{ printf("%s", $1); }'`"
if [ ".$username" = . ]; then
username="`(who am i) 2>/dev/null |\
awk '{ printf("%s", $1); }'`"
if [ ".$username" = . ]; then
username='unknown'
fi
fi
fi
fi
fi
fi
fi
# determine user id
userid=''
if [ ".$opt_e" = .yes ] && [ ".`echo $text | grep '%U'`" != . ]; then
userid="`(id -u) 2>/dev/null`"
if [ ".$userid" = . ]; then
userid="`(id -u ${username}) 2>/dev/null`"
if [ ".$userid" = . ]; then
str="`(id) 2>/dev/null`"
if [ ".`echo $str | grep '^uid[ ]*=[ ]*[0-9]*('`" != . ]; then
userid=`echo $str | sed -e 's/^uid[ ]*=[ ]*//' -e 's/(.*$//'`
fi
if [ ".$userid" = . ]; then
userid=`(getent passwd ${username}) 2>/dev/null | \
sed -e 's/[^:]*:[^:]*://' -e 's/:.*$//'`
if [ ".$userid" = . ]; then
userid=`grep "^${username}:" /etc/passwd 2>/dev/null | \
sed -e 's/[^:]*:[^:]*://' -e 's/:.*$//'`
if [ ".$userid" = . ]; then
userid=`(ypcat passwd) 2>/dev/null |
grep "^${username}:" | \
sed -e 's/[^:]*:[^:]*://' -e 's/:.*$//'`
if [ ".$userid" = . ]; then
userid='?'
fi
fi
fi
fi
fi
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 [ ".$opt_e" = .yes ] && [ ".`echo $text | grep '%[gG]'`" != . ]; then
groupid="`(id -g ${username}) 2>/dev/null`"
if [ ".$groupid" = . ]; then
groupid=`(ypcat passwd) 2>/dev/null | egrep "^${username}:" | \
sed -e 's/[^:]*:[^:]*:[^:]*://' -e 's/:.*$//'`
str="`(id) 2>/dev/null`"
if [ ".`echo $str | grep 'gid[ ]*=[ ]*[0-9]*('`" != . ]; then
groupid=`echo $str | sed -e 's/^.*gid[ ]*=[ ]*//' -e 's/(.*$//'`
fi
if [ ".$groupid" = . ]; then
groupid='?'
groupid=`(getent passwd ${username}) 2>/dev/null | \
sed -e 's/[^:]*:[^:]*:[^:]*://' -e 's/:.*$//'`
if [ ".$groupid" = . ]; then
groupid=`grep "^${username}:" /etc/passwd 2>/dev/null | \
sed -e 's/[^:]*:[^:]*:[^:]*://' -e 's/:.*$//'`
if [ ".$groupid" = . ]; then
groupid=`(ypcat passwd) 2>/dev/null | grep "^${username}:" | \
sed -e 's/[^:]*:[^:]*:[^:]*://' -e 's/:.*$//'`
if [ ".$groupid" = . ]; then
groupid='?'
fi
fi
fi
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 [ ".$opt_e" = .yes ] && [ ".`echo $text | grep '%g'`" != . ]; then
groupname="`(id -gn ${username}) 2>/dev/null`"
if [ ".$groupname" = . ]; then
groupname=`(ypcat group) 2>/dev/null | \
egrep "^[^:]*:[^:]*:${groupid}:" | \
sed -e 's/:.*$//'`
str="`(id) 2>/dev/null`"
if [ ".`echo $str | grep 'gid[ ]*=[ ]*[0-9]*('`" != . ]; then
groupname=`echo $str | sed -e 's/^.*gid[ ]*=[ ]*[0-9]*(//' -e 's/).*$//'`
fi
if [ ".$groupname" = . ]; then
groupname='?'
groupname=`(getent group) 2>/dev/null | \
grep "^[^:]*:[^:]*:${groupid}:" | \
sed -e 's/:.*$//'`
if [ ".$groupname" = . ]; then
groupname=`grep "^[^:]*:[^:]*:${groupid}:" /etc/group 2>/dev/null | \
sed -e 's/:.*$//'`
if [ ".$groupname" = . ]; then
groupname=`(ypcat group) 2>/dev/null | \
grep "^[^:]*:[^:]*:${groupid}:" | \
sed -e 's/:.*$//'`
if [ ".$groupname" = . ]; then
groupname='?'
fi
fi
fi
fi
fi
fi
# determine host and domain name
hostname=''
domainname=''
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%h'`" != . ]; then
if [ ".$opt_e" = .yes ] && [ ".`echo $text | grep '%h'`" != . ]; then
hostname="`(uname -n) 2>/dev/null |\
awk '{ printf("%s", $1); }'`"
if [ ".$hostname" = . ]; then
@@ -565,16 +640,16 @@ echo )
;;
esac
fi
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%d'`" != . ]; then
if [ ".$opt_e" = .yes ] && [ ".`echo $text | grep '%d'`" != . ]; then
if [ ".$domainname" = . ]; then
if [ -f /etc/resolv.conf ]; then
domainname="`egrep '^[ ]*domain' /etc/resolv.conf | sed -e 'q' |\
domainname="`grep '^[ ]*domain' /etc/resolv.conf | sed -e 'q' |\
sed -e 's/.*domain//' \
-e 's/^[ ]*//' -e 's/^ *//' -e 's/^ *//' \
-e 's/^\.//' -e 's/^/./' |\
awk '{ printf("%s", $1); }'`"
if [ ".$domainname" = . ]; then
domainname="`egrep '^[ ]*search' /etc/resolv.conf | sed -e 'q' |\
domainname="`grep '^[ ]*search' /etc/resolv.conf | sed -e 'q' |\
sed -e 's/.*search//' \
-e 's/^[ ]*//' -e 's/^ *//' -e 's/^ *//' \
-e 's/ .*//' -e 's/ .*//' \
@@ -584,13 +659,13 @@ echo )
fi
fi
fi
# determine current time
time_day=''
time_month=''
time_year=''
time_monthname=''
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%[DMYm]'`" != . ]; then
if [ ".$opt_e" = .yes ] && [ ".`echo $text | grep '%[DMYm]'`" != . ]; then
time_day=`date '+%d'`
time_month=`date '+%m'`
time_year=`date '+%Y' 2>/dev/null`
@@ -616,7 +691,7 @@ echo )
12) time_monthname='Dec' ;;
esac
fi
# expand special ``%x'' constructs
if [ ".$opt_e" = .yes ]; then
text=`echo $seo "$text" |\
@@ -633,7 +708,7 @@ echo )
-e "s/%Y/${time_year}/g" \
-e "s/%m/${time_monthname}/g" 2>/dev/null`
fi
# create output
if [ .$opt_n = .no ]; then
echo $seo "$text"
@@ -646,15 +721,16 @@ echo )
echo dummy | awk '{ printf("%s", TEXT); }' TEXT="$text"
fi
fi
shtool_exit 0
;;
install )
##
## install -- Install a program, script or datafile
## Copyright (c) 1997-2002 Ralf S. Engelschall <rse@engelschall.com>
## Originally written for shtool
## Copyright (c) 1997-2005 Ralf S. Engelschall <rse@engelschall.com>
##
# special case: "shtool install -d <dir> [...]" internally
# maps to "shtool mkdir -f -p -m 755 <dir> [...]"
if [ "$opt_d" = yes ]; then
@@ -672,11 +748,11 @@ install )
cmd="$cmd -t"
fi
for dir in "$@"; do
eval "$cmd $dir" || exit $?
eval "$cmd $dir" || shtool_exit $?
done
exit 0
shtool_exit 0
fi
# determine source(s) and destination
argc=$#
srcs=""
@@ -685,30 +761,30 @@ install )
shift
done
dstpath="$1"
# type check for destination
dstisdir=0
if [ -d $dstpath ]; then
dstpath=`echo "$dstpath" | sed -e 's:/$::'`
dstisdir=1
fi
# consistency check for destination
if [ $argc -gt 2 -a $dstisdir = 0 ]; then
if [ $argc -gt 2 ] && [ $dstisdir = 0 ]; then
echo "$msgprefix:Error: multiple sources require destination to be directory" 1>&2
exit 1
shtool_exit 1
fi
# iterate over all source(s)
for src in $srcs; do
dst=$dstpath
# if destination is a directory, append the input filename
if [ $dstisdir = 1 ]; then
dstfile=`echo "$src" | sed -e 's;.*/\([^/]*\)$;\1;'`
dst="$dst/$dstfile"
fi
# check for correct arguments
if [ ".$src" = ".$dst" ]; then
echo "$msgprefix:Warning: source and destination are the same - skipped" 1>&2
@@ -718,17 +794,17 @@ install )
echo "$msgprefix:Warning: source \`$src' is a directory - skipped" 1>&2
continue
fi
# make a temp file name in the destination directory
dsttmp=`echo $dst |\
sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;' -e 's;^$;.;' \
-e "s;\$;/#INST@$$#;"`
# verbosity
if [ ".$opt_v" = .yes ]; then
echo "$src -> $dst" 1>&2
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
@@ -738,14 +814,14 @@ install )
if [ ".$opt_t" = .yes ]; then
echo "cp $src $dsttmp" 1>&2
fi
cp $src $dsttmp || exit $?
cp $src $dsttmp || shtool_exit $?
else
if [ ".$opt_t" = .yes ]; then
echo "mv $src $dsttmp" 1>&2
fi
mv $src $dsttmp || exit $?
mv $src $dsttmp || shtool_exit $?
fi
# adjust the target file
if [ ".$opt_e" != . ]; then
sed='sed'
@@ -755,34 +831,35 @@ install )
sed="$sed -e '$e'"
done
cp $dsttmp $dsttmp.old
eval "$sed <$dsttmp.old >$dsttmp" || exit $?
chmod u+w $dsttmp
eval "$sed <$dsttmp.old >$dsttmp" || shtool_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 $?
strip $dsttmp || shtool_exit $?
fi
if [ ".$opt_o" != . ]; then
if [ ".$opt_t" = .yes ]; then
echo "chown $opt_o $dsttmp" 1>&2
fi
chown $opt_o $dsttmp || exit $?
chown $opt_o $dsttmp || shtool_exit $?
fi
if [ ".$opt_g" != . ]; then
if [ ".$opt_t" = .yes ]; then
echo "chgrp $opt_g $dsttmp" 1>&2
fi
chgrp $opt_g $dsttmp || exit $?
chgrp $opt_g $dsttmp || shtool_exit $?
fi
if [ ".$opt_m" != ".-" ]; then
if [ ".$opt_t" = .yes ]; then
echo "chmod $opt_m $dsttmp" 1>&2
fi
chmod $opt_m $dsttmp || exit $?
chmod $opt_m $dsttmp || shtool_exit $?
fi
# determine whether to do a quick install
# (has to be done _after_ the strip was already done)
quick=no
@@ -793,7 +870,7 @@ install )
fi
fi
fi
# finally, install the file to the real destination
if [ $quick = yes ]; then
if [ ".$opt_t" = .yes ]; then
@@ -807,21 +884,21 @@ install )
rm -f $dst && mv $dsttmp $dst
fi
done
shtool_exit 0
;;
mkdir )
##
## mkdir -- Make one or more directories
## Copyright (c) 1996-2002 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
## Copyright (c) 1996-2005 Ralf S. Engelschall <rse@engelschall.com>
##
errstatus=0
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
@@ -895,32 +972,32 @@ mkdir )
done
fi
done
exit $errstatus
shtool_exit $errstatus
;;
path )
##
## path -- Deal with program paths
## Copyright (c) 1998-2002 Ralf S. Engelschall <rse@engelschall.com>
## Originally written for Apache
## Copyright (c) 1998-2005 Ralf S. Engelschall <rse@engelschall.com>
##
namelist="$*"
# check whether the test command supports the -x option
if [ -x /bin/sh ] 2>/dev/null; then
minusx="-x"
else
minusx="-r"
fi
# split path string
paths="`echo $opt_p |\
sed -e 's/^:/.:/' \
-e 's/::/:.:/g' \
-e 's/:$/:./' \
-e 's/:/ /g'`"
# SPECIAL REQUEST
# translate forward to reverse path
if [ ".$opt_r" = .yes ]; then
@@ -933,25 +1010,25 @@ path )
done
fi
echo $rp | sed -e 's:/$::'
exit 0
shtool_exit 0
fi
# SPECIAL REQUEST
# strip out directory or base name
if [ ".$opt_d" = .yes ]; then
echo "$namelist" |\
sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'
exit 0
shtool_exit 0
fi
if [ ".$opt_b" = .yes ]; then
echo "$namelist" |\
sed -e 's;.*/\([^/]*\)$;\1;'
exit 0
shtool_exit 0
fi
# MAGIC SITUATION
# Perl Interpreter (perl)
if [ ".$opt_m" = .yes -a ".$namelist" = .perl ]; then
if [ ".$opt_m" = .yes ] && [ ".$namelist" = .perl ]; then
rm -f $tmpfile >/dev/null 2>&1
touch $tmpfile
found=0
@@ -960,7 +1037,7 @@ path )
dir=`echo $dir | sed -e 's;/*$;;'`
nc=99
for name in perl perl5 miniperl; do
if [ $minusx "$dir/$name" -a ! -d "$dir/$name" ]; then
if [ $minusx "$dir/$name" ] && [ ! -d "$dir/$name" ]; then
perl="$dir/$name"
pv=`$perl -e 'printf("%.3f", $]);'`
echo "$pv:$pc:$nc:$perl" >>$tmpfile
@@ -974,15 +1051,15 @@ path )
perl="`cat $tmpfile | sort -r -u | sed -e 'q' | cut -d: -f4`"
rm -f $tmpfile >/dev/null 2>&1
echo "$perl"
exit 0
shtool_exit 0
fi
rm -f $tmpfile >/dev/null 2>&1
exit 1
shtool_exit 1
fi
# MAGIC SITUATION
# C pre-processor (cpp)
if [ ".$opt_m" = .yes -a ".$namelist" = .cpp ]; then
if [ ".$opt_m" = .yes ] && [ ".$namelist" = .cpp ]; then
echo >$tmpfile.c "#include <assert.h>"
echo >>$tmpfile.c "Syntax Error"
# 1. try the standard cc -E approach
@@ -998,7 +1075,7 @@ path )
# 3. try a standalone cpp command in path and lib dirs
for path in $paths /lib /usr/lib /usr/local/lib; do
path=`echo $path | sed -e 's;/*$;;'`
if [ $minusx "$path/cpp" -a ! -d "$path/cpp" ]; then
if [ $minusx "$path/cpp" ] && [ ! -d "$path/cpp" ]; then
cpp="$path/cpp"
break
fi
@@ -1017,30 +1094,30 @@ path )
rm -f $tmpfile.c $tmpfile.out >/dev/null 2>&1
if [ ".$cpp" != . ]; then
echo "$cpp"
exit 0
shtool_exit 0
fi
exit 1
shtool_exit 1
fi
# STANDARD SITUATION
# iterate over names
for name in $namelist; do
# iterate over paths
for path in $paths; do
path=`echo $path | sed -e 's;/*$;;'`
if [ $minusx "$path/$name" -a ! -d "$path/$name" ]; then
if [ $minusx "$path/$name" ] && [ ! -d "$path/$name" ]; then
if [ ".$opt_s" != .yes ]; then
echo "$path/$name"
fi
exit 0
shtool_exit 0
fi
done
done
exit 1
shtool_exit 1
;;
esac
exit 0
shtool_exit 0
##EOF##
+50 -41
View File
@@ -3,62 +3,71 @@
eval `grep '^EXTRA_VERSION=' configure.in`
case "$EXTRA_VERSION" in
*-dev)
dev=1
;;
*)
dev=0
;;
*-dev)
dev=1
;;
*)
dev=0
;;
esac
devok=0
debug=no
while test $# -gt 0; do
if test "$1" = "--copy"; then
automake_flags=--copy
fi
if test "$1" = "--copy"; then
automake_flags=--copy
fi
if test "$1" = "--force"; then
devok=1
echo "Forcing buildconf"
fi
if test "$1" = "--force"; then
devok=1
echo "Forcing buildconf"
fi
shift
if test "$1" = "--debug"; then
debug=yes
fi
shift
done
if test "$dev" = "0" -a "$devok" = "0"; then
echo "You should not run buildconf in a release package."
echo "use buildconf --force to override this check."
exit 1
echo "You should not run buildconf in a release package."
echo "use buildconf --force to override this check."
exit 1
fi
if test -z "$ZENDDIR"; then
if grep "PHP_MAJOR_VERSION 5" main/php_version.h >/dev/null; then
v=5
else
v=4
fi
if test "$v" = "5"; then
if test -r "Zend/OBJECTS2_HOWTO"; then
:
else
mv Zend ZendEngine1 2>/dev/null
mv ZendEngine2 Zend
fi
else
if test -r "Zend/zend_execute_globals.h"; then
:
else
mv Zend ZendEngine2 2>/dev/null
mv ZendEngine1 Zend
fi
fi
if grep "PHP_MAJOR_VERSION 5" main/php_version.h >/dev/null; then
v=5
else
v=4
fi
ZENDDIR=Zend
echo "using default Zend directory"
if test "$v" = "5"; then
if test -r "Zend/OBJECTS2_HOWTO"; then
:
else
mv Zend ZendEngine1 2>/dev/null
mv ZendEngine2 Zend
fi
else
if test -r "Zend/zend_execute_globals.h"; then
:
else
mv Zend ZendEngine2 2>/dev/null
mv ZendEngine1 Zend
fi
fi
ZENDDIR=Zend
echo "using default Zend directory"
fi
rm -f generated_lists
${MAKE:-make} -s -f build/build.mk AMFLAGS="$automake_flags" ZENDDIR="$ZENDDIR"
if test "$debug" = "yes"; then
${MAKE:-make} -s -f build/build.mk AMFLAGS="$automake_flags" ZENDDIR="$ZENDDIR" SUPPRESS_WARNINGS=""
else
${MAKE:-make} -s -f build/build.mk AMFLAGS="$automake_flags" ZENDDIR="$ZENDDIR"
fi
+99 -53
View File
@@ -1,9 +1,9 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002 Free Software Foundation, Inc.
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
timestamp='2002-10-21'
timestamp='2003-01-10'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -98,14 +98,17 @@ trap 'exit 1' 1 2 15
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
# use `HOST_CC' if defined, but it is deprecated.
# This shell variable is my proudest work .. or something. --bje
# Portable tmp directory creation inspired by the Autoconf team.
set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ;
(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old)
|| (echo "$me: cannot create $tmpdir" >&2 && exit 1) ;
dummy=$tmpdir/dummy ;
files="$dummy.c $dummy.o $dummy.rel $dummy" ;
trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ;
set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
dummy=$tmp/dummy ;
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
case $CC_FOR_BUILD,$HOST_CC,$CC in
,,) echo "int x;" > $dummy.c ;
for c in cc gcc c89 c99 ; do
@@ -113,15 +116,13 @@ case $CC_FOR_BUILD,$HOST_CC,$CC in
CC_FOR_BUILD="$c"; break ;
fi ;
done ;
rm -f $files ;
if test x"$CC_FOR_BUILD" = x ; then
CC_FOR_BUILD=no_compiler_found ;
fi
;;
,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;;
esac ;
unset files'
esac ;'
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 1994-08-24)
@@ -178,7 +179,18 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
;;
esac
# The OS release
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
# Debian GNU/NetBSD machines have a different userland, and
# thus, need a distinct triplet. However, they do not need
# kernel version information, so it can be replaced with a
# suitable tag, in the style of linux-gnu.
case "${UNAME_VERSION}" in
Debian*)
release='-gnu'
;;
*)
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
;;
esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
@@ -223,6 +235,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:OpenBSD:*:*)
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
*:MicroBSD:*:*)
echo ${UNAME_MACHINE}-unknown-microbsd${UNAME_RELEASE}
exit 0 ;;
alpha:OSF1:*:*)
if test $UNAME_RELEASE = "V4.0"; then
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
@@ -286,7 +301,6 @@ EOF
;;
esac
fi
rm -f $dummy.s $dummy && rmdir $tmpdir
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
exit 0 ;;
Alpha\ *:Windows_NT*:*)
@@ -439,8 +453,7 @@ EOF
EOF
$CC_FOR_BUILD -o $dummy $dummy.c \
&& $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
&& rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
rm -f $dummy.c $dummy && rmdir $tmpdir
&& exit 0
echo mips-mips-riscos${UNAME_RELEASE}
exit 0 ;;
Motorola:PowerMAX_OS:*:*)
@@ -449,7 +462,7 @@ EOF
Motorola:*:4.3:PL8-*)
echo powerpc-harris-powermax
exit 0 ;;
Night_Hawk:*:*:PowerMAX_OS)
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
echo powerpc-harris-powermax
exit 0 ;;
Night_Hawk:Power_UNIX:*:*)
@@ -524,8 +537,7 @@ EOF
exit(0);
}
EOF
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
rm -f $dummy.c $dummy && rmdir $tmpdir
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
echo rs6000-ibm-aix3.2.5
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4
@@ -624,10 +636,20 @@ EOF
}
EOF
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
rm -f $dummy.c $dummy && rmdir $tmpdir
test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
if [ ${HP_ARCH} = "hppa2.0w" ]
then
# avoid double evaluation of $set_cc_for_build
test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
then
HP_ARCH="hppa2.0w"
else
HP_ARCH="hppa64"
fi
fi
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit 0 ;;
ia64:HP-UX:*:*)
@@ -661,8 +683,7 @@ EOF
exit (0);
}
EOF
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
rm -f $dummy.c $dummy && rmdir $tmpdir
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
echo unknown-hitachi-hiuxwe2
exit 0 ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
@@ -720,15 +741,15 @@ EOF
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY*T3D:*:*:*)
echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY*T3E:*:*:*)
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY*SV1:*:*:*)
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
*:UNICOS/mp:*:*)
echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
@@ -756,7 +777,6 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
rm -f $dummy.c && rmdir $tmpdir
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
exit 0 ;;
i*:CYGWIN*:*)
@@ -769,13 +789,16 @@ EOF
echo ${UNAME_MACHINE}-pc-pw32
exit 0 ;;
x86:Interix*:3*)
echo i386-pc-interix3
echo i586-pc-interix3
exit 0 ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
exit 0 ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
# UNAME_MACHINE based on the output of uname instead of i386?
echo i386-pc-interix
echo i586-pc-interix
exit 0 ;;
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
@@ -818,8 +841,26 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
rm -f $dummy.c && rmdir $tmpdir
test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
;;
mips64:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
#undef mips64
#undef mips64el
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
CPU=mips64el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
CPU=mips64
#else
CPU=
#endif
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
@@ -914,7 +955,6 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
rm -f $dummy.c && rmdir $tmpdir
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
;;
@@ -932,6 +972,23 @@ EOF
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit 0 ;;
i*86:OS/2:*:*)
# If we were able to find `uname', then EMX Unix compatibility
# is probably installed.
echo ${UNAME_MACHINE}-pc-os2-emx
exit 0 ;;
i*86:XTS-300:*:STOP)
echo ${UNAME_MACHINE}-unknown-stop
exit 0 ;;
i*86:atheos:*:*)
echo ${UNAME_MACHINE}-unknown-atheos
exit 0 ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
i*86:*DOS:*:*)
echo ${UNAME_MACHINE}-pc-msdosdjgpp
exit 0 ;;
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
@@ -966,9 +1023,6 @@ EOF
echo ${UNAME_MACHINE}-pc-sysv32
fi
exit 0 ;;
i*86:*DOS:*:*)
echo ${UNAME_MACHINE}-pc-msdosdjgpp
exit 0 ;;
pc:*:*:*)
# Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
@@ -995,9 +1049,12 @@ EOF
mc68k:UNIX:SYSTEM5:3.51m)
echo m68k-convergent-sysv
exit 0 ;;
M680?0:D-NIX:5.3:*)
echo m68k-diab-dnix
exit 0 ;;
M68*:*:R3V[567]*:*)
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -1014,9 +1071,6 @@ EOF
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit 0 ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
@@ -1098,7 +1152,11 @@ EOF
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
exit 0 ;;
*:Darwin:*:*)
echo `uname -p`-apple-darwin${UNAME_RELEASE}
case `uname -p` in
*86) UNAME_PROCESSOR=i686 ;;
powerpc) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit 0 ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
@@ -1134,11 +1192,6 @@ EOF
fi
echo ${UNAME_MACHINE}-unknown-plan9
exit 0 ;;
i*86:OS/2:*:*)
# If we were able to find `uname', then EMX Unix compatibility
# is probably installed.
echo ${UNAME_MACHINE}-pc-os2-emx
exit 0 ;;
*:TOPS-10:*:*)
echo pdp10-unknown-tops10
exit 0 ;;
@@ -1157,12 +1210,6 @@ EOF
*:ITS:*:*)
echo pdp10-unknown-its
exit 0 ;;
i*86:XTS-300:*:STOP)
echo ${UNAME_MACHINE}-unknown-stop
exit 0 ;;
i*86:atheos:*:*)
echo ${UNAME_MACHINE}-unknown-atheos
exit 0 ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1283,8 +1330,7 @@ main ()
}
EOF
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
rm -f $dummy.c $dummy && rmdir $tmpdir
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
# Apollos put the system type in the environment.
Vendored
+21 -22
View File
@@ -1,9 +1,9 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002 Free Software Foundation, Inc.
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
timestamp='2002-09-05'
timestamp='2003-01-03'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -118,7 +118,7 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -245,16 +245,19 @@ case $basic_machine in
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa64 | mipsisa64el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| msp430 \
| ns16k | ns32k \
| openrisc | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
| s390 | s390x \
| sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
@@ -315,16 +318,19 @@ case $basic_machine in
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39 | mipstx39el \
| none-* | np1-* | ns16k-* | ns32k-* \
| mipstx39-* | mipstx39el-* \
| msp430-* \
| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
| s390-* | s390x-* \
| sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
@@ -716,6 +722,10 @@ case $basic_machine in
np1)
basic_machine=np1-gould
;;
nv1)
basic_machine=nv1-cray
os=-unicosmp
;;
nsr-tandem)
basic_machine=nsr-tandem
;;
@@ -812,12 +822,6 @@ case $basic_machine in
rtpc | rtpc-*)
basic_machine=romp-ibm
;;
s390 | s390-*)
basic_machine=s390-ibm
;;
s390x | s390x-*)
basic_machine=s390x-ibm
;;
sa29200)
basic_machine=a29k-amd
os=-udi
@@ -901,10 +905,6 @@ case $basic_machine in
basic_machine=i386-sequent
os=-dynix
;;
t3d)
basic_machine=alpha-cray
os=-unicos
;;
t3e)
basic_machine=alphaev5-cray
os=-unicos
@@ -977,10 +977,6 @@ case $basic_machine in
basic_machine=hppa1.1-winbond
os=-proelf
;;
windows32)
basic_machine=i386-pc
os=-windows32-msvcrt
;;
xps | xps100)
basic_machine=xps100-honeywell
;;
@@ -1113,11 +1109,12 @@ case $os in
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*)
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -microbsd*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1129,8 +1126,10 @@ case $os in
;;
esac
;;
-nto-qnx*)
;;
-nto*)
os=-nto-qnx
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+121 -41
View File
@@ -35,20 +35,20 @@ for arg in $0 "$@"; do
CONFIGURE_COMMAND="$CONFIGURE_COMMAND '$arg'"
done
AC_CANONICAL_HOST
PHP_CANONICAL_HOST
AC_CONFIG_HEADER(main/php_config.h)
MAJOR_VERSION=4
MINOR_VERSION=3
RELEASE_VERSION=5
EXTRA_VERSION="RC3"
MINOR_VERSION=4
RELEASE_VERSION=0
EXTRA_VERSION=""
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
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 -------------------------------------------------------------------------
@@ -81,6 +81,10 @@ if test -n "$with_apache" && test -n "$with_apxs"; then
AC_MSG_ERROR([--with-apache and --with-apxs cannot be used together])
fi
if test -n "$with_apxs2filter" && test -n "$with_apxs2"; then
AC_MSG_ERROR([--with-apxs2filter and --with-apxs2 cannot be used together])
fi
dnl Settings we want to make before the checks.
dnl -------------------------------------------------------------------------
@@ -128,7 +132,6 @@ dnl check for -R, etc. switch
PHP_RUNPATH_SWITCH
PHP_PROG_RE2C
AC_PROG_RANLIB
AC_PROG_LN_S
AC_PROG_AWK
AC_PROG_YACC
@@ -170,13 +173,23 @@ else
AC_MSG_WARN(You will need flex 2.5.4 or later if you want to regenerate Zend/PHP lexical parsers.)
fi
dnl Check whether byte ordering is bigendian
PHP_C_BIGENDIAN
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
dnl See bug #28605
case $host_cpu in
alpha*)
if test "$GCC" = "yes"; then
CFLAGS="$CFLAGS -mieee"
else
CFLAGS="$CFLAGS -ieee"
fi
;;
esac
case $host_alias in
*solaris*)
@@ -196,6 +209,26 @@ case $host_alias in
LIBS="$LIBS -lbe -lroot";;
*mips*)
CPPFLAGS="$CPPFLAGS -D_XPG_IV";;
*hpux*)
if test "$GCC" = "yes"; then
CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
fi
;;
esac
# Disable PIC mode by default where it is known to be safe to do so,
# to avoid the performance hit from the lost register
AC_MSG_CHECKING([whether to force non-PIC code in shared modules])
case $host_alias in
i?86-*-linux*|i?86-*-freebsd*)
if test "${with_pic+set}" != "set" || test "$with_pic" = "no"; then
with_pic=no
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
;;
*) AC_MSG_RESULT(no) ;;
esac
@@ -278,7 +311,6 @@ if test -d /usr/pkg/include -a -d /usr/pkg/lib ; then
CPPFLAGS="$CPPFLAGS -I/usr/pkg/include"
LDFLAGS="$LDFLAGS -L/usr/pkg/lib"
fi
INCLUDES="$INCLUDES -I\$(top_builddir)/Zend"
test -d /usr/ucblib && PHP_ADD_LIBPATH(/usr/ucblib)
@@ -323,6 +355,8 @@ AC_HEADER_DIRENT
PHP_MISSING_FCLOSE_DECL
dnl QNX requires unix.h to allow functions in libunix to work properly
AC_CHECK_HEADERS([ \
inttypes.h \
stdint.h \
dirent.h \
ApplicationServices/ApplicationServices.h \
sys/param.h \
@@ -402,6 +436,12 @@ PHP_TM_GMTOFF
PHP_STRUCT_FLOCK
PHP_SOCKLEN_T
AC_CHECK_SIZEOF(intmax_t, 0)
AC_CHECK_SIZEOF(size_t, 8)
AC_CHECK_SIZEOF(ssize_t, 8)
AC_CHECK_SIZEOF(ptrdiff_t, 8)
AC_CHECK_SIZEOF(long long, 8)
AC_CHECK_SIZEOF(long long int, 8)
AC_CHECK_SIZEOF(long, 8)
AC_CHECK_SIZEOF(int, 4)
@@ -521,10 +561,48 @@ vsnprintf \
)
dnl Check for getaddrinfo, should be a better way, but...
dnl Also check for working getaddrinfo
AC_CACHE_CHECK([for getaddrinfo], ac_cv_func_getaddrinfo,
[AC_TRY_LINK([#include <netdb.h>],
[struct addrinfo *g,h;g=&h;getaddrinfo("","",g,&g);],
ac_cv_func_getaddrinfo=yes, ac_cv_func_getaddrinfo=no)])
[struct addrinfo *g,h;g=&h;getaddrinfo("","",g,&g);],
AC_TRY_RUN([
#include <netdb.h>
#include <sys/types.h>
#ifndef AF_INET
# include <sys/socket.h>
#endif
int main(void) {
struct addrinfo *ai, *pai, hints;
memset(&hints, 0, sizeof(hints));
hints.ai_flags = AI_NUMERICHOST;
if (getaddrinfo("127.0.0.1", 0, &hints, &ai) < 0) {
exit(1);
}
if (ai == 0) {
exit(1);
}
pai = ai;
while (pai) {
if (pai->ai_family != AF_INET) {
/* 127.0.0.1/NUMERICHOST should only resolve ONE way */
exit(1);
}
if (pai->ai_addr->sa_family != AF_INET) {
/* 127.0.0.1/NUMERICHOST should only resolve ONE way */
exit(1);
}
pai = pai->ai_next;
}
freeaddrinfo(ai);
exit(0);
}
],ac_cv_func_getaddrinfo=yes, ac_cv_func_getaddrinfo=no),
ac_cv_func_getaddrinfo=no)])
if test "$ac_cv_func_getaddrinfo" = yes; then
AC_DEFINE(HAVE_GETADDRINFO,1,[Define if you have the getaddrinfo function])
fi
@@ -532,8 +610,8 @@ fi
AC_REPLACE_FUNCS(strlcat strlcpy getopt)
AC_FUNC_UTIME_NULL
AC_FUNC_ALLOCA
PHP_AC_BROKEN_SPRINTF
PHP_AC_BROKEN_SNPRINTF
dnl PHP_AC_BROKEN_SPRINTF
dnl PHP_AC_BROKEN_SNPRINTF
PHP_DECLARED_TIMEZONE
PHP_TIME_R_TYPE
PHP_READDIR_R_TYPE
@@ -774,7 +852,6 @@ fi
enable_shared=yes
enable_static=yes
unset with_pic
case $php_build_target in
program|static)
@@ -785,7 +862,10 @@ program|static)
;;
shared)
enable_static=no
standard_libtool_flag=-prefer-pic
case $with_pic in
yes) standard_libtool_flag='-prefer-pic';;
no) standard_libtool_flag='-prefer-non-pic';;
esac
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -avoid-version -module"
;;
esac
@@ -811,6 +891,11 @@ if test -z "$with_pear" && test "$enable_pear" = "no"; then
with_pear=no
fi
# If CLI is disabled -> disable PEAR
if test "$PHP_SAPI_CLI" = "no"; then
with_pear=no
fi
PHP_ARG_WITH(pear, [whether to install PEAR],
[ --with-pear=DIR Install PEAR in DIR (default PREFIX/lib/php)
--without-pear Do not install PEAR], DEFAULT, yes)
@@ -820,17 +905,13 @@ if test "$PHP_PEAR" != "no"; then
dnl
dnl PEAR dependancies
dnl
if test "$PHP_SAPI_CLI" = "no"; then
pear_error_msg="$pear_error_msg
PEAR requires CLI to be enabled. Add --enable-cli to the configure line."
fi
if test "$PHP_PCRE_REGEX" = "no"; then
pear_error_msg="$pear_error_msg
PEAR requires PCRE to be enabled. Add --with-pcre-regex to the configure line."
PEAR requires PCRE to be enabled. Add --with-pcre-regex to the configure line. (or --without-pear)"
fi
if test "$PHP_XML" = "no"; then
pear_error_msg="$pear_error_msg
PEAR requires XML to be enabled. Add --enable-xml to the configure line."
PEAR requires XML to be enabled. Add --enable-xml to the configure line. (or --without-pear)"
fi
dnl
@@ -838,7 +919,7 @@ dnl ext/xmlrpc is not really there yet to be a requirement..
dnl
dnl if test "$PHP_XMLRPC" = "no"; then
dnl pear_error_msg="$pear_error_msg
dnl PEAR requires XML-RPC to be enabled. Add --with-xmlrpc to the configure line."
dnl PEAR requires XML-RPC to be enabled. Add --with-xmlrpc to the configure line. (or --without-pear)"
dnl fi
dnl
@@ -855,6 +936,8 @@ dnl
*) PEAR_INSTALLDIR=$libdir/php;;
esac
fi
PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/pear/Makefile.frag,$abs_srcdir/pear,pear)
fi
@@ -868,10 +951,6 @@ LIBZEND_BASIC_CHECKS
LIBZEND_DLSYM_CHECK
LIBZEND_OTHER_CHECKS
TSRM_LIB='TSRM/libtsrm.la'
TSRM_DIR=TSRM
CPPFLAGS="$CPPFLAGS -I\$(top_builddir)/TSRM"
if test "$ZEND_EXPERIMENTAL_ZTS" = "yes"; then
AC_DEFINE(ZTS,1,[ ])
PHP_THREAD_SAFETY=yes
@@ -879,9 +958,12 @@ else
PHP_THREAD_SAFETY=no
fi
INCLUDES="$INCLUDES -I\$(top_builddir)/TSRM"
INCLUDES="$INCLUDES -I\$(top_builddir)/Zend"
if test "$abs_srcdir" != "$abs_builddir"; then
INCLUDES="$INCLUDES -I\$(top_srcdir)/main -I\$(top_srcdir)/Zend"
INCLUDES="$INCLUDES -I\$(top_srcdir)/TSRM"
INCLUDES="$INCLUDES -I\$(top_srcdir)/TSRM -I\$(top_builddir)/"
fi
ZEND_EXTRA_LIBS="$LIBS"
@@ -1051,7 +1133,6 @@ PHP_SUBST(CXXFLAGS)
PHP_SUBST(CXXFLAGS_CLEAN)
PHP_SUBST(CXX_PHP_COMPILE)
PHP_SUBST_OLD(DEBUG_CFLAGS)
PHP_SUBST(DEFS)
PHP_SUBST_OLD(EXTENSION_DIR)
PHP_SUBST_OLD(EXTRA_LDFLAGS)
PHP_SUBST_OLD(EXTRA_LDFLAGS_PROGRAM)
@@ -1080,8 +1161,6 @@ PHP_SUBST(PROG_SENDMAIL)
PHP_SUBST(RE2C)
PHP_SUBST(SHELL)
PHP_SUBST(SHARED_LIBTOOL)
PHP_SUBST(TSRM_DIR)
PHP_SUBST(TSRM_LIB)
PHP_SUBST(WARNING_LEVEL)
PHP_SUBST(PHP_FRAMEWORKS)
PHP_SUBST(PHP_FRAMEWORKPATH)
@@ -1175,7 +1254,7 @@ PHP_ADD_SOURCES(Zend, \
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)
zend_ini.c zend_qsort.c zend_multibyte.c zend_strtod.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 zend_mm.c)
@@ -1198,7 +1277,6 @@ PHP_ADD_BUILD_DIR(TSRM)
PHP_ADD_BUILD_DIR(Zend)
PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/scripts/Makefile.frag,$abs_srcdir/scripts,scripts)
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
@@ -1208,9 +1286,11 @@ AC_DEFINE([HAVE_BUILD_DEFS_H], 1, [ ])
$php_shtool mkdir -p pear/scripts
$php_shtool mkdir -p scripts
$php_shtool mkdir -p scripts/man1
ALL_OUTPUT_FILES="php4.spec main/build-defs.h \
scripts/phpize scripts/php-config \
scripts/phpize scripts/man1/phpize.1 \
scripts/php-config scripts/man1/php-config.1 \
$PHP_OUTPUT_FILES"
AC_OUTPUT($ALL_OUTPUT_FILES, [], [
@@ -1224,12 +1304,12 @@ fi
#
test -d TSRM || $php_shtool mkdir TSRM
echo '#include "../main/php_config.h"' > TSRM/tsrm_config.h
echo '#include <../main/php_config.h>' > TSRM/tsrm_config.h
test -d Zend || $php_shtool mkdir Zend
cat >Zend/zend_config.h <<FEO
#include "../main/php_config.h"
#include <../main/php_config.h>
#if defined(APACHE) && defined(PHP_API_VERSION)
#undef HAVE_DLFCN_H
#endif
@@ -1372,7 +1452,7 @@ cat <<X
| If your application relies on register_globals being ON, you |
| should explicitly set it to on in your php.ini file. |
| Note that you are strongly encouraged to read |
| http://www.php.net/manual/en/security.registerglobals.php |
| http://www.php.net/manual/en/security.globals.php |
| about the implications of having register_globals set to on, and |
| avoid using it if possible. |
+--------------------------------------------------------------------+
+1 -1
View File
@@ -1,3 +1,3 @@
#! /bin/sh
${MAKE:-make} -f build/build.mk cvsclean
${MAKE:-make} -f build/build.mk cvsclean-work
+4 -4
View File
@@ -19,7 +19,7 @@ dnl PARTICULAR PURPOSE.
dnl Usage:
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
AC_DEFUN(AM_INIT_AUTOMAKE,
AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_REQUIRE([AC_PROG_INSTALL])
PACKAGE=[$1]
AC_SUBST(PACKAGE)
@@ -47,7 +47,7 @@ AC_REQUIRE([AC_PROG_MAKE_SET])])
# Check to make sure that the build environment is sane.
#
AC_DEFUN(AM_SANITY_CHECK,
AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane])
# Just in case
sleep 1
@@ -88,7 +88,7 @@ AC_MSG_RESULT(yes)])
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
dnl The program must properly implement --version.
AC_DEFUN(AM_MISSING_PROG,
AC_DEFUN([AM_MISSING_PROG],
[AC_MSG_CHECKING(for working $2)
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
@@ -104,7 +104,7 @@ AC_SUBST($1)])
# Like AC_CONFIG_HEADER, but automatically create stamp file.
AC_DEFUN(AM_CONFIG_HEADER,
AC_DEFUN([AM_CONFIG_HEADER],
[AC_PREREQ([2.12])
AC_CONFIG_HEADER([$1])
dnl When config.status generates a header, we must update the stamp-h file.
+1 -1
View File
@@ -3,7 +3,7 @@
#elif defined(NETWARE)
#include "config.nw.h"
#else
#include "php_config.h"
#include <php_config.h>
#endif
#include <string.h>
+1
View File
@@ -92,6 +92,7 @@ bc_raisemod (bc_num base, bc_num expo, bc_num mod, bc_num *result, int scale TSR
bc_free_num (&power);
bc_free_num (&exponent);
bc_free_num (result);
bc_free_num (&parity);
*result = temp;
return 0; /* Everything is OK. */
}
+41 -47
View File
@@ -40,9 +40,6 @@
#define PHP_BZ_ERRSTR 1
#define PHP_BZ_ERRBOTH 2
/* Blocksize of the decompression buffer */
#define PHP_BZ_DECOMPRESS_SIZE 4096
function_entry bz2_functions[] = {
PHP_FE(bzopen, NULL)
PHP_FE(bzread, NULL)
@@ -185,7 +182,7 @@ PHP_BZ2_API php_stream *_php_stream_bz2open(php_stream_wrapper *wrapper,
if (bz_file == NULL) {
/* that didn't work, so try and get something from the network/wrapper */
stream = php_stream_open_wrapper(path, mode, options, opened_path);
stream = php_stream_open_wrapper(path, mode, options | STREAM_WILL_CAST, opened_path);
if (stream) {
int fd;
@@ -196,7 +193,7 @@ PHP_BZ2_API php_stream *_php_stream_bz2open(php_stream_wrapper *wrapper,
/* remove the file created by php_stream_open_wrapper(), it is not needed since BZ2 functions
* failed.
*/
if (!bz_file && mode[0] == 'w') {
if (opened_path && !bz_file && mode[0] == 'w') {
VCWD_UNLINK(*opened_path);
}
}
@@ -434,56 +431,53 @@ PHP_FUNCTION(bzcompress)
Decompresses BZip2 compressed data */
PHP_FUNCTION(bzdecompress)
{
zval **source, /* Source data to decompress */
**zsmall; /* (Optional) user specified small */
char *dest; /* Destination buffer, initially allocated */
int error, /* Error container */
iter = 1, /* Iteration count for the compression loop */
size, /* Current size to realloc the dest buffer to */
dest_len = PHP_BZ_DECOMPRESS_SIZE, /* Size of the destination length */
small = 0, /* The actual small */
argc = ZEND_NUM_ARGS(); /* Argument count */
if (argc < 1 || argc > 2 || zend_get_parameters_ex(argc, &source, &zsmall) == FAILURE) {
WRONG_PARAM_COUNT;
char *source, *dest;
int source_len, error;
long small = 0;
#if defined(PHP_WIN32) && _MSC_VER < 1300
unsigned __int64 size = 0;
#else
unsigned long long size = 0;
#endif
bz_stream bzs;
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &source, &source_len, &small)) {
RETURN_FALSE;
}
convert_to_string_ex(source);
/* optional small argument handling */
if (argc > 1) {
convert_to_long_ex(zsmall);
small = Z_LVAL_PP(zsmall);
bzs.bzalloc = NULL;
bzs.bzfree = NULL;
if (BZ2_bzDecompressInit(&bzs, 0, small) != BZ_OK) {
RETURN_FALSE;
}
/* Depending on the size of the source buffer, either allocate
the length of the source buffer or the a default decompression
size */
dest = emalloc(PHP_BZ_DECOMPRESS_SIZE > Z_STRLEN_PP(source) ? PHP_BZ_DECOMPRESS_SIZE : Z_STRLEN_PP(source));
bzs.next_in = source;
bzs.avail_in = source_len;
/* (de)Compression Loop */
do {
/* Handle the (re)allocation of the buffer */
size = dest_len * iter;
if (iter > 1) {
dest = erealloc(dest, size);
}
++iter;
/* Perform the decompression */
error = BZ2_bzBuffToBuffDecompress(dest, &size, Z_STRVAL_PP(source), Z_STRLEN_PP(source), small, 0);
} while (error == BZ_OUTBUFF_FULL);
/* in most cases bz2 offers at least 2:1 compression, so we use that as our base */
bzs.avail_out = source_len * 2;
bzs.next_out = dest = emalloc(bzs.avail_out + 1);
if (error != BZ_OK) {
efree(dest);
RETURN_LONG(error);
} else {
/* we might have allocated a little to much, so erealloc the buffer
down to size, before returning it */
while ((error = BZ2_bzDecompress(&bzs)) == BZ_OK && bzs.avail_in > 0) {
/* compression is better then 2:1, need to allocate more memory */
bzs.avail_out = source_len;
size = (bzs.total_out_hi32 * (unsigned int) -1) + bzs.total_out_lo32;
dest = erealloc(dest, size + bzs.avail_out + 1);
bzs.next_out = dest + size;
}
if (error == BZ_STREAM_END || error == BZ_OK) {
size = (bzs.total_out_hi32 * (unsigned int) -1) + bzs.total_out_lo32;
dest = erealloc(dest, size + 1);
dest[size] = 0;
RETURN_STRINGL(dest, size, 0);
dest[size] = '\0';
RETVAL_STRINGL(dest, size, 0);
} else { /* real error */
efree(dest);
RETVAL_LONG(error);
}
BZ2_bzDecompressEnd(&bzs);
}
/* }}} */
+303 -301
View File
@@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
| Authors: Shane Caraveo <shane@caraveo.com> |
| Colin Viebrock <colin@easydns.com> |
| Hartmut Holzgraefe <hartmut@six.de> |
| Hartmut Holzgraefe <hholzgra@php.net> |
| Wez Furlong <wez@thebrainroom.com> |
+----------------------------------------------------------------------+
*/
@@ -34,7 +34,7 @@
#include "sdncal.h"
#include <stdio.h>
function_entry calendar_functions[] = {
PHP_FE(jdtogregorian, NULL)
PHP_FE(gregoriantojd, NULL)
@@ -48,10 +48,10 @@ function_entry calendar_functions[] = {
PHP_FE(jdmonthname, NULL)
PHP_FE(easter_date, NULL)
PHP_FE(easter_days, NULL)
PHP_FE(unixtojd, NULL)
PHP_FE(jdtounix, NULL)
PHP_FE(cal_to_jd, NULL)
PHP_FE(cal_from_jd, NULL)
PHP_FE(unixtojd, NULL)
PHP_FE(jdtounix, NULL)
PHP_FE(cal_to_jd, NULL)
PHP_FE(cal_from_jd, NULL)
PHP_FE(cal_days_in_month, NULL)
PHP_FE(cal_info, NULL)
{NULL, NULL, NULL}
@@ -60,8 +60,8 @@ function_entry calendar_functions[] = {
zend_module_entry calendar_module_entry = {
STANDARD_MODULE_HEADER,
"calendar",
calendar_functions,
"calendar",
calendar_functions,
PHP_MINIT(calendar),
NULL,
NULL,
@@ -83,60 +83,76 @@ enum cal_name_type_t {
CAL_FRENCH,
CAL_NUM_CALS
};
typedef long int (*cal_to_jd_func_t)(int month, int day, int year);
typedef void (*cal_from_jd_func_t)(long int jd, int* year, int* month, int* day);
typedef char* (*cal_as_string_func_t)(int year, int month, int day);
typedef long int (*cal_to_jd_func_t) (int month, int day, int year);
typedef void (*cal_from_jd_func_t) (long int jd, int *year, int *month, int *day);
typedef char *(*cal_as_string_func_t) (int year, int month, int day);
struct cal_entry_t {
char *name;
char *symbol;
cal_to_jd_func_t to_jd;
cal_from_jd_func_t from_jd;
int num_months;
int max_days_in_month;
char **month_name_short;
char **month_name_long;
char *name;
char *symbol;
cal_to_jd_func_t to_jd;
cal_from_jd_func_t from_jd;
int num_months;
int max_days_in_month;
char **month_name_short;
char **month_name_long;
};
static struct cal_entry_t cal_conversion_table[CAL_NUM_CALS] = {
{ "Gregorian", "CAL_GREGORIAN", GregorianToSdn, SdnToGregorian, 12, 31, MonthNameShort, MonthNameLong },
{ "Julian", "CAL_JULIAN", JulianToSdn, SdnToJulian, 12, 31, MonthNameShort, MonthNameLong },
{ "Jewish", "CAL_JEWISH", JewishToSdn, SdnToJewish, 13, 30, JewishMonthName, JewishMonthName },
{ "French", "CAL_FRENCH", FrenchToSdn, SdnToFrench, 13, 30, FrenchMonthName, FrenchMonthName }
{"Gregorian", "CAL_GREGORIAN", GregorianToSdn, SdnToGregorian, 12, 31,
MonthNameShort, MonthNameLong},
{"Julian", "CAL_JULIAN", JulianToSdn, SdnToJulian, 12, 31,
MonthNameShort, MonthNameLong},
{"Jewish", "CAL_JEWISH", JewishToSdn, SdnToJewish, 13, 30,
JewishMonthName, JewishMonthName},
{"French", "CAL_FRENCH", FrenchToSdn, SdnToFrench, 13, 30,
FrenchMonthName, FrenchMonthName}
};
/* For jddayofweek */
enum { CAL_DOW_DAYNO, CAL_DOW_SHORT, CAL_DOW_LONG };
enum { CAL_DOW_DAYNO, CAL_DOW_SHORT, CAL_DOW_LONG };
/* For jdmonthname */
enum { CAL_MONTH_GREGORIAN_SHORT, CAL_MONTH_GREGORIAN_LONG,
enum { CAL_MONTH_GREGORIAN_SHORT, CAL_MONTH_GREGORIAN_LONG,
CAL_MONTH_JULIAN_SHORT, CAL_MONTH_JULIAN_LONG, CAL_MONTH_JEWISH,
CAL_MONTH_FRENCH };
CAL_MONTH_FRENCH
};
/* for heb_number_to_chars */
static char alef_bet[25] = "0àáâãäåæçèéëìîðñòôö÷øùú";
#define CAL_JEWISH_ADD_ALAFIM_GERESH 0x2
#define CAL_JEWISH_ADD_ALAFIM 0x4
#define CAL_JEWISH_ADD_GERESHAYIM 0x8
PHP_MINIT_FUNCTION(calendar)
{
REGISTER_LONG_CONSTANT("CAL_GREGORIAN", CAL_GREGORIAN, CONST_CS|CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CAL_JULIAN", CAL_JULIAN, CONST_CS|CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CAL_JEWISH", CAL_JEWISH, CONST_CS|CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CAL_FRENCH", CAL_FRENCH, CONST_CS|CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CAL_NUM_CALS", CAL_NUM_CALS, CONST_CS|CONST_PERSISTENT);
/* constants for jddayofweek */
REGISTER_LONG_CONSTANT("CAL_DOW_DAYNO", CAL_DOW_DAYNO, CONST_CS|CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CAL_DOW_SHORT", CAL_DOW_SHORT, CONST_CS|CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CAL_DOW_LONG", CAL_DOW_LONG, CONST_CS|CONST_PERSISTENT);
/* constants for jdmonthname */
REGISTER_LONG_CONSTANT("CAL_MONTH_GREGORIAN_SHORT", CAL_MONTH_GREGORIAN_SHORT, CONST_CS|CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CAL_MONTH_GREGORIAN_LONG", CAL_MONTH_GREGORIAN_LONG, CONST_CS|CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CAL_MONTH_JULIAN_SHORT", CAL_MONTH_JULIAN_SHORT, CONST_CS|CONST_PERSISTENT);
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);
REGISTER_LONG_CONSTANT("CAL_GREGORIAN", CAL_GREGORIAN, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CAL_JULIAN", CAL_JULIAN, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CAL_JEWISH", CAL_JEWISH, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CAL_FRENCH", CAL_FRENCH, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CAL_NUM_CALS", CAL_NUM_CALS, CONST_CS | CONST_PERSISTENT);
/* constants for jddayofweek */
REGISTER_LONG_CONSTANT("CAL_DOW_DAYNO", CAL_DOW_DAYNO, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CAL_DOW_SHORT", CAL_DOW_SHORT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CAL_DOW_LONG", CAL_DOW_LONG, CONST_CS | CONST_PERSISTENT);
/* constants for jdmonthname */
REGISTER_LONG_CONSTANT("CAL_MONTH_GREGORIAN_SHORT", CAL_MONTH_GREGORIAN_SHORT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CAL_MONTH_GREGORIAN_LONG", CAL_MONTH_GREGORIAN_LONG, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CAL_MONTH_JULIAN_SHORT", CAL_MONTH_JULIAN_SHORT, CONST_CS | CONST_PERSISTENT);
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);
/* constants for Jewish date formatting */
REGISTER_LONG_CONSTANT("CAL_JEWISH_ADD_ALAFIM_GERESH", CAL_JEWISH_ADD_ALAFIM_GERESH, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CAL_JEWISH_ADD_ALAFIM", CAL_JEWISH_ADD_ALAFIM, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CAL_JEWISH_ADD_GERESHAYIM", CAL_JEWISH_ADD_GERESHAYIM, CONST_CS | CONST_PERSISTENT);
return SUCCESS;
}
@@ -147,42 +163,65 @@ PHP_MINFO_FUNCTION(calendar)
php_info_print_table_end();
}
/* {{{ proto array cal_info(int calendar)
Returns information about a particular calendar */
PHP_FUNCTION(cal_info)
static void _php_cal_info(int cal, zval **ret)
{
zval ** cal;
zval * months, *smonths;
zval *months, *smonths;
int i;
struct cal_entry_t * calendar;
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &cal) != SUCCESS) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(cal);
if (Z_LVAL_PP(cal) < 0 || Z_LVAL_PP(cal) >= CAL_NUM_CALS) {
zend_error(E_WARNING, "%s(): invalid calendar ID %ld", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal));
RETURN_FALSE;
}
struct cal_entry_t *calendar;
calendar = &cal_conversion_table[Z_LVAL_PP(cal)];
array_init(return_value);
calendar = &cal_conversion_table[cal];
array_init(*ret);
MAKE_STD_ZVAL(months);
MAKE_STD_ZVAL(smonths);
array_init(months);
array_init(smonths);
for (i=1; i<= calendar->num_months; i++) {
for (i = 1; i <= calendar->num_months; i++) {
add_index_string(months, i, calendar->month_name_long[i], 1);
add_index_string(smonths, i, calendar->month_name_short[i], 1);
}
add_assoc_zval(return_value, "months", months);
add_assoc_zval(return_value, "abbrevmonths", smonths);
add_assoc_long(return_value, "maxdaysinmonth", calendar->max_days_in_month);
add_assoc_string(return_value, "calname", calendar->name, 1);
add_assoc_string(return_value, "calsymbol", calendar->symbol, 1);
add_assoc_zval(*ret, "months", months);
add_assoc_zval(*ret, "abbrevmonths", smonths);
add_assoc_long(*ret, "maxdaysinmonth", calendar->max_days_in_month);
add_assoc_string(*ret, "calname", calendar->name, 1);
add_assoc_string(*ret, "calsymbol", calendar->symbol, 1);
}
/* {{{ proto array cal_info(int calendar)
Returns information about a particular calendar */
PHP_FUNCTION(cal_info)
{
long cal = -1;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &cal) == FAILURE) {
RETURN_FALSE;
}
if (cal == -1) {
int i;
zval *val;
array_init(return_value);
for (i = 0; i < CAL_NUM_CALS; i++) {
MAKE_STD_ZVAL(val);
_php_cal_info(i, &val);
add_index_zval(return_value, i, val);
}
return;
}
if (cal != -1 && (cal < 0 || cal >= CAL_NUM_CALS)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid calendar ID %ld.", cal);
RETURN_FALSE;
}
_php_cal_info(cal, &return_value);
}
/* }}} */
@@ -190,34 +229,35 @@ PHP_FUNCTION(cal_info)
Returns the number of days in a month for a given year and calendar */
PHP_FUNCTION(cal_days_in_month)
{
zval ** cal, **month, **year;
struct cal_entry_t * calendar;
long cal, month, year;
struct cal_entry_t *calendar;
long sdn_start, sdn_next;
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &cal, &month, &year) != SUCCESS) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(cal);
convert_to_long_ex(month);
convert_to_long_ex(year);
if (Z_LVAL_PP(cal) < 0 || Z_LVAL_PP(cal) >= CAL_NUM_CALS) {
zend_error(E_WARNING, "%s(): invalid calendar ID %ld", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal));
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll", &cal, &month, &year) == FAILURE) {
RETURN_FALSE;
}
calendar = &cal_conversion_table[Z_LVAL_PP(cal)];
sdn_start = calendar->to_jd(Z_LVAL_PP(year), Z_LVAL_PP(month), 1);
sdn_next = calendar->to_jd(Z_LVAL_PP(year), 1 + Z_LVAL_PP(month), 1);
if (sdn_next == 0) {
/* if invalid, try first month of the next year... */
sdn_next = calendar->to_jd(Z_LVAL_PP(year) + 1, 1, 1);
if (cal < 0 || cal >= CAL_NUM_CALS) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid calendar ID %ld.", cal);
RETURN_FALSE;
}
calendar = &cal_conversion_table[cal];
sdn_start = calendar->to_jd(year, month, 1);
if (sdn_start == 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid date.");
RETURN_FALSE;
}
sdn_next = calendar->to_jd(year, 1 + month, 1);
if (sdn_next == 0) {
/* if invalid, try first month of the next year... */
sdn_next = calendar->to_jd(year + 1, 1, 1);
}
RETURN_LONG(sdn_next - sdn_start);
}
/* }}} */
@@ -226,26 +266,18 @@ PHP_FUNCTION(cal_days_in_month)
Converts from a supported calendar to Julian Day Count */
PHP_FUNCTION(cal_to_jd)
{
zval ** cal, **month, **day, **year;
long jdate;
long cal, month, day, year;
if (ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, &cal, &month, &day, &year) != SUCCESS) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(cal);
convert_to_long_ex(month);
convert_to_long_ex(day);
convert_to_long_ex(year);
if (Z_LVAL_PP(cal) < 0 || Z_LVAL_PP(cal) >= CAL_NUM_CALS) {
zend_error(E_WARNING, "%s(): invalid calendar ID %ld", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal));
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "llll", &cal, &month, &day, &year) != SUCCESS) {
RETURN_FALSE;
}
jdate = cal_conversion_table[Z_LVAL_PP(cal)].to_jd(
Z_LVAL_PP(year), Z_LVAL_PP(month), Z_LVAL_PP(day));
RETURN_LONG(jdate);
if (cal < 0 || cal >= CAL_NUM_CALS) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid calendar ID %ld.", cal);
RETURN_FALSE;
}
RETURN_LONG(cal_conversion_table[cal].to_jd(year, month, day));
}
/* }}} */
@@ -253,42 +285,38 @@ PHP_FUNCTION(cal_to_jd)
Converts from Julian Day Count to a supported calendar and return extended information */
PHP_FUNCTION(cal_from_jd)
{
zval ** jd, ** cal;
long jd, cal;
int month, day, year, dow;
char date[16];
struct cal_entry_t * calendar;
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &jd, &cal) != SUCCESS) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(jd);
convert_to_long_ex(cal);
struct cal_entry_t *calendar;
if (Z_LVAL_PP(cal) < 0 || Z_LVAL_PP(cal) >= CAL_NUM_CALS) {
zend_error(E_WARNING, "%s(): invalid calendar ID %ld", get_active_function_name(TSRMLS_C), Z_LVAL_PP(cal));
if (zend_parse_parameters(ZEND_NUM_ARGS()TSRMLS_CC, "ll", &jd, &cal) == FAILURE) {
RETURN_FALSE;
}
calendar = &cal_conversion_table[Z_LVAL_PP(cal)];
if (cal < 0 || cal >= CAL_NUM_CALS) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid calendar ID %ld", cal);
RETURN_FALSE;
}
calendar = &cal_conversion_table[cal];
array_init(return_value);
calendar->from_jd(
Z_LVAL_PP(jd),
&year, &month, &day);
calendar->from_jd(jd, &year, &month, &day);
sprintf(date, "%i/%i/%i", month, day, year);
add_assoc_string(return_value, "date", date, 1);
add_assoc_long(return_value, "month", month);
add_assoc_long(return_value, "day", day);
add_assoc_long(return_value, "year", year);
/* day of week */
dow = DayOfWeek(Z_LVAL_PP(jd));
/* day of week */
dow = DayOfWeek(jd);
add_assoc_long(return_value, "dow", dow);
add_assoc_string(return_value, "abbrevdayname", DayNameShort[dow], 1);
add_assoc_string(return_value, "dayname", DayNameLong[dow], 1);
/* month name */
/* month name */
add_assoc_string(return_value, "abbrevmonth", calendar->month_name_short[month], 1);
add_assoc_string(return_value, "monthname", calendar->month_name_long[month], 1);
}
@@ -298,16 +326,15 @@ PHP_FUNCTION(cal_from_jd)
Converts a julian day count to a gregorian calendar date */
PHP_FUNCTION(jdtogregorian)
{
pval **julday;
long julday;
int year, month, day;
char date[10];
char date[16];
if (zend_get_parameters_ex(1, &julday) != SUCCESS) {
WRONG_PARAM_COUNT;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &julday) == FAILURE) {
RETURN_FALSE;
}
convert_to_long_ex(julday);
SdnToGregorian(Z_LVAL_PP(julday), &year, &month, &day);
SdnToGregorian(julday, &year, &month, &day);
sprintf(date, "%i/%i/%i", month, day, year);
RETURN_STRING(date, 1);
@@ -318,37 +345,29 @@ PHP_FUNCTION(jdtogregorian)
Converts a gregorian calendar date to julian day count */
PHP_FUNCTION(gregoriantojd)
{
pval **year, **month, **day;
int jdate;
long year, month, day;
if (zend_get_parameters_ex(3, &month, &day, &year) != SUCCESS) {
WRONG_PARAM_COUNT;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll", &month, &day, &year) == FAILURE) {
RETURN_FALSE;
}
convert_to_long_ex(month);
convert_to_long_ex(day);
convert_to_long_ex(year);
jdate = GregorianToSdn(Z_LVAL_PP(year), Z_LVAL_PP(month), Z_LVAL_PP(day));
RETURN_LONG(jdate);
RETURN_LONG(GregorianToSdn(year, month, day));
}
/* }}} */
/* {{{ proto string jdtojulian(int juliandaycount)
Convert a julian day count to a julian calendar date */
PHP_FUNCTION(jdtojulian)
PHP_FUNCTION(jdtojulian)
{
pval **julday;
long julday;
int year, month, day;
char date[10];
char date[16];
if (zend_get_parameters_ex(1, &julday) != SUCCESS) {
WRONG_PARAM_COUNT;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &julday) == FAILURE) {
RETURN_FALSE;
}
convert_to_long_ex(julday);
SdnToJulian(Z_LVAL_PP(julday), &year, &month, &day);
SdnToJulian(julday, &year, &month, &day);
sprintf(date, "%i/%i/%i", month, day, year);
RETURN_STRING(date, 1);
@@ -359,137 +378,146 @@ PHP_FUNCTION(jdtojulian)
Converts a julian calendar date to julian day count */
PHP_FUNCTION(juliantojd)
{
pval **year, **month, **day;
int jdate;
long year, month, day;
if (zend_get_parameters_ex(3, &month, &day, &year) != SUCCESS) {
WRONG_PARAM_COUNT;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll", &month, &day, &year) == FAILURE) {
RETURN_FALSE;
}
convert_to_long_ex(month);
convert_to_long_ex(day);
convert_to_long_ex(year);
jdate = JulianToSdn(Z_LVAL_PP(year), Z_LVAL_PP(month), Z_LVAL_PP(day));
RETURN_LONG(jdate);
RETURN_LONG(JulianToSdn(year, month, day));
}
/* }}} */
/*
caution: the hebrew format product non unique result.
for example both: year '5' and year '5000' product 'ä'.
use the numeric one for calculations.
/* {{{ heb_number_to_chars*/
/*
caution: the Hebrew format produces non unique result.
for example both: year '5' and year '5000' produce 'ä'.
use the numeric one for calculations.
*/
static char* heb_number_to_chars(int n, char **ret)
static char *heb_number_to_chars(int n, int fl, char **ret)
{
char *p, *old;
char *p, old[18], *endofalafim;
p = emalloc(10);
old = p;
/*
prevents the option breaking the jewish beliefs, and some other
critical resources ;)
*/
p = endofalafim = old;
/*
prevents the option breaking the jewish beliefs, and some other
critical resources ;)
*/
if (n > 9999 || n < 1) {
efree(old);
*ret = NULL;
return NULL;
}
/* alafim case */
/* alafim (thousands) case */
if (n / 1000) {
*p = alef_bet[n / 1000];
p++;
if (CAL_JEWISH_ADD_ALAFIM_GERESH & fl) {
*p = '\'';
p++;
}
if (CAL_JEWISH_ADD_ALAFIM & fl) {
strcpy(p, " àìôéí ");
p += 7;
}
endofalafim = p;
n = n % 1000;
}
/* taf-taf case */
/* tav-tav (tav=400) case */
while (n >= 400) {
*p = alef_bet[22];
p++;
n-=400;
n -= 400;
}
/* meot case */
if (n >= 100) {
*p = alef_bet[18+n/100];
/* meot (hundreads) case */
if (n >= 100) {
*p = alef_bet[18 + n / 100];
p++;
n = n % 100;
}
/* tet-vav tet-zain case */
/* tet-vav & tet-zain case (special case for 15 and 16) */
if (n == 15 || n == 16) {
*p = alef_bet[9];
p++;
*p = alef_bet[n-9];
*p = alef_bet[n - 9];
p++;
} else {
/* asarot case */
if (n >= 10) {
*p = alef_bet[9+n/10];
/* asarot (tens) case */
if (n >= 10) {
*p = alef_bet[9 + n / 10];
p++;
n = n % 10;
}
/* yeihot case */
/* yehidot (ones) case */
if (n > 0) {
*p = alef_bet[n];
p++;
}
}
if (CAL_JEWISH_ADD_GERESHAYIM & fl) {
switch (p - endofalafim) {
case 0:
break;
case 1:
*p = '\'';
p++;
break;
default:
*(p) = *(p - 1);
*(p - 1) = '"';
p++;
}
}
*p = '\0';
*ret = estrndup(old, (p - old) + 1);
p = *ret;
efree(old);
return p;
}
/* }}} */
/* {{{ proto string jdtojewish(int juliandaycount)
/* {{{ proto string jdtojewish(int juliandaycount [, bool hebrew [, int fl]])
Converts a julian day count to a jewish calendar date */
PHP_FUNCTION(jdtojewish)
PHP_FUNCTION(jdtojewish)
{
long julday, fl;
long julday, fl = 0;
zend_bool heb = 0;
int year, month, day;
char date[10], hebdate[25];
char date[16], hebdate[25];
char *dayp, *yearp;
if (ZEND_NUM_ARGS() == 1) {
if (zend_parse_parameters(1 TSRMLS_CC,"l", &julday) != SUCCESS) {
RETURN_FALSE;
}
fl=0;
} else if (ZEND_NUM_ARGS() == 2) {
if (zend_parse_parameters(2 TSRMLS_CC,"ll", &julday, &fl) != SUCCESS) {
RETURN_FALSE;
}
} else {
WRONG_PARAM_COUNT;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|bl", &julday, &heb, &fl) == FAILURE) {
RETURN_FALSE;
}
SdnToJewish(julday, &year, &month, &day);
if(!fl) {
if (!heb) {
sprintf(date, "%i/%i/%i", month, day, year);
RETURN_STRING(date, 1);
} else {
if (year <= 0 || year > 9999) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Out of range year.");
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Year out of range (0-9999).");
RETURN_FALSE;
}
sprintf(hebdate, "%s %s %s", heb_number_to_chars(day, &dayp), JewishMonthHebName[month], heb_number_to_chars(year, &yearp));
sprintf(hebdate, "%s %s %s", heb_number_to_chars(day, fl, &dayp), JewishMonthHebName[month], heb_number_to_chars(year, fl, &yearp));
if (dayp) {
efree(dayp);
}
if (yearp) {
efree(yearp);
efree(yearp);
}
RETURN_STRING(hebdate, 1);
}
}
/* }}} */
@@ -498,20 +526,13 @@ PHP_FUNCTION(jdtojewish)
Converts a jewish calendar date to a julian day count */
PHP_FUNCTION(jewishtojd)
{
pval **year, **month, **day;
int jdate;
long year, month, day;
if (zend_get_parameters_ex(3, &month, &day, &year) != SUCCESS) {
WRONG_PARAM_COUNT;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll", &month, &day, &year) == FAILURE) {
RETURN_FALSE;
}
convert_to_long_ex(month);
convert_to_long_ex(day);
convert_to_long_ex(year);
jdate = JewishToSdn(Z_LVAL_PP(year), Z_LVAL_PP(month), Z_LVAL_PP(day));
RETURN_LONG(jdate);
RETURN_LONG(JewishToSdn(year, month, day));
}
/* }}} */
@@ -519,17 +540,15 @@ PHP_FUNCTION(jewishtojd)
Converts a julian day count to a french republic calendar date */
PHP_FUNCTION(jdtofrench)
{
pval **julday;
long julday;
int year, month, day;
char date[10];
char date[16];
if (zend_get_parameters_ex(1, &julday) != SUCCESS) {
WRONG_PARAM_COUNT;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &julday) == FAILURE) {
RETURN_FALSE;
}
convert_to_long_ex(julday);
SdnToFrench(Z_LVAL_PP(julday), &year, &month, &day);
SdnToFrench(julday, &year, &month, &day);
sprintf(date, "%i/%i/%i", month, day, year);
RETURN_STRING(date, 1);
@@ -540,20 +559,13 @@ PHP_FUNCTION(jdtofrench)
Converts a french republic calendar date to julian day count */
PHP_FUNCTION(frenchtojd)
{
pval **year, **month, **day;
int jdate;
long year, month, day;
if (zend_get_parameters_ex(3, &month, &day, &year) != SUCCESS) {
WRONG_PARAM_COUNT;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll", &month, &day, &year) == FAILURE) {
RETURN_FALSE;
}
convert_to_long_ex(month);
convert_to_long_ex(day);
convert_to_long_ex(year);
jdate = FrenchToSdn(Z_LVAL_PP(year), Z_LVAL_PP(month), Z_LVAL_PP(day));
RETURN_LONG(jdate);
RETURN_LONG(FrenchToSdn(year, month, day));
}
/* }}} */
@@ -561,37 +573,30 @@ PHP_FUNCTION(frenchtojd)
Returns name or number of day of week from julian day count */
PHP_FUNCTION(jddayofweek)
{
pval *julday, *mode;
long julday, mode = CAL_DOW_DAYNO;
int day;
char *daynamel, *daynames;
int myargc=ZEND_NUM_ARGS(), mymode=0;
if ((myargc < 1) || (myargc > 2) || (zend_get_parameters(ht, myargc, &julday, &mode) != SUCCESS)) {
WRONG_PARAM_COUNT;
}
convert_to_long(julday);
if(myargc==2) {
convert_to_long(mode);
mymode = Z_LVAL_P(mode);
}
day = DayOfWeek(Z_LVAL_P(julday));
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|l", &julday, &mode) == FAILURE) {
RETURN_FALSE;
}
day = DayOfWeek(julday);
daynamel = DayNameLong[day];
daynames = DayNameShort[day];
switch (mymode) {
case CAL_DOW_SHORT:
RETURN_STRING(daynamel, 1);
break;
case CAL_DOW_LONG:
RETURN_STRING(daynames, 1);
break;
case CAL_DOW_DAYNO:
default:
RETURN_LONG(day);
break;
}
switch (mode) {
case CAL_DOW_SHORT:
RETURN_STRING(daynamel, 1);
break;
case CAL_DOW_LONG:
RETURN_STRING(daynames, 1);
break;
case CAL_DOW_DAYNO:
default:
RETURN_LONG(day);
break;
}
}
/* }}} */
@@ -599,43 +604,40 @@ PHP_FUNCTION(jddayofweek)
Returns name of month for julian day count */
PHP_FUNCTION(jdmonthname)
{
pval **julday, **mode;
long julday, mode;
char *monthname = NULL;
int month, day, year;
if (zend_get_parameters_ex(2, &julday, &mode) != SUCCESS) {
WRONG_PARAM_COUNT;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &julday, &mode) == FAILURE) {
RETURN_FALSE;
}
convert_to_long_ex(julday);
convert_to_long_ex(mode);
switch(Z_LVAL_PP(mode)) {
case CAL_MONTH_GREGORIAN_LONG: /* gregorian or julian month */
SdnToGregorian(Z_LVAL_PP(julday), &year, &month, &day);
monthname = MonthNameLong[month];
break;
case CAL_MONTH_JULIAN_SHORT: /* gregorian or julian month */
SdnToJulian(Z_LVAL_PP(julday), &year, &month, &day);
monthname = MonthNameShort[month];
break;
case CAL_MONTH_JULIAN_LONG: /* gregorian or julian month */
SdnToJulian(Z_LVAL_PP(julday), &year, &month, &day);
monthname = MonthNameLong[month];
break;
case CAL_MONTH_JEWISH: /* jewish month */
SdnToJewish(Z_LVAL_PP(julday), &year, &month, &day);
monthname = JewishMonthName[month];
break;
case CAL_MONTH_FRENCH: /* french month */
SdnToFrench(Z_LVAL_PP(julday), &year, &month, &day);
monthname = FrenchMonthName[month];
break;
default: /* default gregorian */
case CAL_MONTH_GREGORIAN_SHORT: /* gregorian or julian month */
SdnToGregorian(Z_LVAL_PP(julday), &year, &month, &day);
monthname = MonthNameShort[month];
break;
switch (mode) {
case CAL_MONTH_GREGORIAN_LONG: /* gregorian or julian month */
SdnToGregorian(julday, &year, &month, &day);
monthname = MonthNameLong[month];
break;
case CAL_MONTH_JULIAN_SHORT: /* gregorian or julian month */
SdnToJulian(julday, &year, &month, &day);
monthname = MonthNameShort[month];
break;
case CAL_MONTH_JULIAN_LONG: /* gregorian or julian month */
SdnToJulian(julday, &year, &month, &day);
monthname = MonthNameLong[month];
break;
case CAL_MONTH_JEWISH: /* jewish month */
SdnToJewish(julday, &year, &month, &day);
monthname = JewishMonthName[month];
break;
case CAL_MONTH_FRENCH: /* french month */
SdnToFrench(julday, &year, &month, &day);
monthname = FrenchMonthName[month];
break;
default: /* default gregorian */
case CAL_MONTH_GREGORIAN_SHORT: /* gregorian or julian month */
SdnToGregorian(julday, &year, &month, &day);
monthname = MonthNameShort[month];
break;
}
RETURN_STRING(monthname, 1);
+10 -8
View File
@@ -1849,7 +1849,7 @@ PHPAPI pval php_COM_get_property_handler(zend_property_reference *property_refer
obj = obj_prop;
php_COM_set(obj, &V_DISPATCH(var_result), TRUE TSRMLS_CC);
VariantInit(var_result); // to protect C_DISPATCH(obj) from being freed when var_result is destructed
VariantInit(var_result); /* to protect C_DISPATCH(obj) from being freed when var_result is destructed */
} else {
php_variant_to_pval(var_result, &retval, codepage TSRMLS_CC);
@@ -1934,7 +1934,7 @@ PHPAPI int php_COM_set_property_handler(zend_property_reference *property_refere
return FAILURE;
}
VariantInit(var_result); // to protect C_DISPATCH(obj) from being freed when var_result is destructed
VariantInit(var_result); /* to protect C_DISPATCH(obj) from being freed when var_result is destructed */
zval_dtor(&overloaded_property->element);
}
FREE_VARIANT(var_result);
@@ -1972,15 +1972,17 @@ PHPAPI void php_COM_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_pro
int type;
if (zend_llist_count(property_reference->elements_list)==1
&& !strcmp(Z_STRVAL(function_name->element), "com")) {
&& !strcmp(Z_STRVAL(function_name->element), "com")) {
zval *tmp;
/* constructor */
PHP_FN(com_load)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
/* free instance created by 'new' */
zval_dtor(object);
/* and override it with the instance created by 'com_load()' */
*object = *return_value;
INIT_ZVAL(*return_value);
zend_hash_index_find(Z_OBJPROP_P(return_value), 0, (void**)&handle);
zend_list_addref(Z_RESVAL_PP(handle));
MAKE_STD_ZVAL(tmp);
ZVAL_RESOURCE(tmp, Z_RESVAL_PP(handle));
zend_hash_index_update(Z_OBJPROP_P(object), 0, &tmp, sizeof(tmp), NULL);
zval_dtor(&function_name->element);
return;
+1 -1
View File
@@ -181,7 +181,7 @@ static pval php_VARIANT_get_property_handler(zend_property_reference *property_r
case OE_IS_OBJECT:
if (!strcmp(Z_STRVAL(overloaded_property->element), "value")) {
// var_arg can't be an idispatch, so we don't care for the implicit AddRef() call here
/* var_arg can't be an idispatch, so we don't care for the implicit AddRef() call here */
php_variant_to_pval(var_arg, &result, codepage TSRMLS_CC);
} else if (!strcmp(Z_STRVAL(overloaded_property->element), "type")) {
ZVAL_LONG(&result, V_VT(var_arg))
+1 -1
View File
@@ -119,7 +119,7 @@ PHPAPI void php_pval_to_variant_ex2(pval *pval_arg, VARIANT *var_arg, VARTYPE ty
var_arg = V_VARIANTREF(var_arg); /* put the array in that VARIANT */
}
if (!type) {
// if no type is given we take the variant type
/* if no type is given we take the variant type */
type = VT_VARIANT;
}
+1 -1
View File
@@ -280,7 +280,7 @@ static HRESULT STDMETHODCALLTYPE disp_invokeex(
ZVAL_NULL(zarg);
}
} else {
// arg can't be an idispatch, so we don't care for the implicit AddRef() call here
/* arg can't be an idispatch, so we don't care for the implicit AddRef() call here */
if (FAILURE == php_variant_to_pval(arg, zarg, codepage TSRMLS_CC)) {
trace("failed to convert arg %d to zval\n", i);
ZVAL_NULL(zarg);
+30 -33
View File
@@ -1,6 +1,6 @@
dnl $Id$
AC_DEFUN(CPDF_JPEG_TEST,[
AC_DEFUN([CPDF_JPEG_TEST],[
AC_ARG_WITH(jpeg-dir,
[ --with-jpeg-dir[=DIR] CPDF: Set the path to libjpeg install prefix.],[
for i in $withval /usr/local /usr; do
@@ -10,7 +10,6 @@ AC_DEFUN(CPDF_JPEG_TEST,[
fi
done
if test -z "$CPDF_JPEG_DIR"; then
AC_MSG_CHECKING([for libjpeg (needed by cpdflib 2.x)])
AC_MSG_ERROR([libjpeg.(a|so) not found.])
fi
PHP_CHECK_LIBRARY(jpeg, jpeg_read_header, [
@@ -23,7 +22,7 @@ AC_DEFUN(CPDF_JPEG_TEST,[
],)
])
AC_DEFUN(CPDF_TIFF_TEST,[
AC_DEFUN([CPDF_TIFF_TEST],[
AC_ARG_WITH(tiff-dir,
[ --with-tiff-dir[=DIR] CPDF: Set the path to libtiff install prefix.],[
for i in $withval /usr/local /usr; do
@@ -33,7 +32,6 @@ AC_DEFUN(CPDF_TIFF_TEST,[
fi
done
if test -z "$CPDF_TIFF_DIR"; then
AC_MSG_CHECKING([for libtiff (needed by cpdflib 2.x)])
AC_MSG_ERROR([libtiff.(a|so) not found.])
fi
PHP_CHECK_LIBRARY(tiff, TIFFOpen, [
@@ -46,42 +44,41 @@ AC_DEFUN(CPDF_TIFF_TEST,[
],)
])
AC_MSG_CHECKING(for cpdflib support)
AC_ARG_WITH(cpdflib,
[ --with-cpdflib[=DIR] Include cpdflib support (requires cpdflib >= 2).],
[
PHP_WITH_SHARED
if test "$withval" != "no"; then
cpdf_withval=$withval
PHP_NEW_EXTENSION(cpdf, cpdf.c, $ext_shared,, \\$(GDLIB_CFLAGS))
PHP_SUBST(CPDF_SHARED_LIBADD)
CPDF_JPEG_TEST
CPDF_TIFF_TEST
PHP_ARG_WITH(cpdflib, for cpdflib support,
[ --with-cpdflib[=DIR] Include cpdflib support (requires cpdflib >= 2).])
for i in $cpdf_withval /usr/local /usr; do
if test -f "$i/include/cpdflib.h"; then
CPDFLIB_INCLUDE=$i/include
AC_MSG_CHECKING(for cpdflib.h)
AC_MSG_RESULT([in $i/include])
if test "$PHP_CPDFLIB" != "no"; then
PHP_NEW_EXTENSION(cpdf, cpdf.c, $ext_shared,, \\$(GDLIB_CFLAGS))
PHP_SUBST(CPDF_SHARED_LIBADD)
CPDF_JPEG_TEST
CPDF_TIFF_TEST
PHP_CHECK_LIBRARY(cpdf, cpdf_open, [
PHP_ADD_INCLUDE($CPDFLIB_INCLUDE)
PHP_ADD_LIBRARY_WITH_PATH(cpdf, $i/lib, CPDF_SHARED_LIBADD)
AC_DEFINE(HAVE_CPDFLIB,1,[Whether you have cpdflib])
for i in $PHP_CPDFLIB /usr/local /usr; do
if test -f "$i/include/cpdflib.h"; then
CPDFLIB_INCLUDE=$i/include
PHP_CHECK_LIBRARY(cpdf, cpdf_open, [
cpdf_libname=cpdf
], [
PHP_CHECK_LIBRARY(cpdfm, cpdf_open, [
cpdf_libname=cpdfm
], [
AC_MSG_ERROR([Cpdflib module requires cpdflib >= 2.])
], [
-L$i/lib $CPDF_SHARED_LIBADD
])
break
fi
done
], [
-L$i/lib $CPDF_SHARED_LIBADD
])
if test -z "$CPDFLIB_INCLUDE"; then
AC_MSG_CHECKING(for cpdflib.h)
AC_MSG_ERROR([not found])
PHP_ADD_LIBRARY_WITH_PATH($cpdf_libname, $i/lib, CPDF_SHARED_LIBADD)
PHP_ADD_INCLUDE($CPDFLIB_INCLUDE)
AC_DEFINE(HAVE_CPDFLIB,1,[Whether you have cpdflib])
break
fi
done
if test -z "$CPDFLIB_INCLUDE"; then
AC_MSG_ERROR([cpdflib.h not found])
fi
],[
AC_MSG_RESULT(no)
])
fi
+24 -7
View File
@@ -476,6 +476,7 @@ PHP_FUNCTION(cpdf_open)
php_error(E_WARNING, "%s(): Writing to stdout as described in the ClibPDF manual is not possible if php is used as an Apache module. Write to a memory stream and use cpdf_output_buffer() instead.", get_active_function_name(TSRMLS_C));
#endif
if (php_check_open_basedir(Z_STRVAL_P(arg2) TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(Z_STRVAL_P(arg2), "rb+", CHECKUID_CHECK_MODE_PARAM))) {
cpdf_close(cpdf);
RETURN_FALSE;
}
@@ -1562,7 +1563,9 @@ PHP_FUNCTION(cpdf_setdash)
php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
RETURN_FALSE;
}
if (!pdf->currentMemStream) {
RETURN_FALSE;
}
snprintf(buffer, BUFFERLEN, "[%d %d] 0", (int) Z_LVAL_P(arg2), (int) Z_LVAL_P(arg3));
cpdf_setdash(pdf, buffer);
@@ -2521,16 +2524,30 @@ PHP_FUNCTION(cpdf_place_inline_image)
}
count = 3 * im->sx * im->sy;
if(NULL == (buffer = (unsigned char *) emalloc(count)))
RETURN_FALSE;
buffer = (unsigned char *) safe_emalloc(3 * im->sx, im->sy, 0);
ptr = buffer;
for(i=0; i<im->sy; i++) {
for(j=0; j<im->sx; j++) {
color = im->pixels[i][j];
*ptr++ = im->red[color];
*ptr++ = im->green[color];
*ptr++ = im->blue[color];
#if HAVE_LIBGD20
if(gdImageTrueColor(im)) {
if (im->tpixels && gdImageBoundsSafe(im, j, i)) {
color = gdImageTrueColorPixel(im, j, i);
*ptr++ = (color >> 16) & 0xFF;
*ptr++ = (color >> 8) & 0xFF;
*ptr++ = color & 0xFF;
}
} else {
#endif
if (im->pixels && gdImageBoundsSafe(im, j, i)) {
color = im->pixels[i][j];
*ptr++ = im->red[color];
*ptr++ = im->green[color];
*ptr++ = im->blue[color];
}
#if HAVE_LIBGD20
}
#endif
}
}
+1
View File
@@ -9,6 +9,7 @@ if test "$PHP_CRACK" != "no"; then
for i in $PHP_CRACK/lib $PHP_CRACK/cracklib /usr/local/lib /usr/lib; do
test -f $i/libcrack.$SHLIB_SUFFIX_NAME -o -f $i/libcrack.a && CRACK_LIBDIR=$i && break
test -f $i/libcrack_krb5.$SHLIB_SUFFIX_NAME -o -f $i/libcrack_krb5.a && CRACK_LIBDIR=$i && break
done
if test -z "$CRACK_LIBDIR"; then
+5
View File
@@ -29,6 +29,10 @@
#include <packer.h>
#ifndef STRINGSIZE
#define STRINGSIZE 1024
#endif
extern char * FascistLook(PWDICT *pwp, char *instring);
extern int PWClose(PWDICT *pwp);
@@ -230,6 +234,7 @@ ZEND_FUNCTION(crack_check)
if (zend_get_parameters_ex(2, &dictionary, &password) == FAILURE) {
RETURN_FALSE;
}
id = Z_LVAL_PP(dictionary);
break;
default:
WRONG_PARAM_COUNT;
+7 -1
View File
@@ -97,7 +97,13 @@ PHP_MINFO_FUNCTION(ctype)
return; \
switch (Z_TYPE_P(c)) { \
case IS_LONG: \
RETURN_BOOL(iswhat(Z_LVAL_P(c))); \
if (Z_LVAL_P(c) <= 255 && Z_LVAL_P(c) >= 0) { \
RETURN_BOOL(iswhat(Z_LVAL_P(c))); \
} else if (Z_LVAL_P(c) >= -128 && Z_LVAL_P(c) < 0) { \
RETURN_BOOL(iswhat(Z_LVAL_P(c) + 256)); \
} \
SEPARATE_ZVAL(&c); \
convert_to_string(c); \
case IS_STRING: \
{ \
char *p; \
+2 -2
View File
@@ -32,10 +32,10 @@ if test "$PHP_CURL" != "no"; then
CURL_CONFIG="curl-config"
AC_MSG_CHECKING(for cURL 7.9.8 or greater)
if ${CURL_DIR}/bin/curl-config --libs print > /dev/null 2>&1; then
if ${CURL_DIR}/bin/curl-config --libs > /dev/null 2>&1; then
CURL_CONFIG=${CURL_DIR}/bin/curl-config
else
if ${CURL_DIR}/curl-config --libs print > /dev/null 2>&1; then
if ${CURL_DIR}/curl-config --libs > /dev/null 2>&1; then
CURL_CONFIG=${CURL_DIR}/curl-config
fi
fi
+166 -36
View File
@@ -22,6 +22,10 @@
#include "config.h"
#endif
#ifdef PHP_WIN32
#include <winsock2.h>
#endif
#include "php.h"
#if HAVE_CURL
@@ -30,18 +34,23 @@
#include <string.h>
#ifdef PHP_WIN32
#include <winsock.h>
#include <sys/types.h>
#endif
#include <curl/curl.h>
#include <curl/easy.h>
/* As of curl 7.11.1 this is no longer defined inside curl.h */
#ifndef HttpPost
#define HttpPost curl_httppost
#endif
#define SMART_STR_PREALLOC 4096
#include "ext/standard/php_smart_str.h"
#include "ext/standard/info.h"
#include "ext/standard/file.h"
#include "ext/standard/url.h"
#include "php_curl.h"
static int le_curl;
@@ -56,6 +65,26 @@ static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC);
#define CAAS(s, v) add_assoc_string_ex(return_value, s, sizeof(s), (char *) v, 1);
#define CAAZ(s, v) add_assoc_zval_ex(return_value, s, sizeof(s), (zval *) v);
#define PHP_CURL_CHECK_OPEN_BASEDIR(str, len) \
if (PG(open_basedir) && *PG(open_basedir) && \
strncasecmp(str, "file://", sizeof("file://") - 1) == 0) \
{ \
php_url *tmp_url; \
\
if (!(tmp_url = php_url_parse_ex(str, len))) { \
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid url '%s'", str); \
RETURN_FALSE; \
} \
\
if (php_check_open_basedir(tmp_url->path TSRMLS_CC) || \
(PG(safe_mode) && !php_checkuid(tmp_url->path, "rb+", CHECKUID_CHECK_MODE_PARAM)) \
) { \
php_url_free(tmp_url); \
RETURN_FALSE; \
} \
php_url_free(tmp_url); \
}
/* {{{ curl_functions[]
*/
function_entry curl_functions[] = {
@@ -133,7 +162,9 @@ PHP_MINIT_FUNCTION(curl)
REGISTER_CURL_CONSTANT(CURLOPT_FOLLOWLOCATION);
REGISTER_CURL_CONSTANT(CURLOPT_FTPASCII);
REGISTER_CURL_CONSTANT(CURLOPT_PUT);
#if CURLOPT_MUTE != 0
REGISTER_CURL_CONSTANT(CURLOPT_MUTE);
#endif
REGISTER_CURL_CONSTANT(CURLOPT_USERPWD);
REGISTER_CURL_CONSTANT(CURLOPT_PROXYUSERPWD);
REGISTER_CURL_CONSTANT(CURLOPT_RANGE);
@@ -191,10 +222,28 @@ PHP_MINIT_FUNCTION(curl)
REGISTER_CURL_CONSTANT(CURLOPT_SSLENGINE);
REGISTER_CURL_CONSTANT(CURLOPT_SSLENGINE_DEFAULT);
REGISTER_CURL_CONSTANT(CURLOPT_CRLF);
REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFMODSINCE);
REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFUNMODSINCE);
REGISTER_CURL_CONSTANT(CURL_TIMECOND_LASTMOD);
#if LIBCURL_VERSION_NUM >= 0x070a00
REGISTER_CURL_CONSTANT(CURLOPT_ENCODING);
#endif
#if LIBCURL_VERSION_NUM > 0x070a05 /* CURLOPT_HTTPAUTH is available since curl 7.10.6 */
REGISTER_CURL_CONSTANT(CURLOPT_HTTPAUTH);
/* http authentication options */
REGISTER_CURL_CONSTANT(CURLAUTH_BASIC);
REGISTER_CURL_CONSTANT(CURLAUTH_DIGEST);
REGISTER_CURL_CONSTANT(CURLAUTH_GSSNEGOTIATE);
REGISTER_CURL_CONSTANT(CURLAUTH_NTLM);
REGISTER_CURL_CONSTANT(CURLAUTH_ANY);
REGISTER_CURL_CONSTANT(CURLAUTH_ANYSAFE);
#endif
#if LIBCURL_VERSION_NUM > 0x070a06 /* CURLOPT_PROXYAUTH is available since curl 7.10.7 */
REGISTER_CURL_CONSTANT(CURLOPT_PROXYAUTH);
#endif
/* Constants effecting the way CURLOPT_CLOSEPOLICY works */
REGISTER_CURL_CONSTANT(CURLCLOSEPOLICY_LEAST_RECENTLY_USED);
REGISTER_CURL_CONSTANT(CURLCLOSEPOLICY_LEAST_TRAFFIC);
@@ -277,6 +326,35 @@ PHP_MINIT_FUNCTION(curl)
REGISTER_CURL_CONSTANT(CURLE_TELNET_OPTION_SYNTAX);
REGISTER_CURL_CONSTANT(CURLE_OBSOLETE);
REGISTER_CURL_CONSTANT(CURLE_SSL_PEER_CERTIFICATE);
REGISTER_CURL_CONSTANT(CURLE_GOT_NOTHING);
REGISTER_CURL_CONSTANT(CURLE_SSL_ENGINE_NOTFOUND);
REGISTER_CURL_CONSTANT(CURLE_SSL_ENGINE_SETFAILED);
REGISTER_CURL_CONSTANT(CURLE_SEND_ERROR);
REGISTER_CURL_CONSTANT(CURLE_RECV_ERROR);
#ifdef CURLE_SHARE_IN_USE
REGISTER_CURL_CONSTANT(CURLE_SHARE_IN_USE);
#endif
#ifdef CURLE_SSL_CERTPROBLEM
REGISTER_CURL_CONSTANT(CURLE_SSL_CERTPROBLEM);
#endif
#ifdef CURLE_SSL_CIPHER
REGISTER_CURL_CONSTANT(CURLE_SSL_CIPHER);
#endif
#ifdef CURLE_SSL_CACERT
REGISTER_CURL_CONSTANT(CURLE_SSL_CACERT);
#endif
#ifdef CURLE_BAD_CONTENT_ENCODING
REGISTER_CURL_CONSTANT(CURLE_BAD_CONTENT_ENCODING);
#endif
#ifdef CURLE_LDAP_INVALID_URL
REGISTER_CURL_CONSTANT(CURLE_LDAP_INVALID_URL);
#endif
#ifdef CURLE_FILESIZE_EXCEEDED
REGISTER_CURL_CONSTANT(CURLE_FILESIZE_EXCEEDED);
#endif
#ifdef CURLE_FTP_SSL_FAILED
REGISTER_CURL_CONSTANT(CURLE_FTP_SSL_FAILED);
#endif
REGISTER_CURL_CONSTANT(CURL_NETRC_OPTIONAL);
REGISTER_CURL_CONSTANT(CURL_NETRC_IGNORED);
@@ -358,16 +436,21 @@ static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
zend_list_addref(ch->id);
ZVAL_STRINGL(argv[1], data, length, 1);
ch->in_callback = 1;
error = call_user_function(EG(function_table),
NULL,
t->func,
retval, 2, argv TSRMLS_CC);
ch->in_callback = 0;
if (error == FAILURE) {
php_error(E_WARNING, "%s(): Couldn't call the CURLOPT_WRITEFUNCTION",
get_active_function_name(TSRMLS_C));
length = -1;
}
else {
if (Z_TYPE_P(retval) != IS_LONG) {
convert_to_long_ex(&retval);
}
length = Z_LVAL_P(retval);
}
@@ -400,7 +483,6 @@ static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
case PHP_CURL_USER: {
zval *argv[3];
zval *retval;
int length;
int error;
TSRMLS_FETCH();
@@ -415,18 +497,18 @@ static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
zend_list_addref(t->fd);
ZVAL_LONG(argv[2], (int) size * nmemb);
ch->in_callback = 1;
error = call_user_function(EG(function_table),
NULL,
t->func,
retval, 3, argv TSRMLS_CC);
ch->in_callback = 0;
if (error == FAILURE) {
php_error(E_WARNING, "%s(): Cannot call the CURLOPT_READFUNCTION",
get_active_function_name(TSRMLS_C));
length = -1;
}
else {
memcpy(data, Z_STRVAL_P(retval), size * nmemb);
length = Z_STRLEN_P(retval);
} else if (Z_TYPE_P(retval) == IS_STRING) {
length = MIN(size * nmemb, Z_STRLEN_P(retval));
memcpy(data, Z_STRVAL_P(retval), length);
}
zval_ptr_dtor(&argv[0]);
@@ -475,16 +557,21 @@ static size_t curl_write_header(char *data, size_t size, size_t nmemb, void *ctx
zend_list_addref(ch->id);
ZVAL_STRINGL(argv[1], data, length, 1);
ch->in_callback = 1;
error = call_user_function(EG(function_table),
NULL,
t->func,
retval, 2, argv TSRMLS_CC);
ch->in_callback = 0;
if (error == FAILURE) {
php_error(E_WARNING, "%s(): Couldn't call the CURLOPT_HEADERFUNCTION",
get_active_function_name(TSRMLS_C));
length = -1;
}
else {
if (Z_TYPE_P(retval) != IS_LONG) {
convert_to_long_ex(&retval);
}
length = Z_LVAL_P(retval);
}
zval_ptr_dtor(&argv[0]);
@@ -492,13 +579,18 @@ static size_t curl_write_header(char *data, size_t size, size_t nmemb, void *ctx
zval_ptr_dtor(&retval);
break;
}
case PHP_CURL_IGNORE:
return length;
default:
return -1;
}
return length;
}
/* }}} */
#if CURLOPT_PASSWDFUNCTION != 0
/* {{{ curl_passwd
*/
static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
@@ -508,7 +600,7 @@ static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
zval *argv[3];
zval *retval = NULL;
int error;
int ret = 0;
int ret = -1;
TSRMLS_FETCH();
MAKE_STD_ZVAL(argv[0]);
@@ -520,23 +612,23 @@ static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
ZVAL_STRING(argv[1], prompt, 1);
ZVAL_LONG(argv[2], buflen);
ch->in_callback = 1;
error = call_user_function(EG(function_table),
NULL,
func,
retval, 2, argv TSRMLS_CC);
ch->in_callback = 0;
if (error == FAILURE) {
php_error(E_WARNING, "%s(): Couldn't call the CURLOPT_PASSWDFUNCTION", get_active_function_name(TSRMLS_C));
ret = -1;
}
else {
} else if (Z_TYPE_P(retval) == IS_STRING) {
if (Z_STRLEN_P(retval) > buflen) {
php_error(E_WARNING, "%s(): Returned password is too long for libcurl to handle",
get_active_function_name(TSRMLS_C));
ret = -1;
}
else {
strlcpy(buf, Z_STRVAL_P(retval), buflen);
} else {
strlcpy(buf, Z_STRVAL_P(retval), Z_STRLEN_P(retval));
}
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "User handler '%s' did not return a string.", Z_STRVAL_P(func));
}
zval_ptr_dtor(&argv[0]);
@@ -547,6 +639,7 @@ static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
return ret;
}
/* }}} */
#endif
/* {{{ curl_free_string
*/
@@ -595,7 +688,9 @@ static void alloc_curl_handle(php_curl **ch)
(*ch)->handlers->write_header = ecalloc(1, sizeof(php_curl_write));
(*ch)->handlers->read = ecalloc(1, sizeof(php_curl_read));
memset(&(*ch)->err, 0, sizeof((*ch)->err));
(*ch)->in_callback = 0;
zend_llist_init(&(*ch)->to_free.str, sizeof(char *),
(void(*)(void *)) curl_free_string, 0);
zend_llist_init(&(*ch)->to_free.slist, sizeof(struct curl_slist),
@@ -618,6 +713,11 @@ PHP_FUNCTION(curl_init)
WRONG_PARAM_COUNT;
}
if (argc > 0) {
convert_to_string_ex(url);
PHP_CURL_CHECK_OPEN_BASEDIR(Z_STRVAL_PP(url), Z_STRLEN_PP(url));
}
alloc_curl_handle(&ch);
ch->cp = curl_easy_init();
@@ -644,10 +744,10 @@ PHP_FUNCTION(curl_init)
curl_easy_setopt(ch->cp, CURLOPT_WRITEHEADER, (void *) ch);
curl_easy_setopt(ch->cp, CURLOPT_DNS_USE_GLOBAL_CACHE, 1);
curl_easy_setopt(ch->cp, CURLOPT_DNS_CACHE_TIMEOUT, 120);
curl_easy_setopt(ch->cp, CURLOPT_MAXREDIRS, 20); /* prevent infinite redirects */
if (argc > 0) {
char *urlcopy;
convert_to_string_ex(url);
urlcopy = estrndup(Z_STRVAL_PP(url), Z_STRLEN_PP(url));
curl_easy_setopt(ch->cp, CURLOPT_URL, urlcopy);
@@ -659,7 +759,7 @@ PHP_FUNCTION(curl_init)
}
/* }}} */
/* {{{ proto bool curl_setopt(resource ch, string option, mixed value)
/* {{{ proto bool curl_setopt(resource ch, int option, mixed value)
Set an option for a CURL transfer */
PHP_FUNCTION(curl_setopt)
{
@@ -692,7 +792,9 @@ PHP_FUNCTION(curl_setopt)
case CURLOPT_NETRC:
case CURLOPT_FOLLOWLOCATION:
case CURLOPT_PUT:
case CURLOPT_MUTE:
#if CURLOPT_MUTE != 0
case CURLOPT_MUTE:
#endif
case CURLOPT_TIMEOUT:
case CURLOPT_FTP_USE_EPSV:
case CURLOPT_LOW_SPEED_LIMIT:
@@ -716,6 +818,12 @@ PHP_FUNCTION(curl_setopt)
case CURLOPT_HTTPGET:
case CURLOPT_HTTP_VERSION:
case CURLOPT_CRLF:
#if LIBCURL_VERSION_NUM > 0x070a05 /* CURLOPT_HTTPAUTH is available since curl 7.10.6 */
case CURLOPT_HTTPAUTH:
#endif
#if LIBCURL_VERSION_NUM > 0x070a06 /* CURLOPT_PROXYAUTH is available since curl 7.10.7 */
case CURLOPT_PROXYAUTH:
#endif
convert_to_long_ex(zvalue);
error = curl_easy_setopt(ch->cp, option, Z_LVAL_PP(zvalue));
break;
@@ -746,8 +854,12 @@ PHP_FUNCTION(curl_setopt)
char *copystr = NULL;
convert_to_string_ex(zvalue);
copystr = estrndup(Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue));
if (option == CURLOPT_URL) {
PHP_CURL_CHECK_OPEN_BASEDIR(Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue));
}
copystr = estrndup(Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue));
error = curl_easy_setopt(ch->cp, option, copystr);
zend_llist_add_element(&ch->to_free.str, &copystr);
@@ -802,7 +914,9 @@ PHP_FUNCTION(curl_setopt)
if (Z_LVAL_PP(zvalue)) {
ch->handlers->write->method = PHP_CURL_RETURN;
}
} else {
ch->handlers->write->method = PHP_CURL_STDOUT;
}
break;
case CURLOPT_BINARYTRANSFER:
convert_to_long_ex(zvalue);
@@ -835,6 +949,7 @@ PHP_FUNCTION(curl_setopt)
ch->handlers->write_header->func = *zvalue;
ch->handlers->write_header->method = PHP_CURL_USER;
break;
#if CURLOPT_PASSWDFUNCTION != 0
case CURLOPT_PASSWDFUNCTION:
if (ch->handlers->passwd) {
zval_ptr_dtor(&ch->handlers->passwd);
@@ -844,6 +959,7 @@ PHP_FUNCTION(curl_setopt)
error = curl_easy_setopt(ch->cp, CURLOPT_PASSWDFUNCTION, curl_passwd);
error = curl_easy_setopt(ch->cp, CURLOPT_PASSWDDATA, (void *) ch);
break;
#endif
case CURLOPT_POSTFIELDS:
if (Z_TYPE_PP(zvalue) == IS_ARRAY || Z_TYPE_PP(zvalue) == IS_OBJECT) {
zval **current;
@@ -878,16 +994,16 @@ PHP_FUNCTION(curl_setopt)
if (*postval == '@') {
error = curl_formadd(&first, &last,
CURLFORM_COPYNAME, string_key,
CURLFORM_NAMELENGTH, string_key_len - 1,
CURLFORM_NAMELENGTH, (long)string_key_len - 1,
CURLFORM_FILE, ++postval,
CURLFORM_END);
}
else {
error = curl_formadd(&first, &last,
CURLFORM_COPYNAME, string_key,
CURLFORM_NAMELENGTH, string_key_len - 1,
(ZVAL_REFCOUNT(*zvalue) > 1 ? CURLFORM_PTRCONTENTS : CURLFORM_COPYCONTENTS), postval,
CURLFORM_CONTENTSLENGTH, Z_STRLEN_PP(current),
CURLFORM_NAMELENGTH, (long)string_key_len - 1,
CURLFORM_COPYCONTENTS, postval,
CURLFORM_CONTENTSLENGTH, (long)Z_STRLEN_PP(current),
CURLFORM_END);
}
}
@@ -1020,7 +1136,8 @@ PHP_FUNCTION(curl_exec)
error = curl_easy_perform(ch->cp);
SAVE_CURL_ERROR(ch, error);
if (error != CURLE_OK) {
/* CURLE_PARTIAL_FILE is returned by HEAD requests */
if (error != CURLE_OK && error != CURLE_PARTIAL_FILE) {
if (ch->handlers->write->buf.len > 0) {
smart_str_free(&ch->handlers->write->buf);
}
@@ -1130,10 +1247,13 @@ PHP_FUNCTION(curl_getinfo)
switch (option) {
case CURLINFO_EFFECTIVE_URL:
case CURLINFO_CONTENT_TYPE: {
char *s_code;
char *s_code = NULL;
curl_easy_getinfo(ch->cp, option, &s_code);
RETURN_STRING(s_code, 1);
if (curl_easy_getinfo(ch->cp, option, &s_code) == CURLE_OK && s_code) {
RETURN_STRING(s_code, 1);
} else {
RETURN_FALSE;
}
break;
}
@@ -1143,10 +1263,13 @@ PHP_FUNCTION(curl_getinfo)
case CURLINFO_FILETIME:
case CURLINFO_SSL_VERIFYRESULT:
case CURLINFO_REDIRECT_COUNT: {
long code;
long code = 0;
curl_easy_getinfo(ch->cp, option, &code);
RETURN_LONG(code);
if (curl_easy_getinfo(ch->cp, option, &code) == CURLE_OK) {
RETURN_LONG(code);
} else {
RETURN_FALSE;
}
break;
}
@@ -1162,10 +1285,13 @@ PHP_FUNCTION(curl_getinfo)
case CURLINFO_CONTENT_LENGTH_UPLOAD:
case CURLINFO_STARTTRANSFER_TIME:
case CURLINFO_REDIRECT_TIME: {
double code;
double code = 0.0;
curl_easy_getinfo(ch->cp, option, &code);
RETURN_DOUBLE(code);
if (curl_easy_getinfo(ch->cp, option, &code) == CURLE_OK) {
RETURN_DOUBLE(code);
} else {
RETURN_FALSE;
}
break;
}
@@ -1221,7 +1347,11 @@ PHP_FUNCTION(curl_close)
WRONG_PARAM_COUNT;
}
ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl);
if (ch->in_callback) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Attempt to close CURL handle from a callback");
return;
}
zend_list_delete(Z_LVAL_PP(zid));
}
/* }}} */
+1 -1
View File
@@ -307,7 +307,7 @@ PHPAPI php_stream *php_curl_stream_opener(php_stream_wrapper *wrapper, char *fil
curl_easy_setopt(curlstream->curl, CURLOPT_PROGRESSDATA, stream);
curl_easy_setopt(curlstream->curl, CURLOPT_NOPROGRESS, 0);
curl_easy_setopt(curlstream->curl, CURLOPT_USERAGENT, "PHP/" PHP_VERSION);
curl_easy_setopt(curlstream->curl, CURLOPT_USERAGENT, FG(user_agent) ? FG(user_agent) : "PHP/" PHP_VERSION);
/* TODO: read cookies and options from context */
+1
View File
@@ -93,6 +93,7 @@ typedef struct {
struct _php_curl_free to_free;
long id;
unsigned int uses;
zend_bool in_callback;
} php_curl;
/* streams support */
+1 -1
View File
@@ -4,7 +4,7 @@ dnl
# Checks for libraries.
# Prefer gdbm, Berkeley DB and ndbm/dbm, in that order
AC_DEFUN(AC_PREFERRED_DB_LIB,[
AC_DEFUN([AC_PREFERRED_DB_LIB],[
AC_CHECK_LIB(gdbm, gdbm_open,[AC_DEFINE(GDBM,1, [Whether you have GDBM]) DBM_TYPE=gdbm; DBM_LIB=-lgdbm],
[AC_CHECK_LIB(c, dbm_open,[AC_DEFINE(NDBM,1,[ ]) DBM_TYPE=ndbm; DBM_LIB=],
[AC_CHECK_LIB(dbm, dbm_open,[AC_DEFINE(NDBM,1,[ ]) DBM_TYPE=ndbm; DBM_LIB=-ldbm],
+18 -16
View File
@@ -4,26 +4,29 @@ dnl
dnl Suppose we need FlatFile if no support or only CDB is used.
AC_DEFUN(PHP_DBA_STD_BEGIN,[
AC_DEFUN([PHP_DBA_STD_BEGIN],[
unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT
])
AC_DEFUN(PHP_TEMP_LDFLAGS,[
AC_DEFUN([PHP_TEMP_LDFLAGS],[
old_LDFLAGS=$LDFLAGS
LDFLAGS="$1 $LDFLAGS"
$2
old_LIBS=$LIBS
LIBS="$2 $LIBS"
$3
LDFLAGS=$old_LDFLAGS
LIBS=$old_LIBS
])
dnl Assign INCLUDE/LFLAGS from PREFIX
AC_DEFUN(PHP_DBA_STD_ASSIGN,[
AC_DEFUN([PHP_DBA_STD_ASSIGN],[
if test -n "$THIS_PREFIX" && test "$THIS_PREFIX" != "/usr"; then
THIS_LFLAGS=$THIS_PREFIX/lib
fi
])
dnl Standard check
AC_DEFUN(PHP_DBA_STD_CHECK,[
AC_DEFUN([PHP_DBA_STD_CHECK],[
THIS_RESULT="yes"
if test -z "$THIS_INCLUDE"; then
AC_MSG_ERROR([DBA: Could not find necessary header file(s).])
@@ -34,14 +37,14 @@ AC_DEFUN(PHP_DBA_STD_CHECK,[
])
dnl Attach THIS_x to DBA_x
AC_DEFUN(PHP_DBA_STD_ATTACH,[
AC_DEFUN([PHP_DBA_STD_ATTACH],[
PHP_ADD_LIBRARY_WITH_PATH($THIS_LIBS, $THIS_LFLAGS, DBA_SHARED_LIBADD)
unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX
])
dnl Print the result message
dnl parameters(name [, full name [, empty or error message]])
AC_DEFUN(AC_DBA_STD_RESULT,[
AC_DEFUN([AC_DBA_STD_RESULT],[
THIS_NAME=[]translit($1,a-z0-9-,A-Z0-9_)
if test -n "$2"; then
THIS_FULL_NAME="$2"
@@ -78,7 +81,6 @@ AC_ARG_WITH(gdbm,
done
if test -n "$THIS_INCLUDE"; then
unset ac_cv_lib_gdbm_gdbm_open
PHP_CHECK_LIBRARY(gdbm, gdbm_open, [
AC_DEFINE_UNQUOTED(GDBM_INCLUDE_FILE, "$THIS_INCLUDE", [ ])
AC_DEFINE(DBA_GDBM, 1, [ ])
@@ -131,10 +133,10 @@ AC_DBA_STD_RESULT(ndbm)
dnl Berkeley specific (library and version test)
dnl parameters(version, library list, function)
AC_DEFUN(PHP_DBA_DB_CHECK,[
AC_DEFUN([PHP_DBA_DB_CHECK],[
for LIB in $2; do
if test -f $THIS_PREFIX/lib/lib$LIB.a -o -f $THIS_PREFIX/lib/lib$LIB.$SHLIB_SUFFIX_NAME; then
PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib -l$LIB,[
PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib, -l$LIB,[
AC_TRY_LINK([
#include "$THIS_INCLUDE"
],[
@@ -171,7 +173,7 @@ AC_DEFUN(PHP_DBA_DB_CHECK,[
])
fi
if test "$ext_shared" = "yes"; then
AC_MSG_CHECKING(if db can be used as shared extension)
AC_MSG_CHECKING(if dba can be used as shared extension)
AC_EGREP_CPP(yes,[
#include "$THIS_INCLUDE"
#if DB_VERSION_MAJOR > 3 || (DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR > 2)
@@ -198,7 +200,7 @@ AC_ARG_WITH(db4,
[ --with-db4[=DIR] DBA: Include Berkeley DB4 support],[
if test "$withval" != "no"; then
PHP_DBA_STD_BEGIN
for i in $withval /usr/local/BerkeleyDB.4.1 /usr/local/BerkeleyDB.4.0 /usr/local /usr; do
for i in $withval /usr/local/BerkeleyDB.4.2 /usr/local/BerkeleyDB.4.1 /usr/local/BerkeleyDB.4.0 /usr/local /usr; do
if test -f "$i/db4/db.h"; then
THIS_PREFIX=$i
THIS_INCLUDE=$i/db4/db.h
@@ -221,7 +223,7 @@ AC_ARG_WITH(db4,
break
fi
done
PHP_DBA_DB_CHECK(4, db-4.1 db-4.0 db-4 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)])
PHP_DBA_DB_CHECK(4, db-4.2 db-4.1 db-4.0 db-4 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)])
fi
])
AC_DBA_STD_RESULT(db4,Berkeley DB4)
@@ -340,7 +342,7 @@ AC_ARG_WITH(dbm,
])
AC_DBA_STD_RESULT(dbm)
AC_DEFUN(PHP_DBA_BUILTIN_CDB,[
AC_DEFUN([PHP_DBA_BUILTIN_CDB],[
AC_DEFINE(DBA_CDB_BUILTIN, 1, [ ])
AC_DEFINE(DBA_CDB_MAKE, 1, [ ])
AC_DEFINE(DBA_CDB, 1, [ ])
@@ -386,7 +388,7 @@ AC_ARG_WITH(cdb,
])
AC_DBA_STD_RESULT(cdb)
AC_DEFUN(PHP_DBA_BUILTIN_INI,[
AC_DEFUN([PHP_DBA_BUILTIN_INI],[
AC_DEFINE(DBA_INIFILE, 1, [ ])
ini_sources="libinifile/inifile.c"
THIS_RESULT="builtin"
@@ -404,7 +406,7 @@ AC_ARG_WITH(inifile,
])
AC_DBA_STD_RESULT(inifile,INI File)
AC_DEFUN(PHP_DBA_BUILTIN_FLATFILE,[
AC_DEFUN([PHP_DBA_BUILTIN_FLATFILE],[
AC_DEFINE(DBA_FLATFILE, 1, [ ])
flat_sources="libflatfile/flatfile.c"
THIS_RESULT="builtin"
+4
View File
@@ -53,6 +53,10 @@ DBA_OPEN_FUNC(db2)
struct stat check_stat;
int s = VCWD_STAT(info->path, &check_stat);
if (!s && !check_stat.st_size) {
info->mode = DBA_TRUNC; /* force truncate */
}
type = info->mode == DBA_READER ? DB_UNKNOWN :
info->mode == DBA_TRUNC ? DB_BTREE :
s ? DB_BTREE : DB_UNKNOWN;
+6 -2
View File
@@ -62,9 +62,13 @@ DBA_OPEN_FUNC(db3)
struct stat check_stat;
int s = VCWD_STAT(info->path, &check_stat);
type = info->mode == DBA_READER ? DB_UNKNOWN :
if (!s && !check_stat.st_size) {
info->mode = DBA_TRUNC; /* force truncate */
}
type = info->mode == DBA_READER ? DB_UNKNOWN :
info->mode == DBA_TRUNC ? DB_BTREE :
s? DB_BTREE : DB_UNKNOWN;
s ? DB_BTREE : DB_UNKNOWN;
gmode = info->mode == DBA_READER ? DB_RDONLY :
(info->mode == DBA_CREAT && s) ? DB_CREATE :
+6 -2
View File
@@ -62,9 +62,13 @@ DBA_OPEN_FUNC(db4)
struct stat check_stat;
int s = VCWD_STAT(info->path, &check_stat);
type = info->mode == DBA_READER ? DB_UNKNOWN :
if (!s && !check_stat.st_size) {
info->mode = DBA_TRUNC; /* force truncate */
}
type = info->mode == DBA_READER ? DB_UNKNOWN :
info->mode == DBA_TRUNC ? DB_BTREE :
s? DB_BTREE : DB_UNKNOWN;
s ? DB_BTREE : DB_UNKNOWN;
gmode = info->mode == DBA_READER ? DB_RDONLY :
(info->mode == DBA_CREAT && s) ? DB_CREATE :
+4 -4
View File
@@ -14,7 +14,7 @@ magic_quotes_runtime=1
require_once('test.inc');
echo "database handler: $handler\n";
// print md5 checksum of test.cdb which is generated by cdb_make program
var_dump(md5(implode('',file(dirname(__FILE__).'/test.cdb'))));
var_dump(md5_file(dirname(__FILE__).'/test.cdb'));
if (($db_make=dba_open($db_file, "n", $handler))!==FALSE) {
dba_insert("1", "1", $db_make);
dba_insert("2", "2", $db_make);
@@ -26,7 +26,7 @@ magic_quotes_runtime=1
// dba_replace cdb_make doesn't know replace
dba_close($db_make);
// write md5 checksum of generated database file
var_dump(md5(implode('',file($db_file))));
var_dump(md5_file($db_file));
// no need to test created database: this is done by dba_cdb_read.phpt
} else {
echo "Error creating database\n";
@@ -34,5 +34,5 @@ magic_quotes_runtime=1
?>
--EXPECT--
database handler: cdb_make
string(32) "723d19f39c1b15b3b455dd64323148d1"
string(32) "723d19f39c1b15b3b455dd64323148d1"
string(32) "12fc5ba2b9dcfef2480e5324eeb5f3e5"
string(32) "12fc5ba2b9dcfef2480e5324eeb5f3e5"
+99 -104
View File
@@ -118,28 +118,33 @@ static PHP_MSHUTDOWN_FUNCTION(dbase)
Opens a dBase-format database file */
PHP_FUNCTION(dbase_open)
{
pval *dbf_name, *options;
zval **dbf_name, **options;
dbhead_t *dbh;
int handle;
DBase_TLS_VARS;
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &dbf_name, &options)==FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &dbf_name, &options) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string(dbf_name);
convert_to_long(options);
convert_to_string_ex(dbf_name);
convert_to_long_ex(options);
if (PG(safe_mode) && (!php_checkuid(Z_STRVAL_P(dbf_name), NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
if (Z_LVAL_PP(options) == 1) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot open %s in write-only mode", Z_STRVAL_PP(dbf_name));
RETURN_FALSE;
}
if (PG(safe_mode) && (!php_checkuid(Z_STRVAL_PP(dbf_name), NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
RETURN_FALSE;
}
if (php_check_open_basedir(Z_STRVAL_P(dbf_name) TSRMLS_CC)) {
if (php_check_open_basedir(Z_STRVAL_PP(dbf_name) TSRMLS_CC)) {
RETURN_FALSE;
}
dbh = dbf_open(Z_STRVAL_P(dbf_name), Z_LVAL_P(options) TSRMLS_CC);
dbh = dbf_open(Z_STRVAL_PP(dbf_name), Z_LVAL_PP(options) TSRMLS_CC);
if (dbh == NULL) {
php_error(E_WARNING, "unable to open database %s", Z_STRVAL_P(dbf_name));
php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to open database %s", Z_STRVAL_PP(dbf_name));
RETURN_FALSE;
}
@@ -152,22 +157,22 @@ PHP_FUNCTION(dbase_open)
Closes an open dBase-format database file */
PHP_FUNCTION(dbase_close)
{
pval *dbh_id;
zval **dbh_id;
dbhead_t *dbh;
int dbh_type;
DBase_TLS_VARS;
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &dbh_id)==FAILURE) {
if (ZEND_NUM_ARGS() != 1 || (zend_get_parameters_ex(1, &dbh_id) == FAILURE)) {
WRONG_PARAM_COUNT;
}
convert_to_long(dbh_id);
dbh = zend_list_find(Z_LVAL_P(dbh_id), &dbh_type);
convert_to_long_ex(dbh_id);
dbh = zend_list_find(Z_LVAL_PP(dbh_id), &dbh_type);
if (!dbh || dbh_type != DBase_GLOBAL(le_dbhead)) {
php_error(E_WARNING, "Unable to find database for identifier %d", Z_LVAL_P(dbh_id));
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find database for identifier %ld", Z_LVAL_PP(dbh_id));
RETURN_FALSE;
}
zend_list_delete(Z_LVAL_P(dbh_id));
zend_list_delete(Z_LVAL_PP(dbh_id));
RETURN_TRUE;
}
/* }}} */
@@ -176,18 +181,18 @@ PHP_FUNCTION(dbase_close)
Returns the number of records in the database */
PHP_FUNCTION(dbase_numrecords)
{
pval *dbh_id;
zval **dbh_id;
dbhead_t *dbh;
int dbh_type;
DBase_TLS_VARS;
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &dbh_id)==FAILURE) {
if (ZEND_NUM_ARGS() != 1 || (zend_get_parameters_ex(1, &dbh_id) == FAILURE)) {
WRONG_PARAM_COUNT;
}
convert_to_long(dbh_id);
dbh = zend_list_find(Z_LVAL_P(dbh_id), &dbh_type);
convert_to_long_ex(dbh_id);
dbh = zend_list_find(Z_LVAL_PP(dbh_id), &dbh_type);
if (!dbh || dbh_type != DBase_GLOBAL(le_dbhead)) {
php_error(E_WARNING, "Unable to find database for identifier %d", Z_LVAL_P(dbh_id));
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find database for identifier %ld", Z_LVAL_PP(dbh_id));
RETURN_FALSE;
}
@@ -199,18 +204,18 @@ PHP_FUNCTION(dbase_numrecords)
Returns the number of fields (columns) in the database */
PHP_FUNCTION(dbase_numfields)
{
pval *dbh_id;
zval **dbh_id;
dbhead_t *dbh;
int dbh_type;
DBase_TLS_VARS;
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &dbh_id)==FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &dbh_id) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(dbh_id);
dbh = zend_list_find(Z_LVAL_P(dbh_id), &dbh_type);
convert_to_long_ex(dbh_id);
dbh = zend_list_find(Z_LVAL_PP(dbh_id), &dbh_type);
if (!dbh || dbh_type != DBase_GLOBAL(le_dbhead)) {
php_error(E_WARNING, "Unable to find database for identifier %d", Z_LVAL_P(dbh_id));
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find database for identifier %ld", Z_LVAL_PP(dbh_id));
RETURN_FALSE;
}
@@ -222,18 +227,18 @@ PHP_FUNCTION(dbase_numfields)
Packs the database (deletes records marked for deletion) */
PHP_FUNCTION(dbase_pack)
{
pval *dbh_id;
zval **dbh_id;
dbhead_t *dbh;
int dbh_type;
DBase_TLS_VARS;
if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, &dbh_id)==FAILURE) {
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &dbh_id) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(dbh_id);
dbh = zend_list_find(Z_LVAL_P(dbh_id), &dbh_type);
convert_to_long_ex(dbh_id);
dbh = zend_list_find(Z_LVAL_PP(dbh_id), &dbh_type);
if (!dbh || dbh_type != DBase_GLOBAL(le_dbhead)) {
php_error(E_WARNING, "Unable to find database for identifier %d", Z_LVAL_P(dbh_id));
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find database for identifier %ld", Z_LVAL_PP(dbh_id));
RETURN_FALSE;
}
@@ -247,7 +252,7 @@ PHP_FUNCTION(dbase_pack)
Adds a record to the database */
PHP_FUNCTION(dbase_add_record)
{
pval *dbh_id, *fields, **field;
zval **dbh_id, **fields, **field;
dbhead_t *dbh;
int dbh_type;
@@ -257,40 +262,36 @@ PHP_FUNCTION(dbase_add_record)
int i;
DBase_TLS_VARS;
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &dbh_id, &fields)==FAILURE) {
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &dbh_id, &fields) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(dbh_id);
if (Z_TYPE_P(fields) != IS_ARRAY) {
php_error(E_WARNING, "Expected array as second parameter");
convert_to_long_ex(dbh_id);
if (Z_TYPE_PP(fields) != IS_ARRAY) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Expected array as second parameter");
RETURN_FALSE;
}
dbh = zend_list_find(Z_LVAL_P(dbh_id), &dbh_type);
dbh = zend_list_find(Z_LVAL_PP(dbh_id), &dbh_type);
if (!dbh || dbh_type != DBase_GLOBAL(le_dbhead)) {
php_error(E_WARNING, "Unable to find database for identifier %d", Z_LVAL_P(dbh_id));
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find database for identifier %ld", Z_LVAL_PP(dbh_id));
RETURN_FALSE;
}
num_fields = zend_hash_num_elements(Z_ARRVAL_P(fields));
num_fields = zend_hash_num_elements(Z_ARRVAL_PP(fields));
if (num_fields != dbh->db_nfields) {
php_error(E_WARNING, "Wrong number of fields specified");
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Wrong number of fields specified");
RETURN_FALSE;
}
cp = t_cp = (char *)emalloc(dbh->db_rlen + 1);
if (!cp) {
php_error(E_WARNING, "unable to allocate memory");
RETURN_FALSE;
}
*t_cp++ = VALID_RECORD;
dbf = dbh->db_fields;
for (i = 0, cur_f = dbf; cur_f < &dbf[num_fields]; i++, cur_f++) {
zval tmp;
if (zend_hash_index_find(Z_ARRVAL_P(fields), i, (void **)&field) == FAILURE) {
php_error(E_WARNING, "unexpected error");
if (zend_hash_index_find(Z_ARRVAL_PP(fields), i, (void **)&field) == FAILURE) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "unexpected error");
efree(cp);
RETURN_FALSE;
}
@@ -305,7 +306,7 @@ PHP_FUNCTION(dbase_add_record)
dbh->db_records++;
if (put_dbf_record(dbh, dbh->db_records, cp) < 0) {
php_error(E_WARNING, "unable to put record at %ld", dbh->db_records);
php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to put record at %ld", dbh->db_records);
efree(cp);
RETURN_FALSE;
}
@@ -321,7 +322,7 @@ PHP_FUNCTION(dbase_add_record)
Replaces a record to the database */
PHP_FUNCTION(dbase_replace_record)
{
pval *dbh_id, *fields, **field, *recnum;
zval **dbh_id, **fields, **field, **recnum;
dbhead_t *dbh;
int dbh_type;
@@ -331,40 +332,36 @@ PHP_FUNCTION(dbase_replace_record)
int i;
DBase_TLS_VARS;
if (ZEND_NUM_ARGS() != 3 || getParameters(ht, 3, &dbh_id, &fields, &recnum)==FAILURE) {
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &dbh_id, &fields, &recnum) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(dbh_id);
convert_to_long(recnum);
if (Z_TYPE_P(fields) != IS_ARRAY) {
php_error(E_WARNING, "Expected array as second parameter");
convert_to_long_ex(dbh_id);
convert_to_long_ex(recnum);
if (Z_TYPE_PP(fields) != IS_ARRAY) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Expected array as second parameter");
RETURN_FALSE;
}
dbh = zend_list_find(Z_LVAL_P(dbh_id), &dbh_type);
dbh = zend_list_find(Z_LVAL_PP(dbh_id), &dbh_type);
if (!dbh || dbh_type != DBase_GLOBAL(le_dbhead)) {
php_error(E_WARNING, "Unable to find database for identifier %d", Z_LVAL_P(dbh_id));
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find database for identifier %ld", Z_LVAL_PP(dbh_id));
RETURN_FALSE;
}
num_fields = zend_hash_num_elements(Z_ARRVAL_P(fields));
num_fields = zend_hash_num_elements(Z_ARRVAL_PP(fields));
if (num_fields != dbh->db_nfields) {
php_error(E_WARNING, "Wrong number of fields specified");
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Wrong number of fields specified");
RETURN_FALSE;
}
cp = t_cp = (char *)emalloc(dbh->db_rlen + 1);
if (!cp) {
php_error(E_WARNING, "unable to allocate memory");
RETURN_FALSE;
}
*t_cp++ = VALID_RECORD;
dbf = dbh->db_fields;
for (i = 0, cur_f = dbf; cur_f < &dbf[num_fields]; i++, cur_f++) {
if (zend_hash_index_find(Z_ARRVAL_P(fields), i, (void **)&field) == FAILURE) {
php_error(E_WARNING, "unexpected error");
if (zend_hash_index_find(Z_ARRVAL_PP(fields), i, (void **)&field) == FAILURE) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "unexpected error");
efree(cp);
RETURN_FALSE;
}
@@ -373,8 +370,8 @@ PHP_FUNCTION(dbase_replace_record)
t_cp += cur_f->db_flen;
}
if (put_dbf_record(dbh, Z_LVAL_P(recnum), cp) < 0) {
php_error(E_WARNING, "unable to put record at %ld", dbh->db_records);
if (put_dbf_record(dbh, Z_LVAL_PP(recnum), cp) < 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to put record at %ld", dbh->db_records);
efree(cp);
RETURN_FALSE;
}
@@ -390,28 +387,28 @@ PHP_FUNCTION(dbase_replace_record)
Marks a record to be deleted */
PHP_FUNCTION(dbase_delete_record)
{
pval *dbh_id, *record;
zval **dbh_id, **record;
dbhead_t *dbh;
int dbh_type;
DBase_TLS_VARS;
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &dbh_id, &record)==FAILURE) {
if (ZEND_NUM_ARGS() != 2 || (zend_get_parameters_ex(2, &dbh_id, &record) == FAILURE)) {
WRONG_PARAM_COUNT;
}
convert_to_long(dbh_id);
convert_to_long(record);
convert_to_long_ex(dbh_id);
convert_to_long_ex(record);
dbh = zend_list_find(Z_LVAL_P(dbh_id), &dbh_type);
dbh = zend_list_find(Z_LVAL_PP(dbh_id), &dbh_type);
if (!dbh || dbh_type != DBase_GLOBAL(le_dbhead)) {
php_error(E_WARNING, "Unable to find database for identifier %d", Z_LVAL_P(dbh_id));
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find database for identifier %ld", Z_LVAL_PP(dbh_id));
RETURN_FALSE;
}
if (del_dbf_record(dbh, Z_LVAL_P(record)) < 0) {
if (Z_LVAL_P(record) > dbh->db_records) {
php_error(E_WARNING, "record %d out of bounds", Z_LVAL_P(record));
if (del_dbf_record(dbh, Z_LVAL_PP(record)) < 0) {
if (Z_LVAL_PP(record) > dbh->db_records) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "record %ld out of bounds", Z_LVAL_PP(record));
} else {
php_error(E_WARNING, "unable to delete record %d", Z_LVAL_P(record));
php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to delete record %ld", Z_LVAL_PP(record));
}
RETURN_FALSE;
}
@@ -425,7 +422,7 @@ PHP_FUNCTION(dbase_delete_record)
*/
static void php_dbase_get_record(INTERNAL_FUNCTION_PARAMETERS, int assoc)
{
pval *dbh_id, *record;
zval **dbh_id, **record;
dbhead_t *dbh;
int dbh_type;
dbfield_t *dbf, *cur_f;
@@ -435,28 +432,26 @@ static void php_dbase_get_record(INTERNAL_FUNCTION_PARAMETERS, int assoc)
int errno_save;
DBase_TLS_VARS;
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &dbh_id, &record)==FAILURE) {
if (ZEND_NUM_ARGS() != 2 || (zend_get_parameters_ex(2, &dbh_id, &record) == FAILURE)) {
WRONG_PARAM_COUNT;
}
convert_to_long(dbh_id);
convert_to_long(record);
convert_to_long_ex(dbh_id);
convert_to_long_ex(record);
dbh = zend_list_find(Z_LVAL_P(dbh_id), &dbh_type);
dbh = zend_list_find(Z_LVAL_PP(dbh_id), &dbh_type);
if (!dbh || dbh_type != DBase_GLOBAL(le_dbhead)) {
php_error(E_WARNING, "Unable to find database for identifier %d", Z_LVAL_P(dbh_id));
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find database for identifier %ld", Z_LVAL_PP(dbh_id));
RETURN_FALSE;
}
if ((data = get_dbf_record(dbh, Z_LVAL_P(record))) == NULL) {
php_error(E_WARNING, "Tried to read bad record %d", Z_LVAL_P(record));
if ((data = get_dbf_record(dbh, Z_LVAL_PP(record))) == NULL) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Tried to read bad record %ld", Z_LVAL_PP(record));
RETURN_FALSE;
}
dbf = dbh->db_fields;
if (array_init(return_value) == FAILURE) {
RETURN_FALSE;
}
array_init(return_value);
fnp = NULL;
for (cur_f = dbf; cur_f < &dbf[dbh->db_nfields]; cur_f++) {
@@ -577,7 +572,7 @@ PHP_FUNCTION(dbase_get_record_with_names)
Creates a new dBase-format database file */
PHP_FUNCTION(dbase_create)
{
pval *filename, *fields, **field, **value;
zval **filename, **fields, **field, **value;
int fd;
dbhead_t *dbh;
@@ -586,37 +581,37 @@ PHP_FUNCTION(dbase_create)
int i, rlen, handle;
DBase_TLS_VARS;
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &filename, &fields)==FAILURE) {
if (ZEND_NUM_ARGS() != 2 || (zend_get_parameters_ex(2, &filename, &fields) == FAILURE)) {
WRONG_PARAM_COUNT;
}
convert_to_string(filename);
convert_to_string_ex(filename);
if (Z_TYPE_P(fields) != IS_ARRAY) {
php_error(E_WARNING, "Expected array as second parameter");
if (Z_TYPE_PP(fields) != IS_ARRAY) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Expected array as second parameter");
RETURN_FALSE;
}
if (PG(safe_mode) && (!php_checkuid(Z_STRVAL_P(filename), NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
if (PG(safe_mode) && (!php_checkuid(Z_STRVAL_PP(filename), NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
RETURN_FALSE;
}
if (php_check_open_basedir(Z_STRVAL_P(filename) TSRMLS_CC)) {
if (php_check_open_basedir(Z_STRVAL_PP(filename) TSRMLS_CC)) {
RETURN_FALSE;
}
if ((fd = VCWD_OPEN_MODE(Z_STRVAL_P(filename), O_BINARY|O_RDWR|O_CREAT, 0644)) < 0) {
php_error(E_WARNING, "Unable to create database (%d): %s", errno, strerror(errno));
if ((fd = VCWD_OPEN_MODE(Z_STRVAL_PP(filename), O_BINARY|O_RDWR|O_CREAT, 0644)) < 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to create database (%d): %s", errno, strerror(errno));
RETURN_FALSE;
}
num_fields = zend_hash_num_elements(Z_ARRVAL_P(fields));
num_fields = zend_hash_num_elements(Z_ARRVAL_PP(fields));
/* have to use regular malloc() because this gets free()d by
code in the dbase library */
dbh = (dbhead_t *)malloc(sizeof(dbhead_t));
dbf = (dbfield_t *)malloc(sizeof(dbfield_t) * num_fields);
if (!dbh || !dbf) {
php_error(E_WARNING, "Unable to allocate memory for header info");
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to allocate memory for header info");
RETURN_FALSE;
}
@@ -646,27 +641,27 @@ PHP_FUNCTION(dbase_create)
for (i = 0, cur_f = dbf; i < num_fields; i++, cur_f++) {
/* look up the first field */
if (zend_hash_index_find(Z_ARRVAL_P(fields), i, (void **)&field) == FAILURE) {
php_error(E_WARNING, "unable to find field %d", i);
if (zend_hash_index_find(Z_ARRVAL_PP(fields), i, (void **)&field) == FAILURE) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to find field %d", i);
free_dbf_head(dbh);
RETURN_FALSE;
}
if (Z_TYPE_PP (field) != IS_ARRAY) {
php_error(E_WARNING, "second parameter must be array of arrays");
php_error_docref(NULL TSRMLS_CC, E_WARNING, "second parameter must be array of arrays");
free_dbf_head(dbh);
RETURN_FALSE;
}
/* field name */
if (zend_hash_index_find(Z_ARRVAL_PP(field), 0, (void **)&value) == FAILURE) {
php_error(E_WARNING, "expected field name as first element of list in field %d", i);
php_error_docref(NULL TSRMLS_CC, E_WARNING, "expected field name as first element of list in field %d", i);
free_dbf_head(dbh);
RETURN_FALSE;
}
convert_to_string_ex(value);
if (Z_STRLEN_PP(value) > 10 || Z_STRLEN_PP(value) == 0) {
php_error(E_WARNING, "invalid field name '%s' (must be non-empty and less than or equal to 10 characters)", Z_STRVAL_PP(value));
php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid field name '%s' (must be non-empty and less than or equal to 10 characters)", Z_STRVAL_PP(value));
free_dbf_head(dbh);
RETURN_FALSE;
}
@@ -674,7 +669,7 @@ PHP_FUNCTION(dbase_create)
/* field type */
if (zend_hash_index_find(Z_ARRVAL_PP (field), 1, (void **)&value) == FAILURE) {
php_error(E_WARNING, "expected field type as second element of list in field %d", i);
php_error_docref(NULL TSRMLS_CC, E_WARNING, "expected field type as second element of list in field %d", i);
RETURN_FALSE;
}
convert_to_string_ex(value);
@@ -699,7 +694,7 @@ PHP_FUNCTION(dbase_create)
case 'C':
/* field length */
if (zend_hash_index_find(Z_ARRVAL_PP (field), 2, (void **)&value) == FAILURE) {
php_error(E_WARNING, "expected field length as third element of list in field %d", i);
php_error_docref(NULL TSRMLS_CC, E_WARNING, "expected field length as third element of list in field %d", i);
free_dbf_head(dbh);
RETURN_FALSE;
}
@@ -708,7 +703,7 @@ PHP_FUNCTION(dbase_create)
if (cur_f->db_type == 'N') {
if (zend_hash_index_find(Z_ARRVAL_PP (field), 3, (void **)&value) == FAILURE) {
php_error(E_WARNING, "expected field precision as fourth element of list in field %d", i);
php_error_docref(NULL TSRMLS_CC, E_WARNING, "expected field precision as fourth element of list in field %d", i);
free_dbf_head(dbh);
RETURN_FALSE;
}
@@ -717,7 +712,7 @@ PHP_FUNCTION(dbase_create)
}
break;
default:
php_error(E_WARNING, "unknown field type '%c'", cur_f->db_type);
php_error_docref(NULL TSRMLS_CC, E_WARNING, "unknown field type '%c'", cur_f->db_type);
}
cur_f->db_foffset = rlen;
rlen += cur_f->db_flen;
+10 -9
View File
@@ -136,7 +136,8 @@ void pack_dbf(dbhead_t *dbh)
/* Try to truncate the file to the right size. */
if (ftruncate(dbh->db_fd, out_off) != 0) {
php_error(E_WARNING, "dbase_pack() couldn't truncate the file to the right size. Some deleted records may still be left in there.");
TSRMLS_FETCH();
php_error_docref(NULL TSRMLS_CC, E_WARNING, "dbase_pack() couldn't truncate the file to the right size. Some deleted records may still be left in there.");
}
if (rec_cnt == 0)
@@ -167,16 +168,16 @@ void put_field_val(char *rp, dbfield_t *fldp, char *cp)
*/
void out_rec(dbhead_t *dbh, dbfield_t *dbf, char *cp)
{
dbfield_t *cur_f;
int nfields = dbh->db_nfields;
char *fnp = (char *)malloc(dbh->db_rlen);
dbfield_t *cur_f;
int nfields = dbh->db_nfields;
char *fnp = (char *)malloc(dbh->db_rlen);
printf("%c", *cp);
for (cur_f = dbf; cur_f < &dbf[nfields] ; cur_f++) {
printf(" ");
printf("%c", *cp);
for (cur_f = dbf; cur_f < &dbf[nfields] ; cur_f++) {
printf(" ");
printf(cur_f->db_format, get_field_val(cp, cur_f, fnp));
}
printf("\n");
}
printf("\n");
free(fnp);
}
+26
View File
@@ -0,0 +1,26 @@
--TEST--
Bug #31754: (dbase_open() fails for mode = 1)
--SKIPIF--
<?php
if (!extension_loaded('dbase')) {
die('skip dbase extension not available');
}
?>
--FILE--
<?php
// database "definition"
$def = array(
array("foo", "L")
);
// creation
$dbh = dbase_create('/tmp/bug31754.dbf', array(array('foo', 'L')));
dbase_close($dbh);
$dbh = dbase_open('/tmp/bug31754.dbf', 1);
unlink('/tmp/bug31754.dbf');
?>
--EXPECTF--
Warning: dbase_open(): Cannot open /tmp/bug31754.dbf in write-only mode in %sbug31754.php on line %d
+33 -6
View File
@@ -79,8 +79,10 @@ ZEND_GET_MODULE(dio)
static void _dio_close_fd(zend_rsrc_list_entry *rsrc TSRMLS_DC)
{
php_fd_t *f = (php_fd_t *) rsrc->ptr;
close(f->fd);
free(f);
if (f) {
close(f->fd);
free(f);
}
}
#define RDIOC(c) REGISTER_LONG_CONSTANT(#c, c, CONST_CS | CONST_PERSISTENT)
@@ -142,10 +144,13 @@ PHP_MINFO_FUNCTION(dio)
php_info_print_table_end();
}
static void new_php_fd(php_fd_t **f, int fd)
static int new_php_fd(php_fd_t **f, int fd)
{
*f = malloc(sizeof(php_fd_t));
if (!(*f = malloc(sizeof(php_fd_t)))) {
return 0;
}
(*f)->fd = fd;
return 1;
}
/* {{{ proto resource dio_open(string filename, int flags[, int mode])
@@ -163,6 +168,10 @@ PHP_FUNCTION(dio_open)
return;
}
if (php_check_open_basedir(file_name TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(file_name, "wb+", CHECKUID_CHECK_MODE_PARAM))) {
RETURN_FALSE;
}
if (ZEND_NUM_ARGS() == 3) {
fd = open(file_name, flags, mode);
} else {
@@ -175,7 +184,10 @@ PHP_FUNCTION(dio_open)
RETURN_FALSE;
}
new_php_fd(&f, fd);
if (!new_php_fd(&f, fd)) {
RETURN_FALSE;
}
ZEND_REGISTER_RESOURCE(return_value, f, le_fd);
}
/* }}} */
@@ -195,6 +207,11 @@ PHP_FUNCTION(dio_read)
}
ZEND_FETCH_RESOURCE(f, php_fd_t *, &r_fd, -1, le_fd_name, le_fd);
if (bytes <= 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Length parameter must be greater than 0.");
RETURN_FALSE;
}
data = emalloc(bytes + 1);
res = read(f->fd, data, bytes);
if (res <= 0) {
@@ -223,6 +240,12 @@ PHP_FUNCTION(dio_write)
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|l", &r_fd, &data, &data_len, &trunc_len) == FAILURE) {
return;
}
if (trunc_len < 0 || trunc_len > data_len) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "length must be greater or equal to zero and less then the length of the specified string.");
RETURN_FALSE;
}
ZEND_FETCH_RESOURCE(f, php_fd_t *, &r_fd, -1, le_fd_name, le_fd);
res = write(f->fd, data, trunc_len ? trunc_len : data_len);
@@ -406,7 +429,9 @@ PHP_FUNCTION(dio_fcntl)
RETURN_FALSE;
}
new_php_fd(&new_f, fcntl(f->fd, cmd, Z_LVAL_P(arg)));
if (!new_php_fd(&new_f, fcntl(f->fd, cmd, Z_LVAL_P(arg)))) {
RETURN_FALSE;
}
ZEND_REGISTER_RESOURCE(return_value, new_f, le_fd);
break;
}
@@ -571,6 +596,8 @@ PHP_FUNCTION(dio_tcsetattr)
RETURN_FALSE;
}
memset(&newtio, 0, sizeof(newtio));
tcgetattr(f->fd, &newtio);
newtio.c_cflag = BAUD | CRTSCTS | DATABITS | STOPBITS | PARITYON | PARITY | CLOCAL | CREAD;
newtio.c_iflag = IGNPAR;
newtio.c_oflag = 0;
-5
View File
@@ -1,5 +0,0 @@
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!
+3 -3
View File
@@ -2,7 +2,7 @@ dnl
dnl $Id$
dnl
AC_DEFUN(PHP_DOM_CHECK_VERSION,[
AC_DEFUN([PHP_DOM_CHECK_VERSION],[
old_CPPFLAGS=$CPPFLAGS
CPPFLAGS=-I$DOMXML_DIR/include$DOMXML_DIR_ADD
AC_MSG_CHECKING(for libxml version)
@@ -78,7 +78,7 @@ if test "$PHP_DOM" != "no"; then
PHP_SUBST(DOMXML_SHARED_LIBADD)
fi
AC_DEFUN(PHP_DOM_XSLT_CHECK_VERSION,[
AC_DEFUN([PHP_DOM_XSLT_CHECK_VERSION],[
old_CPPFLAGS=$CPPFLAGS
CPPFLAGS=-I$DOMXSLT_DIR/include
AC_MSG_CHECKING(for libxslt version)
@@ -95,7 +95,7 @@ AC_DEFUN(PHP_DOM_XSLT_CHECK_VERSION,[
CPPFLAGS=$old_CPPFLAGS
])
AC_DEFUN(PHP_DOM_EXSLT_CHECK_VERSION,[
AC_DEFUN([PHP_DOM_EXSLT_CHECK_VERSION],[
old_CPPFLAGS=$CPPFLAGS
CPPFLAGS=-I$DOMEXSLT_DIR/include
AC_MSG_CHECKING(for libexslt version)
+36 -17
View File
@@ -540,8 +540,8 @@ zend_module_entry domxml_module_entry = {
domxml_functions,
PHP_MINIT(domxml),
PHP_MSHUTDOWN(domxml),
NULL,
NULL,
PHP_RINIT(domxml),
PHP_RSHUTDOWN(domxml),
PHP_MINFO(domxml),
DOMXML_API_VERSION, /* Extension versionnumber */
STANDARD_MODULE_PROPERTIES
@@ -1510,6 +1510,24 @@ static void domxml_error_validate(void *ctx, const char *msg, ...)
}
PHP_RINIT_FUNCTION(domxml)
{
xmlSetGenericErrorFunc(xmlGenericErrorContext, (xmlGenericErrorFunc)domxml_error);
#if HAVE_DOMXSLT
xsltSetGenericErrorFunc(xsltGenericErrorContext, (xmlGenericErrorFunc)domxml_error);
#endif
return SUCCESS;
}
PHP_RSHUTDOWN_FUNCTION(domxml)
{
xmlSetGenericErrorFunc(xmlGenericErrorContext, NULL);
#if HAVE_DOMXSLT
xsltSetGenericErrorFunc(xsltGenericErrorContext, NULL);
#endif
return SUCCESS;
}
PHP_MSHUTDOWN_FUNCTION(domxml)
{
#if HAVE_DOMXSLT
@@ -1668,15 +1686,9 @@ PHP_MINIT_FUNCTION(domxml)
REGISTER_LONG_CONSTANT("DOMXML_LOAD_SUBSTITUTE_ENTITIES", DOMXML_LOAD_SUBSTITUTE_ENTITIES, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DOMXML_LOAD_COMPLETE_ATTRS",DOMXML_LOAD_COMPLETE_ATTRS, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DOMXML_LOAD_DONT_KEEP_BLANKS",DOMXML_LOAD_DONT_KEEP_BLANKS, CONST_CS | CONST_PERSISTENT);
xmlSetGenericErrorFunc(xmlGenericErrorContext, (xmlGenericErrorFunc)domxml_error);
#if (defined(LIBXML_THREAD_ENABLED) && LIBXML_VERSION >= 20511)
xmlThrDefSetGenericErrorFunc(xmlGenericErrorContext, (xmlGenericErrorFunc)domxml_error);
#endif
#if HAVE_DOMXSLT
xsltSetGenericErrorFunc(xsltGenericErrorContext, (xmlGenericErrorFunc)domxml_error);
#if HAVE_DOMEXSLT
#if HAVE_DOMXSLT && HAVE_DOMEXSLT
exsltRegisterAll();
#endif
#endif
xmlInitParser();
return SUCCESS;
@@ -2459,6 +2471,10 @@ PHP_FUNCTION(domxml_node_append_child)
}
/* end libxml2 code */
else if (child->type == XML_ATTRIBUTE_NODE) {
if (parent->type != XML_ELEMENT_NODE) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Element node required to append Attribute");
RETURN_FALSE;
}
if (parent->properties != NULL) {
/* Check if an attribute with the same name exists */
xmlAttrPtr foundattrp;
@@ -2596,10 +2612,7 @@ PHP_FUNCTION(domxml_node_insert_before)
if (new_child == NULL)
new_child = xmlAddPrevSibling(refp, child);
} else {
/* first unlink node, if child is already a child of parent
for some strange reason, this is needed
*/
if (child->parent == parent){
if (child->parent != NULL){
xmlUnlinkNode(child);
}
new_child = xmlAddChild(parent, child);
@@ -3981,6 +3994,9 @@ static xmlDocPtr domxml_document_parser(int mode, int loadtype, char *source, vo
ctxt->sax->error = domxml_error_ext;
ctxt->sax->warning = domxml_error_ext;
#if LIBXML_VERSION >= 20600
ctxt->sax->cdataBlock = NULL;
#endif
ctxt->vctxt.userData= (void *) &errorCtxt;
ctxt->vctxt.error = (xmlValidityErrorFunc) domxml_error_validate;
ctxt->vctxt.warning = (xmlValidityWarningFunc) domxml_error_validate;
@@ -4800,15 +4816,17 @@ PHP_FUNCTION(domxml_xmltree)
RETURN_FALSE;
}
DOMXML_RET_OBJ(rv, (xmlNodePtr) docp, &ret);
DOMXML_DOMOBJ_NEW(rv, (xmlNodePtr) docp, &ret);
/* The root itself maybe an array. Though you may not have two Elements
as root, you may have a comment, pi and and element as root.
Thanks to Paul DuBois for pointing me at this.
*/
if (node_children(&children, root TSRMLS_CC) >= 0) {
zend_hash_update(Z_OBJPROP_P(return_value), "children",sizeof("children"), (void *) &children, sizeof(zval *), NULL);
zend_hash_update(Z_OBJPROP_P(rv), "children",sizeof("children"), (void *) &children, sizeof(zval *), NULL);
}
DOMXML_RET_ZVAL(rv);
/* xmlFreeDoc(docp); */
}
/* }}} */
@@ -5355,7 +5373,8 @@ PHP_FUNCTION(domxml_xslt_process)
xmlDocPtr xmldocp;
xmlDocPtr docp;
char **params = NULL;
int ret, clone = -1;
int ret;
long clone = -1;
char *filename;
int filename_len = 0;
FILE *f;
+2
View File
@@ -75,6 +75,8 @@ PHPAPI zval *php_domobject_new(xmlNodePtr obj, int *found, zval* in TSRMLS_DC);
/* directory functions */
PHP_MINIT_FUNCTION(domxml);
PHP_MSHUTDOWN_FUNCTION(domxml);
PHP_RINIT_FUNCTION(domxml);
PHP_RSHUTDOWN_FUNCTION(domxml);
PHP_MINFO_FUNCTION(domxml);
PHP_FUNCTION(domxml_version);
PHP_FUNCTION(xmldoc);
+3 -1
View File
@@ -1,7 +1,9 @@
--TEST--
Bug #26384 (domxslt->process causes segfault with xsl:key)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
<?php require_once('skipif.inc');
if (!function_exists("domxml_xslt_stylesheet_file")) { die("skip No XSLT support found");};
?>
--FILE--
<?php
$xml = domxml_open_mem(file_get_contents(dirname(__FILE__)."/area_name.xml"));
+29 -12
View File
@@ -33,6 +33,8 @@ typedef struct {
int cflags;
} reg_cache;
static int reg_magic = 0;
/* {{{ _php_regcomp
*/
static int _php_regcomp(regex_t *preg, const char *pattern, int cflags)
@@ -42,19 +44,34 @@ static int _php_regcomp(regex_t *preg, const char *pattern, int cflags)
reg_cache *rc = NULL;
TSRMLS_FETCH();
if(zend_hash_find(&REG(ht_rc), (char *) pattern, patlen+1, (void **) &rc) == FAILURE ||
rc->cflags != cflags) {
r = regcomp(preg, pattern, cflags);
if(!r) {
reg_cache rcp;
rcp.cflags = cflags;
memcpy(&rcp.preg, preg, sizeof(*preg));
zend_hash_update(&REG(ht_rc), (char *) pattern, patlen+1,
(void *) &rcp, sizeof(rcp), NULL);
if(zend_hash_find(&REG(ht_rc), (char *) pattern, patlen+1, (void **) &rc) == SUCCESS
&& rc->cflags == cflags) {
/*
* We use a saved magic number to see whether cache is corrupted, and if it
* is, we flush it and compile the pattern from scratch.
*/
if (rc->preg.re_magic != reg_magic) {
zend_hash_clean(&REG(ht_rc));
} else {
memcpy(preg, &rc->preg, sizeof(*preg));
return r;
}
} else {
memcpy(preg, &rc->preg, sizeof(*preg));
}
r = regcomp(preg, pattern, cflags);
if(!r) {
reg_cache rcp;
rcp.cflags = cflags;
memcpy(&rcp.preg, preg, sizeof(*preg));
/*
* Since we don't have access to the actual MAGIC1 definition in the private
* header file, we save the magic value immediately after compilation. Hopefully,
* it's good.
*/
if (!reg_magic) reg_magic = preg->re_magic;
zend_hash_update(&REG(ht_rc), (char *) pattern, patlen+1,
(void *) &rcp, sizeof(rcp), NULL);
}
return r;
+27 -4
View File
@@ -58,7 +58,7 @@
#include "ext/standard/php_image.h"
#include "ext/standard/info.h"
#if HAVE_MBSTRING && !defined(COMPILE_DL_MBSTRING)
#if defined(PHP_WIN32) || (HAVE_MBSTRING && !defined(COMPILE_DL_MBSTRING))
#define EXIF_USE_MBSTRING 1
#else
#define EXIF_USE_MBSTRING 0
@@ -68,6 +68,12 @@
#include "ext/mbstring/mbstring.h"
#endif
/* needed for ssize_t definition */
#include <sys/types.h>
#if defined(PHP_WIN32) && !defined(ssize_t)
typedef SSIZE_T ssize_t;
#endif
typedef unsigned char uchar;
#ifndef safe_emalloc
@@ -85,6 +91,8 @@ typedef unsigned char uchar;
#define EFREE_IF(ptr) if (ptr) efree(ptr)
#define MAX_IFD_NESTING_LEVEL 100
static unsigned char exif_thumbnail_force_ref[] = {2, BYREF_NONE, BYREF_FORCE_REST};
/* {{{ exif_functions[]
@@ -1430,6 +1438,7 @@ typedef struct {
/* for parsing */
int read_thumbnail;
int read_all;
int ifd_nesting_level;
/* internal */
file_section_list file;
} image_info_type;
@@ -2689,6 +2698,13 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha
size_t byte_count, offset_val, fpos, fgot;
xp_field_type *tmp_xp;
/* Protect against corrupt headers */
if (ImageInfo->ifd_nesting_level > MAX_IFD_NESTING_LEVEL) {
exif_error_docref("exif_read_data#error_ifd" TSRMLS_CC, ImageInfo, E_WARNING, "corrupt EXIF header: maximum directory nesting level reached");
return FALSE;
}
ImageInfo->ifd_nesting_level++;
tag = php_ifd_get16u(dir_entry, ImageInfo->motorola_intel);
format = php_ifd_get16u(dir_entry+2, ImageInfo->motorola_intel);
components = php_ifd_get32u(dir_entry+4, ImageInfo->motorola_intel);
@@ -2702,6 +2718,11 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha
byte_count = components * php_tiff_bytes_per_format[format];
if ((ssize_t)byte_count < 0) {
exif_error_docref("exif_read_data#error_ifd" TSRMLS_CC, ImageInfo, E_WARNING, "Process tag(x%04X=%s): Illegal byte_count(%ld)", tag, exif_get_tagname(tag, tagname, -12, tag_table TSRMLS_CC), byte_count);
return FALSE;
}
if (byte_count > 4) {
offset_val = php_ifd_get32u(dir_entry+8, ImageInfo->motorola_intel);
/* If its bigger than 4 bytes, the dir entry contains an offset. */
@@ -2712,7 +2733,7 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha
// JPEG does not use absolute pointers instead its pointers are relative to the start
// of the TIFF header in APP1 section.
*/
if (offset_val+byte_count>ImageInfo->FileSize || (ImageInfo->FileType!=IMAGE_FILETYPE_TIFF_II && ImageInfo->FileType!=IMAGE_FILETYPE_TIFF_MM)) {
if (offset_val+byte_count>ImageInfo->FileSize || (ImageInfo->FileType!=IMAGE_FILETYPE_TIFF_II && ImageInfo->FileType!=IMAGE_FILETYPE_TIFF_MM && ImageInfo->FileType!=IMAGE_FILETYPE_JPEG)) {
if (value_ptr < dir_entry) {
/* we can read this if offset_val > 0 */
/* some files have their values in other parts of the file */
@@ -3372,7 +3393,7 @@ static int exif_process_IFD_in_TIFF(image_info_type *ImageInfo, size_t dir_offse
return FALSE;
}
php_stream_read(ImageInfo->infile, (char*)(ImageInfo->file.list[sn].data+2), dir_size-2);
/*exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, "Dump: %s", exif_char_dump(ImageInfo->file.list[sn].data, dir_size, 0));*/
/*exif_error_docref(NULL TSRMLS_CC, ImageInfo, E_NOTICE, "Dump: %s", exif_char_dump(ImageInfo->file.list[sn].data, dir_size, 0));*/
next_offset = php_ifd_get32u(ImageInfo->file.list[sn].data + dir_size - 4, ImageInfo->motorola_intel);
#ifdef EXIF_DEBUG
exif_error_docref(NULL TSRMLS_CC, ImageInfo, E_NOTICE, "read from TIFF done, next offset x%04X", next_offset);
@@ -3713,6 +3734,8 @@ static int exif_read_file(image_info_type *ImageInfo, char *FileName, int read_t
}
}
ImageInfo->ifd_nesting_level = 0;
/* Scan the JPEG headers. */
ret = exif_scan_FILE_header(ImageInfo TSRMLS_CC);
@@ -3750,7 +3773,7 @@ PHP_FUNCTION(exif_read_data)
}
}
for (i=0; i<SECTION_COUNT; i++) {
sprintf(tmp, ",%s,", exif_get_sectionname(i));
snprintf(tmp, sizeof(tmp), ",%s,", exif_get_sectionname(i));
if (strstr(sections_str, tmp)) {
sections_needed |= 1<<i;
}
+1 -1
View File
@@ -54,7 +54,7 @@ BSC32=bscmake.exe
# 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 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 /out:"..\..\Release_TS/php_exif.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline"
# ADD 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 php_mbstring.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_exif.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline"
!ELSEIF "$(CFG)" == "exif - Win32 Debug_TS"
+64 -21
View File
@@ -459,11 +459,11 @@ PHP_MINFO_FUNCTION(fbsql)
if (FB_SQL_G(allowPersistent))
{
sprintf(buf, "%ld", FB_SQL_G(persistentCount));
snprintf(buf, sizeof(buf), "%ld", FB_SQL_G(persistentCount));
php_info_print_table_row(2, "Active Persistent Links", buf);
}
sprintf(buf, "%ld", FB_SQL_G(linkCount));
snprintf(buf, sizeof(buf), "%ld", FB_SQL_G(linkCount));
php_info_print_table_row(2, "Active Links", buf);
/*
@@ -507,7 +507,9 @@ static void php_fbsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
if (userName == NULL) userName = FB_SQL_G(userName);
if (userPassword == NULL) userPassword = FB_SQL_G(userPassword);
sprintf(name, "fbsql_%s_%s_%s", hostName, userName, userPassword);
if (snprintf(name, sizeof(name), "fbsql_%s_%s_%s", hostName, userName, userPassword) < 0) {
RETURN_FALSE;
}
if (!FB_SQL_G(allowPersistent)) {
persistent=0;
@@ -818,9 +820,21 @@ PHP_FUNCTION(fbsql_set_transaction)
WRONG_PARAM_COUNT;
break;
}
if (Z_LVAL_PP(Locking) < 0 || Z_LVAL_PP(Locking) > 2) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid locking type.");
RETURN_FALSE;
}
if (Z_LVAL_PP(Isolation) < 0 || Z_LVAL_PP(Isolation) > 4) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid isolation type.");
RETURN_FALSE;
}
ZEND_FETCH_RESOURCE2(phpLink, PHPFBLink *, fbsql_link_index, -1, "FrontBase-Link", le_link, le_plink);
sprintf(strSQL, "SET TRANSACTION LOCKING %s, ISOLATION %s;", strLocking[Z_LVAL_PP(Locking)], strIsolation[Z_LVAL_PP(Isolation)]);
if (snprintf(strSQL, sizeof(strSQL) , "SET TRANSACTION LOCKING %s, ISOLATION %s;", strLocking[Z_LVAL_PP(Locking)], strIsolation[Z_LVAL_PP(Isolation)]) < 0) {
RETURN_FALSE;
}
md = fbcdcExecuteDirectSQL(phpLink->connection, strSQL);
fbcmdRelease(md);
@@ -1213,7 +1227,12 @@ PHP_FUNCTION(fbsql_database)
if (phpLink->databaseName) free(phpLink->databaseName);
phpLink->databaseName = strdup(Z_STRVAL_PP(dbname));
}
RETURN_STRING(phpLink->databaseName, 1);
if (phpLink->databaseName) {
RETURN_STRING(phpLink->databaseName, 1);
}
else {
RETURN_FALSE;
}
}
/* }}} */
@@ -1412,7 +1431,9 @@ PHP_FUNCTION(fbsql_change_user)
convert_to_string_ex(password);
userPassword = Z_STRVAL_PP(password);
sprintf(buffer, "SET AUTHORIZATION %s;", userName);
if (snprintf(buffer, sizeof(buffer), "SET AUTHORIZATION %s;", userName) < 0) {
RETURN_FALSE;
}
phpfbQuery(INTERNAL_FUNCTION_PARAM_PASSTHRU, buffer, phpLink);
if (Z_LVAL_P(return_value))
@@ -1786,11 +1807,28 @@ int mdOk(PHPFBLink* link, FBCMetaData* md, char* sql)
php_error_docref(NULL TSRMLS_CC, E_WARNING, "No message");
}
link->errorText = strdup(emg);
link->errorNo = fbcemdErrorCodeAtIndex(emd, 0);;
link->errorNo = fbcemdErrorCodeAtIndex(emd, 0);
free(emg);
fbcemdRelease(emd);
result = 0;
}
else if (fbcmdWarningsFound(md))
{
FBCErrorMetaData* emd = fbcdcErrorMetaData(c, md);
char* emg = fbcemdAllErrorMessages(emd);
if (FB_SQL_G(generateWarnings))
{
if (emg)
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Warning in statement: '%s' %s", sql, emg);
else
php_error_docref(NULL TSRMLS_CC, E_WARNING, "No message");
}
link->errorText = strdup(emg);
link->errorNo = fbcemdErrorCodeAtIndex(emd, 0);
free(emg);
fbcemdRelease(emd);
result = 1;
}
return result;
}
/* }}} */
@@ -1819,9 +1857,12 @@ static void phpfbQuery(INTERNAL_FUNCTION_PARAMETERS, char* sql, PHPFBLink* link)
md = meta;
tp = fbcmdStatementType(md);
if ((tp[0] == 'C') || (tp[0] == 'R'))
{
if (tp == NULL) {
fbcmdRelease(meta);
ZVAL_BOOL(return_value, 1)
}
else if ((tp[0] == 'C') || (tp[0] == 'R'))
{
if (sR == 1 && md) fbcmdRelease(md);
ZVAL_BOOL(return_value, 1)
}
@@ -2079,7 +2120,9 @@ PHP_FUNCTION(fbsql_list_fields)
RETURN_FALSE;
}
sprintf(sql, "SELECT * FROM %s WHERE 1=0;", tableName);
if (snprintf(sql, sizeof(sql), "SELECT * FROM %s WHERE 1=0;", tableName) < 0) {
RETURN_FALSE;
}
phpfbQuery(INTERNAL_FUNCTION_PARAM_PASSTHRU, sql, phpLink);
}
@@ -2263,7 +2306,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
{
int v = *((int*)data);
char b[128];
sprintf(b, "%d", v);
snprintf(b, sizeof(b), "%d", v);
phpfbestrdup(b, length, value);
}
break;
@@ -2272,7 +2315,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
{
short int v = *((FBTinyInteger*)data);
char b[128];
sprintf(b, "%d", v);
snprintf(b, sizeof(b), "%d", v);
phpfbestrdup(b, length, value);
}
break;
@@ -2283,9 +2326,9 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
FBLongInteger v = *((FBLongInteger*)data);
char b[128];
#ifdef PHP_WIN32
sprintf(b, "%I64i", v);
snprintf(b, sizeof(b), "%I64i", v);
#else
sprintf(b, "%ll", v);
snprintf(b, sizeof(b), "%ll", v);
#endif
phpfbestrdup(b, length, value);
}
@@ -2295,7 +2338,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
{
short v = *((short*)data);
char b[128];
sprintf(b, "%d", v);
snprintf(b, sizeof(b), "%d", v);
phpfbestrdup(b, length, value);
}
break;
@@ -2308,7 +2351,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
{
double v = *((double*)data);
char b[128];
sprintf(b, "%f", v);
snprintf(b, sizeof(b), "%f", v);
phpfbestrdup(b, length, value);
}
break;
@@ -2341,7 +2384,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
*length = l*2+3+1;
if (value)
{
char* r = emalloc(l*2+3+1);
char* r = safe_emalloc(l, 2, 4);
r[0] = 'X';
r[1] = '\'';
for (i = 0; i < nBits / 8; i++)
@@ -2363,7 +2406,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
*length = l*2+3+1;
if (value)
{
char* r = emalloc(l*2+3+1);
char* r = safe_emalloc(l, 2, 4);
r[0] = 'B';
r[1] = '\'';
for (i = 0; i < nBits; i++)
@@ -2395,7 +2438,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
{
char b[128];
int v = *((unsigned int*)data);
sprintf(b, "%d", v);
snprintf(b, sizeof(b), "%d", v);
phpfbestrdup(b, length, value);
}
break;
@@ -2404,7 +2447,7 @@ void phpfbColumnAsString(PHPFBResult* result, int column, void* data , int* leng
{
char b[128];
double seconds = *((double*)data);
sprintf(b, "%f", seconds);
snprintf(b, sizeof(b), "%f", seconds);
phpfbestrdup(b, length, value);
}
break;
+13 -2
View File
@@ -721,6 +721,10 @@ PHP_FUNCTION(fdf_set_file)
return;
}
if (php_check_open_basedir(filename TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(filename, "wb+", CHECKUID_CHECK_MODE_PARAM))) {
RETURN_FALSE;
}
ZEND_FETCH_RESOURCE(fdf, FDFDoc *, &r_fdf, -1, "fdf", le_fdf);
err = FDFSetFile(fdf, filename);
@@ -863,7 +867,10 @@ PHP_FUNCTION(fdf_save_string)
struct stat stat;
char *buf;
fstat(fileno(fp), &stat);
if (fstat(fileno(fp), &stat) == -1) {
RETVAL_FALSE;
goto err;
}
buf = emalloc(stat.st_size +1);
fread(buf, stat.st_size, 1, fp);
buf[stat.st_size] = '\0';
@@ -881,7 +888,7 @@ PHP_FUNCTION(fdf_save_string)
if(err != FDFErcOK) {
FDF_FAILURE(err);
}
err:
if(temp_filename) {
unlink(temp_filename);
efree(temp_filename);
@@ -1481,6 +1488,10 @@ PHP_FUNCTION(fdf_get_attachment) {
ZEND_FETCH_RESOURCE(fdf, FDFDoc *, &r_fdf, -1, "fdf", le_fdf);
if (php_check_open_basedir(savepath TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(savepath, "wb+", CHECKUID_CHECK_MODE_PARAM))) {
RETURN_FALSE;
}
strncpy(pathbuf , savepath, MAXPATHLEN-1);
pathbuf[MAXPATHLEN-1] = '\0';
+43 -1
View File
@@ -98,11 +98,43 @@ PHP_MINIT_FUNCTION(filepro)
fp_globals = (fp_global_struct *) LocalAlloc(LPTR, sizeof(fp_global_struct));
TlsSetValue(FPTls, (void *) fp_globals);
#endif
return SUCCESS;
}
/* }}} */
/* {{{ PHP_RINIT_FUNCTION
*/
PHP_RINIT_FUNCTION(filepro)
{
FP_GLOBAL(fp_database)=NULL;
FP_GLOBAL(fp_fcount)=-1;
FP_GLOBAL(fp_keysize)=-1;
FP_GLOBAL(fp_fieldlist)=NULL;
return SUCCESS;
}
/* }}} */
/* {{{ PHP_RSHUTDOWN_FUNCTION
*/
PHP_RSHUTDOWN_FUNCTION(filepro)
{
FP_FIELD *tmp, *next;
if (FP_GLOBAL(fp_database)) {
efree(FP_GLOBAL(fp_database));
}
if (FP_GLOBAL(fp_fieldlist)) {
for (tmp = FP_GLOBAL(fp_fieldlist); tmp;) {
efree(tmp->name);
efree(tmp->format);
next = tmp->next;
efree(tmp);
tmp=next;
}
}
return SUCCESS;
}
/* }}} */
@@ -145,7 +177,15 @@ function_entry filepro_functions[] = {
zend_module_entry filepro_module_entry = {
STANDARD_MODULE_HEADER,
"filepro", filepro_functions, PHP_MINIT(filepro), PHP_MSHUTDOWN(filepro), NULL, NULL, NULL, NO_VERSION_YET, STANDARD_MODULE_PROPERTIES
"filepro",
filepro_functions,
PHP_MINIT(filepro),
PHP_MSHUTDOWN(filepro),
PHP_RINIT(filepro),
PHP_RSHUTDOWN(filepro),
NULL,
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
@@ -216,6 +256,8 @@ PHP_FUNCTION(filepro)
tmp = FP_GLOBAL(fp_fieldlist);
while (tmp != NULL) {
next = tmp->next;
efree(tmp->name);
efree(tmp->format);
efree(tmp);
tmp = next;
}
+2
View File
@@ -41,6 +41,8 @@ PHP_FUNCTION(filepro_fieldcount);
PHP_FUNCTION(filepro_retrieve);
PHP_MINIT_FUNCTION(filepro);
PHP_RINIT_FUNCTION(filepro);
PHP_RSHUTDOWN_FUNCTION(filepro);
PHP_MSHUTDOWN_FUNCTION(filepro);
#else
#define phpext_filepro_ptr NULL
+5 -1
View File
@@ -32,7 +32,7 @@
#include <fribidi/fribidi.h>
/* The fribidi guys dont believe in BC */
#ifdef FRIBIDI_CHAR_SET_UTF8
#ifndef FRIBIDI_MICRO_VERSION_STR
#define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8
#define FRIBIDI_CHARSET_ISO8859_6 FRIBIDI_CHAR_SET_ISO8859_6
#define FRIBIDI_CHARSET_ISO8859_8 FRIBIDI_CHAR_SET_ISO8859_8
@@ -212,7 +212,11 @@ PHP_FUNCTION(fribidi_log2vis)
out_string = (char *) emalloc(sizeof(char)*alloc_len);
#if FRIBIDI_MAJOR_VERSION == 0 && FRIBIDI_MINOR_VERSION <= 10
fribidi_log2vis(u_logical_str, len, &base_dir, u_visual_str, position_L_to_V_list, position_V_to_L_list, embedding_level_list);
#else
fribidi_log2vis(NULL, u_logical_str, len, &base_dir, u_visual_str, position_L_to_V_list, position_V_to_L_list, embedding_level_list);
#endif
/* convert back to original char set */
switch(Z_LVAL_PP(charset)) {
+37 -29
View File
@@ -108,7 +108,7 @@ static char** ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path TSRM
/* IP and port conversion box */
union ipbox {
unsigned long l[2];
struct in_addr ia[2];
unsigned short s[4];
unsigned char c[8];
};
@@ -362,6 +362,9 @@ ftp_syst(ftpbuf_t *ftp)
return NULL;
syst = ftp->inbuf;
while (*syst == ' ') {
syst++;
}
if ((end = strchr(syst, ' ')))
*end = 0;
ftp->syst = estrdup(syst);
@@ -638,9 +641,8 @@ ftp_pasv(ftpbuf_t *ftp, int pasv)
sin = (struct sockaddr_in *) sa;
sin->sin_family = AF_INET;
sin->sin_addr.s_addr = ipbox.l[0];
sin->sin_addr = ipbox.ia[0];
sin->sin_port = ipbox.s[2];
ftp->pasv = 2;
return 1;
@@ -653,7 +655,6 @@ int
ftp_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t type, int resumepos)
{
databuf_t *data = NULL;
char *ptr;
int lastch;
size_t rcvd;
char arg[11];
@@ -704,12 +705,30 @@ ftp_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t type,
}
if (type == FTPTYPE_ASCII) {
for (ptr = data->buf; rcvd; rcvd--, ptr++) {
if (lastch == '\r' && *ptr != '\n')
php_stream_putc(outstream, '\r');
if (*ptr != '\r')
php_stream_putc(outstream, *ptr);
lastch = *ptr;
#ifndef PHP_WIN32
char *s;
#endif
char *ptr = data->buf;
char *e = ptr + rcvd;
/* logic depends on the OS EOL
* Win32 -> \r\n
* Everything Else \n
*/
#ifdef PHP_WIN32
php_stream_write(outstream, ptr, (e - ptr));
ptr = e;
#else
while (e > ptr && (s = memchr(ptr, '\r', (e - ptr)))) {
php_stream_write(outstream, ptr, (s - ptr));
if (*(s + 1) == '\n') {
s++;
php_stream_putc(outstream, '\n');
}
ptr = s + 1;
}
#endif
if (ptr < e) {
php_stream_write(outstream, ptr, (e - ptr));
}
}
else {
@@ -718,9 +737,6 @@ ftp_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t type,
}
}
if (type == FTPTYPE_ASCII && lastch == '\r')
php_stream_putc(outstream, '\r');
ftp->data = data = data_close(ftp, data);
if (!ftp_getresp(ftp) || (ftp->resp != 226 && ftp->resp != 250)) {
@@ -1328,7 +1344,7 @@ ftp_getdata(ftpbuf_t *ftp TSRMLS_DC)
#endif
/* send the PORT */
ipbox.l[0] = ((struct sockaddr_in*) sa)->sin_addr.s_addr;
ipbox.ia[0] = ((struct sockaddr_in*) sa)->sin_addr;
ipbox.s[2] = ((struct sockaddr_in*) &addr)->sin_port;
sprintf(arg, "%u,%u,%u,%u,%u,%u",
ipbox.c[0], ipbox.c[1], ipbox.c[2], ipbox.c[3],
@@ -1454,7 +1470,7 @@ data_close(ftpbuf_t *ftp, databuf_t *data)
char**
ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path TSRMLS_DC)
{
FILE *tmpfp = NULL;
php_stream *tmpstream = NULL;
databuf_t *data = NULL;
char *ptr;
int ch, lastch;
@@ -1464,7 +1480,7 @@ ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path TSRMLS_DC)
char **entry;
char *text;
if ((tmpfp = tmpfile()) == NULL) {
if ((tmpstream = php_stream_fopen_tmpfile()) == NULL) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to create temporary file. Check permissions in temporary files directory.");
return NULL;
}
@@ -1492,7 +1508,7 @@ ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path TSRMLS_DC)
if (rcvd == -1)
goto bail;
fwrite(data->buf, rcvd, 1, tmpfp);
php_stream_write(tmpstream, data->buf, rcvd);
size += rcvd;
for (ptr = data->buf; rcvd; rcvd--, ptr++) {
@@ -1506,12 +1522,7 @@ ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path TSRMLS_DC)
ftp->data = data = data_close(ftp, data);
if (ferror(tmpfp))
goto bail;
rewind(tmpfp);
php_stream_rewind(tmpstream);
ret = emalloc((lines + 1) * sizeof(char**) + size * sizeof(char*));
@@ -1519,7 +1530,7 @@ ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path TSRMLS_DC)
text = (char*) (ret + lines + 1);
*entry = text;
lastch = 0;
while ((ch = getc(tmpfp)) != EOF) {
while ((ch = php_stream_getc(tmpstream)) != EOF) {
if (ch == '\n' && lastch == '\r') {
*(text - 1) = 0;
*++entry = text;
@@ -1531,10 +1542,7 @@ ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path TSRMLS_DC)
}
*entry = NULL;
if (ferror(tmpfp))
goto bail;
fclose(tmpfp);
php_stream_close(tmpstream);
if (!ftp_getresp(ftp) || (ftp->resp != 226 && ftp->resp != 250)) {
efree(ret);
@@ -1544,7 +1552,7 @@ ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path TSRMLS_DC)
return ret;
bail:
ftp->data = data_close(ftp, data);
fclose(tmpfp);
php_stream_close(tmpstream);
if (ret)
efree(ret);
return NULL;
+4
View File
@@ -602,6 +602,10 @@ PHP_FUNCTION(ftp_get)
RETURN_FALSE;
}
#ifdef PHP_WIN32
mode = FTPTYPE_IMAGE;
#endif
if (ftp->autoseek && resumepos) {
if (PG(safe_mode) && (!php_checkuid(local, mode == FTPTYPE_ASCII ? "rt+" : "rb+", CHECKUID_CHECK_MODE_PARAM))) {
RETURN_FALSE;
+17 -11
View File
@@ -47,7 +47,7 @@ dnl
dnl Checks for the configure options
dnl
AC_DEFUN(PHP_GD_JPEG,[
AC_DEFUN([PHP_GD_JPEG],[
if test "$PHP_JPEG_DIR" != "no"; then
for i in $PHP_JPEG_DIR /usr/local /usr; do
@@ -72,7 +72,7 @@ AC_DEFUN(PHP_GD_JPEG,[
fi
])
AC_DEFUN(PHP_GD_PNG,[
AC_DEFUN([PHP_GD_PNG],[
if test "$PHP_PNG_DIR" != "no"; then
for i in $PHP_PNG_DIR /usr/local /usr; do
@@ -107,7 +107,7 @@ AC_DEFUN(PHP_GD_PNG,[
fi
])
AC_DEFUN(PHP_GD_XPM,[
AC_DEFUN([PHP_GD_XPM],[
if test "$PHP_XPM_DIR" != "no"; then
for i in $PHP_XPM_DIR /usr/local /usr/X11R6 /usr; do
@@ -141,7 +141,7 @@ AC_DEFUN(PHP_GD_XPM,[
fi
])
AC_DEFUN(PHP_GD_FREETYPE1,[
AC_DEFUN([PHP_GD_FREETYPE1],[
if test "$PHP_TTF" != "no"; then
if test "$PHP_FREETYPE_DIR" = "no" -o "$PHP_FREETYPE_DIR" = ""; then
if test -n "$PHP_TTF"; then
@@ -175,7 +175,7 @@ AC_DEFUN(PHP_GD_FREETYPE1,[
fi
])
AC_DEFUN(PHP_GD_FREETYPE2,[
AC_DEFUN([PHP_GD_FREETYPE2],[
if test "$PHP_FREETYPE_DIR" != "no"; then
for i in $PHP_FREETYPE_DIR /usr/local /usr; do
@@ -200,7 +200,7 @@ AC_DEFUN(PHP_GD_FREETYPE2,[
fi
])
AC_DEFUN(PHP_GD_T1LIB,[
AC_DEFUN([PHP_GD_T1LIB],[
if test "$PHP_T1LIB" != "no"; then
for i in $PHP_T1LIB /usr/local /usr; do
@@ -224,19 +224,19 @@ AC_DEFUN(PHP_GD_T1LIB,[
fi
])
AC_DEFUN(PHP_GD_TTSTR,[
AC_DEFUN([PHP_GD_TTSTR],[
if test "$PHP_GD_NATIVE_TTF" = "yes"; then
AC_DEFINE(USE_GD_IMGSTRTTF, 1, [ ])
fi
])
AC_DEFUN(PHP_GD_JISX0208,[
AC_DEFUN([PHP_GD_JISX0208],[
if test "$PHP_GD_JIS_CONV" = "yes"; then
USE_GD_JIS_CONV=1
fi
])
AC_DEFUN(PHP_GD_CHECK_VERSION,[
AC_DEFUN([PHP_GD_CHECK_VERSION],[
PHP_CHECK_LIBRARY(gd, gdImageString16, [AC_DEFINE(HAVE_LIBGD13, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
PHP_CHECK_LIBRARY(gd, gdImagePaletteCopy, [AC_DEFINE(HAVE_LIBGD15, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
PHP_CHECK_LIBRARY(gd, gdImageCreateFromPng, [AC_DEFINE(HAVE_GD_PNG, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
@@ -257,7 +257,9 @@ AC_DEFUN(PHP_GD_CHECK_VERSION,[
PHP_CHECK_LIBRARY(gd, gdImageColorResolve, [AC_DEFINE(HAVE_GDIMAGECOLORRESOLVE, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
PHP_CHECK_LIBRARY(gd, gdImageGifCtx, [AC_DEFINE(HAVE_GD_GIF_CTX, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
PHP_CHECK_LIBRARY(gd, gdCacheCreate, [AC_DEFINE(HAVE_GD_CACHE_CREATE, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
PHP_CHECK_LIBRARY(gd, gdFontCacheShutdown, [AC_DEFINE(HAVE_GD_THREAD_SAFE, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
PHP_CHECK_LIBRARY(gd, gdFontCacheShutdown, [AC_DEFINE(HAVE_GD_FONTCACHESHUTDOWN,1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
PHP_CHECK_LIBRARY(gd, gdFreeFontCache, [AC_DEFINE(HAVE_GD_FREEFONTCACHE, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
PHP_CHECK_LIBRARY(gd, gdNewDynamicCtxEx, [AC_DEFINE(HAVE_GD_DYNAMIC_CTX_EX, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
])
dnl
@@ -271,7 +273,7 @@ if test "$PHP_GD" = "yes"; then
libgd/gdxpm.c libgd/gdfontt.c libgd/gdfonts.c libgd/gdfontmb.c libgd/gdfontl.c \
libgd/gdfontg.c libgd/gdtables.c libgd/gdft.c libgd/gdcache.c libgd/gdkanji.c \
libgd/wbmp.c libgd/gd_wbmp.c libgd/gdhelpers.c libgd/gd_topal.c libgd/gd_gif_in.c \
libgd/xbm.c"
libgd/xbm.c libgd/gd_gif_out.c "
dnl check for fabsf and floorf which are available since C99
AC_CHECK_FUNCS(fabsf floorf)
@@ -305,7 +307,11 @@ dnl These are always available with bundled library
AC_DEFINE(HAVE_GD_XBM, 1, [ ])
AC_DEFINE(HAVE_GD_BUNDLED, 1, [ ])
AC_DEFINE(HAVE_GD_GIF_READ, 1, [ ])
AC_DEFINE(HAVE_GD_GIF_CREATE, 1, [ ])
AC_DEFINE(HAVE_GD_IMAGEELLIPSE, 1, [ ])
AC_DEFINE(HAVE_GD_FONTCACHESHUTDOWN,1, [ ])
AC_DEFINE(HAVE_GD_DYNAMIC_CTX_EX, 1, [ ])
AC_DEFINE(HAVE_GD_GIF_CTX, 1, [ ])
dnl Make sure the libgd/ is first in the include path
GDLIB_CFLAGS="-DHAVE_LIBPNG"
+446 -393
View File
File diff suppressed because it is too large. Load diff
+8 -4
View File
@@ -43,8 +43,8 @@ RSC=rc.exe
# PROP Intermediate_Dir "Release_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\zlib" /I "..\..\TSRM" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_GD" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_GD_GIF_READ=1 /D HAVE_GDIMAGECOLORRESOLVE=1 /D "HAVE_GD_PNG" /D "HAVE_GD_JPG" /D "HAVE_GD_WBMP" /D "HAVE_GD_XBM" /D HAVE_LIBGD13=1 /D HAVE_LIBGD=1 /D HAVE_LIBGD15=1 /D HAVE_LIBGD204=1 /FR /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\zlib" /I "..\..\TSRM" /I "libgd" /D ZEND_DEBUG=0 /D HAVE_LIBGD15=1 /D HAVE_LIBGD204=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_GD" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_GD_GIF_READ=1 /D HAVE_GDIMAGECOLORRESOLVE=1 /D "HAVE_GD_PNG" /D "HAVE_GD_JPG" /D "HAVE_GD_WBMP" /D "HAVE_GD_XBM" /D HAVE_LIBGD=1 /D HAVE_LIBGD13=1 /D HAVE_LIBGD20=1 /D "USE_GD_IOCTX" /D HAVE_LIBFREETYPE=1 /D "USE_GD_IMGSTRTTF" /D HAVE_GD_STRINGTTF=1 /D HAVE_GD_BUNDLED=1 /D "MSWIN32" /D "HAVE_LIBPNG" /D "HAVE_LIBJPEG" /D "HAVE_GD_GD2" /D HAVE_GD_STRINGFTEX=1 /D HAVE_GD_IMAGESETBRUSH=1 /D HAVE_GD_IMAGESETTILE=1 /FR /FD /c
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\zlib" /I "..\..\TSRM" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_GD" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_GD_GIF_READ=1 /D HAVE_GD_GIF_CREATE=1 /D HAVE_GDIMAGECOLORRESOLVE=1 /D "HAVE_GD_PNG" /D "HAVE_GD_JPG" /D "HAVE_GD_WBMP" /D "HAVE_GD_XBM" /D HAVE_LIBGD13=1 /D HAVE_LIBGD=1 /D HAVE_LIBGD15=1 /D HAVE_LIBGD204=1 /FR /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\zlib" /I "..\..\TSRM" /I "libgd" /D ZEND_DEBUG=0 /D HAVE_LIBGD15=1 /D HAVE_LIBGD204=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_GD" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_GD_GIF_READ=1 /D HAVE_GD_GIF_CREATE=1 /D HAVE_GDIMAGECOLORRESOLVE=1 /D "HAVE_GD_PNG" /D "HAVE_GD_JPG" /D "HAVE_GD_WBMP" /D "HAVE_GD_XBM" /D HAVE_LIBGD=1 /D HAVE_LIBGD13=1 /D HAVE_LIBGD20=1 /D "USE_GD_IOCTX" /D HAVE_LIBFREETYPE=1 /D "USE_GD_IMGSTRTTF" /D HAVE_GD_STRINGTTF=1 /D HAVE_GD_BUNDLED=1 /D "MSWIN32" /D "HAVE_LIBPNG" /D "HAVE_LIBJPEG" /D "HAVE_GD_GD2" /D HAVE_GD_STRINGFTEX=1 /D HAVE_GD_IMAGESETBRUSH=1 /D HAVE_GD_IMAGESETTILE=1 /FR /FD /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
@@ -73,8 +73,8 @@ LINK32=link.exe
# PROP Intermediate_Dir "Debug_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\zlib" /I "..\..\TSRM" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_GD" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_GD_GIF_READ=1 /D HAVE_GDIMAGECOLORRESOLVE=1 /D "HAVE_GD_PNG" /D "HAVE_GD_JPG" /D "HAVE_GD_WBMP" /D HAVE_LIBGD13=1 /D HAVE_LIBGD=1 /D HAVE_LIBGD15=1 /D HAVE_LIBGD204=1 /FR /YX /FD /c
# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\zlib" /I "..\..\TSRM" /I "libgd" /D ZEND_DEBUG=1 /D "HAVE_LIBGD15" /D HAVE_LIBGD204=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_GD" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_GD_GIF_READ=1 /D HAVE_GDIMAGECOLORRESOLVE=1 /D "HAVE_GD_PNG" /D "HAVE_GD_JPG" /D "HAVE_GD_WBMP" /D HAVE_LIBGD=1 /D HAVE_LIBGD13=1 /D HAVE_LIBGD20=1 /D "USE_GD_IOCTX" /D HAVE_LIBFREETYPE=1 /D "USE_GD_IMGSTRTTF" /D HAVE_GD_STRINGTTF=1 /D HAVE_GD_BUNDLED=1 /D "MSWIN32" /D "HAVE_LIBPNG" /D "HAVE_LIBJPEG" /D "HAVE_GD_GD2" /D HAVE_GD_STRINGFTEX=1 /D HAVE_GD_IMAGESETBRUSH=1 /D HAVE_GD_IMAGESETTILE=1 /FR /FD /c
# ADD BASE CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\zlib" /I "..\..\TSRM" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_GD" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_GD_GIF_READ=1 /D HAVE_GD_GIF_CREATE=1 /D HAVE_GDIMAGECOLORRESOLVE=1 /D "HAVE_GD_PNG" /D "HAVE_GD_JPG" /D "HAVE_GD_WBMP" /D HAVE_LIBGD13=1 /D HAVE_LIBGD=1 /D HAVE_LIBGD15=1 /D HAVE_LIBGD204=1 /FR /YX /FD /c
# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\zlib" /I "..\..\TSRM" /I "libgd" /D ZEND_DEBUG=1 /D "HAVE_LIBGD15" /D HAVE_LIBGD204=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_GD" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_GD_GIF_READ=1 /D HAVE_GD_GIF_CREATE=1 /D HAVE_GDIMAGECOLORRESOLVE=1 /D "HAVE_GD_PNG" /D "HAVE_GD_JPG" /D "HAVE_GD_WBMP" /D HAVE_LIBGD=1 /D HAVE_LIBGD13=1 /D HAVE_LIBGD20=1 /D "USE_GD_IOCTX" /D HAVE_LIBFREETYPE=1 /D "USE_GD_IMGSTRTTF" /D HAVE_GD_STRINGTTF=1 /D HAVE_GD_BUNDLED=1 /D "MSWIN32" /D "HAVE_LIBPNG" /D "HAVE_LIBJPEG" /D "HAVE_GD_GD2" /D HAVE_GD_STRINGFTEX=1 /D HAVE_GD_IMAGESETBRUSH=1 /D HAVE_GD_IMAGESETTILE=1 /FR /FD /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
@@ -231,6 +231,10 @@ SOURCE=.\libgd\gd_gif_in.c
# End Source File
# Begin Source File
SOURCE=.\libgd\gd_gif_out.c
# End Source File
# Begin Source File
SOURCE=.\libgd\gd_io.c
!IF "$(CFG)" == "gd - Win32 Release_TS GD2"
+1 -1
View File
@@ -42,7 +42,7 @@
#if PHP_WIN32
#define ENABLE_GD_TTF
#else
#include "php_config.h"
#include <php_config.h>
#endif
#if (HAVE_LIBTTF | HAVE_LIBFREETYPE) && !defined(HAVE_GD_CACHE_CREATE)
+1 -1
View File
@@ -9,7 +9,7 @@
#if PHP_WIN32
#include "config.w32.h"
#else
#include "php_config.h"
#include <php_config.h>
#endif
#if HAVE_LIBTTF && !defined(USE_GD_IMGSTRTTF)
#include <stdio.h>
+125 -36
View File
@@ -571,7 +571,7 @@ void gdImageColorTransparent (gdImagePtr im, int color)
if (im->transparent != -1) {
im->alpha[im->transparent] = gdAlphaOpaque;
}
if (color > -1 && color<=gdMaxColors) {
if (color > -1 && color<im->colorsTotal && color<=gdMaxColors) {
im->alpha[color] = gdAlphaTransparent;
} else {
return;
@@ -1290,7 +1290,9 @@ void gdImageAALine (gdImagePtr im, int x1, int y1, int x2, int y2, int col)
inc = (dy * 65536) / dx;
while ((x >> 16) < x2) {
gdImageSetAAPixelColor(im, x >> 16, y >> 16, col, (y >> 8) & 0xFF);
gdImageSetAAPixelColor(im, x >> 16, (y >> 16) + 1,col, (~y >> 8) & 0xFF);
if ((y >> 16) + 1 < im->sy) {
gdImageSetAAPixelColor(im, x >> 16, (y >> 16) + 1,col, (~y >> 8) & 0xFF);
}
x += (1 << 16);
y += inc;
}
@@ -1310,7 +1312,9 @@ void gdImageAALine (gdImagePtr im, int x1, int y1, int x2, int y2, int col)
inc = (dx * 65536) / dy;
while ((y>>16) < y2) {
gdImageSetAAPixelColor(im, x >> 16, y >> 16, col, (x >> 8) & 0xFF);
gdImageSetAAPixelColor(im, (x >> 16) + 1, (y >> 16),col, (~x >> 8) & 0xFF);
if ((x >> 16) + 1 < im->sx) {
gdImageSetAAPixelColor(im, (x >> 16) + 1, (y >> 16),col, (~x >> 8) & 0xFF);
}
x += inc;
y += (1<<16);
}
@@ -1603,9 +1607,14 @@ void gdImageFilledArc (gdImagePtr im, int cx, int cy, int w, int h, int s, int e
int lx = 0, ly = 0;
int fx = 0, fy = 0;
while (s<0) {
s += 360;
}
while (e < s) {
e += 360;
}
for (i = s; i <= e; i++) {
int x, y;
x = ((long) gdCosT[i % 360] * (long) w / (2 * 1024)) + cx;
@@ -1728,8 +1737,8 @@ void gdImageFilledEllipse (gdImagePtr im, int mx, int my, int w, int h, int c)
rx = r << 1;
ry = 0;
x = a;
old_y2=-1;
old_y1=-1;
old_y2=-2;
old_y1=-2;
while (x > 0){
if (r > 0) {
my1++;my2--;
@@ -1762,13 +1771,18 @@ void gdImageFillToBorder (gdImagePtr im, int x, int y, int border, int color)
int lastBorder;
/* Seek left */
int leftLimit = -1, rightLimit;
int i;
int i, restoreAlphaBleding=0;
if (border < 0) {
/* Refuse to fill to a non-solid border */
return;
}
if (im->alphaBlendingFlag) {
restoreAlphaBleding = 1;
im->alphaBlendingFlag = 0;
}
if (x >= im->sx) {
x = im->sx - 1;
}
@@ -1784,6 +1798,9 @@ void gdImageFillToBorder (gdImagePtr im, int x, int y, int border, int color)
leftLimit = i;
}
if (leftLimit == -1) {
if (restoreAlphaBleding) {
im->alphaBlendingFlag = 1;
}
return;
}
/* Seek right */
@@ -1827,6 +1844,9 @@ void gdImageFillToBorder (gdImagePtr im, int x, int y, int border, int color)
}
}
}
if (restoreAlphaBleding) {
im->alphaBlendingFlag = 1;
}
}
@@ -1859,20 +1879,28 @@ void gdImageFill(gdImagePtr im, int x, int y, int nc)
int l, x1, x2, dy;
int oc; /* old pixel value */
int wx2,wy2;
int alphablending_bak;
/* stack of filled segments */
//struct seg stack[FILL_MAX],*sp = stack;;
/* struct seg stack[FILL_MAX],*sp = stack;; */
struct seg *stack;
struct seg *sp;
alphablending_bak = im->alphaBlendingFlag;
im->alphaBlendingFlag = 0;
if (nc==gdTiled){
_gdImageFillTiled(im,x,y,nc);
im->alphaBlendingFlag = alphablending_bak;
return;
}
wx2=im->sx;wy2=im->sy;
oc = gdImageGetPixel(im, x, y);
if (oc==nc || x<0 || x>wx2 || y<0 || y>wy2) return;
if (oc==nc || x<0 || x>wx2 || y<0 || y>wy2) {
im->alphaBlendingFlag = alphablending_bak;
return;
}
stack = (struct seg *)emalloc(sizeof(struct seg) * ((int)(im->sy*im->sx)/4)+1);
sp = stack;
@@ -1911,6 +1939,7 @@ skip: for (x++; x<=x2 && (gdImageGetPixel(im, x, y)!=oc); x++);
} while (x<=x2);
}
efree(stack);
im->alphaBlendingFlag = alphablending_bak;
}
void _gdImageFillTiled(gdImagePtr im, int x, int y, int nc)
@@ -2000,24 +2029,72 @@ void gdImageRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color)
{
int x1h = x1, x1v = x1, y1h = y1, y1v = y1, x2h = x2, x2v = x2, y2h = y2, y2v = y2;
int thick = im->thick;
int half1 = 1;
int t;
if (thick > 1) {
int half = thick / 2;
int half1 = thick - half;
if (y2 < y1) {
t=y1;
y1 = y2;
y2 = t;
if (y1 < y2) {
y1v = y1h - half;
y2v = y2h + half1 - 1;
} else {
y1v = y1h + half1 - 1;
y2v = y2h - half;
t = x1;
x1 = x2;
x2 = t;
}
x1h = x1; x1v = x1; y1h = y1; y1v = y1; x2h = x2; x2v = x2; y2h = y2; y2v = y2;
if (thick > 1) {
int cx, cy, x1ul, y1ul, x2lr, y2lr;
int half = thick >> 1;
half1 = thick - half;
x1ul = x1 - half;
y1ul = y1 - half;
x2lr = x2 + half;
y2lr = y2 + half;
cy = y1ul + thick;
while (cy-- > y1ul) {
cx = x1ul - 1;
while (cx++ < x2lr) {
gdImageSetPixel(im, cx, cy, color);
}
}
cy = y2lr - thick;
while (cy++ < y2lr) {
cx = x1ul - 1;
while (cx++ < x2lr) {
gdImageSetPixel(im, cx, cy, color);
}
}
cy = y1ul + thick - 1;
while (cy++ < y2lr -thick) {
cx = x1ul - 1;
while (cx++ < x1ul + thick) {
gdImageSetPixel(im, cx, cy, color);
}
}
cy = y1ul + thick - 1;
while (cy++ < y2lr -thick) {
cx = x2lr - thick - 1;
while (cx++ < x2lr) {
gdImageSetPixel(im, cx, cy, color);
}
}
return;
} else {
y1v = y1h + 1;
y2v = y2h - 1;
gdImageLine(im, x1h, y1h, x2h, y1h, color);
gdImageLine(im, x1h, y2h, x2h, y2h, color);
gdImageLine(im, x1v, y1v, x1v, y2v, color);
gdImageLine(im, x2v, y1v, x2v, y2v, color);
}
gdImageLine(im, x1h, y1h, x2h, y1h, color);
gdImageLine(im, x1h, y2h, x2h, y2h, color);
gdImageLine(im, x1v, y1v, x1v, y2v, color);
gdImageLine(im, x2v, y1v, x2v, y2v, color);
}
void gdImageFilledRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color)
@@ -2040,6 +2117,16 @@ void gdImageFilledRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int
if (y1 > gdImageSY(im)) {
y1 = gdImageSY(im);
}
if (y2 < y1) {
int t;
t=y1;
y1 = y2;
y2 = t;
t = x1;
x1 = x2;
x2 = t;
}
for (y = y1; (y <= y2); y++) {
for (x = x1; (x <= x2); x++) {
@@ -2281,7 +2368,8 @@ void gdImageCopyResized (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int
int tmp = gdImageGetPixel (src, x, y);
mapTo = gdImageGetTrueColorPixel (src, x, y);
if (gdImageGetTransparent (src) == tmp) {
tox++;
/* 2.0.21, TK: not tox++ */
tox += stx[x - srcX];
continue;
}
} else {
@@ -2289,7 +2377,8 @@ void gdImageCopyResized (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int
mapTo = gdImageGetTrueColorPixel (src, x, y);
/* Added 7/24/95: support transparent copies */
if (gdImageGetTransparent (src) == mapTo) {
tox++;
/* 2.0.21, TK: not tox++ */
tox += stx[x - srcX];
continue;
}
}
@@ -2345,22 +2434,24 @@ void gdImageCopyResized (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int
void gdImageCopyResampled (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX, int srcY, int dstW, int dstH, int srcW, int srcH)
{
int x, y;
double sy1, sy2, sx1, sx2;
if (!dst->trueColor) {
gdImageCopyResized (dst, src, dstX, dstY, srcX, srcY, dstW, dstH, srcW, srcH);
return;
}
for (y = dstY; (y < dstY + dstH); y++) {
sy1 = ((double) y - (double) dstY) * (double) srcH / (double) dstH;
sy2 = ((double) (y + 1) - (double) dstY) * (double) srcH / (double) dstH;
for (x = dstX; (x < dstX + dstW); x++) {
float sy1, sy2, sx1, sx2;
float sx, sy;
float spixels = 0.0f;
float red = 0.0f, green = 0.0f, blue = 0.0f, alpha = 0.0f;
float alpha_factor, alpha_sum = 0.0f, contrib_sum = 0.0f;
sy1 = ((float)(y - dstY)) * (float)srcH / (float)dstH;
sy2 = ((float)(y + 1 - dstY)) * (float) srcH / (float) dstH;
double sx, sy;
double spixels = 0;
double red = 0.0, green = 0.0, blue = 0.0, alpha = 0.0;
double alpha_factor, alpha_sum = 0.0, contrib_sum = 0.0;
sx1 = ((double) x - (double) dstX) * (double) srcW / dstW;
sx2 = ((double) (x + 1) - (double) dstX) * (double) srcW / dstW;
sy = sy1;
do {
float yportion;
double yportion;
if (floor_cast(sy) == floor_cast(sy1)) {
yportion = 1.0f - (sy - floor_cast(sy));
if (yportion > sy2 - sy1) {
@@ -2372,12 +2463,10 @@ void gdImageCopyResampled (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, i
} else {
yportion = 1.0f;
}
sx1 = ((float)(x - dstX)) * (float) srcW / dstW;
sx2 = ((float)(x + 1 - dstX)) * (float) srcW / dstW;
sx = sx1;
do {
float xportion;
float pcontribution;
double xportion;
double pcontribution;
int p;
if (floorf(sx) == floor_cast(sx1)) {
xportion = 1.0f - (sx - floor_cast(sx));
+76 -30
View File
@@ -11,7 +11,7 @@ extern "C" {
#define PATHSEPARATOR ":"
#else
/* default fontpath for windows systems */
#define DEFAULT_FONTPATH "c:\\winnt\\fonts;."
#define DEFAULT_FONTPATH "c:\\winnt\\fonts;c:\\windows\\fonts;."
#define PATHSEPARATOR ";"
#endif
@@ -21,8 +21,8 @@ extern "C" {
* that the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation. This software is provided "AS IS." Thomas Boutell and
* Boutell.Com, Inc. disclaim all warranties, either express or implied,
* including but not limited to implied warranties of merchantability and
* Boutell.Com, Inc. disclaim all warranties, either express or implied,
* including but not limited to implied warranties of merchantability and
* fitness for a particular purpose, with respect to this code and accompanying
* documentation. */
@@ -43,19 +43,19 @@ void php_gd_error(const char *format, ...);
/* Image type. See functions below; you will not need to change
the elements directly. Use the provided macros to
access sx, sy, the color table, and colorsTotal for
access sx, sy, the color table, and colorsTotal for
read-only purposes. */
/* If 'truecolor' is set true, the image is truecolor;
/* If 'truecolor' is set true, the image is truecolor;
pixels are represented by integers, which
must be 32 bits wide or more.
must be 32 bits wide or more.
True colors are repsented as follows:
ARGB
Where 'A' (alpha channel) occupies only the
LOWER 7 BITS of the MSB. This very small
LOWER 7 BITS of the MSB. This very small
loss of alpha channel resolution allows gd 2.x
to keep backwards compatibility by allowing
signed integers to be used to represent colors,
@@ -78,7 +78,7 @@ void php_gd_error(const char *format, ...);
#define gdEffectOverlay 3
/* This function accepts truecolor pixel values only. The
/* This function accepts truecolor pixel values only. The
source color is composited with the destination color
based on the alpha channel value of the source color.
The resulting color is opaque. */
@@ -96,11 +96,11 @@ typedef struct gdImageStruct {
int colorsTotal;
int red[gdMaxColors];
int green[gdMaxColors];
int blue[gdMaxColors];
int blue[gdMaxColors];
int open[gdMaxColors];
/* For backwards compatibility, this is set to the
first palette entry with 100% transparency,
and is also set and reset by the
and is also set and reset by the
gdImageColorTransparent function. Newer
applications can allocate palette entries
with any desired level of transparency; however,
@@ -112,7 +112,7 @@ typedef struct gdImageStruct {
int *polyInts;
int polyAllocated;
struct gdImageStruct *brush;
struct gdImageStruct *tile;
struct gdImageStruct *tile;
int brushColorMap[gdMaxColors];
int tileColorMap[gdMaxColors];
int styleLength;
@@ -126,10 +126,10 @@ typedef struct gdImageStruct {
really support multiple levels of transparency in
palettes, to my knowledge, as of 2/15/01. Most
common browsers will display 100% opaque and
100% transparent correctly, and do something
100% transparent correctly, and do something
unpredictable and/or undesirable for levels
in between. TBB */
int alpha[gdMaxColors];
int alpha[gdMaxColors];
/* Truecolor flag and pixels. New 2.0 fields appear here at the
end to minimize breakage of existing object code. */
int trueColor;
@@ -137,7 +137,7 @@ typedef struct gdImageStruct {
/* Should alpha channel be copied, or applied, each time a
pixel is drawn? This applies to truecolor images only.
No attempt is made to alpha-blend in palette images,
even if semitransparent palette entries exist.
even if semitransparent palette entries exist.
To do that, build your image as a truecolor image,
then quantize down to 8 bits. */
int alphaBlendingFlag;
@@ -147,7 +147,7 @@ typedef struct gdImageStruct {
PNG at the moment; other future formats may also
have that capability. JPEG doesn't. */
int saveAlphaFlag;
/* 2.0.12: anti-aliased globals */
int AA;
@@ -156,7 +156,7 @@ typedef struct gdImageStruct {
unsigned char **AA_opacity;
int AA_polygon;
/* Stored and pre-computed variables for determining the perpendicular
* distance from a point to the anti-aliased line being drawn:
* distance from a point to the anti-aliased line being drawn:
*/
int AAL_x1;
int AAL_y1;
@@ -230,7 +230,7 @@ gdImagePtr gdImageCreateTrueColor(int sx, int sy);
gdImagePtr gdImageCreateFromPng(FILE *fd);
gdImagePtr gdImageCreateFromPngCtx(gdIOCtxPtr in);
gdImagePtr gdImageCreateFromWBMP(FILE *inFile);
gdImagePtr gdImageCreateFromWBMPCtx(gdIOCtx *infile);
gdImagePtr gdImageCreateFromWBMPCtx(gdIOCtx *infile);
gdImagePtr gdImageCreateFromJpeg(FILE *infile);
gdImagePtr gdImageCreateFromJpegCtx(gdIOCtx *infile);
@@ -256,6 +256,7 @@ gdImagePtr gdImageCreateFromGd2Part(FILE *in, int srcx, int srcy, int w, int h);
gdImagePtr gdImageCreateFromGd2PartCtx(gdIOCtxPtr in, int srcx, int srcy, int w, int h);
gdImagePtr gdImageCreateFromXbm(FILE *fd);
void gdImageXbmCtx(gdImagePtr image, char* file_name, int fg, gdIOCtx * out);
gdImagePtr gdImageCreateFromXpm (char *filename);
@@ -263,11 +264,11 @@ void gdImageDestroy(gdImagePtr im);
/* Replaces or blends with the background depending on the
most recent call to gdImageAlphaBlending and the
alpha channel value of 'color'; default is to overwrite.
alpha channel value of 'color'; default is to overwrite.
Tiling and line styling are also implemented
here. All other gd drawing functions pass through this call,
here. All other gd drawing functions pass through this call,
allowing for many useful effects. */
void gdImageSetPixel(gdImagePtr im, int x, int y, int color);
int gdImageGetPixel(gdImagePtr im, int x, int y);
@@ -295,9 +296,9 @@ void gdImageString16(gdImagePtr im, gdFontPtr f, int x, int y, unsigned short *s
void gdImageStringUp16(gdImagePtr im, gdFontPtr f, int x, int y, unsigned short *s, int color);
/* 2.0.16: for thread-safe use of gdImageStringFT and friends,
* call this before allowing any thread to call gdImageStringFT.
* call this before allowing any thread to call gdImageStringFT.
* Otherwise it is invoked by the first thread to invoke
* gdImageStringFT, with a very small but real risk of a race condition.
* gdImageStringFT, with a very small but real risk of a race condition.
* Return 0 on success, nonzero on failure to initialize freetype.
*/
int gdFontCacheSetup(void);
@@ -320,11 +321,14 @@ typedef struct {
gdFTEX_Shift_JIS, or gdFTEX_Big5;
when not specified, maps are searched
for in the above order. */
int hdpi;
int vdpi;
}
gdFTStringExtra, *gdFTStringExtraPtr;
#define gdFTEX_LINESPACE 1
#define gdFTEX_CHARMAP 2
#define gdFTEX_RESOLUTION 4
/* These are NOT flags; set one in 'charmap' if you set the gdFTEX_CHARMAP bit in 'flags'. */
#define gdFTEX_Unicode 0
@@ -346,7 +350,7 @@ typedef struct {
void gdImagePolygon(gdImagePtr im, gdPointPtr p, int n, int c);
void gdImageFilledPolygon(gdImagePtr im, gdPointPtr p, int n, int c);
/* These functions still work with truecolor images,
/* These functions still work with truecolor images,
for which they never return error. */
int gdImageColorAllocate(gdImagePtr im, int r, int g, int b);
/* gd 2.0: palette entries with non-opaque transparency are permitted. */
@@ -403,8 +407,11 @@ void gdImageColorDeallocate(gdImagePtr im, int color);
conversion to palette is not great (for small images
it can be negative) and the quality loss is ugly. */
gdImagePtr gdImageCreatePaletteFromTrueColor (gdImagePtr im, int ditherFlag, int colorsWanted);
void gdImageTrueColorToPalette(gdImagePtr im, int ditherFlag, int colorsWanted);
/* An attempt at getting the results of gdImageTrueColorToPalette
to look a bit more like the original (im1 is the original
and im2 is the palette version */
@@ -424,10 +431,12 @@ void gdImageColorTransparent(gdImagePtr im, int color);
void gdImagePaletteCopy(gdImagePtr dst, gdImagePtr src);
void gdImagePng(gdImagePtr im, FILE *out);
void gdImagePngCtx(gdImagePtr im, gdIOCtx *out);
void gdImageGif(gdImagePtr im, FILE *out);
void gdImageGifCtx(gdImagePtr im, gdIOCtx *out);
/* 2.0.12: Compression level: 0-9 or -1, where 0 is NO COMPRESSION at all,
* 1 is FASTEST but produces larger files, 9 provides the best
* compression (smallest files) but takes a long time to compress, and
* -1 selects the default compiled into the zlib library.
* -1 selects the default compiled into the zlib library.
*/
void gdImagePngEx(gdImagePtr im, FILE * out, int level);
void gdImagePngCtxEx(gdImagePtr im, gdIOCtx * out, int level);
@@ -485,7 +494,7 @@ void gdImageEllipse(gdImagePtr im, int cx, int cy, int w, int h, int c);
gdArc and gdChord are mutually exclusive;
gdChord just connects the starting and ending
angles with a straight line, while gdArc produces
a rounded edge. gdPie is a synonym for gdArc.
a rounded edge. gdPie is a synonym for gdArc.
gdNoFill indicates that the arc or chord should be
outlined, not filled. gdEdged, used together with
gdNoFill, indicates that the beginning and ending
@@ -504,7 +513,7 @@ void gdImageFilledEllipse(gdImagePtr im, int cx, int cy, int w, int h, int color
void gdImageFillToBorder(gdImagePtr im, int x, int y, int border, int color);
void gdImageFill(gdImagePtr im, int x, int y, int color);
void gdImageCopy(gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX, int srcY, int w, int h);
void gdImageCopyMerge(gdImagePtr dst, gdImagePtr src, int dstX, int dstY,
void gdImageCopyMerge(gdImagePtr dst, gdImagePtr src, int dstX, int dstY,
int srcX, int srcY, int w, int h, int pct);
void gdImageCopyMergeGray(gdImagePtr dst, gdImagePtr src, int dstX, int dstY,
int srcX, int srcY, int w, int h, int pct);
@@ -520,8 +529,8 @@ void gdImageCopyResized(gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int
destination pixel, taking into account what portion of the
destination pixel each source pixel represents. This is a
floating point operation, but this is not a performance issue
on modern hardware, except for some embedded devices. If the
destination is a palette image, gdImageCopyResized is
on modern hardware, except for some embedded devices. If the
destination is a palette image, gdImageCopyResized is
substituted automatically. */
void gdImageCopyResampled(gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX, int srcY, int dstW, int dstH, int srcW, int srcH);
@@ -536,7 +545,7 @@ void gdImageSetTile(gdImagePtr im, gdImagePtr tile);
void gdImageSetAntiAliased(gdImagePtr im, int c);
void gdImageSetAntiAliasedDontBlend(gdImagePtr im, int c, int dont_blend);
void gdImageSetStyle(gdImagePtr im, int *style, int noOfPixels);
/* Line thickness (defaults to 1). Affects lines, ellipses,
/* Line thickness (defaults to 1). Affects lines, ellipses,
rectangles, polygons and so forth. */
void gdImageSetThickness(gdImagePtr im, int thickness);
/* On or off (1 or 0) for all three of these. */
@@ -578,10 +587,11 @@ void gdImageSaveAlpha(gdImagePtr im, int saveAlphaArg);
gdIOCtx* gdNewFileCtx(FILE*);
gdIOCtx* gdNewDynamicCtx(int, void*);
gdIOCtx *gdNewDynamicCtxEx(int size, void *data, int freeFlag);
gdIOCtx* gdNewSSCtx(gdSourcePtr in, gdSinkPtr out);
void* gdDPExtractData(struct gdIOCtx* ctx, int *size);
#define GD2_CHUNKSIZE 128
#define GD2_CHUNKSIZE 128
#define GD2_CHUNKSIZE_MIN 64
#define GD2_CHUNKSIZE_MAX 4096
@@ -590,6 +600,42 @@ void* gdDPExtractData(struct gdIOCtx* ctx, int *size);
#define GD2_FMT_RAW 1
#define GD2_FMT_COMPRESSED 2
/* filters section
*
* Negate the imag src, white becomes black,
* The red, green, and blue intensities of an image are negated.
* White becomes black, yellow becomes blue, etc.
*/
int gdImageNegate(gdImagePtr src);
/* Convert the image src to a grayscale image */
int gdImageGrayScale(gdImagePtr src);
/* Set the brightness level <brightness> for the image src */
int gdImageBrightness(gdImagePtr src, int brightness);
/* Set the contrast level <contrast> for the image <src> */
int gdImageContrast(gdImagePtr src, double contrast);
/* Simply adds or substracts respectively red, green or blue to a pixel */
int gdImageColor(gdImagePtr src, int red, int green, int blue);
/* Image convolution by a 3x3 custom matrix */
int gdImageConvolution(gdImagePtr src, float ft[3][3], float filter_div, float offset);
int gdImageEdgeDetectQuick(gdImagePtr src);
int gdImageGaussianBlur(gdImagePtr im);
int gdImageSelectiveBlur( gdImagePtr src);
int gdImageEmboss(gdImagePtr im);
int gdImageMeanRemoval(gdImagePtr im);
int gdImageSmooth(gdImagePtr im, float weight);
/* Image comparison definitions */
int gdImageCompare(gdImagePtr im1, gdImagePtr im2);
+10
View File
@@ -147,6 +147,16 @@ gdImagePtr gdImageCreateFromGd (FILE * inFile)
return im;
}
gdImagePtr gdImageCreateFromGdPtr (int size, void *data)
{
gdImagePtr im;
gdIOCtx *in = gdNewDynamicCtxEx(size, data, 0);
im = gdImageCreateFromGdCtx(in);
in->gd_free(in);
return im;
}
gdImagePtr gdImageCreateFromGdCtx (gdIOCtxPtr in)
{
int sx, sy;
+20
View File
@@ -237,6 +237,16 @@ gdImagePtr gdImageCreateFromGd2 (FILE * inFile)
return im;
}
gdImagePtr gdImageCreateFromGd2Ptr (int size, void *data)
{
gdImagePtr im;
gdIOCtx *in = gdNewDynamicCtxEx(size, data, 0);
im = gdImageCreateFromGd2Ctx(in);
in->gd_free(in);
return im;
}
gdImagePtr gdImageCreateFromGd2Ctx (gdIOCtxPtr in)
{
int sx, sy;
@@ -378,6 +388,16 @@ fail2:
return 0;
}
gdImagePtr gdImageCreateFromGd2PartPtr (int size, void *data, int srcx, int srcy, int w, int h)
{
gdImagePtr im;
gdIOCtx *in = gdNewDynamicCtxEx(size, data, 0);
im = gdImageCreateFromGd2PartCtx(in, srcx, srcy, w, h);
in->gd_free(in);
return im;
}
gdImagePtr gdImageCreateFromGd2Part (FILE * inFile, int srcx, int srcy, int w, int h)
{
gdImagePtr im;
+759
View File
@@ -0,0 +1,759 @@
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include "gd.h"
/* Code drawn from ppmtogif.c, from the pbmplus package
**
** Based on GIFENCOD by David Rowley <mgardi@watdscu.waterloo.edu>. A
** Lempel-Zim compression based on "compress".
**
** Modified by Marcel Wijkstra <wijkstra@fwi.uva.nl>
**
** Copyright (C) 1989 by Jef Poskanzer.
**
** Permission to use, copy, modify, and distribute this software and its
** documentation for any purpose and without fee is hereby granted, provided
** that the above copyright notice appear in all copies and that both that
** copyright notice and this permission notice appear in supporting
** documentation. This software is provided "as is" without express or
** implied warranty.
**
** The Graphics Interchange Format(c) is the Copyright property of
** CompuServe Incorporated. GIF(sm) is a Service Mark property of
** CompuServe Incorporated.
*/
/*
* a code_int must be able to hold 2**GIFBITS values of type int, and also -1
*/
typedef int code_int;
#ifdef SIGNED_COMPARE_SLOW
typedef unsigned long int count_int;
typedef unsigned short int count_short;
#else /*SIGNED_COMPARE_SLOW*/
typedef long int count_int;
#endif /*SIGNED_COMPARE_SLOW*/
/* 2.0.28: threadsafe */
#define maxbits GIFBITS
/* should NEVER generate this code */
#define maxmaxcode ((code_int)1 << GIFBITS)
#define HSIZE 5003 /* 80% occupancy */
#define hsize HSIZE /* Apparently invariant, left over from
compress */
typedef struct {
int Width, Height;
int curx, cury;
long CountDown;
int Pass;
int Interlace;
int n_bits; /* number of bits/code */
code_int maxcode; /* maximum code, given n_bits */
count_int htab [HSIZE];
unsigned short codetab [HSIZE];
code_int free_ent; /* first unused entry */
/*
* block compression parameters -- after all codes are used up,
* and compression rate changes, start over.
*/
int clear_flg;
int offset;
long int in_count; /* length of input */
long int out_count; /* # of codes output (for debugging) */
int g_init_bits;
gdIOCtx * g_outfile;
int ClearCode;
int EOFCode;
unsigned long cur_accum;
int cur_bits;
/*
* Number of characters so far in this 'packet'
*/
int a_count;
/*
* Define the storage for the packet accumulator
*/
char accum[ 256 ];
} GifCtx;
static int gifPutWord(int w, gdIOCtx *out);
static int colorstobpp(int colors);
static void BumpPixel (GifCtx *ctx);
static int GIFNextPixel (gdImagePtr im, GifCtx *ctx);
static void GIFEncode (gdIOCtxPtr fp, int GWidth, int GHeight, int GInterlace, int Background, int Transparent, int BitsPerPixel, int *Red, int *Green, int *Blue, gdImagePtr im);
static void compress (int init_bits, gdIOCtx *outfile, gdImagePtr im, GifCtx *ctx);
static void output (code_int code, GifCtx *ctx);
static void cl_block (GifCtx *ctx);
static void cl_hash (register count_int chsize, GifCtx *ctx);
static void char_init (GifCtx *ctx);
static void char_out (int c, GifCtx *ctx);
static void flush_char (GifCtx *ctx);
void * gdImageGifPtr (gdImagePtr im, int *size)
{
void *rv;
gdIOCtx *out = gdNewDynamicCtx (2048, NULL);
gdImageGifCtx (im, out);
rv = gdDPExtractData (out, size);
out->gd_free (out);
return rv;
}
void gdImageGif (gdImagePtr im, FILE * outFile)
{
gdIOCtx *out = gdNewFileCtx (outFile);
gdImageGifCtx (im, out);
out->gd_free (out);
}
void gdImageGifCtx(gdImagePtr im, gdIOCtxPtr out)
{
gdImagePtr pim = 0, tim = im;
int interlace, transparent, BitsPerPixel;
interlace = im->interlace;
transparent = im->transparent;
if (im->trueColor) {
/* Expensive, but the only way that produces an
acceptable result: mix down to a palette
based temporary image. */
pim = gdImageCreatePaletteFromTrueColor(im, 1, 256);
if (!pim) {
return;
}
tim = pim;
}
BitsPerPixel = colorstobpp(tim->colorsTotal);
/* All set, let's do it. */
GIFEncode(
out, tim->sx, tim->sy, interlace, 0, transparent, BitsPerPixel,
tim->red, tim->green, tim->blue, tim);
if (pim) {
/* Destroy palette based temporary image. */
gdImageDestroy( pim);
}
}
static int
colorstobpp(int colors)
{
int bpp = 0;
if ( colors <= 2 )
bpp = 1;
else if ( colors <= 4 )
bpp = 2;
else if ( colors <= 8 )
bpp = 3;
else if ( colors <= 16 )
bpp = 4;
else if ( colors <= 32 )
bpp = 5;
else if ( colors <= 64 )
bpp = 6;
else if ( colors <= 128 )
bpp = 7;
else if ( colors <= 256 )
bpp = 8;
return bpp;
}
/*****************************************************************************
*
* GIFENCODE.C - GIF Image compression interface
*
* GIFEncode( FName, GHeight, GWidth, GInterlace, Background, Transparent,
* BitsPerPixel, Red, Green, Blue, gdImagePtr )
*
*****************************************************************************/
#define TRUE 1
#define FALSE 0
/*
* Bump the 'curx' and 'cury' to point to the next pixel
*/
static void
BumpPixel(GifCtx *ctx)
{
/*
* Bump the current X position
*/
++(ctx->curx);
/*
* If we are at the end of a scan line, set curx back to the beginning
* If we are interlaced, bump the cury to the appropriate spot,
* otherwise, just increment it.
*/
if( ctx->curx == ctx->Width ) {
ctx->curx = 0;
if( !ctx->Interlace )
++(ctx->cury);
else {
switch( ctx->Pass ) {
case 0:
ctx->cury += 8;
if( ctx->cury >= ctx->Height ) {
++(ctx->Pass);
ctx->cury = 4;
}
break;
case 1:
ctx->cury += 8;
if( ctx->cury >= ctx->Height ) {
++(ctx->Pass);
ctx->cury = 2;
}
break;
case 2:
ctx->cury += 4;
if( ctx->cury >= ctx->Height ) {
++(ctx->Pass);
ctx->cury = 1;
}
break;
case 3:
ctx->cury += 2;
break;
}
}
}
}
/*
* Return the next pixel from the image
*/
static int
GIFNextPixel(gdImagePtr im, GifCtx *ctx)
{
int r;
if( ctx->CountDown == 0 )
return EOF;
--(ctx->CountDown);
r = gdImageGetPixel(im, ctx->curx, ctx->cury);
BumpPixel(ctx);
return r;
}
/* public */
static void
GIFEncode(gdIOCtxPtr fp, int GWidth, int GHeight, int GInterlace, int Background, int Transparent, int BitsPerPixel, int *Red, int *Green, int *Blue, gdImagePtr im)
{
int B;
int RWidth, RHeight;
int LeftOfs, TopOfs;
int Resolution;
int ColorMapSize;
int InitCodeSize;
int i;
GifCtx ctx;
ctx.Interlace = GInterlace;
ctx.in_count = 1;
memset(&ctx, 0, sizeof(ctx));
ColorMapSize = 1 << BitsPerPixel;
RWidth = ctx.Width = GWidth;
RHeight = ctx.Height = GHeight;
LeftOfs = TopOfs = 0;
Resolution = BitsPerPixel;
/*
* Calculate number of bits we are expecting
*/
ctx.CountDown = (long)ctx.Width * (long)ctx.Height;
/*
* Indicate which pass we are on (if interlace)
*/
ctx.Pass = 0;
/*
* The initial code size
*/
if( BitsPerPixel <= 1 )
InitCodeSize = 2;
else
InitCodeSize = BitsPerPixel;
/*
* Set up the current x and y position
*/
ctx.curx = ctx.cury = 0;
/*
* Write the Magic header
*/
gdPutBuf(Transparent < 0 ? "GIF87a" : "GIF89a", 6, fp );
/*
* Write out the screen width and height
*/
gifPutWord( RWidth, fp );
gifPutWord( RHeight, fp );
/*
* Indicate that there is a global colour map
*/
B = 0x80; /* Yes, there is a color map */
/*
* OR in the resolution
*/
B |= (Resolution - 1) << 5;
/*
* OR in the Bits per Pixel
*/
B |= (BitsPerPixel - 1);
/*
* Write it out
*/
gdPutC( B, fp );
/*
* Write out the Background colour
*/
gdPutC( Background, fp );
/*
* Byte of 0's (future expansion)
*/
gdPutC( 0, fp );
/*
* Write out the Global Colour Map
*/
for( i=0; i<ColorMapSize; ++i ) {
gdPutC( Red[i], fp );
gdPutC( Green[i], fp );
gdPutC( Blue[i], fp );
}
/*
* Write out extension for transparent colour index, if necessary.
*/
if ( Transparent >= 0 ) {
gdPutC( '!', fp );
gdPutC( 0xf9, fp );
gdPutC( 4, fp );
gdPutC( 1, fp );
gdPutC( 0, fp );
gdPutC( 0, fp );
gdPutC( (unsigned char) Transparent, fp );
gdPutC( 0, fp );
}
/*
* Write an Image separator
*/
gdPutC( ',', fp );
/*
* Write the Image header
*/
gifPutWord( LeftOfs, fp );
gifPutWord( TopOfs, fp );
gifPutWord( ctx.Width, fp );
gifPutWord( ctx.Height, fp );
/*
* Write out whether or not the image is interlaced
*/
if( ctx.Interlace )
gdPutC( 0x40, fp );
else
gdPutC( 0x00, fp );
/*
* Write out the initial code size
*/
gdPutC( InitCodeSize, fp );
/*
* Go and actually compress the data
*/
compress( InitCodeSize+1, fp, im, &ctx );
/*
* Write out a Zero-length packet (to end the series)
*/
gdPutC( 0, fp );
/*
* Write the GIF file terminator
*/
gdPutC( ';', fp );
}
/***************************************************************************
*
* GIFCOMPR.C - GIF Image compression routines
*
* Lempel-Ziv compression based on 'compress'. GIF modifications by
* David Rowley (mgardi@watdcsu.waterloo.edu)
*
***************************************************************************/
/*
* General DEFINEs
*/
#define GIFBITS 12
#ifdef NO_UCHAR
typedef char char_type;
#else /*NO_UCHAR*/
typedef unsigned char char_type;
#endif /*NO_UCHAR*/
/*
*
* GIF Image compression - modified 'compress'
*
* Based on: compress.c - File compression ala IEEE Computer, June 1984.
*
* By Authors: Spencer W. Thomas (decvax!harpo!utah-cs!utah-gr!thomas)
* Jim McKie (decvax!mcvax!jim)
* Steve Davies (decvax!vax135!petsd!peora!srd)
* Ken Turkowski (decvax!decwrl!turtlevax!ken)
* James A. Woods (decvax!ihnp4!ames!jaw)
* Joe Orost (decvax!vax135!petsd!joe)
*
*/
#include <ctype.h>
#define ARGVAL() (*++(*argv) || (--argc && *++argv))
#ifdef COMPATIBLE /* But wrong! */
# define MAXCODE(n_bits) ((code_int) 1 << (n_bits) - 1)
#else /*COMPATIBLE*/
# define MAXCODE(n_bits) (((code_int) 1 << (n_bits)) - 1)
#endif /*COMPATIBLE*/
#define HashTabOf(i) ctx->htab[i]
#define CodeTabOf(i) ctx->codetab[i]
/*
* To save much memory, we overlay the table used by compress() with those
* used by decompress(). The tab_prefix table is the same size and type
* as the codetab. The tab_suffix table needs 2**GIFBITS characters. We
* get this from the beginning of htab. The output stack uses the rest
* of htab, and contains characters. There is plenty of room for any
* possible stack (stack used to be 8000 characters).
*/
#define tab_prefixof(i) CodeTabOf(i)
#define tab_suffixof(i) ((char_type*)(htab))[i]
#define de_stack ((char_type*)&tab_suffixof((code_int)1<<GIFBITS))
/*
* compress stdin to stdout
*
* Algorithm: use open addressing double hashing (no chaining) on the
* prefix code / next character combination. We do a variant of Knuth's
* algorithm D (vol. 3, sec. 6.4) along with G. Knott's relatively-prime
* secondary probe. Here, the modular division first probe is gives way
* to a faster exclusive-or manipulation. Also do block compression with
* an adaptive reset, whereby the code table is cleared when the compression
* ratio decreases, but after the table fills. The variable-length output
* codes are re-sized at this point, and a special CLEAR code is generated
* for the decompressor. Late addition: construct the table according to
* file size for noticeable speed improvement on small files. Please direct
* questions about this implementation to ames!jaw.
*/
static void
output(code_int code, GifCtx *ctx);
static void
compress(int init_bits, gdIOCtxPtr outfile, gdImagePtr im, GifCtx *ctx)
{
register long fcode;
register code_int i /* = 0 */;
register int c;
register code_int ent;
register code_int disp;
register code_int hsize_reg;
register int hshift;
/*
* Set up the globals: g_init_bits - initial number of bits
* g_outfile - pointer to output file
*/
ctx->g_init_bits = init_bits;
ctx->g_outfile = outfile;
/*
* Set up the necessary values
*/
ctx->offset = 0;
ctx->out_count = 0;
ctx->clear_flg = 0;
ctx->in_count = 1;
ctx->maxcode = MAXCODE(ctx->n_bits = ctx->g_init_bits);
ctx->ClearCode = (1 << (init_bits - 1));
ctx->EOFCode = ctx->ClearCode + 1;
ctx->free_ent = ctx->ClearCode + 2;
char_init(ctx);
ent = GIFNextPixel( im, ctx );
hshift = 0;
for ( fcode = (long) hsize; fcode < 65536L; fcode *= 2L )
++hshift;
hshift = 8 - hshift; /* set hash code range bound */
hsize_reg = hsize;
cl_hash( (count_int) hsize_reg, ctx ); /* clear hash table */
output( (code_int)ctx->ClearCode, ctx );
#ifdef SIGNED_COMPARE_SLOW
while ( (c = GIFNextPixel( im )) != (unsigned) EOF ) {
#else /*SIGNED_COMPARE_SLOW*/
while ( (c = GIFNextPixel( im, ctx )) != EOF ) { /* } */
#endif /*SIGNED_COMPARE_SLOW*/
++(ctx->in_count);
fcode = (long) (((long) c << maxbits) + ent);
i = (((code_int)c << hshift) ^ ent); /* xor hashing */
if ( HashTabOf (i) == fcode ) {
ent = CodeTabOf (i);
continue;
} else if ( (long)HashTabOf (i) < 0 ) /* empty slot */
goto nomatch;
disp = hsize_reg - i; /* secondary hash (after G. Knott) */
if ( i == 0 )
disp = 1;
probe:
if ( (i -= disp) < 0 )
i += hsize_reg;
if ( HashTabOf (i) == fcode ) {
ent = CodeTabOf (i);
continue;
}
if ( (long)HashTabOf (i) > 0 )
goto probe;
nomatch:
output ( (code_int) ent, ctx );
++(ctx->out_count);
ent = c;
#ifdef SIGNED_COMPARE_SLOW
if ( (unsigned) ctx->free_ent < (unsigned) maxmaxcode) {
#else /*SIGNED_COMPARE_SLOW*/
if ( ctx->free_ent < maxmaxcode ) { /* } */
#endif /*SIGNED_COMPARE_SLOW*/
CodeTabOf (i) = ctx->free_ent++; /* code -> hashtable */
HashTabOf (i) = fcode;
} else
cl_block(ctx);
}
/*
* Put out the final code.
*/
output( (code_int)ent, ctx );
++(ctx->out_count);
output( (code_int) ctx->EOFCode, ctx );
}
/*****************************************************************
* TAG( output )
*
* Output the given code.
* Inputs:
* code: A n_bits-bit integer. If == -1, then EOF. This assumes
* that n_bits =< (long)wordsize - 1.
* Outputs:
* Outputs code to the file.
* Assumptions:
* Chars are 8 bits long.
* Algorithm:
* Maintain a GIFBITS character long buffer (so that 8 codes will
* fit in it exactly). Use the VAX insv instruction to insert each
* code in turn. When the buffer fills up empty it and start over.
*/
static unsigned long masks[] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000F,
0x001F, 0x003F, 0x007F, 0x00FF,
0x01FF, 0x03FF, 0x07FF, 0x0FFF,
0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF };
static void
output(code_int code, GifCtx *ctx)
{
ctx->cur_accum &= masks[ ctx->cur_bits ];
if( ctx->cur_bits > 0 )
ctx->cur_accum |= ((long)code << ctx->cur_bits);
else
ctx->cur_accum = code;
ctx->cur_bits += ctx->n_bits;
while( ctx->cur_bits >= 8 ) {
char_out( (unsigned int)(ctx->cur_accum & 0xff), ctx );
ctx->cur_accum >>= 8;
ctx->cur_bits -= 8;
}
/*
* If the next entry is going to be too big for the code size,
* then increase it, if possible.
*/
if ( ctx->free_ent > ctx->maxcode || ctx->clear_flg ) {
if( ctx->clear_flg ) {
ctx->maxcode = MAXCODE (ctx->n_bits = ctx->g_init_bits);
ctx->clear_flg = 0;
} else {
++(ctx->n_bits);
if ( ctx->n_bits == maxbits )
ctx->maxcode = maxmaxcode;
else
ctx->maxcode = MAXCODE(ctx->n_bits);
}
}
if( code == ctx->EOFCode ) {
/*
* At EOF, write the rest of the buffer.
*/
while( ctx->cur_bits > 0 ) {
char_out( (unsigned int)(ctx->cur_accum & 0xff), ctx);
ctx->cur_accum >>= 8;
ctx->cur_bits -= 8;
}
flush_char(ctx);
}
}
/*
* Clear out the hash table
*/
static void
cl_block (GifCtx *ctx) /* table clear for block compress */
{
cl_hash ( (count_int) hsize, ctx );
ctx->free_ent = ctx->ClearCode + 2;
ctx->clear_flg = 1;
output( (code_int)ctx->ClearCode, ctx);
}
static void
cl_hash(register count_int chsize, GifCtx *ctx) /* reset code table */
{
register count_int *htab_p = ctx->htab+chsize;
register long i;
register long m1 = -1;
i = chsize - 16;
do { /* might use Sys V memset(3) here */
*(htab_p-16) = m1;
*(htab_p-15) = m1;
*(htab_p-14) = m1;
*(htab_p-13) = m1;
*(htab_p-12) = m1;
*(htab_p-11) = m1;
*(htab_p-10) = m1;
*(htab_p-9) = m1;
*(htab_p-8) = m1;
*(htab_p-7) = m1;
*(htab_p-6) = m1;
*(htab_p-5) = m1;
*(htab_p-4) = m1;
*(htab_p-3) = m1;
*(htab_p-2) = m1;
*(htab_p-1) = m1;
htab_p -= 16;
} while ((i -= 16) >= 0);
for ( i += 16; i > 0; --i )
*--htab_p = m1;
}
/******************************************************************************
*
* GIF Specific routines
*
******************************************************************************/
/*
* Set up the 'byte output' routine
*/
static void
char_init(GifCtx *ctx)
{
ctx->a_count = 0;
}
/*
* Add a character to the end of the current packet, and if it is 254
* characters, flush the packet to disk.
*/
static void
char_out(int c, GifCtx *ctx)
{
ctx->accum[ ctx->a_count++ ] = c;
if( ctx->a_count >= 254 )
flush_char(ctx);
}
/*
* Flush the packet to disk, and reset the accumulator
*/
static void
flush_char(GifCtx *ctx)
{
if( ctx->a_count > 0 ) {
gdPutC( ctx->a_count, ctx->g_outfile );
gdPutBuf( ctx->accum, ctx->a_count, ctx->g_outfile );
ctx->a_count = 0;
}
}
static int gifPutWord(int w, gdIOCtx *out)
{
/* Byte order is little-endian */
gdPutC(w & 0xFF, out);
gdPutC((w >> 8) & 0xFF, out);
return 0;
}
+24 -6
View File
@@ -33,6 +33,7 @@ typedef struct dpStruct
int realSize;
int dataGood;
int pos;
int freeOK;
}
dynamicPtr;
@@ -52,7 +53,7 @@ static int appendDynamic (dynamicPtr * dp, const void *src, int size);
static int gdReallocDynamic (dynamicPtr * dp, int required);
static int trimDynamic (dynamicPtr * dp);
static void gdFreeDynamicCtx (struct gdIOCtx *ctx);
static dynamicPtr *newDynamic (int initialSize, void *data);
static dynamicPtr *newDynamic (int initialSize, void *data, int freeOKFlag);
static int dynamicPutbuf (struct gdIOCtx *, const void *, int);
static void dynamicPutchar (struct gdIOCtx *, int a);
@@ -66,6 +67,11 @@ static long dynamicTell (struct gdIOCtx *);
/* return data as a dynamic pointer */
gdIOCtx *
gdNewDynamicCtx (int initialSize, void *data)
{
return gdNewDynamicCtxEx(initialSize, data, 1);
}
gdIOCtx * gdNewDynamicCtxEx (int initialSize, void *data, int freeOKFlag)
{
dpIOCtx *ctx;
dynamicPtr *dp;
@@ -76,7 +82,7 @@ gdNewDynamicCtx (int initialSize, void *data)
return NULL;
}
dp = newDynamic (initialSize, data);
dp = newDynamic (initialSize, data, freeOKFlag);
if (!dp)
{
gdFree (ctx);
@@ -120,7 +126,7 @@ gdDPExtractData (struct gdIOCtx *ctx, int *size)
{
*size = 0;
data = NULL;
if (dp->data != NULL)
if (dp->data != NULL && dp->freeOK)
{
gdFree (dp->data);
}
@@ -177,6 +183,10 @@ dynamicSeek (struct gdIOCtx *ctx, const int pos)
bytesNeeded = pos;
if (bytesNeeded > dp->realSize)
{
/* 2.0.21 */
if (!dp->freeOK) {
return FALSE;
}
if (!gdReallocDynamic (dp, dp->realSize * 2))
{
dp->dataGood = FALSE;
@@ -199,8 +209,7 @@ dynamicSeek (struct gdIOCtx *ctx, const int pos)
}
/* return data as a dynamic pointer */
static dynamicPtr *
newDynamic (int initialSize, void *data)
static dynamicPtr * newDynamic (int initialSize, void *data, int freeOKFlag)
{
dynamicPtr *dp;
dp = (dynamicPtr *) gdMalloc (sizeof (dynamicPtr));
@@ -213,6 +222,7 @@ newDynamic (int initialSize, void *data)
return NULL;
dp->pos = 0;
dp->freeOK = freeOKFlag;
return dp;
}
@@ -348,6 +358,10 @@ appendDynamic (dynamicPtr * dp, const void *src, int size)
if (bytesNeeded > dp->realSize)
{
/* 2.0.21 */
if (!dp->freeOK) {
return FALSE;
}
if (!gdReallocDynamic (dp, bytesNeeded * 2))
{
dp->dataGood = FALSE;
@@ -407,5 +421,9 @@ gdReallocDynamic (dynamicPtr * dp, int required)
static int
trimDynamic (dynamicPtr * dp)
{
return gdReallocDynamic (dp, dp->logicalSize);
/* 2.0.21: we don't reallocate memory we don't own */
if (!dp->freeOK) {
return FALSE;
}
return gdReallocDynamic (dp, dp->logicalSize);
}
+87 -17
View File
@@ -221,8 +221,20 @@ gdImagePtr gdImageCreateFromJpeg (FILE * inFile)
return im;
}
gdImagePtr gdImageCreateFromJpegPtr (int size, void *data)
{
gdImagePtr im;
gdIOCtx *in = gdNewDynamicCtxEx(size, data, 0);
im = gdImageCreateFromJpegCtx(in);
in->gd_free(in);
return im;
}
void jpeg_gdIOCtx_src (j_decompress_ptr cinfo, gdIOCtx * infile);
static int CMYKToRGB(int c, int m, int y, int k, int inverted);
/*
* Create a gd-format image from the JPEG-format INFILE. Returns the
* image, or NULL upon error.
@@ -239,6 +251,8 @@ gdImagePtr gdImageCreateFromJpegCtx (gdIOCtx * infile)
unsigned int i, j;
int retval;
JDIMENSION nrows;
int channels = 3;
int inverted = 0;
memset (&cinfo, 0, sizeof (cinfo));
memset (&jerr, 0, sizeof (jerr));
@@ -262,6 +276,9 @@ gdImagePtr gdImageCreateFromJpegCtx (gdIOCtx * infile)
jpeg_gdIOCtx_src (&cinfo, infile);
/* 2.0.22: save the APP14 marker to check for Adobe Photoshop CMYK files with inverted components. */
jpeg_save_markers(&cinfo, JPEG_APP0 + 14, 256);
retval = jpeg_read_header (&cinfo, TRUE);
if (retval != JPEG_HEADER_OK) {
php_gd_error_ex(E_WARNING, "gd-jpeg: warning: jpeg_read_header returned %d, expected %d", retval, JPEG_HEADER_OK);
@@ -281,8 +298,14 @@ gdImagePtr gdImageCreateFromJpegCtx (gdIOCtx * infile)
goto error;
}
/* Force the image into RGB colorspace, but don't reduce the number of colors anymore (GD 2.0) */
cinfo.out_color_space = JCS_RGB;
/* 2.0.22: very basic support for reading CMYK colorspace files. Nice for
* thumbnails but there's no support for fussy adjustment of the
* assumed properties of inks and paper. */
if ((cinfo.jpeg_color_space == JCS_CMYK) || (cinfo.jpeg_color_space == JCS_YCCK)) {
cinfo.out_color_space = JCS_CMYK;
} else {
cinfo.out_color_space = JCS_RGB;
}
if (jpeg_start_decompress (&cinfo) != TRUE) {
php_gd_error("gd-jpeg: warning: jpeg_start_decompress reports suspended data source");
@@ -301,8 +324,29 @@ gdImagePtr gdImageCreateFromJpegCtx (gdIOCtx * infile)
gdImageInterlace (im, cinfo.progressive_mode != 0);
#endif
if (cinfo.output_components != 3) {
php_gd_error_ex(E_WARNING, "gd-jpeg: error: JPEG color quantization request resulted in output_components == %d (expected 3)", cinfo.output_components);
if (cinfo.out_color_space == JCS_RGB) {
if (cinfo.output_components != 3) {
php_gd_error_ex(E_WARNING, "gd-jpeg: error: JPEG color quantization request resulted in output_components == %d (expected 3 for RGB)", cinfo.output_components);
goto error;
}
channels = 3;
} else if (cinfo.out_color_space == JCS_CMYK) {
jpeg_saved_marker_ptr marker;
if (cinfo.output_components != 4) {
php_gd_error_ex(E_WARNING, "gd-jpeg: error: JPEG color quantization request resulted in output_components == %d (expected 4 for CMYK)", cinfo.output_components);
goto error;
}
channels = 4;
marker = cinfo.marker_list;
while (marker) {
if ((marker->marker == (JPEG_APP0 + 14)) && (marker->data_length >= 12) && (!strncmp((const char *) marker->data, "Adobe", 5))) {
inverted = 1;
break;
}
marker = marker->next;
}
} else {
php_gd_error_ex(E_WARNING, "gd-jpeg: error: unexpected colorspace.");
goto error;
}
@@ -311,22 +355,37 @@ gdImagePtr gdImageCreateFromJpegCtx (gdIOCtx * infile)
goto error;
#endif /* BITS_IN_JSAMPLE == 12 */
row = safe_emalloc(cinfo.output_width * 3, sizeof(JSAMPLE), 0);
memset(row, 0, cinfo.output_width * 3 * sizeof(JSAMPLE));
row = safe_emalloc(cinfo.output_width * channels, sizeof(JSAMPLE), 0);
memset(row, 0, cinfo.output_width * channels * sizeof(JSAMPLE));
rowptr[0] = row;
for (i = 0; i < cinfo.output_height; i++) {
register JSAMPROW currow = row;
register int *tpix = im->tpixels[i];
nrows = jpeg_read_scanlines (&cinfo, rowptr, 1);
if (nrows != 1) {
php_gd_error_ex(E_WARNING, "gd-jpeg: error: jpeg_read_scanlines returns %u, expected 1", nrows);
goto error;
if (cinfo.out_color_space == JCS_CMYK) {
for (i = 0; i < cinfo.output_height; i++) {
register JSAMPROW currow = row;
register int *tpix = im->tpixels[i];
nrows = jpeg_read_scanlines (&cinfo, rowptr, 1);
if (nrows != 1) {
php_gd_error_ex(E_WARNING, "gd-jpeg: error: jpeg_read_scanlines returns %u, expected 1", nrows);
goto error;
}
for (j = 0; j < cinfo.output_width; j++, currow += 4, tpix++) {
*tpix = CMYKToRGB (currow[0], currow[1], currow[2], currow[3], inverted);
}
}
for (j = 0; j < cinfo.output_width; j++, currow += 3, tpix++) {
*tpix = gdTrueColor (currow[0], currow[1], currow[2]);
} else {
for (i = 0; i < cinfo.output_height; i++) {
register JSAMPROW currow = row;
register int *tpix = im->tpixels[i];
nrows = jpeg_read_scanlines (&cinfo, rowptr, 1);
if (nrows != 1) {
php_gd_error_ex(E_WARNING, "gd-jpeg: error: jpeg_read_scanlines returns %u, expected 1", nrows);
goto error;
}
for (j = 0; j < cinfo.output_width; j++, currow += 3, tpix++) {
*tpix = gdTrueColor (currow[0], currow[1], currow[2]);
}
}
}
}
if (jpeg_finish_decompress (&cinfo) != TRUE) {
php_gd_error("gd-jpeg: warning: jpeg_finish_decompress reports suspended data source");
@@ -353,8 +412,19 @@ error:
return 0;
}
/*
/* A very basic conversion approach, TBB */
static int CMYKToRGB(int c, int m, int y, int k, int inverted)
{
if (inverted) {
c = 255 - c;
m = 255 - m;
y = 255 - y;
k = 255 - k;
}
return gdTrueColor((255 - c) * (255 - k) / 255, (255 - m) * (255 - k) / 255, (255 - y) * (255 - k) / 255);
}
/*
* gdIOCtx JPEG data sources and sinks, T. Boutell
* almost a simple global replace from T. Lane's stdio versions.
*
+8
View File
@@ -93,6 +93,14 @@ gdImagePtr gdImageCreateFromPng (FILE * inFile)
return im;
}
gdImagePtr gdImageCreateFromPngPtr (int size, void *data)
{
gdImagePtr im;
gdIOCtx *in = gdNewDynamicCtxEx(size, data, 0);
im = gdImageCreateFromPngCtx(in);
in->gd_free(in);
return im;
}
/* This routine is based in part on the Chapter 13 demo code in "PNG: The
* Definitive Guide" (http://www.cdrom.com/pub/png/pngbook.html).
+1333 -1137
View File
File diff suppressed because it is too large. Load diff
+9
View File
@@ -192,6 +192,15 @@ gdImageCreateFromWBMP (FILE * inFile)
return (im);
}
gdImagePtr gdImageCreateFromWBMPPtr (int size, void *data)
{
gdImagePtr im;
gdIOCtx *in = gdNewDynamicCtxEx(size, data, 0);
im = gdImageCreateFromWBMPCtx(in);
in->gd_free(in);
return im;
}
/* gdImageWBMP
** -----------
*/
+5
View File
@@ -4381,4 +4381,9 @@ gdFont gdFontGiantRep =
gdFontPtr gdFontGiant = &gdFontGiantRep;
gdFontPtr gdFontGetGiant(void)
{
return gdFontGiant;
}
/* This file has not been truncated. */
+1
View File
@@ -20,6 +20,7 @@ extern "C" {
#include "gd.h"
extern gdFontPtr gdFontGiant;
extern gdFontPtr gdFontGetGiant(void);
#ifdef __cplusplus
}
+5
View File
@@ -4638,4 +4638,9 @@ gdFont gdFontLargeRep =
gdFontPtr gdFontLarge = &gdFontLargeRep;
gdFontPtr gdFontGetLarge(void)
{
return gdFontLarge;
}
/* This file has not been truncated. */
+1
View File
@@ -21,6 +21,7 @@ extern "C" {
#include "gd.h"
extern gdFontPtr gdFontLarge;
extern gdFontPtr gdFontGetLarge(void);
#ifdef __cplusplus
}
+5
View File
@@ -3868,4 +3868,9 @@ gdFont gdFontMediumBoldRep =
gdFontPtr gdFontMediumBold = &gdFontMediumBoldRep;
gdFontPtr gdFontGetMediumBold(void)
{
return gdFontMediumBold;
}
/* This file has not been truncated. */
+1
View File
@@ -19,6 +19,7 @@ extern "C" {
#include "gd.h"
extern gdFontPtr gdFontMediumBold;
extern gdFontPtr gdFontGetMediumBold(void);
#ifdef __cplusplus
}
+5
View File
@@ -3868,4 +3868,9 @@ gdFont gdFontSmallRep =
gdFontPtr gdFontSmall = &gdFontSmallRep;
gdFontPtr gdFontGetSmall(void)
{
return gdFontSmall;
}
/* This file has not been truncated. */
+1
View File
@@ -19,6 +19,7 @@ extern "C" {
#include "gd.h"
extern gdFontPtr gdFontSmall;
extern gdFontPtr gdFontGetSmall(void);
#ifdef __cplusplus
}
+5
View File
@@ -2589,4 +2589,9 @@ gdFont gdFontTinyRep =
gdFontPtr gdFontTiny = &gdFontTinyRep;
gdFontPtr gdFontGetTiny(void)
{
return gdFontTiny;
}
/* This file has not been truncated. */
+1
View File
@@ -20,6 +20,7 @@ extern "C" {
#include "gd.h"
extern gdFontPtr gdFontTiny;
extern gdFontPtr gdFontGetTiny(void);
#ifdef __cplusplus
}
+30 -11
View File
@@ -62,7 +62,7 @@ gdImageStringFT (gdImage * im, int *brect, int fg, char *fontlist,
#include "gdcache.h"
#include <ft2build.h>
#include FT_FREETYPE_H
#include "freetype/ftglyph.h"
#include FT_GLYPH_H
/* number of fonts cached before least recently used is replaced */
#define FONTCACHESIZE 6
@@ -79,9 +79,9 @@ gdImageStringFT (gdImage * im, int *brect, int fg, char *fontlist,
/*
* The character (space) used to separate alternate fonts in the
* fontlist parameter to gdImageStringFT.
* fontlist parameter to gdImageStringFT. 2.0.18: space was a oor choice for this.
*/
#define LISTSEPARATOR " "
#define LISTSEPARATOR ";"
/*
* DEFAULT_FONTPATH and PATHSEPARATOR are host type dependent and
@@ -473,7 +473,7 @@ static void *fontFetch (char **error, void *key)
encoding = charmap->encoding_id;
/* EAM DEBUG - Newer versions of libfree2 make it easier by defining encodings */
#ifdef FT_ENCODING_MS_SYMBOL
#if (defined(FREETYPE_MAJOR) && ((FREETYPE_MAJOR == 2 && ((FREETYPE_MINOR == 1 && FREETYPE_PATCH >= 3) || FREETYPE_MINOR > 1) || FREETYPE_MAJOR > 2)))
if (charmap->encoding == FT_ENCODING_MS_SYMBOL
|| charmap->encoding == FT_ENCODING_ADOBE_CUSTOM
|| charmap->encoding == FT_ENCODING_ADOBE_STANDARD) {
@@ -482,7 +482,7 @@ static void *fontFetch (char **error, void *key)
a->face->charmap = charmap;
return (void *)a;
}
#endif /* FT_ENCODING_MS_SYMBOL */
#endif /* Freetype 2.1.3 or better */
/* EAM DEBUG */
if ((platform == 3 && encoding == 1) /* Windows Unicode */
@@ -777,6 +777,11 @@ void gdFontCacheShutdown()
FT_Done_FreeType(library);
}
}
void gdFreeFontCache()
{
gdFontCacheShutdown();
}
int gdFontCacheSetup(void)
{
@@ -838,6 +843,8 @@ gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist, double ptsi
* colorindexes. -- 27.06.2001 <krisku@arrak.fi>
*/
gdCache_head_t *tc_cache;
/* Tuneable horizontal and vertical resolution in dots per inch */
int hdpi, vdpi;
if (strex && ((strex->flags & gdFTEX_LINESPACE) == gdFTEX_LINESPACE)) {
linespace = strex->linespacing;
@@ -867,7 +874,19 @@ gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist, double ptsi
face = font->face; /* shortcut */
slot = face->glyph; /* shortcut */
if (FT_Set_Char_Size (face, 0, (FT_F26Dot6) (ptsize * 64), GD_RESOLUTION, GD_RESOLUTION)) {
/*
* Added hdpi and vdpi to support images at non-screen resolutions, i.e. 300 dpi TIFF,
* or 100h x 50v dpi FAX format. 2.0.23.
* 2004/02/27 Mark Shackelford, mark.shackelford@acs-inc.com
*/
hdpi = GD_RESOLUTION;
vdpi = GD_RESOLUTION;
if (strex && (strex->flags & gdFTEX_RESOLUTION)) {
hdpi = strex->hdpi;
vdpi = strex->vdpi;
}
if (FT_Set_Char_Size(face, 0, (FT_F26Dot6) (ptsize * 64), hdpi, vdpi)) {
gdCacheDelete(tc_cache);
gdMutexUnlock(gdFontCacheMutex);
return "Could not set character size";
@@ -939,7 +958,6 @@ gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist, double ptsi
while (*next) {
ch = *next;
/* carriage returns */
if (ch == '\r') {
penf.x = 0;
@@ -965,17 +983,18 @@ gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist, double ptsi
}
/* EAM DEBUG */
#ifdef FT_ENCODING_MS_SYMBOL
if (font->face->charmap->encoding == FT_ENCODING_MS_SYMBOL) {
#if (defined(FREETYPE_MAJOR) && ((FREETYPE_MAJOR == 2 && ((FREETYPE_MINOR == 1 && FREETYPE_PATCH >= 3) || FREETYPE_MINOR > 1) || FREETYPE_MAJOR > 2)))
if (font->face->charmap->encoding == FT_ENCODING_MS_SYMBOL && strcmp(font->face->family_name, "Symbol") == 0) {
/* I do not know the significance of the constant 0xf000.
* It was determined by inspection of the character codes
* stored in Microsoft font symbol.
*/
/* Convert to the Symbol glyph range only for a Symbol family member */
len = gdTcl_UtfToUniChar (next, &ch);
ch |= 0xf000;
next += len;
} else
#endif /* FT_ENCODING_MS_SYMBOL */
#endif /* Freetype 2.1 or better */
/* EAM DEBUG */
switch (m) {
@@ -1041,7 +1060,7 @@ gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist, double ptsi
FT_Set_Transform(face, &matrix, NULL);
/* Convert character code to glyph index */
glyph_index = FT_Get_Char_Index(face, ch);
/* retrieve kerning distance and move pen position */
if (use_kerning && previous && glyph_index) {
FT_Get_Kerning(face, previous, glyph_index, ft_kerning_default, &delta);
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
gdimagefill() function (Bug #19366 (fixed in bundled libgd))
Bug #19366 (gdimagefill() function crashes (fixed in bundled libgd))
--SKIPIF--
<?php
if (!extension_loaded('gd')) die("skip gd extension not available\n");
+1 -1
View File
@@ -11,7 +11,7 @@ Bug #22544 (TrueColor transparency in PNG images).
?>
--FILE--
<?php
$dest = dirname(realpath(__FILE__)) . 'bug22544.png';
$dest = dirname(realpath(__FILE__)) . '/bug22544.png';
@unlink($dest);
$image = imageCreateTruecolor(640, 100);
$transparent = imageColorAllocate($image, 0, 0, 0);
+1 -1
View File
@@ -11,7 +11,7 @@ Bug #24155 (gdImageRotate270 rotation problem).
?>
--FILE--
<?php
$dest = dirname(realpath(__FILE__)) . 'bug24155.png';
$dest = dirname(realpath(__FILE__)) . '/bug24155.png';
@unlink($dest);
$im = imagecreatetruecolor(30, 50);
+24
View File
@@ -0,0 +1,24 @@
--TEST--
Bug #27582 (ImageFillToBorder() on alphablending image looses alpha on fill color)
--SKIPIF--
<?php
if (!extension_loaded('gd')) die("skip gd extension not available\n");
if (!GD_BUNDLED) die('skip external GD libraries always fail');
?>
--FILE--
<?php
/* $id$ */
$dest = dirname(realpath(__FILE__)) . '/bug27582.png';
@unlink($dest);
$im = ImageCreateTrueColor(10, 10);
imagealphablending($im, true);
imagesavealpha($im, false);
$bordercolor=ImageColorAllocateAlpha($im, 0, 0, 0, 2);
$color = ImageColorAllocateAlpha($im, 0, 0, 0, 1);
ImageFillToBorder($im, 5, 5, $bordercolor, $color);
imagepng($im, $dest);
echo md5_file($dest) . "\n";
@unlink($dest);
?>
--EXPECT--
08287f8f5d406946009df5f04ca83dc0
+27
View File
@@ -0,0 +1,27 @@
--TEST--
Bug #28147 (Crash with anti-aliased line)
--SKIPIF--
<?php
if (!extension_loaded('gd')) die("skip gd extension not available\n");
if (!GD_BUNDLED) die('skip external GD libraries always fail');
?>
--FILE--
<?php
//
// This script will generate a Seg Fault on Linux
//
$im = imagecreatetruecolor(300, 300);
$w = imagecolorallocate($im, 255, 255, 255);
$red = imagecolorallocate($im, 255, 0, 0);
imagefilledrectangle($im,0,0,299,299,$w);
imageantialias($im,true);
imageline($im, 299, 299, 0, 299, $red);
imagedestroy($im);
echo "Alive\n";
?>
--EXPECT--
Alive
Loaded 100 of 570 files, more files were not shown because too many files have changed in this diff. Show more