Compare commits

...
269 Commits
Author SHA1 Message Date
SVN Migration 674328d1fa This commit was manufactured by cvs2svn to create tag 'php_4_1_2'. 2002-02-27 09:06:34 +00:00
Zeev Suraski ef03277c51 Go with 4.1.2 2002-02-27 09:06:33 +00:00
Derick Rethans 02cc197a77 - Bring error message back 2002-02-26 19:32:52 +00:00
Rasmus Lerdorf 253b53296c There are no fdf changes in this branch as far as I can see. Not
sure where this NEWS item came from.
2002-02-26 18:01:37 +00:00
Rasmus Lerdorf 40796e5be2 Remove gd NEWS item 2002-02-26 17:55:33 +00:00
Rasmus Lerdorf bcdbc527b6 This line makes no sense to me 2002-02-26 17:52:36 +00:00
Zeev Suraski 7e5fd5048a Beautify 2002-02-26 17:46:15 +00:00
Yasuo Ohgaki 2da6392297 Fix pspell function entry 2002-02-25 23:00:11 +00:00
Yasuo Ohgaki 5ead13b0d7 Add news for mm save handler and multiple SAPI start up problem fix 2002-02-25 00:25:07 +00:00
Yasuo Ohgaki e0108f79e1 MFH
- Fixed CGI (or other SAPI) start up failure when mm save handler is used
# More fixes will be merged when I commit session & output control patch
2002-02-25 00:21:14 +00:00
Rui Hirokawa d28453af34 NEWS updated. 2002-02-23 08:36:11 +00:00
Rui Hirokawa bb369d7f91 - fixed configuration problem as shared extension for fdf.
- fixed configuration problem as shared extension for gd with freetype1.
- default output encoding of mbstring changed to pass to fix initialization problem.
2002-02-23 02:01:41 +00:00
Rasmus Lerdorf f8159f4f20 Keep track of what has gone into 4.1.2 so far 2002-02-22 18:00:22 +00:00
Yasuo Ohgaki f7a54490c0 Fix crash bug. 4th parameter is not incremental value, but it's assigned.
# Are we going to have 4.1.2?
2002-02-22 15:01:20 +00:00
Stefan Esser d1336b2fce fixing boundary check before someone other does it... 2002-02-21 18:46:45 +00:00
Yasuo Ohgaki cfe1d84628 MFH 2002-02-03 00:38:00 +00:00
Stefan Esser 882415354a MFH: fix for bug #14776 2002-01-14 13:43:03 +00:00
Yasuo Ohgaki c4f239e6ab Revert last commit 2002-01-10 08:48:23 +00:00
Yasuo Ohgaki 3ea732bb4f MFH 2002-01-10 06:15:46 +00:00
Yasuo Ohgaki f4a3603d48 MFH.
Bugs 10530,10656,14784
2002-01-09 08:40:13 +00:00
Yasuo Ohgaki 2da3aa1e3c MFH
# Disable bogus error message when external session save handler
# (mm, msession, pgsql) is specified in php.ini.
# This is not a real fix, but a tmp workaround.
2002-01-07 08:20:08 +00:00
Yasuo Ohgaki debfb9626c Fix crash (MFH) 2001-12-30 01:44:17 +00:00
Markus Fischer 647ecadc0e - MFH fix for crash in get_defined_constants(). 2001-12-27 01:10:08 +00:00
Derick Rethans 3256f775cd - MFH for bug 14690 2001-12-26 10:36:11 +00:00
Derick Rethans e5f7ed8d21 - MFH: Remove redundant code 2001-12-25 16:35:41 +00:00
Derick Rethans 1e5919277c - Fix for bug 14691: Invalidate mcrypt resource if the key size is 0 2001-12-25 16:31:44 +00:00
Derick Rethans 5385e1f258 - Last fixes to NEWS 2001-12-23 01:27:41 +00:00
Zeev Suraski 0f958cdf3b Update NEWS 2001-12-22 03:14:18 +00:00
Zeev Suraski e835de81f2 MFH 2001-12-22 03:12:37 +00:00
Derick Rethans 05fc73701f - More cleanup 2001-12-21 13:31:57 +00:00
Derick Rethans e28724787b - Typo 2001-12-21 13:20:54 +00:00
Derick Rethans 0e5b273b0f Go with 4.1.1 2001-12-20 21:18:34 +00:00
Derick Rethans 7e15bdcb58 Make it look purty 2001-12-17 21:41:09 +00:00
Derick Rethans 25fa7f7411 MFH 2001-12-17 21:19:51 +00:00
Derick Rethans adffaad9f4 MFH backward compability issues with libmcrypt 2001-12-17 20:23:38 +00:00
Stefan Esser e2fb9282aa fixed: fix for my broken patch 2001-12-16 23:20:07 +00:00
Derick Rethans f04e7b251c - More MHFs 2001-12-16 22:41:36 +00:00
Derick Rethans dfa94d4b9f Update NEWS 2001-12-16 22:32:42 +00:00
Stefan Esser 2fdac23dfb whitespace. 2001-12-16 21:46:20 +00:00
Stefan Esser 86bb6388c0 MFH : one byte heap corruption fixed 2001-12-16 21:41:25 +00:00
Derick Rethans 0215d17907 Make this compile again 2001-12-16 19:06:20 +00:00
Stefan Esser 2c25be52f4 MFH : fixed bufferoverflow in sapi_add_header_ex 2001-12-16 16:09:04 +00:00
Derick Rethans b337bf3f97 MFH for bug #14??? (pow() thing) 2001-12-16 11:05:28 +00:00
Derick Rethans f63dd3cc7e - MFH for bug 14162 2001-12-15 13:19:37 +00:00
Markus Fischer bb31b98137 - MFH fix for possible crash in xslt_set_scheme_handlers() with
invalid handler names.
2001-12-15 13:08:24 +00:00
Derick Rethans a686d91177 - MFH crash bug fix in xslt_error 2001-12-15 12:30:24 +00:00
Sebastian Bergmann 34f95edd9b Change version to 4.1.1-dev. 2001-12-14 12:23:49 +00:00
Markus Fischer f5ce52c8f1 - MFH bug fixes. 2001-12-14 10:45:46 +00:00
Vlad Krupin 6a92f0dcc5 MFH 2001-12-14 10:21:04 +00:00
Sterling Hughes 0d46db0ded the datetime.c fixes 2001-12-14 10:14:16 +00:00
Sterling Hughes 5ba92f6b53 MFH'ed::
use zval macro's (not exactly necessary, but not harmful).
    jmoore's fix for timezones.
2001-12-14 10:08:43 +00:00
Sterling Hughes 6b13a53a20 Derick MFH'ed 2001-12-14 10:03:42 +00:00
Derick Rethans 31be1c0ce1 - Remove debug crap 2001-12-13 21:11:32 +00:00
Derick Rethans 605e8a0502 - MFH for bugs 10324, 12777, 14488, 13399 and probably 13239 2001-12-13 21:04:57 +00:00
Sterling Hughes a9914c9a99 Fix mcrypt compile on systems that don't have mcrypt 2001-12-13 16:23:59 +00:00
Sterling Hughes 52a26baead MFH 2001-12-13 13:51:42 +00:00
Sterling Hughes e152dd3cee MFH timezone fix 2001-12-13 12:17:32 +00:00
Zeev Suraski cbce251dab Go with 4.1.0 2001-12-10 15:21:43 +00:00
Zeev Suraski c939250414 Go with 4.1.0 2001-12-09 23:02:07 +00:00
Zeev Suraski a36c434dbb MFH - fix unbuffered queries 2001-12-09 13:53:56 +00:00
Thies C. Arntzen 8e46600166 fix #13801 (imap_rfc822_parse_adrlist changes arg1) 2001-12-07 16:47:59 +00:00
Derick Rethans d07a60c3d0 - MFH for the session fix 2001-12-06 14:23:29 +00:00
Zeev Suraski 0858af07ec Here we go again 2001-12-03 10:56:13 +00:00
Sterling Hughes a096235f8f MFH 2001-12-03 09:26:02 +00:00
Sterling Hughes 8244f0f628 No need to create this, automatically done (automagically even) by
call_user_function_ex()
2001-12-03 08:12:18 +00:00
SVN Migration 3cdc24790e This commit was manufactured by cvs2svn to create branch 'PHP_4_0_7'. 2001-12-02 21:17:56 +00:00
Thies C. Arntzen 80df8e6b0a MFH
fix for $_SESSION
!!! please TEST, TEST, TEST !!!
2001-12-02 12:21:54 +00:00
Thies C. Arntzen b228115b64 fix problem when __sleep() returned non-existant variables 2001-12-01 15:22:24 +00:00
Stig Venaas cdedea01c1 Fixing ldap_first/next_attribute() 2001-12-01 14:17:43 +00:00
Thies C. Arntzen c0e263c1a1 MFH - make sockets extension usable 2001-11-30 18:18:01 +00:00
Zeev Suraski 91889eeb93 go with RC4 2001-11-30 14:44:56 +00:00
Sterling Hughes 5c74aa0f0f Cleanup the function entries a tidbit 2001-11-30 09:04:49 +00:00
Zeev Suraski 501aa09789 Prepare 4.1.0 2001-11-25 22:47:50 +00:00
Rui Hirokawa 16d5e9f108 restriction is relaxed because output handler couldn't be used even if zlib.output_compression is set to off. 2001-11-23 02:37:27 +00:00
Derick Rethans 195a756477 - MFH crash bug in shm_remove (not critical enough to include in the release,
but critical enough to MFH)
2001-11-22 14:35:55 +00:00
Derick Rethans 09fb81a8f3 - MFH for crash bug #14169
#- IMO, this should be included in the release. The fix has little impact
#  on the release in a whole.
2001-11-22 07:49:46 +00:00
Sebastian Bergmann 21ff8ec819 MFH (Remove sablot from php_modules.dsw, its no longer in repository) 2001-11-20 18:18:57 +00:00
Sterling Hughes 6d1374480e Temporary fix not for the HEAD branch, this is the only way to avoid the
segfault and *really* not fuck up the release cycle
2001-11-20 11:55:34 +00:00
Sterling Hughes 7e33f0b17b MFH latest cURL fixes, these are tested and important 2001-11-20 11:32:50 +00:00
Zeev Suraski 0be29a4861 Go with final RC 2001-11-19 20:53:26 +00:00
Derick Rethans bcf3204bd3 - Add bugfix 2001-11-19 15:19:39 +00:00
Zeev Suraski dee465139f MFH 2001-11-19 15:00:42 +00:00
foobar f5b7714238 MFH 2001-11-19 00:52:02 +00:00
foobar 747258e34f MFH 2001-11-18 23:54:57 +00:00
Derick Rethans 66c1d632c1 - Fix typo 2001-11-18 13:52:08 +00:00
Derick Rethans b9d6136a28 - Updated NEWS to reflect removal of ext/sablotron 2001-11-18 13:50:56 +00:00
Sterling Hughes aaa9baa57f Remove the sablotron extension from the release branch 2001-11-18 13:27:32 +00:00
Derick Rethans 549164e1fe - MFH (fix build under FreeBSD) 2001-11-18 12:02:34 +00:00
foobar 36f572a5b9 Some typos.. 2001-11-18 03:11:06 +00:00
Andrei Zmievski 2a985b94e0 MFH 2001-11-18 01:23:14 +00:00
Derick Rethans 3f783ff20b - MFH 2001-11-18 00:33:19 +00:00
Zeev Suraski 43a661c2ac MFH 2001-11-17 21:15:57 +00:00
Rasmus Lerdorf 958a5a1311 MFH
(I wish people would stop committing whitespace fixes to code that has
 been around forever.  It really makes merging and checking diffs a pain
 in the ass as real changes end up hidden within a sea of useless
 whitespace fixes)
2001-11-16 12:02:30 +00:00
Derick Rethans 0aca2443d7 - MFH name change
#- This is to minimize BBC
2001-11-15 07:28:35 +00:00
Stig Bakken 032765f467 * install Archive_Tar 2001-11-14 15:01:37 +00:00
Christian Stocker ef3912a195 adding PEAR/Registry.php 2001-11-14 09:54:46 +00:00
Christian Stocker 0a862aff6f checking if package.xml.gz exists, before checking if it's writeable 2001-11-14 09:20:49 +00:00
foobar 38cd9d70d5 Added missing .cvsignore files and added *.reg into pear/tests/.cvsignore 2001-11-13 14:01:03 +00:00
Rasmus Lerdorf 5031e0dab8 MFH 2001-11-13 13:54:20 +00:00
Rasmus Lerdorf 40b988316b MFH 2001-11-13 13:13:26 +00:00
Rasmus Lerdorf bca8ddd083 Let's just use the quicktester from HEAD since it seems to work and the
one in this branch is quite broken.  Still plenty of failing tests we need
to work through here.
2001-11-13 12:57:26 +00:00
foobar 6d47a2d60f Partial MFH. 2001-11-13 12:42:11 +00:00
Rasmus Lerdorf 96c421553f MFH 2001-11-13 12:39:35 +00:00
foobar 30f0fa9262 MFH 2001-11-13 12:21:03 +00:00
foobar 2a1ac78a9d MFH 2001-11-13 12:07:25 +00:00
foobar 6b702ced00 MFH (the use of strings for locale setting is deprecated) 2001-11-13 11:54:13 +00:00
Derick Rethans edc32c8faa - Check for cURL >= 7.8.1 2001-11-13 11:53:01 +00:00
Zeev Suraski 18e7796470 Fix name 2001-11-13 11:48:28 +00:00
Zeev Suraski 4e7c35b1e2 Improve OpenSSL compatibility 2001-11-13 11:46:33 +00:00
foobar 5d1e3b81d4 MFH 2001-11-13 11:38:56 +00:00
James Moore e8a7dbe010 Lets cast this explicitly. 2001-11-13 11:27:42 +00:00
Derick Rethans d205634a58 - Fixed scheme/sax handlers (patch by Lenar Lõhmus <lenar@vision.ee>) 2001-11-13 09:53:18 +00:00
Derick Rethans 91f27074fc - MFH 2001-11-13 08:19:43 +00:00
Zeev Suraski c3a83e4c12 Go with RC2 2001-11-13 01:40:17 +00:00
Stig Bakken 989fc05c1c MFH: pear updates 2001-11-13 01:26:54 +00:00
Zeev Suraski 63f504192e MFH - SSL fixes 2001-11-13 01:15:51 +00:00
SVN Migration 07156d5fc5 This commit was manufactured by cvs2svn to create branch 'PHP_4_0_7'. 2001-11-13 01:06:49 +00:00
James Moore dd96ef8151 MFH 2001-11-13 00:00:18 +00:00
foobar f467121516 MFH 2001-11-12 23:16:00 +00:00
Rui Hirokawa 27592372cc fixed output problem with output buffering handler. 2001-11-12 14:52:17 +00:00
Rui Hirokawa b73a2081ab fixed a bug in http input processing patched by Yasuo Ohgaki. 2001-11-12 14:51:39 +00:00
Daniel Beulshausen 2b85be3c48 MFH latest changes 2001-11-12 10:52:16 +00:00
Stanislav Malyshev 87166f6978 MFH: Fix crash bug on malformed .ini file 2001-11-11 12:44:00 +00:00
Zeev Suraski cab6cfa680 MFH output buffering fixes 2001-11-11 09:03:47 +00:00
Rasmus Lerdorf 3c2de4ce6f MFH 2001-11-11 00:08:33 +00:00
Andrei Zmievski 896cf60aff MFH 2001-11-10 23:58:40 +00:00
Andrei Zmievski 2c7191b5ce Added crash fix news. 2001-11-10 23:56:16 +00:00
Andrei Zmievski 896e2e810d MFH 2001-11-10 23:50:53 +00:00
Derick Rethans 1a3f3309a5 - MFH (Bug #13918) 2001-11-03 21:26:27 +00:00
Christian Stocker 1bc5e9ffc4 typo 2001-11-02 17:56:20 +00:00
foobar 33e4ade668 MFH 2001-11-02 14:34:23 +00:00
foobar 2e8fc85965 MFH 2001-11-02 01:39:30 +00:00
foobar 4a04971bed MFH 2001-11-02 01:09:09 +00:00
foobar cd9e4f37a2 MFH 2001-10-30 23:22:52 +00:00
foobar 8a58067dd5 MFH 2001-10-29 16:45:38 +00:00
Derick Rethans 84f1093658 - MFH for bug fix of #9640 and #13789 2001-10-27 17:56:20 +00:00
foobar 1103c8306f MFH 2001-10-27 06:28:44 +00:00
Thies C. Arntzen 7755c18735 fix compile 2001-10-25 07:10:58 +00:00
foobar 19f20337f4 MFH 2001-10-24 10:43:26 +00:00
foobar 684c1fefc3 MFH 2001-10-23 11:18:48 +00:00
Zeev Suraski 45e8587fa3 MFH 2001-10-23 01:19:59 +00:00
Jeroen van Wolffelaar 120e9fa63f MFH (math tests pass now - at least on my system) 2001-10-22 09:46:23 +00:00
SVN Migration 8b4d5cefea This commit was manufactured by cvs2svn to create branch 'PHP_4_0_7'. 2001-10-22 09:44:28 +00:00
foobar f10d1f8f01 MFH 2001-10-22 02:36:04 +00:00
foobar 740073c795 MFH 2001-10-22 02:30:42 +00:00
Rasmus Lerdorf 8e0cad5b50 MFH 2001-10-21 17:59:35 +00:00
Sterling Hughes 040e59eb6d fix zts build 2001-10-21 17:17:18 +00:00
foobar e75fa38d9d MFH 2001-10-21 03:06:18 +00:00
Rasmus Lerdorf 0a1c75a106 MFH 2001-10-21 00:20:44 +00:00
Rasmus Lerdorf b9f4c04888 MFH
(oops, should have been in one commit)
2001-10-21 00:17:17 +00:00
Derick Rethans 49beadaa03 - MFH for bug #13413 2001-10-20 10:59:29 +00:00
Edin Kadribasic 2eee05cb5d Fixed last argument in strlcat() call. 2001-10-19 18:09:21 +00:00
Derick Rethans f5a5a7e518 - Fix for bug #13760 2001-10-19 17:59:24 +00:00
Edin Kadribasic 43f418accd Merged change strncpy=>strlcpy; strncat=>strlcat into the release brach. 2001-10-19 15:57:17 +00:00
Derick Rethans 725100424b - Fix bug in detecting libexpat with the sablotron extension 2001-10-19 09:22:13 +00:00
Derick Rethans 9261ba3e70 - MFH 2001-10-19 08:04:24 +00:00
Stig Bakken 73b91a7d8f * another update 2001-10-19 05:13:09 +00:00
Stig Bakken 0cb64cb8b6 * update NEWS file 2001-10-18 23:32:40 +00:00
Harald Radi 854223474e MFH 2001-10-18 08:26:45 +00:00
Stig Bakken 7c93ef371b MFH 2001-10-17 15:32:56 +00:00
Edin Kadribasic fa6a7710ca Meged fix for bug #13083 into the release branch. 2001-10-16 08:55:30 +00:00
Stig Bakken aaec7c8c2b * fix version number 2001-10-16 00:07:57 +00:00
Stig Bakken cde2734237 MFH 2001-10-15 19:37:45 +00:00
Stig Bakken b892e3c8f8 MFH 2001-10-14 07:19:09 +00:00
SVN Migration 031ce49972 This commit was manufactured by cvs2svn to create branch 'PHP_4_0_7'. 2001-10-13 06:22:10 +00:00
Stig Bakken b32cdd7637 MFH 2001-10-12 11:56:37 +00:00
Thies C. Arntzen 017856111c MFH 2001-10-12 08:02:42 +00:00
foobar 6994c80835 MFH 2001-10-12 00:22:38 +00:00
Stig Bakken 69f304f0ac MFH 2001-10-11 23:55:49 +00:00
Stig Bakken bd561b7f57 MFH: phpVersionIs -> version_compare 2001-10-11 22:28:26 +00:00
Stig Bakken 8aa81d5045 MFH: add versioning files 2001-10-11 19:05:52 +00:00
Stig Bakken 051623a43c MFH 2001-10-11 15:00:48 +00:00
Stig Bakken bdd9c56790 * add note about version_compare() 2001-10-11 10:46:04 +00:00
Stig Bakken bb5c3b8bcc MFH 2001-10-11 10:40:14 +00:00
Stig Bakken e1285b4f3c MFH 2001-10-11 10:31:12 +00:00
Stig Bakken 8bc67a4ec1 MFH: versioning test 2001-10-11 01:13:51 +00:00
Stig Bakken 444ec0f591 MFH 2001-10-11 01:03:27 +00:00
Stig Bakken cc9c4064ab MFH test fix 2001-10-11 00:46:34 +00:00
Stig Bakken 709a8d3a0d MFH: version_compare & friends 2001-10-10 22:23:16 +00:00
SVN Migration 3a4b329cc3 This commit was manufactured by cvs2svn to create branch 'PHP_4_0_7'. 2001-10-10 10:14:52 +00:00
Stig Bakken a3084031b1 * include the PEAR version of usefulinc's xmlrpc library in this release
too, with security fix (in case people overwrite their old installation)
2001-10-09 22:58:09 +00:00
Stig Bakken ce2a30427b MFH 2001-10-09 22:54:11 +00:00
SVN Migration af10fc656d This commit was manufactured by cvs2svn to create branch 'PHP_4_0_7'. 2001-10-06 23:22:38 +00:00
Harald Radi 5fd3346aac typo
TRUE -> FALSE
2001-10-06 10:39:57 +00:00
Harald Radi 5091a18158 MFH
fixed boolean -1 vs. 1 conflict
2001-10-05 09:49:45 +00:00
Derick Rethans 3c7529f4b8 MFH
# (thought this already has been done)
2001-10-04 06:42:45 +00:00
Rasmus Lerdorf 8c98829721 MFH 2001-10-04 06:24:13 +00:00
Derick Rethans 04d2d6b3bc - Fix build 2001-10-04 05:34:09 +00:00
Hartmut Holzgraefe 41b3015125 MFH 2001-10-01 12:51:12 +00:00
Rasmus Lerdorf 42b7601378 MFH 2001-09-30 04:43:19 +00:00
Jon Parise 86c32174be Build pear/scripts/phptar in the configure run. 2001-09-29 17:57:37 +00:00
Rasmus Lerdorf c5bf17f0a5 MFH 2001-09-27 07:39:24 +00:00
Zeev Suraski 730359dc4d MFH the list of 4.0.7 changes 2001-09-26 21:56:23 +00:00
Zeev Suraski 4053948470 MFH 2001-09-26 21:47:18 +00:00
Harald Radi 333ce2d050 changed flags 2001-09-25 16:29:45 +00:00
Andi Gutmans a84618a3de - MFH. File uploads need to be tested thoroughly in RC3! 2001-09-24 17:48:22 +00:00
Wez Furlong eff475de14 MFH 2001-09-20 15:05:37 +00:00
Joey Smith 7114dae40d MFH, Close bug #13322 2001-09-19 02:35:49 +00:00
Daniel Beulshausen ec9bda9e5c MFH 2001-09-17 13:43:15 +00:00
Daniel Beulshausen 74dbaf655b MFH 2001-09-17 13:21:58 +00:00
Daniel Beulshausen 137b57c5ba MFH 2001-09-17 12:23:43 +00:00
Thies C. Arntzen 6d00133ce2 fixed memory_peak reporting 2001-09-16 15:49:55 +00:00
Sascha Schumann 087fd4c609 this is not pure rc2 anymore 2001-09-13 21:52:40 +00:00
Sascha Schumann 1b740da6d4 MFH.. necessary fix 2001-09-13 21:41:30 +00:00
Jason Greene 0d3ce62b63 Merge recent socket fixes 2001-09-11 16:08:28 +00:00
Sascha Schumann d90cd52b89 MFH 2001-09-10 11:24:18 +00:00
Harald Radi 973dbce2b9 MFH 2001-09-10 09:28:55 +00:00
Sascha Schumann f51c000bac MFH 2001-09-09 14:53:38 +00:00
Sterling Hughes 39812d33f7 ws fix 2001-09-09 09:48:16 +00:00
Sterling Hughes 2e9991865e MFH 2001-09-09 09:45:10 +00:00
Harald Radi 016ac5d400 MFH 2001-09-08 21:02:35 +00:00
Sterling Hughes bf344046b3 add proto 2001-09-07 11:35:44 +00:00
Sterling Hughes 26a5bb3fc7 MFH 2001-09-07 10:47:44 +00:00
Derick Rethans c117b30950 - MFH (Fix for bug 13052) 2001-09-07 07:51:06 +00:00
Rasmus Lerdorf b7a1b19734 MFH 2001-09-07 06:44:21 +00:00
foobar 3ba574871c MFH 2001-09-07 00:28:28 +00:00
Zeev Suraski 6122d87789 Go with RC2 2001-09-06 23:17:05 +00:00
Rasmus Lerdorf 8dffa18aec Interbase fixes 2001-09-05 15:41:45 +00:00
Stanislav Malyshev f51e3d044a MFH 2001-09-04 14:12:11 +00:00
Rasmus Lerdorf 6cc67717b1 MFH 2001-09-03 19:08:49 +00:00
Zeev Suraski 30812e3707 MFH 2001-09-01 14:57:32 +00:00
Zeev Suraski 0550e954e0 MFH 2001-09-01 01:45:51 +00:00
Zeev Suraski 73941736ca Fix TSRM.dsp's line endings (was causing trouble if used with tools that
didn't have auto-conversion of line endings)
2001-08-30 18:08:29 +00:00
foobar 80754851bd MFH 2001-08-30 16:30:14 +00:00
Joey Smith 2ae1766c1c MFH 2001-08-29 22:26:53 +00:00
Wez Furlong 96462f90a0 MFH 2001-08-29 11:33:06 +00:00
Wez Furlong c4cc49f487 MFH 2001-08-28 22:19:52 +00:00
Rasmus Lerdorf 07b4a21631 MFH 2001-08-28 21:52:38 +00:00
Stig Bakken 9c30514661 * MFH: Archive_Tar is no longer experimental 2001-08-28 12:27:27 +00:00
Stig Bakken a9d8aa7e08 * MFH: Log/Observer.php rename fix 2001-08-28 12:12:24 +00:00
Stig Bakken 28caf732a7 * MFH PEAR stuff
* copied in Archive_Tar class from pear/Archive_Tar
2001-08-28 11:41:13 +00:00
Andrei Zmievski 513874acc7 MFH 2001-08-27 16:52:49 +00:00
Stig Bakken d2363cdd19 * be smarter when trying to locate PHP binary 2001-08-27 16:34:30 +00:00
Joey Smith 30cd11ced1 MFH: Fix 1st case reported in #9893. 2nd case was fixed in previous commit. 2001-08-26 11:56:41 +00:00
Rasmus Lerdorf 8bed40bc2f MFH 2001-08-26 01:12:07 +00:00
foobar 4c6c14ac5e MFH 2001-08-24 20:07:07 +00:00
Christian Stocker a85d4245a3 Merge From 1.84 (XML/RPC stuff has gone to /pear) 2001-08-24 09:06:26 +00:00
Christian Stocker afe0765c0a changed the URL from my testing server to pear.php.net 2001-08-24 07:46:33 +00:00
foobar 0e57f1324b MFH 2001-08-22 10:26:56 +00:00
Joey Smith 938b31d395 MFH: Make stat() act like stat, not filesize(). 2001-08-21 23:59:21 +00:00
Joey Smith f3ffe2d258 MFH
Some changes to help out previous users of domxml...
node::tagname == node::name.
Add property "type" to textnode types.
2001-08-21 21:51:22 +00:00
Zeev Suraski 1563fa9a67 MFH 2001-08-21 18:14:38 +00:00
Sascha Schumann a4cf06cecd MFH 2001-08-20 15:30:33 +00:00
Stanislav Malyshev bd5d7bba59 MFH 2001-08-20 15:28:53 +00:00
foobar b404501183 MFH 2001-08-20 14:08:04 +00:00
Harald Radi b3655b0e12 MFH 2001-08-20 08:56:14 +00:00
foobar e8f9edd7a7 MFH 2001-08-19 06:39:58 +00:00
SVN Migration 95061e9ad2 This commit was manufactured by cvs2svn to create branch 'PHP_4_0_7'. 2001-08-19 00:34:09 +00:00
foobar 0f5dea39ad MFH 2001-08-18 21:09:41 +00:00
foobar 8ca2454ce2 Fixed the NEWS. 2001-08-18 20:23:13 +00:00
foobar e455e7cbca MFH 2001-08-18 18:15:22 +00:00
Zeev Suraski b33f9a00d2 MFH 2001-08-18 17:00:30 +00:00
Zeev Suraski e017ca8b72 MFH 2001-08-17 16:54:16 +00:00
foobar 6e75cfbd8c MFH 2001-08-17 16:43:00 +00:00
Harald Radi a1c9bd2bfb MFH 2001-08-17 08:19:28 +00:00
foobar 70a7172018 MFH 2001-08-17 06:55:38 +00:00
foobar 0dcfb7341f MFH 2001-08-17 00:48:33 +00:00
Zeev Suraski 91bd1d25e1 MFH 2001-08-16 23:59:35 +00:00
Zeev Suraski 766eaa4078 MFH 2001-08-16 23:35:09 +00:00
Zeev Suraski 8248d8cf2c MFH 2001-08-16 21:09:10 +00:00
Rasmus Lerdorf 0fd9dcc4bc MFH 2001-08-16 20:35:33 +00:00
Chuck Hagenbuch b381ad0f9d MFH 2001-08-16 20:21:31 +00:00
Thies C. Arntzen e53366609d MFH: move php_shutdown_config further down 2001-08-16 09:41:25 +00:00
Zeev Suraski bace148543 MFH 2001-08-15 23:21:05 +00:00
foobar 6549c08dfe MFH 2001-08-15 21:41:01 +00:00
Jeroen van Wolffelaar 1910df096c MFH 2001-08-15 19:11:39 +00:00
Jeroen van Wolffelaar dda54f4271 It was agreed that log2, exp2 and exp10 shouldn't be added to PHP. log10
already existed.

# Forgot to do this yesterday :(
2001-08-15 18:59:20 +00:00
Harald Radi 37f511a835 com entry was missing 2001-08-15 17:49:14 +00:00
Thies C. Arntzen 00bb550264 MFH the recursion-hack 2001-08-15 16:12:00 +00:00
339 changed files with 32074 additions and 8083 deletions

No files matched your search

+75 -7
View File
@@ -1,17 +1,83 @@
PHP 4.0 NEWS
PHP 4 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 200?, Version 4.0.7-dev
27 Feb 2002, Version 4.1.2
- Fixed start up failure when mm save handler is used and there is multiple
SAPIs are working at the same time. (Yasuo)
- Fixed the Roxen SAPI (Yasuo)
- Fixed a buffer overflow in the RFC-1867 file upload code (Stefan)
- Fixed a crash in the session module (Yasuo)
- Fixed a crash in the pspell module (Yasuo)
- Changed the default output encoding of mbstring 'pass' to fix
initialization problem (Rui)
26 Dec 2001, Version 4.1.1
- Fixed incompatibility with Windows .NET / IIS 6 - may improve stability
under other versions of IIS. (Zeev)
- Fixed bug that caused crashes or error notices on shutdown on threaded
platforms. (Zeev)
- Fixed several crash bugs in the xslt extension. (Markus, Derick)
- Fixed problem with dbase not returning very large (larger than long)
integers properly. (Vlad)
- Fixed several bugs and memleaks in the domxml extension. (Markus)
- Fixed bug in gmmktime() which was one hour off during standard time -
bug #9878. Patch by bfoddy@mediaone.net. (jmoore)
- Fixed bug in gmdate() timezone handling on Windows - bug #13885. (jmoore)
- Fixed several crash bugs in the mcrypt extension. (Derick)
- Made the mcrypt extension compile with the libmcrypt 2.2 series again.
(Sterling)
- Fixed a bug where the is_file() family of functions would in-correctly give
an error when they were given filenames that didn't exist. (Sterling)
- Fixed a bug in the strtotime() function where it was incorrectly recognizing
GMT +0100 and GMT -0100. (Derick)
10 Dec 2001, Version 4.1.0
- Worked around a bug in the MySQL client library that could cause PHP to hang
when using unbuffered queries. (Zeev)
- Fixed a bug which caused set_time_limit() to affect all subsequent requests
to running Apache child process. (Zeev)
- Removed the sablotron extension in favor of the new XSLT extension.
(Sterling)
- Fixed a bug in WDDX deserialization that would sometimes corrupt the root
element if it was a scalar one. (Andrei)
- Make ImageColorAt() and ImageColorsForIndex() work with TrueColor images.
(Rasmus)
- Fixed a bug in preg_match_all() that would return results under improper
indices in certain cases. (Andrei)
- Fixed a crash in str_replace() that would happen if search parameter was an
array and one of the replacements resulted in subject string being empty.
(Andrei)
- Fixed MySQL extension to work with MySQL 4.0. (Jani)
- Fixed a crash bug within Cobalt systems. Patch by tomc@tripac.com. (Jani)
- Bundled Dan Libby's xmlrpc-epi extension.
- Introduced extension version numbers. (Stig)
- Added version_compare() function. (Stig)
- Fixed pg_last_notice() (could cause random crashes in PostgreSQL
applications, even if they didn't use pg_last_notice()). (Zeev)
- Fixed DOM-XML's error reporting, so E_WARNING errors are given instead of
E_ERROR error's, this allows you to trap errors thrown by DOMXML functions.
(Sterling)
- Fixed a bug in the mcrypt extension, where list destructors were not
properly being allocated. (Sterling)
- Better Interbase blob, null and error handling. (Patch by Jeremy Bettis)
- Fixed a crash bug in array_map() if the input arrays had string or
non-sequential keys. Also modified it so that if a single array is passed,
its keys are preserved in the resulting array. (Andrei)
- Fixed a crash in dbase_replace_record. (Patch by robin.marlow@dps-int.com)
- Fixed a crash in msql_result(). (Zeev)
- Added support for single dimensional SafeArrays and Enumerations.
Added an is_enum() function to check if a component implements an
enumeration. (Alan, Harald)
- Fixed a bug in dbase_get_record() and dbase_get_record_with_names().
boolean fields are now returned correctly.
Patch by Lawrence E. Widman <widman@cardiothink.com> (Jani)
- Added --version option to php-config (Stig)
- Added --version option to php-config. (Stig)
- Improved support for thttpd-2.21b by incorporating patches for all known
bugs (Sascha)
bugs. (Sascha)
- Added ircg_get_username, a roomkey argument to ircg_join, error fetching
infrastructure, a tokenizer to speed up message processing, and fixed
a lot of bugs in the IRCG extension (Sascha)
- Improved speed of the serializer/deserializer (Thies, Sascha)
- Floating point numbers are better detected when converting from strings
a lot of bugs in the IRCG extension. (Sascha)
- Improved speed of the serializer/deserializer. (Thies, Sascha)
- Floating point numbers are better detected when converting from strings.
(Zeev, Zend Engine)
- Replaced php.ini-optimized with php.ini-recommended. As the name implies,
it's warmly recommended to use this file as the basis for your PHP
@@ -30,6 +96,8 @@ PHP 4.0 NEWS
- Added vprintf() and vsprintf() functions that allow passing all arguments
after format as an array. (Andrei)
- Added support for GD2 image type for ImageCreateFromString() (Jani)
- Added ImageCreateFromGD(), ImageCreateFromGD2(), ImageCreateFromGD2part(),
ImageGD() and ImageGD2() functions (Jani)
- addcslashes now warns when charlist is invalid. The returned string
remained the same (Jeroen)
- Added optional extra argument to gmp_init(). The extra argument
+39
View File
@@ -0,0 +1,39 @@
Between PHP 4.0.6 and 4.1.0, the Zend module struct changed in a way
that broke both source and binary compatibility. If you are
maintaining a third party extension, here's how to update it:
If this was your old module entry:
zend_module_entry foo_module_entry = {
"foo", /* extension name */
foo_functions, /* extension function list */
NULL, /* extension-wide startup function */
NULL, /* extension-wide shutdown function */
PHP_RINIT(foo), /* per-request startup function */
PHP_RSHUTDOWN(foo), /* per-request shutdown function */
PHP_MINFO(foo), /* information function */
STANDARD_MODULE_PROPERTIES
};
Here's how it should look if you want your code to build with PHP
4.1.0 and up:
zend_module_entry foo_module_entry = {
#if ZEND_MODULE_API_NO >= 20010901
STANDARD_MODULE_HEADER,
#endif
"foo", /* extension name */
foo_functions, /* extension function list */
NULL, /* extension-wide startup function */
NULL, /* extension-wide shutdown function */
PHP_RINIT(foo), /* per-request startup function */
PHP_RSHUTDOWN(foo), /* per-request shutdown function */
PHP_MINFO(foo), /* information function */
#if ZEND_MODULE_API_NO >= 20010901
FOO_VERSION, /* extension version number (string) */
#endif
STANDARD_MODULE_PROPERTIES
};
If you don't care about source compatibility with earlier PHP releases
than 4.1.0, you can drop the #if/#endif lines.
+1 -1
View File
@@ -553,7 +553,7 @@ CWD_API int virtual_open(const char *path TSRMLS_DC, int flags, ...)
va_list arg;
va_start(arg, flags);
mode = va_arg(arg, mode_t);
mode = (mode_t) va_arg(arg, int);
va_end(arg);
f = open(new_state.cwd, flags, mode);
-6
View File
@@ -928,12 +928,6 @@ dnl ---------------------------------------------- Shared module
PHP_FAST_OUTPUT($ext_builddir/Makefile)
])
PHP_SUBST(EXT_SUBDIRS)
PHP_SUBST(EXT_STATIC)
PHP_SUBST(EXT_SHARED)
PHP_SUBST(EXT_LIBS)
PHP_SUBST(EXT_LTLIBS)
dnl
dnl Solaris requires main code to be position independent in order
dnl to let shared objects find symbols. Weird. Ugly.
+1 -1
View File
@@ -20,4 +20,4 @@
LTLIBRARY_OBJECTS = $(LTLIBRARY_SOURCES:.c=.lo) $(LTLIBRARY_OBJECTS_X)
$(LTLIBRARY_NAME): $(LTLIBRARY_OBJECTS) $(LTLIBRARY_DEPENDENCIES)
$(LINK_CLEAN) $(LTLIBRARY_LDFLAGS) $(LTLIBRARY_OBJECTS) $(LTLIBRARY_LIBADD)
$(LINK) $(LTLIBRARY_LDFLAGS) $(LTLIBRARY_OBJECTS) $(LTLIBRARY_LIBADD)
+142 -205
View File
@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
timestamp='2001-04-20'
timestamp='2001-11-08'
# 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
@@ -24,8 +24,9 @@ timestamp='2001-04-20'
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Written by Per Bothner <bothner@cygnus.com>.
# Please send patches to <config-patches@gnu.org>.
# Originally written by Per Bothner <bothner@cygnus.com>.
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
#
# This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and
@@ -52,7 +53,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
@@ -95,25 +96,25 @@ trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; 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.
case $CC_FOR_BUILD,$HOST_CC,$CC in
,,) echo "int dummy(){}" > $dummy.c
set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
,,) echo "int dummy(){}" > $dummy.c ;
for c in cc gcc c89 ; do
($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1
($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
if test $? = 0 ; then
CC_FOR_BUILD="$c"; break
fi
done
rm -f $dummy.c $dummy.o $dummy.rel
CC_FOR_BUILD="$c"; break ;
fi ;
done ;
rm -f $dummy.c $dummy.o $dummy.rel ;
if test x"$CC_FOR_BUILD" = x ; then
CC_FOR_BUILD=no_compiler_found
CC_FOR_BUILD=no_compiler_found ;
fi
;;
,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;;
esac
esac'
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 8/24/94.)
# (ghazi@noc.rutgers.edu 1994-08-24)
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
PATH=$PATH:/.attbin ; export PATH
fi
@@ -127,7 +128,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*)
# Netbsd (nbsd) targets should (where applicable) match one or
# NetBSD (nbsd) targets should (where applicable) match one or
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
@@ -144,12 +145,14 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
macppc) machine=powerpc-apple ;;
hp3[0-9][05]) machine=m68k-hp ;;
ibmrt|romp-ibm) machine=romp-ibm ;;
sparc*) machine=`uname -p`-unknown ;;
*) machine=${UNAME_MACHINE}-unknown ;;
esac
# The Operating System including object format, if it has switched
# to ELF recently, or will in the future.
case "${UNAME_MACHINE}" in
i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep __ELF__ >/dev/null
then
@@ -171,6 +174,45 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit 0 ;;
amiga:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
arc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
hp300:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mac68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
macppc:OpenBSD:*:*)
echo powerpc-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvme68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvme88k:OpenBSD:*:*)
echo m88k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvmeppc:OpenBSD:*:*)
echo powerpc-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
pmax:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sgi:OpenBSD:*:*)
echo mipseb-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sun3:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
wgrisc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
*:OpenBSD:*:*)
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
alpha:OSF1:*:*)
if test $UNAME_RELEASE = "V4.0"; then
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
@@ -204,6 +246,7 @@ main:
jsr \$26,exit
.end main
EOF
eval $set_cc_for_build
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
if test "$?" = 0 ; then
case `./$dummy` in
@@ -225,6 +268,9 @@ EOF
2-307)
UNAME_MACHINE="alphaev67"
;;
2-1307)
UNAME_MACHINE="alphaev68"
;;
esac
fi
rm -f $dummy.s $dummy
@@ -242,30 +288,9 @@ EOF
Amiga*:UNIX_System_V:4.0:*)
echo m68k-unknown-sysv4
exit 0;;
amiga:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
*:[Aa]miga[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-amigaos
exit 0 ;;
arc64:OpenBSD:*:*)
echo mips64el-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
arc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
hkmips:OpenBSD:*:*)
echo mips-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
pmax:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sgi:OpenBSD:*:*)
echo mips-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
wgrisc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
*:OS/390:*:*)
echo i370-ibm-openedition
exit 0 ;;
@@ -328,9 +353,6 @@ EOF
aushp:SunOS:*:*)
echo sparc-auspex-sunos${UNAME_RELEASE}
exit 0 ;;
atari*:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
# The situation for MiNT is a little confusing. The machine name
# can be virtually everything (everything which is not
# "atarist" or "atariste" at least should have a processor
@@ -357,18 +379,6 @@ EOF
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE}
exit 0 ;;
sun3*:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mac68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvme68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvme88k:OpenBSD:*:*)
echo m88k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
exit 0 ;;
@@ -385,6 +395,7 @@ EOF
echo clipper-intergraph-clix${UNAME_RELEASE}
exit 0 ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */
@@ -475,6 +486,7 @@ EOF
exit 0 ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include <sys/systemcfg.h>
@@ -536,10 +548,8 @@ EOF
9000/31? ) HP_ARCH=m68000 ;;
9000/[34]?? ) HP_ARCH=m68k ;;
9000/[678][0-9][0-9])
case "${HPUX_REV}" in
11.[0-9][0-9])
if [ -x /usr/bin/getconf ]; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
if [ -x /usr/bin/getconf ]; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
case "${sc_cpu_version}" in
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
@@ -548,12 +558,13 @@ EOF
case "${sc_kernel_bits}" in
32) HP_ARCH="hppa2.0n" ;;
64) HP_ARCH="hppa2.0w" ;;
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
esac ;;
esac
fi ;;
esac
if [ "${HP_ARCH}" = "" ]; then
sed 's/^ //' << EOF >$dummy.c
fi
if [ "${HP_ARCH}" = "" ]; then
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#define _HPUX_SOURCE
#include <stdlib.h>
@@ -586,10 +597,10 @@ EOF
exit (0);
}
EOF
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
rm -f $dummy.c $dummy
fi ;;
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy`
if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
rm -f $dummy.c $dummy
fi ;;
esac
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit 0 ;;
@@ -598,6 +609,7 @@ EOF
echo ia64-hp-hpux${HPUX_REV}
exit 0 ;;
3050*:HI-UX:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include <unistd.h>
int
@@ -633,7 +645,7 @@ EOF
9000/8??:4.3bsd:*:*)
echo hppa1.0-hp-bsd
exit 0 ;;
*9??*:MPE/iX:*:*)
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
echo hppa1.0-hp-mpeix
exit 0 ;;
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
@@ -652,9 +664,6 @@ EOF
parisc*:Lites*:*:*)
echo hppa1.1-hp-lites
exit 0 ;;
hppa*:OpenBSD:*:*)
echo hppa-unknown-openbsd
exit 0 ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
exit 0 ;;
@@ -677,12 +686,13 @@ EOF
echo xmp-cray-unicos
exit 0 ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE}
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY*[A-Z]90:*:*:*)
echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
@@ -705,9 +715,6 @@ EOF
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit 0 ;;
hp300:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit 0 ;;
@@ -720,9 +727,6 @@ EOF
*:FreeBSD:*:*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit 0 ;;
*:OpenBSD:*:*)
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit 0 ;;
@@ -763,97 +767,29 @@ EOF
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
mips:Linux:*:*)
cat >$dummy.c <<EOF
#ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */
int main (int argc, char *argv[]) {
#else
int main (argc, argv) int argc; char *argv[]; {
#endif
#ifdef __MIPSEB__
printf ("%s-unknown-linux-gnu\n", argv[1]);
#endif
#ifdef __MIPSEL__
printf ("%sel-unknown-linux-gnu\n", argv[1]);
#endif
return 0;
}
EOF
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in
big) echo mips-unknown-linux-gnu && exit 0 ;;
little) echo mipsel-unknown-linux-gnu && exit 0 ;;
esac
;;
ppc:Linux:*:*)
# Determine Lib Version
cat >$dummy.c <<EOF
#include <features.h>
#if defined(__GLIBC__)
extern char __libc_version[];
extern char __libc_release[];
#endif
main(argc, argv)
int argc;
char *argv[];
{
#if defined(__GLIBC__)
printf("%s %s\n", __libc_version, __libc_release);
#else
printf("unknown\n");
#endif
return 0;
}
EOF
LIBC=""
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
if test "$?" = 0 ; then
./$dummy | grep 1\.99 > /dev/null
if test "$?" = 0 ; then LIBC="libc1" ; fi
fi
rm -f $dummy.c $dummy
echo powerpc-unknown-linux-gnu${LIBC}
echo powerpc-unknown-linux-gnu
exit 0 ;;
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-gnu
exit 0 ;;
alpha:Linux:*:*)
cat <<EOF >$dummy.s
.data
\$Lformat:
.byte 37,100,45,37,120,10,0 # "%d-%x\n"
.text
.globl main
.align 4
.ent main
main:
.frame \$30,16,\$26,0
ldgp \$29,0(\$27)
.prologue 1
.long 0x47e03d80 # implver \$0
lda \$2,-1
.long 0x47e20c21 # amask \$2,\$1
lda \$16,\$Lformat
mov \$0,\$17
not \$1,\$18
jsr \$26,printf
ldgp \$29,0(\$26)
mov 0,\$16
jsr \$26,exit
.end main
EOF
LIBC=""
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
if test "$?" = 0 ; then
case `./$dummy` in
0-0) UNAME_MACHINE="alpha" ;;
1-0) UNAME_MACHINE="alphaev5" ;;
1-1) UNAME_MACHINE="alphaev56" ;;
1-101) UNAME_MACHINE="alphapca56" ;;
2-303) UNAME_MACHINE="alphaev6" ;;
2-307) UNAME_MACHINE="alphaev67" ;;
esac
objdump --private-headers $dummy | \
grep ld.so.1 > /dev/null
if test "$?" = 0 ; then
LIBC="libc1"
fi
fi
rm -f $dummy.s $dummy
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
EV56) UNAME_MACHINE=alphaev56 ;;
PCA56) UNAME_MACHINE=alphapca56 ;;
PCA57) UNAME_MACHINE=alphapca56 ;;
EV6) UNAME_MACHINE=alphaev6 ;;
EV67) UNAME_MACHINE=alphaev67 ;;
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
exit 0 ;;
parisc:Linux:*:* | hppa:Linux:*:*)
@@ -883,40 +819,30 @@ EOF
# The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent
# problems with other programs or directories called `ld' in the path.
ld_supported_emulations=`cd /; ld --help 2>&1 \
| sed -ne '/supported emulations:/!d
ld_supported_targets=`cd /; ld --help 2>&1 \
| sed -ne '/supported targets:/!d
s/[ ][ ]*/ /g
s/.*supported emulations: *//
s/.*supported targets: *//
s/ .*//
p'`
case "$ld_supported_emulations" in
i*86linux)
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
exit 0
;;
elf_i*86)
case "$ld_supported_targets" in
elf32-i386)
TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
;;
i*86coff)
a.out-i386-linux)
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
exit 0 ;;
coff-i386)
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
exit 0
;;
esac
# Either a pre-BFD a.out linker (linux-gnuoldld)
# or one that does not give us useful --help.
# GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
# If ld does not provide *any* "supported emulations:"
# that means it is gnuoldld.
test -z "$ld_supported_emulations" && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
case "${UNAME_MACHINE}" in
i*86)
VENDOR=pc;
;;
*)
VENDOR=unknown;
;;
exit 0 ;;
"")
# Either a pre-BFD a.out linker (linux-gnuoldld) or
# one that does not give us useful --help.
echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
exit 0 ;;
esac
# Determine whether the default compiler is a.out or elf
eval $set_cc_for_build
cat >$dummy.c <<EOF
#include <features.h>
#ifdef __cplusplus
@@ -928,15 +854,15 @@ EOF
#ifdef __ELF__
# ifdef __GLIBC__
# if __GLIBC__ >= 2
printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
printf ("%s-pc-linux-gnu\n", argv[1]);
# else
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
printf ("%s-pc-linux-gnulibc1\n", argv[1]);
# endif
# else
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
printf ("%s-pc-linux-gnulibc1\n", argv[1]);
# endif
#else
printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
printf ("%s-pc-linux-gnuaout\n", argv[1]);
#endif
return 0;
}
@@ -945,9 +871,10 @@ EOF
rm -f $dummy.c $dummy
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
;;
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
# are messed up and put the nodename in both sysname and nodename.
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
# earlier versions are messed up and put the nodename in both
# sysname and nodename.
echo i386-sequent-sysv4
exit 0 ;;
i*86:UNIX_SV:4.2MP:2.*)
@@ -966,14 +893,13 @@ EOF
echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
fi
exit 0 ;;
i*86:*:5:7*)
# Fixed at (any) Pentium or better
UNAME_MACHINE=i586
if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
else
echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
fi
i*86:*:5:[78]*)
case `/bin/uname -X | grep "^Machine"` in
*486*) UNAME_MACHINE=i486 ;;
*Pentium) UNAME_MACHINE=i586 ;;
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
esac
echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
exit 0 ;;
i*86:*:3.2:*)
if test -f /usr/options/cb.name; then
@@ -1021,7 +947,7 @@ EOF
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 | 4850:*: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 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -1067,8 +993,8 @@ EOF
echo ns32k-sni-sysv
fi
exit 0 ;;
PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel@ccMail.Census.GOV>
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel@ccMail.Census.GOV>
echo i586-unisys-sysv4
exit 0 ;;
*:UNIX_System_V:4*:FTX*)
@@ -1080,6 +1006,10 @@ EOF
# From seanf@swdc.stratus.com.
echo i860-stratus-sysv4
exit 0 ;;
*:VOS:*:*)
# From Paul.Green@stratus.com.
echo hppa1.1-stratus-vos
exit 0 ;;
mc68*:A/UX:*:*)
echo m68k-apple-aux${UNAME_RELEASE}
exit 0 ;;
@@ -1172,11 +1102,18 @@ 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
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
eval $set_cc_for_build
cat >$dummy.c <<EOF
#ifdef _SEQUENT_
# include <sys/types.h>
Vendored
+109 -54
View File
@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
timestamp='2001-04-20'
timestamp='2001-11-08'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -29,7 +29,8 @@ timestamp='2001-04-20'
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Please send patches to <config-patches@gnu.org>.
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
@@ -117,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* | storm-chaos* | os2-emx*)
nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -157,6 +158,14 @@ case $os in
os=-vxworks
basic_machine=$1
;;
-chorusos*)
os=-chorusos
basic_machine=$1
;;
-chorusrdb)
os=-chorusrdb
basic_machine=$1
;;
-hiux*)
os=-hiuxwe2
;;
@@ -215,26 +224,35 @@ esac
case $basic_machine in
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \
| arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \
| pyramid | mn10200 | mn10300 | tron | a29k \
| 580 | i960 | h8300 \
| x86 | ppcbe | mipsbe | mipsle | shbe | shle \
| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
| hppa64 \
| alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
| alphaev6[78] \
| we32k | ns16k | clipper | i370 | sh | sh[34] \
| powerpc | powerpcle \
| 1750a | dsp16xx | pdp10 | pdp11 \
| mips16 | mips64 | mipsel | mips64el \
| mips64orion | mips64orionel | mipstx39 | mipstx39el \
| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
| mips64vr5000 | miprs64vr5000el | mcore | s390 | s390x \
| sparc | sparclet | sparclite | sparc64 | sparcv9 | sparcv9b \
| v850 | c4x \
| thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \
| pj | pjl | h8500)
1750a | 580 \
| a29k \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| c4x | clipper \
| d10v | d30v | dsp16xx \
| fr30 \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| m32r | m68000 | m68k | m88k | mcore \
| mips16 | mips64 | mips64el | mips64orion | mips64orionel \
| mips64vr4100 | mips64vr4100el | mips64vr4300 \
| mips64vr4300el | mips64vr5000 | mips64vr5000el \
| mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
| mipsisa32 \
| mn10200 | mn10300 \
| ns16k | ns32k \
| openrisc \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
| sh | sh[34] | sh[34]eb | shbe | shle \
| sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \
| strongarm \
| tahoe | thumb | tic80 | tron \
| v850 \
| we32k \
| x86 | xscale | xstormy16 \
| z8k)
basic_machine=$basic_machine-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12)
@@ -242,7 +260,7 @@ case $basic_machine in
basic_machine=$basic_machine-unknown
os=-none
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | w65)
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
;;
# We use `pc' rather than `unknown'
@@ -257,31 +275,43 @@ case $basic_machine in
exit 1
;;
# Recognize the basic CPU types with company name.
# FIXME: clean up the formatting here.
vax-* | tahoe-* | i*86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \
| arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
| power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
| xmp-* | ymp-* \
| x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \
| hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
| hppa2.0n-* | hppa64-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
| alphaev6[78]-* \
| we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
| clipper-* | orion-* \
| sparclite-* | pdp10-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
| sparc64-* | sparcv9-* | sparcv9b-* | sparc86x-* \
| mips16-* | mips64-* | mipsel-* \
| mips64el-* | mips64orion-* | mips64orionel-* \
| mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
| mipstx39-* | mipstx39el-* | mcore-* \
| f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \
| [cjt]90-* \
| m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
| thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \
| bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*)
580-* \
| a29k-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alphapca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armv*-* \
| avr-* \
| bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c54x-* \
| clipper-* | cray2-* | cydra-* \
| d10v-* | d30v-* \
| elxsi-* \
| f30[01]-* | f700-* | fr30-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| m32r-* \
| m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | mcore-* \
| mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
| mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \
| mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
| sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \
| sparc-* | sparc64-* | sparc86x-* | sparclite-* \
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* \
| t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
| v850-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xmp-* | xps100-* | xscale-* | xstormy16-* \
| ymp-* \
| z8k-*)
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
@@ -694,7 +724,7 @@ case $basic_machine in
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pentium | p5 | k5 | k6 | nexgen)
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
pentiumpro | p6 | 6x86 | athlon)
@@ -703,7 +733,7 @@ case $basic_machine in
pentiumii | pentium2)
basic_machine=i686-pc
;;
pentium-* | p5-* | k5-* | k6-* | nexgen-*)
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
@@ -727,6 +757,16 @@ case $basic_machine in
ppcle-* | powerpclittle-*)
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64) basic_machine=powerpc64-unknown
;;
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
basic_machine=powerpc64le-unknown
;;
ppc64le-* | powerpc64little-*)
basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ps2)
basic_machine=i386-ibm
;;
@@ -744,6 +784,12 @@ 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
@@ -755,7 +801,7 @@ case $basic_machine in
basic_machine=sh-hitachi
os=-hms
;;
sparclite-wrs)
sparclite-wrs | simso-wrs)
basic_machine=sparclite-wrs
os=-vxworks
;;
@@ -881,6 +927,10 @@ case $basic_machine in
basic_machine=hppa1.1-winbond
os=-proelf
;;
windows32)
basic_machine=i386-pc
os=-windows32-msvcrt
;;
xmp)
basic_machine=xmp-cray
os=-unicos
@@ -934,7 +984,7 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
sh3 | sh4)
sh3 | sh4 | sh3eb | sh4eb)
basic_machine=sh-unknown
;;
sparc | sparcv9 | sparcv9b)
@@ -1018,11 +1068,13 @@ case $os in
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*)
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1346,6 +1398,9 @@ case $basic_machine in
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
vendor=atari
;;
-vos*)
vendor=stratus
;;
esac
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
;;
+19 -5
View File
@@ -51,7 +51,7 @@ dnl ## All of these are normally in the extension directories.
dnl ## Diversion 5 is the last one. Here we generate files and clean up.
dnl ## This is where the version number is changed from now on!
AM_INIT_AUTOMAKE(php, 4.0.7RC1, nodefine)
AM_INIT_AUTOMAKE(php, 4.1.2, nodefine)
PHP_VERSION=$VERSION
echo "/* automatically generated by configure */" > php_version.h.new
@@ -394,6 +394,7 @@ mkstemp \
mmap \
nl_langinfo \
putenv \
realpath \
random \
rand_r \
regcomp \
@@ -508,6 +509,7 @@ PHP_ARG_WITH(pear, [whether to install PEAR, and where],
if test "$PHP_PEAR" != "no"; then
PEAR_DIR=pear
PEAR_INSTALLDIR=$PHP_PEAR
fi
if test "$PHP_PEAR" = "DEFAULT" -o "x$PHP_PEAR" = "xyes"; then
@@ -608,9 +610,14 @@ PHP_ARG_ENABLE(dmalloc,whether to enable dmalloc,
[ --enable-dmalloc Enable dmalloc])
if test "$PHP_DMALLOC" = "yes"; then
AC_DEFINE(HAVE_DMALLOC,1,[Whether you have dmalloc])
PHP_ADD_LIBRARY(dmalloc)
CPPFLAGS="$CPPFLAGS -DDMALLOC_FUNC_CHECK"
AC_CHECK_LIB(dmalloc, dmalloc_error, [
PHP_ADD_LIBRARY(dmalloc)
AC_DEFINE(HAVE_DMALLOC,1,[Whether you have dmalloc])
CPPFLAGS="$CPPFLAGS -DDMALLOC_FUNC_CHECK"
], [
AC_MSG_ERROR(Problem with enabling dmalloc. Please check config.log for details.)
])
fi
# temporary until streams are better integrated
@@ -623,6 +630,7 @@ if test "$PHP_PHP_STREAMS" = "yes"; then
fi
AC_CHECK_LIB(crypt, crypt, [
PHP_ADD_LIBRARY(crypt)
PHP_ADD_LIBRARY(crypt, 1)
AC_DEFINE(HAVE_CRYPT,1,[ ])
])
@@ -815,6 +823,12 @@ PHP_OS=`uname`
AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS",[uname output])
PHP_SUBST(EXT_SUBDIRS)
PHP_SUBST(EXT_STATIC)
PHP_SUBST(EXT_SHARED)
PHP_SUBST(EXT_LIBS)
PHP_SUBST(EXT_LTLIBS)
PHP_SUBST_OLD(abs_builddir)
PHP_SUBST_OLD(abs_srcdir)
PHP_SUBST(bindir)
@@ -917,7 +931,7 @@ PHP_GEN_CONFIG_VARS
$php_shtool mkdir -p pear/scripts
ALL_OUTPUT_FILES="php4.spec Zend/Makefile main/build-defs.h \
pear/scripts/pear pear/scripts/phpize pear/scripts/php-config \
pear/scripts/pearize TSRM/Makefile $PHP_OUTPUT_FILES"
pear/scripts/pearize pear/scripts/phptar TSRM/Makefile $PHP_OUTPUT_FILES"
AC_OUTPUT($ALL_OUTPUT_FILES, [], [
+2 -1
View File
@@ -51,7 +51,8 @@ function_entry aspell_functions[] = {
static int le_aspell;
zend_module_entry aspell_module_entry = {
"aspell", aspell_functions, PHP_MINIT(aspell), NULL, NULL, NULL, PHP_MINFO(aspell), STANDARD_MODULE_PROPERTIES
STANDARD_MODULE_HEADER,
"aspell", aspell_functions, PHP_MINIT(aspell), NULL, NULL, NULL, PHP_MINFO(aspell), NO_VERSION_YET, STANDARD_MODULE_PROPERTIES
};
#ifdef COMPILE_DL_ASPELL
+2
View File
@@ -44,6 +44,7 @@ function_entry bcmath_functions[] = {
};
zend_module_entry bcmath_module_entry = {
STANDARD_MODULE_HEADER,
"bcmath",
bcmath_functions,
PHP_MINIT(bcmath),
@@ -51,6 +52,7 @@ zend_module_entry bcmath_module_entry = {
PHP_RINIT(bcmath),
NULL,
PHP_MINFO(bcmath),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
+2
View File
@@ -57,6 +57,7 @@ function_entry calendar_functions[] = {
zend_module_entry calendar_module_entry = {
STANDARD_MODULE_HEADER,
"calendar",
calendar_functions,
PHP_MINIT(calendar),
@@ -64,6 +65,7 @@ zend_module_entry calendar_module_entry = {
NULL,
NULL,
PHP_MINFO(calendar),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES,
};
+4 -2
View File
@@ -97,15 +97,17 @@ static char const cvsid[] = "$Id$";
/* Declare our module to the Zend engine */
zend_module_entry ccvs_module_entry = {
STANDARD_MODULE_HEADER,
"CCVS",
ccvs_functions,
NULL, NULL, NULL, NULL,
PHP_MINFO(ccvs),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
#ifdef COMPILE_DL_LDAP
ZEND_GET_MODULE(ldap)
#ifdef COMPILE_DL_CCVS
ZEND_GET_MODULE(ccvs)
#endif
/* Full Functions (The actual CCVS functions and any internal php hooked functions such as MINFO) */
+39 -10
View File
@@ -437,7 +437,7 @@ PHP_INI_ENTRY("com.typelib_file", "", PHP_INI_SYSTEM, OnTypelibFileChange)
PHP_INI_END()
/* {{{ proto int com_load(string module_name [, string remote_host [, int codepage[, string typelib]]])
/* {{{ proto int com_load(string module_name [, string remote_host [, int codepage [, string typelib]]])
Loads a COM module */
PHP_FUNCTION(com_load)
{
@@ -511,6 +511,12 @@ PHP_FUNCTION(com_load)
/* @todo if (server_name) */
if (!server_name) {
/* @todo shouldn't the bind context be fetched on module startup and kept as a global shared instance ?
* all calls to BindToObject would deliver the same instance then (as desired)
* IBindCtx::RegisterObjectBound() should be called then after mkparsedisplayname()
*
* @todo use mkparsedisplaynameex() ?
*/
if (SUCCEEDED(hr = CreateBindCtx(0, &pBindCtx))) {
if (SUCCEEDED(hr = MkParseDisplayName(pBindCtx, ProgID, &ulEaten, &pMoniker))) {
hr = pMoniker->lpVtbl->BindToObject(pMoniker, pBindCtx, NULL, &IID_IDispatch, (LPVOID *) &C_DISPATCH(obj));
@@ -548,7 +554,7 @@ PHP_FUNCTION(com_load)
pResults.pIID = &IID_IDispatch;
pResults.pItf = NULL;
pResults.hr = S_OK;
hr=CoCreateInstanceEx(&clsid, NULL, CLSCTX_SERVER, &server_info, 1, &pResults);
hr=CoCreateInstanceEx(&clsid, NULL, CLSCTX_REMOTE_SERVER, &server_info, 1, &pResults);
if (SUCCEEDED(hr)) {
hr = pResults.hr;
C_DISPATCH(obj) = (IDispatch *) pResults.pItf;
@@ -742,7 +748,11 @@ int do_COM_invoke(comval *obj, pval *function_name, VARIANT *var_result, pval **
efree(funcname);
for (current_arg=0;current_arg<arg_count;current_arg++) {
VariantClear(&variant_args[current_arg]);
/* don't release IDispatch pointers as they are used afterwards */
if (V_VT(&variant_args[current_arg]) != VT_DISPATCH) {
/* @todo review this: what happens to an array of IDispatchs or a VARIANT->IDispatch */
VariantClear(&variant_args[current_arg]);
}
}
efree(variant_args);
@@ -804,9 +814,8 @@ PHP_FUNCTION(com_invoke)
RETURN_FALSE;
}
php_variant_to_pval(var_result, return_value, codepage TSRMLS_CC);
RETVAL_VARIANT(var_result);
FREE_VARIANT(var_result);
efree(arguments);
}
/* }}} */
@@ -1049,9 +1058,7 @@ PHP_FUNCTION(com_propget)
RETURN_FALSE;
}
php_variant_to_pval(var_result, return_value, codepage TSRMLS_CC);
FREE_VARIANT(var_result);
RETVAL_VARIANT(var_result);
}
/* }}} */
@@ -1082,7 +1089,8 @@ PHP_FUNCTION(com_propput)
/* }}} */
/* {{{ proto bool com_load_typelib(string typelib_name[, int case_insensitiv]) */
/* {{{ proto bool com_load_typelib(string typelib_name [, int case_insensitiv])
Loads a Typelib */
PHP_FUNCTION(com_load_typelib)
{
pval *arg_typelib, *arg_cis;
@@ -1200,6 +1208,10 @@ PHPAPI pval php_COM_get_property_handler(zend_property_reference *property_refer
pval_destructor(&overloaded_property->element);
}
if (obj_prop != NULL) {
RETVAL_COM(obj);
}
FREE_VARIANT(var_result);
return return_value;
@@ -1669,7 +1681,16 @@ PHP_MSHUTDOWN_FUNCTION(COM)
/* exports for external object creation */
zend_module_entry COM_module_entry = {
"com", COM_functions, PHP_MINIT(COM), PHP_MSHUTDOWN(COM), NULL, NULL, PHP_MINFO(COM), STANDARD_MODULE_PROPERTIES
STANDARD_MODULE_HEADER,
"com",
COM_functions,
PHP_MINIT(COM),
PHP_MSHUTDOWN(COM),
NULL,
NULL,
PHP_MINFO(COM),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
PHPAPI int php_COM_get_le_comval()
@@ -1678,3 +1699,11 @@ PHPAPI int php_COM_get_le_comval()
}
#endif
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
*/
-16
View File
@@ -1,16 +0,0 @@
1) Multi-dimenstional array support
2) IErrorInfo
3) WithEvents
4) Documentation (internal and user) and howtos
5) IEnumVariant::All() which would be like IEnumVariant::Next(IDispatch::Count)
6) Look for memory leaks and AdRef/Release problems - I KNOW there are some...
7) Test component (goes with the docs)
8) Test suite (Needs test component)
9) reduce the need for VARIANT()
10) lets try if we are able to call non IDispatch - only Typelib components
11) IEnumVariant::Next() without parameter should only return an object, not an array with one element
these seem to be done:
2) 6) 11)
+14 -6
View File
@@ -59,7 +59,15 @@ static PHP_MINFO_FUNCTION(VARIANT)
zend_module_entry VARIANT_module_entry = {
"variant", VARIANT_functions, PHP_MINIT(VARIANT), PHP_MSHUTDOWN(VARIANT), NULL, NULL, PHP_MINFO(VARIANT), STANDARD_MODULE_PROPERTIES
STANDARD_MODULE_HEADER,
"variant",
VARIANT_functions,
PHP_MINIT(VARIANT),
PHP_MSHUTDOWN(VARIANT),
NULL, NULL,
PHP_MINFO(VARIANT),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
@@ -78,7 +86,7 @@ PHP_MINIT_FUNCTION(VARIANT)
REGISTER_LONG_CONSTANT("VT_BOOL", VT_BOOL, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("VT_ERROR", VT_ERROR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("VT_CY", VT_CY, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("VT_DATE", VT_CY, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("VT_DATE", VT_DATE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("VT_BSTR", VT_BSTR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("VT_DECIMAL", VT_DECIMAL, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("VT_UNKNOWN", VT_UNKNOWN, CONST_CS | CONST_PERSISTENT);
@@ -185,10 +193,10 @@ static pval php_VARIANT_get_property_handler(zend_property_reference *property_r
{
zend_overloaded_element *overloaded_property;
int type;
TSRMLS_FETCH();
pval result, **var_handle, *object = property_reference->object;
VARIANT *var_arg;
TSRMLS_FETCH();
/* fetch the VARIANT structure */
zend_hash_index_find(Z_OBJPROP_P(object), 0, (void **) &var_handle);
@@ -230,10 +238,10 @@ static int php_VARIANT_set_property_handler(zend_property_reference *property_re
{
zend_overloaded_element *overloaded_property;
int type;
TSRMLS_FETCH();
pval **var_handle, *object = property_reference->object;
VARIANT *var_arg;
TSRMLS_FETCH();
/* fetch the VARIANT structure */
zend_hash_index_find(Z_OBJPROP_P(object), 0, (void **) &var_handle);
+44 -21
View File
@@ -86,7 +86,7 @@ PHPAPI void php_pval_to_variant(pval *pval_arg, VARIANT *var_arg, int codepage T
}
if (pval_arg->is_ref) { /* deprecated, implemented for downwards compatiblity */
type |= VT_BYREF;
// type |= VT_BYREF;
}
pval_to_variant_ex(pval_arg, var_arg, type, codepage TSRMLS_CC);
@@ -187,7 +187,11 @@ static void pval_to_variant_ex(pval *pval_arg, VARIANT *var_arg, int type, int c
case VT_BOOL:
convert_to_boolean_ex(&pval_arg);
V_BOOL(var_arg) = (short)Z_LVAL_P(pval_arg);
if (Z_LVAL_P(pval_arg)) {
V_BOOL(var_arg) = TRUE;
} else {
V_BOOL(var_arg) = FALSE;
}
break;
case VT_ERROR:
@@ -281,7 +285,13 @@ static void pval_to_variant_ex(pval *pval_arg, VARIANT *var_arg, int type, int c
case VT_BOOL|VT_BYREF:
convert_to_boolean(pval_arg);
V_BOOLREF(var_arg) = (short FAR*) &Z_LVAL_P(pval_arg);
/* emalloc or malloc ? */
V_BOOLREF(var_arg) = (short FAR*) pemalloc(sizeof(short), 1);
if (Z_LVAL_P(pval_arg)) {
*V_BOOLREF(var_arg) = TRUE;
} else {
*V_BOOLREF(var_arg) = FALSE;
}
break;
case VT_ERROR|VT_BYREF:
@@ -452,11 +462,11 @@ PHPAPI int php_variant_to_pval(VARIANT *var_arg, pval *pval_arg, int codepage TS
ZVAL_NULL(pval_arg);
return FAILURE;
}
SafeArrayLock( array);
SafeArrayLock(array);
/* This call has failed for everything I have tried */
/* But best leave it to be on the safe side */
if (FAILED(SafeArrayGetVartype(array, &vartype))) {
if (FAILED(SafeArrayGetVartype(array, &vartype)) || (vartype == VT_EMPTY)) {
/* Fall back to what we do know */
/* Mask off the array bit and assume */
/* what is left is the type of the array */
@@ -519,9 +529,9 @@ PHPAPI int php_variant_to_pval(VARIANT *var_arg, pval *pval_arg, int codepage TS
case VT_UI1:
if (V_ISBYREF(var_arg)) {
ZVAL_LONG(pval_arg, (long)*V_UI4REF(var_arg));
ZVAL_LONG(pval_arg, (long)*V_UI1REF(var_arg));
} else {
ZVAL_LONG(pval_arg, (long)V_UI4(var_arg));
ZVAL_LONG(pval_arg, (long)V_UI1(var_arg));
}
break;
@@ -587,9 +597,17 @@ PHPAPI int php_variant_to_pval(VARIANT *var_arg, pval *pval_arg, int codepage TS
case VT_BOOL:
if (V_ISBYREF(var_arg)) {
ZVAL_BOOL(pval_arg, *V_BOOLREF(var_arg));
if (*V_BOOLREF(var_arg)) {
ZVAL_BOOL(pval_arg, Z_TRUE);
} else {
ZVAL_BOOL(pval_arg, Z_FALSE);
}
} else {
ZVAL_BOOL(pval_arg, V_BOOL(var_arg));
if (V_BOOL(var_arg)) {
ZVAL_BOOL(pval_arg, Z_TRUE);
} else {
ZVAL_BOOL(pval_arg, Z_FALSE);
}
}
break;
@@ -614,27 +632,32 @@ PHPAPI int php_variant_to_pval(VARIANT *var_arg, pval *pval_arg, int codepage TS
break;
case VT_DATE: {
BOOL success;
SYSTEMTIME wintime;
struct tm phptime;
if (V_ISBYREF(var_arg)) {
VariantTimeToSystemTime(*V_DATEREF(var_arg), &wintime);
success = VariantTimeToSystemTime(*V_DATEREF(var_arg), &wintime);
} else {
VariantTimeToSystemTime(V_DATE(var_arg), &wintime);
success = VariantTimeToSystemTime(V_DATE(var_arg), &wintime);
}
memset(&phptime, 0, sizeof(phptime));
if (success) {
memset(&phptime, 0, sizeof(phptime));
phptime.tm_year = wintime.wYear - 1900;
phptime.tm_mon = wintime.wMonth - 1;
phptime.tm_mday = wintime.wDay;
phptime.tm_hour = wintime.wHour;
phptime.tm_min = wintime.wMinute;
phptime.tm_sec = wintime.wSecond;
phptime.tm_isdst = -1;
phptime.tm_year = wintime.wYear - 1900;
phptime.tm_mon = wintime.wMonth - 1;
phptime.tm_mday = wintime.wDay;
phptime.tm_hour = wintime.wHour;
phptime.tm_min = wintime.wMinute;
phptime.tm_sec = wintime.wSecond;
phptime.tm_isdst = -1;
tzset();
ZVAL_LONG(pval_arg, mktime(&phptime));
tzset();
ZVAL_LONG(pval_arg, mktime(&phptime));
} else {
ret = FAILURE;
}
}
break;
+4
View File
@@ -1,6 +1,10 @@
#ifndef CONVERSION_H
#define CONVERSION_H
/* isn't this defined somewhere else ? */
#define Z_TRUE 1
#define Z_FALSE 0
BEGIN_EXTERN_C()
PHPAPI void php_pval_to_variant(pval *pval_arg, VARIANT *var_arg, int codepage TSRMLS_DC);
+17 -2
View File
@@ -3,15 +3,30 @@
#if PHP_WIN32
#define ALLOC_VARIANT(v) (v) = (VARIANT *) emalloc(sizeof(VARIANT)); \
#define ALLOC_VARIANT(v) (v) = (VARIANT *) emalloc(sizeof(VARIANT)); \
VariantInit(v);
#define FREE_VARIANT(v) VariantClear(v); \
#define FREE_VARIANT(v) VariantClear(v); \
efree(v);
#define IS_VARIANT php_VARIANT_get_le_variant()
#define ZVAL_VARIANT(z, v) if (V_VT(v) == VT_DISPATCH) { \
comval *obj; \
ALLOC_COM(obj); \
php_COM_set(obj, &V_DISPATCH(v), TRUE TSRMLS_CC); \
ZVAL_LONG((z), zend_list_insert(obj, IS_COM)); \
} else { \
php_variant_to_pval((v), (z), codepage TSRMLS_CC); \
FREE_VARIANT(v); \
}
#define RETVAL_VARIANT(v) ZVAL_VARIANT(return_value, (v));
#define RETURN_VARIANT(v) RETVAL_VARIANT(v) \
return;
#endif /* PHP_WIN32 */
#endif /* VARIANT_H */
+10 -1
View File
@@ -155,7 +155,16 @@ function_entry cpdf_functions[] = {
};
zend_module_entry cpdf_module_entry = {
"cpdf", cpdf_functions, PHP_MINIT(cpdf), PHP_MSHUTDOWN(cpdf), PHP_RINIT(cpdf), NULL, PHP_MINFO(cpdf), STANDARD_MODULE_PROPERTIES
STANDARD_MODULE_HEADER,
"cpdf",
cpdf_functions,
PHP_MINIT(cpdf),
PHP_MSHUTDOWN(cpdf),
PHP_RINIT(cpdf),
NULL,
PHP_MINFO(cpdf),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
#ifdef COMPILE_DL_CPDF
+8 -10
View File
@@ -4,20 +4,19 @@ PHP_ARG_WITH(crack, whether to include crack support,
[ --with-crack[=DIR] Include crack support.])
if test "$PHP_CRACK" != "no"; then
for i in /usr/local/lib /usr/lib $PHP_CRACK $PHP_CRACK/cracklib; do
if test -f $i/libcrack.a; then
CRACK_LIBDIR=$i
fi
for i in /usr/local/lib /usr/lib $PHP_CRACK/lib $PHP_CRACK/cracklib; do
test -f $i/lib/libcrack.$SHLIB_SUFFIX_NAME -o -f $i/libcrack.a && CRACK_LIBDIR=$i
done
for i in /usr/local/include /usr/include $PHP_CRACK $PHP_CRACK/cracklib; do
if test -f $i/packer.h; then
CRACK_INCLUDEDIR=$i
fi
for i in /usr/local/include /usr/include $PHP_CRACK/include $PHP_CRACK/cracklib; do
test -f $i/packer.h && CRACK_INCLUDEDIR=$i
done
if test -z "$CRACK_LIBDIR"; then
AC_MSG_ERROR(Cannot find the cracklib library file)
fi
if test -z "$CRACK_INCLUDEDIR"; then
AC_MSG_ERROR(Cannot find a cracklib header file)
fi
@@ -26,8 +25,7 @@ if test "$PHP_CRACK" != "no"; then
PHP_ADD_LIBRARY_WITH_PATH(crack, $CRACK_LIBDIR, CRACK_SHARED_LIBADD)
PHP_EXTENSION(crack, $ext_shared)
PHP_SUBST(CRACK_SHARED_LIBADD)
AC_DEFINE(HAVE_CRACK, 1, [ ])
fi
PHP_SUBST(CRACK_SHARED_LIBADD)
+2
View File
@@ -43,6 +43,7 @@ function_entry crack_functions[] = {
};
zend_module_entry crack_module_entry = {
STANDARD_MODULE_HEADER,
"crack",
crack_functions,
ZEND_MODULE_STARTUP_N(crack),
@@ -50,6 +51,7 @@ zend_module_entry crack_module_entry = {
ZEND_MODULE_ACTIVATE_N(crack),
ZEND_MODULE_DEACTIVATE_N(crack),
ZEND_MODULE_INFO_N(crack),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
+2
View File
@@ -62,6 +62,7 @@ function_entry ctype_functions[] = {
/* {{{ ctype_mpodule_entry
*/
zend_module_entry ctype_module_entry = {
STANDARD_MODULE_HEADER,
"ctype",
ctype_functions,
NULL,
@@ -69,6 +70,7 @@ zend_module_entry ctype_module_entry = {
NULL,
NULL,
PHP_MINFO(ctype),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
/* }}} */
+1 -1
View File
@@ -6,7 +6,7 @@ ctype on integers
--GET--
--FILE--
<?php
setlocale("LC_ALL","C");
setlocale(LC_ALL,"C");
function ctype_test_001($function) {
$n=0;
+1 -1
View File
@@ -6,7 +6,7 @@ ctype on strings
--GET--
--FILE--
<?php
setlocale("LC_ALL","C");
setlocale(LC_ALL,"C");
function ctype_test_002($function) {
$n=0; $m=0;
+3 -3
View File
@@ -24,7 +24,7 @@ if test "$PHP_CURL" != "no"; then
fi
CURL_CONFIG="curl-config"
AC_MSG_CHECKING(for cURL greater than 7.7.3)
AC_MSG_CHECKING(for cURL greater than 7.8.1)
if ${CURL_DIR}/bin/curl-config --libs print > /dev/null 2>&1; then
CURL_CONFIG=${CURL_DIR}/bin/curl-config
@@ -32,11 +32,11 @@ if test "$PHP_CURL" != "no"; then
curl_version_full=`$CURL_CONFIG --version`
curl_version=`echo ${curl_version_full} | sed -e 's/libcurl //' | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
if test "$curl_version" -ge 7007003; then
if test "$curl_version" -ge 7008001; then
AC_MSG_RESULT($curl_version_full)
CURL_LIBS=`$CURL_CONFIG --libs`
else
AC_MSG_ERROR(cURL version 7.7.3 or later is required to compile php with cURL support)
AC_MSG_ERROR(cURL version 7.8.1 or later is required to compile php with cURL support)
fi
PHP_ADD_INCLUDE($CURL_DIR/include)
+242 -174
View File
@@ -69,13 +69,15 @@ function_entry curl_functions[] = {
/* {{{ curl_module_entry
*/
zend_module_entry curl_module_entry = {
STANDARD_MODULE_HEADER,
"curl",
curl_functions,
PHP_MINIT(curl),
NULL,
PHP_MSHUTDOWN(curl),
NULL,
NULL,
PHP_MINFO(curl),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
/* }}} */
@@ -95,152 +97,184 @@ PHP_MINFO_FUNCTION(curl)
}
/* }}} */
#define REGISTER_CURL_CONSTANT(name, value) REGISTER_LONG_CONSTANT(name, value, CONST_CS | CONST_PERSISTENT)
#define REGISTER_CURL_CONSTANT(__c) REGISTER_LONG_CONSTANT(#__c, __c, CONST_CS | CONST_PERSISTENT)
/* {{{ PHP_MINIT_FUNCTION
*/
PHP_MINIT_FUNCTION(curl)
{
int startup_options;
le_curl = zend_register_list_destructors_ex(_php_curl_close, NULL, "curl", module_number);
/* Constants for curl_setopt() */
REGISTER_CURL_CONSTANT("CURLOPT_PORT", CURLOPT_PORT);
REGISTER_CURL_CONSTANT("CURLOPT_FILE", CURLOPT_FILE);
REGISTER_CURL_CONSTANT("CURLOPT_INFILE", CURLOPT_INFILE);
REGISTER_CURL_CONSTANT("CURLOPT_INFILESIZE", CURLOPT_INFILESIZE);
REGISTER_CURL_CONSTANT("CURLOPT_URL", CURLOPT_URL);
REGISTER_CURL_CONSTANT("CURLOPT_PROXY", CURLOPT_PROXY);
REGISTER_CURL_CONSTANT("CURLOPT_VERBOSE", CURLOPT_VERBOSE);
REGISTER_CURL_CONSTANT("CURLOPT_HEADER", CURLOPT_HEADER);
REGISTER_CURL_CONSTANT("CURLOPT_HTTPHEADER", CURLOPT_HTTPHEADER);
REGISTER_CURL_CONSTANT("CURLOPT_NOPROGRESS", CURLOPT_NOPROGRESS);
REGISTER_CURL_CONSTANT("CURLOPT_NOBODY", CURLOPT_NOBODY);
REGISTER_CURL_CONSTANT("CURLOPT_FAILONERROR", CURLOPT_FAILONERROR);
REGISTER_CURL_CONSTANT("CURLOPT_UPLOAD", CURLOPT_UPLOAD);
REGISTER_CURL_CONSTANT("CURLOPT_POST", CURLOPT_POST);
REGISTER_CURL_CONSTANT("CURLOPT_FTPLISTONLY", CURLOPT_FTPLISTONLY);
REGISTER_CURL_CONSTANT("CURLOPT_FTPAPPEND", CURLOPT_FTPAPPEND);
REGISTER_CURL_CONSTANT("CURLOPT_NETRC", CURLOPT_NETRC);
REGISTER_CURL_CONSTANT("CURLOPT_FOLLOWLOCATION", CURLOPT_FOLLOWLOCATION);
REGISTER_CURL_CONSTANT("CURLOPT_FTPASCII", CURLOPT_FTPASCII);
REGISTER_CURL_CONSTANT("CURLOPT_PUT", CURLOPT_PUT);
REGISTER_CURL_CONSTANT("CURLOPT_MUTE", CURLOPT_MUTE);
REGISTER_CURL_CONSTANT("CURLOPT_USERPWD", CURLOPT_USERPWD);
REGISTER_CURL_CONSTANT("CURLOPT_PROXYUSERPWD", CURLOPT_PROXYUSERPWD);
REGISTER_CURL_CONSTANT("CURLOPT_RANGE", CURLOPT_RANGE);
REGISTER_CURL_CONSTANT("CURLOPT_TIMEOUT", CURLOPT_TIMEOUT);
REGISTER_CURL_CONSTANT("CURLOPT_POSTFIELDS", CURLOPT_POSTFIELDS);
REGISTER_CURL_CONSTANT("CURLOPT_REFERER", CURLOPT_REFERER);
REGISTER_CURL_CONSTANT("CURLOPT_USERAGENT", CURLOPT_USERAGENT);
REGISTER_CURL_CONSTANT("CURLOPT_FTPPORT", CURLOPT_FTPPORT);
REGISTER_CURL_CONSTANT("CURLOPT_LOW_SPEED_LIMIT", CURLOPT_LOW_SPEED_LIMIT);
REGISTER_CURL_CONSTANT("CURLOPT_LOW_SPEED_TIME", CURLOPT_LOW_SPEED_TIME);
REGISTER_CURL_CONSTANT("CURLOPT_RESUME_FROM", CURLOPT_RESUME_FROM);
REGISTER_CURL_CONSTANT("CURLOPT_COOKIE", CURLOPT_COOKIE);
REGISTER_CURL_CONSTANT("CURLOPT_SSLCERT", CURLOPT_SSLCERT);
REGISTER_CURL_CONSTANT("CURLOPT_SSLCERTPASSWD", CURLOPT_SSLCERTPASSWD);
REGISTER_CURL_CONSTANT("CURLOPT_WRITEHEADER", CURLOPT_WRITEHEADER);
REGISTER_CURL_CONSTANT("CURLOPT_COOKIEFILE", CURLOPT_COOKIEFILE);
REGISTER_CURL_CONSTANT("CURLOPT_SSLVERSION", CURLOPT_SSLVERSION);
REGISTER_CURL_CONSTANT("CURLOPT_TIMECONDITION", CURLOPT_TIMECONDITION);
REGISTER_CURL_CONSTANT("CURLOPT_TIMEVALUE", CURLOPT_TIMEVALUE);
REGISTER_CURL_CONSTANT("CURLOPT_CUSTOMREQUEST", CURLOPT_CUSTOMREQUEST);
REGISTER_CURL_CONSTANT("CURLOPT_STDERR", CURLOPT_STDERR);
REGISTER_CURL_CONSTANT("CURLOPT_TRANSFERTEXT", CURLOPT_TRANSFERTEXT);
REGISTER_CURL_CONSTANT("CURLOPT_RETURNTRANSFER", CURLOPT_RETURNTRANSFER);
REGISTER_CURL_CONSTANT("CURLOPT_QUOTE", CURLOPT_QUOTE);
REGISTER_CURL_CONSTANT("CURLOPT_POSTQUOTE", CURLOPT_POSTQUOTE);
REGISTER_CURL_CONSTANT("CURLOPT_INTERFACE", CURLOPT_INTERFACE);
REGISTER_CURL_CONSTANT("CURLOPT_KRB4LEVEL", CURLOPT_KRB4LEVEL);
REGISTER_CURL_CONSTANT("CURLOPT_HTTPPROXYTUNNEL", CURLOPT_HTTPPROXYTUNNEL);
REGISTER_CURL_CONSTANT("CURLOPT_FILETIME", CURLOPT_FILETIME);
REGISTER_CURL_CONSTANT("CURLOPT_WRITEFUNCTION", CURLOPT_WRITEFUNCTION);
REGISTER_CURL_CONSTANT("CURLOPT_READFUNCTION", CURLOPT_READFUNCTION);
REGISTER_CURL_CONSTANT("CURLOPT_PASSWDFUNCTION", CURLOPT_PASSWDFUNCTION);
REGISTER_CURL_CONSTANT("CURLOPT_HEADERFUNCTION", CURLOPT_HEADERFUNCTION);
REGISTER_CURL_CONSTANT("CURLOPT_MAXREDIRS", CURLOPT_MAXREDIRS);
REGISTER_CURL_CONSTANT("CURLOPT_MAXCONNECTS", CURLOPT_MAXCONNECTS);
REGISTER_CURL_CONSTANT("CURLOPT_CLOSEPOLICY", CURLOPT_CLOSEPOLICY);
REGISTER_CURL_CONSTANT("CURLOPT_FRESH_CONNECT", CURLOPT_FRESH_CONNECT);
REGISTER_CURL_CONSTANT("CURLOPT_FORBID_REUSE", CURLOPT_FORBID_REUSE);
REGISTER_CURL_CONSTANT("CURLOPT_RANDOM_FILE", CURLOPT_RANDOM_FILE);
REGISTER_CURL_CONSTANT("CURLOPT_EGDSOCKET", CURLOPT_EGDSOCKET);
REGISTER_CURL_CONSTANT("CURLOPT_CONNECTTIMEOUT", CURLOPT_CONNECTTIMEOUT);
REGISTER_CURL_CONSTANT("CURLOPT_SSL_VERIFYPEER", CURLOPT_SSL_VERIFYPEER);
REGISTER_CURL_CONSTANT("CURLOPT_CAINFO", CURLOPT_CAINFO);
REGISTER_CURL_CONSTANT("CURLOPT_BINARYTRANSFER", CURLOPT_BINARYTRANSFER);
REGISTER_CURL_CONSTANT(CURLOPT_PORT);
REGISTER_CURL_CONSTANT(CURLOPT_FILE);
REGISTER_CURL_CONSTANT(CURLOPT_INFILE);
REGISTER_CURL_CONSTANT(CURLOPT_INFILESIZE);
REGISTER_CURL_CONSTANT(CURLOPT_URL);
REGISTER_CURL_CONSTANT(CURLOPT_PROXY);
REGISTER_CURL_CONSTANT(CURLOPT_VERBOSE);
REGISTER_CURL_CONSTANT(CURLOPT_HEADER);
REGISTER_CURL_CONSTANT(CURLOPT_HTTPHEADER);
REGISTER_CURL_CONSTANT(CURLOPT_NOPROGRESS);
REGISTER_CURL_CONSTANT(CURLOPT_NOBODY);
REGISTER_CURL_CONSTANT(CURLOPT_FAILONERROR);
REGISTER_CURL_CONSTANT(CURLOPT_UPLOAD);
REGISTER_CURL_CONSTANT(CURLOPT_POST);
REGISTER_CURL_CONSTANT(CURLOPT_FTPLISTONLY);
REGISTER_CURL_CONSTANT(CURLOPT_FTPAPPEND);
REGISTER_CURL_CONSTANT(CURLOPT_NETRC);
REGISTER_CURL_CONSTANT(CURLOPT_FOLLOWLOCATION);
REGISTER_CURL_CONSTANT(CURLOPT_FTPASCII);
REGISTER_CURL_CONSTANT(CURLOPT_PUT);
REGISTER_CURL_CONSTANT(CURLOPT_MUTE);
REGISTER_CURL_CONSTANT(CURLOPT_USERPWD);
REGISTER_CURL_CONSTANT(CURLOPT_PROXYUSERPWD);
REGISTER_CURL_CONSTANT(CURLOPT_RANGE);
REGISTER_CURL_CONSTANT(CURLOPT_TIMEOUT);
REGISTER_CURL_CONSTANT(CURLOPT_POSTFIELDS);
REGISTER_CURL_CONSTANT(CURLOPT_REFERER);
REGISTER_CURL_CONSTANT(CURLOPT_USERAGENT);
REGISTER_CURL_CONSTANT(CURLOPT_FTPPORT);
REGISTER_CURL_CONSTANT(CURLOPT_LOW_SPEED_LIMIT);
REGISTER_CURL_CONSTANT(CURLOPT_LOW_SPEED_TIME);
REGISTER_CURL_CONSTANT(CURLOPT_RESUME_FROM);
REGISTER_CURL_CONSTANT(CURLOPT_COOKIE);
REGISTER_CURL_CONSTANT(CURLOPT_SSLCERT);
REGISTER_CURL_CONSTANT(CURLOPT_SSLCERTPASSWD);
REGISTER_CURL_CONSTANT(CURLOPT_WRITEHEADER);
REGISTER_CURL_CONSTANT(CURLOPT_SSL_VERIFYHOST);
REGISTER_CURL_CONSTANT(CURLOPT_COOKIEFILE);
REGISTER_CURL_CONSTANT(CURLOPT_SSLVERSION);
REGISTER_CURL_CONSTANT(CURLOPT_TIMECONDITION);
REGISTER_CURL_CONSTANT(CURLOPT_TIMEVALUE);
REGISTER_CURL_CONSTANT(CURLOPT_CUSTOMREQUEST);
REGISTER_CURL_CONSTANT(CURLOPT_STDERR);
REGISTER_CURL_CONSTANT(CURLOPT_TRANSFERTEXT);
REGISTER_CURL_CONSTANT(CURLOPT_RETURNTRANSFER);
REGISTER_CURL_CONSTANT(CURLOPT_QUOTE);
REGISTER_CURL_CONSTANT(CURLOPT_POSTQUOTE);
REGISTER_CURL_CONSTANT(CURLOPT_INTERFACE);
REGISTER_CURL_CONSTANT(CURLOPT_KRB4LEVEL);
REGISTER_CURL_CONSTANT(CURLOPT_HTTPPROXYTUNNEL);
REGISTER_CURL_CONSTANT(CURLOPT_FILETIME);
REGISTER_CURL_CONSTANT(CURLOPT_WRITEFUNCTION);
REGISTER_CURL_CONSTANT(CURLOPT_READFUNCTION);
REGISTER_CURL_CONSTANT(CURLOPT_PASSWDFUNCTION);
REGISTER_CURL_CONSTANT(CURLOPT_HEADERFUNCTION);
REGISTER_CURL_CONSTANT(CURLOPT_MAXREDIRS);
REGISTER_CURL_CONSTANT(CURLOPT_MAXCONNECTS);
REGISTER_CURL_CONSTANT(CURLOPT_CLOSEPOLICY);
REGISTER_CURL_CONSTANT(CURLOPT_FRESH_CONNECT);
REGISTER_CURL_CONSTANT(CURLOPT_FORBID_REUSE);
REGISTER_CURL_CONSTANT(CURLOPT_RANDOM_FILE);
REGISTER_CURL_CONSTANT(CURLOPT_EGDSOCKET);
REGISTER_CURL_CONSTANT(CURLOPT_CONNECTTIMEOUT);
REGISTER_CURL_CONSTANT(CURLOPT_SSL_VERIFYPEER);
REGISTER_CURL_CONSTANT(CURLOPT_CAINFO);
REGISTER_CURL_CONSTANT(CURLOPT_COOKIEJAR);
REGISTER_CURL_CONSTANT(CURLOPT_SSL_CIPHER_LIST);
REGISTER_CURL_CONSTANT(CURLOPT_BINARYTRANSFER);
/* Constants effecting the way CURLOPT_CLOSEPOLICY works */
REGISTER_CURL_CONSTANT("CURLCLOSEPOLICY_LEAST_RECENTLY_USED", CURLCLOSEPOLICY_LEAST_RECENTLY_USED);
REGISTER_CURL_CONSTANT("CURLCLOSEPOLICY_OLDEST", CURLCLOSEPOLICY_OLDEST);
REGISTER_CURL_CONSTANT(CURLCLOSEPOLICY_LEAST_RECENTLY_USED);
REGISTER_CURL_CONSTANT(CURLCLOSEPOLICY_LEAST_TRAFFIC);
REGISTER_CURL_CONSTANT(CURLCLOSEPOLICY_SLOWEST);
REGISTER_CURL_CONSTANT(CURLCLOSEPOLICY_CALLBACK);
REGISTER_CURL_CONSTANT(CURLCLOSEPOLICY_OLDEST);
/* Info constants */
REGISTER_CURL_CONSTANT("CURLINFO_EFFECTIVE_URL", CURLINFO_EFFECTIVE_URL);
REGISTER_CURL_CONSTANT("CURLINFO_HTTP_CODE", CURLINFO_HTTP_CODE);
REGISTER_CURL_CONSTANT("CURLINFO_HEADER_SIZE", CURLINFO_HEADER_SIZE);
REGISTER_CURL_CONSTANT("CURLINFO_REQUEST_SIZE", CURLINFO_REQUEST_SIZE);
REGISTER_CURL_CONSTANT("CURLINFO_TOTAL_TIME", CURLINFO_TOTAL_TIME);
REGISTER_CURL_CONSTANT("CURLINFO_NAMELOOKUP_TIME", CURLINFO_NAMELOOKUP_TIME);
REGISTER_CURL_CONSTANT("CURLINFO_CONNECT_TIME", CURLINFO_CONNECT_TIME);
REGISTER_CURL_CONSTANT("CURLINFO_PRETRANSFER_TIME", CURLINFO_PRETRANSFER_TIME);
REGISTER_CURL_CONSTANT("CURLINFO_SIZE_UPLOAD", CURLINFO_SIZE_UPLOAD);
REGISTER_CURL_CONSTANT("CURLINFO_SIZE_DOWNLOAD", CURLINFO_SIZE_DOWNLOAD);
REGISTER_CURL_CONSTANT("CURLINFO_SPEED_DOWNLOAD", CURLINFO_SPEED_DOWNLOAD);
REGISTER_CURL_CONSTANT("CURLINFO_SPEED_UPLOAD", CURLINFO_SPEED_UPLOAD);
REGISTER_CURL_CONSTANT("CURLINFO_FILETIME", CURLINFO_FILETIME);
REGISTER_CURL_CONSTANT(CURLINFO_EFFECTIVE_URL);
REGISTER_CURL_CONSTANT(CURLINFO_HTTP_CODE);
REGISTER_CURL_CONSTANT(CURLINFO_HEADER_SIZE);
REGISTER_CURL_CONSTANT(CURLINFO_REQUEST_SIZE);
REGISTER_CURL_CONSTANT(CURLINFO_TOTAL_TIME);
REGISTER_CURL_CONSTANT(CURLINFO_NAMELOOKUP_TIME);
REGISTER_CURL_CONSTANT(CURLINFO_CONNECT_TIME);
REGISTER_CURL_CONSTANT(CURLINFO_PRETRANSFER_TIME);
REGISTER_CURL_CONSTANT(CURLINFO_SIZE_UPLOAD);
REGISTER_CURL_CONSTANT(CURLINFO_SIZE_DOWNLOAD);
REGISTER_CURL_CONSTANT(CURLINFO_SPEED_DOWNLOAD);
REGISTER_CURL_CONSTANT(CURLINFO_SPEED_UPLOAD);
REGISTER_CURL_CONSTANT(CURLINFO_FILETIME);
REGISTER_CURL_CONSTANT(CURLINFO_SSL_VERIFYRESULT);
REGISTER_CURL_CONSTANT(CURLINFO_CONTENT_LENGTH_DOWNLOAD);
REGISTER_CURL_CONSTANT(CURLINFO_CONTENT_LENGTH_UPLOAD);
/* Error Constants */
REGISTER_CURL_CONSTANT("CURLE_OK", CURLE_OK);
REGISTER_CURL_CONSTANT("CURLE_UNSUPPORTED_PROTOCOL", CURLE_UNSUPPORTED_PROTOCOL);
REGISTER_CURL_CONSTANT("CURLE_FAILED_INIT", CURLE_FAILED_INIT);
REGISTER_CURL_CONSTANT("CURLE_URL_MALFORMAT", CURLE_URL_MALFORMAT);
REGISTER_CURL_CONSTANT("CURLE_URL_MALFORMAT_USER", CURLE_URL_MALFORMAT_USER);
REGISTER_CURL_CONSTANT("CURLE_COULDNT_RESOLVE_PROXY", CURLE_COULDNT_RESOLVE_PROXY);
REGISTER_CURL_CONSTANT("CURLE_COULDNT_RESOLVE_HOST", CURLE_COULDNT_RESOLVE_HOST);
REGISTER_CURL_CONSTANT("CURLE_COULDNT_CONNECT", CURLE_COULDNT_CONNECT);
REGISTER_CURL_CONSTANT("CURLE_FTP_WEIRD_SERVER_REPLY", CURLE_FTP_WEIRD_SERVER_REPLY);
REGISTER_CURL_CONSTANT("CURLE_FTP_ACCESS_DENIED", CURLE_FTP_ACCESS_DENIED);
REGISTER_CURL_CONSTANT("CURLE_FTP_USER_PASSWORD_INCORRECT", CURLE_FTP_USER_PASSWORD_INCORRECT);
REGISTER_CURL_CONSTANT("CURLE_FTP_WEIRD_PASS_REPLY", CURLE_FTP_WEIRD_PASS_REPLY);
REGISTER_CURL_CONSTANT("CURLE_FTP_WEIRD_USER_REPLY", CURLE_FTP_WEIRD_USER_REPLY);
REGISTER_CURL_CONSTANT("CURLE_FTP_WEIRD_PASV_REPLY", CURLE_FTP_WEIRD_PASV_REPLY);
REGISTER_CURL_CONSTANT("CURLE_FTP_WEIRD_227_FORMAT", CURLE_FTP_WEIRD_227_FORMAT);
REGISTER_CURL_CONSTANT("CURLE_FTP_CANT_GET_HOST", CURLE_FTP_CANT_GET_HOST);
REGISTER_CURL_CONSTANT("CURLE_FTP_CANT_RECONNECT", CURLE_FTP_CANT_RECONNECT);
REGISTER_CURL_CONSTANT("CURLE_FTP_COULDNT_SET_BINARY", CURLE_FTP_COULDNT_SET_BINARY);
REGISTER_CURL_CONSTANT("CURLE_PARTIAL_FILE", CURLE_PARTIAL_FILE);
REGISTER_CURL_CONSTANT("CURLE_FTP_COULDNT_RETR_FILE", CURLE_FTP_COULDNT_RETR_FILE);
REGISTER_CURL_CONSTANT("CURLE_FTP_WRITE_ERROR", CURLE_FTP_WRITE_ERROR);
REGISTER_CURL_CONSTANT("CURLE_FTP_QUOTE_ERROR", CURLE_FTP_QUOTE_ERROR);
REGISTER_CURL_CONSTANT("CURLE_HTTP_NOT_FOUND", CURLE_HTTP_NOT_FOUND);
REGISTER_CURL_CONSTANT("CURLE_WRITE_ERROR", CURLE_WRITE_ERROR);
REGISTER_CURL_CONSTANT("CURLE_MALFORMAT_USER", CURLE_MALFORMAT_USER);
REGISTER_CURL_CONSTANT("CURLE_FTP_COULDNT_STOR_FILE", CURLE_FTP_COULDNT_STOR_FILE);
REGISTER_CURL_CONSTANT("CURLE_READ_ERROR", CURLE_READ_ERROR);
REGISTER_CURL_CONSTANT("CURLE_OUT_OF_MEMORY", CURLE_OUT_OF_MEMORY);
REGISTER_CURL_CONSTANT("CURLE_OPERATION_TIMEOUTED", CURLE_OPERATION_TIMEOUTED);
REGISTER_CURL_CONSTANT("CURLE_FTP_COULDNT_SET_ASCII", CURLE_FTP_COULDNT_SET_ASCII);
REGISTER_CURL_CONSTANT("CURLE_FTP_PORT_FAILED", CURLE_FTP_PORT_FAILED);
REGISTER_CURL_CONSTANT("CURLE_FTP_COULDNT_USE_REST", CURLE_FTP_COULDNT_USE_REST);
REGISTER_CURL_CONSTANT("CURLE_FTP_COULDNT_GET_SIZE", CURLE_FTP_COULDNT_GET_SIZE);
REGISTER_CURL_CONSTANT("CURLE_HTTP_RANGE_ERROR", CURLE_HTTP_RANGE_ERROR);
REGISTER_CURL_CONSTANT("CURLE_HTTP_POST_ERROR", CURLE_HTTP_POST_ERROR);
REGISTER_CURL_CONSTANT("CURLE_SSL_CONNECT_ERROR", CURLE_SSL_CONNECT_ERROR);
REGISTER_CURL_CONSTANT("CURLE_FTP_BAD_DOWNLOAD_RESUME", CURLE_FTP_BAD_DOWNLOAD_RESUME);
REGISTER_CURL_CONSTANT("CURLE_FILE_COULDNT_READ_FILE", CURLE_FILE_COULDNT_READ_FILE);
REGISTER_CURL_CONSTANT("CURLE_LDAP_CANNOT_BIND", CURLE_LDAP_CANNOT_BIND);
REGISTER_CURL_CONSTANT("CURLE_LDAP_SEARCH_FAILED", CURLE_LDAP_SEARCH_FAILED);
REGISTER_CURL_CONSTANT("CURLE_LIBRARY_NOT_FOUND", CURLE_LIBRARY_NOT_FOUND);
REGISTER_CURL_CONSTANT("CURLE_FUNCTION_NOT_FOUND", CURLE_FUNCTION_NOT_FOUND);
REGISTER_CURL_CONSTANT("CURLE_ABORTED_BY_CALLBACK", CURLE_ABORTED_BY_CALLBACK);
REGISTER_CURL_CONSTANT("CURLE_BAD_FUNCTION_ARGUMENT", CURLE_BAD_FUNCTION_ARGUMENT);
REGISTER_CURL_CONSTANT("CURLE_BAD_CALLING_ORDER", CURLE_BAD_CALLING_ORDER);
REGISTER_CURL_CONSTANT("CURLE_HTTP_PORT_FAILED", CURLE_HTTP_PORT_FAILED);
REGISTER_CURL_CONSTANT("CURLE_BAD_PASSWORD_ENTERED", CURLE_BAD_PASSWORD_ENTERED);
REGISTER_CURL_CONSTANT("CURLE_TOO_MANY_REDIRECTS", CURLE_TOO_MANY_REDIRECTS);
REGISTER_CURL_CONSTANT("CURLE_UNKOWN_TELNET_OPTION", CURLE_UNKNOWN_TELNET_OPTION);
REGISTER_CURL_CONSTANT("CURLE_TELNET_OPTION_SYNTAX", CURLE_TELNET_OPTION_SYNTAX);
REGISTER_CURL_CONSTANT("CURLE_ALREADY_COMPLETE", CURLE_ALREADY_COMPLETE);
REGISTER_CURL_CONSTANT(CURLE_OK);
REGISTER_CURL_CONSTANT(CURLE_UNSUPPORTED_PROTOCOL);
REGISTER_CURL_CONSTANT(CURLE_FAILED_INIT);
REGISTER_CURL_CONSTANT(CURLE_URL_MALFORMAT);
REGISTER_CURL_CONSTANT(CURLE_URL_MALFORMAT_USER);
REGISTER_CURL_CONSTANT(CURLE_COULDNT_RESOLVE_PROXY);
REGISTER_CURL_CONSTANT(CURLE_COULDNT_RESOLVE_HOST);
REGISTER_CURL_CONSTANT(CURLE_COULDNT_CONNECT);
REGISTER_CURL_CONSTANT(CURLE_FTP_WEIRD_SERVER_REPLY);
REGISTER_CURL_CONSTANT(CURLE_FTP_ACCESS_DENIED);
REGISTER_CURL_CONSTANT(CURLE_FTP_USER_PASSWORD_INCORRECT);
REGISTER_CURL_CONSTANT(CURLE_FTP_WEIRD_PASS_REPLY);
REGISTER_CURL_CONSTANT(CURLE_FTP_WEIRD_USER_REPLY);
REGISTER_CURL_CONSTANT(CURLE_FTP_WEIRD_PASV_REPLY);
REGISTER_CURL_CONSTANT(CURLE_FTP_WEIRD_227_FORMAT);
REGISTER_CURL_CONSTANT(CURLE_FTP_CANT_GET_HOST);
REGISTER_CURL_CONSTANT(CURLE_FTP_CANT_RECONNECT);
REGISTER_CURL_CONSTANT(CURLE_FTP_COULDNT_SET_BINARY);
REGISTER_CURL_CONSTANT(CURLE_PARTIAL_FILE);
REGISTER_CURL_CONSTANT(CURLE_FTP_COULDNT_RETR_FILE);
REGISTER_CURL_CONSTANT(CURLE_FTP_WRITE_ERROR);
REGISTER_CURL_CONSTANT(CURLE_FTP_QUOTE_ERROR);
REGISTER_CURL_CONSTANT(CURLE_HTTP_NOT_FOUND);
REGISTER_CURL_CONSTANT(CURLE_WRITE_ERROR);
REGISTER_CURL_CONSTANT(CURLE_MALFORMAT_USER);
REGISTER_CURL_CONSTANT(CURLE_FTP_COULDNT_STOR_FILE);
REGISTER_CURL_CONSTANT(CURLE_READ_ERROR);
REGISTER_CURL_CONSTANT(CURLE_OUT_OF_MEMORY);
REGISTER_CURL_CONSTANT(CURLE_OPERATION_TIMEOUTED);
REGISTER_CURL_CONSTANT(CURLE_FTP_COULDNT_SET_ASCII);
REGISTER_CURL_CONSTANT(CURLE_FTP_PORT_FAILED);
REGISTER_CURL_CONSTANT(CURLE_FTP_COULDNT_USE_REST);
REGISTER_CURL_CONSTANT(CURLE_FTP_COULDNT_GET_SIZE);
REGISTER_CURL_CONSTANT(CURLE_HTTP_RANGE_ERROR);
REGISTER_CURL_CONSTANT(CURLE_HTTP_POST_ERROR);
REGISTER_CURL_CONSTANT(CURLE_SSL_CONNECT_ERROR);
REGISTER_CURL_CONSTANT(CURLE_FTP_BAD_DOWNLOAD_RESUME);
REGISTER_CURL_CONSTANT(CURLE_FILE_COULDNT_READ_FILE);
REGISTER_CURL_CONSTANT(CURLE_LDAP_CANNOT_BIND);
REGISTER_CURL_CONSTANT(CURLE_LDAP_SEARCH_FAILED);
REGISTER_CURL_CONSTANT(CURLE_LIBRARY_NOT_FOUND);
REGISTER_CURL_CONSTANT(CURLE_FUNCTION_NOT_FOUND);
REGISTER_CURL_CONSTANT(CURLE_ABORTED_BY_CALLBACK);
REGISTER_CURL_CONSTANT(CURLE_BAD_FUNCTION_ARGUMENT);
REGISTER_CURL_CONSTANT(CURLE_BAD_CALLING_ORDER);
REGISTER_CURL_CONSTANT(CURLE_HTTP_PORT_FAILED);
REGISTER_CURL_CONSTANT(CURLE_BAD_PASSWORD_ENTERED);
REGISTER_CURL_CONSTANT(CURLE_TOO_MANY_REDIRECTS);
REGISTER_CURL_CONSTANT(CURLE_UNKNOWN_TELNET_OPTION);
REGISTER_CURL_CONSTANT(CURLE_TELNET_OPTION_SYNTAX);
REGISTER_CURL_CONSTANT(CURLE_OBSOLETE);
REGISTER_CURL_CONSTANT(CURLE_SSL_PEER_CERTIFICATE);
#if HAVE_OPENSSL_EXT /* OpenSSL already takes care of initialization */
startup_options = CURL_GLOBAL_NOTHING;
#else
startup_options = CURL_GLOBAL_ALL;
#endif
if (curl_global_init(startup_options) != CURLE_OK) {
return FAILURE;
}
return SUCCESS;
}
/* }}} */
/* {{{ PHP_MSHUTDOWN_FUNCTION
*/
PHP_MSHUTDOWN_FUNCTION(curl)
{
curl_global_cleanup();
return SUCCESS;
}
@@ -277,6 +311,7 @@ static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
zval *argv[2];
zval *retval;
int error;
TSRMLS_FETCH();
MAKE_STD_ZVAL(argv[0]);
MAKE_STD_ZVAL(argv[1]);
@@ -291,7 +326,7 @@ static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
t->func,
retval, 2, argv TSRMLS_CC);
if (error == FAILURE) {
php_error(E_WARNING, "Cannot call the CURLOPT_WRITEFUNCTION");
php_error(E_WARNING, "Couldn't call the CURLOPT_WRITEFUNCTION");
length = -1;
}
else {
@@ -317,7 +352,6 @@ static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
php_curl *ch = (php_curl *) ctx;
php_curl_read *t = ch->handlers->read;
int length = -1;
TSRMLS_FETCH();
switch (t->method) {
case PHP_CURL_DIRECT:
@@ -328,6 +362,7 @@ static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
zval *retval;
int length;
int error;
TSRMLS_FETCH();
MAKE_STD_ZVAL(argv[0]);
MAKE_STD_ZVAL(argv[1]);
@@ -393,6 +428,7 @@ static size_t curl_write_header(char *data, size_t size, size_t nmemb, void *ctx
case PHP_CURL_USER: {
zval *argv[2];
zval *retval;
TSRMLS_FETCH();
MAKE_STD_ZVAL(argv[0]);
MAKE_STD_ZVAL(argv[1]);
@@ -435,7 +471,7 @@ static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
php_curl *ch = (php_curl *) ctx;
zval *func = ch->handlers->passwd;
zval *argv[3];
zval *retval;
zval *retval = NULL;
int error;
int ret = 0;
TSRMLS_FETCH();
@@ -521,6 +557,7 @@ static void alloc_curl_handle(php_curl **ch)
(*ch)->handlers->write = ecalloc(1, sizeof(php_curl_write));
(*ch)->handlers->write_header = ecalloc(1, sizeof(php_curl_write));
(*ch)->handlers->read = ecalloc(1, sizeof(php_curl_read));
(*ch)->performed = 0;
memset(&(*ch)->err, 0, sizeof((*ch)->err));
zend_llist_init(&(*ch)->to_free.str, sizeof(char *),
@@ -631,6 +668,7 @@ PHP_FUNCTION(curl_setopt)
case CURLOPT_FRESH_CONNECT:
case CURLOPT_FORBID_REUSE:
case CURLOPT_CONNECTTIMEOUT:
case CURLOPT_SSL_VERIFYHOST:
case CURLOPT_SSL_VERIFYPEER:
convert_to_long_ex(zvalue);
error = curl_easy_setopt(ch->cp, option, Z_LVAL_PP(zvalue));
@@ -652,7 +690,9 @@ PHP_FUNCTION(curl_setopt)
case CURLOPT_KRB4LEVEL:
case CURLOPT_RANDOM_FILE:
case CURLOPT_EGDSOCKET:
case CURLOPT_CAINFO: {
case CURLOPT_CAINFO:
case CURLOPT_COOKIEJAR:
case CURLOPT_SSL_CIPHER_LIST: {
char *copystr = NULL;
convert_to_string_ex(zvalue);
@@ -667,9 +707,12 @@ PHP_FUNCTION(curl_setopt)
case CURLOPT_INFILE:
case CURLOPT_WRITEHEADER:
case CURLOPT_STDERR: {
FILE *fp;
FILE *fp = NULL;
ZEND_FETCH_RESOURCE(fp, FILE *, zvalue, -1, "File-Handle", php_file_le_fopen());
if (!fp) {
RETURN_FALSE;
}
error = CURLE_OK;
switch (option) {
case CURLOPT_FILE:
@@ -730,7 +773,11 @@ PHP_FUNCTION(curl_setopt)
HashTable *postfields;
struct HttpPost *first = NULL;
struct HttpPost *last = NULL;
char *postval;
char *string_key = NULL;
ulong num_key;
uint string_key_len;
postfields = HASH_OF(*zvalue);
if (! postfields) {
php_error(E_WARNING, "Couldn't get HashTable in CURLOPT_POSTFIELDS");
@@ -740,19 +787,20 @@ PHP_FUNCTION(curl_setopt)
for (zend_hash_internal_pointer_reset(postfields);
zend_hash_get_current_data(postfields, (void **) &current) == SUCCESS;
zend_hash_move_forward(postfields)) {
char *string_key = NULL;
char *postval = NULL;
ulong num_key;
SEPARATE_ZVAL(current);
convert_to_string_ex(current);
zend_hash_get_current_key(postfields, &string_key, &num_key, 0);
postval = emalloc(strlen(string_key) + Z_STRLEN_PP(current) + 1);
sprintf(postval, "%s=%s", string_key, Z_STRVAL_PP(current));
error = curl_formparse(postval, &first, &last);
zend_hash_get_current_key_ex(postfields, &string_key, &string_key_len, &num_key, 0, NULL);
postval = Z_STRVAL_PP(current);
if (*postval == '@') {
error = curl_formadd(&first, &last, CURLFORM_COPYNAME, string_key,
CURLFORM_FILE, ++postval, CURLFORM_END);
}
else {
error = curl_formadd(&first, &last, CURLFORM_COPYNAME, string_key,
CURLFORM_PTRCONTENTS, postval, CURLFORM_END);
}
}
if (error != CURLE_OK) {
@@ -779,26 +827,26 @@ PHP_FUNCTION(curl_setopt)
case CURLOPT_QUOTE:
case CURLOPT_POSTQUOTE: {
zval **current;
HashTable *hash;
HashTable *ph;
struct curl_slist *slist = NULL;
hash = HASH_OF(*zvalue);
if (! hash) {
ph = HASH_OF(*zvalue);
if (! ph) {
php_error(E_WARNING,
"You must pass either an object or an array with the CURLOPT_HTTPHEADER, CURLOPT_QUOTE and CURLOPT_POSTQUOTE arguments");
"You must pass either an object or an array with the CURLOPT_HTTPHEADER,"
"CURLOPT_QUOTE and CURLOPT_POSTQUOTE arguments");
RETURN_FALSE;
}
for (zend_hash_internal_pointer_reset(hash);
zend_hash_get_current_data(hash, (void **) &current) == SUCCESS;
zend_hash_move_forward(hash)) {
for (zend_hash_internal_pointer_reset(ph);
zend_hash_get_current_data(ph, (void **) &current) == SUCCESS;
zend_hash_move_forward(ph)) {
char *indiv = NULL;
SEPARATE_ZVAL(current);
convert_to_string_ex(current);
indiv = estrndup(Z_STRVAL_PP(current), Z_STRLEN_PP(current) + 1);
indiv[Z_STRLEN_PP(current)] = '\0';
slist = curl_slist_append(slist, indiv);
if (! slist) {
efree(indiv);
@@ -838,6 +886,11 @@ PHP_FUNCTION(curl_exec)
}
ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl);
if (ch->performed) {
php_error(E_WARNING, "Multiple executions on the same handle are not currently supported, please upgrade to the next version of PHP");
RETURN_FALSE;
}
error = curl_easy_perform(ch->cp);
if (error != CURLE_OK) {
if (ch->handlers->write->buf.c)
@@ -846,6 +899,8 @@ PHP_FUNCTION(curl_exec)
RETURN_FALSE;
}
ch->performed = 1;
if (ch->handlers->write->method == PHP_CURL_RETURN) {
if (ch->handlers->write->type != PHP_CURL_BINARY)
smart_str_0(&ch->handlers->write->buf);
@@ -856,6 +911,10 @@ PHP_FUNCTION(curl_exec)
}
/* }}} */
#define CAAL(s, v) add_assoc_long_ex(return_value, s, sizeof(s), v);
#define CAAD(s, v) add_assoc_double_ex(return_value, s, sizeof(s), v);
#define CAAS(s, v) add_assoc_string_ex(return_value, s, sizeof(s), v, 1);
/* {{{ proto string curl_getinfo(int ch, int opt)
Get information regarding a specific transfer */
PHP_FUNCTION(curl_getinfo)
@@ -880,31 +939,37 @@ PHP_FUNCTION(curl_getinfo)
array_init(return_value);
curl_easy_getinfo(ch->cp, CURLINFO_EFFECTIVE_URL, &url);
add_assoc_string(return_value, "url", url, 1);
CAAS("url", url);
curl_easy_getinfo(ch->cp, CURLINFO_HTTP_CODE, &l_code);
add_assoc_long(return_value, "http_code", l_code);
CAAL("http_code", l_code);
curl_easy_getinfo(ch->cp, CURLINFO_HEADER_SIZE, &l_code);
add_assoc_long(return_value, "header_size", l_code);
CAAL("header_size", l_code);
curl_easy_getinfo(ch->cp, CURLINFO_REQUEST_SIZE, &l_code);
add_assoc_long(return_value, "request_size", l_code);
CAAL("request_size", l_code);
curl_easy_getinfo(ch->cp, CURLINFO_FILETIME, &l_code);
add_assoc_long(return_value, "filetime", l_code);
CAAL("filetime", l_code);
curl_easy_getinfo(ch->cp, CURLINFO_SSL_VERIFYRESULT, &l_code);
CAAL("ssl_verify_result", l_code);
curl_easy_getinfo(ch->cp, CURLINFO_TOTAL_TIME, &d_code);
add_assoc_double(return_value, "total_time", d_code);
CAAD("total_time", d_code);
curl_easy_getinfo(ch->cp, CURLINFO_NAMELOOKUP_TIME, &d_code);
add_assoc_double(return_value, "namelookup_time", d_code);
CAAD("namelookup_time", d_code);
curl_easy_getinfo(ch->cp, CURLINFO_CONNECT_TIME, &d_code);
add_assoc_double(return_value, "connect_time", d_code);
CAAD("connect_time", d_code);
curl_easy_getinfo(ch->cp, CURLINFO_PRETRANSFER_TIME, &d_code);
add_assoc_double(return_value, "pretransfer_time", d_code);
CAAD("pretransfer_time", d_code);
curl_easy_getinfo(ch->cp, CURLINFO_SIZE_UPLOAD, &d_code);
add_assoc_double(return_value, "size_upload", d_code);
CAAD("size_upload", d_code);
curl_easy_getinfo(ch->cp, CURLINFO_SIZE_DOWNLOAD, &d_code);
add_assoc_double(return_value, "size_download", d_code);
CAAD("size_download", d_code);
curl_easy_getinfo(ch->cp, CURLINFO_SPEED_DOWNLOAD, &d_code);
add_assoc_double(return_value, "speed_download", d_code);
CAAD("speed_download", d_code);
curl_easy_getinfo(ch->cp, CURLINFO_SPEED_UPLOAD, &d_code);
add_assoc_double(return_value, "speed_upload", d_code);
CAAD("speed_upload", d_code);
curl_easy_getinfo(ch->cp, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &d_code);
CAAD("download_content_length", d_code);
curl_easy_getinfo(ch->cp, CURLINFO_CONTENT_LENGTH_UPLOAD, &d_code);
CAAD("upload_content_length", d_code);
} else {
option = Z_LVAL_PP(zoption);
switch (option) {
@@ -919,7 +984,8 @@ PHP_FUNCTION(curl_getinfo)
case CURLINFO_HTTP_CODE:
case CURLINFO_HEADER_SIZE:
case CURLINFO_REQUEST_SIZE:
case CURLINFO_FILETIME: {
case CURLINFO_FILETIME:
case CURLINFO_SSL_VERIFYRESULT: {
long code;
curl_easy_getinfo(ch->cp, option, &code);
@@ -934,7 +1000,9 @@ PHP_FUNCTION(curl_getinfo)
case CURLINFO_SIZE_UPLOAD:
case CURLINFO_SIZE_DOWNLOAD:
case CURLINFO_SPEED_DOWNLOAD:
case CURLINFO_SPEED_UPLOAD: {
case CURLINFO_SPEED_UPLOAD:
case CURLINFO_CONTENT_LENGTH_DOWNLOAD:
case CURLINFO_CONTENT_LENGTH_UPLOAD: {
double code;
curl_easy_getinfo(ch->cp, option, &code);
@@ -1030,6 +1098,6 @@ static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC)
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 tw=78 fdm=marker
* vim<600: sw=4 ts=4 tw=78
* vim600: noet sw=4 ts=4 fdm=marker
* vim<600: noet sw=4 ts=4
*/
+2
View File
@@ -41,6 +41,7 @@ extern zend_module_entry curl_module_entry;
#define CURLOPT_BINARYTRANSFER 19914
PHP_MINIT_FUNCTION(curl);
PHP_MSHUTDOWN_FUNCTION(curl);
PHP_MINFO_FUNCTION(curl);
PHP_FUNCTION(curl_version);
PHP_FUNCTION(curl_init);
@@ -90,6 +91,7 @@ typedef struct {
struct _php_curl_error err;
struct _php_curl_free to_free;
long id;
int performed;
} php_curl;
+2
View File
@@ -45,6 +45,7 @@ function_entry cybercash_functions[] = {
/* {{{ cybercash_module_entry
*/
zend_module_entry cybercash_module_entry = {
STANDARD_MODULE_HEADER,
"cybercash",
cybercash_functions,
NULL,
@@ -52,6 +53,7 @@ zend_module_entry cybercash_module_entry = {
NULL,
NULL,
PHP_MINFO(cybercash),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES,
};
/* }}} */
+2
View File
@@ -48,6 +48,7 @@ function_entry cybermut_functions[] = {
/* {{{ cybermut_module_entry
*/
zend_module_entry cybermut_module_entry = {
STANDARD_MODULE_HEADER,
"cybermut",
cybermut_functions,
PHP_MINIT(cybermut),
@@ -55,6 +56,7 @@ zend_module_entry cybermut_module_entry = {
NULL,
NULL,
PHP_MINFO(cybermut),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
/* }}} */
+2
View File
@@ -48,6 +48,7 @@ function_entry cyrus_functions[] = {
};
zend_module_entry cyrus_module_entry = {
STANDARD_MODULE_HEADER,
"cyrus",
cyrus_functions,
PHP_MINIT(cyrus),
@@ -55,6 +56,7 @@ zend_module_entry cyrus_module_entry = {
NULL,
NULL,
PHP_MINFO(cyrus),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
+10 -1
View File
@@ -1234,7 +1234,16 @@ function_entry dbm_functions[] = {
/* }}} */
zend_module_entry dbm_module_entry = {
"db", dbm_functions, PHP_MINIT(db), PHP_MSHUTDOWN(db), PHP_RINIT(db), NULL, PHP_MINFO(db), STANDARD_MODULE_PROPERTIES
STANDARD_MODULE_HEADER,
"db",
dbm_functions,
PHP_MINIT(db),
PHP_MSHUTDOWN(db),
PHP_RINIT(db),
NULL,
PHP_MINFO(db),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
#ifdef COMPILE_DL_DB
+6 -2
View File
@@ -60,11 +60,15 @@ static PHP_MSHUTDOWN_FUNCTION(dba);
static PHP_MINFO_FUNCTION(dba);
zend_module_entry dba_module_entry = {
"dba", dba_functions,
STANDARD_MODULE_HEADER,
"dba",
dba_functions,
PHP_MINIT(dba),
PHP_MSHUTDOWN(dba),
NULL, NULL,
NULL,
NULL,
PHP_MINFO(dba),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
+29 -6
View File
@@ -321,7 +321,7 @@ PHP_FUNCTION(dbase_add_record)
Replaces a record to the database */
PHP_FUNCTION(dbase_replace_record)
{
pval *dbh_id, *fields, *field, *recnum;
pval *dbh_id, *fields, **field, *recnum;
dbhead_t *dbh;
int dbh_type;
@@ -368,8 +368,8 @@ PHP_FUNCTION(dbase_replace_record)
efree(cp);
RETURN_FALSE;
}
convert_to_string(field);
sprintf(t_cp, cur_f->db_format, field->value.str.val);
convert_to_string_ex(field);
sprintf(t_cp, cur_f->db_format, Z_STRVAL_PP(field));
t_cp += cur_f->db_flen;
}
@@ -431,6 +431,8 @@ PHP_FUNCTION(dbase_get_record)
dbfield_t *dbf, *cur_f;
char *data, *fnp, *str_value;
size_t cursize = 0;
long overflow_test;
int errno_save;
DBase_TLS_VARS;
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &dbh_id, &record)==FAILURE) {
@@ -475,7 +477,16 @@ PHP_FUNCTION(dbase_get_record)
break;
case 'N':
if (cur_f->db_fdc == 0) {
add_next_index_long(return_value, strtol(str_value, NULL, 10));
/* Large integers in dbase can be larger than long */
errno_save = errno;
overflow_test = strtol(str_value, NULL, 10);
if (errno == ERANGE) {
/* If the integer is too large, keep it as string */
add_next_index_string(return_value, str_value, 1);
} else {
add_next_index_long(return_value, overflow_test);
}
errno = errno_save;
} else {
add_next_index_double(return_value, atof(str_value));
}
@@ -527,6 +538,8 @@ PHP_FUNCTION(dbase_get_record_with_names)
int dbh_type;
dbfield_t *dbf, *cur_f;
char *data, *fnp, *str_value;
long overflow_test;
int errno_save;
DBase_TLS_VARS;
if (ZEND_NUM_ARGS() != 2 || getParameters(ht, 2, &dbh_id, &record)==FAILURE) {
@@ -566,7 +579,16 @@ PHP_FUNCTION(dbase_get_record_with_names)
break;
case 'N':
if (cur_f->db_fdc == 0) {
add_assoc_long(return_value, cur_f->db_fname, strtol(str_value, NULL, 10));
/* Large integers in dbase can be larger than long */
errno_save = errno;
overflow_test = strtol(str_value, NULL, 10);
if (errno == ERANGE) {
/* If the integer is too large, keep it as string */
add_assoc_string(return_value, cur_f->db_fname, str_value, 1);
} else {
add_assoc_long(return_value, cur_f->db_fname, overflow_test);
}
errno = errno_save;
} else {
add_assoc_double(return_value, cur_f->db_fname, atof(str_value));
}
@@ -785,7 +807,8 @@ function_entry dbase_functions[] = {
/* }}} */
zend_module_entry dbase_module_entry = {
"dbase", dbase_functions, PHP_MINIT(dbase), PHP_MSHUTDOWN(dbase), NULL, NULL, NULL, STANDARD_MODULE_PROPERTIES
STANDARD_MODULE_HEADER,
"dbase", dbase_functions, PHP_MINIT(dbase), PHP_MSHUTDOWN(dbase), NULL, NULL, NULL, NO_VERSION_YET, STANDARD_MODULE_PROPERTIES
};
+142 -94
View File
@@ -18,9 +18,15 @@
*/
#include "php.h"
#include "ext/standard/info.h"
#include "php_ini.h"
#include "php_dbplus.h"
#include <saccess.h>
#include <relation.h>
#include <dblight.h>
/* If you declare any globals in php_dbplus.h uncomment this:
ZEND_DECLARE_MODULE_GLOBALS(dbplus)
*/
@@ -38,17 +44,17 @@ int le_dbplus_tupel;
void dbplus_destruct_relation(zend_rsrc_list_entry *rsrc TSRMLS_DC)
{
relf *conn = (relf *)(rsrc->ptr);
relf *conn = (relf *)(rsrc->ptr);
cdb_close(conn);
cdb_close(conn);
}
void dbplus_destruct_tupel(zend_rsrc_list_entry *rsrc TSRMLS_DC)
{
tuple *t = (tuple *)(rsrc->ptr);
tuple *t = (tuple *)(rsrc->ptr);
efree(t);
efree(t);
}
/* }}} */
@@ -58,54 +64,53 @@ void dbplus_destruct_tupel(zend_rsrc_list_entry *rsrc TSRMLS_DC)
/* Every user visible function must have an entry in dbplus_functions[].
*/
function_entry dbplus_functions[] = {
PHP_FE(dbplus_add, NULL)
PHP_FE(dbplus_aql, NULL)
PHP_FE(dbplus_change, NULL)
PHP_FE(dbplus_chdir, NULL)
PHP_FE(dbplus_close, NULL)
PHP_FE(dbplus_curr, NULL)
PHP_FE(dbplus_errno, NULL)
PHP_FE(dbplus_errcode, NULL)
PHP_FE(dbplus_find, NULL)
PHP_FE(dbplus_first, NULL)
PHP_FE(dbplus_flush, NULL)
PHP_FE(dbplus_freealllocks, NULL)
PHP_FE(dbplus_freelock, NULL)
PHP_FE(dbplus_freerlocks, NULL)
PHP_FE(dbplus_getlock, NULL)
PHP_FE(dbplus_getunique, NULL)
PHP_FE(dbplus_info, NULL)
PHP_FE(dbplus_last, NULL)
PHP_FE(dbplus_next, NULL)
PHP_FE(dbplus_open, NULL)
PHP_FE(dbplus_prev, NULL)
PHP_FE(dbplus_rchperm, NULL)
PHP_FE(dbplus_rcreate, NULL)
PHP_FE(dbplus_rcrtexact, NULL)
PHP_FE(dbplus_rcrtlike, NULL)
PHP_FE(dbplus_resolve, NULL)
PHP_FE(dbplus_restorepos, NULL)
PHP_FE(dbplus_rkeys, NULL)
PHP_FE(dbplus_ropen, NULL)
PHP_FE(dbplus_rquery, NULL)
PHP_FE(dbplus_rrename, NULL)
PHP_FE(dbplus_rsecindex, NULL)
PHP_FE(dbplus_runlink, NULL)
PHP_FE(dbplus_rzap, NULL)
PHP_FE(dbplus_savepos, NULL)
PHP_FE(dbplus_setindex, NULL)
PHP_FE(dbplus_setindexbynumber, NULL)
PHP_FE(dbplus_sql, NULL)
PHP_FE(dbplus_tcl, NULL)
PHP_FE(dbplus_tremove, NULL)
PHP_FE(dbplus_undo, NULL)
PHP_FE(dbplus_undoprepare, NULL)
PHP_FE(dbplus_unlockrel, NULL)
PHP_FE(dbplus_unselect, NULL)
PHP_FE(dbplus_update, NULL)
PHP_FE(dbplus_xlockrel, NULL)
PHP_FE(dbplus_xunlockrel, NULL)
{NULL, NULL, NULL} /* Must be the last line in dbplus_functions[] */
PHP_FE(dbplus_add, NULL)
PHP_FE(dbplus_aql, NULL)
PHP_FE(dbplus_chdir, NULL)
PHP_FE(dbplus_close, NULL)
PHP_FE(dbplus_curr, NULL)
PHP_FE(dbplus_errno, NULL)
PHP_FE(dbplus_errcode, NULL)
PHP_FE(dbplus_find, NULL)
PHP_FE(dbplus_first, NULL)
PHP_FE(dbplus_flush, NULL)
PHP_FE(dbplus_freealllocks, NULL)
PHP_FE(dbplus_freelock, NULL)
PHP_FE(dbplus_freerlocks, NULL)
PHP_FE(dbplus_getlock, NULL)
PHP_FE(dbplus_getunique, NULL)
PHP_FE(dbplus_info, NULL)
PHP_FE(dbplus_last, NULL)
PHP_FE(dbplus_next, NULL)
PHP_FE(dbplus_open, NULL)
PHP_FE(dbplus_prev, NULL)
PHP_FE(dbplus_rchperm, NULL)
PHP_FE(dbplus_rcreate, NULL)
PHP_FE(dbplus_rcrtexact, NULL)
PHP_FE(dbplus_rcrtlike, NULL)
PHP_FE(dbplus_resolve, NULL)
PHP_FE(dbplus_restorepos, NULL)
PHP_FE(dbplus_rkeys, NULL)
PHP_FE(dbplus_ropen, NULL)
PHP_FE(dbplus_rquery, NULL)
PHP_FE(dbplus_rrename, NULL)
PHP_FE(dbplus_rsecindex, NULL)
PHP_FE(dbplus_runlink, NULL)
PHP_FE(dbplus_rzap, NULL)
PHP_FE(dbplus_savepos, NULL)
PHP_FE(dbplus_setindex, NULL)
PHP_FE(dbplus_setindexbynumber, NULL)
PHP_FE(dbplus_sql, NULL)
PHP_FE(dbplus_tcl, NULL)
PHP_FE(dbplus_tremove, NULL)
PHP_FE(dbplus_undo, NULL)
PHP_FE(dbplus_undoprepare, NULL)
PHP_FE(dbplus_unlockrel, NULL)
PHP_FE(dbplus_unselect, NULL)
PHP_FE(dbplus_update, NULL)
PHP_FE(dbplus_xlockrel, NULL)
PHP_FE(dbplus_xunlockrel, NULL)
{NULL, NULL, NULL} /* Must be the last line in dbplus_functions[] */
};
/* }}} */
@@ -113,14 +118,16 @@ function_entry dbplus_functions[] = {
/* {{{ module entry */
zend_module_entry dbplus_module_entry = {
"dbplus",
dbplus_functions,
PHP_MINIT(dbplus),
PHP_MSHUTDOWN(dbplus),
PHP_RINIT(dbplus), /* Replace with NULL if there's nothing to do at request start */
PHP_RSHUTDOWN(dbplus), /* Replace with NULL if there's nothing to do at request end */
PHP_MINFO(dbplus),
STANDARD_MODULE_PROPERTIES
STANDARD_MODULE_HEADER,
"dbplus",
dbplus_functions,
PHP_MINIT(dbplus),
PHP_MSHUTDOWN(dbplus),
PHP_RINIT(dbplus), /* Replace with NULL if there's nothing to do at request start */
PHP_RSHUTDOWN(dbplus), /* Replace with NULL if there's nothing to do at request end */
PHP_MINFO(dbplus),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
/* }}} */
@@ -138,11 +145,52 @@ PHP_INI_END()
PHP_MINIT_FUNCTION(dbplus)
{
/* resource id for cdb connections */
le_dbplus_relation = zend_register_list_destructors_ex(dbplus_destruct_relation, NULL, "dbplus_relation", module_number);
le_dbplus_tupel = zend_register_list_destructors_ex(dbplus_destruct_tupel , NULL, "dbplus_tuple" , module_number);
/* resource id for cdb connections */
le_dbplus_relation = zend_register_list_destructors_ex(dbplus_destruct_relation, NULL, "dbplus_relation", module_number);
le_dbplus_tupel = zend_register_list_destructors_ex(dbplus_destruct_tupel , NULL, "dbplus_tuple" , module_number);
return SUCCESS;
/* constants for DBPLUS error codes */
REGISTER_LONG_CONSTANT("DBPLUS_ERR_NOERR", ERR_NOERR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_DUPLICATE", ERR_DUPLICATE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_EOSCAN", ERR_EOSCAN, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_EMPTY", ERR_EMPTY, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_CLOSE", ERR_CLOSE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_WLOCKED", ERR_WLOCKED, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_LOCKED", ERR_LOCKED, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_NOLOCK", ERR_NOLOCK, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_READ", ERR_READ, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_WRITE", ERR_WRITE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_CREATE", ERR_CREATE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_LSEEK", ERR_LSEEK, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_LENGTH", ERR_LENGTH, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_OPEN", ERR_OPEN, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_WOPEN", ERR_WOPEN, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_MAGIC", ERR_MAGIC, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_VERSION", ERR_VERSION, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_PGSIZE", ERR_PGSIZE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_CRC", ERR_CRC, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_PIPE", ERR_PIPE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_NIDX", ERR_NIDX, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_MALLOC", ERR_MALLOC, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_NUSERS", ERR_NUSERS, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_PREEXIT", ERR_PREEXIT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_ONTRAP", ERR_ONTRAP, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_PREPROC", ERR_PREPROC, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_DBPARSE", ERR_DBPARSE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_DBRUNERR", ERR_DBRUNERR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_DBPREEXIT", ERR_DBPREEXIT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_WAIT", ERR_WAIT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_CORRUPT_TUPLE", ERR_CORRUPT_TUPLE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_WARNING0", ERR_WARNING0, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_PANIC", ERR_PANIC, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_FIFO", ERR_FIFO, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_PERM", ERR_PERM, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_TCL", ERR_TCL, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_RESTRICTED", ERR_RESTRICTED, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_USER", ERR_USER, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("DBPLUS_ERR_UNKNOWN", ERR_UNKNOWN, CONST_CS | CONST_PERSISTENT);
return SUCCESS;
}
/* }}} */
@@ -151,7 +199,7 @@ PHP_MINIT_FUNCTION(dbplus)
PHP_MSHUTDOWN_FUNCTION(dbplus)
{
return SUCCESS;
return SUCCESS;
}
/* }}} */
@@ -161,7 +209,7 @@ PHP_MSHUTDOWN_FUNCTION(dbplus)
/* Remove if there's nothing to do at request start */
PHP_RINIT_FUNCTION(dbplus)
{
return SUCCESS;
return SUCCESS;
}
/* }}} */
@@ -171,7 +219,7 @@ PHP_RINIT_FUNCTION(dbplus)
/* Remove if there's nothing to do at request end */
PHP_RSHUTDOWN_FUNCTION(dbplus)
{
return SUCCESS;
return SUCCESS;
}
/* }}} */
@@ -180,13 +228,13 @@ PHP_RSHUTDOWN_FUNCTION(dbplus)
PHP_MINFO_FUNCTION(dbplus)
{
php_info_print_table_start();
php_info_print_table_header(2, "dbplus support", "enabled");
php_info_print_table_end();
php_info_print_table_start();
php_info_print_table_header(2, "dbplus support", "enabled");
php_info_print_table_end();
/* Remove comments if you have entries in php.ini
DISPLAY_INI_ENTRIES();
*/
/* Remove comments if you have entries in php.ini
DISPLAY_INI_ENTRIES();
*/
}
/* }}} */
@@ -197,24 +245,24 @@ PHP_MINFO_FUNCTION(dbplus)
*/
PHP_FUNCTION(dbplus_open)
{
relf *conn;
relf *conn;
zval **name, **writing, **searchpath;
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &name, &writing, &searchpath) == FAILURE){
WRONG_PARAM_COUNT;
}
zval **name, **writing, **searchpath;
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &name, &writing, &searchpath) == FAILURE){
WRONG_PARAM_COUNT;
}
convert_to_string_ex(name);
convert_to_long_ex(writing);
convert_to_long_ex(searchpath);
convert_to_string_ex(name);
convert_to_long_ex(writing);
convert_to_long_ex(searchpath);
conn = cdb_open((*name)->value.str.val, (*writing)->value.lval, (*searchpath)->value.lval);
if(conn == NULL) {
/* TODO error handling */
RETURN_FALSE;
}
conn = cdb_open(Z_STRVAL_PP(name), Z_LVAL_PP(writing), Z_LVAL_PP(searchpath));
if(conn == NULL) {
/* TODO error handling */
RETURN_FALSE;
}
ZEND_REGISTER_RESOURCE(return_value, conn, le_dbplus);
ZEND_REGISTER_RESOURCE(return_value, conn, le_dbplus);
}
/* }}} */
@@ -223,16 +271,16 @@ PHP_FUNCTION(dbplus_open)
*/
PHP_FUNCTION(dbplus_close)
{
zval **conn;
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &conn) == FAILURE){
WRONG_PARAM_COUNT;
}
zval **conn;
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &conn) == FAILURE){
WRONG_PARAM_COUNT;
}
convert_to_long_ex(conn);
convert_to_long_ex(conn);
/* TODO resource type check */
/* TODO resource type check */
zend_list_delete((*conn)->value.lval);
zend_list_delete(Z_LVAL_PP(conn));
}
/* }}} */
#endif
-141
View File
@@ -1,141 +0,0 @@
/*
+----------------------------------------------------------------------+
| PHP version 4.0 |
+----------------------------------------------------------------------+
| Copyright (c) 1997, 1998, 1999, 2000, 2001 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Hartmut Holzgraefe <hartmut@six.de> |
| |
+----------------------------------------------------------------------+
*/
#include "php.h"
#include "php_ini.h"
#include "php_dbplus.h"
/* {{{ proto int dbplus_change(int handle, string domain)
*/
PHP_FUNCTION(dbplus_change)
{
zval **handle, **domain;
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &handle, &domain) == FAILURE){
WRONG_PARAM_COUNT;
}
convert_to_long_ex(handle);
convert_to_string_ex(domain);
php_error(E_WARNING, "dbplus_change: not yet implemented");
}
/* }}} */
/* {{{ proto int dbplus_rcreate(string name, string domlist, int flag)
*/
PHP_FUNCTION(dbplus_rcreate)
{
zval **name, **domlist, **flag;
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &name, &domlist, &flag) == FAILURE){
WRONG_PARAM_COUNT;
}
convert_to_string_ex(name);
convert_to_string_ex(domlist);
convert_to_long_ex(flag);
php_error(E_WARNING, "dbplus_rcreate: not yet implemented");
}
/* }}} */
/* {{{ proto int dbplus_rcrtexact(string name, int handle, int flag)
*/
PHP_FUNCTION(dbplus_rcrtexact)
{
zval **name, **handle, **flag;
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &name, &handle, &flag) == FAILURE){
WRONG_PARAM_COUNT;
}
convert_to_string_ex(name);
convert_to_long_ex(handle);
convert_to_long_ex(flag);
php_error(E_WARNING, "dbplus_rcrtexact: not yet implemented");
}
/* }}} */
/* {{{ proto int dbplus_rcrtlike(string name, int handle, int flag)
*/
PHP_FUNCTION(dbplus_rcrtlike)
{
zval **name, **handle, **flag;
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &name, &handle, &flag) == FAILURE){
WRONG_PARAM_COUNT;
}
convert_to_string_ex(name);
convert_to_long_ex(handle);
convert_to_long_ex(flag);
php_error(E_WARNING, "dbplus_rcrtlike: not yet implemented");
}
/* }}} */
/* {{{ proto int dbplus_resolve(string name, string vname)
*/
PHP_FUNCTION(dbplus_resolve)
{
zval **name, **vname;
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &name, &vname) == FAILURE){
WRONG_PARAM_COUNT;
}
convert_to_string_ex(name);
convert_to_string_ex(vname);
php_error(E_WARNING, "dbplus_resolve: not yet implemented");
}
/* }}} */
/* {{{ proto int dbplus_tcl(int sid, string script)
*/
PHP_FUNCTION(dbplus_tcl)
{
zval **sid, **script;
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &sid, &script) == FAILURE){
WRONG_PARAM_COUNT;
}
convert_to_long_ex(sid);
convert_to_string_ex(script);
php_error(E_WARNING, "dbplus_tcl: not yet implemented");
}
/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
+1093 -809
View File
File diff suppressed because it is too large. Load diff
+4 -8
View File
@@ -20,9 +20,6 @@
#ifndef PHP_DBPLUS_H
#define PHP_DBPLUS_H
#include <saccess.h>
#include <relation.h>
#include <dblight.h>
extern zend_module_entry dbplus_module_entry;
#define phpext_dbplus_ptr &dbplus_module_entry
@@ -41,7 +38,6 @@ PHP_MINFO_FUNCTION(dbplus);
PHP_FUNCTION(dbplus_add);
PHP_FUNCTION(dbplus_aql);
PHP_FUNCTION(dbplus_change);
PHP_FUNCTION(dbplus_chdir);
PHP_FUNCTION(dbplus_close);
PHP_FUNCTION(dbplus_curr);
@@ -89,11 +85,11 @@ PHP_FUNCTION(dbplus_xunlockrel);
/*
Declare any global variables you may need between the BEGIN
and END macros here:
Declare any global variables you may need between the BEGIN
and END macros here:
ZEND_BEGIN_MODULE_GLOBALS(dbplus)
int global_variable;
int global_variable;
ZEND_END_MODULE_GLOBALS(dbplus)
*/
@@ -118,7 +114,7 @@ void dbplus_destruct_relation(zend_rsrc_list_entry *rsrc TSRMLS_DC);
void dbplus_destruct_tupel(zend_rsrc_list_entry *rsrc TSRMLS_DC);
#endif /* PHP_DBPLUS_H */
#endif /* PHP_DBPLUS_H */
/*
+2
View File
@@ -140,6 +140,7 @@ function_entry dbx_functions[] = {
};
zend_module_entry dbx_module_entry = {
STANDARD_MODULE_HEADER,
"dbx",
dbx_functions,
ZEND_MINIT(dbx),
@@ -147,6 +148,7 @@ zend_module_entry dbx_module_entry = {
NULL, /*ZEND_RINIT(dbx), /* Replace with NULL if there's nothing to do at request start */
NULL, /*ZEND_RSHUTDOWN(dbx), /* Replace with NULL if there's nothing to do at request end */
ZEND_MINFO(dbx),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
+13 -8
View File
@@ -3,51 +3,56 @@ dnl config.m4 for extension domxml
AC_DEFUN(PHP_DOM_CHECK_VERSION,[
old_CPPFLAGS=$CPPFLAGS
CPPFLAGS=-I$DOMXML_DIR/include
CPPFLAGS=-I$DOMXML_DIR/include$DOMXML_DIR_ADD
AC_MSG_CHECKING(for libxml version)
AC_EGREP_CPP(yes,[
#include <libxml/xmlversion.h>
#if LIBXML_VERSION >= 20207
#if LIBXML_VERSION >= 20402
yes
#endif
],[
AC_MSG_RESULT(>= 2.2.7)
AC_MSG_RESULT(>= 2.4.2)
],[
AC_MSG_ERROR(libxml version 2.2.7 or greater required.)
AC_MSG_ERROR(libxml version 2.4.2 or greater required.)
])
CPPFLAGS=$old_CPPFLAGS
])
PHP_ARG_WITH(dom, for DOM support,
[ --with-dom[=DIR] Include DOM support (requires libxml >= 2.2.7).
[ --with-dom[=DIR] Include DOM support (requires libxml >= 2.4.2).
DIR is the libxml install directory,
defaults to /usr.])
if test "$PHP_DOM" != "no"; then
DOMXML_DIR_ADD=""
if test -r $PHP_DOM/include/libxml/tree.h; then
DOMXML_DIR=$PHP_DOM
elif test -r $PHP_DOM/include/libxml2/libxml/tree.h; then
DOMXML_DIR=$PHP_DOM
DOMXML_DIR_ADD="/libxml2"
else
for i in /usr/local /usr; do
test -r $i/include/libxml/tree.h && DOMXML_DIR=$i
test -r $i/include/libxml2/libxml/tree.h && DOMXML_DIR=$i && DOMXML_DIR_ADD="/libxml2"
done
fi
if test -z "$DOMXML_DIR"; then
AC_MSG_RESULT(not found)
AC_MSG_ERROR(Please reinstall the libxml >= 2.2.7 distribution)
AC_MSG_ERROR(Please reinstall the libxml >= 2.4.2 distribution)
fi
PHP_DOM_CHECK_VERSION
if test -f $DOMXML_DIR/lib/libxml2.a -o -f $DOMXML_DIR/lib/libxml2.s? ; then
if test -f $DOMXML_DIR/lib/libxml2.a -o -f $DOMXML_DIR/lib/libxml2.$SHLIB_SUFFIX_NAME ; then
DOM_LIBNAME=xml2
else
DOM_LIBNAME=xml
fi
PHP_ADD_LIBRARY_WITH_PATH($DOM_LIBNAME, $DOMXML_DIR/lib, DOMXML_SHARED_LIBADD)
PHP_ADD_INCLUDE($DOMXML_DIR/include)
PHP_ADD_INCLUDE($DOMXML_DIR/include$DOMXML_DIR_ADD)
if test "$PHP_ZLIB_DIR" = "no"; then
AC_MSG_ERROR(DOMXML requires ZLIB. Use --with-zlib-dir=<DIR>)
+663 -549
View File
File diff suppressed because it is too large. Load diff
+8 -3
View File
@@ -1,8 +1,8 @@
/*
+----------------------------------------------------------------------+
| PHP version 4.0 |
| PHP Version 4 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2001 The PHP Group |
| Copyright (c) 1997-2002 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -52,6 +52,8 @@ PHP_FUNCTION(domxml_doc_create_text_node);
PHP_FUNCTION(domxml_doc_create_comment);
PHP_FUNCTION(domxml_doc_create_processing_instruction);
PHP_FUNCTION(domxml_doc_create_attribute);
PHP_FUNCTION(domxml_doc_create_cdata_section);
PHP_FUNCTION(domxml_doc_create_entity_reference);
PHP_FUNCTION(domxml_doc_imported_node);
PHP_FUNCTION(domxml_add_root);
PHP_FUNCTION(domxml_intdtd);
@@ -85,13 +87,16 @@ PHP_FUNCTION(domxml_node_has_child_nodes);
PHP_FUNCTION(domxml_node_parent);
PHP_FUNCTION(domxml_node_prefix);
PHP_FUNCTION(domxml_node);
PHP_FUNCTION(domxml_clone_node);
PHP_FUNCTION(domxml_node_unlink_node);
PHP_FUNCTION(domxml_node_new_child);
PHP_FUNCTION(domxml_node_set_content);
PHP_FUNCTION(domxml_node_text_concat);
PHP_FUNCTION(domxml_node_set_name);
PHP_FUNCTION(domxml_node_name);
PHP_FUNCTION(domxml_node_type);
PHP_FUNCTION(domxml_node_value);
PHP_FUNCTION(domxml_is_blank_node);
/* Class Attribute methods */
PHP_FUNCTION(domxml_attr_name);
@@ -135,8 +140,8 @@ PHP_FUNCTION(xpath_eval_expression);
PHP_FUNCTION(xptr_new_context);
PHP_FUNCTION(xptr_eval);
#endif
PHP_FUNCTION(domxml_test);
#else
#define domxml_module_ptr NULL
#endif /* HAVE_DOMXML */
+2 -1
View File
@@ -226,7 +226,8 @@ PHP_MSHUTDOWN_FUNCTION(DOTNET)
zend_module_entry dotnet_module_entry = {
"dotnet", DOTNET_functions, PHP_MINIT(DOTNET), PHP_MSHUTDOWN(DOTNET), NULL, NULL, PHP_MINFO(DOTNET), STANDARD_MODULE_PROPERTIES
STANDARD_MODULE_HEADER,
"dotnet", DOTNET_functions, PHP_MINIT(DOTNET), PHP_MSHUTDOWN(DOTNET), NULL, NULL, PHP_MINFO(DOTNET), NO_VERSION_YET, STANDARD_MODULE_PROPERTIES
};
BEGIN_EXTERN_C()
+2
View File
@@ -131,11 +131,13 @@ PHP_MINFO_FUNCTION(exif);
/* {{{ exif_module_entry
*/
zend_module_entry exif_module_entry = {
STANDARD_MODULE_HEADER,
"exif",
exif_functions,
NULL, NULL,
NULL, NULL,
PHP_MINFO(exif),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
/* }}} */
+2
View File
@@ -218,6 +218,7 @@ function_entry fbsql_functions[] = {
/* }}} */
zend_module_entry fbsql_module_entry = {
STANDARD_MODULE_HEADER,
"fbsql",
fbsql_functions,
PHP_MINIT(fbsql),
@@ -225,6 +226,7 @@ zend_module_entry fbsql_module_entry = {
PHP_RINIT(fbsql),
PHP_RSHUTDOWN(fbsql),
PHP_MINFO(fbsql),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
+1
View File
@@ -2,5 +2,6 @@
LTLIBRARY_NAME = libfdf.la
LTLIBRARY_SOURCES = fdf.c
LTLIBRARY_SHARED_NAME = fdf.la
LTLIBRARY_SHARED_LIBADD = $(FDFTK_SHARED_LIBADD)
include $(top_srcdir)/build/dynlib.mk
+7 -14
View File
@@ -4,21 +4,15 @@ PHP_ARG_WITH(fdftk, for fdftk support,
[ --with-fdftk[=DIR] Include fdftk support])
if test "$PHP_FDFTK" != "no"; then
if test -r $PHP_FDFTK/include/FdfTk.h -o -r $PHP_FDFTK/fdftk.h; then
FDFTK_DIR=$PHP_FDFTK
else
AC_MSG_CHECKING(for fdftk in default path)
for i in /usr/local /usr; do
if test -r $i/include/FdfTk.h -o -r $i/include/fdftk.h; then
FDFTK_DIR=$i
AC_MSG_RESULT(found in $i)
fi
done
fi
for i in /usr /usr/local $PHP_FDFTK; do
if test -r $i/include/FdfTk.h -o -r $i/include/fdftk.h; then
FDFTK_DIR=$i
fi
done
if test -z "$FDFTK_DIR"; then
AC_MSG_RESULT(not found)
AC_MSG_ERROR(Please reinstall the fdftk distribution)
AC_MSG_ERROR(FdfTk.h or fdftk.h not found. Please reinstall the fdftk distribution)
fi
PHP_ADD_INCLUDE($FDFTK_DIR/include)
@@ -38,4 +32,3 @@ if test "$PHP_FDFTK" != "no"; then
PHP_SUBST(FDFTK_SHARED_LIBADD)
PHP_EXTENSION(fdf, $ext_shared)
fi
+2
View File
@@ -68,6 +68,7 @@ function_entry fdf_functions[] = {
/* }}} */
zend_module_entry fdf_module_entry = {
STANDARD_MODULE_HEADER,
"fdf",
fdf_functions,
PHP_MINIT(fdf),
@@ -75,6 +76,7 @@ zend_module_entry fdf_module_entry = {
NULL,
NULL,
PHP_MINFO(fdf),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
+2 -1
View File
@@ -144,7 +144,8 @@ function_entry filepro_functions[] = {
};
zend_module_entry filepro_module_entry = {
"filepro", filepro_functions, PHP_MINIT(filepro), PHP_MSHUTDOWN(filepro), NULL, NULL, NULL, STANDARD_MODULE_PROPERTIES
STANDARD_MODULE_HEADER,
"filepro", filepro_functions, PHP_MINIT(filepro), PHP_MSHUTDOWN(filepro), NULL, NULL, NULL, NO_VERSION_YET, STANDARD_MODULE_PROPERTIES
};
+2
View File
@@ -0,0 +1,2 @@
FRIBIDI
Onn Ben-Zvi
+2 -2
View File
@@ -35,8 +35,8 @@ Compiling
Prerequisites
=============
1) FriBidi must be installed. Latest version can be obtained thru
http://imagic.weizmann.ac.il/~dov/freesw/FriBidi.
1) FriBidi version 0.9.0 or later must be installed. Latest version can be obtained thru
http://fribidi.sourceforge.net/
2) glib header files: glib.h and glibconfig.h.
+17 -11
View File
@@ -1,16 +1,11 @@
dnl $Id$
dnl config.m4 for extension fribidi
dnl don't forget to call PHP_EXTENSION(fribidi)
PHP_ARG_WITH(fribidi, whether to add fribidi support,
[ --with-fribidi[=DIR] Include fribidi support (requires FriBidi >=0.1.12).
DIR is the fribidi installation directory -
default /usr/local/])
if test "$PHP_FRIBIDI" != "no"; then
dnl if module was requested with default path of fribidi installation then
@@ -19,8 +14,6 @@ dnl $PHP_FRIBIDI will be "yes"
if test "$PHP_FRIBIDI" = "yes"; then
PHP_FRIBIDI=/usr/local
fi
dnl check for fribidi header files
@@ -32,8 +25,6 @@ dnl $PHP_FRIBIDI will be "yes"
AC_MSG_RESULT([missing])
fi
dnl check for fribidi shared library
AC_MSG_CHECKING([for libfribidi.so file in "$PHP_FRIBIDI/lib/"])
@@ -54,20 +45,35 @@ dnl $PHP_FRIBIDI will be "yes"
AC_MSG_RESULT([missing])
fi
dnl check for fribidi version
AC_MSG_CHECKING([for FriBidi version])
FRIBIDI_CONFIG=$PHP_FRIBIDI/bin/fribidi-config
if test -x $FRIBIDI_CONFIG; then
fribidi_version_full=`$FRIBIDI_CONFIG --version`
fi
fribidi_version=`echo ${fribidi_version_full} | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
if test "$fribidi_version" -ge 9000; then
AC_MSG_RESULT([$fribidi_version_full])
else
AC_MSG_ERROR(FriBidi version 0.9.0 or later is required to compile php with FriBidi support)
fi
AC_MSG_CHECKING([sanity to build extension])
if test -n "$FRIBIDI_INCDIR" && test -n "$FRIBIDI_LIBDIR" && test -n "$GLIB_INCDIR"; then
AC_MSG_RESULT([yes])
PHP_ADD_INCLUDE("$FRIBIDI_INCDIR")
PHP_ADD_INCLUDE("$GLIB_INCDIR")
PHP_ADD_LIBRARY_WITH_PATH(fribidi,"$FRIBIDI_LIBDIR", FRIBIDI_SHARED_LIBADD)
PHP_SUBST(FRIBIDI_SHARED_LIBADD)
AC_DEFINE(HAVE_FRIBIDI, 1, [ ])
PHP_EXTENSION(fribidi, $ext_shared)
PHP_SUBST(FRIBIDI_SHARED_LIBADD)
else
AC_MSG_RESULT([no])
fi
+14 -12
View File
@@ -12,7 +12,7 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: |
| Authors: Onn Ben-Zvi <onn@zend.com> |
+----------------------------------------------------------------------+
*/
@@ -47,6 +47,7 @@ function_entry fribidi_functions[] = {
};
zend_module_entry fribidi_module_entry = {
STANDARD_MODULE_HEADER,
"fribidi",
fribidi_functions,
PHP_MINIT(fribidi),
@@ -54,6 +55,7 @@ zend_module_entry fribidi_module_entry = {
NULL,
NULL,
PHP_MINFO(fribidi),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
@@ -66,8 +68,8 @@ ZEND_GET_MODULE(fribidi)
PHP_MINIT_FUNCTION(fribidi)
{
REGISTER_LONG_CONSTANT("FRIBIDI_CHARSET_UTF8", FRIBIDI_CHARSET_UTF8, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FRIBIDI_CHARSET_8859_6", FRIBIDI_CHARSET_8859_6, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FRIBIDI_CHARSET_8859_8", FRIBIDI_CHARSET_8859_8, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FRIBIDI_CHARSET_8859_6", FRIBIDI_CHARSET_ISO8859_6, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FRIBIDI_CHARSET_8859_8", FRIBIDI_CHARSET_ISO8859_8, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FRIBIDI_CHARSET_CP1255", FRIBIDI_CHARSET_CP1255, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FRIBIDI_CHARSET_CP1256", FRIBIDI_CHARSET_CP1256, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FRIBIDI_CHARSET_ISIRI_3342", FRIBIDI_CHARSET_ISIRI_3342, CONST_CS | CONST_PERSISTENT);
@@ -108,13 +110,13 @@ PHP_MINFO_FUNCTION(fribidi)
/* Possible values (i.e., char sets supported) */
/* FRIBIDI_CHARSET_UTF8 */
/* FRIBIDI_CHARSET_8859_6 */
/* FRIBIDI_CHARSET_8859_8 */
/* FRIBIDI_CHARSET_CP1255 */
/* FRIBIDI_CHARSET_CP1256 */
/* FRIBIDI_CHARSET_ISIRI_3342 */
/* FRIBIDI_CHARSET_8859_8 */
/* FRIBIDI_CHARSET_CP1255 */
/* FRIBIDI_CHARSET_CP1256 */
/* FRIBIDI_CHARSET_ISIRI_3342 */
/* */
/* Output: on success: The visual string. */
/* on failure: */
/* on failure: */
/*--------------------------------------------------------------*/
/* {{{ proto string fribidi_log2vis(string str, string direction, int charset)
@@ -174,10 +176,10 @@ PHP_FUNCTION(fribidi_log2vis)
case FRIBIDI_CHARSET_UTF8:
utf8_len=fribidi_utf8_to_unicode(inString, u_logical_str);
break;
case FRIBIDI_CHARSET_8859_6:
case FRIBIDI_CHARSET_ISO8859_6:
fribidi_iso8859_6_to_unicode(inString, u_logical_str);
break;
case FRIBIDI_CHARSET_8859_8:
case FRIBIDI_CHARSET_ISO8859_8:
fribidi_iso8859_8_to_unicode(inString, u_logical_str);
break;
case FRIBIDI_CHARSET_CP1255:
@@ -211,10 +213,10 @@ PHP_FUNCTION(fribidi_log2vis)
case FRIBIDI_CHARSET_UTF8:
fribidi_unicode_to_utf8(u_visual_str, utf8_len , outString);
break;
case FRIBIDI_CHARSET_8859_6:
case FRIBIDI_CHARSET_ISO8859_6:
fribidi_unicode_to_iso8859_6(u_visual_str, len , outString);
break;
case FRIBIDI_CHARSET_8859_8:
case FRIBIDI_CHARSET_ISO8859_8:
fribidi_unicode_to_iso8859_8(u_visual_str, len , outString);
break;
case FRIBIDI_CHARSET_CP1255:
+1 -2
View File
@@ -12,8 +12,7 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: |
| |
| Authors: Onn Ben-Zvi <onn@zend.com> |
+----------------------------------------------------------------------+
*/
+10
View File
@@ -62,6 +62,7 @@ function_entry php_ftp_functions[] = {
};
zend_module_entry php_ftp_module_entry = {
STANDARD_MODULE_HEADER,
"ftp",
php_ftp_functions,
PHP_MINIT(ftp),
@@ -69,6 +70,7 @@ zend_module_entry php_ftp_module_entry = {
NULL,
NULL,
PHP_MINFO(ftp),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
@@ -854,3 +856,11 @@ PHP_FUNCTION(ftp_quit)
/* }}} */
#endif /* HAVE_FTP */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
*/
+12 -5
View File
@@ -9,7 +9,7 @@ AC_DEFUN(PHP_GD_JPEG,[
if test "$PHP_JPEG_DIR" != "no"; then
for i in /usr /usr/local $PHP_JPEG_DIR; do
test -f "$i/lib/libjpeg.s?" -o -f "$i/lib/libjpeg.a" && GD_JPEG_DIR=$i
test -f $i/lib/libjpeg.$SHLIB_SUFFIX_NAME -o -f $i/lib/libjpeg.a && GD_JPEG_DIR=$i
done
AC_CHECK_LIB(jpeg,jpeg_read_header,
@@ -32,7 +32,7 @@ AC_DEFUN(PHP_GD_PNG,[
if test "$PHP_PNG_DIR" != "no"; then
for i in /usr /usr/local $PHP_PNG_DIR; do
test -f "$i/lib/libpng.s?" -o -f "$i/lib/libpng.a" && GD_PNG_DIR=$i
test -f $i/lib/libpng.$SHLIB_SUFFIX_NAME -o -f $i/lib/libpng.a && GD_PNG_DIR=$i
done
if test "$PHP_ZLIB_DIR" = "no"; then
@@ -59,7 +59,7 @@ AC_DEFUN(PHP_GD_XPM,[
if test "$PHP_XPM_DIR" != "no"; then
for i in /usr /usr/local /usr/X11R6 $PHP_XPM_DIR; do
test -f "$i/lib/libXpm.s?" -o -f "$i/lib/libXpm.a" && GD_XPM_DIR=$i
test -f $i/lib/libXpm.$SHLIB_SUFFIX_NAME -o -f $i/lib/libXpm.a && GD_XPM_DIR=$i
done
AC_CHECK_LIB(Xpm,XpmFreeXpmImage,
@@ -169,10 +169,13 @@ AC_DEFUN(PHP_GD_TTSTR,[
])
AC_DEFUN(PHP_GD_CHECK_VERSION,[
save_LIBS="$LIBS"
LIBS="$GD_SHARED_LIBADD $LIBS"
AC_CHECK_LIB(gd, gdImageString16, [AC_DEFINE(HAVE_LIBGD13, 1, [ ])])
AC_CHECK_LIB(gd, gdImagePaletteCopy, [AC_DEFINE(HAVE_LIBGD15, 1, [ ])])
AC_CHECK_LIB(gd, gdImageCreateFromPng, [AC_DEFINE(HAVE_GD_PNG, 1, [ ])])
AC_CHECK_LIB(gd, gdImageCreateFromGif, [AC_DEFINE(HAVE_GD_GIF, 1, [ ])])
AC_CHECK_LIB(gd, gdImageCreateFromGif, [AC_DEFINE(HAVE_GD_GIF_READ, 1, [ ])])
AC_CHECK_LIB(gd, gdImageGif, [AC_DEFINE(HAVE_GD_GIF_CREATE, 1, [ ])])
AC_CHECK_LIB(gd, gdImageWBMP, [AC_DEFINE(HAVE_GD_WBMP, 1, [ ])])
AC_CHECK_LIB(gd, gdImageCreateFromJpeg, [AC_DEFINE(HAVE_GD_JPG, 1, [ ])])
AC_CHECK_LIB(gd, gdImageCreateFromXpm, [AC_DEFINE(HAVE_GD_XPM, 1, [ ])])
@@ -180,10 +183,13 @@ AC_DEFUN(PHP_GD_CHECK_VERSION,[
AC_CHECK_LIB(gd, gdImageCreateTrueColor, [AC_DEFINE(HAVE_LIBGD20, 1, [ ])])
AC_CHECK_LIB(gd, gdImageSetTile, [AC_DEFINE(HAVE_GD_IMAGESETTILE, 1, [ ])])
AC_CHECK_LIB(gd, gdImageSetBrush, [AC_DEFINE(HAVE_GD_IMAGESETBRUSH, 1, [ ])])
AC_CHECK_LIB(gd, gdImageStringTTF, [AC_DEFINE(HAVE_GD_STRINGTTF, 1, [ ])])
AC_CHECK_LIB(gd, gdImageStringFT, [AC_DEFINE(HAVE_GD_STRINGFT, 1, [ ])])
AC_CHECK_LIB(gd, gdImageStringFTEx, [AC_DEFINE(HAVE_GD_STRINGFTEX, 1, [ ])])
AC_CHECK_LIB(gd, gdImageColorClosestHWB, [AC_DEFINE(HAVE_COLORCLOSESTHWB, 1, [ ])])
AC_CHECK_LIB(gd, gdImageColorResolve, [AC_DEFINE(HAVE_GDIMAGECOLORRESOLVE, 1, [ ])])
AC_CHECK_LIB(gd, gdImageGifCtx, [AC_DEFINE(HAVE_GD_GIF_CTX, 1, [ ])])
LIBS=$save_LIBS
])
@@ -198,6 +204,7 @@ if test "$PHP_GD" != "no"; then
PHP_SUBST(GD_SHARED_LIBADD)
dnl Various checks for GD features
PHP_SHLIB_SUFFIX_NAME
PHP_GD_TTSTR
PHP_GD_JPEG
PHP_GD_PNG
@@ -219,7 +226,7 @@ dnl A whole whack of possible places where these might be
done
for i in lib/gd1.3 lib/gd lib gd1.3 gd ""; do
test -f $PHP_GD/$i/libgd.s? -o -f $PHP_GD/$i/libgd.a && GD_LIB=$PHP_GD/$i
test -f $PHP_GD/$i/libgd.$SHLIB_SUFFIX_NAME -o -f $PHP_GD/$i/libgd.a && GD_LIB=$PHP_GD/$i
done
if test -n "$GD_INCLUDE" && test -n "$GD_LIB" ; then
+73 -34
View File
@@ -202,7 +202,16 @@ function_entry gd_functions[] = {
/* }}} */
zend_module_entry gd_module_entry = {
"gd", gd_functions, PHP_MINIT(gd), NULL, NULL, NULL, PHP_MINFO(gd), STANDARD_MODULE_PROPERTIES
STANDARD_MODULE_HEADER,
"gd",
gd_functions,
PHP_MINIT(gd),
NULL,
NULL,
NULL,
PHP_MINFO(gd),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
#ifdef COMPILE_DL_GD
@@ -305,8 +314,11 @@ PHP_MINFO_FUNCTION(gd)
/* this next part is stupid ... if I knew better, I'd put them all on one row (cmv) */
#ifdef HAVE_GD_GIF
php_info_print_table_row(2, "GIF Support", "enabled");
#ifdef HAVE_GD_GIF_READ
php_info_print_table_row(2, "GIF Read Support", "enabled");
#endif
#ifdef HAVE_GD_GIF_CREATE
php_info_print_table_row(2, "GIF Create Support", "enabled");
#endif
#ifdef HAVE_GD_JPG
php_info_print_table_row(2, "JPG Support", "enabled");
@@ -1045,7 +1057,7 @@ PHP_FUNCTION(imagecreatefromstring)
break;
case PHP_GDIMG_TYPE_GIF:
#ifdef HAVE_GD_GIF
#ifdef HAVE_GD_GIF_READ
im = _php_image_create_from_string (data, "GIF", gdImageCreateFromGifCtx TSRMLS_CC);
#else
php_error(E_WARNING, "No GIF support in this PHP build");
@@ -1187,10 +1199,10 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type,
Create a new image from GIF file or URL */
PHP_FUNCTION(imagecreatefromgif)
{
#ifdef HAVE_GD_GIF
#ifdef HAVE_GD_GIF_READ
_php_image_create_from(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_GIF, "GIF", gdImageCreateFromGif, gdImageCreateFromGifCtx);
#else /* HAVE_GD_GIF */
php_error(E_WARNING, "ImageCreateFromGif: No GIF support in this PHP build");
#else /* HAVE_GD_GIF_READ */
php_error(E_WARNING, "ImageCreateFromGif: No GIF read support in this PHP build");
RETURN_FALSE;
#endif /* HAVE_GD_GIF */
}
@@ -1413,14 +1425,14 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char
Output GIF image to browser or file */
PHP_FUNCTION(imagegif)
{
#ifdef HAVE_GD_GIF
#ifdef HAVE_GD_GIF_CREATE
#ifdef HAVE_GD_GIF_CTX
_php_image_output_ctx(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_GIF, "GIF", gdImageGifCtx);
#else
_php_image_output(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_GIF, "GIF", gdImageGif);
#endif
#else /* HAVE_GD_GIF */
php_error(E_WARNING, "ImageGif: No GIF support in this PHP build");
php_error(E_WARNING, "ImageGif: No GIF create support in this PHP build");
RETURN_FALSE;
#endif /* HAVE_GD_GIF */
}
@@ -1577,15 +1589,29 @@ PHP_FUNCTION(imagecolorat)
convert_to_long_ex(x);
convert_to_long_ex(y);
if (gdImageBoundsSafe(im, Z_LVAL_PP(x), Z_LVAL_PP(y))) {
#if HAVE_LIBGD13
RETURN_LONG(im->pixels[Z_LVAL_PP(y)][Z_LVAL_PP(x)]);
#else
RETURN_LONG(im->pixels[Z_LVAL_PP(x)][Z_LVAL_PP(y)]);
#endif
#if HAVE_LIBGD20
if(gdImageTrueColor(im)) {
if (im->tpixels && gdImageBoundsSafe(im, Z_LVAL_PP(x), Z_LVAL_PP(y))) {
RETURN_LONG(gdImageTrueColorPixel(im, Z_LVAL_PP(x), Z_LVAL_PP(y)));
} else {
php_error(E_NOTICE, "%ld,%ld is out of bounds",Z_LVAL_PP(x), Z_LVAL_PP(y));
RETURN_FALSE;
}
} else {
RETURN_FALSE;
#endif
if (im->pixels && gdImageBoundsSafe(im, Z_LVAL_PP(x), Z_LVAL_PP(y))) {
#if HAVE_LIBGD13
RETURN_LONG(im->pixels[Z_LVAL_PP(y)][Z_LVAL_PP(x)]);
#else
RETURN_LONG(im->pixels[Z_LVAL_PP(x)][Z_LVAL_PP(y)]);
#endif
} else {
php_error(E_NOTICE, "%ld,%ld is out of bounds",Z_LVAL_PP(x), Z_LVAL_PP(y));
RETURN_FALSE;
}
#if HAVE_LIBGD20
}
#endif
}
/* }}} */
@@ -1752,7 +1778,17 @@ PHP_FUNCTION(imagecolorsforindex)
convert_to_long_ex(index);
col = Z_LVAL_PP(index);
#if HAVE_LIBGD20
if ((col >= 0 && gdImageTrueColor(im)) || (!gdImageTrueColor(im) && col >= 0 && col < gdImageColorsTotal(im))) {
if (array_init(return_value) == FAILURE) {
RETURN_FALSE;
}
add_assoc_long(return_value,"red", gdImageRed(im,col));
add_assoc_long(return_value,"green", gdImageGreen(im,col));
add_assoc_long(return_value,"blue", gdImageBlue(im,col));
add_assoc_long(return_value,"alpha", gdImageAlpha(im,col));
}
#else
if (col >= 0 && col < gdImageColorsTotal(im)) {
if (array_init(return_value) == FAILURE) {
RETURN_FALSE;
@@ -1760,7 +1796,9 @@ PHP_FUNCTION(imagecolorsforindex)
add_assoc_long(return_value,"red", im->red[col]);
add_assoc_long(return_value,"green", im->green[col]);
add_assoc_long(return_value,"blue", im->blue[col]);
} else {
}
#endif
else {
php_error(E_WARNING, "Color index out of range");
RETURN_FALSE;
}
@@ -2257,7 +2295,7 @@ PHP_FUNCTION(imagefontheight)
/* {{{ php_gdimagecharup
* workaround for a bug in gd 1.2 */
void php_gdimagecharup(gdImagePtr im, gdFontPtr f, int x, int y, int c, int color)
static void php_gdimagecharup(gdImagePtr im, gdFontPtr f, int x, int y, int c, int color)
{
int cx, cy, px, py, fline;
cx = 0;
@@ -2607,7 +2645,6 @@ PHP_FUNCTION(imagefttext)
/* }}} */
/* {{{ proto array imagettfbbox(int size, int angle, string font_file, string text)
Give the bounding box of a text using TrueType fonts */
PHP_FUNCTION(imagettfbbox)
@@ -2637,8 +2674,7 @@ PHP_FUNCTION(imagettftext)
#ifdef ENABLE_GD_TTF
/* {{{ php_imagettftext_common
*/
static
void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode, int extended)
static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode, int extended)
{
zval **IM, **PTSIZE, **ANGLE, **X, **Y, **C, **FONTNAME, **COL, **EXT = NULL;
gdImagePtr im=NULL;
@@ -2736,23 +2772,26 @@ void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode, int extende
fontname = (unsigned char*)Z_STRVAL_PP(FONTNAME);
#endif
#ifdef USE_GD_IMGSTRTTF
# if HAVE_LIBFREETYPE
#if HAVE_GD_STRINGFTEX
#ifdef USE_GD_IMGSTRTTF
# if HAVE_GD_STRINGFTEX
if (extended) {
error = gdImageStringFTEx(im, brect, col, fontname, ptsize, angle, x, y, str, &strex);
}
else
#endif
# endif
# if HAVE_GD_STRINGFT
error = gdImageStringFT(im, brect, col, fontname, ptsize, angle, x, y, str);
# else
# elif HAVE_GD_STRINGTTF
error = gdImageStringTTF(im, brect, col, fontname, ptsize, angle, x, y, str);
# endif
#else
#else /* !USE_GD_IMGSTRTTF */
error = gdttf(im, brect, col, fontname, ptsize, angle, x, y, str);
#endif
if (error) {
php_error(E_WARNING, "%s", error);
RETURN_FALSE;
@@ -3447,7 +3486,7 @@ static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type )
}
switch (image_type) {
#ifdef HAVE_GD_GIF
#ifdef HAVE_GD_GIF_READ
case PHP_GDIMG_TYPE_GIF:
im_org = gdImageCreateFromGif (org);
if (im_org == NULL) {
@@ -3455,7 +3494,7 @@ static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type )
RETURN_FALSE;
}
break;
#endif /* HAVE_GD_GIF */
#endif /* HAVE_GD_GIF_READ */
#ifdef HAVE_GD_JPG
case PHP_GDIMG_TYPE_JPG:
@@ -3497,8 +3536,8 @@ static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type )
else {
y_ratio = x_ratio;
}
dest_width = org_width / x_ratio;
dest_height = org_height / y_ratio;
dest_width = (int)(org_width / x_ratio);
dest_height = (int)(org_height / y_ratio);
}
else {
x_ratio = (float) dest_width / (float) org_width;
@@ -3510,8 +3549,8 @@ static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type )
else {
y_ratio = x_ratio;
}
dest_width = org_width * x_ratio;
dest_height = org_height * y_ratio;
dest_width = (int)(org_width * x_ratio);
dest_height = (int)(org_height * y_ratio);
}
im_tmp = gdImageCreate (dest_width, dest_height);
-1
View File
@@ -146,7 +146,6 @@ PHP_FUNCTION(imagestring);
PHP_FUNCTION(imagestringup);
PHP_FUNCTION(imagesx);
PHP_FUNCTION(imagesy);
static void php_gdimagecharup(gdImagePtr, gdFontPtr, int, int, int, int);
PHP_FUNCTION(imagedashedline);
PHP_FUNCTION(imagettfbbox);
PHP_FUNCTION(imagettftext);
+2 -1
View File
@@ -45,7 +45,8 @@ function_entry php_gettext_functions[] = {
/* }}} */
zend_module_entry php_gettext_module_entry = {
"gettext", php_gettext_functions, NULL, NULL, NULL, NULL, PHP_MINFO(gettext), STANDARD_MODULE_PROPERTIES
STANDARD_MODULE_HEADER,
"gettext", php_gettext_functions, NULL, NULL, NULL, NULL, PHP_MINFO(gettext), NO_VERSION_YET, STANDARD_MODULE_PROPERTIES
};
#ifdef COMPILE_DL_GETTEXT
+2
View File
@@ -86,6 +86,7 @@ function_entry gmp_functions[] = {
/* {{{ gmp_module_entry
*/
zend_module_entry gmp_module_entry = {
STANDARD_MODULE_HEADER,
"gmp",
gmp_functions,
ZEND_MODULE_STARTUP_N(gmp),
@@ -93,6 +94,7 @@ zend_module_entry gmp_module_entry = {
NULL, /* Replace with NULL if there's nothing to do at request start */
NULL, /* Replace with NULL if there's nothing to do at request end */
ZEND_MODULE_INFO_N(gmp),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
/* }}} */
+2 -1
View File
@@ -129,7 +129,8 @@ function_entry hw_functions[] = {
};
zend_module_entry hw_module_entry = {
"hyperwave", hw_functions, PHP_MINIT(hw), PHP_MSHUTDOWN(hw), NULL, NULL, PHP_MINFO(hw), STANDARD_MODULE_PROPERTIES
STANDARD_MODULE_HEADER,
"hyperwave", hw_functions, PHP_MINIT(hw), PHP_MSHUTDOWN(hw), NULL, NULL, PHP_MINFO(hw), NO_VERSION_YET, STANDARD_MODULE_PROPERTIES
};
/*
+10 -1
View File
@@ -89,7 +89,16 @@ function_entry icap_functions[] = {
zend_module_entry php_icap_module_entry = {
"icap", icap_functions, PHP_MINIT(icap), NULL, NULL, NULL, PHP_MINFO(icap), 0, 0, 0, NULL
STANDARD_MODULE_HEADER,
"icap",
icap_functions,
PHP_MINIT(icap),
NULL,
NULL,
NULL,
PHP_MINFO(icap),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
+5 -2
View File
@@ -14,9 +14,12 @@ if test "$PHP_ICONV" != "no"; then
AC_MSG_ERROR(Please reinstall the iconv library.)
fi
if test -f $ICONV_DIR/lib/libconv.a -o -f $ICONV_DIR/lib/libiconv.s? ; then
if test -f $ICONV_DIR/lib/libconv.a -o -f $ICONV_DIR/lib/libiconv.$SHLIB_SUFFIX_NAME ; then
PHP_ADD_LIBRARY_WITH_PATH(iconv, $ICONV_DIR/lib, ICONV_SHARED_LIBADD)
AC_CHECK_LIB(iconv, libiconv_open, AC_DEFINE(HAVE_ICONV, 1, [ ]))
AC_CHECK_LIB(iconv, libiconv_open, [
AC_DEFINE(HAVE_ICONV, 1, [ ])
AC_DEFINE(HAVE_LIBICONV, 1, [ ])
])
else
AC_CHECK_LIB(c, iconv_open, AC_DEFINE(HAVE_ICONV, 1, [ ]))
fi
+4 -2
View File
@@ -51,7 +51,7 @@
/* {{{ iconv_functions[]
*/
function_entry iconv_functions[] = {
PHP_FE(iconv, NULL)
PHP_NAMED_FE(iconv,php_if_iconv, NULL)
PHP_FE(ob_iconv_handler, NULL)
PHP_FE(iconv_get_encoding, NULL)
PHP_FE(iconv_set_encoding, NULL)
@@ -62,6 +62,7 @@ function_entry iconv_functions[] = {
/* {{{ iconv_module_entry
*/
zend_module_entry iconv_module_entry = {
STANDARD_MODULE_HEADER,
"iconv",
iconv_functions,
PHP_MINIT(miconv),
@@ -69,6 +70,7 @@ zend_module_entry iconv_module_entry = {
NULL,
NULL,
PHP_MINFO(miconv),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
/* }}} */
@@ -162,7 +164,7 @@ int php_iconv_string(char *in_p, char **out, char *in_charset, char *out_charset
/* {{{ proto string iconv(string in_charset, string out_charset, string str)
Returns str converted to the out_charset character set */
PHP_FUNCTION(iconv)
PHP_NAMED_FUNCTION(php_if_iconv)
{
zval **in_charset, **out_charset, **in_buffer;
char *out_buffer;
+1 -1
View File
@@ -33,7 +33,7 @@ PHP_MINIT_FUNCTION(miconv);
PHP_MSHUTDOWN_FUNCTION(miconv);
PHP_MINFO_FUNCTION(miconv);
PHP_FUNCTION(iconv);
PHP_NAMED_FUNCTION(php_if_iconv);
PHP_FUNCTION(ob_iconv_handler);
PHP_FUNCTION(iconv_get_encoding);
PHP_FUNCTION(iconv_set_encoding);
+6 -6
View File
@@ -6,13 +6,13 @@ iconv test
--GET--
--FILE--
<?php
echo "iconv extension is available";
$test = "Stig S誥her Bakken";
print "$test\n";
printf("%s\n", iconv("iso-8859-1", "utf-8", $test));
echo "iconv extension is available\n";
$test = "æøå";
printf("ISO-8859-1: %s\nUTF-8: %s\n",
$test, iconv("ISO-8859-1", "UTF-8", $test));
?>
--EXPECT--
iconv extension is available
Stig S誥her Bakken
Stig Sテヲther Bakken
ISO-8859-1: æøå
UTF-8: æøå
+31 -23
View File
@@ -158,12 +158,15 @@ function_entry imap_functions[] = {
/* {{{ imap_module_entry
*/
zend_module_entry imap_module_entry = {
STANDARD_MODULE_HEADER,
"imap",
imap_functions,
PHP_MINIT(imap),
NULL, PHP_RINIT(imap),
NULL,
PHP_RINIT(imap),
PHP_RSHUTDOWN(imap),
PHP_MINFO(imap),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
/* }}} */
@@ -336,8 +339,7 @@ void mail_free_errorlist(ERRORLIST **errlist)
*/
MESSAGELIST *mail_newmessagelist(void)
{
return (MESSAGELIST *) memset(fs_get(sizeof(MESSAGELIST)), 0,
sizeof(MESSAGELIST));
return (MESSAGELIST *) memset(fs_get(sizeof(MESSAGELIST)), 0, sizeof(MESSAGELIST));
}
/* }}} */
@@ -347,12 +349,17 @@ MESSAGELIST *mail_newmessagelist(void)
* Accepts: pointer to MESSAGELIST pointer
* Author: CJH
*/
void mail_free_messagelist(MESSAGELIST **msglist)
void mail_free_messagelist(MESSAGELIST **msglist, MESSAGELIST **tail)
{
if (*msglist) { /* only free if exists */
mail_free_messagelist (&(*msglist)->next);
fs_give ((void **) msglist); /* return string to free storage */
MESSAGELIST *cur, *next;
for (cur = *msglist, next = cur->next; cur; cur = next) {
next = cur->next;
fs_give((void **)&cur);
}
*tail = NIL;
*msglist = NIL;
}
/* }}} */
@@ -381,15 +388,16 @@ void mail_getquota(MAILSTREAM *stream, char *qroot, QUOTALIST *qlist)
*/
static void php_imap_init_globals(zend_imap_globals *imap_globals)
{
imap_globals->imap_user=NIL;
imap_globals->imap_password=NIL;
imap_globals->imap_folders=NIL;
imap_globals->imap_sfolders=NIL;
imap_globals->imap_alertstack=NIL;
imap_globals->imap_errorstack=NIL;
imap_globals->imap_messages=NIL;
imap_globals->imap_folder_objects=NIL;
imap_globals->imap_sfolder_objects=NIL;
imap_globals->imap_user = NIL;
imap_globals->imap_password = NIL;
imap_globals->imap_folders = NIL;
imap_globals->imap_sfolders = NIL;
imap_globals->imap_alertstack = NIL;
imap_globals->imap_errorstack = NIL;
imap_globals->imap_messages = NIL;
imap_globals->imap_messages_tail = NIL;
imap_globals->imap_folder_objects = NIL;
imap_globals->imap_sfolder_objects = NIL;
imap_globals->folderlist_style = FLIST_ARRAY;
}
/* }}} */
@@ -2092,6 +2100,7 @@ PHP_FUNCTION(imap_rfc822_parse_adrlist)
ZEND_WRONG_PARAM_COUNT();
}
SEPARATE_ZVAL(str);
convert_to_string_ex(str);
convert_to_string_ex(defaulthost);
@@ -3357,7 +3366,7 @@ PHP_FUNCTION(imap_search)
flags = Z_LVAL_PP(search_flags);
}
IMAPG(imap_messages) = NIL;
IMAPG(imap_messages) = IMAPG(imap_messages_tail) = NIL;
mail_search_full(imap_le_struct->imap_stream, NIL, mail_criteria(search_criteria), flags);
if (IMAPG(imap_messages) == NIL) {
efree(search_criteria);
@@ -3371,7 +3380,7 @@ PHP_FUNCTION(imap_search)
add_next_index_long(return_value, cur->msgid);
cur = cur->next;
}
mail_free_messagelist(&IMAPG(imap_messages));
mail_free_messagelist(&IMAPG(imap_messages), &IMAPG(imap_messages_tail));
efree(search_criteria);
}
/* }}} */
@@ -3895,20 +3904,19 @@ void mm_searched(MAILSTREAM *stream, unsigned long number)
{
MESSAGELIST *cur = NIL;
TSRMLS_FETCH();
if (IMAPG(imap_messages) == NIL) {
IMAPG(imap_messages) = mail_newmessagelist();
IMAPG(imap_messages)->msgid = number;
IMAPG(imap_messages)->next = NIL;
IMAPG(imap_messages_tail) = IMAPG(imap_messages);
} else {
cur = IMAPG(imap_messages);
while (cur->next != NIL) {
cur = cur->next;
}
cur = IMAPG(imap_messages_tail);
cur->next = mail_newmessagelist();
cur = cur->next;
cur->msgid = number;
cur->next = NIL;
IMAPG(imap_messages_tail) = cur;
}
}
+1
View File
@@ -190,6 +190,7 @@ ZEND_BEGIN_MODULE_GLOBALS(imap)
STRINGLIST *imap_alertstack;
ERRORLIST *imap_errorstack;
MESSAGELIST *imap_messages;
MESSAGELIST *imap_messages_tail;
FOBJECTLIST *imap_folder_objects;
FOBJECTLIST *imap_sfolder_objects;
folderlist_style_t folderlist_style;
+2
View File
@@ -165,6 +165,7 @@ $endif;
};
zend_module_entry ifx_module_entry = {
STANDARD_MODULE_HEADER,
"informix",
ifx_functions,
PHP_MINIT(ifx),
@@ -172,6 +173,7 @@ zend_module_entry ifx_module_entry = {
PHP_RINIT(ifx),
NULL,
PHP_MINFO(ifx),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
+2
View File
@@ -67,6 +67,7 @@ function_entry ii_functions[] = {
};
zend_module_entry ingres_ii_module_entry = {
STANDARD_MODULE_HEADER,
"ingres_ii",
ii_functions,
PHP_MINIT(ii),
@@ -74,6 +75,7 @@ zend_module_entry ingres_ii_module_entry = {
PHP_RINIT(ii),
PHP_RSHUTDOWN(ii),
PHP_MINFO(ii),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
+55 -12
View File
@@ -25,6 +25,12 @@ A lot... */
/*
Changes:
2001-05-31: Jeremy Bettis <jeremy@deadbeef.com>
- If a blob handle was expected and something else was
received create a blob and add the value to it.
- If the incoming argument to a bind parameter is NULL
then store a NULL in the database.
- More verbose date errors.
1999-09-21: Ivo Panacek <ivop@regionet.cz>
- added COMPILE_DL section
- more verbose php_info_ibase function
@@ -102,6 +108,7 @@ function_entry ibase_functions[] = {
zend_module_entry ibase_module_entry =
{
STANDARD_MODULE_HEADER,
"interbase",
ibase_functions,
PHP_MINIT(ibase),
@@ -109,6 +116,7 @@ zend_module_entry ibase_module_entry =
PHP_RINIT(ibase),
PHP_RSHUTDOWN(ibase),
PHP_MINFO(ibase),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
@@ -484,13 +492,13 @@ PHP_INI_BEGIN()
STD_PHP_INI_ENTRY("ibase.timeformat", "%H:%M:%S", PHP_INI_ALL, OnUpdateString, cfg_timeformat, zend_ibase_globals, ibase_globals)
PHP_INI_END()
static void php_ibase_init_globals(TSRMLS_D)
static void php_ibase_init_globals(zend_ibase_globals *ibase_globals)
{
IBG(timestampformat) = NULL;
IBG(dateformat) = NULL;
IBG(timeformat) = NULL;
IBG(errmsg) = NULL;
IBG(num_persistent) = 0;
ibase_globals->timestampformat = NULL;
ibase_globals->dateformat = NULL;
ibase_globals->timeformat = NULL;
ibase_globals->errmsg = NULL;
ibase_globals->num_persistent = 0;
}
PHP_MINIT_FUNCTION(ibase)
@@ -1118,7 +1126,7 @@ _php_ibase_alloc_query_error:
/* {{{ _php_ibase_bind()
Bind parameter placeholders in a previously prepared query */
static int _php_ibase_bind(XSQLDA *sqlda, pval **b_vars, BIND_BUF *buf)
static int _php_ibase_bind(XSQLDA *sqlda, pval **b_vars, BIND_BUF *buf, ibase_query *ib_query)
{
XSQLVAR *var;
pval *b_var;
@@ -1131,6 +1139,15 @@ static int _php_ibase_bind(XSQLDA *sqlda, pval **b_vars, BIND_BUF *buf)
var->sqlind = &buf[i].sqlind;
b_var = b_vars[i];
if (b_var->type == IS_NULL) {
static char nothing[64];
static short null_flag = -1;
var->sqldata = nothing;
var->sqltype |= 1;
var->sqlind = &null_flag;
if (var->sqllen > 64)
var->sqllen = 64;
} else
switch(var->sqltype & ~1) {
case SQL_TEXT: /* direct to variable */
case SQL_VARYING:
@@ -1208,7 +1225,7 @@ static int _php_ibase_bind(XSQLDA *sqlda, pval **b_vars, BIND_BUF *buf)
n = sscanf(b_var->value.str.val, "%d%*[/]%d%*[/]%d %d%*[:]%d%*[:]%d",
&t.tm_mon, &t.tm_mday, &t.tm_year, &t.tm_hour, &t.tm_min, &t.tm_sec);
if(n != 3 && n != 6){
_php_ibase_module_error("invalid date/time format");
_php_ibase_module_error("invalid date/time format: Expected 3 or 6 fields, got %d. Use format m/d/Y H:i:s. You gave '%s'", n, b_var->value.str.val);
return FAILURE;
}
t.tm_year -= 1900;
@@ -1266,12 +1283,38 @@ static int _php_ibase_bind(XSQLDA *sqlda, pval **b_vars, BIND_BUF *buf)
if (b_var->type != IS_STRING
|| b_var->value.str.len != sizeof(ibase_blob_handle)
|| ((ibase_blob_handle *)(b_var->value.str.val))->bl_handle != 0) {
ibase_blob_handle *ib_blob;
TSRMLS_FETCH();
ib_blob = (ibase_blob_handle *) emalloc(sizeof(ibase_blob_handle));
ib_blob->trans_handle = ib_query->trans;
ib_blob->link = ib_query->link;
ib_blob->bl_handle = NULL;
if (isc_create_blob(IB_STATUS, &ib_blob->link, &ib_blob->trans_handle, &ib_blob->bl_handle, &ib_blob->bl_qd)) {
efree(ib_blob);
_php_ibase_error();
return FAILURE;
}
convert_to_string(b_var);
if (isc_put_segment(IB_STATUS, &ib_blob->bl_handle, (unsigned short) b_var->value.str.len, b_var->value.str.val)) {
_php_ibase_error();
return FAILURE;
}
if (isc_close_blob(IB_STATUS, &ib_blob->bl_handle)) {
_php_ibase_error();
return FAILURE;
}
ib_blob_id = ib_blob;
var->sqldata = (void ISC_FAR *)&ib_blob_id->bl_qd;
/*
_php_ibase_module_error("invalid blob id string");
return FAILURE;
}
ib_blob_id = (ibase_blob_handle *)b_var->value.str.val;
*/
} else {
ib_blob_id = (ibase_blob_handle *)b_var->value.str.val;
var->sqldata = (void ISC_FAR *)&ib_blob_id->bl_qd;
var->sqldata = (void ISC_FAR *)&ib_blob_id->bl_qd;
}
}
break;
case SQL_ARRAY:
@@ -1383,7 +1426,7 @@ static int _php_ibase_exec(ibase_result **ib_resultp, ibase_query *ib_query, int
in_sqlda = emalloc(XSQLDA_LENGTH(ib_query->in_sqlda->sqld));
memcpy(in_sqlda, ib_query->in_sqlda, XSQLDA_LENGTH(ib_query->in_sqlda->sqld));
bind_buf = emalloc(sizeof(BIND_BUF) * ib_query->in_sqlda->sqld);
if (_php_ibase_bind(in_sqlda, args, bind_buf) == FAILURE) {
if (_php_ibase_bind(in_sqlda, args, bind_buf, ib_query) == FAILURE) {
IBDEBUG("Could not bind input XSQLDA... (_php_ibase_exec)");
goto _php_ibase_exec_error;
}
+1 -1
View File
@@ -44,7 +44,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\main" /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\..\php_build\Interbase SDK\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "INTERBASE_EXPORTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D ZEND_DEBUG=1 /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\main" /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\..\php_build\Interbase SDK\include" /I "..\..\..\bindlib_w32" /D "_DEBUG" /D ZEND_DEBUG=1 /D "ZTS" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "INTERBASE_EXPORTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_IBASE=1 /FR /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\main" /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\..\php_build\Interbase SDK\include" /I "..\..\..\bindlib_w32" /D "_DEBUG" /D ZEND_DEBUG=1 /D "ZTS" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "INTERBASE_EXPORTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_IBASE=1 /D "COMPILE_DL_INTERBASE" /FR /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x40d /d "_DEBUG"
-1
View File
@@ -159,7 +159,6 @@ enum php_interbase_option {
};
#ifdef ZTS
#define IBG(v) (ibase_globals->v)
#define IBG(v) TSRMG(ibase_globals_id, zend_ibase_globals *, v)
#else
#define IBG(v) (ibase_globals.v)
+2
View File
@@ -631,6 +631,7 @@ static PHP_MINFO_FUNCTION(java) {
}
zend_module_entry java_module_entry = {
STANDARD_MODULE_HEADER,
"java",
java_functions,
PHP_MINIT(java),
@@ -638,6 +639,7 @@ zend_module_entry java_module_entry = {
NULL,
NULL,
PHP_MINFO(java),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
+8 -5
View File
@@ -120,6 +120,7 @@ function_entry ldap_functions[] = {
/* }}} */
zend_module_entry ldap_module_entry = {
STANDARD_MODULE_HEADER,
"ldap",
ldap_functions,
PHP_MINIT(ldap),
@@ -127,6 +128,7 @@ zend_module_entry ldap_module_entry = {
NULL,
NULL,
PHP_MINFO(ldap),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
@@ -207,7 +209,8 @@ PHP_MINIT_FUNCTION(ldap)
le_result = zend_register_list_destructors_ex(_free_ldap_result, NULL, "ldap result", module_number);
le_link = zend_register_list_destructors_ex(_close_ldap_link, NULL, "ldap link", module_number);
le_result_entry = zend_register_list_destructors_ex(_free_ldap_result, NULL, "ldap result entry", module_number);
le_result_entry = zend_register_list_destructors_ex(NULL, NULL, "ldap result entry", module_number);
le_ber_entry = zend_register_list_destructors_ex(NULL, NULL, "ldap ber entry", module_number);
ldap_module_entry.type = type;
@@ -988,7 +991,7 @@ PHP_FUNCTION(ldap_first_attribute)
if ((attribute = ldap_first_attribute(ldap, ldap_result_entry, &ber)) == NULL) {
RETURN_FALSE;
} else {
ZEND_REGISTER_RESOURCE(return_value, ber, le_ber_entry);
ZEND_REGISTER_RESOURCE(*berp, ber, le_ber_entry);
RETVAL_STRING(attribute, 1);
#if ( LDAP_API_VERSION > 2000 ) || HAVE_NSLDAP || WINDOWS
@@ -1019,7 +1022,7 @@ PHP_FUNCTION(ldap_next_attribute)
if ((attribute = ldap_next_attribute(ldap, ldap_result_entry, ber)) == NULL) {
RETURN_FALSE;
} else {
ZEND_REGISTER_RESOURCE(return_value, ber, le_ber_entry);
ZEND_REGISTER_RESOURCE(*berp, ber, le_ber_entry);
RETVAL_STRING(attribute, 1);
#if ( LDAP_API_VERSION > 2000 ) || HAVE_NSLDAP || WINDOWS
@@ -2004,6 +2007,6 @@ PHP_FUNCTION(ldap_8859_to_t61)
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 tw=78 fdm=marker
* vim<600: sw=4 ts=4 tw=78
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+2
View File
@@ -64,6 +64,7 @@ function_entry mailparse_functions[] = {
};
zend_module_entry mailparse_module_entry = {
STANDARD_MODULE_HEADER,
"mailparse",
mailparse_functions,
PHP_MINIT(mailparse),
@@ -71,6 +72,7 @@ zend_module_entry mailparse_module_entry = {
PHP_RINIT(mailparse),
PHP_RSHUTDOWN(mailparse),
PHP_MINFO(mailparse),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
+129 -2
View File
@@ -101,6 +101,7 @@
#define mbfl_pfree free
/* unicode table */
extern const unsigned short cp1252_ucs_table[];
extern const unsigned short iso8859_2_ucs_table[];
extern const unsigned short iso8859_3_ucs_table[];
extern const unsigned short iso8859_4_ucs_table[];
@@ -558,6 +559,17 @@ static mbfl_encoding mbfl_encoding_2022jp = {
MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE
};
static const char *mbfl_encoding_cp1252_aliases[] = {"cp1252", NULL};
static mbfl_encoding mbfl_encoding_cp1252 = {
mbfl_no_encoding_cp1252,
"Windows-1252",
"Windows-1252",
&mbfl_encoding_cp1252_aliases,
NULL,
MBFL_ENCTYPE_SBCS
};
static const char *mbfl_encoding_8859_1_aliases[] = {"ISO_8859-1", "latin1", NULL};
static mbfl_encoding mbfl_encoding_8859_1 = {
@@ -736,6 +748,7 @@ static mbfl_encoding *mbfl_encoding_ptr_list[] = {
&mbfl_encoding_sjis_win,
&mbfl_encoding_jis,
&mbfl_encoding_2022jp,
&mbfl_encoding_cp1252,
&mbfl_encoding_8859_1,
&mbfl_encoding_8859_2,
&mbfl_encoding_8859_3,
@@ -800,6 +813,8 @@ static int mbfl_filt_conv_wchar_utf7imap(int c, mbfl_convert_filter *filter);
static int mbfl_filt_conv_wchar_utf7imap_flush(mbfl_convert_filter *filter);
static int mbfl_filt_conv_wchar_ascii(int c, mbfl_convert_filter *filter);
static int mbfl_filt_conv_wchar_cp1252(int c, mbfl_convert_filter *filter);
static int mbfl_filt_conv_cp1252_wchar(int c, mbfl_convert_filter *filter);
static int mbfl_filt_conv_wchar_8859_1(int c, mbfl_convert_filter *filter);
static int mbfl_filt_conv_8859_2_wchar(int c, mbfl_convert_filter *filter);
static int mbfl_filt_conv_wchar_8859_2(int c, mbfl_convert_filter *filter);
@@ -836,6 +851,7 @@ static int mbfl_filt_ident_eucjp(int c, mbfl_identify_filter *filter);
static int mbfl_filt_ident_sjis(int c, mbfl_identify_filter *filter);
static int mbfl_filt_ident_sjiswin(int c, mbfl_identify_filter *filter);
static int mbfl_filt_ident_jis(int c, mbfl_identify_filter *filter);
static int mbfl_filt_ident_cp1252(int c, mbfl_identify_filter *filter);
static int mbfl_filt_ident_2022jp(int c, mbfl_identify_filter *filter);
static int mbfl_filt_ident_false(int c, mbfl_identify_filter *filter);
static int mbfl_filt_ident_true(int c, mbfl_identify_filter *filter);
@@ -1323,6 +1339,23 @@ static struct mbfl_convert_vtbl vtbl_wchar_sjiswin = {
mbfl_filt_conv_wchar_sjiswin,
mbfl_filt_conv_common_flush };
static struct mbfl_convert_vtbl vtbl_cp1252_wchar = {
mbfl_no_encoding_cp1252,
mbfl_no_encoding_wchar,
mbfl_filt_conv_common_ctor,
mbfl_filt_conv_common_dtor,
mbfl_filt_conv_cp1252_wchar,
mbfl_filt_conv_common_flush };
static struct mbfl_convert_vtbl vtbl_wchar_cp1252 = {
mbfl_no_encoding_cp1252,
mbfl_no_encoding_wchar,
mbfl_filt_conv_common_ctor,
mbfl_filt_conv_common_dtor,
mbfl_filt_conv_wchar_cp1252,
mbfl_filt_conv_common_flush };
static struct mbfl_convert_vtbl vtbl_8859_1_wchar = {
mbfl_no_encoding_8859_1,
mbfl_no_encoding_wchar,
@@ -1547,6 +1580,8 @@ static struct mbfl_convert_vtbl *mbfl_convert_filter_list[] = {
&vtbl_wchar_eucjpwin,
&vtbl_sjiswin_wchar,
&vtbl_wchar_sjiswin,
&vtbl_cp1252_wchar,
&vtbl_wchar_cp1252,
&vtbl_ascii_wchar,
&vtbl_wchar_ascii,
&vtbl_8859_1_wchar,
@@ -1678,6 +1713,12 @@ static struct mbfl_identify_vtbl vtbl_identify_2022jp = {
mbfl_filt_ident_common_dtor,
mbfl_filt_ident_2022jp };
static struct mbfl_identify_vtbl vtbl_identify_cp1252 = {
mbfl_no_encoding_cp1252,
mbfl_filt_ident_common_ctor,
mbfl_filt_ident_common_dtor,
mbfl_filt_ident_cp1252 };
static struct mbfl_identify_vtbl vtbl_identify_8859_1 = {
mbfl_no_encoding_8859_1,
mbfl_filt_ident_common_ctor,
@@ -1772,6 +1813,7 @@ static struct mbfl_identify_vtbl *mbfl_identify_filter_list[] = {
&vtbl_identify_sjiswin,
&vtbl_identify_jis,
&vtbl_identify_2022jp,
&vtbl_identify_cp1252,
&vtbl_identify_8859_1,
&vtbl_identify_8859_2,
&vtbl_identify_8859_3,
@@ -2596,7 +2638,7 @@ mbfl_filt_conv_uudec(int c, mbfl_convert_filter * filter)
break;
case uudec_state_skip_newline:
/* skip newline */
filter->status = 0;
filter->status = uudec_state_size;
}
return c;
}
@@ -4070,6 +4112,61 @@ mbfl_filt_conv_wchar_ascii(int c, mbfl_convert_filter *filter)
return c;
}
/*
* wchar => cp1252
*/
static int
mbfl_filt_conv_wchar_cp1252(int c, mbfl_convert_filter *filter)
{
int s, n;
if (c >= 0x100) {
/* look it up from the cp1252 table */
s = -1;
n = 30;
while (n >= 0) {
if (c == cp1252_ucs_table[n]) {
s = 0x80 + n;
break;
}
n--;
}
if (s <= 0 && (c & ~MBFL_WCSPLANE_MASK) == MBFL_WCSPLANE_8859_1)
{
s = c & MBFL_WCSPLANE_MASK;
}
}
else if (c >= 0 && c < 0x100) {
s = c;
}
if (s >= 0) {
CK((*filter->output_function)(s, filter->data));
} else {
if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
CK(mbfl_filt_conv_illegal_output(c, filter));
}
}
return c;
}
/*
* cp1252 => wchar
*/
static int
mbfl_filt_conv_cp1252_wchar(int c, mbfl_convert_filter *filter)
{
int s;
if (c >= 0x80 && c < 0xa0) {
s = cp1252_ucs_table[c - 0x80];
} else {
s = c;
}
CK((*filter->output_function)(s, filter->data));
return c;
}
/*
* wchar => ISO-8859-1
@@ -5194,6 +5291,22 @@ retry:
return c;
}
/* We only distinguish the MS extensions to ISO-8859-1.
* Actually, this is pretty much a NO-OP, since the identification
* system doesn't allow us to discriminate between a positive match,
* a possible match and a definite non-match.
* The problem here is that cp1252 looks like SJIS for certain chars.
* */
static int
mbfl_filt_ident_cp1252(int c, mbfl_identify_filter *filter)
{
if (c >= 0x80 && c < 0xa0)
filter->flag = 0;
else
filter->flag = 1; /* not it */
return c;
}
static int
mbfl_filt_ident_2022jp(int c, mbfl_identify_filter *filter)
{
@@ -6948,10 +7061,10 @@ mbfl_strimwidth(
n = string->len;
if (p != NULL) {
while (n > 0) {
n--;
if ((*encoder->filter_function)(*p++, encoder) < 0) {
break;
}
n--;
}
mbfl_convert_filter_flush(encoder);
if (pc.status != 0 && mkwidth > 0) {
@@ -8146,6 +8259,20 @@ mbfl_html_numeric_entity(
/*
* Unicode table
*/
/* Windows CodePage 1252 - it's the same as iso-8859-1 but
* defines extra symbols in the range 0x80-0x9f.
* This table differs from the rest of the unicode tables below
* as it only covers this range, while the rest cover 0xa0 onwards */
static const unsigned short cp1252_ucs_table[] = {
0xfffe,0xfffe,0x201a,0x0192,0x201e,0x2026,0x2020,0x2021,
0x02c6,0x2030,0x0160,0x2039,0x0152,0xfffe,0xfffe,0xfffe,
0xfffe,0x2018,0x2019,0x201c,0x201d,0x2022,0x2013,0x02dc,
0x2122,0x0161,0x203a,0x0153,0xfffe,0xfffe,0x0178
};
static const unsigned short iso8859_2_ucs_table[] = {
0x00A0,0x0104,0x02D8,0x0141,0x00A4,0x013D,0x015A,0x00A7,
0x00A8,0x0160,0x015E,0x0164,0x0179,0x00AD,0x017D,0x017B,
+4 -2
View File
@@ -1,4 +1,6 @@
/* charset=UTF-8 */
/* charset=UTF-8
* vim: encoding=utf-8:
* */
/*
* "streamable kanji code filter and converter"
@@ -151,6 +153,7 @@ enum mbfl_no_encoding {
mbfl_no_encoding_sjis_mac,
mbfl_no_encoding_jis,
mbfl_no_encoding_2022jp,
mbfl_no_encoding_cp1252,
mbfl_no_encoding_8859_1,
mbfl_no_encoding_8859_2,
mbfl_no_encoding_8859_3,
@@ -230,7 +233,6 @@ typedef struct _mbfl_encoding {
#define MBFL_WCSPLANE_8859_15 0x70f00000 /* 00h - FFh */
#define MBFL_WCSPLANE_KSC5601 0x70f10000 /* 2121h - 7E7Eh */
#define MBFL_WCSPLANE_GB2312 0x70f20000 /* 2121h - 7E7Eh */
#define MBFL_WCSGROUP_MASK 0xffffff
#define MBFL_WCSGROUP_UCS4MAX 0x70000000
#define MBFL_WCSGROUP_WCHARMAX 0x78000000
+8 -6
View File
@@ -131,6 +131,7 @@ function_entry mbstring_functions[] = {
};
zend_module_entry mbstring_module_entry = {
STANDARD_MODULE_HEADER,
"mbstring",
mbstring_functions,
PHP_MINIT(mbstring),
@@ -138,6 +139,7 @@ zend_module_entry mbstring_module_entry = {
PHP_RINIT(mbstring),
PHP_RSHUTDOWN(mbstring),
PHP_MINFO(mbstring),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
@@ -386,8 +388,8 @@ php_mbstring_init_globals(zend_mbstring_globals *pglobals)
pglobals->current_language = mbfl_no_language_japanese;
pglobals->internal_encoding = mbfl_no_encoding_euc_jp;
pglobals->current_internal_encoding = mbfl_no_encoding_euc_jp;
pglobals->http_output_encoding = mbfl_no_encoding_invalid;
pglobals->current_http_output_encoding = mbfl_no_encoding_invalid;
pglobals->http_output_encoding = mbfl_no_encoding_pass;
pglobals->current_http_output_encoding = mbfl_no_encoding_pass;
pglobals->http_input_identify = mbfl_no_encoding_invalid;
pglobals->http_input_identify_get = mbfl_no_encoding_invalid;
pglobals->http_input_identify_post = mbfl_no_encoding_invalid;
@@ -809,11 +811,11 @@ php_mbstr_encoding_handler(zval *arg, char *res, char *separator TSRMLS_DC)
string.no_encoding = MBSTRG(current_internal_encoding);
/* count the variables contained in the query */
num = 1;
num = 0;
var = res;
n = strlen(res);
while(n > 0) {
if (*var == *separator) {
if (*var == '=') {
num++;
}
var++;
@@ -921,7 +923,7 @@ php_mbstr_encoding_handler(zval *arg, char *res, char *separator TSRMLS_DC)
}
#if !defined(COMPILE_DL_MBSTRING)
#if defined(MBSTR_ENC_TRANS)
SAPI_POST_HANDLER_FUNC(php_mbstr_post_handler)
{
MBSTRG(http_input_identify_post) = mbfl_no_encoding_invalid;
@@ -937,7 +939,7 @@ SAPI_POST_HANDLER_FUNC(php_mbstr_post_handler)
/* http input processing */
void mbstr_treat_data(int arg, char *str, zval* destArray TSRMLS_DC)
{
char *res = NULL, *var, *val, *separator=NULL;
char *res = NULL, *separator=NULL;
const char *c_var;
pval *array_ptr;
int free_buffer=0;
+10 -1
View File
@@ -111,7 +111,16 @@ function_entry mcal_functions[] = {
};
zend_module_entry php_mcal_module_entry = {
"mcal", mcal_functions, PHP_MINIT(mcal), NULL, NULL, NULL, PHP_MINFO(mcal), STANDARD_MODULE_PROPERTIES
STANDARD_MODULE_HEADER,
"mcal",
mcal_functions,
PHP_MINIT(mcal),
NULL,
NULL,
NULL,
PHP_MINFO(mcal),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
#ifdef COMPILE_DL_MCAL
+126 -117
View File
@@ -35,6 +35,8 @@
#include "php_globals.h"
#include "ext/standard/info.h"
static int le_mcrypt;
function_entry mcrypt_functions[] = {
PHP_FE(mcrypt_ecb, NULL)
@@ -57,6 +59,9 @@ function_entry mcrypt_functions[] = {
PHP_FE(mcrypt_generic, NULL)
PHP_FE(mdecrypt_generic, NULL)
PHP_FE(mcrypt_generic_end, NULL)
#if HAVE_MCRYPT_GENERIC_DEINIT
PHP_FE(mcrypt_generic_deinit, NULL)
#endif
PHP_FE(mcrypt_enc_self_test, NULL)
PHP_FE(mcrypt_enc_is_block_algorithm_mode, NULL)
PHP_FE(mcrypt_enc_is_block_algorithm, NULL)
@@ -86,11 +91,13 @@ static PHP_MINIT_FUNCTION(mcrypt);
static PHP_MSHUTDOWN_FUNCTION(mcrypt);
zend_module_entry mcrypt_module_entry = {
STANDARD_MODULE_HEADER,
"mcrypt",
mcrypt_functions,
PHP_MINIT(mcrypt), PHP_MSHUTDOWN(mcrypt),
NULL, NULL,
PHP_MINFO(mcrypt),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES,
};
@@ -196,29 +203,17 @@ ZEND_GET_MODULE(mcrypt)
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &mcryptind) == FAILURE) { \
WRONG_PARAM_COUNT \
} \
ZEND_FETCH_RESOURCE (td, MCRYPT, mcryptind, -1, "MCrypt", MCG(le_h));
ZEND_FETCH_RESOURCE (td, MCRYPT, mcryptind, -1, "MCrypt", le_mcrypt);
#define MCRYPT_GET_MODE_DIR_ARGS(DIRECTORY) \
switch (argc) { \
case 2: \
lib_dir_s = Z_STRVAL_PP(lib_dir); \
if (zend_get_parameters_ex(2, &arg1, &lib_dir) == FAILURE) \
{ \
WRONG_PARAM_COUNT; \
} \
convert_to_string_ex (lib_dir); \
break; \
case 1: \
lib_dir_s = MCG(DIRECTORY); \
if (zend_get_parameters_ex(1, &arg1) == FAILURE) \
{ \
WRONG_PARAM_COUNT; \
} \
break; \
default: \
WRONG_PARAM_COUNT; \
} \
convert_to_string_ex(arg1);
char *dir = NULL; \
int dir_len; \
char *module; \
int module_len; \
if (zend_parse_parameters (ZEND_NUM_ARGS() TSRMLS_CC, \
"s|s", &module, &module_len, &dir, &dir_len) == FAILURE) { \
return; \
}
#endif
@@ -244,12 +239,24 @@ PHP_INI_BEGIN()
PHP_INI_END()
#endif
static void php_mcrypt_module_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC)
{
#if HAVE_LIBMCRYPT24
MCRYPT td = (MCRYPT) rsrc->ptr;
mcrypt_module_close (td);
#endif
}
static PHP_MINIT_FUNCTION(mcrypt)
{
#if defined(ZTS) && defined(HAVE_LIBMCRYPT24)
ZEND_INIT_MODULE_GLOBALS(mcrypt, NULL, NULL);
Z_TYPE(mcrypt_module_entry) = type;
#endif
le_mcrypt = zend_register_list_destructors_ex(php_mcrypt_module_dtor, NULL, "mcrypt", module_number);
/* modes for mcrypt_??? routines */
REGISTER_LONG_CONSTANT("MCRYPT_ENCRYPT", 0, CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("MCRYPT_DECRYPT", 1, CONST_PERSISTENT);
@@ -427,7 +434,7 @@ PHP_FUNCTION(mcrypt_module_open)
php_error (E_WARNING, "could not open encryption module");
RETURN_FALSE;
} else {
ZEND_REGISTER_RESOURCE (return_value, td, MCG(le_h));
ZEND_REGISTER_RESOURCE (return_value, td, le_mcrypt);
}
}
/* }}} */
@@ -444,18 +451,23 @@ PHP_FUNCTION(mcrypt_generic_init)
int max_key_size, key_size, iv_size;
MCRYPT td;
int argc;
int result = 0;
argc = ZEND_NUM_ARGS();
MCRYPT_CHECK_PARAM_COUNT (3,3)
zend_get_parameters_ex(3, &mcryptind, &key, &iv);
ZEND_FETCH_RESOURCE (td, MCRYPT, mcryptind, -1, "MCrypt", MCG(le_h));
ZEND_FETCH_RESOURCE (td, MCRYPT, mcryptind, -1, "MCrypt", le_mcrypt);
convert_to_string_ex (key);
convert_to_string_ex (iv);
max_key_size = mcrypt_enc_get_key_size (td);
iv_size = mcrypt_enc_get_iv_size (td);
if (Z_STRLEN_PP(key) == 0) {
php_error (E_WARNING, "key size is 0");
}
key_s = emalloc (Z_STRLEN_PP(key));
memset (key_s, 0, Z_STRLEN_PP(key));
@@ -479,7 +491,27 @@ PHP_FUNCTION(mcrypt_generic_init)
}
memcpy (iv_s, Z_STRVAL_PP(iv), iv_size);
RETVAL_LONG (mcrypt_generic_init (td, key_s, key_size, iv_s));
result = mcrypt_generic_init (td, key_s, key_size, iv_s);
/* If this function fails, close the mcrypt module to prevent crashes
* when further functions want to access this resource */
if (result < 0) {
zend_list_delete (Z_LVAL_PP(mcryptind));
switch (result) {
case -3:
php_error (E_WARNING, "mcrypt_generic_init: Key length incorrect");
break;
case -4:
php_error (E_WARNING, "mcrypt_generic_init: Memory allocation error");
break;
case -1:
default:
php_error (E_WARNING, "mcrypt_generic_init: Unknown error");
break;
}
}
RETVAL_LONG (result);
efree (iv_s);
efree (key_s);
}
@@ -500,25 +532,26 @@ PHP_FUNCTION(mcrypt_generic)
MCRYPT_CHECK_PARAM_COUNT (2,2)
zend_get_parameters_ex(2, &mcryptind, &data);
ZEND_FETCH_RESOURCE (td, MCRYPT, mcryptind, -1, "MCrypt", MCG(le_h));
ZEND_FETCH_RESOURCE (td, MCRYPT, mcryptind, -1, "MCrypt", le_mcrypt);
convert_to_string_ex (data);
/* Check blocksize */
if (mcrypt_enc_is_block_mode (td) == 1) { /* It's a block algorithm */
block_size = mcrypt_enc_get_block_size (td);
data_size = (((Z_STRLEN_PP(data) - 1) / block_size) + 1) * block_size;
data_s = emalloc (data_size);
data_s = emalloc (data_size + 1);
memset (data_s, 0, data_size);
memcpy (data_s, Z_STRVAL_PP(data), Z_STRLEN_PP(data));
}
else { /* It's not a block algorithm */
data_size = Z_STRLEN_PP(data);
data_s = emalloc (data_size);
data_s = emalloc (data_size + 1);
memset (data_s, 0, data_size);
memcpy (data_s, Z_STRVAL_PP(data), Z_STRLEN_PP(data));
}
mcrypt_generic (td, data_s, data_size);
data_s[data_size] = '\0';
RETVAL_STRINGL (data_s, data_size, 1);
efree (data_s);
@@ -540,20 +573,20 @@ PHP_FUNCTION(mdecrypt_generic)
MCRYPT_CHECK_PARAM_COUNT (2,2)
zend_get_parameters_ex(2, &mcryptind, &data);
ZEND_FETCH_RESOURCE (td, MCRYPT, mcryptind, -1, "MCrypt", MCG(le_h));
ZEND_FETCH_RESOURCE (td, MCRYPT, mcryptind, -1, "MCrypt", le_mcrypt);
convert_to_string_ex (data);
/* Check blocksize */
if (mcrypt_enc_is_block_mode (td) == 1) { /* It's a block algorithm */
block_size = mcrypt_enc_get_block_size (td);
data_size = (((Z_STRLEN_PP(data) - 1) / block_size) + 1) * block_size;
data_s = emalloc (data_size);
data_s = emalloc (data_size + 1);
memset (data_s, 0, data_size);
memcpy (data_s, Z_STRVAL_PP(data), Z_STRLEN_PP(data));
}
else { /* It's not a block algorithm */
data_size = Z_STRLEN_PP(data);
data_s = emalloc (data_size);
data_s = emalloc (data_size + 1);
memset (data_s, 0, data_size);
memcpy (data_s, Z_STRVAL_PP(data), Z_STRLEN_PP(data));
}
@@ -607,7 +640,8 @@ PHP_FUNCTION(mcrypt_enc_self_test)
}
/* }}} */
/* {{{ proto bool mcrypt_module_close(resource td)
Free the descriptor td */
PHP_FUNCTION(mcrypt_module_close)
{
zval **mcryptind;
@@ -615,15 +649,10 @@ PHP_FUNCTION(mcrypt_module_close)
MCRYPT_GET_TD_ARG
if (mcrypt_module_close (td) < 0) {
php_error (E_WARNING, "could not close module");
RETURN_FALSE
} else {
zend_list_delete (Z_LVAL_PP(mcryptind));
RETURN_TRUE
}
zend_list_delete (Z_LVAL_PP(mcryptind));
RETURN_TRUE;
}
/* }}} */
/* {{{ proto bool mcrypt_generic_end(resource td)
This function terminates encrypt specified by the descriptor td */
@@ -634,7 +663,12 @@ PHP_FUNCTION(mcrypt_generic_end)
MCRYPT_GET_TD_ARG
#if HAVE_MCRYPT_GENERIC_DEINIT
php_error(E_NOTICE, "mcrypt_generic_end is deprecated, please use mcrypt_generic_deinit");
if (mcrypt_generic_deinit (td) < 0) {
#else
if (mcrypt_generic_end (td) < 0) {
#endif
php_error (E_WARNING, "could not terminate encryption specifier");
RETURN_FALSE
}
@@ -643,6 +677,28 @@ PHP_FUNCTION(mcrypt_generic_end)
/* }}} */
#if HAVE_MCRYPT_GENERIC_DEINIT
/* {{{ proto bool mcrypt_generic_deinit(resource td)
This function terminates encrypt specified by the descriptor td */
PHP_FUNCTION(mcrypt_generic_deinit)
{
zval **mcryptind;
MCRYPT td;
MCRYPT_GET_TD_ARG
if (mcrypt_generic_deinit (td) < 0) {
php_error (E_WARNING, "could not terminate encryption specifier");
RETURN_FALSE
}
RETURN_TRUE
}
/* }}} */
#endif
/* {{{ proto bool mcrypt_enc_is_block_algorithm_mode(resource td)
Returns TRUE if the mode is for use with block algorithms */
PHP_FUNCTION(mcrypt_enc_is_block_algorithm_mode)
@@ -774,18 +830,11 @@ PHP_FUNCTION(mcrypt_enc_get_modes_name)
Does a self test of the module "module" */
PHP_FUNCTION(mcrypt_module_self_test)
{
zval **arg1, **lib_dir;
char *lib_dir_s;
int argc;
argc = ZEND_NUM_ARGS();
MCRYPT_GET_MODE_DIR_ARGS(algorithms_dir);
if (mcrypt_module_self_test ((*arg1)->value.str.val, lib_dir_s) == 0) {
if (mcrypt_module_self_test (module, dir) == 0) {
RETURN_TRUE;
}
else {
} else {
RETURN_FALSE;
}
}
@@ -796,18 +845,11 @@ PHP_FUNCTION(mcrypt_module_self_test)
Returns TRUE if the mode is for use with block algorithms */
PHP_FUNCTION(mcrypt_module_is_block_algorithm_mode)
{
zval **arg1, **lib_dir;
char *lib_dir_s;
int argc;
argc = ZEND_NUM_ARGS();
MCRYPT_GET_MODE_DIR_ARGS(modes_dir)
if (mcrypt_module_is_block_algorithm_mode ((*arg1)->value.str.val, lib_dir_s) == 0) {
if (mcrypt_module_is_block_algorithm_mode (module, dir) == 1) {
RETURN_TRUE;
}
else {
} else {
RETURN_FALSE;
}
}
@@ -818,18 +860,11 @@ PHP_FUNCTION(mcrypt_module_is_block_algorithm_mode)
Returns TRUE if the algorithm is a block algorithm */
PHP_FUNCTION(mcrypt_module_is_block_algorithm)
{
zval **arg1, **lib_dir;
char *lib_dir_s;
int argc;
argc = ZEND_NUM_ARGS();
MCRYPT_GET_MODE_DIR_ARGS(algorithms_dir)
if (mcrypt_module_is_block_algorithm ((*arg1)->value.str.val, lib_dir_s) == 0) {
if (mcrypt_module_is_block_algorithm (module, dir) == 1) {
RETURN_TRUE;
}
else {
} else {
RETURN_FALSE;
}
}
@@ -840,18 +875,11 @@ PHP_FUNCTION(mcrypt_module_is_block_algorithm)
Returns TRUE if the mode outputs blocks of bytes */
PHP_FUNCTION(mcrypt_module_is_block_mode)
{
zval **arg1, **lib_dir;
char *lib_dir_s;
int argc;
argc = ZEND_NUM_ARGS();
MCRYPT_GET_MODE_DIR_ARGS(modes_dir)
if (mcrypt_module_is_block_mode ((*arg1)->value.str.val, lib_dir_s) == 0) {
if (mcrypt_module_is_block_mode (module, dir) == 1) {
RETURN_TRUE;
}
else {
} else {
RETURN_FALSE;
}
}
@@ -862,15 +890,9 @@ PHP_FUNCTION(mcrypt_module_is_block_mode)
Returns the block size of the algorithm */
PHP_FUNCTION(mcrypt_module_get_algo_block_size)
{
zval **arg1, **lib_dir;
char *lib_dir_s;
int argc;
argc = ZEND_NUM_ARGS();
MCRYPT_GET_MODE_DIR_ARGS(algorithms_dir)
RETURN_LONG(mcrypt_module_get_algo_block_size ((*arg1)->value.str.val, lib_dir_s))
RETURN_LONG(mcrypt_module_get_algo_block_size (module, dir));
}
/* }}} */
@@ -879,15 +901,9 @@ PHP_FUNCTION(mcrypt_module_get_algo_block_size)
Returns the maximum supported key size of the algorithm */
PHP_FUNCTION(mcrypt_module_get_algo_key_size)
{
zval **arg1, **lib_dir;
char *lib_dir_s;
int argc;
argc = ZEND_NUM_ARGS();
MCRYPT_GET_MODE_DIR_ARGS(algorithms_dir);
RETURN_LONG(mcrypt_module_get_algo_key_size ((*arg1)->value.str.val, lib_dir_s))
RETURN_LONG(mcrypt_module_get_algo_key_size (module, dir));
}
/* }}} */
@@ -896,16 +912,12 @@ PHP_FUNCTION(mcrypt_module_get_algo_key_size)
This function decrypts the crypttext */
PHP_FUNCTION(mcrypt_module_get_supported_key_sizes)
{
zval **arg1, **lib_dir;
char *lib_dir_s;
int argc, i, count;
int i, count;
int *key_sizes;
argc = ZEND_NUM_ARGS();
MCRYPT_GET_MODE_DIR_ARGS(algorithms_dir)
key_sizes = mcrypt_module_get_algo_supported_key_sizes ((*arg1)->value.str.val, lib_dir_s, &count);
key_sizes = mcrypt_module_get_algo_supported_key_sizes (module, dir, &count);
if (array_init(return_value) == FAILURE) {
php_error(E_ERROR, "Unable to initialize array");
@@ -1410,56 +1422,53 @@ PHP_FUNCTION(mcrypt_ofb)
#endif
/* {{{ proto string mcrypt_create_iv(int size, int source)
Create an initializing vector (IV) */
Create an initialization vector (IV) */
PHP_FUNCTION(mcrypt_create_iv)
{
zval **size, **psource;
char *iv;
iv_source source;
int i;
iv_source source = RANDOM;
long size;
int n = 0;
if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &size, &psource) == FAILURE) {
WRONG_PARAM_COUNT;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|l", &size, &source) == FAILURE) {
return;
}
convert_to_long_ex(size);
convert_to_long_ex(psource);
source = Z_LVAL_PP(psource);
i = Z_LVAL_PP(size);
if(i <= 0) {
if (size <= 0) {
php_error(E_WARNING, "can not create an IV with size 0 or smaller");
RETURN_FALSE;
}
iv = ecalloc(i, 1);
iv = ecalloc(size + 1, 1);
if(source == RANDOM || source == URANDOM) {
int fd;
if (source == RANDOM || source == URANDOM) {
int fd;
size_t read_bytes = 0;
fd = open(source == RANDOM ? "/dev/random" : "/dev/urandom",
O_RDONLY);
if(fd < 0) {
if (fd < 0) {
efree(iv);
php_error(E_WARNING, "cannot open source device");
RETURN_FALSE;
}
while (read_bytes < i) {
n = read(fd, iv + read_bytes, i - read_bytes);
while (read_bytes < size) {
n = read(fd, iv + read_bytes, size - read_bytes);
if (n < 0)
break;
read_bytes += n;
}
n = read_bytes;
close(fd);
if (n < size) {
php_error(E_WARNING, "could not gather sufficient random data");
RETURN_FALSE;
}
} else {
while(i) {
iv[--i] = 255.0 * rand() / RAND_MAX;
n = size;
while (size) {
iv[--size] = 255.0 * rand() / RAND_MAX;
}
n = Z_LVAL_PP(size);
}
RETURN_STRINGL(iv, n, 0);
}
-1
View File
@@ -61,7 +61,6 @@ PHP_FUNCTION(mcrypt_module_get_supported_key_sizes);
PHP_FUNCTION(mcrypt_module_close);
ZEND_BEGIN_MODULE_GLOBALS(mcrypt)
int le_h;
char *modes_dir;
char *algorithms_dir;
ZEND_END_MODULE_GLOBALS(mcrypt)
+2
View File
@@ -46,11 +46,13 @@ function_entry mhash_functions[] = {
static PHP_MINIT_FUNCTION(mhash);
zend_module_entry mhash_module_entry = {
STANDARD_MODULE_HEADER,
"mhash",
mhash_functions,
PHP_MINIT(mhash), NULL,
NULL, NULL,
NULL,
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES,
};
+2
View File
@@ -2920,6 +2920,7 @@ PHP_FUNCTION(swftextfield_addString)
/* }}} */
zend_module_entry ming_module_entry = {
STANDARD_MODULE_HEADER,
"ming",
ming_functions,
PHP_MINIT(ming),
@@ -2927,6 +2928,7 @@ zend_module_entry ming_module_entry = {
NULL,
NULL,
PHP_MINFO(ming),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
+2
View File
@@ -145,6 +145,7 @@ function_entry mnogosearch_functions[] = {
/* }}} */
zend_module_entry mnogosearch_module_entry = {
STANDARD_MODULE_HEADER,
"mnogosearch",
mnogosearch_functions,
PHP_MINIT(mnogosearch),
@@ -152,6 +153,7 @@ zend_module_entry mnogosearch_module_entry = {
PHP_RINIT(mnogosearch),
NULL,
PHP_MINFO(mnogosearch),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
+3 -3
View File
@@ -103,8 +103,9 @@ function_entry msql_functions[] = {
/* }}} */
zend_module_entry msql_module_entry = {
STANDARD_MODULE_HEADER,
"msql", msql_functions, PHP_MINIT(msql), NULL, PHP_RINIT(msql), NULL,
PHP_MINFO(msql), STANDARD_MODULE_PROPERTIES
PHP_MINFO(msql), NO_VERSION_YET, STANDARD_MODULE_PROPERTIES
};
@@ -849,11 +850,10 @@ PHP_FUNCTION(msql_result)
return_value->value.str.len = (sql_row[field_offset]?strlen(sql_row[field_offset]):0);
return_value->value.str.val = (char *) safe_estrndup(sql_row[field_offset],return_value->value.str.len);
}
return_value->type = IS_STRING;
} else {
ZVAL_FALSE(return_value);
}
return_value->type = IS_STRING;
}
/* }}} */
File diff suppressed because it is too large. Load diff
+2
View File
@@ -61,6 +61,7 @@ function_entry muscat_functions[] = {
};
zend_module_entry muscat_module_entry = {
STANDARD_MODULE_HEADER,
"muscat",
muscat_functions,
PHP_MINIT(muscat),
@@ -68,6 +69,7 @@ zend_module_entry muscat_module_entry = {
PHP_RINIT(muscat), /* Replace with NULL if there's nothing to do at request start */
PHP_RSHUTDOWN(muscat), /* Replace with NULL if there's nothing to do at request end */
PHP_MINFO(muscat),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
+2 -1
View File
@@ -23,6 +23,7 @@ AC_DEFUN(PHP_MYSQL_SOCK,[
/var/tmp/mysql.sock \
/var/lib/mysql/mysql.sock \
/var/mysql/mysql.sock \
/Private/tmp/mysql.sock \
; do
if test -r $i; then
MYSQL_SOCK=$i
@@ -80,7 +81,7 @@ elif test "$PHP_MYSQL" != "no"; then
if test "$PHP_ZLIB_DIR" != "no"; then
PHP_ADD_LIBRARY(z,, MYSQL_SHARED_LIBADD)
MYSQL_LIBS="-L$PHP_ZLIB_DIR -z"
MYSQL_LIBS="-L$PHP_ZLIB_DIR/lib -z"
fi
PHP_ADD_LIBRARY_WITH_PATH(mysqlclient, $MYSQL_LIB_DIR, MYSQL_SHARED_LIBADD)
+127 -93
View File
@@ -55,14 +55,16 @@ static int le_result, le_link, le_plink;
#include "php_ini.h"
# if HAVE_MYSQL_MYSQL_H
# include <mysql/mysql.h>
# else
# include <mysql.h>
# endif
#if HAVE_MYSQL_MYSQL_H
# include <mysql/mysql.h>
#else
# include <mysql.h>
#endif
#ifdef HAVE_MYSQL_REAL_CONNECT
#ifdef HAVE_ERRMSG_H
#include <errmsg.h>
# ifdef HAVE_ERRMSG_H
# include <errmsg.h>
# endif
#endif
#define SAFE_STRING(s) ((s)?(s):"")
@@ -117,8 +119,10 @@ function_entry mysql_functions[] = {
PHP_FE(mysql_pconnect, NULL)
PHP_FE(mysql_close, NULL)
PHP_FE(mysql_select_db, NULL)
#if MYSQL_VERSION_ID < 40000
PHP_FE(mysql_create_db, NULL)
PHP_FE(mysql_drop_db, NULL)
#endif
PHP_FE(mysql_query, NULL)
PHP_FE(mysql_unbuffered_query, NULL)
PHP_FE(mysql_db_query, NULL)
@@ -164,8 +168,10 @@ function_entry mysql_functions[] = {
PHP_FALIAS(mysql_fieldtype, mysql_field_type, NULL)
PHP_FALIAS(mysql_fieldflags, mysql_field_flags, NULL)
PHP_FALIAS(mysql_selectdb, mysql_select_db, NULL)
#if MYSQL_VERSION_ID < 40000
PHP_FALIAS(mysql_createdb, mysql_create_db, NULL)
PHP_FALIAS(mysql_dropdb, mysql_drop_db, NULL)
#endif
PHP_FALIAS(mysql_freeresult, mysql_free_result, NULL)
PHP_FALIAS(mysql_numfields, mysql_num_fields, NULL)
PHP_FALIAS(mysql_numrows, mysql_num_rows, NULL)
@@ -182,8 +188,16 @@ function_entry mysql_functions[] = {
/* {{{ mysql_module_entry
*/
zend_module_entry mysql_module_entry = {
"mysql", mysql_functions, ZEND_MODULE_STARTUP_N(mysql), PHP_MSHUTDOWN(mysql), PHP_RINIT(mysql), PHP_RSHUTDOWN(mysql),
PHP_MINFO(mysql), STANDARD_MODULE_PROPERTIES
STANDARD_MODULE_HEADER,
"mysql",
mysql_functions,
ZEND_MODULE_STARTUP_N(mysql),
PHP_MSHUTDOWN(mysql),
PHP_RINIT(mysql),
PHP_RSHUTDOWN(mysql),
PHP_MINFO(mysql),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
/* }}} */
@@ -316,7 +330,7 @@ ZEND_MODULE_STARTUP_D(mysql)
le_result = zend_register_list_destructors_ex(_free_mysql_result, NULL, "mysql result", module_number);
le_link = zend_register_list_destructors_ex(_close_mysql_link, NULL, "mysql link", module_number);
le_plink = zend_register_list_destructors_ex(NULL, _close_mysql_plink, "mysql link persistent", module_number);
mysql_module_entry.type = type;
Z_TYPE(mysql_module_entry) = type;
REGISTER_LONG_CONSTANT("MYSQL_ASSOC", MYSQL_ASSOC, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("MYSQL_NUM", MYSQL_NUM, CONST_CS | CONST_PERSISTENT);
@@ -324,6 +338,12 @@ ZEND_MODULE_STARTUP_D(mysql)
REGISTER_LONG_CONSTANT("MYSQL_USE_RESULT", MYSQL_USE_RESULT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("MYSQL_STORE_RESULT", MYSQL_STORE_RESULT, CONST_CS | CONST_PERSISTENT);
#ifdef ZTS
# if MYSQL_VERSION_ID >= 40000
mysql_thread_init();
# endif
#endif
return SUCCESS;
}
/* }}} */
@@ -332,6 +352,12 @@ ZEND_MODULE_STARTUP_D(mysql)
*/
PHP_MSHUTDOWN_FUNCTION(mysql)
{
#ifdef ZTS
# if MYSQL_VERSION_ID >= 40000
mysql_thread_end();
# endif
#endif
UNREGISTER_INI_ENTRIES();
return SUCCESS;
}
@@ -438,7 +464,7 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
MYSQL_DO_CONNECT_RETURN_FALSE();
}
convert_to_string_ex(z_user);
user = (*z_user)->value.str.val;
user = Z_STRVAL_PP(z_user);
}
break;
case 3: {
@@ -447,8 +473,8 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
}
convert_to_string_ex(z_user);
convert_to_string_ex(z_passwd);
user = (*z_user)->value.str.val;
passwd = (*z_passwd)->value.str.val;
user = Z_STRVAL_PP(z_user);
passwd = Z_STRVAL_PP(z_passwd);
}
break;
default:
@@ -541,7 +567,7 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
}
/* hash it up */
new_le.type = le_plink;
Z_TYPE(new_le) = le_plink;
new_le.ptr = mysql;
if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_details_length+1, (void *) &new_le, sizeof(list_entry), NULL)==FAILURE) {
free(mysql);
@@ -551,7 +577,7 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
MySG(num_persistent)++;
MySG(num_links)++;
} else { /* we do */
if (le->type != le_plink) {
if (Z_TYPE_P(le) != le_plink) {
MYSQL_DO_CONNECT_RETURN_FALSE();
}
/* ensure that the link did not die */
@@ -590,16 +616,16 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
int type, link;
void *ptr;
if (index_ptr->type != le_index_ptr) {
if (Z_TYPE_P(index_ptr) != le_index_ptr) {
MYSQL_DO_CONNECT_RETURN_FALSE();
}
link = (int) index_ptr->ptr;
ptr = zend_list_find(link,&type); /* check if the link is still there */
if (ptr && (type==le_link || type==le_plink)) {
zend_list_addref(link);
return_value->value.lval = link;
Z_LVAL_P(return_value) = link;
php_mysql_set_default_link(link TSRMLS_CC);
return_value->type = IS_RESOURCE;
Z_TYPE_P(return_value) = IS_RESOURCE;
efree(hashed_details);
MYSQL_DO_CONNECT_CLEANUP();
return;
@@ -638,8 +664,8 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
ZEND_REGISTER_RESOURCE(return_value, mysql, le_link);
/* add it to the hash */
new_index_ptr.ptr = (void *) return_value->value.lval;
new_index_ptr.type = le_index_ptr;
new_index_ptr.ptr = (void *) Z_LVAL_P(return_value);
Z_TYPE(new_index_ptr) = le_index_ptr;
if (zend_hash_update(&EG(regular_list), hashed_details, hashed_details_length+1,(void *) &new_index_ptr, sizeof(list_entry), NULL)==FAILURE) {
efree(hashed_details);
MYSQL_DO_CONNECT_RETURN_FALSE();
@@ -648,7 +674,7 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
}
efree(hashed_details);
php_mysql_set_default_link(return_value->value.lval TSRMLS_CC);
php_mysql_set_default_link(Z_LVAL_P(return_value) TSRMLS_CC);
MYSQL_DO_CONNECT_CLEANUP();
}
/* }}} */
@@ -752,7 +778,7 @@ PHP_FUNCTION(mysql_select_db)
convert_to_string_ex(db);
if (mysql_select_db(&mysql->conn, (*db)->value.str.val)!=0) {
if (mysql_select_db(&mysql->conn, Z_STRVAL_PP(db))!=0) {
RETURN_FALSE;
} else {
RETURN_TRUE;
@@ -866,6 +892,7 @@ PHP_FUNCTION(mysql_get_server_info)
#endif
#if MYSQL_VERSION_ID < 40000
/* {{{ proto int mysql_create_db(string database_name [, int link_identifier])
Create a MySQL database */
PHP_FUNCTION(mysql_create_db)
@@ -896,7 +923,7 @@ PHP_FUNCTION(mysql_create_db)
ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, mysql_link, id, "MySQL-Link", le_link, le_plink);
convert_to_string_ex(db);
if (mysql_create_db(&mysql->conn, (*db)->value.str.val)==0) {
if (mysql_create_db(&mysql->conn, Z_STRVAL_PP(db))==0) {
RETURN_TRUE;
} else {
RETURN_FALSE;
@@ -935,13 +962,14 @@ PHP_FUNCTION(mysql_drop_db)
ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, mysql_link, id, "MySQL-Link", le_link, le_plink);
convert_to_string_ex(db);
if (mysql_drop_db(&mysql->conn, (*db)->value.str.val)==0) {
if (mysql_drop_db(&mysql->conn, Z_STRVAL_PP(db))==0) {
RETURN_TRUE;
} else {
RETURN_FALSE;
}
}
/* }}} */
#endif
/* {{{ php_mysql_do_query_general
*/
@@ -954,7 +982,7 @@ static void php_mysql_do_query_general(zval **query, zval **mysql_link, int link
if (db) {
convert_to_string_ex(db);
if (mysql_select_db(&mysql->conn, (*db)->value.str.val)!=0) {
if (mysql_select_db(&mysql->conn, Z_STRVAL_PP(db))!=0) {
RETURN_FALSE;
}
}
@@ -965,10 +993,12 @@ static void php_mysql_do_query_general(zval **query, zval **mysql_link, int link
MYSQL_RES *mysql_result;
mysql_result = (MYSQL_RES *) zend_list_find(mysql->active_result_id, &type);
if (mysql_result && type==le_result && !mysql_eof(mysql_result)) {
php_error(E_NOTICE, "Called %s() without first fetching all rows from a previous unbuffered query",
get_active_function_name(TSRMLS_C));
while (mysql_fetch_row(mysql_result));
if (mysql_result && type==le_result) {
if (!mysql_eof(mysql_result)) {
php_error(E_NOTICE, "Called %s() without first fetching all rows from a previous unbuffered query",
get_active_function_name(TSRMLS_C));
while (mysql_fetch_row(mysql_result));
}
zend_list_delete(mysql->active_result_id);
mysql->active_result_id = 0;
}
@@ -977,11 +1007,11 @@ static void php_mysql_do_query_general(zval **query, zval **mysql_link, int link
convert_to_string_ex(query);
/* mysql_query is binary unsafe, use mysql_real_query */
#if MYSQL_VERSION_ID > 32199
if (mysql_real_query(&mysql->conn, (*query)->value.str.val, (*query)->value.str.len)!=0) {
if (mysql_real_query(&mysql->conn, Z_STRVAL_PP(query), Z_STRLEN_PP(query))!=0) {
RETURN_FALSE;
}
#else
if (mysql_query(&mysql->conn, (*query)->value.str.val)!=0) {
if (mysql_query(&mysql->conn, Z_STRVAL_PP(query))!=0) {
RETURN_FALSE;
}
#endif
@@ -1152,7 +1182,7 @@ PHP_FUNCTION(mysql_list_tables)
ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, mysql_link, id, "MySQL-Link", le_link, le_plink);
convert_to_string_ex(db);
if (mysql_select_db(&mysql->conn, (*db)->value.str.val)!=0) {
if (mysql_select_db(&mysql->conn, Z_STRVAL_PP(db))!=0) {
RETURN_FALSE;
}
if ((mysql_result=mysql_list_tables(&mysql->conn, NULL))==NULL) {
@@ -1195,11 +1225,11 @@ PHP_FUNCTION(mysql_list_fields)
ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, mysql_link, id, "MySQL-Link", le_link, le_plink);
convert_to_string_ex(db);
if (mysql_select_db(&mysql->conn, (*db)->value.str.val)!=0) {
if (mysql_select_db(&mysql->conn, Z_STRVAL_PP(db))!=0) {
RETURN_FALSE;
}
convert_to_string_ex(table);
if ((mysql_result=mysql_list_fields(&mysql->conn, (*table)->value.str.val, NULL))==NULL) {
if ((mysql_result=mysql_list_fields(&mysql->conn, Z_STRVAL_PP(table), NULL))==NULL) {
php_error(E_WARNING, "Unable to save MySQL query result");
RETURN_FALSE;
}
@@ -1311,13 +1341,13 @@ PHP_FUNCTION(mysql_affected_rows)
ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, mysql_link, id, "MySQL-Link", le_link, le_plink);
/* conversion from int64 to long happing here */
return_value->value.lval = (long) mysql_affected_rows(&mysql->conn);
return_value->type = IS_LONG;
Z_LVAL_P(return_value) = (long) mysql_affected_rows(&mysql->conn);
Z_TYPE_P(return_value) = IS_LONG;
}
/* }}} */
/* {{{ proto char mysql_escape_string([char string])
/* {{{ proto string mysql_escape_string(string to_be_escaped)
Escape string for mysql query */
PHP_FUNCTION(mysql_escape_string)
{
@@ -1333,7 +1363,7 @@ PHP_FUNCTION(mysql_escape_string)
*/
Z_STRVAL_P(return_value) = (char *) emalloc(Z_STRLEN_PP(str)*2+1);
Z_STRLEN_P(return_value) = mysql_escape_string(Z_STRVAL_P(return_value), Z_STRVAL_PP(str), Z_STRLEN_PP(str));
return_value->type = IS_STRING;
Z_TYPE_P(return_value) = IS_STRING;
}
/* }}} */
@@ -1365,8 +1395,8 @@ PHP_FUNCTION(mysql_insert_id)
ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, mysql_link, id, "MySQL-Link", le_link, le_plink);
/* conversion from int64 to long happing here */
return_value->value.lval = (long) mysql_insert_id(&mysql->conn);
return_value->type = IS_LONG;
Z_LVAL_P(return_value) = (long) mysql_insert_id(&mysql->conn);
Z_TYPE_P(return_value) = IS_LONG;
}
/* }}} */
@@ -1400,29 +1430,29 @@ PHP_FUNCTION(mysql_result)
ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, result, -1, "MySQL result", le_result);
convert_to_long_ex(row);
if ((*row)->value.lval<0 || (*row)->value.lval>=(int)mysql_num_rows(mysql_result)) {
php_error(E_WARNING, "Unable to jump to row %d on MySQL result index %d", (*row)->value.lval, (*result)->value.lval);
if (Z_LVAL_PP(row)<0 || Z_LVAL_PP(row)>=(int)mysql_num_rows(mysql_result)) {
php_error(E_WARNING, "Unable to jump to row %d on MySQL result index %d", Z_LVAL_PP(row), Z_LVAL_PP(result));
RETURN_FALSE;
}
mysql_data_seek(mysql_result, (*row)->value.lval);
mysql_data_seek(mysql_result, Z_LVAL_PP(row));
if ((sql_row=mysql_fetch_row(mysql_result))==NULL
|| (sql_row_lengths=mysql_fetch_lengths(mysql_result))==NULL) { /* shouldn't happen? */
RETURN_FALSE;
}
if (field) {
switch((*field)->type) {
switch(Z_TYPE_PP(field)) {
case IS_STRING: {
int i=0;
MYSQL_FIELD *tmp_field;
char *table_name, *field_name, *tmp;
if ((tmp=strchr((*field)->value.str.val, '.'))) {
table_name = estrndup((*field)->value.str.val, tmp-(*field)->value.str.val);
if ((tmp=strchr(Z_STRVAL_PP(field), '.'))) {
table_name = estrndup(Z_STRVAL_PP(field), tmp-Z_STRVAL_PP(field));
field_name = estrdup(tmp+1);
} else {
table_name = NULL;
field_name = estrndup((*field)->value.str.val,(*field)->value.str.len);
field_name = estrndup(Z_STRVAL_PP(field),Z_STRLEN_PP(field));
}
mysql_field_seek(mysql_result, 0);
while ((tmp_field=mysql_fetch_field(mysql_result))) {
@@ -1434,7 +1464,7 @@ PHP_FUNCTION(mysql_result)
}
if (!tmp_field) { /* no match found */
php_error(E_WARNING, "%s%s%s not found in MySQL result index %d",
(table_name?table_name:""), (table_name?".":""), field_name, (*result)->value.lval);
(table_name?table_name:""), (table_name?".":""), field_name, Z_LVAL_PP(result));
efree(field_name);
if (table_name) {
efree(table_name);
@@ -1449,7 +1479,7 @@ PHP_FUNCTION(mysql_result)
break;
default:
convert_to_long_ex(field);
field_offset = (*field)->value.lval;
field_offset = Z_LVAL_PP(field);
if (field_offset<0 || field_offset>=(int)mysql_num_fields(mysql_result)) {
php_error(E_WARNING, "Bad column offset specified");
RETURN_FALSE;
@@ -1459,16 +1489,16 @@ PHP_FUNCTION(mysql_result)
}
if (sql_row[field_offset]) {
return_value->type = IS_STRING;
Z_TYPE_P(return_value) = IS_STRING;
if (PG(magic_quotes_runtime)) {
return_value->value.str.val = php_addslashes(sql_row[field_offset], sql_row_lengths[field_offset],&return_value->value.str.len, 0 TSRMLS_CC);
Z_STRVAL_P(return_value) = php_addslashes(sql_row[field_offset], sql_row_lengths[field_offset],&Z_STRLEN_P(return_value), 0 TSRMLS_CC);
} else {
return_value->value.str.len = sql_row_lengths[field_offset];
return_value->value.str.val = (char *) safe_estrndup(sql_row[field_offset], return_value->value.str.len);
Z_STRLEN_P(return_value) = sql_row_lengths[field_offset];
Z_STRVAL_P(return_value) = (char *) safe_estrndup(sql_row[field_offset], Z_STRLEN_P(return_value));
}
} else {
return_value->type = IS_NULL;
Z_TYPE_P(return_value) = IS_NULL;
}
}
/* }}} */
@@ -1488,8 +1518,8 @@ PHP_FUNCTION(mysql_num_rows)
ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, result, -1, "MySQL result", le_result);
/* conversion from int64 to long happing here */
return_value->value.lval = (long)mysql_num_rows(mysql_result);
return_value->type = IS_LONG;
Z_LVAL_P(return_value) = (long)mysql_num_rows(mysql_result);
Z_TYPE_P(return_value) = IS_LONG;
}
/* }}} */
@@ -1506,8 +1536,8 @@ PHP_FUNCTION(mysql_num_fields)
ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, result, -1, "MySQL result", le_result);
return_value->value.lval = mysql_num_fields(mysql_result);
return_value->type = IS_LONG;
Z_LVAL_P(return_value) = mysql_num_fields(mysql_result);
Z_TYPE_P(return_value) = IS_LONG;
}
/* }}} */
@@ -1541,7 +1571,7 @@ static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type,
RETURN_FALSE;
}
convert_to_long_ex(arg2);
result_type = (*arg2)->value.lval;
result_type = Z_LVAL_PP(arg2);
break;
default:
WRONG_PARAM_COUNT;
@@ -1612,7 +1642,7 @@ PHP_FUNCTION(mysql_fetch_object)
php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, MYSQL_ASSOC, 2);
if (Z_TYPE_P(return_value) == IS_ARRAY) {
object_and_properties_init(return_value, &zend_standard_class_def, return_value->value.ht);
object_and_properties_init(return_value, &zend_standard_class_def, Z_ARRVAL_P(return_value));
}
}
/* }}} */
@@ -1649,11 +1679,11 @@ PHP_FUNCTION(mysql_data_seek)
ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, result, -1, "MySQL result", le_result);
convert_to_long_ex(offset);
if ((*offset)->value.lval<0 || (*offset)->value.lval>=(int)mysql_num_rows(mysql_result)) {
php_error(E_WARNING, "Offset %d is invalid for MySQL result index %d", (*offset)->value.lval, (*result)->value.lval);
if (Z_LVAL_PP(offset)<0 || Z_LVAL_PP(offset)>=(int)mysql_num_rows(mysql_result)) {
php_error(E_WARNING, "Offset %d is invalid for MySQL result index %d", Z_LVAL_PP(offset), Z_LVAL_PP(result));
RETURN_FALSE;
}
mysql_data_seek(mysql_result, (*offset)->value.lval);
mysql_data_seek(mysql_result, Z_LVAL_PP(offset));
RETURN_TRUE;
}
/* }}} */
@@ -1773,11 +1803,11 @@ PHP_FUNCTION(mysql_fetch_field)
ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, result, -1, "MySQL result", le_result);
if (field) {
if ((*field)->value.lval<0 || (*field)->value.lval>=(int)mysql_num_fields(mysql_result)) {
if (Z_LVAL_PP(field)<0 || Z_LVAL_PP(field)>=(int)mysql_num_fields(mysql_result)) {
php_error(E_WARNING, "MySQL: Bad field offset");
RETURN_FALSE;
}
mysql_field_seek(mysql_result, (*field)->value.lval);
mysql_field_seek(mysql_result, Z_LVAL_PP(field));
}
if ((mysql_field=mysql_fetch_field(mysql_result))==NULL) {
RETURN_FALSE;
@@ -1794,9 +1824,9 @@ PHP_FUNCTION(mysql_fetch_field)
add_property_long(return_value, "primary_key", IS_PRI_KEY(mysql_field->flags)?1:0);
add_property_long(return_value, "multiple_key",(mysql_field->flags&MULTIPLE_KEY_FLAG?1:0));
add_property_long(return_value, "unique_key",(mysql_field->flags&UNIQUE_KEY_FLAG?1:0));
add_property_long(return_value, "numeric", IS_NUM(mysql_field->type)?1:0);
add_property_long(return_value, "numeric", IS_NUM(Z_TYPE_P(mysql_field))?1:0);
add_property_long(return_value, "blob", IS_BLOB(mysql_field->flags)?1:0);
add_property_string(return_value, "type", php_mysql_get_field_name(mysql_field->type), 1);
add_property_string(return_value, "type", php_mysql_get_field_name(Z_TYPE_P(mysql_field)), 1);
add_property_long(return_value, "unsigned",(mysql_field->flags&UNSIGNED_FLAG?1:0));
add_property_long(return_value, "zerofill",(mysql_field->flags&ZEROFILL_FLAG?1:0));
}
@@ -1817,11 +1847,11 @@ PHP_FUNCTION(mysql_field_seek)
ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, result, -1, "MySQL result", le_result);
convert_to_long_ex(offset);
if ((*offset)->value.lval<0 || (*offset)->value.lval>=(int)mysql_num_fields(mysql_result)) {
php_error(E_WARNING, "Field %d is invalid for MySQL result index %d", (*offset)->value.lval, (*result)->value.lval);
if (Z_LVAL_PP(offset)<0 || Z_LVAL_PP(offset)>=(int)mysql_num_fields(mysql_result)) {
php_error(E_WARNING, "Field %d is invalid for MySQL result index %d", Z_LVAL_PP(offset), Z_LVAL_PP(result));
RETURN_FALSE;
}
mysql_field_seek(mysql_result, (*offset)->value.lval);
mysql_field_seek(mysql_result, Z_LVAL_PP(offset));
RETURN_TRUE;
}
/* }}} */
@@ -1850,35 +1880,35 @@ static void php_mysql_field_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, result, -1, "MySQL result", le_result);
convert_to_long_ex(field);
if ((*field)->value.lval<0 || (*field)->value.lval>=(int)mysql_num_fields(mysql_result)) {
php_error(E_WARNING, "Field %d is invalid for MySQL result index %d", (*field)->value.lval, (*result)->value.lval);
if (Z_LVAL_PP(field)<0 || Z_LVAL_PP(field)>=(int)mysql_num_fields(mysql_result)) {
php_error(E_WARNING, "Field %d is invalid for MySQL result index %d", Z_LVAL_PP(field), Z_LVAL_PP(result));
RETURN_FALSE;
}
mysql_field_seek(mysql_result, (*field)->value.lval);
mysql_field_seek(mysql_result, Z_LVAL_PP(field));
if ((mysql_field=mysql_fetch_field(mysql_result))==NULL) {
RETURN_FALSE;
}
switch (entry_type) {
case PHP_MYSQL_FIELD_NAME:
return_value->value.str.len = strlen(mysql_field->name);
return_value->value.str.val = estrndup(mysql_field->name, return_value->value.str.len);
return_value->type = IS_STRING;
Z_STRLEN_P(return_value) = strlen(mysql_field->name);
Z_STRVAL_P(return_value) = estrndup(mysql_field->name, Z_STRLEN_P(return_value));
Z_TYPE_P(return_value) = IS_STRING;
break;
case PHP_MYSQL_FIELD_TABLE:
return_value->value.str.len = strlen(mysql_field->table);
return_value->value.str.val = estrndup(mysql_field->table, return_value->value.str.len);
return_value->type = IS_STRING;
Z_STRLEN_P(return_value) = strlen(mysql_field->table);
Z_STRVAL_P(return_value) = estrndup(mysql_field->table, Z_STRLEN_P(return_value));
Z_TYPE_P(return_value) = IS_STRING;
break;
case PHP_MYSQL_FIELD_LEN:
return_value->value.lval = mysql_field->length;
return_value->type = IS_LONG;
Z_LVAL_P(return_value) = mysql_field->length;
Z_TYPE_P(return_value) = IS_LONG;
break;
case PHP_MYSQL_FIELD_TYPE:
return_value->value.str.val = php_mysql_get_field_name(mysql_field->type);
return_value->value.str.len = strlen(return_value->value.str.val);
return_value->value.str.val = estrndup(return_value->value.str.val, return_value->value.str.len);
return_value->type = IS_STRING;
Z_STRVAL_P(return_value) = php_mysql_get_field_name(Z_TYPE_P(mysql_field));
Z_STRLEN_P(return_value) = strlen(Z_STRVAL_P(return_value));
Z_STRVAL_P(return_value) = estrndup(Z_STRVAL_P(return_value), Z_STRLEN_P(return_value));
Z_TYPE_P(return_value) = IS_STRING;
break;
case PHP_MYSQL_FIELD_FLAGS:
strcpy(buf, "");
@@ -1927,6 +1957,11 @@ static void php_mysql_field_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
strcat(buf, "enum ");
}
#endif
#ifdef SET_FLAG
if (mysql_field->flags&SET_FLAG) {
strcat(buf, "set ");
}
#endif
#ifdef AUTO_INCREMENT_FLAG
if (mysql_field->flags&AUTO_INCREMENT_FLAG) {
strcat(buf, "auto_increment ");
@@ -1944,9 +1979,9 @@ static void php_mysql_field_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
len--;
}
return_value->value.str.len = len;
return_value->value.str.val = estrndup(buf, len);
return_value->type = IS_STRING;
Z_STRLEN_P(return_value) = len;
Z_STRVAL_P(return_value) = estrndup(buf, len);
Z_TYPE_P(return_value) = IS_STRING;
break;
default:
@@ -2011,17 +2046,16 @@ PHP_FUNCTION(mysql_free_result)
WRONG_PARAM_COUNT;
}
if ((*result)->type==IS_RESOURCE && (*result)->value.lval==0) {
if (Z_TYPE_PP(result)==IS_RESOURCE && Z_LVAL_PP(result)==0) {
RETURN_FALSE;
}
ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, result, -1, "MySQL result", le_result);
zend_list_delete((*result)->value.lval);
zend_list_delete(Z_LVAL_PP(result));
RETURN_TRUE;
}
/* }}} */
#endif
/*
@@ -2029,6 +2063,6 @@ PHP_FUNCTION(mysql_free_result)
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 tw=78 fdm=marker
* vim<600: sw=4 ts=4 tw=78
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+2
View File
@@ -48,8 +48,10 @@ PHP_FUNCTION(mysql_connect);
PHP_FUNCTION(mysql_pconnect);
PHP_FUNCTION(mysql_close);
PHP_FUNCTION(mysql_select_db);
#if MYSQL_VERSION_ID < 40000
PHP_FUNCTION(mysql_create_db);
PHP_FUNCTION(mysql_drop_db);
#endif
PHP_FUNCTION(mysql_query);
PHP_FUNCTION(mysql_unbuffered_query);
PHP_FUNCTION(mysql_db_query);
+1 -1
View File
@@ -32,7 +32,7 @@ if test "$PHP_NCURSES" != "no"; then
LIBNAME=ncurses
LIBSYMBOL=initscr
old_LIBS=$LIBS
LIBS="$LIBS -L$NCURSES_DIR/lib -lm -ldl"
LIBS="$LIBS -L$NCURSES_DIR/lib -lm"
AC_CHECK_LIB($LIBNAME, $LIBSYMBOL, [AC_DEFINE(HAVE_NCURSESLIB,1,[ ])],
[AC_MSG_ERROR(wrong ncurses lib version or lib not found)])
LIBS=$old_LIBS
+2
View File
@@ -46,6 +46,7 @@ static void ncurses_destruct(zend_rsrc_list_entry *rsrc TSRMLS_DC)
/* {{{ ncurses_module_entry
*/
zend_module_entry ncurses_module_entry = {
STANDARD_MODULE_HEADER,
"ncurses",
ncurses_functions,
PHP_MINIT(ncurses),
@@ -53,6 +54,7 @@ zend_module_entry ncurses_module_entry = {
PHP_RINIT(ncurses), /* Replace with NULL if there's nothing to do at request start */
PHP_RSHUTDOWN(ncurses), /* Replace with NULL if there's nothing to do at request end */
PHP_MINFO(ncurses),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
/* }}} */
+2
View File
@@ -97,6 +97,7 @@ function_entry notes_functions[] = {
};
zend_module_entry notes_module_entry = {
STANDARD_MODULE_HEADER,
"notes",
notes_functions,
PHP_MINIT(notes),
@@ -104,6 +105,7 @@ zend_module_entry notes_module_entry = {
PHP_RINIT(notes),
PHP_RSHUTDOWN(notes),
PHP_MINFO(notes),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
+3 -3
View File
@@ -5,11 +5,11 @@ AC_DEFUN(AC_OCI8_VERSION,[
if test -s "$OCI8_DIR/orainst/unix.rgs"; then
OCI8_VERSION=`grep '"ocommon"' $OCI8_DIR/orainst/unix.rgs | sed 's/[ ][ ]*/:/g' | cut -d: -f 6 | cut -c 2-4`
test -z "$OCI8_VERSION" && OCI8_VERSION=7.3
elif test -f $OCI8_DIR/lib/libclntsh.s?.9.0; then
elif test -f $OCI8_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.9.0; then
OCI8_VERSION=9.0
elif test -f $OCI8_DIR/lib/libclntsh.s?.8.0; then
elif test -f $OCI8_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.8.0; then
OCI8_VERSION=8.1
elif test -f $OCI8_DIR/lib/libclntsh.s?.1.0; then
elif test -f $OCI8_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.1.0; then
OCI8_VERSION=8.0
elif test -f $OCI8_DIR/lib/libclntsh.a; then
if test -f $OCI8_DIR/lib/libcore4.a; then
+874 -640
View File
File diff suppressed because it is too large. Load diff
+2
View File
@@ -135,6 +135,7 @@ function_entry odbc_functions[] = {
/* {{{ odbc_module_entry
*/
zend_module_entry odbc_module_entry = {
STANDARD_MODULE_HEADER,
"odbc",
odbc_functions,
PHP_MINIT(odbc),
@@ -142,6 +143,7 @@ zend_module_entry odbc_module_entry = {
PHP_RINIT(odbc),
PHP_RSHUTDOWN(odbc),
PHP_MINFO(odbc),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
/* }}} */
+3 -1
View File
@@ -65,8 +65,10 @@ function_entry velocis_functions[] = {
};
zend_module_entry velocis_module_entry = {
STANDARD_MODULE_HEADER,
"velocis", velocis_functions, PHP_MINIT(velocis), PHP_MSHUTDOWN(velocis),
PHP_RINIT(velocis), NULL, PHP_MINFO(velocis), STANDARD_MODULE_PROPERTIES
PHP_RINIT(velocis), NULL, PHP_MINFO(velocis), NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
+6 -2
View File
@@ -82,6 +82,7 @@ function_entry openssl_functions[] = {
/* {{{ openssl_module_entry
*/
zend_module_entry openssl_module_entry = {
STANDARD_MODULE_HEADER,
"openssl",
openssl_functions,
PHP_MINIT(openssl),
@@ -89,6 +90,7 @@ zend_module_entry openssl_module_entry = {
NULL,
NULL,
PHP_MINFO(openssl),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
/* }}} */
@@ -1284,7 +1286,8 @@ PHP_FUNCTION(openssl_pkcs7_encrypt)
X509 * cert;
int argc;
EVP_CIPHER *cipher = NULL;
ulong strindexlen, intindex;
uint strindexlen;
ulong intindex;
char * strindex;
argc = ZEND_NUM_ARGS();
@@ -1419,7 +1422,8 @@ PHP_FUNCTION(openssl_pkcs7_sign)
BIO * infile = NULL, * outfile = NULL;
STACK_OF(X509) *others = NULL;
long certresource = -1, keyresource = -1;
ulong strindexlen, intindex;
ulong intindex;
uint strindexlen;
HashPosition hpos;
char * strindex;
+5 -5
View File
@@ -5,9 +5,9 @@ AC_DEFUN(AC_ORACLE_VERSION,[
if test -s "$ORACLE_DIR/orainst/unix.rgs"; then
ORACLE_VERSION=`grep '"ocommon"' $ORACLE_DIR/orainst/unix.rgs | sed 's/[ ][ ]*/:/g' | cut -d: -f 6 | cut -c 2-4`
test -z "$ORACLE_VERSION" && ORACLE_VERSION=7.3
elif test -f $ORACLE_DIR/lib/libclntsh.s?.8.0; then
elif test -f $ORACLE_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.8.0; then
ORACLE_VERSION=8.1
elif test -f $ORACLE_DIR/lib/libclntsh.s?.1.0; then
elif test -f $ORACLE_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.1.0; then
ORACLE_VERSION=8.0
elif test -f $ORACLE_DIR/lib/libclntsh.a; then
if test -f $ORACLE_DIR/lib/libcore4.a; then
@@ -56,7 +56,7 @@ if test "$PHP_ORACLE" != "no"; then
AC_ORACLE_VERSION($ORACLE_DIR)
case $ORACLE_VERSION in
7.0|7.1)
if test -f $ORACLE_DIR/lib/liboracle.s?; then
if test -f $ORACLE_DIR/lib/liboracle.$SHLIB_SUFFIX_NAME; then
PHP_ADD_LIBRARY_WITH_PATH(oracle, $ORACLE_DIR/lib, ORACLE_SHARED_LIBADD)
else
PHP_ADD_LIBRARY_WITH_PATH(core, $ORACLE_DIR/lib, ORACLE_SHARED_LIBADD)
@@ -85,7 +85,7 @@ if test "$PHP_ORACLE" != "no"; then
;;
7.2)
if test -f $ORACLE_DIR/lib/libclntsh.s?; then
if test -f $ORACLE_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME; then
PHP_ADD_LIBRARY_WITH_PATH(clntsh, $ORACLE_DIR/lib, ORACLE_SHARED_LIBADD)
else
PHP_ADD_LIBRARY_WITH_PATH(core3, $ORACLE_DIR/lib, ORACLE_SHARED_LIBADD)
@@ -106,7 +106,7 @@ if test "$PHP_ORACLE" != "no"; then
;;
7.3)
if test -f $ORACLE_DIR/lib/libclntsh.s?; then
if test -f $ORACLE_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME; then
PHP_ADD_LIBRARY_WITH_PATH(clntsh, $ORACLE_DIR/lib, ORACLE_SHARED_LIBADD)
else
PHP_ADD_LIBRARY_WITH_PATH(core3, $ORACLE_DIR/lib, ORACLE_SHARED_LIBADD)
+2
View File
@@ -146,6 +146,7 @@ function_entry oracle_functions[] = {
/* {{{ oracle_module_entry
*/
zend_module_entry oracle_module_entry = {
STANDARD_MODULE_HEADER,
"oracle",
oracle_functions,
PHP_MINIT(oracle), /* extension-wide startup function */
@@ -153,6 +154,7 @@ zend_module_entry oracle_module_entry = {
PHP_RINIT(oracle), /* per-request startup function */
PHP_RSHUTDOWN(oracle), /* per-request shutdown function */
PHP_MINFO(oracle),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
/* }}} */
Loaded 100 of 339 files, more files were not shown because too many files have changed in this diff. Show more