Compare commits

...
Author SHA1 Message Date
SVN Migration ee3f5cecea This commit was manufactured by cvs2svn to create tag 'php_4_0_1'. 2000-06-28 18:32:14 +00:00
Andi Gutmans 3860254631 version update 2000-06-28 18:32:13 +00:00
Zeev Suraski 01a8f4606e I'm not sure whether this is necessary or not. Is it guarenteed that get_module_conf()
will always return a value?  Even if there were no relevant directives at all?
2000-06-28 18:27:13 +00:00
Andi Gutmans da8843aa55 - Fix problem with VIRTUAL_DIR and relative paths containing .. 2000-06-28 17:30:30 +00:00
Joey Smith b952c2c95a Added note about creating PDF documents in memory.
This is not quite complete, due to a bug in pdflib 3.0.
2000-06-28 11:44:32 +00:00
993803e997 ChangeLog update 2000-06-28 01:09:07 +00:00
3f4e93f7d0 NEWS update 2000-06-28 01:09:04 +00:00
Sascha Schumann 50595370e0 Cosmetic name change 2000-06-27 23:09:49 +00:00
Jouni Ahto e092c0c00c # Forgot this... 2000-06-27 22:25:51 +00:00
Jouni Ahto 8b8f191e59 # Reverting as requested. 2000-06-27 22:25:27 +00:00
Zeev Suraski 2fdd934f42 - Limit lines to 80 chars
- Let people know they don't have to use the ISAPI filter if they don't need
  HTTP authenatication
2000-06-27 21:39:41 +00:00
Jouni Ahto 1dfe76f5f6 - dba_[p]open accepts now a new parameter, which kind of database to create
(DBA_BTREE or DBA_HASH), if the handler is either 'db2' or 'db3' and
  mode 'c' or 'n'. It is ignored if mode is 'c' and the db already exists.
# Asked on the list 4 1/2 hours ago if anyone's got to say something to this,
# no response, so I'm assuming it's ok. And yes, I did test this.
2000-06-27 21:36:26 +00:00
Zeev Suraski c860633741 Fixed a bug in opendir(), which prevented readdir() from working properly if
the $dir argument wasn't explicitly specified
2000-06-27 18:44:30 +00:00
Zeev Suraski 130b9e7ef2 Revert the sendmail.c patch - it uses 4 different variables that aren't defined, and breaks
the Win32 build
2000-06-27 18:41:44 +00:00
Andi Gutmans eaa2a158c8 - Fix bug with VIRTUAL_DIR, .., and symlinks. 2000-06-27 18:18:18 +00:00
Sascha Schumann 7f059e7255 Use [\]n to refer to the two characters '\' and 'n'. This is the correct way
according to SUS II.

PR: #5212
2000-06-27 16:22:26 +00:00
Hartmut Holzgraefe 6f2843fa20 should now get multiple To: and Cc: recievers right
(code taken from php3 version)
2000-06-27 16:15:16 +00:00
Jouni Ahto 9322b9d9a5 (pg_loreadall) Was using zval ** but forgot to convert to use
zend_get_parameters_ex(). Fixes #5244.
2000-06-27 13:26:04 +00:00
Sam Ruby 36e57ea2ae add Java as a valid package 2000-06-27 10:39:45 +00:00
Sam Ruby e216b8918e defer loading of the native code 2000-06-27 10:37:40 +00:00
Thies C. Arntzen e834812a06 (fgetcsv) fixed leak 2000-06-27 09:55:52 +00:00
Thies C. Arntzen 9eb2c1efb1 @- Fixed a possible crash in the LDAP modify code. (Eric Kilfoil) 2000-06-27 09:28:05 +00:00
Andi Gutmans 2a7b5f9190 - Made discard-path work again 2000-06-27 04:45:53 +00:00
392e856bc2 ChangeLog update 2000-06-27 01:09:05 +00:00
Zeev Suraski 52dd20177c Removed 8KB limit on line length of the file() function 2000-06-26 20:52:04 +00:00
Zeev Suraski 33d4092590 - Disabled dl() when PHP is being used as a module inside a multithreaded web
server - it didn't work before, and caused weird results (Zeev)
2000-06-26 18:27:12 +00:00
Andi Gutmans 229b170885 - Don't depend on USE_PATH being equal to 1. Use #define value 2000-06-26 18:19:35 +00:00
Zeev Suraski 2c94141b12 Add missing enable_dl 2000-06-26 18:16:54 +00:00
Zeev Suraski cacbf1ea28 Support boolean NOT in the php.ini processor 2000-06-26 18:15:49 +00:00
Zeev Suraski 8e45536cf4 Make it possible to detect whether we're thread safe or not from PHP scripts and the php.ini
file
2000-06-26 18:15:33 +00:00
Andrei Zmievski 4010b422dd Separate plain name returned by php_sapi_module() and pretty name
used for output.
2000-06-26 18:05:55 +00:00
Egon Schmid bcb308c522 Fixed some protos. 2000-06-26 17:57:46 +00:00
Andi Gutmans fd11a7e13e - Pray this is an OK fix for the DISCARD_PATH junk 2000-06-26 17:57:03 +00:00
Zeev Suraski 90feef368b - Please NEVER copy fopen_wrappers.c functions to modules. They are ugly
- enough as is and need cleaning up. Duplicating the mess makes things just
- worse and prevents bug fixes in the functions from propogating throughout
- PHP.
- This fix is untested so someone who uses zlib, please test it and report
- back.
2000-06-26 17:40:24 +00:00
Stanislav Malyshev 8fd20c3ec7 Make exec() fwork on Unix again 2000-06-26 17:12:38 +00:00
Zeev Suraski 16c363182d TRACK_VARS is really no longer necessary... 2000-06-26 17:11:28 +00:00
Zeev Suraski 0beee41fc6 max_execution_time is no longer UNIX only... 2000-06-26 16:34:12 +00:00
Stanislav Malyshev 378440f7cf Right name for the function persist_alloc 2000-06-26 16:26:20 +00:00
Zeev Suraski c51ba263dd - Fix bug in virtual dir under Windows when using absolute paths without
- drive letter
2000-06-26 16:24:28 +00:00
Andi Gutmans 91ed009ae2 - Try two in fixing the problem with memory leaks reporting path_translated 2000-06-26 16:17:58 +00:00
Zeev Suraski effa42696e - Fix problem with filename being freed before possible memory leaks are
- reported by the memory manager
2000-06-26 15:55:59 +00:00
Andi Gutmans 1a22c1eb86 - Add another "\n" at the end of error messages. 2000-06-26 15:37:28 +00:00
Jouni Ahto 92b963bb2e - Fixed another missing test for existing functions in libgd.
# This too should go in 4.0.1 if just possible.
2000-06-26 15:23:52 +00:00
Zeev Suraski 202b8100ab Make max_execution_time work properly when set to 0 under Win32 (disable) 2000-06-26 15:17:36 +00:00
Kristian Köhntopp 2c32d120b2 Corrected a syntax error: Macro requires braces. 2000-06-26 14:55:38 +00:00
Kristian Köhntopp c54fa54e36 Added function php_sapi_name() as written by Stefan Livieratos. 2000-06-26 14:43:37 +00:00
Andrei Zmievski 95afe462bd ignore libs.mk 2000-06-26 13:23:03 +00:00
Andrei Zmievski bd41577eb9 Fix up news. 2000-06-26 13:22:19 +00:00
Stanislav Malyshev 5be54abf24 If we freed it, we might not touch it
# BTW, this is not a real fix - we still might use it
# when reporting memory leaks, but at least we won't reference
# unitialized memory
2000-06-26 12:26:40 +00:00
Jouni Ahto 29e5cf81bf - Test gdImagePaletteCopy and define HAVE_LIBGD15 if found.
- s/HAVE_LIBGD13/HAVE_LIBGD15/ in ImagePaletteCopy, ImageCopyMerge.
# This really should go into 4.0.1 or we'll get a lot of complaints from
# people using older versions of gd (because it still supports gif).
2000-06-26 12:23:02 +00:00
Stefan Roehrich ca7d7dbc01 Fix for configure not setting the library path. 2000-06-26 08:53:36 +00:00
Sterling Hughes ff127799e9 two too many. 2000-06-26 08:23:34 +00:00
794d1bfd15 ChangeLog update 2000-06-26 01:09:08 +00:00
86abde5497 NEWS update 2000-06-26 01:09:05 +00:00
Sascha Schumann 2573a5041f Fix Bison version check 2000-06-25 22:48:02 +00:00
Zeev Suraski c9fea52cf9 Update 2000-06-25 19:01:53 +00:00
Zeev Suraski 4afe6d0f60 Make the zlib DLL work with the stock zlib library 2000-06-25 19:00:38 +00:00
Zeev Suraski 7da710c060 - Update .dsp
- Add Win32 'spec' file
2000-06-25 18:54:55 +00:00
Jouni Ahto 2eee0aa546 Another late one. 2000-06-25 18:39:12 +00:00
Sterling Hughes 00df6fd744 Add it manually for the release. 2000-06-25 18:32:32 +00:00
Zeev Suraski 1be47784eb imap_sendmail.[ch] are missing... Whomever added them, please cvs add them and then
readd them to the project...
2000-06-25 18:29:05 +00:00
Andi Gutmans fabf824eac - Line breaks at 80 chars and change php4ts.dll -> php4isapi.dll 2000-06-25 18:18:29 +00:00
Andi Gutmans 6d67e11514 - The check for bison nukes $1 and $2 which are used later on in the script
- This needs to be fixed sometime. I have 1.28 on my system :)
2000-06-25 18:06:04 +00:00
Andi Gutmans 2e9f657aaf - Get ready to package 2000-06-25 18:00:57 +00:00
Egon Schmid 2deed22e5c Now its a todo. 2000-06-25 17:55:13 +00:00
Zeev Suraski 10e0303620 Get rid of a warning 2000-06-25 17:54:52 +00:00
Zeev Suraski a6b201c18c PHPAPI is invalid here... 2000-06-25 17:54:14 +00:00
Egon Schmid 9f0eba9f10 It was Jouni: Prevent Hartmut finding this until it is actually implemented... 2000-06-25 17:21:04 +00:00
Andi Gutmans f311ab1608 - I wrote a long msg but the commit didn't go through.
- So here is the short version:
- a) Start moving to binary opens in Windows
- b) Give checkuid_mode() a small face lift including the fopen-wrappers.c
- The mode to this function should at least be a #define but that is for
- another day. Anyway this whole stuff should be given more face lifts in
- the future.
2000-06-25 17:05:22 +00:00
Zeev Suraski 6614e8edb4 - I wrote a long msg but the commit didn't go through.
- So here is the short version:
- a) Start moving to binary opens in Windows
- b) Give checkuid_mode() a small face lift including the fopen-wrappers.c
- The mode to this function should at least be a #define but that is for
- another day. Anyway this whole stuff should be given more face lifts in
- the future.
2000-06-25 17:02:59 +00:00
Zeev Suraski ba69d9958d Add Win32 README file 2000-06-25 16:48:17 +00:00
Sascha Schumann 763e1f3a09 better description for recent serializer change 2000-06-25 15:53:44 +00:00
Egon Schmid 5f98304f55 The second array_merge() is now array_merge_recursive(). 2000-06-25 13:21:37 +00:00
Egon Schmid b0d0aff6a8 A droto is not a proto. 2000-06-25 10:59:42 +00:00
Sterling Hughes 5a241ca1af Add version checking. 2000-06-25 03:26:49 +00:00
Jouni Ahto 3d5fd994e7 # Missing ; 2000-06-25 03:12:38 +00:00
Sterling Hughes 3d75fcae68 Proto. 2000-06-25 03:06:38 +00:00
Sterling Hughes ff1b4be80c @- Added the ImageCopyMerge, ImagePaletteCopy and ImageColorClosestHWB functions. (Sterling)
-Added the ImageCopyMerge, ImagePaletteCopy and ImageColorClosestHWB functions
2000-06-25 02:55:31 +00:00
Jouni Ahto 4dfdac7fba - Added imagecreatefromwbmp().
- Fixed missing parenthesis when calling function get_active_function_name.
@- Added function imagecreatefromwbmp(). (Jouni)
2000-06-25 01:44:15 +00:00
1d4f22bf63 ChangeLog update 2000-06-25 01:09:05 +00:00
Zeev Suraski b896825e8f Nuke a warning 2000-06-24 22:11:11 +00:00
Egon Schmid ac523aa37e Correct protos call_user_func() and call_user_method(). 2000-06-24 18:46:17 +00:00
Andi Gutmans 2a5a064a03 - winsnmp.c has moved to ext/snmp 2000-06-24 18:31:22 +00:00
Sascha Schumann 66e4f71040 Revice winsnmp.c from repo-copy 2000-06-24 17:10:57 +00:00
Zeev Suraski 515d7e7dae credit where credit's due 2000-06-24 16:32:25 +00:00
Zeev Suraski cb5891d277 Apply the NSAPI patch 2000-06-24 16:31:10 +00:00
Jouni Ahto 8f1ff9e85e - Close cursor immediately before reuse so that calling ibase_free_result is
not necessary anymore. Seems to also prevent a a situation where at request
  shutdown cursor was first dropped and tried to close it afterwards when
  all the resources were not manually freed, and could occasionally segfault.
2000-06-24 16:24:29 +00:00
Andi Gutmans 303dc9e96a - Forgot to remove comment 2000-06-24 16:24:01 +00:00
Andi Gutmans 4b5e7d6618 - Only use VIRTUAL_DIR in ZTS mode until it is thoroughly tested.
- Mutex popen() in Windows as the UNIX trick doesn't work there.
2000-06-24 16:10:18 +00:00
Sascha Schumann dfaaa8ff95 Also install XML-related header files. 2000-06-24 15:45:24 +00:00
Sascha Schumann 5b315e1304 Get rid of files in the dl directory hierarchy.
PHP compiles without them under Unix, please test this also under Win32.
2000-06-24 15:41:46 +00:00
Sascha Schumann 0c03253635 Stop including dl/phpdl.h. 2000-06-24 15:36:04 +00:00
Zeev Suraski d1a6a64675 - Make the output globals accessible from the outside world
- Fix Win32 compilation
2000-06-24 13:27:34 +00:00
Sascha Schumann ee5e330bcf alloc.h has been removed from the Apache 1.3 CVS tree 2000-06-24 11:39:37 +00:00
Joey Smith d47e4b8617 Fix for bug #3983 2000-06-24 09:01:51 +00:00
Andi Gutmans b0c7ac2dc1 - Entries start with capital letters 2000-06-24 08:45:57 +00:00
Hartmut Holzgraefe a67157c2c2 <funcprototype> added to xml generation 2000-06-24 07:40:32 +00:00
1c16ed47bc ChangeLog update 2000-06-24 01:09:08 +00:00
50aec09e04 NEWS update 2000-06-24 01:09:05 +00:00
Zeev Suraski 89efa59e98 Fix Win32 compilation 2000-06-23 23:13:35 +00:00
Egon Schmid e9484d5c37 Added a description to get_browser(). 2000-06-23 19:55:49 +00:00
Egon Schmid d049d4a6bd Fixed protos. 2000-06-23 17:37:49 +00:00
Egon Schmid 10249f2dfb Typos. 2000-06-23 17:09:54 +00:00
Sascha Schumann eadbbec532 Make use of incomplete class API 2000-06-23 17:00:47 +00:00
Sascha Schumann 1702067ac0 API change: Use zval * instead of zval ** 2000-06-23 16:58:30 +00:00
Sascha Schumann 091dc3840d Move the incomplete class stuff into its own file, so that we can
make it easier accessible to WDDX.
2000-06-23 16:46:04 +00:00
Rasmus Lerdorf 940f58c2de Fix UdmSearch spelling 2000-06-23 16:37:56 +00:00
Sascha Schumann e708c0ba70 . 2000-06-23 16:29:46 +00:00
Sascha Schumann 2297f670b1 Change the serialization semantics to:
* if a certain object is of class INCOMPLETE_CLASS, the serializer will
    lookup the previously stored original class name of that object, and
    use that class name to serialize the object.

Change the deserialization semantics to:

  * if the class of an object, which is to be instantiated, is not found
    in the current context, the class name will be stored for later
    retrieval, and the class of that object is changed to INCOMPLETE_CLASS.

All function calls, property gets, and property sets operating on an
object of class INCOMPLETE_CLASS cause the execution to halt and to
output an informative error message.
2000-06-23 16:21:31 +00:00
Andi Gutmans d8a75cf7e5 - COMPILE_ERROR should only be used in Zend 2000-06-23 13:05:06 +00:00
Thies C. Arntzen cfa7028d66 @- added spliti() function. (Thies) 2000-06-23 11:48:02 +00:00
Hartmut Holzgraefe 7d3341bee3 debug-code removed 2000-06-23 05:49:32 +00:00
Hartmut Holzgraefe 234f029727 this change should solve all problems regarding trans_sid_id and
"empty" href urls like "", "#name", "?param=val" ...
2000-06-23 05:42:41 +00:00
388f7cdccc ChangeLog update 2000-06-23 01:09:05 +00:00
Sascha Schumann 2456af596f Remove some unnecessary CLS_FETCH()s. 2000-06-23 00:53:33 +00:00
Rasmus Lerdorf 9b9ab1793f Fix spacing and say that --with-oracle uses the oci7 interface 2000-06-23 00:46:05 +00:00
Andi Gutmans 684dca9aca - Not returning a value anymore 2000-06-23 00:11:54 +00:00
Andi Gutmans fd7dc3024c - Don't need SUCCESS/FAILURE anymore 2000-06-23 00:07:05 +00:00
Andi Gutmans 947e17b1da - Add license 2000-06-23 00:04:53 +00:00
Andi Gutmans 56adbffdbf - Commit static allocator structure which we might use in an upcoming Zend
- change
2000-06-23 00:04:05 +00:00
Andi Gutmans 63526e633e - Fix asp_tags. 2000-06-22 23:00:01 +00:00
Andi Gutmans cb62c5d5f8 - Make Windows compile. Was missing crc32.c 2000-06-22 21:24:44 +00:00
Andi Gutmans e16710f1b5 - Oops I miss-wrote that field 2000-06-22 18:50:55 +00:00
Andi Gutmans a536df5327 - Change API version and make the error messages more meaningful. 2000-06-22 18:47:39 +00:00
Zeev Suraski 3998034acb Update to 4.0.1 2000-06-22 18:35:09 +00:00
Andi Gutmans 93e9520314 - Change cache size and only initialize part of it. 2000-06-22 18:33:09 +00:00
Andi Gutmans 22bb1fbe5f - Improve memory cache performance and increase cache size. (Stas, Zend Engine) 2000-06-22 18:30:10 +00:00
Stanislav Malyshev bb57053f76 Cached-freed memory blocks should not be in "occupied" list 2000-06-22 17:51:14 +00:00
Stanislav Malyshev 7f87a319aa Make cache counters to be unsigned int
Start collecting statistics after cache pre-fill
2000-06-22 09:17:38 +00:00
f9f8691feb ChangeLog update 2000-06-22 01:09:09 +00:00
268a981c3a NEWS update 2000-06-22 01:09:06 +00:00
Rasmus Lerdorf 777f8dccca Add a crc32 checksum function - used by the udm_search search engine
and currently run through a system call.  This will speed up the udm_search
php frontend significantly.
@ Add a crc32 checksum function - used by the udm_search search engine
@ and currently run through a system call.  This will speed up the udm_search
@ php frontend significantly. (Rasmus)
2000-06-21 22:51:29 +00:00
Sascha Schumann de5e2a58df Add alloca.h check
Remove some unused header checks
2000-06-21 21:49:33 +00:00
Sascha Schumann 322be14458 HAVE_MEMORY_H is not used by PHP. 2000-06-21 21:48:14 +00:00
Sascha Schumann 9d640cc990 Revert earlier commit. 2000-06-21 18:35:54 +00:00
Thies C. Arntzen bc8d0782dd unserialize() and wddx_deserialize() now create an empty class if they enconter
a class which's code is yet unknown. this makes sessionized data retain the
class name of objects even if you visited pages that don't have the classes
code available.
2000-06-21 18:22:22 +00:00
Chuck Hagenbuch c80c71f48b Here is a brief start towards getting the DB stuff up to speed and working
(I need it to move forward on some stuff, and I really do want to see PEAR
succeed, so I'm going to work with the official code to get it working. Hope
that's okay). I've replaced all instances of 'use' and 'import' with
'include_once' (and added the .php extension where necessary). This gets my
short test script working. More possibly to come.
2000-06-21 02:22:04 +00:00
7c43b6829f ChangeLog update 2000-06-21 01:09:05 +00:00
Zeev Suraski 35e3efbd41 Warn about using the built-in MySQL library 2000-06-20 22:12:22 +00:00
Zeev Suraski d57210fb0b This is no longer needed 2000-06-20 21:50:57 +00:00
Andrei Zmievski cd5b7dd64a bonsai test 2000-06-20 19:21:11 +00:00
Ben Mansell 6a449f2b02 Initialise lcg_globals correctly
# Fixes bug 5075
2000-06-20 11:35:12 +00:00
a18d4d2085 ChangeLog update 2000-06-20 02:14:19 +00:00
Egon Schmid 772e4fa41a Canged back to uppercase. Are all the backslashes on line 69 to 111 really needed? 2000-06-19 22:12:57 +00:00
Sascha Schumann 8741aa825d Unbreak imap by fixing the assignment 2000-06-19 21:35:01 +00:00
Uwe Steinmann ffbb3c8bd8 - minor changes 2000-06-19 19:46:24 +00:00
Uwe Steinmann c454a4156e - added prototype 2000-06-19 19:45:53 +00:00
Andrei Zmievski ff3b0c84a3 Call __wakeup() after all the instance variables are initialized. 2000-06-19 14:04:57 +00:00
Thies C. Arntzen f8c0f76881 kill warinig 2000-06-19 12:56:30 +00:00
Thies C. Arntzen 8c9e222689 good morning, thies! 2000-06-19 09:27:17 +00:00
Thies C. Arntzen 388195de8b some adjustments to the sysliblist
# still needs some fixing - sascha?
2000-06-19 09:16:58 +00:00
Thies C. Arntzen 520602ae4e (fsockopen) fix #5090 2000-06-19 09:02:48 +00:00
Andi Gutmans b831ca7d64 - Fixed problem in imap_fetch_overview 2000-06-19 04:33:40 +00:00
7d6784d98d ChangeLog update 2000-06-19 02:14:20 +00:00
fe8f752946 NEWS update 2000-06-19 02:14:17 +00:00
Andi Gutmans baadf90fb5 - Nuke warning 2000-06-18 20:09:17 +00:00
Egon Schmid c3cc31c745 No response from Sascha so changed to lowercase. 2000-06-18 20:01:45 +00:00
Egon Schmid dd43255b27 More protos. 2000-06-18 19:18:30 +00:00
Holger Zimmermann e15172f0e2 Changed strtok_r to php_strtok_r 2000-06-18 19:04:50 +00:00
Holger Zimmermann fce46168d1 Changed strtok_r to php_strtok_r 2000-06-18 19:01:54 +00:00
Jouni Ahto 98087ab562 - Fix return type in proto once again... 2000-06-18 17:36:31 +00:00
Sascha Schumann 15925864b2 fp_except check for FreeBSD 1.0-2.2.5 2000-06-18 16:51:42 +00:00
Sascha Schumann 0404a02430 Welcome zend_finite(n).
This chooses the best combination of what is available:

finite, isfinite, isinf, isnan
2000-06-18 16:33:15 +00:00
Egon Schmid 6e815b76ea Some protos fixed. 2000-06-18 16:31:52 +00:00
Jouni Ahto 153ef54498 - Fix return type in proto. 2000-06-18 16:07:06 +00:00
Stanislav Malyshev 536221be39 Make error callback be publicly accessible 2000-06-18 16:02:32 +00:00
Andi Gutmans 4a6869c98e - Better FreeBSD fix. Does fp_except_t exist on 3.4? 2000-06-18 15:44:23 +00:00
Sascha Schumann 80a05cd78c Cosmetic cleanups 2000-06-18 15:30:55 +00:00
Thies C. Arntzen 5b1f7bc8ac (implode), (strtr) no longer touch the internal array-pointer. 2000-06-18 10:37:01 +00:00
Thies C. Arntzen 405d07de96 (serialize) no longer touches the internal array-pointer 2000-06-18 10:25:39 +00:00
Sascha Schumann 8975f1dceb Readd pi3web_sapi.c and reset flags. 2000-06-18 10:21:20 +00:00
Andi Gutmans 53a5eccf66 - I don't know how this happened. I tested the bloody thing and I remember
- copy&pasting from code which used ~.
2000-06-18 04:22:12 +00:00
Andrei Zmievski 10b5f74855 One more place. 2000-06-18 03:45:08 +00:00
Andrei Zmievski 789aa48043 @- Modified in_array() to not touch array pointer. (Andrei) 2000-06-18 03:43:58 +00:00
6b8afa5d42 ChangeLog update 2000-06-18 02:14:18 +00:00
Rasmus Lerdorf fd50caf95a Slightly more accurate description here 2000-06-18 00:12:31 +00:00
Andrei Zmievski 0ffda3cc49 Relic from cvs conflict? 2000-06-17 18:32:53 +00:00
Zeev Suraski 34c2b0a07c - Add restore_error_handler()
error_handler's are now stored in a stack
2000-06-17 18:04:58 +00:00
Zeev Suraski 66f1be08c8 Update news 2000-06-17 18:03:25 +00:00
Andi Gutmans 4b57e0e9f7 - Add notice about CGI fix 2000-06-17 17:43:11 +00:00
Zeev Suraski 3cda6a750e Allow the symbol_table to be passed to call_user_function_ex() 2000-06-17 16:50:38 +00:00
Zeev Suraski da66298659 - Fix a couple of wranings in the FTP code and in parsedate.y
- Be safer with LC_MESSAGES
- Align with the latest Zend change in call_user_function_ex()
2000-06-17 16:49:03 +00:00
Andrei Zmievski eb6f625d83 Wrong number of commas. 2000-06-17 16:13:11 +00:00
Andrei Zmievski 6e1dee8c1e Have to use zval_ptr_dtor() on values returned from user functions. 2000-06-17 15:53:33 +00:00
Andi Gutmans a4edfc06c5 - Export ts_resource_ex in order to succesfully build Windows version 2000-06-17 14:56:19 +00:00
Andi Gutmans 1e5a405c5c - Make Windows compile
- Windows doesn't support LC_MESSAGES
2000-06-17 14:48:03 +00:00
Zeev Suraski 7957b20b48 Fix filenames and line numbers in ZTS mode 2000-06-17 14:12:58 +00:00
Zeev Suraski 38cdb8e7b7 Avoid crashing with recursive applies - limit apply nest level to 3 (I'm not aware of a place
in which applying recursively on the same hash makes sense with more than one nest level, but
3 should be enough)
2000-06-17 14:11:57 +00:00
Holger Zimmermann 49b4ac0a1c Announced Pi3Web support 2000-06-17 13:02:00 +00:00
Holger Zimmermann da132274a4 Added Pi3Web support 2000-06-17 12:06:09 +00:00
Sascha Schumann d3d350e7ce Suppress AC_ADD_LIBRARY(x) where x is matched by /^(c|c_r|pthread*)$/ 2000-06-17 10:53:08 +00:00
Sascha Schumann 9b509a3bad Make use of the new macros PHP_EVAL_LIBLINE and PHP_EVAL_INCLINE 2000-06-17 10:51:26 +00:00
Sascha Schumann 9a63d8af7f Add PHP_EVAL_LIBLINE and PHP_EVAL_INCLINE 2000-06-17 10:50:42 +00:00
Jouni Ahto 3fb9b8f42d - Missed one if() and cosmetic changes. 2000-06-17 10:10:20 +00:00
Hartmut Holzgraefe 1d92510032 changed default cell alignment to "left" (see bug id #5048) 2000-06-17 07:08:53 +00:00
Hartmut Holzgraefe 34cc1de229 setlocale didn't recognize LC_MESSAGES (BUG ID#3957) 2000-06-17 06:25:47 +00:00
Hartmut Holzgraefe 5d6516be86 look for apxs in /usr/sbin (that's where SUSE puts it)
if no path is given and apxs is not found in $PATH
2000-06-17 06:22:40 +00:00
80b4f8fa5b ChangeLog update 2000-06-17 02:14:20 +00:00
c141fcbf53 NEWS update 2000-06-17 02:14:17 +00:00
Hartmut Holzgraefe 21785afbe8 fix for BUG #5066 2000-06-16 22:08:50 +00:00
Andrei Zmievski 39aa0c4d3a Just to make extra sure. 2000-06-16 19:55:51 +00:00
Andrei Zmievski f14961b005 Plug a memory leak: retval_ptr should be destroyed. 2000-06-16 19:53:06 +00:00
Andrei Zmievski fa9b168161 @- Enhanced WDDX functions to call __sleep() and __wakeup() when working on
@  objects. (Andrei)
2000-06-16 19:50:45 +00:00
Hartmut Holzgraefe d19a44a6aa typo fix 2000-06-16 18:46:57 +00:00
Hartmut Holzgraefe 95ca9db755 retro-patch from // comments, theese where private experimental changes 2000-06-16 18:42:56 +00:00
Andrei Zmievski 71d4206074 Typo. 2000-06-16 18:36:30 +00:00
Hartmut Holzgraefe 87a491d7b6 C++ // comments are evil ... 2000-06-16 18:24:02 +00:00
Egon Schmid c6ddfd4440 Protos looks now equal in both versions. 2000-06-16 18:14:51 +00:00
Zeev Suraski 33f9499975 Make it possible to access other threads' local storage. Only use it if you have a clear
knowledge of what you're doing!
2000-06-16 14:38:05 +00:00
Zeev Suraski 84eb48f0a1 Ok, this time here's some real Win32 system programming :)
Redesigned the timeout system using a single timeout thread and a single window,
and used a much quicker check.
2000-06-16 14:27:28 +00:00
Thies C. Arntzen 43d91224f6 @- Changed WDDX to serialize arrays as structs only if needed. (Thies) 2000-06-16 14:11:01 +00:00
Sascha Schumann 8f8889d02d More main work 2000-06-16 11:07:13 +00:00
Sascha Schumann 6c68ac0def Some stuff has moved to main 2000-06-16 10:45:36 +00:00
Jouni Ahto f5888acfba - Forgot to test check for errors in two places. 2000-06-16 10:09:12 +00:00
Andi Gutmans bd900fb66b - Make Windows compile 2000-06-16 08:02:33 +00:00
Andi Gutmans ae11748038 Fix UNIX build 2000-06-16 02:49:21 +00:00
Zeev Suraski a6d9b5ed18 Macro it up the right way 2000-06-16 02:48:35 +00:00
Zeev Suraski b791918443 Macro this up, so it can be moved to other places 2000-06-16 02:47:00 +00:00
Zeev Suraski c885f468aa Improve timeout support - ini_get("max_execution_time", ...) works now 2000-06-16 02:27:47 +00:00
090d39b7b1 ChangeLog update 2000-06-16 02:14:19 +00:00
baad58df05 NEWS update 2000-06-16 02:14:16 +00:00
Zeev Suraski ef0bd3d102 - Move timeout code to Zend
- Implement timeouts in Win32
2000-06-16 01:54:56 +00:00
Zeev Suraski f29eae1302 Move timeout code to Zend, allow Win32 timeouts
@- Implemented max_execution_time under Win32 (Zeev)
2000-06-16 01:53:35 +00:00
Andi Gutmans e3ae196da8 - Don't need to check doc_root's length twice 2000-06-16 01:25:02 +00:00
Andi Gutmans f8ecf34bf1 - Last one for tonight. Make sure that we don't check uninitialized
- memory
2000-06-16 01:23:03 +00:00
Andi Gutmans b73a6f883d - Last patch for tonight. A more optimized way to check for absolute path
- in Windows. This should be fixed to use the virtual cwd macro for
- ABSOLUTE_DIR() but I need to have time to understand the logic first
2000-06-16 01:14:08 +00:00
Andi Gutmans 70b8e3e8f6 - Missed a bracket 2000-06-16 01:08:39 +00:00
Andi Gutmans cbfa4c88d9 - Beautify fopen-wrappers a bit.
- Still needs quite a lot of improvement in order to treat Windows well
2000-06-16 00:56:38 +00:00
Andi Gutmans 2987d5216e - More #if WIN32|WINNT -> #ifdef PHP_WIN32 conversions 2000-06-15 23:45:05 +00:00
Andi Gutmans 17ce56825d - Beautify a bit 2000-06-15 22:46:17 +00:00
Andi Gutmans fcefeee914 - Try and fix crash with CGI.
- Please check out the comment I wrote in init_request_info(). There was a
- lot of code there which was running for no apparent reason. Should it be
- removed or should it actually run?
2000-06-15 22:40:52 +00:00
Andrei Zmievski e48192fbb5 Use hardcoded 3600 seconds offset instead of altzone which may not be present
on all systems.
2000-06-15 22:23:08 +00:00
Andi Gutmans 4c99114a25 - Unncessary SLS_FETCH(); 2000-06-15 21:34:00 +00:00
Zeev Suraski 8b794bb1dd Fix non thread-safe mode - asp_tags/short_tags etc weren't getting initialized properly 2000-06-15 19:18:57 +00:00
Andi Gutmans e1705c0810 *** empty log message *** 2000-06-15 19:09:51 +00:00
Brian Moon e38d7accb7 set_file_buffer was not being exported. This is now fixed. 2000-06-15 19:02:02 +00:00
Andi Gutmans fa02b85082 *** empty log message *** 2000-06-15 18:51:21 +00:00
Andi Gutmans 447bf163ef - Support multiple arguments to unset() 2000-06-15 18:48:33 +00:00
Andi Gutmans 7d5cfd3766 - virtual_fopen() should fail on empty path 2000-06-15 18:36:46 +00:00
Thies C. Arntzen 3ad9d62949 ups. 2000-06-15 18:23:18 +00:00
Thies C. Arntzen 565400780b changed return type of ZEND_VERIFY_RESOURCE from FALSE to NULL 2000-06-15 18:15:51 +00:00
Thies C. Arntzen a99ca5a64a . 2000-06-15 18:15:44 +00:00
Andrei Zmievski fbbbcdbaa7 Another entry. 2000-06-15 16:28:19 +00:00
Andrei Zmievski 59b455cf2f @- Updated strtotime() to handle many more formats. It now has complete
@  feature parity with GNU date command. (Andrei)
2000-06-15 16:24:10 +00:00
Thies C. Arntzen bd06de9ae9 fixed typo 2000-06-15 14:13:53 +00:00
Andrei Zmievski cd40d5df9f Add php_version.h. 2000-06-15 13:17:18 +00:00
Uwe Steinmann a35d575ba6 - changes to handle the slightly different access to attributes 2000-06-15 07:06:38 +00:00
Uwe Steinmann 785fd93311 - fixed problems with missing attributes due to a change
in libxml 2.0.0
2000-06-15 07:05:38 +00:00
Chuck Hagenbuch 2db5dc37c8 patch from jtaskine@hit.fi - add deleted info to imap_mailboxmsginfo() and
fix some prototype info.
2000-06-15 03:02:36 +00:00
d532ba06c6 ChangeLog update 2000-06-15 02:14:29 +00:00
a5f1a555f3 NEWS update 2000-06-15 02:14:26 +00:00
Jouni Ahto 495a957c99 - Fixed incorrect code generated when all parameters are optional.
- Fixed handling of grouped optional parameters.
- Added an option to generate xml documentation.
- Added an option not to be nice and helpful and create all kinds
  of comments and testing functions.
- Added on option to create function stubs only.
- Added options --assing-params and --string-lens that change
  the generated code.
- Updated documentation.
2000-06-15 01:57:23 +00:00
Hartmut Holzgraefe 9ded807a20 return FALSE from strftime on negative timestamp values
they do not make sense anyway and seem to crash win2k
2000-06-14 22:11:10 +00:00
Rasmus Lerdorf f38e760c39 Refine checkdate() fix to accept numeric strings and floating point as well 2000-06-14 20:31:31 +00:00
Sascha Schumann 7565347ba0 Move some stuff to zend_operators.h which is required by the
moved inline functions.
2000-06-14 19:55:32 +00:00
Andi Gutmans 988435cf04 - More correct way of doing bit mask 2000-06-14 19:10:30 +00:00
Zeev Suraski c532a70746 @- Moved VC++ Win32 project and workspace files to the win32 directory
@  (Zeev)
2000-06-14 18:06:31 +00:00
Thies C. Arntzen 424b2e83b8 reminder 2000-06-14 17:01:01 +00:00
Rasmus Lerdorf 0b5ca3f7d5 Require the year arg to checkdate to be an integer - fix for bug #5034
@Require the year arg to checkdate to be an integer (Rasmus)
2000-06-14 16:35:48 +00:00
Zeev Suraski 79f857b323 Thoroughly fix .dsp problems - restore custom builds 2000-06-14 16:06:44 +00:00
Andrei Zmievski 34a7f94d57 test 2000-06-14 15:37:06 +00:00
Thies C. Arntzen 4292f89345 no c++ comments, please 2000-06-14 12:28:21 +00:00
Egon Schmid 190e2e73e9 Fix for #5028. 2000-06-14 11:51:43 +00:00
Sam Ruby 988302171a Find servlet includes in new "main" directory. Add (finally) java and
servlet to the list of projects
2000-06-14 11:25:54 +00:00
Sascha Schumann e53b791b3e Copy header files from main and also add that directory to the list
of include directories.
2000-06-14 08:30:37 +00:00
Sascha Schumann 177e77fdab . 2000-06-14 07:39:41 +00:00
Sascha Schumann 17fe680117 Only replaced C0X and C0x, but not c0x.. 2000-06-14 07:08:08 +00:00
Sascha Schumann 35f43ad274 Rename C0x-inline to C9x-inline, and frame preprocessor directives in
zend_gcc_inline.c with #ifndef C9X_INLINE_SEMANTICS..#endif.
2000-06-14 07:06:33 +00:00
Sascha Schumann e4e7047e4a Use the new PHP_GEN_* macros in pear 2000-06-14 06:30:14 +00:00
Jouni Ahto 3ca7eb7485 # Prevent Hartmut finding this until it is actually implemented... 2000-06-14 05:11:16 +00:00
Andi Gutmans 239d30bbee - Make Win32 build 2000-06-14 04:10:34 +00:00
7272d029a5 ChangeLog update 2000-06-14 02:14:39 +00:00
Sam Ruby f775d18b2c Export the necessary functions to enable servlet support to be subclassed
This is in preparation for xml-cocoon support
2000-06-14 01:41:13 +00:00
Andrei Zmievski aa49d4af62 Plus a leak when both register_globals and track_vars are off. 2000-06-13 20:59:23 +00:00
Stig Venaas b595b1f01a News of ldap_add() and ldap_modify() fix. 2000-06-13 19:57:15 +00:00
Stig Venaas a2bdc522f5 Also need to 0-terminate when adding/modifying an array of values. 2000-06-13 19:50:05 +00:00
Stig Venaas aa5c0ffcbf Think have to 0-terminate mod_values strings, got trailing garbage,
this fixes bug #5001 I think.
2000-06-13 19:35:56 +00:00
Andi Gutmans 727398b2d4 Add to the API 2000-06-13 19:01:22 +00:00
Andrei Zmievski e5360259a4 We should define symlink functions only when HAVE_SYMLINK is defined.
Otherwise, they should be aliased as not available.
2000-06-13 18:07:19 +00:00
Sascha Schumann 111d36a3c8 Due to creating the Makefiles later, generating libphp4.module failed,
because sapi/apache had not been created. This applies to VPATH builds
only.
2000-06-13 18:02:28 +00:00
Sascha Schumann df74f1dfab Add optional support for C0x inline semantics.
These are enabled by specifying `--enable-c0x-inline' on the command
line. We might add an autoconf check for this particular feature
later.
2000-06-13 17:58:33 +00:00
Andrei Zmievski 307a234879 array_uniq() has been implemented by someone else. 2000-06-13 17:47:05 +00:00
Sascha Schumann 3ce3e9ba27 Include <math.h> in php_math.h. This is necessary, because we might
otherwise redefine system macros.
2000-06-13 16:35:40 +00:00
Sascha Schumann 66175ef9fe Delete phpdir.h. Someone moved this to php_dir.h in the past and
forgot to delete it.
2000-06-13 16:34:18 +00:00
Sascha Schumann d1c1e99d98 Rename phpmath.h to php_math.h. 2000-06-13 16:31:57 +00:00
Thies C. Arntzen 7dca298b21 copy() now creates the destination file with mode 0777 again. this is
the way it used to be in PHP 3
2000-06-13 15:48:38 +00:00
Andrei Zmievski 16b6a3f5e4 Damn. 2000-06-13 14:49:25 +00:00
Andrei Zmievski 598f9f52b7 Forgot to add this yesterday. 2000-06-13 14:47:10 +00:00
Jim Jagielski 981e1ae7b8 O_APPEND breaks 'c' for DBM files - this is handled
correctly by PHP3, so it's almost a forward'' port :)
2000-06-13 14:37:34 +00:00
Sascha Schumann 13692ff313 Add llist_apply_func_t and make prototypes use the typedefs. 2000-06-13 09:18:06 +00:00
Sascha Schumann 6caf633cf7 Proper casts 2000-06-13 09:17:06 +00:00
Sascha Schumann 5bbc4114f1 Remove extra cast. ch' is already of type char *'.
This unbreaks the build with xlc on AIX.
2000-06-13 09:09:33 +00:00
Sascha Schumann 165361a515 Remove single ; 2000-06-13 09:06:31 +00:00
Sascha Schumann 6ebdd64d3c Fix spelling 2000-06-13 07:49:17 +00:00
Andrei Zmievski c85390a691 (php_math_number_format) Simplifying the logic also fixed bugs #4954
and #4998.
2000-06-13 04:31:02 +00:00
6303aec7ff ChangeLog update 2000-06-13 02:15:03 +00:00
ce826716d5 NEWS update 2000-06-13 02:14:49 +00:00
Chuck Hagenbuch d6a55b532c Check more locations. Submitted by Anil Madhavapeddy <anil@recoil.org> 2000-06-13 00:57:58 +00:00
David Hedbor cefc1f2336 Removed obsolete, commented line 2000-06-12 23:41:34 +00:00
Zeev Suraski 6b8059afe9 Make Egon happy :) 2000-06-12 22:03:53 +00:00
Zeev Suraski 53e19d5102 Fix verified, update news 2000-06-12 21:41:56 +00:00
Zeev Suraski 1f0049158a @- Fixed an initialization problem in the MS-SQL problem that could cause
@  a crash in mssql_query() (Zeev)
2000-06-12 21:39:51 +00:00
Zeev Suraski 6bbf0105af Fix a bug in extension_dir, where PG(extension_dir) is not yet initialized by the time php_dl() is called 2000-06-12 21:01:03 +00:00
Frank M. Kromann 8cae0bf725 making zlib module compile on win32 with new directory structure 2000-06-12 20:34:35 +00:00
Frank M. Kromann 16380b0155 making oracle module compile on win32 with new directory structure 2000-06-12 20:34:17 +00:00
Frank M. Kromann 3afe0e2ed1 making oci8 module compile on win32 with new directory structure 2000-06-12 20:33:55 +00:00
Frank M. Kromann 0d3085944f making ldap module compile on win32 with new directory structure 2000-06-12 20:33:32 +00:00
Frank M. Kromann d973e2c25b making java module compile on win32 with new directory structure 2000-06-12 20:33:12 +00:00
Frank M. Kromann a52af6cd7c making imap module compile on win32 with new directory structure 2000-06-12 20:32:52 +00:00
Frank M. Kromann 66a172c9b4 making ftp module compile on win32 with new directory structure 2000-06-12 20:32:23 +00:00
Frank M. Kromann 618c98179b making exif module compile on win32 with new directory structure 2000-06-12 20:31:45 +00:00
Frank M. Kromann 28b8d17c28 making calendar module compile on win32 with new directory structure 2000-06-12 20:31:03 +00:00
Zeev Suraski e962769fee Return the previous error handler from set_error_handler() 2000-06-12 20:31:02 +00:00
Zeev Suraski 61c0f610dc news update 2000-06-12 20:30:52 +00:00
Zeev Suraski fce92e3ca2 Avoid using E_CORE_* errorlevels in any place which is not in the global startup sequence 2000-06-12 20:22:17 +00:00
Frank M. Kromann 2c5c26f205 making MSSQL module compile with new directory structure 2000-06-12 20:16:07 +00:00
Andrei Zmievski 7ef638aa30 @- Upgraded PCRE to version 3.2 and fixed a bug when anchored pattern
@  matched an empty string. (Andrei)
2000-06-12 19:55:58 +00:00
Andrei Zmievski 318a59d302 Document change. 2000-06-12 19:41:33 +00:00
Andi Gutmans 719d995a9d - On UNIX support popen() which works with current working directory
- when in VIRTUAL_DIR mode.
2000-06-12 19:39:04 +00:00
Andrei Zmievski 5d51452545 Make gdttf.c work with virtual dir support. 2000-06-12 19:13:21 +00:00
Andi Gutmans 02c42362ff - Start of popen() fix for UNIX. Still unclear what we'll do on Windows. 2000-06-12 18:48:18 +00:00
Zeev Suraski 5be482030e Killed <?php_track_vars?> 2000-06-12 16:07:25 +00:00
Zeev Suraski 968d2c5b33 Get rid of <?php_track_vars?> 2000-06-12 16:07:15 +00:00
Andrei Zmievski ab99eb59fb (PHP str_pad) Terminate string with a null. 2000-06-12 16:06:27 +00:00
Zeev Suraski c250702c40 Lets not offend anyone :) 2000-06-12 15:55:15 +00:00
Egon Schmid e465e94a12 Fixed a proto. 2000-06-12 15:17:08 +00:00
Egon Schmid 1769d69ca3 Fixed protos. 2000-06-12 14:44:16 +00:00
Andrei Zmievski eb4b5ffd22 (php_readdir_r) Revert that bad patch. 2000-06-12 14:11:39 +00:00
Egon Schmid a526b42211 Fixed some protos. 2000-06-12 13:33:49 +00:00
Andrei Zmievski 62be931c9f Quiet CVS. 2000-06-12 13:22:11 +00:00
Andrei Zmievski e008af1364 (php_readdir_r) Last argument to readdir_r was missing. 2000-06-12 13:20:38 +00:00
619537208b ChangeLog update 2000-06-12 02:14:47 +00:00
Rasmus Lerdorf fee1263ca3 Fix overlooked core->main change 2000-06-11 19:53:19 +00:00
Zeev Suraski 02d2a5db3a Fix Windows .dsp's 2000-06-11 19:23:21 +00:00
Sascha Schumann fd7153b0f3 Change directory name from core to main. 2000-06-11 18:51:17 +00:00
Sascha Schumann 6df3a21309 Prepare move of the top-level source files to the core directory. 2000-06-11 18:16:37 +00:00
Andi Gutmans 1f5ee72e2d - Solve floating point precision crash on FreeBSD. 2000-06-11 18:07:14 +00:00
Andi Gutmans 5928970d22 - Fixes crash problem on FreeBSD when losing precision. Need to still see
- how to detect we're on FreeBSD
2000-06-11 17:45:19 +00:00
Andi Gutmans cbc8b0f4b4 - Update NEWS 2000-06-11 17:27:00 +00:00
Andi Gutmans e7c50e4866 - Untested but it should fix the problem with cyr_convert() not being
- binary safe and destroying other values in the script
2000-06-11 17:23:38 +00:00
Andi Gutmans 6caaf70451 - Make shockwave work with virtual_dir (a bit ugly).
- swf_openfile doesn't return any values. This seems to mean that you can
- only have one file open at a time.
2000-06-11 16:34:53 +00:00
Egon Schmid bcec04f1d9 Added argument type. 2000-06-11 16:24:00 +00:00
Zeev Suraski 07a8327a0e Fix zend_get_parameters() 2000-06-11 16:19:31 +00:00
Stig Venaas 2e738b519f Forgot to set_compare_func in the new array functions, had only tested
with older source.
2000-06-11 12:20:42 +00:00
Sascha Schumann b8063c342c Separate creating config_vars.mk and generating Makefiles.
This change enables you to regenerate Makefiles by running config.status.
2000-06-11 10:38:37 +00:00
Sascha Schumann 438e9bdc93 Remove unnecessary second cat invocation 2000-06-11 10:33:39 +00:00
Thies C. Arntzen bd593d3da6 (set_time_limit) converted to new API.
# for some weird reason this fixes a newly introduced crash.
2000-06-11 10:27:36 +00:00
Sascha Schumann a2ad91df33 Upgrade to Libtool 1.3.5. 2000-06-11 10:26:24 +00:00
Sterling Hughes 164cbab7c6 oops.
# P.s.:  The current CVS is broken (virtual dir stuff), does anyone have
# an idea on when it will be fixed?
2000-06-11 07:51:10 +00:00
cac15508d5 ChangeLog update 2000-06-11 02:14:51 +00:00
Jouni Ahto d64c9d2823 - Avoid generating unnecessary switch statemets.
- Add a test if argument was given (if it is optional) before trying to
  fetch a resource and a note that something should be done if it wasn't.
- Some cosmetic fixes in the code generated.
- Some other small fixes in the code generated, already forgotten.
2000-06-11 01:25:16 +00:00
Andrei Zmievski f20194149f One more place. 2000-06-10 19:44:34 +00:00
Andrei Zmievski 43793b94f7 Terminate the string with '\0'. 2000-06-10 19:43:20 +00:00
Stig Venaas 2ef880c048 Notice about adding array_unique, array_intersect and array_diff 2000-06-10 19:38:01 +00:00
Stig Venaas f18b903d5f Changed array_subtract to array_diff 2000-06-10 19:09:56 +00:00
Stig Venaas 99f151f1bd Adding fuctions array_unique, array_intersect and array_subtract. 2000-06-10 18:58:45 +00:00
Andi Gutmans a1c036b8cf - Fix bug in virtual_file_ex when the resulting path is the root. 2000-06-10 15:15:28 +00:00
Andi Gutmans 390dccacac - Fixed problem when using uninitialized values in comparisons with strings.
-  They behave as empty strings again just like in PHP 3.
2000-06-10 14:39:06 +00:00
Andi Gutmans 131dfb4a02 - Commit message says it all 2000-06-10 14:37:54 +00:00
Andi Gutmans 8df948c5c2 - Erased an extra line by mistake 2000-06-10 14:16:34 +00:00
Andi Gutmans 97de5b2106 - Fix PostgreSQL project file a bit.
- Remove some HAVE_* from config.w32.h. More can be removed. Right now
- most HAVE_*'s in config.w32.h can actually be removed as they usually are
- only used by the module itself and not by PHP. MSQL is an exception as
- log can use it too
2000-06-10 10:15:53 +00:00
Sascha Schumann 8e3fdccb8d Define _POSIX_PTHREAD_SEMANTICS on Solaris by default. 2000-06-10 10:10:23 +00:00
Jouni Ahto 88426390a8 - Fix incorrect code creation when an optional argument is resource type. 2000-06-10 09:45:27 +00:00
Andi Gutmans 77f4e1c8c7 - This seems to be a bug. Anyone know who wrote this code? Should it stay
- in?
2000-06-10 09:05:22 +00:00
Andi Gutmans 2b0a8049db - Update module project files to include:
- HAVE_MODULE=1
- ZEND_WIN32
- PHP_WIN32
- COMPILE_DL_MODULE
- ZTS=1
2000-06-10 09:00:31 +00:00
Jouni Ahto d09ec3261f - Add some documentation for ext_skel and a note about it's existence. 2000-06-10 08:59:43 +00:00
Andi Gutmans f79e3fa02f - #ifdef COMPILE_DL_FOO
- #if HAVE_FOO
2000-06-10 08:50:24 +00:00
Andi Gutmans a9d4cf9023 - Nuke COMPILE_DL. Modules that need to be compiled as dll's in Windows
- need to define both COMPILE_DL_MODULE and HAVE_MODULE=1
2000-06-10 08:48:01 +00:00
Sascha Schumann 0eeee6b7c8 Add -qthreaded for AIX cc V5 2000-06-10 08:26:59 +00:00
Sascha Schumann f6c8918a0d Add FreeBSD's new -kthread option.
Add a list of compiler/platforms where the flags are known to work.
2000-06-10 08:09:05 +00:00
Sascha Schumann ce9a9fb1dc Fix MYSQL_LIB_CHK ($i is used by the outer loop) 2000-06-10 07:48:55 +00:00
Sascha Schumann 9097a78187 Search for mysqlclient library in lib and lib/mysql 2000-06-10 07:38:58 +00:00
Sascha Schumann 7b89a0037d Fix typo 2000-06-10 06:00:08 +00:00
Jouni Ahto f3c1222da3 - Fix typos, add default case to switch and other small things. 2000-06-10 05:47:22 +00:00
Jouni Ahto b54f915280 - Automatically generate C code to handle arguments passed to a PHP function
based on function proto.
# Very cool! Try yourself, put for example the following line in file funcs:
# bool drawtext(string text, resource font, int x, int y [, resource color])
# and then run ./ext_skel foobar /full/path/to/funcs and then look at
# foobar.c...
2000-06-10 03:53:11 +00:00
Sascha Schumann 01740bfb0d Make yaz compilable as shared module. 2000-06-10 03:35:57 +00:00
cdb98a04a5 ChangeLog update 2000-06-10 02:14:52 +00:00
0d714115ab NEWS update 2000-06-10 02:14:49 +00:00
Zeev Suraski 53bdf0b5cc I can't think of a reason of why it should just be a notice... Make it a warning, like it was in PHP 3. 2000-06-10 01:12:12 +00:00
Zeev Suraski a29791411b Fix bug #4768 2000-06-10 01:08:55 +00:00
Jouni Ahto 796ff183b0 # Still a typo. 2000-06-09 23:37:05 +00:00
Andi Gutmans 3c766f379b - Update postgress to build on Windows 2000-06-09 22:39:56 +00:00
Jouni Ahto dee9053cb6 # Cosmetic fixes and a typo. 2000-06-09 21:47:20 +00:00
Andrei Zmievski 3570258050 @- Fixed 'Z' flag in date() to adjust for daylight savings time. (Andrei) 2000-06-09 20:18:36 +00:00
Andrei Zmievski b51aa1f36f Made an alias for hash apply with arguments. 2000-06-09 20:18:16 +00:00
Jouni Ahto 420d668f33 - Cosmetic changes.
- Optionally, create function entries, stubs and declarations from names
  listed in a file.
2000-06-09 18:04:17 +00:00
Andi Gutmans ae19180641 - Forgot to remove the FIXME 2000-06-09 17:52:09 +00:00
Andi Gutmans 717acfe9c5 - Make the memory limit accurate 2000-06-09 17:51:37 +00:00
Sascha Schumann 8f58728e2b Real fix for std_syslog issue on OpenServer. This is limited to the native
development system (/bin/cc and icc) and does not show up with the UDK.
2000-06-09 17:21:40 +00:00
Sascha Schumann b98d2a8261 The ! command is not portable. 2000-06-09 17:19:26 +00:00
Andi Gutmans 605b1aa394 - Fix cache initialization 2000-06-09 16:08:30 +00:00
Andi Gutmans 9fb095b50e - Allocate and cache in 8 byte blocks. Most allocators anyway use 8 byte
- blocks. This should help fragmentation and cache hits.
- The old tree is tagged as PRE_EIGHT_BYTE_ALLOC_PATCH
2000-06-09 15:54:14 +00:00
Zeev Suraski d1a9eca805 Update news 2000-06-09 15:44:49 +00:00
Zeev Suraski 03e842ccb8 Fix bug #4933 2000-06-09 15:42:49 +00:00
Zeev Suraski fddf89aff7 Fixed bug #4819 2000-06-09 15:40:37 +00:00
Zeev Suraski d975678006 @- Fixed var_dump() not to modify the internal order of array elements (Zeev)
Fixed the buffer overflow as well
2000-06-09 15:13:36 +00:00
Jouni Ahto 62adbfc521 - Changed user instructions. 2000-06-09 14:46:15 +00:00
Andi Gutmans 6bcc8ff0c7 - Time to change it. We changed register_internal_class() ->
- zend_register_internal_class()
2000-06-09 14:41:33 +00:00
Andi Gutmans eb0e694665 - Andrei, this is for you!
- Add zend_register_internal_class_ex() which allows you to specify a
- parent to inherit from. You can either specify the parent directly or via
- its name.
2000-06-09 14:40:14 +00:00
Andrei Zmievski ef1d6987fd @- Fixed stripcslashes() to remove to strip \ in unknown escapes instead of
@  leaving it. (Andrei)
2000-06-09 13:58:10 +00:00
Andrei Zmievski e52889acd9 @- Changed WDDX to always serialize arrays as structs. (Andrei)
Changed WDDX to always serialize arrays as structs. PR #4924
2000-06-09 13:50:39 +00:00
Andi Gutmans 99b4051eca - Typo 2000-06-09 13:36:36 +00:00
Zeev Suraski cbd3f41ba8 Fix #4928
Be *CAREFUL* with the _ex API, guys!
2000-06-09 13:15:19 +00:00
Andi Gutmans edd7025645 - Remove old obsolete code. 2000-06-09 13:08:40 +00:00
Andi Gutmans a712da5cee - Make unset consistent with the way array offsets work 2000-06-09 13:07:26 +00:00
Stanislav Malyshev e346a6b538 Handle unset with empty key 2000-06-09 10:59:21 +00:00
Stanislav Malyshev 6cac26c21f Make chmod in safe mode not allow SUID bits 2000-06-09 10:34:53 +00:00
Andi Gutmans 6ce07a85e4 - Change register_internal_class to zend_register_internal_class for
- consistency.
- Andrei: I'm still thinking about the _ex you want me to implement
2000-06-09 08:41:59 +00:00
Andi Gutmans a7d1bc96be - Use PHP_WIN32 2000-06-09 08:10:15 +00:00
Jouni Ahto 216067b63f - As Sascha requested. 2000-06-09 03:38:37 +00:00
Andrei Zmievski 1868bfdcdf (php_wddx_deserialize_ex) return SUCCESS/FAILURE
Use that return value in WDDX session deserializer.
2000-06-09 03:00:02 +00:00
Sascha Schumann a4a4de55f7 Change COMPILE_DL to COMPILE_DL_EXTNAME 2000-06-09 02:59:47 +00:00
Jouni Ahto c9dfab5024 - Added skeleton module creating script. 2000-06-09 02:51:43 +00:00
Zeev Suraski 897bb1b572 - Parse errors in the php.ini files under Windows will no longer mess up the
HTTP headers in CGI mode and are now displayed in a message box
2000-06-09 02:18:50 +00:00
1aa01da212 ChangeLog update 2000-06-09 02:14:58 +00:00
cf8545794b NEWS update 2000-06-09 02:14:55 +00:00
Zeev Suraski 9c88d20070 Move back everything to where it belongs... 2000-06-09 01:50:44 +00:00
Zeev Suraski df2935808e This should no longer be necessary 2000-06-09 01:41:16 +00:00
Zeev Suraski 4e63aa4566 This seems to be a valid report, can't hurt anyway (PR 4252) 2000-06-09 00:46:39 +00:00
Zeev Suraski 2ffa48b447 Restore the check for the trailing slash. Windows does not apply s#/+#/# (PR 4375) 2000-06-09 00:43:43 +00:00
Sascha Schumann fb330f795d You need to include dynlib.mk in Makefile.in. 2000-06-09 00:42:05 +00:00
Sascha Schumann 764747ec7f The default serializer is still php. 2000-06-09 00:26:56 +00:00
Sascha Schumann 0f06ad29a6 Automatically recover from a failed attempt to decode a session object.
PR: #4886
2000-06-09 00:23:20 +00:00
Sascha Schumann 1326e17536 Fix format strings. cache_expire's type was changed to long. 2000-06-08 23:42:04 +00:00
Sascha Schumann d530b82b26 Somehow I screwed up the find parameters while doing the original change.
s/global.h/php_global.h/
2000-06-08 23:39:01 +00:00
Andrei Zmievski 1251445abc Include php_global.h, instead of global.h 2000-06-08 21:07:30 +00:00
Zeev Suraski c5b2c8ba93 Update .dsp's 2000-06-08 12:28:48 +00:00
Anthony Whitehead deff917851 Added more server variables to the HTTP_SERVER_VARS array, all the
variables listed in the structs in nsapi.c should work now. Untested on
Windows platform.
2000-06-08 11:56:36 +00:00
Thies C. Arntzen c8ffb0ba59 @- Fixed crash in OCIFetchStatement() when trying to read after
@  all data has already been read. (Thies)
2000-06-08 09:49:31 +00:00
Hartmut Holzgraefe eb8cd900a6 @ fopen_wrappers() are now extensible via modules
so here it finaly is, the more general approach to fopen wrappers
# see what i'll break this time
2000-06-08 09:43:12 +00:00
Sascha Schumann d180634e07 Add PHP_BROKEN_SPRINTF check here.
Also remove unnecessary #ifdef's for PACKAGE and VERSION.
2000-06-08 06:16:22 +00:00
Sascha Schumann e49ad341bd Wipe out acconfig.h.in and rewrite some checks to use PHP_ARG_ENABLE. 2000-06-08 06:14:58 +00:00
Sascha Schumann b4e48b952e Clean up acconfig.h 2000-06-08 06:12:26 +00:00
Sascha Schumann 039551788b Add a couple of casts 2000-06-08 06:07:38 +00:00
dce9fd0e44 ChangeLog update 2000-06-08 02:15:09 +00:00
5dff860557 NEWS update 2000-06-08 02:15:06 +00:00
Sascha Schumann eea5d09eb9 Always define PROGRAM_NAME to avoid problems with Irix's and OpenServer's
makes.
2000-06-08 01:39:17 +00:00
Sascha Schumann 471a07f223 Add note about using PHP_ARG_WITH/ENABLE 2000-06-08 00:34:04 +00:00
Jouni Ahto 66eedaa03d - Fixed typo in _php_image_output (s/fp/tmp/) causing segfault.
- Fixed bug when calling imagejpeg() with 3 arguments, the second one empty,
  introduced yesterday.
- Nuked even more code.
2000-06-07 23:04:39 +00:00
Uwe Steinmann 467b5e4892 - fixed compilation error 2000-06-07 20:01:12 +00:00
Uwe Steinmann 169606602b - more removal of obsolete pdflib functions, but no changes to the php
api
2000-06-07 19:44:47 +00:00
Sascha Schumann 01ecd47a05 Fix test for php_always_shared 2000-06-07 19:13:28 +00:00
Zeev Suraski 022159a6cd - Fix Win32 build
- Nuke a warning
2000-06-07 18:10:21 +00:00
Uwe Steinmann 4a81e8c111 - new function pdf_set_info() to replace pdf_set_info_xxx() 2000-06-07 18:06:11 +00:00
Thies C. Arntzen c183168481 beautify 2000-06-07 09:55:37 +00:00
Hartmut Holzgraefe 02b0cef4d8 cyscape's "current" browscap.ini file doesn't terminate the last line
in the file with a newline character
this resulted in a parse error
2000-06-07 05:47:24 +00:00
Andrei Zmievski 61fcaf564a Purely formatting. 2000-06-07 02:28:36 +00:00
c904bb2b87 ChangeLog update 2000-06-07 02:15:19 +00:00
962d39e86e NEWS update 2000-06-07 02:15:16 +00:00
Rasmus Lerdorf ff843bacf4 Make trim strip \0 to match php 3
@ Make trim strip \0 to match php 3 (Rasmus)
2000-06-07 00:59:14 +00:00
Jouni Ahto 0ebcdb28af - Added functions imagewbmp(), imagecreatefromxbm().
- Nuked a lot of duplicate code.
@- Added function imagecreatefromxbm(). (Jouni)
@- Added function imagewbmp(). (Jouni, based on patch from Rune Nordbøe Skillingstad)
# Note: calling imagejpeg() with 3 arguments, the second one empty,
# is currently broken. Fill fix tomorrow evening unless someone beats me.
# Must have some sleep now, brains stopped working...
2000-06-07 00:37:49 +00:00
Andrei Zmievski b928bdceb8 @- Added str_pad() for padding a string with an arbitrary string on left or
@  right. (Andrei)

Added str_pad() for padding a string with an arbitrary string on left or right.

# With all those macros, the code is starting to eerily resemble Perl's guts.
2000-06-06 20:42:33 +00:00
Uwe Steinmann 6a8fdc6c5c - add functions pdf_get_value(), pdf_set_value(), pdf_get_parameter(),
pdf_set_border_dash()
- some prototype fixes
2000-06-06 19:59:30 +00:00
Andrei Zmievski 3b649d637d I guess Zeev's done it already. 2000-06-06 19:46:54 +00:00
Zeev Suraski 34c40031ca @- Made the short_tags, asp_tags and allow_call_time_pass_reference INI directives work
@  on a per-directory basis as well, e.g. from .htaccess files (Zeev)
2000-06-06 19:16:57 +00:00
Clayton Collie 24b26065e0 PHP code to test sscanf() 2000-06-06 19:15:26 +00:00
Zeev Suraski 98bf43f229 Enable asp_tags/short_tags/allow_call_time_pass_by_reference to work on a per-directory
basis as well
2000-06-06 19:13:54 +00:00
Clayton Collie 8e58cc501f Modified Makefile.in so scanf.c compiles 2000-06-06 19:11:50 +00:00
Jouni Ahto 4f0f3c3ba0 - Preparing to add new image types to gd module.
# Sascha, if you see this, why are there two checks for jpeg dirs
# (PHP_GD_JPEG)? I just literally applied the same method to check for
# Xpm libs, don't know how to fix it. Could you please have a look at this?
2000-06-06 19:06:46 +00:00
Clayton Collie 0b7fd17c2b Added sscanf() function. 2000-06-06 18:58:15 +00:00
Andi Gutmans d7ac0f2c9d - I didn't have anything to do with this buggy code. Just kidding :) 2000-06-06 18:54:00 +00:00
Frank M. Kromann a14261bc42 adding definition for EWOULDBLOCK for Win32 to compile 2000-06-06 18:30:06 +00:00
Hartmut Holzgraefe 7864fdfdee added missing '/' to closing <center> tag (BUG ID #4416) 2000-06-06 17:26:15 +00:00
Hartmut Holzgraefe 6dd322874e added T1LIB information to info function 2000-06-06 17:12:05 +00:00
David Hedbor a5418dc0ac Added another bug to be fixed 2000-06-06 16:18:09 +00:00
Thies C. Arntzen 11fabacc3c add check for stdbool.h 2000-06-06 14:13:35 +00:00
Thies C. Arntzen 0e0f3eb097 bool -> int 2000-06-06 13:49:41 +00:00
Thies C. Arntzen 10eb67a3aa @- added fflush() function. (Eric Huss)
# the socket fsync() might not work on Win32.
#
# i'm not sure if we need any code for flushing sockets as they are
# currently alway written via write().
2000-06-06 12:16:44 +00:00
Thies C. Arntzen 8ed100e5c5 hashtable.h -> expat_hashtable.h 2000-06-06 10:06:45 +00:00
Frank M. Kromann eedf4e973f Adding correct compiler directives for Win32 compilation 2000-06-06 07:26:04 +00:00
Joey Smith 663d46ea23 Use common naming convention. 2000-06-06 05:42:11 +00:00
Joey Smith edfd7f9a80 Get the version #'s right... 2000-06-06 05:13:07 +00:00
Sascha Schumann 458352954d Add newline at the end of the file (breaks at least SCO and Tru64 C compiler). 2000-06-06 02:47:43 +00:00
88a0832a09 ChangeLog update 2000-06-06 02:15:17 +00:00
32af54f62b NEWS update 2000-06-06 02:15:14 +00:00
Sterling Hughes 48ef2d62ba Move to the Z_*_PP macros. 2000-06-06 00:34:00 +00:00
Sascha Schumann e2168491a1 Move hashtable.h to expat_hashtable.h. 2000-06-06 00:27:18 +00:00
Sascha Schumann d3a7f5be38 Make TSRM compile again. ZTS is defined by a header file included in
tsrm_config.h, so TSRM.o was always empty.
2000-06-06 00:16:16 +00:00
David Hedbor dd6cccf50e PRE_INCLUDES hack reverted 2000-06-06 00:02:03 +00:00
David Hedbor 45ba649c8e PRE_INCLUDE hack reverted 2000-06-06 00:01:29 +00:00
Sascha Schumann 45a5555b09 Move global.h to php_global.h. 2000-06-05 23:59:06 +00:00
Sascha Schumann 102c6ce4b8 Move main.h to php_main.h. 2000-06-05 23:24:42 +00:00
Rasmus Lerdorf 78d77c1476 Fix virtual() when used with output buffering
@ Fix virtual() when used with output buffering (Marc Pohl)
2000-06-05 21:19:21 +00:00
David Hedbor ad730a374b List with TODO items 2000-06-05 21:05:51 +00:00
David Hedbor ebe02095df Fixed include directory problems. 2000-06-05 21:05:40 +00:00
David Hedbor ff8a716efe Added a new user-definable include variable, PRE_INCLUDES. It works
like EXTRA_INCLUDES but is added before the global INCLUDES variable.
#
# This was needed for the roxen SAPI module, which requires the PHP4
# include dirs to be after the Pike include dirs. I can't make the
# Pike include dir global though, since Pike includes then conflict
# with PHP4 includes in the rest of the compile.
2000-06-05 21:05:07 +00:00
David Hedbor 7fdfcc28ec Changed include statement for main.h to avoid inclusion of Pike's main.h. 2000-06-05 19:51:22 +00:00
Andi Gutmans 3701bc4207 - ARG_COUNT(ht) -> ZEND_NUM_ARGS() mega patch 2000-06-05 19:47:54 +00:00
Rasmus Lerdorf 1cefd77f1c Oops, fixed slight miscue there. Now it works. 2000-06-05 19:35:15 +00:00
Jouni Ahto 9d2bcf2bd0 - Restore locale settings to state they were at module startup if they
were changed.
2000-06-05 18:47:34 +00:00
Rasmus Lerdorf 194e8828a1 @ Clean up constants in flock() function and add optional 3rd arg which
@ is set to true on EWOULDBLOCK (Rasmus)
Clean up constants in flock() function and add optional 3rd arg which
is set to true on EWOULDBLOCK
2000-06-05 17:56:01 +00:00
Andrei Zmievski de9f39beda Ignore generated files. 2000-06-05 17:50:31 +00:00
Frank M. Kromann 2bfe0001da Getting exif module to compile on win32 2000-06-05 16:42:03 +00:00
Frank M. Kromann e93df14b67 fixing compiler directive so the module will actually build a php module 2000-06-05 16:26:46 +00:00
Uwe Steinmann a8401a33c6 - should now compile and configure with libxml 2.0.0 2000-06-05 15:39:29 +00:00
Andi Gutmans d8d6ff3c4c - Revert internazionalization fix. 2000-06-05 15:37:30 +00:00
Andi Gutmans 7e0baa7a1d - Revert Thies' locale patch. It was screwing up language level things.
- We could add support for locale in some specific output functions at a
- later time to make everyone happy
2000-06-05 15:34:11 +00:00
Hartmut Holzgraefe 50b014b957 compile fix regarding bug report #4780 2000-06-05 15:17:25 +00:00
Andi Gutmans f8983e467f - Complete change to create_function() 2000-06-05 06:52:02 +00:00
cd9e047d65 ChangeLog update 2000-06-05 02:15:17 +00:00
fe0f40254f NEWS update 2000-06-05 02:15:14 +00:00
Jouni Ahto d5d6c79584 (pg_connect) Missed adding reference to link. 2000-06-04 23:06:11 +00:00
Zeev Suraski 1c36e3472f Change shutdown order to sort out a crash when assigning a resource id to a static. 2000-06-04 22:09:16 +00:00
Zeev Suraski 4a1da8b6f9 Fix Win32 build 2000-06-04 22:00:17 +00:00
Zeev Suraski bfac4633a5 - Support unordered hash comparisons
- Make == perform an unordered comparison with arrays/objects, and === perform an ordered comparison
2000-06-04 21:59:49 +00:00
Zeev Suraski 675ce84475 *** empty log message *** 2000-06-04 21:34:56 +00:00
Zeev Suraski b7a8baf1bb Rename lambda() 2000-06-04 21:30:56 +00:00
Jouni Ahto b9d1b21598 - Added functions pg_loimport(), pg_loexport().
@- Added functions pg_loimport(), pg_loexport(). (Jouni)
2000-06-04 20:24:07 +00:00
Rasmus Lerdorf 7eec1997ef @ Add SWF support to getimagesize() function (Derick Rethans)
Add SWF support to getimagesize() function
2000-06-04 18:29:15 +00:00
Sascha Schumann 8aa6d9cb35 Redirect messages from cp modules/* to /dev/null 2000-06-04 16:00:08 +00:00
Stanislav Malyshev a23c64ee8b \0 is part of they key, but not of the variable 2000-06-04 15:43:04 +00:00
Sascha Schumann 950e7224ad Back out the last change by Andi which caused TSRM to be always configured.
This needs to be refined. It caused breakage on several platforms.
2000-06-04 15:34:31 +00:00
Stanislav Malyshev 5af7dff758 add opendir to VIRTUAL_DIR 2000-06-04 08:29:11 +00:00
Stanislav Malyshev 375474ce86 chdir returns -1 on error, so should V_CHDIR 2000-06-04 07:59:32 +00:00
Stanislav Malyshev 7f158268aa chdir returns 0 on success, compare against it 2000-06-04 07:57:40 +00:00
Rasmus Lerdorf 76061b701e @ Add support for both indexed and non-indexed arrays of file uploads
@ eg. name="file[]" type="file" (Rasmus)
Add support for both indexed and non-indexed arrays of file uploads
eg. name="file[]" type="file" (Rasmus)
2000-06-04 05:46:28 +00:00
Andi Gutmans 09d281ff62 - Only compile if building a thread safe version 2000-06-04 04:14:17 +00:00
c012528fe1 ChangeLog update 2000-06-04 02:15:13 +00:00
Zeev Suraski e46a517ed6 *** empty log message *** 2000-06-03 16:49:26 +00:00
Zeev Suraski 1a8da63ca0 news update 2000-06-03 10:35:37 +00:00
Zeev Suraski dae76aa1b5 Support comparisons of arrays (with arrays) and objects (with objects) 2000-06-03 10:34:19 +00:00
Andi Gutmans 01d478ba56 - Change #if to #ifdef. 2000-06-03 07:34:20 +00:00
Zeev Suraski 5673378ea6 - Allow all functions that receive user-defined function callbacks to accept
an array that contains an object and a method name, in place of a function
  name, e.g. usort($array, array($obj, "ObjSort"))
(I checked the code in array.c and basic_functions.c, other code which uses
call_user_function() may still force the function_name argument to be of type
IS_STRING, which prevents this feature from working - and is no longer necessary)
2000-06-03 04:16:46 +00:00
Zeev Suraski 2ffe85ddac Don't take chances with new include files 2000-06-03 04:14:31 +00:00
Zeev Suraski 5a35a6bafc Improve call_user_function() to support array($obj, $method) 2000-06-03 03:28:08 +00:00
Zeev Suraski d1f1d40527 - Make the INI entries sorted in phpinfo() 2000-06-03 03:05:29 +00:00
Zeev Suraski d4b160c0d6 - Export normalize_bool
- This global/static syntax fix brought us back to the 4 documented conflicts
2000-06-03 03:05:01 +00:00
b6d29b2347 ChangeLog update 2000-06-03 02:15:16 +00:00
93d51636f7 NEWS update 2000-06-03 02:15:13 +00:00
Zeev Suraski e374f6fd31 Fix a lambda() bug 2000-06-03 02:02:09 +00:00
Zeev Suraski 70345bd222 Add missing { 2000-06-03 01:50:15 +00:00
Zeev Suraski 0b7a9cea88 - Fix Win32 compilation (Use winsock2.h from now on)
- Add lambda() support
2000-06-03 01:49:49 +00:00
Andi Gutmans 1f6c248909 - Update NEWS so that this is documented 2000-06-02 16:52:22 +00:00
Andi Gutmans 1b993610c1 - global/static require a trailing ';' 2000-06-02 16:50:19 +00:00
Zeev Suraski 746f01802d Update error code 2000-06-02 12:36:54 +00:00
Zeev Suraski 06388f5181 Use the new error code
@- Added set_error_handler() to allow custom error handling functions,
@  instead of the built-in error handling code (Zeev, Zend Engine)
@- Renamed user_error() to trigger_error();  user_error() remains
@  defined for compatibility (Zeev, Zend Engine)
2000-06-02 12:35:53 +00:00
Zeev Suraski ab36e22aeb Small optimization 2000-06-02 12:24:24 +00:00
Zeev Suraski 8a8c3eafc8 Nuke the old error code, use the new one 2000-06-02 12:21:49 +00:00
Thies C. Arntzen 22e9ff476a - 2000-06-02 08:53:55 +00:00
Andi Gutmans 45cfada9a1 - Make TSRM always compile into PHP. We can now move virtual_cwd over here.
- We might not want to compile TSRM.c in case we are on a platform which
- doesn't support threads. Sascha? What do you think?
2000-06-02 08:51:50 +00:00
efc005c078 ChangeLog update 2000-06-02 02:15:26 +00:00
110735c3bb NEWS update 2000-06-02 02:15:23 +00:00
Chuck Hagenbuch a4146cc890 patch for redhat 6.2 from Teodor Cimpoesu <teo@digiro.net>. 2000-06-01 20:19:26 +00:00
Andrei Zmievski 4ef2af7c72 Update header file. 2000-06-01 16:34:50 +00:00
Andrei Zmievski 1db5c7d1e2 @- Cleaned up PCRE extension and made it binary-safe. (Andrei) 2000-06-01 16:34:00 +00:00
Jouni Ahto 467c4314b8 (ucwords) Remove unnecessary code.
# Didn't keep my promise to stop...
2000-06-01 14:56:28 +00:00
Jouni Ahto c106ab8ba0 (ucwords) Yet another fix for #4748.
# Last one from me today, I must have a beer now.
2000-06-01 14:40:41 +00:00
Andrei Zmievski 48db9618b8 Some tweaks. 2000-06-01 14:18:45 +00:00
Andrei Zmievski 4c818aec33 @- Added third argument to in_array(). If it's true, then in_array()
@  will use strict comparison instead of the default one. (Andrei)

Fixes bug #4753
2000-06-01 13:52:08 +00:00
Jouni Ahto 30c5b53ad1 (ucwords) Fixed fix for fix for fix for #4748.
# Today's most fixed bug.
2000-06-01 13:38:23 +00:00
Hartmut Holzgraefe a35237795f uh, off by one?!! this time it's regression-tested, fast and compact 2000-06-01 11:47:48 +00:00
Jouni Ahto 3c51a88d0c (ucwords) Another try to fix #4748. 2000-06-01 10:07:44 +00:00
Hartmut Holzgraefe f27956eb19 ucwords will now test against isspace() instead of just ==" "
(see BUG #4748)
2000-06-01 09:56:54 +00:00
3bd5d5dc13 ChangeLog update 2000-06-01 02:15:14 +00:00
cf10288201 NEWS update 2000-06-01 02:15:11 +00:00
Sascha Schumann dc5af6decc s/sys_syslog/std_syslog/ 2000-06-01 00:48:28 +00:00
Jouni Ahto 8fe69306dc Correct fix this time... (?) 2000-05-31 22:44:29 +00:00
Jouni Ahto 1e7c5b8562 Fix a nasty off-by-one with negative numbers.
# Hey, this has been there for years undetected.
2000-05-31 22:27:09 +00:00
Sascha Schumann 1e56dd781a Make use of already existing macro PHP_PROG_SENDMAIL 2000-05-31 20:44:04 +00:00
Zeev Suraski a00a1d12ea @- Added pg_trace() and pg_untrace (Dominic J. Eidson & Zeev) 2000-05-31 20:40:28 +00:00
Sascha Schumann 7bb2af41e3 Use sed instead of tr. The tr regexp syntax does not seem to be portable
enough to make wide use of it. This should fix problems on Solaris 8
and possibly on older SysV-derivatives.
2000-05-31 20:30:16 +00:00
Zeev Suraski 898c8ead87 IS_BC isn't really being used, but still... 2000-05-31 19:08:18 +00:00
Zeev Suraski 13b67621cf Fix a bug in static initializers/default values/class member variables that contained
array values
2000-05-31 19:07:09 +00:00
Chuck Hagenbuch 1e672d4528 monkeying Sascha's suggested change to allow relative pathnames. 2000-05-31 17:33:30 +00:00
Anthony Whitehead 678508b426 Added changes suggested by Stanislav Borutsky with respect to NSAPI_PUBLIC. 2000-05-31 14:20:57 +00:00
Thies C. Arntzen ccacfd880b @- ignore_user_abort=Off is now default. (Thies) 2000-05-31 14:02:36 +00:00
Sascha Schumann b470fe138b The last line added '-I' to INCLUDES, causing all SAPI modules but NSAPI
failing to build.
2000-05-31 13:15:58 +00:00
Thies C. Arntzen ecd354ada1 just do phpinfo() and "collect" all error_reporting related ini-entries -
you'll get my point;-)
2000-05-31 09:25:51 +00:00
6341c60f67 ChangeLog update 2000-05-31 02:15:14 +00:00
c521aeda57 NEWS update 2000-05-31 02:15:11 +00:00
Frank M. Kromann 640c8226aa Making imap module compile on win32 and include imap_mail() function) 2000-05-30 22:13:09 +00:00
Ben Mansell 1c641cfdee Updated help section with some more compile problems & solutions 2000-05-30 17:34:34 +00:00
Andrei Zmievski 01a4220954 @- Added array_merge_recursive() that will recursively merge values
@  under the same keys. (Andrei)
2000-05-30 17:03:56 +00:00
Andrei Zmievski 0aed5fd91c retab 2000-05-30 15:45:09 +00:00
Andrei Zmievski 7fcaa66bcd Finally figured out what pathinfo() was all about. 2000-05-30 15:44:26 +00:00
Anthony Whitehead c6449f307a Altered NSAPI autoconf to check for location of include files automatically, tested for Netscape 3.x and iPlanet 4.x.
Added very basic variable support for usefull things such as PHP_SELF. I'll extend this to supply this rest of the variables soon.
Commited a patch to activate ZTS in the NSAPI module, this patch comes from
Jayakumar Muthukumarasamy.
2000-05-30 13:20:18 +00:00
Thies C. Arntzen 8c65f81676 @- fixed crash in OCIParse when parsing invalid SQL. (Thies) 2000-05-30 09:25:02 +00:00
5ec49e9c79 ChangeLog update 2000-05-30 02:15:10 +00:00
Zeev Suraski 666a53a247 Forgot to update the makefile 2000-05-29 18:56:51 +00:00
Zeev Suraski 950fb739f8 Fix bug #4678 2000-05-29 18:53:42 +00:00
Zeev Suraski 8fb954ae4f Fix startup sequence. It should do it this time. 2000-05-29 18:45:06 +00:00
Zeev Suraski 7213c743f0 - Added disable_functions php.ini support
- Fixed Win32 build
2000-05-29 17:22:35 +00:00
Zeev Suraski bc7abb3300 Allow disabling of functions for security reasons 2000-05-29 17:16:52 +00:00
Hartmut Holzgraefe ae1043ba0d warn_not_available() will be used by other modules besides
ext/standard in the (very near) future
2000-05-29 17:08:01 +00:00
Andi Gutmans a0e46521e3 - License is at 2.02 2000-05-29 17:03:24 +00:00
Zeev Suraski 3637589db1 Oh yeah, I said there's no need for it to be defined didn't I? :) 2000-05-29 16:51:27 +00:00
Rasmus Lerdorf ebd9e89fcf Clean up EXIF code and give up on extracting the embedded thumbnail for
now.  Will return to it when I find some real specs on it.
Also added a couple of missing copyright headers
2000-05-29 16:34:19 +00:00
Zeev Suraski 949574d027 Remove stale reference to .h file 2000-05-29 16:22:26 +00:00
Zeev Suraski c07a056dac There's really no need for an entire file for a one line function... 2000-05-29 16:13:38 +00:00
Thies C. Arntzen 56dcb7ed07 detab 2000-05-29 15:55:15 +00:00
Thies C. Arntzen 844938ec4e add some notes 2000-05-29 15:54:38 +00:00
Thies C. Arntzen 635d7fbfae allow_call_time_pass_reference fix: similar_text 2000-05-29 15:38:32 +00:00
Zeev Suraski 8715b55ce0 Remove stale macro 2000-05-29 15:31:19 +00:00
Sascha Schumann a982eb2267 `len' is not the actual length of the string, but the possible maximum
length. This fixes a couple of problems, like not setting the cookie path
correctly.
2000-05-29 15:07:19 +00:00
Zeev Suraski 124fe30f03 More secure mode 2000-05-29 11:47:38 +00:00
Zeev Suraski 1ae552c7d1 Creat is creat is creat, no open 2000-05-29 11:45:20 +00:00
178ae887ab ChangeLog update 2000-05-29 02:15:10 +00:00
jim winstead 181da8f232 Add maintainer info for dbase extension. 2000-05-28 19:30:23 +00:00
jim winstead 86920d4c68 Remove old, unused files. 2000-05-28 19:21:29 +00:00
jim winstead 7744e04b42 fix license version number in sample header 2000-05-28 19:17:59 +00:00
Andi Gutmans 015884dda5 - Use pointer arithmetic to speed up the function a bit 2000-05-28 18:59:40 +00:00
Andi Gutmans 0ebb7335c9 - This should have been done for 4.0.0.
- Default build is without debug now. Use --enable-debug if you want a
- debug build which includes leak/memory overwrite etc. detection
2000-05-28 17:39:30 +00:00
Andreas Karajannis 2980f7f92d Changed parameter naming some function prototypes 2000-05-28 17:23:24 +00:00
Andi Gutmans 9786b16e9f - Move zend_activate_modules() to later on. 2000-05-28 17:19:49 +00:00
Sascha Schumann 833339c692 Remove win32/php_registry.h from include list. That slipped in by accident. 2000-05-28 16:27:25 +00:00
Sascha Schumann 0d9c0616f9 Use php_syslog() for system call. On OpenServer 5, syslog is defined to
var_syslog/sys_syslog which causes various problems.

Submitted by: Paul Gardiner <I.T.Manager@barleychalu.co.uk>
2000-05-28 16:22:28 +00:00
Sascha Schumann 9cd4929417 Make syslog module thread-safe. 2000-05-28 16:19:45 +00:00
Andreas Karajannis 1e949e6caa Test scripts for ODBC added 2000-05-28 12:50:19 +00:00
Andreas Karajannis e50b33c240 Cosmetic changes. 2000-05-28 12:48:12 +00:00
Thies C. Arntzen 44cf237a72 (php_execute_script) fix leak for phpinfo() images.
# maybe the activate/deactivate should be moved outside php_execute_script()?
2000-05-28 12:30:06 +00:00
Danny Heijl 90331b27ac - added COMPILE_DL_INFORMIX to WIN32 project file 2000-05-28 12:06:56 +00:00
Danny Heijl a603902561 - Name correction. 2000-05-28 11:08:28 +00:00
f1b988d2af ChangeLog update 2000-05-28 02:15:08 +00:00
Hartmut Holzgraefe 3bbc7466fc added comments to the System/Distribution specific default
path tests for gd.h

? can someone imagine a clever way to have that done for
  _all_ packages in a simple and general way ?
2000-05-27 21:30:30 +00:00
Hartmut Holzgraefe 636b8927c6 should make SuSE 6.x users happy (and anybody else with gh.d in
/usr/include/gd ... )
2000-05-27 21:09:00 +00:00
Sascha Schumann 2bd6846adc Solve conflict with mysql's readdir_r check. Both defined HAVE_READDIR_R,
but with different values.
2000-05-27 19:30:36 +00:00
Hartmut Holzgraefe fb39eda0d8 a second (cleaner?) try on warnings about unsupported functions 2000-05-27 19:27:20 +00:00
Andi Gutmans afccb58612 - I'm not sure if PHP_NOT_IN_THIS_BUILD is the way to handle these
- functions but in any case I have changed it to PHP_NOT_IN_THIS_BUILD()
2000-05-27 18:55:11 +00:00
Andi Gutmans 8c82566b48 - Fix problem in sessions module under Win32. Need to use ; as an options
- delimiter in save_path instead of :.
2000-05-27 16:38:49 +00:00
030c0fd415 ChangeLog update 2000-05-27 02:15:09 +00:00
73bd59943c NEWS update 2000-05-27 02:15:06 +00:00
Zeev Suraski abb31591ff Add Sam Ruby 2000-05-27 00:24:03 +00:00
Rasmus Lerdorf 81c4fd5efc @ Changed the Apache handler's return status to 'Declined' when a requested
@ PHP file could not be found.  Returning 'Not Found' caused problems
@ in the ErrorDocument handler stage in that $REDIRECT_REDIRECT_ERROR_NOTES
@ was not getting set at all.  Moving to 'Declined' shoudl fix this and I
@ can't see any other side effects.  (Rasmus)
Changed the Apache handler's return status to 'Declined' when a requested
PHP file could not be found.  Returning 'Not Found' caused problems
in the ErrorDocument handler stage in that $REDIRECT_REDIRECT_ERROR_NOTES
was not getting set at all.  Moving to 'Declined' shoudl fix this and I
can't see any other side effects.
2000-05-26 18:43:09 +00:00
Hartmut Holzgraefe 7a2e01c592 protos fixed 2000-05-26 17:20:36 +00:00
Hartmut Holzgraefe 62227a03b1 proto fixed 2000-05-26 17:20:18 +00:00
Hartmut Holzgraefe 69d1e788c0 if a module provides a function it should also do so if the function
is not functional due to configure findings
the function should offer a meaningful warning if it is not supported
instead of just beeing undefined
i had already changed this in 'gd', now this is doing it for 'standard'
2000-05-26 17:04:02 +00:00
Zeev Suraski 9bfd5e5e55 Save more overhead. Look for the serializer/save_handler only when they're actually modified. 2000-05-26 13:02:11 +00:00
Zeev Suraski fb69f854af Use the INI framework in the session module 2000-05-26 11:12:49 +00:00
Uwe Steinmann 8e12a0126e - swf.h belongs to the libswf distribution and should not be copied
in the php distribution.
- the configure script now checks for the libswf.a and swf.h in
  <swf-dir>/lib and <swf-dir>/include. If it doesn't find it the
  default directories /usr/local and /usr are checked.
2000-05-26 09:34:13 +00:00
Andi Gutmans b5447a4d7a - Fixed scanning decimal numbers in internationalized environments. They should
- always be in standard US format e.g. 23.3
2000-05-26 07:49:56 +00:00
Andi Gutmans ac309e9696 - Update news file 2000-05-26 07:33:06 +00:00
d3007a8ca9 ChangeLog update 2000-05-26 02:15:10 +00:00
ce3c002a16 NEWS update 2000-05-26 02:15:07 +00:00
Adam Dickmeiss 0399d94e35 Added extension YAZ. 2000-05-25 22:26:43 +00:00
Adam Dickmeiss 51491d06f1 Added short README for ext YAZ. 2000-05-25 22:24:43 +00:00
Adam Dickmeiss 5dadceb115 Added extension YAZ (Z39.50 client role). 2000-05-25 21:54:35 +00:00
Andrei Zmievski 8a5bc5b674 Update proto. 2000-05-25 21:07:07 +00:00
Andrei Zmievski 0a142bb94e @- Added second argument to preg_quote() which allows quoting of
@  one additional character, usually the regex delimiter. (Andrei)
2000-05-25 21:04:09 +00:00
Sascha Schumann 80db548369 Test commit 2000-05-25 20:29:55 +00:00
Sascha Schumann bf913cc61d Test commit 2000-05-25 20:25:40 +00:00
Hartmut Holzgraefe a9abc3ab6b added functions gzcompress() and gzuncompress() for direct string
compression as requested by BugId #1151
2000-05-25 16:35:49 +00:00
Zeev Suraski 385d1aa664 Fix a crash bug in certain situations of class redeclarations 2000-05-25 16:26:22 +00:00
Frank M. Kromann fcd7794c2b Making ZLIB compile on Win32 2000-05-25 16:14:05 +00:00
Frank M. Kromann 36c87e18d6 fixing typo 2000-05-25 16:13:19 +00:00
Zeev Suraski f78e1408c5 (about the removed line - we agreed that the NEWS file should only contain stuff
that would interest end users, removing warnings isn't such a thing in my opinion)
2000-05-25 15:21:54 +00:00
Zeev Suraski 1895a09749 Only fetch globals if it's necessary (which it usually won't be) 2000-05-25 14:43:30 +00:00
Sascha Schumann cecfdbe71e Accept CVS version of libtool (1.3c) 2000-05-25 13:39:50 +00:00
Kristian Köhntopp e5835b63c9 - Added credits. 2000-05-25 11:01:31 +00:00
Jouni Ahto cf9ea9d9cd - Move to high performance api, use Z_* macros.
- Added some spaces here and there.
# Have yet to test that I didn't break anything...
2000-05-25 07:51:40 +00:00
Thies C. Arntzen ff53dde157 @- Uncommitted outstanding OCI8 transactions are now rolled back
@  before the connection is closed. (Thies)
2000-05-25 07:44:45 +00:00
Thies C. Arntzen e319b5f6a5 @- ignore_user_abort() & friends should now work in CGI mode as well.
@  (Patch by daniel.braun@ercom.fr)
2000-05-25 07:01:34 +00:00
57735564ec ChangeLog update 2000-05-25 01:09:11 +00:00
148a3396ec NEWS update 2000-05-25 01:09:08 +00:00
Sterling Hughes 7bd0936291 Check lib. 2000-05-25 00:15:29 +00:00
Andrei Zmievski 4197a68602 @ Fixed min()/max() segfault. (Andrei) 2000-05-24 19:07:17 +00:00
Sascha Schumann c3bff72209 Add -traditional-cpp for Rhapsody and -D_BSD_TIMEOFDAY_FLAVOR for DG/UX.
Also fix the search path for sendmail.
2000-05-24 17:31:16 +00:00
Hartmut Holzgraefe f9d1b16d8b proto takeover from php3 2000-05-24 16:28:16 +00:00
Sascha Schumann 8a86e37d69 The behaviour for result == NULL || entry == NULL is undefined. 2000-05-24 14:46:13 +00:00
Sascha Schumann faf4f764b7 If no further directory exists, php_readdir_r() returns success and sets
*result to NULL.
2000-05-24 14:41:28 +00:00
Frank M. Kromann 3d939af4a3 Adding PHP_EXIF directive to actually include the functions 2000-05-24 11:35:09 +00:00
Frank M. Kromann 69a44fdae8 Updating workspace with the latest modules 2000-05-24 11:33:58 +00:00
Frank M. Kromann f9fc8f78ab Adding project for new exif module 2000-05-24 11:32:44 +00:00
Sascha Schumann a33c135b0a Add enable-threads flag for gcc on HPUX 2000-05-24 11:13:11 +00:00
Sascha Schumann 25df65b0b8 Support old-style readdir_r() 2000-05-24 11:06:57 +00:00
Sascha Schumann ff4031585a Avoid building two versions of the time-related reentrant functions. 2000-05-24 10:44:57 +00:00
Rasmus Lerdorf 3c61d015c2 @ New module for reading EXIF header data from JPEG files. Most digital
@ cameras will embed all sorts of information about a picture inside the
@ jpeg images it generates.  (Rasmus)
exif module
2000-05-24 10:33:18 +00:00
Thies C. Arntzen 9b916e6a48 rename hastable -> _hashtable to avoid clashes 2000-05-24 09:52:57 +00:00
Thies C. Arntzen 78a1fdfcaa add rdbuf() to our own istdiostream implementation, allowing C++ compile
using SUN and SGI native compilers. (by Jayakumar Muthukumarasamy <jk@kasenna.com>)
2000-05-24 09:44:02 +00:00
Rasmus Lerdorf 93feb306f8 @ Fix a couple of warnings in the gd and ldap modules
num_links is a long there
2000-05-24 08:58:40 +00:00
Thies C. Arntzen e3e75eb2da remove gremlin 2000-05-24 08:41:35 +00:00
Jouni Ahto ec93ec1fb1 Added PostgreSQL module info function. 2000-05-24 06:48:04 +00:00
Hartmut Holzgraefe e191baa1a3 php_basename() prototype changed according to latest changes in string.c 2000-05-24 05:51:33 +00:00
fd4e7282fe ChangeLog update 2000-05-24 01:09:17 +00:00
09d2f7e280 NEWS update 2000-05-24 01:09:14 +00:00
Sascha Schumann 0f54988877 Convert config.m4 to make use of the new build system features 2000-05-23 23:46:38 +00:00
Sascha Schumann d348a83a72 Make imap extension buildable as shared module. 2000-05-23 23:36:44 +00:00
Sascha Schumann 27ca66b410 Make recode extension buildable as shared module. 2000-05-23 23:30:38 +00:00
Sascha Schumann 21f77edba0 Make msql extension buildable as shared module. 2000-05-23 23:24:05 +00:00
Sascha Schumann 5df3ca812b Add INFORMIX_SHARED_LIBADD to LT_SHARED_LIBADD 2000-05-23 23:19:11 +00:00
Sascha Schumann 3563e0adba Make informix extension buildable as shared module on Unix. 2000-05-23 23:13:34 +00:00
Sascha Schumann f1eefa64ec A couple of cleanups and shared-libadd additions 2000-05-23 23:13:13 +00:00
Hartmut Holzgraefe df4547a3df another bunch of proto fixes 2000-05-23 23:13:02 +00:00
Hartmut Holzgraefe 0fa7618f7c proto function name fixed 2000-05-23 22:30:21 +00:00
Hartmut Holzgraefe 94cca68983 added a missing proto 2000-05-23 22:28:07 +00:00
Sascha Schumann cab5f6afb8 Make gettext extension compilable as shared module. 2000-05-23 22:26:51 +00:00
Hartmut Holzgraefe 9a8a9d774e even more protos were missing 2000-05-23 22:26:29 +00:00
Hartmut Holzgraefe 3d3d385d37 some protos where missing, took them from php3 2000-05-23 22:24:05 +00:00
Hartmut Holzgraefe 887c672a6c proto typo fix 2000-05-23 22:20:36 +00:00
Hartmut Holzgraefe 7a0855aeb5 some protos where missing proto keyword 2000-05-23 22:19:29 +00:00
Hartmut Holzgraefe 83d987b48d protos where lacking return types 2000-05-23 22:18:08 +00:00
Hartmut Holzgraefe e09b2d0df4 integratet protos from php3 version 2000-05-23 22:11:56 +00:00
Hartmut Holzgraefe 58acf7dbe1 some protos fixed
commented out yet not implemented function icap_popen() from functiontabe
2000-05-23 22:07:33 +00:00
Hartmut Holzgraefe 72c4912f58 some protos got to the wrong function - fixed 2000-05-23 21:56:30 +00:00
Sascha Schumann 773e306df2 Add check for Bison. A recent version is required when in ZTS mode. 2000-05-23 20:32:27 +00:00
Rasmus Lerdorf 7182e722ca Need a PHPAPI version of basename for some stuff I am working on.
Also fixed a bug along the way in the basename function.  If it
was fed something like "filename.ext/////" it would return the string
with all the slashes whereas if you fed it "/path/filename.ext////" it
would get it right.
@ Fixed basename() bug where "file.ext///" would not return the same
@ as "/path/file.ext///" (Rasmus)
2000-05-23 20:16:14 +00:00
Hartmut Holzgraefe ee82f87cbf one little unimportant detail (cut&paste is evil :) 2000-05-23 20:13:10 +00:00
Hartmut Holzgraefe 251cda4941 a little less optimized, but no dirty tricks anymore 2000-05-23 20:07:32 +00:00
Sascha Schumann 5d10b23a78 Make calc_levdist static and fix pointer swapping. 2000-05-23 19:27:02 +00:00
Zeev Suraski 1ea8d6afac - Update Windows project to include levensthein.c and update NEWS file 2000-05-23 17:45:05 +00:00
Sascha Schumann dec92a445f Add interesting email which explains why disabling -fPIC works on Linux
by Martin v. Loewis <martin@loewis.home.cs.tu-berlin.de>
2000-05-23 17:23:21 +00:00
Andi Gutmans 617266e33e - Virtual current working directory is now enabled
- Added support for mkdir()/rmdir() and more
2000-05-23 17:02:21 +00:00
Sascha Schumann 417f74451f Cosmetic changes 2000-05-23 15:43:29 +00:00
Sascha Schumann 112525ea9f Some systems don't have dirent.h. Wrap include appropiately. 2000-05-23 15:15:48 +00:00
Sascha Schumann 2aaa538aef Use reentrant version of readdir. If the target platform does not support
the POSIX-like readdir_r, we fall back to readdir. In ZTS mode, this will
cause php_readdir_r calls to be serialized.
2000-05-23 15:13:16 +00:00
Sascha Schumann be6afb3fcc Add POSIX-like readdir_r for Win32 2000-05-23 14:58:43 +00:00
Andi Gutmans 22dba603f5 - English fix. 2000-05-23 14:42:22 +00:00
Hartmut Holzgraefe 4571d8ddea name changed from levdist() to levenshtein()
(although i bet we'll get a    levenstein() alias some day)
2000-05-23 14:37:39 +00:00
Andi Gutmans 521f03c184 - Support virtual unlink() 2000-05-23 14:36:27 +00:00
Hartmut Holzgraefe 0eb51100b7 added function "int levdist(string str1, string str2)"
that will calculate the Levenshtein distance between two
strings (faster and possibly more accurate than similar_text())
2000-05-23 14:10:37 +00:00
Andrew Skalski 6d51f4a788 Changed the #ifdefs around "errno = ETIMEDOUT;" to include the rest
of the statement ["if (n == 0)"]
2000-05-23 13:56:04 +00:00
Andi Gutmans 32dffec0f8 - PHP_WIN32 macro should be used with #ifdef/#ifndef
- Always use PHP_WIN32 instead of WIN32/WINNT values
2000-05-23 13:49:55 +00:00
Sascha Schumann cd8c4268ec Revert recent COMPILE_DL change. 2000-05-23 13:46:16 +00:00
Andrei Zmievski 03851ced5f Clean up the patch by Hartmut. 2000-05-23 12:38:12 +00:00
Sterling Hughes ae0d73e87d 'char *' to 'char' 2000-05-23 12:14:20 +00:00
Frank M. Kromann c9158aec30 fixing type 2000-05-23 11:52:04 +00:00
Frank M. Kromann 34e74f8afe chang #if to #ifdef 2000-05-23 10:36:48 +00:00
Thies C. Arntzen cf1d0f1844 fixed newly introduced crash 2000-05-23 10:36:18 +00:00
Sascha Schumann 49b2166e1a Use new syntax 2000-05-23 10:26:35 +00:00
Sascha Schumann 99133bf4bb --with-foo causes $withval to be set to "yes," not "" 2000-05-23 10:21:40 +00:00
Thies C. Arntzen f51150584c even better check for netinet/in.h 2000-05-23 10:12:42 +00:00
Thies C. Arntzen 30b43665e8 make ftp compile on unix again 2000-05-23 10:11:09 +00:00
Sascha Schumann 3fdc316faf s/COMPILE_DL/COMPILE_DL_EXTNAME/ 2000-05-23 09:39:25 +00:00
Sascha Schumann 4686a3b50e Use #ifdef COMPILE_DL_EXTNAME solely. 2000-05-23 09:33:51 +00:00
Sascha Schumann 0236982d6d s/COMPILE_DL/COMPILE_DL_EXTNAME/ for Windows build files. 2000-05-23 09:22:01 +00:00
Sascha Schumann 2472700dd1 Only print the attention thing, if the MD5 and DES checks failed. 2000-05-23 09:09:11 +00:00
Frank M. Kromann 08bd9586fb making ftp module compile and work on win32 2000-05-23 08:05:22 +00:00
Thies C. Arntzen 61ceb9e5ab bump version to 4.0.1-dev 2000-05-23 07:49:23 +00:00
Jouni Ahto c32de173c3 According to current PostgreSQL docs, using PQoidStatus() is deprecated. 2000-05-23 06:03:34 +00:00
Hartmut Holzgraefe 78cec9f33e again (due to feature request in bug id #3251)
added optional 3rd parameter 'limit' to explode() as in split()
2000-05-23 05:04:28 +00:00
Sterling Hughes 39af86f017 @-Add the swf_ortho function. (Sterling) 2000-05-23 04:09:20 +00:00
d91068a88a ChangeLog update 2000-05-23 01:09:13 +00:00
f9bc6ac04e NEWS update 2000-05-23 01:09:10 +00:00
Hartmut Holzgraefe 1ec84f9c21 fix for bug #2852 : argc inconsistency 2000-05-22 23:24:55 +00:00
Hartmut Holzgraefe 22bfb799a7 -i, -v, -h and -? execution pathes didn't flush the output buffer
on exit, resultiong in no output at all when "output-buffering=On"
( BUG id#3420 )
2000-05-22 22:49:18 +00:00
Sascha Schumann 8a3edf2cab Add section about adding shared module support to an existing module. 2000-05-22 22:33:51 +00:00
Frank M. Kromann bd29009c31 oops forgot to save project before commit 2000-05-22 21:58:30 +00:00
Frank M. Kromann 7741269930 adding project for swf 2000-05-22 21:58:29 +00:00
Andrew Skalski 3ac4c96641 applied Luca Montecchiani's win32 fixes (open files in binary mode
using the "b" fopen flag, and use closesocket rather than close
when closing sockets)
2000-05-22 21:16:58 +00:00
Sterling Hughes 072755ca8d @-Allow the writing of flash files to stdout. 2000-05-22 20:56:09 +00:00
Sterling Hughes 6ba87f8cf6 Add SWF. 2000-05-22 20:50:10 +00:00
Hartmut Holzgraefe 398923de53 in [mt_]rand(): (see BUG #3353)
- additional range checking for (max-min)<=[MT_]RAND_MAX
- [mt_]rand(0,[mt_]getrandmax()) will now work without integer overflow
2000-05-22 20:37:26 +00:00
Jouni Ahto cde504ad27 # Guess I'll take it for now... there's actually even something coming, just
# waited for 4.0.0 to be released.
2000-05-22 20:26:36 +00:00
Zeev Suraski 8090fbb686 Sigh, that should be the last one :I 2000-05-22 16:56:22 +00:00
Zeev Suraski 0302ee5992 - Remove ugly Ltd. 2000-05-22 16:55:56 +00:00
Andi Gutmans 88de714c41 - Fix LICENSE (one language error and one URL error) 2000-05-22 16:46:37 +00:00
Zeev Suraski ccc12f8801 - Make calendar compile as a dll on Windows 2000-05-22 15:49:49 +00:00
Ben Mansell d0fd31018b Fixed check for Zeus under Solaris (/bin/sh doesn't understand '!') 2000-05-22 14:39:33 +00:00
Zeev Suraski 5e0dec4a40 Notify people that .phps is now fixed 2000-05-22 13:38:13 +00:00
c2588fd0bd ChangeLog update 2000-05-22 01:09:08 +00:00
Sterling Hughes 6ceddbb1d5 fix bug 4533 2000-05-21 23:15:09 +00:00
Jouni Ahto e80b2b13fa Fix #4230. Putenv() was modifying its argument, a no-no. 2000-05-21 21:13:32 +00:00
Sam Ruby c5cf13eb29 Windows build failure 2000-05-21 19:26:50 +00:00
Andi Gutmans 7f689fc044 - Move activate_models() back to where it was. I don't want to make such
- an optimization right before 4.0.0. Who knows, maybe one of the phpinfo()
- functions depends on some information only available after RINIT.
- In any case, my fix for .phps stays in.
2000-05-21 18:05:04 +00:00
Andi Gutmans a8b0d9609c - Fix Apache php source highlighting mode. It was crashing due to the
- module shutdown functions being called when the startup functions weren't
- being called.
2000-05-21 17:41:16 +00:00
Andi Gutmans dc5cd319e5 - Fix Apache php source highlighting mode. It was crashing due to the
- module shutdown functions being called when the startup functions weren't
- being called.
2000-05-21 16:36:16 +00:00
Andi Gutmans cc590f49f2 - Get ready for release 2000-05-21 16:29:38 +00:00
Sam Ruby 767ea7a7e4 use simpler foreach instead of while 2000-05-21 11:26:26 +00:00
Sam Ruby f365665213 passing Strings as Objects 2000-05-21 11:24:49 +00:00
Andreas Karajannis 11f4909068 Turn off retrieving the whole error stack 2000-05-21 08:46:51 +00:00
2936860d24 ChangeLog update 2000-05-21 01:09:15 +00:00
Hartmut Holzgraefe eb7979ab5b patch to explode (bug id #3251) suspended till 4.0.1 2000-05-20 05:07:53 +00:00
650008eea1 ChangeLog update 2000-05-20 01:09:11 +00:00
Sterling Hughes 8580374aa1 Proto fixes.
#Harmut -- I love your web site, I was able to see that these functions
#didn't have prototypes just by checking out the SWF extension area!
2000-05-20 00:13:05 +00:00
Hartmut Holzgraefe af77bc0583 added optional 3rd parameter 'limit' to explode() as in split()
(due to feature request in bug id #3251)
2000-05-19 22:00:38 +00:00
Zeev Suraski d1f9ac5bb9 Give some more room for configurability 2000-05-19 16:17:18 +00:00
Zeev Suraski fdb5ce845f be consistent with the URLs 2000-05-19 16:14:24 +00:00
Thies C. Arntzen 92437e9db1 fix the fix (it's still a hack) 2000-05-19 10:48:05 +00:00
Thies C. Arntzen bad35f5484 make sigchild handler more robust. 2000-05-19 10:40:34 +00:00
Zeev Suraski c80906e4cc Open these up for the API 2000-05-19 09:32:33 +00:00
Thies C. Arntzen 400ca09018 added some Notice about --enable-sigchild 2000-05-19 09:19:20 +00:00
Zeev Suraski 0f82e6de23 Minor output mods 2000-05-19 08:28:53 +00:00
7114e3f9a9 ChangeLog update 2000-05-19 01:09:12 +00:00
Thies C. Arntzen 674f4bac47 added new option "--enable-sigchild" (default is off)
when using this option php will setup it's own SIGCHLD handler.
when using oracle-libraries >= 8.1 on linux you need this option
if you are connecting using the BEQ interface - elsewise you will
see <defunc> processes whenever a php-script disconnects from oracle.
2000-05-18 19:45:34 +00:00
Thies C. Arntzen 9ebc920044 22 May is my birthday! 2000-05-18 18:50:44 +00:00
Zeev Suraski 7e0a18d014 Package 4.0.0 2000-05-18 17:43:19 +00:00
Zeev Suraski e043439ff6 Update the license with the new clause 6 2000-05-18 15:34:45 +00:00
Zeev Suraski 957327e8bc Do it in thread unsafe mode for now. 2000-05-18 14:51:19 +00:00
Sascha Schumann 33789f8cdf Later AOLserver releases will copy the include to the installation dir. 2000-05-18 13:10:13 +00:00
Andrei Zmievski c97760776b (PHP round) Fix proto. 2000-05-18 12:29:58 +00:00
Andrei Zmievski aa09d60d7d (PHP array_multisort) Fix the array_size test. 2000-05-18 12:29:45 +00:00
Sascha Schumann 86c03cceb0 Kill warnings 2000-05-18 12:07:15 +00:00
Sascha Schumann 1596e646fc Cosmetic change 2000-05-18 11:41:41 +00:00
Sascha Schumann f04936f8a1 Make the shared library suffix dynamic. Improve workaround for libtool's
inflexibility WRT -avoid-version to support various numbers of .0
2000-05-18 11:35:17 +00:00
Andi Gutmans a786fc4ab7 - Do this someplace else. 2000-05-18 11:25:03 +00:00
Sascha Schumann b458902704 Fix workaround for systems where libtool cannot handle -avoid-version
correctly.
2000-05-18 10:36:35 +00:00
Andi Gutmans 715ff77344 - Fix include() when used on resources (shouldn't work but shouldn't crash
either).
2000-05-18 10:21:24 +00:00
Uwe Steinmann 4099600941 - fixed bug #4076 2000-05-18 05:35:11 +00:00
Andrei Zmievski 3df1e68fe9 Update for sort functions - user can now specify sort type. 2000-05-18 01:53:41 +00:00
a5b03338f8 ChangeLog update 2000-05-18 01:09:11 +00:00
aeb3476923 NEWS update 2000-05-18 01:09:08 +00:00
Andrei Zmievski 87fbbfa692 Tough to explain in two lines. 2000-05-18 00:52:32 +00:00
Andrei Zmievski a859e83392 Update for sort functions - user can now specify sort type. 2000-05-18 00:47:57 +00:00
Sterling Hughes a8bb2a86b1 Make the SWF module compile again + 1 stylistic change. 2000-05-18 00:39:00 +00:00
Andi Gutmans 09915a1597 - Make non-threaded project build on Win32 2000-05-17 23:49:26 +00:00
Andi Gutmans a704be730c - Fix Win32 build 2000-05-17 23:42:18 +00:00
Hartmut Holzgraefe 1e438060af proto corrected 2000-05-17 19:50:22 +00:00
Egon Schmid 11acad981c Fixed the format. 2000-05-17 19:48:43 +00:00
Hartmut Holzgraefe 31c3dfdf52 proto-takeover from php3 2000-05-17 19:45:46 +00:00
Hartmut Holzgraefe d7779d8bdf proto takeover from php3 2000-05-17 19:42:08 +00:00
Hartmut Holzgraefe e5a2f0f95c proto-takeover from php3 2000-05-17 19:40:10 +00:00
Hartmut Holzgraefe 1e632ffdee typo fix 2000-05-17 19:36:51 +00:00
Hartmut Holzgraefe 5354940f93 correction 2000-05-17 19:27:08 +00:00
Andi Gutmans 3564810150 - Nuke dlist.[ch] from Win32 build. 2000-05-17 19:20:18 +00:00
Andi Gutmans f428c40ac2 - Remove dlist from build 2000-05-17 19:12:51 +00:00
Andi Gutmans 073bb3fdf8 - Remove dlist.[ch]. Should not be needed anymore 2000-05-17 19:11:43 +00:00
Sascha Schumann db3d16dca1 Add debug.log facility. If there are any obscure bugs in our build system,
this will give us enough information to find and fix it.
2000-05-17 19:08:44 +00:00
Hartmut Holzgraefe 6173835699 proto-takeover from php3 2000-05-17 18:58:27 +00:00
Andi Gutmans 0aefa3e037 - Add support for string_compare_function() and number_compare_function().
UNTESTED!
2000-05-17 18:55:22 +00:00
Egon Schmid 7dd8b901e6 Second parameter is optional. 2000-05-17 18:17:07 +00:00
Hartmut Holzgraefe 29571bf2b1 took over missing prototypes from php3 source
(copied them only, didn't check for parameter changes!)
2000-05-17 18:14:05 +00:00
Hartmut Holzgraefe 44845ea24b name in proto should be name of real function, not alias 2000-05-17 17:54:54 +00:00
Zeev Suraski 760a17729e Normalize results of compare_function() 2000-05-17 17:08:25 +00:00
Sascha Schumann 4a4d185637 Fix build against recent thttpd versions 2000-05-17 17:04:46 +00:00
Sascha Schumann f4e20147b5 . 2000-05-17 16:10:48 +00:00
Sascha Schumann f0ed744125 Fix 64-bit issue in gethostbyaddr(). 2000-05-17 16:08:42 +00:00
Zeev Suraski 5fcb963f09 Fix crash if %> is encountered in HTML while ASP-tags are disabled 2000-05-17 15:50:30 +00:00
Uwe Steinmann d20eec24ce - fixed wrong interpretation of last parameter of swf_rotate()
- add MOD_COLOR and MOD_MATRIX constants
2000-05-17 15:47:15 +00:00
Uwe Steinmann 7bde3adbd4 - test script to test creation of flash files 2000-05-17 15:45:56 +00:00
Zeev Suraski efb51322c1 Only allow loading of extensions only during .ini file parsing 2000-05-17 15:41:32 +00:00
Andi Gutmans 03c844305f Fix order 2000-05-17 15:24:49 +00:00
Andrei Zmievski e2e6363488 Let's cast it. 2000-05-17 12:51:37 +00:00
Andrei Zmievski 08ff225a46 @- Improved round() to allow specification of rounding precision.
@  (Andrei, Todd Kirby <kirbyt@yahoo.com>)
2000-05-17 12:50:04 +00:00
Zeev Suraski 6d77362190 Fix crash when server_context is not longer valid (e.g., when
coming from php_apache_request_shutdown)
2000-05-17 08:11:20 +00:00
8bff24d65b ChangeLog update 2000-05-17 01:09:09 +00:00
Sascha Schumann 8669a15755 Add missing prototype 2000-05-17 00:35:08 +00:00
Sascha Schumann 69223ccebd ANSIfy declarations/prototypes 2000-05-16 23:38:51 +00:00
Sascha Schumann c2279a0217 s/normal/SUSV2/ 2000-05-16 23:24:39 +00:00
Sascha Schumann 46e672243a Remove extra declarations of cwd_globals(_id) 2000-05-16 23:11:18 +00:00
Zeev Suraski ac0e07ecda - Small optimization. Filling up the Cache helps performance. 2000-05-16 15:42:16 +00:00
Andi Gutmans 0aa5f2ea3c - Reverse the patch until I have time to look at it. The global id should
be defined by ZEND_DECLARE_GLOBALS(cwd)
2000-05-16 14:59:30 +00:00
Andi Gutmans 4e6e741af8 - Commit Sascha's patch to the virtual_cwd code. Will test it on Windows
soon.
2000-05-16 14:47:55 +00:00
Sascha Schumann ccc2b1b8ce Fix PHP_EXTENSION argument
PR: #4458
2000-05-16 08:21:10 +00:00
Uwe Steinmann 31be486539 - fixed prototype 2000-05-16 07:54:10 +00:00
f615ec59cb ChangeLog update 2000-05-16 01:09:13 +00:00
7f008ae327 NEWS update 2000-05-16 01:09:10 +00:00
Sascha Schumann c20fb0c22d Fix pointer to FAQ entry.
PR: #4451
2000-05-15 17:13:03 +00:00
Sascha Schumann f1941064de Fix wording (not "to apxs", but "of apxs"). 2000-05-15 16:43:44 +00:00
Sascha Schumann 13e9da59ff Complain loudly and stop configuration, if we cannot run apxs. 2000-05-15 16:37:32 +00:00
Sascha Schumann 8ab33a4d13 Use "mkdir -p" instead of "test -d || mkdir" where possible 2000-05-15 16:02:43 +00:00
Sascha Schumann 521e1d218c Cosmetic changes 2000-05-15 14:40:20 +00:00
Sascha Schumann 6baa5bc2dc Complain, if write(2) failed. 2000-05-15 13:50:39 +00:00
Andrei Zmievski fe24b820be @- NULL values are now preserved in the return value of mysql_fetch_array()
@  and mysql_fetch_object(). (Andrei)
2000-05-15 13:46:37 +00:00
Ben Mansell 10503a3b92 Define PHP_SELF properly with Zeus+ISAPI 2000-05-15 12:40:12 +00:00
Thies C. Arntzen 2a6fbb620c fix .sl <-> .so recognition 2000-05-15 10:01:51 +00:00
Sascha Schumann 4a658e8b51 Drop slower strchr in favor of memchr. 2000-05-15 09:55:03 +00:00
Thies C. Arntzen c693ca137f this now works on .so and .sl (HP) systems 2000-05-15 07:24:09 +00:00
e2e7283a30 ChangeLog update 2000-05-15 01:09:45 +00:00
ae827bae28 NEWS update 2000-05-15 01:09:42 +00:00
Jouni Ahto ce42de535a # I think it's safe say so now...
@- InterBase module finally ported from PHP3 to PHP4. Full support for
@  InterBase 6. (Jouni)
2000-05-14 23:38:32 +00:00
Jouni Ahto 08838fe79a Default to the highest SQL version supported by libs.
Fixed associative array values returned by ibase_field_info.
Fixed compatibility problems with old versions of InterBase.
2000-05-14 21:55:45 +00:00
Sterling Hughes ed2933342c @-Add swf_definepoly for drawing polygons to the SWF functions. (Sterling) 2000-05-14 18:39:11 +00:00
Zeev Suraski 7fc980e1fa Please maintain consistency in these names... :) 2000-05-14 16:09:32 +00:00
Zeev Suraski fb20aee667 - Fix a crash bug in case output is generated in the Apache module while
in request_shutdown
2000-05-14 16:05:25 +00:00
Sterling Hughes 69ddfd0acb @-Port imagegammacorrect from PHP3 to PHP4. (Sterling)
#Also two little stylistic changes in gd.c
2000-05-14 15:25:13 +00:00
1dd49bd4d6 ChangeLog update 2000-05-14 01:09:19 +00:00
Sam Ruby c82eca90f4 Fix typo - thanks to Christian Wenz <christian.wenz@stud.tu-muenchen.de> 2000-05-13 15:26:28 +00:00
Sascha Schumann 654b75694a Do not use non-standard type u_int32_t.
Instead, use UINT4 for now which is platform-independent.

PR: #4262
2000-05-13 09:36:33 +00:00
Sascha Schumann dc6d46c180 "INT" configuration values must be of type long 2000-05-13 06:05:24 +00:00
602914d824 ChangeLog update 2000-05-13 01:09:14 +00:00
Sterling Hughes 7342fc7a28 Add Meself for LibSWF. 2000-05-12 20:49:26 +00:00
Jouni Ahto 7894d58ae5 # Correct spelling, adding Andrew because half the code in that module is
# his, removing myself from Informix because I don't think my influence to
# that module was big enough worth mentioning, adding myself to GD because
# I think T1lib is worth mentioning. BTW, who wrote the TTF extension? I think
# he is missing credits here.
2000-05-12 20:11:14 +00:00
Andrei Zmievski 74011b6767 Testing. 2000-05-12 13:55:51 +00:00
Andrei Zmievski dee6170da3 test 2000-05-12 12:49:20 +00:00
Andrei Zmievski ffef0d8d44 Another test. 2000-05-12 12:45:28 +00:00
Andrei Zmievski b0f87cdb5f Testing. 2000-05-12 12:44:08 +00:00
Andrei Zmievski 3f65342eb2 test 2000-05-12 12:29:59 +00:00
Sam Ruby 33ceae2809 i18n, part I 2000-05-12 09:51:16 +00:00
Sascha Schumann afedd22f19 Fix parallel makes on BSD 2000-05-12 09:05:05 +00:00
Jouni Ahto 4132ec828d Changed ibase_num_fields to use high-performance api (which fixed a *very*
obscure bug).
2000-05-12 08:37:03 +00:00
Sascha Schumann 23dfe91b60 Remove directory test when creating directories using mkdir -p 2000-05-12 07:37:42 +00:00
Sascha Schumann f3ac213120 Upgrade shtool to 1.4.9 and fix "mkdir -p" behaviour. Patch has been
sent to the author of shtool.
2000-05-12 07:33:55 +00:00
Jouni Ahto fc5daee434 Fixed all (?) remaining issues with InterBase 6 datatypes, especially
with timestamp, date and time.
Incombatible change: renamed constant IBASE_TIMESTAMP to IBASE_UNIXTIME.
Incompatible change: renamed configuration directive ibase.timeformat
to ibase.timestampformat.
Added constants IBASE_TIMESTAMP, IBASE_DATE, IBASE_TIME.
Added configuration directives ibase.dateformat and ibase.timeformat.
ibase_timefmt() now takes an optional second argument specifying which
format to change, default is IBASE_TIMESTAMP (for even a little backwards
compatibility).
2000-05-12 03:02:14 +00:00
f626eb4986 ChangeLog update 2000-05-12 01:09:10 +00:00
Jouni Ahto 59ddaefd72 SQL_INT64 binding support in prepared and executed queries.
Fixed a (probably) longtime bug with binding to DECIMAL/NUMERIC stored as
scaled integer.
# Be lazy on documentation, then nobody ever uses the features there are,
# and you never get caught for bugs...
2000-05-11 19:38:02 +00:00
Zeev Suraski 0d6a794d85 Get rid of chval - it's really not necessary and seems to be confusing people 2000-05-11 19:18:11 +00:00
Zeev Suraski 9a751419cf Refined fix 2000-05-11 18:49:45 +00:00
Zeev Suraski cb35b7e4ed Fix a memory corruption bug with by-ref function arguments 2000-05-11 18:31:21 +00:00
Andreas Karajannis 07f7b8c1e3 Prototype adapted 2000-05-11 16:25:58 +00:00
Andreas Karajannis 010f7850e0 Restoring old parameter ordering in odbc_fetch_into() 2000-05-11 16:24:03 +00:00
Andi Gutmans c88ccc49a1 - Remove unneeded object_init(return_value) from three places 2000-05-11 13:52:24 +00:00
Andrei Zmievski 3f43d41ba6 Typo. 2000-05-11 13:00:48 +00:00
Egon Schmid 7a3e2ee70a Fixed some typos. 2000-05-11 12:10:53 +00:00
Andreas Karajannis f4357f3254 Forcing passing by reference for array in odbc_fetch_into()
Added function odbc_column_scale(), new alias odbc_column_precision for odbc_column_len
Added better description in Prototypes for some functions
2000-05-11 11:46:06 +00:00
Sam Ruby c32bba9644 build error on Unix 2000-05-11 10:39:28 +00:00
3ba2d1bf88 ChangeLog update 2000-05-11 01:09:14 +00:00
Danny Heijl 7d5e93ac57 - fix for SQLLVARCHAR provided by Alan Shepherd. (Danny) 2000-05-10 18:56:42 +00:00
Andrei Zmievski fa89a5f940 Move to past RC2. 2000-05-10 13:36:57 +00:00
Chuck Hagenbuch fe22dc5ff8 fix for segfault. patch from Jade Nicoletti <nicoletti@nns.ch>. 2000-05-10 12:44:44 +00:00
Andi Gutmans 33f8ab3800 - Bump up Zend extension version number 2000-05-10 12:28:13 +00:00
Thies C. Arntzen 354272315a make waning readable 2000-05-10 09:40:46 +00:00
Sascha Schumann ee3c06a533 Fix register_argc_argv entry.
Submitted by: André Langhorst <A.Langhorst@itbnet.de>
2000-05-10 09:31:53 +00:00
Thies C. Arntzen ab6d34d8ba revert last patch - you can only specify the dl() path relative to extension_dir
again
2000-05-10 07:32:51 +00:00
72fcf1310a ChangeLog update 2000-05-10 01:09:14 +00:00
3dd91d548e NEWS update 2000-05-10 01:09:11 +00:00
Jouni Ahto b826d6a43d Support (partially) the new datatypes in InterBase 6. 2000-05-09 20:30:23 +00:00
Andrei Zmievski fdbea075fa @- Added array_rand() function. (Andrei) 2000-05-09 19:27:00 +00:00
Andi Gutmans 30da5fd8fc Thoroughly initialize IS_UNUSED for proper cleanup 2000-05-08 21:46:48 +00:00
Andi Gutmans 63b7056f9a - Change Zend Engine version number 2000-05-08 16:33:52 +00:00
Andi Gutmans a9ec11476c - Return real size allocated 2000-05-08 16:18:20 +00:00
Zeev Suraski 19de3be052 Make zend_binary_strcasecmp compile again 2000-05-08 10:24:26 +00:00
Thies C. Arntzen cd72153455 config.m4 redone - now supports building oracle extension as shared module
# i really hope i didn't break linking agains ancient oracle-versions!
2000-05-08 10:10:00 +00:00
Sascha Schumann 36c1a9a39d Make strcasecmp() act correctly WRT SUS II.
Patch by: hholzgra@php.net
PR: #3556
2000-05-08 10:05:19 +00:00
Thies C. Arntzen 9930bab2a6 oracle.c expects _ORACLE_ 2000-05-08 10:04:12 +00:00
Thies C. Arntzen 7436c0791b imporved version detection 2000-05-08 09:41:37 +00:00
Thies C. Arntzen aaaaf46846 oracle/oci8 no longer share the compile-time infos 2000-05-08 09:20:23 +00:00
Thies C. Arntzen 831459885e rewritten the configure stuff 2000-05-08 09:06:48 +00:00
Thies C. Arntzen 62d5504706 AC_ADD_LIBRARY_WITH_PATH now always prepends new libraries. 2000-05-08 08:55:45 +00:00
Thies C. Arntzen 3ee9304cd9 support empty libpath in AC_ADD_LIBRARY_WITH_PATH
make sure the link-order for shared and static builds are the same
2000-05-08 08:27:48 +00:00
Thies C. Arntzen b8f9b48098 (php_dl) treat path as absolute if it starts with '/' 2000-05-08 08:12:28 +00:00
9377ed98dd ChangeLog update 2000-05-08 01:09:15 +00:00
jim winstead 7713553d85 another minor change to test CVS mails again 2000-05-07 18:35:41 +00:00
Sascha Schumann b345acb577 Never tell link editor to libc. Some systems use thread-safe
replacements for libc in Pthreads mode.
2000-05-07 05:32:54 +00:00
Sascha Schumann 873df0ae89 Libtool creates libphp4.so.0.0 on at least AIX and FreeBSD 2.2.
This hack will catch the resulting shared library anyway.

The Right Way to approach this is to fix libtool to properly
handle -module on all platforms.
2000-05-07 04:42:04 +00:00
Sascha Schumann fa254b6267 executor_globals is always passed to MINIT functions 2000-05-07 03:20:37 +00:00
Sascha Schumann 6953135774 s/localtime_r/php_localtime_r/ 2000-05-07 02:38:05 +00:00
b81cc1daf4 ChangeLog update 2000-05-07 01:09:13 +00:00
Sascha Schumann 679bcde68b Avoid relying on non-standard tar `z' option.
Turn on best compression for creating the archive.
2000-05-07 00:18:06 +00:00
Sascha Schumann 2df8e7341e Move <syslog.h> inclusion into php_syslog.h. This will make sure that
all source files "get it."
2000-05-07 00:10:32 +00:00
Sascha Schumann ec9612aa44 This change addresses an issue on systems which cannot link against libnsl
and libsocket, resulting in segfaults. If yp_get_default_domain is
available after checking for libsocket, we assume we do not need libnsl
anymore.
2000-05-06 23:26:41 +00:00
Sascha Schumann 54fa1a77d7 On some systems, <syslog.h> defines syslog to another symbol, so that
syslog.lo does not contain the expected symbols. Including <symbol.h>
in basic_functions.c fixes the resulting linking problem.
2000-05-06 23:17:11 +00:00
Shane Caraveo df81aba99f add nsapi to workspace 2000-05-06 23:06:47 +00:00
Shane Caraveo c4e2c84fa2 news 2000-05-06 23:06:22 +00:00
Shane Caraveo fdb62f9ce7 nsapi now compiles under win32, untested 2000-05-06 23:05:29 +00:00
Andi Gutmans dc704e26fe - Make zend_eval_string() return SUCCESS/FAILURE 2000-05-06 18:49:46 +00:00
Andi Gutmans 686bd5724b - Make $obj->test = 5; work again (assigning to uninitialized objects) 2000-05-06 18:40:48 +00:00
Shane Caraveo 166c703eb7 add apache module to workspace 2000-05-06 18:23:28 +00:00
Shane Caraveo 0e67838ecf some news 2000-05-06 18:22:42 +00:00
Andrei Zmievski f78f340288 Some breaking news for RC2. 2000-05-06 18:01:45 +00:00
Andrei Zmievski 8154734529 It helps to change the comment too. 2000-05-06 17:59:58 +00:00
Shane Caraveo 5797876236 oh boy! apache-win32 works! 2000-05-06 17:59:34 +00:00
Andrei Zmievski 498ce88d67 Enable assert by default, 2000-05-06 17:59:10 +00:00
Andrei Zmievski 0060f95699 Fixes for possible failure of zend_eval_string(). 2000-05-06 17:57:34 +00:00
Sascha Schumann 4b87dccefc Fix dbase breakage related to the virtual path changes. 2000-05-06 03:15:41 +00:00
Sascha Schumann 17b84ad7e7 Planning for 4.0RC2 on Monday 2000-05-06 01:48:35 +00:00
Sascha Schumann fbfd92c775 Fix regex 2000-05-06 01:41:14 +00:00
661758348c ChangeLog update 2000-05-06 01:09:10 +00:00
Andrei Zmievski 06358248a4 Testing. 2000-05-05 14:07:52 +00:00
Sascha Schumann 788feca4ae Linking directly against libc might result in unexpected behaviour.
We check for dlopen in libdl first, and check then whether dlopen exists.
2000-05-05 12:17:41 +00:00
Sascha Schumann 86d6389db4 Assign/restore vars appropiately 2000-05-05 12:15:36 +00:00
Sascha Schumann 30f6031bfa Fix a bug introduced when the SAPI checks were moved.
INCLUDES were overwritten, so i.e. APXS builds failed.
2000-05-05 11:39:41 +00:00
Sascha Schumann f51b56cfed Move dlopen in -ldl check to configure.in. This should ensure that if libdl
exists, it will be always found. We define HAVE_LIBDL now always, if the
function dlopen is found.
2000-05-05 11:23:12 +00:00
Sascha Schumann 8570e0e3ba Put in a hack, so that users can compile PHP, even if the configure-time
checks failed to detect the capabilities of crypt().
2000-05-05 10:36:00 +00:00
Andi Gutmans 0d194ec80b - Fix problem with sapi_globals being used before it is initialized. 2000-05-05 07:21:48 +00:00
Andi Gutmans 198537b70f - Make Windows compile again. 2000-05-05 07:18:50 +00:00
5db0f958c4 ChangeLog update 2000-05-05 01:09:15 +00:00
e2dc9f3bc9 NEWS update 2000-05-05 01:09:12 +00:00
Andrei Zmievski 89d4eedaf9 testing 2000-05-05 00:16:41 +00:00
Andrei Zmievski d8f2900589 Updates for changed WDDX API. 2000-05-04 20:29:36 +00:00
Andrei Zmievski 0a09f95dd7 Got rid of infinite recursion when serializing $GLOBALS[].
@- Fixed infinite recursion when serializing $GLOBALS[] in WDDX. (Andrei)
2000-05-04 20:28:21 +00:00
Andrei Zmievski 494ed67194 Done. 2000-05-04 20:04:38 +00:00
Andrei Zmievski 2b26bb5086 . Reworked string serialization
. <, >, and & in strings are now properly escaped
. Removed a lot of unnecessary calls to strlen()

@- Made WDDX serialization properly escape <, >, and &. Also speeded up
@  the serialization in general. (Andrei)
2000-05-04 20:00:07 +00:00
Sascha Schumann cc7a71592c Generate missing files 2000-05-04 18:00:10 +00:00
Andrei Zmievski ec6c171fdd Typo. 2000-05-04 17:52:14 +00:00
Sascha Schumann 24abc76a93 `.deps' are sourced only by Makefiles created by fastgen.sh, so it makes
sense to create empty .deps there.
2000-05-04 17:50:32 +00:00
Sascha Schumann 61b88ae8ed Don't distribute ChangeLog. You can download it from lxr.php.net 2000-05-04 17:49:10 +00:00
Sascha Schumann dc91d47014 Remove trailing slash(es) from pathnames 2000-05-04 16:08:10 +00:00
Andrei Zmievski 72805c7d9b Some formatting. 2000-05-04 13:45:51 +00:00
Jouni Ahto aef06da015 Fix (?) #4314. 2000-05-04 13:43:06 +00:00
Zeev Suraski 0b33ac7627 - Add -z and -g switches to the CGI 2000-05-04 13:42:21 +00:00
Jouni Ahto 4802fbb8b8 If using a persistent connection, check if it's still there and reopen if
needed.
2000-05-04 12:28:00 +00:00
Sascha Schumann a88946c70d Install extensions in different directories, so that users can have
various PHP installations with different parameters.
2000-05-04 11:57:59 +00:00
Sascha Schumann e905fabe0d s/strtok_r/php_strtok_r/ 2000-05-04 11:36:33 +00:00
Sascha Schumann f2a236ff83 Missed localtime_r/ctime_r. Prefix them with php 2000-05-04 11:31:58 +00:00
Sascha Schumann 6c4d6ba5e3 Don't automatically assign pthreads_cflags/pthreads_libs to env
variables. That allows us to check for the availability of POSIX threads
before actually using it.
2000-05-04 10:49:36 +00:00
Sascha Schumann d0f3764ee2 Change reentrancy API to always use the php prefix.
Check for the declaration of reentrant functions, so that we can use
them in non-ZTS mode on all platforms.
2000-05-04 10:38:17 +00:00
Sascha Schumann b6e4841ec7 Determine first whether we will use ZTS mode or not.
This is important, because the system checks will yield different
results depending on whether POSIX threads are enabled or not.

We also use PTHREADS_CFLAGS only in ZTS mode now. Using these flags
in non-ZTS mode causes complete build failures on some platforms
(i.e. FreeBSD 2.2.x). This will cause harmless warnings on some
platforms (i.e. Solaris 2).
2000-05-04 09:42:27 +00:00
Shane Caraveo cad04f5579 more apachewin32 work. much better now, but still crashing in zend_execute. At least it's getting the file open now though. 2000-05-04 03:28:34 +00:00
a85e57ebc3 ChangeLog update 2000-05-04 01:09:13 +00:00
948edc9caf NEWS update 2000-05-04 01:09:09 +00:00
Thies C. Arntzen dedc130786 . 2000-05-04 01:01:38 +00:00
Thies C. Arntzen da7a5fc29d have to work now - maybe iÄll do it tonight 2000-05-04 00:53:39 +00:00
Andi Gutmans 69eb908f06 - Change fetch_type to be zend_uint 2000-05-03 18:01:35 +00:00
Andi Gutmans f2471fd50a - Change the place CAST uses for the op_type 2000-05-03 17:56:44 +00:00
Andrei Zmievski 599813d73a Let's enable assert by default since it's so useful. 2000-05-03 14:24:14 +00:00
Joey Smith 884a614e67 Add fact that every entry in NEWS has to have a name after it 2000-05-03 13:33:48 +00:00
Joey Smith 5df40a8a1d Sascha pointed me in the right direction. 2000-05-03 13:28:57 +00:00
Andrei Zmievski 8d0c626fe6 We want to have name at the very end. 2000-05-03 11:58:54 +00:00
Sam Ruby 6fb3301416 Correct build breakage - win32 2000-05-03 11:26:29 +00:00
Joey Smith 80d6eccf6e Moving README-BCMATH to README.BCMATH 2000-05-03 04:57:11 +00:00
Joey Smith 0022a2f81a I am going to move README-BCMATH to README.BCMATH for consistency. 2000-05-03 04:55:19 +00:00
Joey Smith 69a894a2f0 Changed install-local to install-sapi for clarity.
@ Moved install-local to install-sapi for clarity. (Joey)
2000-05-03 04:51:11 +00:00
Joey Smith 5ad95a203c Shut up CVS and make cvsclean wipe this file out... 2000-05-03 04:48:01 +00:00
eefc66419c ChangeLog update 2000-05-03 01:09:10 +00:00
Sascha Schumann 9f6976d6d5 Complain loudly, if we were not able to install everything. 2000-05-02 22:28:12 +00:00
Sterling Hughes 515b7e74df adda dir.. 2000-05-02 22:10:41 +00:00
Sascha Schumann bf58db4bc2 Verbose "give the reader a quick success" tutorial 2000-05-02 21:51:48 +00:00
Sascha Schumann 79a89ef8fe Make bcmath buildable as shared module 2000-05-02 21:35:08 +00:00
Sascha Schumann 281a8aebda . 2000-05-02 21:26:50 +00:00
Sascha Schumann 3b9bcd7443 Set abs_srcdir. Last example in README.S-C-EXTENSIONS works now. 2000-05-02 21:20:56 +00:00
Sascha Schumann 6bc1bf4c93 Make MySQL independent of build location 2000-05-02 21:18:59 +00:00
Sterling Hughes df3d78cbac Add a ; for Sybase 2000-05-02 21:00:09 +00:00
Sascha Schumann dd497bdc1a First try at explaining how to create a self-contained extension 2000-05-02 20:59:46 +00:00
Sascha Schumann cae3b7dff5 Pear Changes:
Store EXTENSION_DIR in php-config

  Ignore errors during header installation

  Automatically enable modules in self-contained mode

  Create empty .deps in builddir
2000-05-02 20:56:03 +00:00
Sascha Schumann 5989ae5dc1 Fix building external extensions. 2000-05-02 20:10:46 +00:00
Sascha Schumann 733d94909f Move install-modules target into top-level Makefile template 2000-05-02 20:08:54 +00:00
Andi Gutmans 52288d4f05 - Shouldn't be needed. The configuration mechanism makes sure this is
- up-to-date
2000-05-02 18:46:19 +00:00
Zeev Suraski 8ca13c97c2 Change zend_hash_get_current_key_ex() to also return the string length 2000-05-02 17:52:31 +00:00
Andrei Zmievski f5520fd465 Fix attribution. 2000-05-02 15:27:04 +00:00
Sascha Schumann fca9539d63 Preset extension_dir to the installation directory of PHP modules.
This effectively means that dl() will work without having an installed
configuration file.
2000-05-02 14:46:20 +00:00
Sascha Schumann 8eb698a847 Make php_dl() respect the configured extension_dir setting. 2000-05-02 14:44:08 +00:00
Hartmut Holzgraefe 19ea1a0bc9 calling a function that is not supported in the current build due to a
missing library or unsupported feature (especially GIF-Output)
will now give a slightly more usefull error message than eg.
" Call to undefined function:  imagegif()"
(this seemed to confuse a lot of users ....)
2000-05-02 14:10:51 +00:00
Ben Mansell ce86302f8a Updated build advice for different platforms 2000-05-02 08:25:24 +00:00
Sascha Schumann 99e2820bed Fix segfault occuring when a temporary module was unloaded and if this
module did not have a request shutdown function.
2000-05-02 07:04:59 +00:00
Sascha Schumann a931caf2b2 Protect everything which requires <libpq-fe.h> with PHP_PGSQL_PRIVATE 2000-05-02 05:27:35 +00:00
Sascha Schumann f6a7542f73 Include php_virtual_cwd.h for V_OPEN 2000-05-02 05:16:20 +00:00
Sascha Schumann 6767b4df68 Make filepro compilable as shared module 2000-05-02 04:32:50 +00:00
Sascha Schumann b2e90b4e8b Make dbase compilable as shared module 2000-05-02 04:32:33 +00:00
Sascha Schumann 645b2736a3 Make sybase compilable as shared module 2000-05-02 04:27:03 +00:00
Sascha Schumann 92c87b1ba9 Make readline compilable as shared module 2000-05-02 04:26:48 +00:00
Sascha Schumann dca0d3f454 Make interbase compilable as shared module 2000-05-02 04:26:22 +00:00
Sascha Schumann 82c5c690c9 Use the new AC_ADD_LIBRARY_WITH_PATH option shared-libadd 2000-05-02 04:01:15 +00:00
Sascha Schumann f1dfd1f5f7 Make mcal buildable as shared module 2000-05-02 04:00:47 +00:00
Sascha Schumann 0b516602fd Add shared-libadd option to AC_ADD_LIBRARY_WITH_PATH.
This lets you replace

  if test "$ext_shared" = "yes"; then
    FOO_SHARED_LIBADD="-R$LIBDIR -L$LIBDIR -l$LIB"
  else
    AC_ADD_LIBRARY_WITH_PATH($LIB, $LIBDIR)
  fi

with

  AC_ADD_LIBRARY_WITH_PATH($LIB, $LIBDIR, FOO_SHARED_LIBADD)
2000-05-02 04:00:14 +00:00
Sascha Schumann c3d4066b48 Make dba compilable as shared module 2000-05-02 03:38:26 +00:00
Sascha Schumann cf4863788e Make mhash builable as shared module 2000-05-02 03:29:45 +00:00
Sascha Schumann 3e80436fb8 Make mcrypt buildable as shared module 2000-05-02 03:29:28 +00:00
Sascha Schumann dbf959d04d Make ftp buildable as shared module 2000-05-02 02:02:18 +00:00
Sascha Schumann 4f5717d0a0 Make calendar buildable as shared module 2000-05-02 02:02:05 +00:00
Sascha Schumann 095e13632c Make icap buildable as shared module 2000-05-02 02:01:13 +00:00
Sascha Schumann a4d401a67d Make sysvshm buildable as shared module 2000-05-02 02:00:51 +00:00
Sascha Schumann 8d2d181e69 Make sysvsem buildable as shared module 2000-05-02 02:00:36 +00:00
Sascha Schumann 0b6d923bae Add ZEND_GET_MODULE(name). This is a short-cut for the common
get_module function.
2000-05-02 01:33:18 +00:00
Sascha Schumann f8f7dcf0cf Make yp buildable as shared module 2000-05-02 01:21:28 +00:00
Sascha Schumann d4def2d2a3 Make zlib buildable as shared module 2000-05-02 01:15:10 +00:00
b45ee4b1ed ChangeLog update 2000-05-02 01:09:22 +00:00
ec70bc274f NEWS update 2000-05-02 01:09:19 +00:00
Sascha Schumann fe50664d4d #if COMPILE_DL
becomes

    #if defined(COMPILE_DL) || defined(COMPILE_DL_EXTENSION_NAME)
2000-05-02 00:44:35 +00:00
Sascha Schumann 0d383d9373 Replace the various get_module() functions with a uniform
ZEND_GET_MODULE(name) macro.
2000-05-02 00:30:36 +00:00
Sterling Hughes 95310ad5e0 Make swf_nextid() return a value. 2000-05-02 00:24:18 +00:00
Sascha Schumann 7613e064f8 Remove trailing empty lines 2000-05-01 22:38:42 +00:00
Sascha Schumann 7a2d83acdc Source file does not end with a newline. Some old compilers don't like that. 2000-05-01 22:36:10 +00:00
Rasmus Lerdorf 0628b33278 Never mind on the error check 2000-05-01 22:14:54 +00:00
Sascha Schumann 0d36199cf9 Large test commit IV 2000-05-01 22:04:52 +00:00
Sascha Schumann de2cea47c0 Large commit test III 2000-05-01 22:00:09 +00:00
Sascha Schumann a493cdc92c Large test commit II 2000-05-01 21:57:01 +00:00
Sascha Schumann fc4b7bac9c Large test commit I 2000-05-01 21:55:45 +00:00
Sascha Schumann 358bdc8832 Make posix module buildable as shared module 2000-05-01 21:36:52 +00:00
Sascha Schumann 1e3d94b70b Revamp config stuff 2000-05-01 21:32:26 +00:00
Sascha Schumann 15c8fa99fb . 2000-05-01 21:10:08 +00:00
Rasmus Lerdorf 83f567abf3 Dynamically allocate points for ImagePolygon (Marc Pohl)
@Dynamically allocate points for ImagePolygon (Marc Pohl)
2000-05-01 18:56:58 +00:00
Sascha Schumann 113b87736b Use GCC's --print-libgcc-file-name flag to find libgcc's path.
Obtained from: mod_ssl
2000-05-01 18:32:09 +00:00
Andrei Zmievski 5da6bf51a4 It's nice to keep them alphabetized. 2000-05-01 17:58:39 +00:00
Andrei Zmievski 0825ae458d Nother entry. 2000-05-01 16:39:05 +00:00
Andrei Zmievski 164e4e50b9 Added a way to get all declared classes. 2000-05-01 16:22:00 +00:00
Andrei Zmievski e20cdc315e New function. 2000-05-01 15:19:17 +00:00
Andrei Zmievski 660fcd93e0 Fix attribution. 2000-05-01 12:15:29 +00:00
Sascha Schumann 1743bb0346 Fix dependency 2000-05-01 05:46:02 +00:00
Frank M. Kromann b19376c6f5 oops wrong settings commited in project. 2000-05-01 05:42:33 +00:00
Frank M. Kromann dd537aaaa6 adding calendar project 2000-05-01 05:41:38 +00:00
Joey Smith 564f9795f8 Small fix: Description still referred to package as PHP3. 2000-05-01 04:49:49 +00:00
Sascha Schumann 632b054aba Remove white-space, breaks UnixWare make 2000-05-01 04:41:16 +00:00
Joey Smith b2266104b1 Forgot to mention: Added configure time checking for bcmath package. (Thanks, Sascha!)
@ Added configure time checking for bcmath package
2000-05-01 04:02:43 +00:00
Joey Smith c07dcd1b8d There was already a perfectly good README-BCMATH, I just found the different naming confusing. 2000-05-01 03:59:55 +00:00
Joey Smith b64e872e84 Shut up CVS 2000-05-01 03:44:24 +00:00
Sascha Schumann c801cfb879 php_reentrancy.h is needed for strtok_r 2000-05-01 03:43:07 +00:00
Sascha Schumann ea90eab146 Ignore standard files 2000-05-01 03:27:11 +00:00
Sascha Schumann 9595fb76f3 Rebuild xml, if libexpat changed. 2000-05-01 03:10:01 +00:00
Sascha Schumann 52b1e3482d Link expat into static and shared module. 2000-05-01 02:58:26 +00:00
Sascha Schumann 1d4e698aca Copy dynlib.mk to the build directory. 2000-05-01 02:57:50 +00:00
Sascha Schumann e2905f1b5c Get rid of old cruft. Broke build on Irix. 2000-05-01 02:57:24 +00:00
Sascha Schumann a481fddfb3 Improved in-tree shared libraries build system
The following new/revived shared modules are available now:

  ... MySQL (*)
  ... PCRE (*)
  ... Session
  ... SWF

  (*) capable of using bundled library or external library

All changes:

  The m4 macro PHP_EXTENSION was revamped. Uses LIB_BUILD now.
  This effectively means that all extensions have to use dynlib.

  ext/mysql/config.m4 was revamped.
  Uses LIB_BUILD for building bundled library.

  ext/pcre/config.m4 was revamped.
  Uses LIB_BUILD for building bundled library.

  ext/ext_skel was changed to reflect that more modules should be
  compileable as shared module.

  ext/Makefile.in has been simplified enormously.

  Dependencies are now stored in the build tree.

  Empty dependencies are not generated by buildconf anymore. They
  are now dynamically created during the build process.

  Implicit rules for .S were removed.

  The NO_RECURSION feature was removed.

  "libs.mk" has been added to all cvsignore files in ext.
2000-05-01 02:42:55 +00:00
ce38236221 ChangeLog update 2000-05-01 01:09:14 +00:00
b05bd34af5 NEWS update 2000-05-01 01:09:11 +00:00
Sterling Hughes 5c8abc75af Added info about the swf module
# Is this how should the entry should be?
2000-05-01 00:58:19 +00:00
Sterling Hughes 1191f6bf7c Allow the SWF module to compile as a dl. 2000-04-30 23:57:20 +00:00
Sterling Hughes b93e5ecbe0 Proto's and the such. 2000-04-30 23:42:33 +00:00
Sascha Schumann ca4147055a Ignore standard files 2000-04-30 20:03:26 +00:00
Andi Gutmans 5d5b09e1a7 - Change some open's to V_OPEN()'s 2000-04-30 19:01:17 +00:00
Sterling Hughes 1f64d98753 Add LibSWF support to PHP, will be sending an e-mail on the files and
uses shortly.
2000-04-30 19:00:05 +00:00
Rasmus Lerdorf a3c17cf766 Add initial NSAPI module from Jayakumar Muthukumarasamy
@Add initial NSAPI module from Jayakumar Muthukumarasamy
2000-04-30 17:28:24 +00:00
Andi Gutmans e13285ded7 - Take Sascha's advice and create on V_OPEN() which replaces open().
- Unlike the other macros its argument has to have braces around it, for
- example, open(filename, flags) becomse V_OPEN((filename, flags))
- Made small conversion to new Zend macros. The ugly (*foo)->value.str.val
- now becomes Z_STRVAL_PP(foo). PP means pointer pointer, there also exist
- single P's for example foo->value.str.val becomes Z_STRVAL_P(foo).
2000-04-30 16:32:36 +00:00
Jouni Ahto 8e7a5098dd Debian 2.2 puts rfc822.h in /usr/include/c-client, check that place too. 2000-04-30 16:10:29 +00:00
Jouni Ahto 06e6094a53 # Changes modules current status 2000-04-30 05:48:40 +00:00
Jouni Ahto 430bfdd878 Moving module to the high-performance API & fixing it for PHP4. 2000-04-30 05:46:04 +00:00
Shane Caraveo 0fc8ff61b2 zeroing the variables fixes one crash...now crashes on memory allocation during zend_compile_files 2000-04-30 04:56:48 +00:00
Sascha Schumann b87df8f210 Add UnixWare/OpenServer flags 2000-04-30 04:50:03 +00:00
Shane Caraveo c7e2d8ef35 sorry, do comments right 2000-04-30 04:21:52 +00:00
Shane Caraveo 8d3ce80f48 apache module now compiles under win32, apache loads, but crashes on line 1167 main.c on page request 2000-04-30 04:15:26 +00:00
Sascha Schumann 953fe189da Overall UNIX build system improvements:
* Makefile header is now completely dynamic
* Absolute paths in (top_)?(src|build)dir and VPATH
  (fixes Tru64 support)
* VPATH does not contain variables anymore
  (fixes UnixWare support)
2000-04-30 03:20:09 +00:00
Sascha Schumann 952f58b66d (The first part of this commit died with a SIGPIPE from the CVS server.)
Overall UNIX build system improvements:

* Makefile header is now completely dynamic
* Absolute paths in (top_)?(src|build)dir and VPATH
  (fixes Tru64 support)
* VPATH does not contain variables anymore
  (fixes UnixWare support)
2000-04-30 03:12:38 +00:00
Sascha Schumann 8d19edc495 Overall UNIX build system improvements:
* Makefile header is now completely dynamic
* Absolute paths in (top_)?(src|build)dir and VPATH
  (fixes Tru64 support)
* VPATH does not contain variables anymore
  (fixes UnixWare support)
2000-04-30 03:10:34 +00:00
Sascha Schumann be00d130e6 Fix virtual_open() by adding ellipse 2000-04-30 03:06:00 +00:00
ace102eb00 ChangeLog update 2000-04-30 01:09:09 +00:00
9fa7428cf5 NEWS update 2000-04-30 01:09:06 +00:00
Andi Gutmans f1d5167ae3 - Implement V_OPEN() V_OPEN_CREAT() and V_CREAT().
Next step is to substitute all open()'s and creat()'s in the PHP tree
2000-04-29 19:01:58 +00:00
Andrei Zmievski 9e9ba7d974 @ Updated natural comparison/sorting algorithm by Martin Pool
@ <mbp@humbug.org.au>. (Andrei)

Martin Pool updated the natural comparison/sort algorithm so that fractions
compare more "naturally", e.g. 1.002 < 1.1.
2000-04-29 18:57:06 +00:00
Zeev Suraski 1a8683f976 - Never mind. Seems like we're still missing the open() functionality 2000-04-29 17:57:47 +00:00
Zeev Suraski aecae7c3af - Give VIRTUAL_DIR another try after testing it extensively on our web site 2000-04-29 17:51:28 +00:00
Rasmus Lerdorf e404a471e7 Oops, wrong path 2000-04-29 16:16:31 +00:00
Rasmus Lerdorf e3dd0a28ce An empty .deps was not getting generated here 2000-04-29 16:14:17 +00:00
Zeev Suraski 5ef03c4ff8 Pass the op_array to the ctor/dtor, instead of just the resource 2000-04-29 11:55:20 +00:00
Zeev Suraski 96c648c9f7 crash fix 2000-04-29 10:34:03 +00:00
Zeev Suraski 8aac6e7d3d - Add zend_llist_apply_with_arguments()
- Add a message handler to the extensions
2000-04-29 10:20:40 +00:00
Thies C. Arntzen 0118f62195 . 2000-04-29 09:21:57 +00:00
Zeev Suraski 42d15298d7 Fix possible bug with extension dtors being called without the ctors being called first 2000-04-29 02:56:44 +00:00
Zeev Suraski e0a48fe623 Beautify 2000-04-29 01:30:17 +00:00
32ffe0ba6f ChangeLog update 2000-04-29 01:09:15 +00:00
1152b4c29e NEWS update 2000-04-29 01:09:12 +00:00
Sascha Schumann 58eaa24a90 Improve imap-lib check 2000-04-28 17:13:50 +00:00
Hartmut Holzgraefe 5c5ccc9844 no more broken scripts by erroneously terminating header()'s argument
with a CR-LF
2000-04-28 16:47:19 +00:00
Zeev Suraski ddbcbb666d Fix a bug in the resource dispencer 2000-04-28 15:52:02 +00:00
Ted Rolle Jr b7f2d80a28 Removed bug that prevented it to work on longer strings.
Changed commenting to c-style commenting.
2000-04-28 14:24:38 +00:00
Andrei Zmievski 105be1513d Fix an empty arrays condition and optimize a bit.
@ Fixed a crash in array_multisort() that happened when empty arrays
@ were passed to it. (Andrei)
2000-04-28 14:01:08 +00:00
Zeev Suraski ddc36fb776 Make convert_to_string() allocations traceable 2000-04-28 13:31:51 +00:00
Zeev Suraski 3220bb570e - Fix an invalid trick (it was valid when header() was using
zend_get_parameters(), but it became invalid when someone switched it
  to zend_get_parameters_ex(), and I decided to remove it anyway).
- Remove a redundant function call
2000-04-28 13:03:13 +00:00
Andrei Zmievski 5369a7b7b4 Fix up. 2000-04-28 12:40:42 +00:00
Thies C. Arntzen b9387791a8 (php_module_startup) is now doing setlocale(LC_ALL, "") instead of just setlocale(LC_CTYPE, ""). suggested by Jon Forsberg <zzed@cyberdude.com>
# this change simply seems "right" as setlocale(LC_ALL, "") also happens in RSHUTDOWN(basic)
2000-04-28 11:09:57 +00:00
Thies C. Arntzen 563c97cf82 . 2000-04-28 11:04:35 +00:00
Thies C. Arntzen ea9be8b88b compile fix 2000-04-28 10:37:17 +00:00
Thies C. Arntzen 83ce0793a7 no longer needed 2000-04-28 10:10:57 +00:00
cdb7471c36 ChangeLog update 2000-04-28 01:09:12 +00:00
Zeev Suraski 974671eced *** empty log message *** 2000-04-27 21:48:47 +00:00
Zeev Suraski 4b6594c5e9 Change to using the #define's 2000-04-27 21:26:17 +00:00
Zeev Suraski dc8980bab2 Change to using macros 2000-04-27 20:22:40 +00:00
Zeev Suraski b80b8381d4 More error handling work (still completely disabled) 2000-04-27 19:38:11 +00:00
Zeev Suraski 39aa59bdec More error handling work (still completely disabled) 2000-04-27 18:37:02 +00:00
Joey Smith 095f1d91b1 Please, no more bug reports about bcmath 2000-04-27 16:08:36 +00:00
Andrei Zmievski 3b77fd37a9 TODO update and fix for C++ comments. 2000-04-27 14:41:18 +00:00
Thies C. Arntzen 0c46488147 using vi to update DevStudio Files, yeah! 2000-04-27 14:33:53 +00:00
Thies C. Arntzen 6f08c178b9 . 2000-04-27 14:32:58 +00:00
Thies C. Arntzen 6ccea93d6b allow oci8 to be build as loadable module. 2000-04-27 14:29:11 +00:00
d8b6163f96 ChangeLog update 2000-04-27 01:09:15 +00:00
59ec1bdefb NEWS update 2000-04-27 01:09:12 +00:00
Zeev Suraski fa7c418b79 Fix - forgot to split away if refcount>1 2000-04-26 22:10:06 +00:00
Sterling Hughes 68e54e9922 Small proto fix. 2000-04-26 01:16:57 +00:00
Andrei Zmievski 5c5ec88292 @Added substr_count() from Peter Kovacs. (Andrei)
# also some todo stuff
2000-04-26 00:29:59 +00:00
Zeev Suraski 94a724f686 Fix bug 2000-04-25 14:20:52 +00:00
Zeev Suraski a20e90abb3 We'll need two... 2000-04-25 10:44:50 +00:00
Zeev Suraski 0a14a32c78 Add useful macros 2000-04-25 10:10:44 +00:00
Andi Gutmans 382653aebc - Fix persistence of llist 2000-04-25 09:45:58 +00:00
bc220aa000 ChangeLog update 2000-04-25 01:09:12 +00:00
Andrew Skalski fc0813f11a * typecast fs_give parameter to void**
* removed wide-character treatment from imap_utf7_encode
* suggestion to #include "linkage.c" rather than link in auth/mail drivers
  manually
2000-04-24 22:21:34 +00:00
Zeev Suraski e16c38b3f5 - Forgot to keep the ':' in the class_name 2000-04-24 22:13:08 +00:00
Zeev Suraski b992f02935 - Get rid of newly introduced warning 2000-04-24 17:35:27 +00:00
Thies C. Arntzen 232bcff77e . 2000-04-24 16:46:56 +00:00
Zeev Suraski 9d2738cf1d - Fix crash bug in localtime_r. If locatime() returns NULL then also return
NULL
2000-04-24 16:16:45 +00:00
Zeev Suraski dc93a62cbb Correct fix 2000-04-24 16:04:13 +00:00
Thies C. Arntzen 9786e4450a MODULE_TEMPORARY should get a call to RSHUTDOWN as well! 2000-04-24 15:49:23 +00:00
Thies C. Arntzen 2a17453e42 RINIT was called twice for modules loaded vi php.ini 2000-04-24 15:40:07 +00:00
Andrei Zmievski ec997d5c5b Exterminate warnings. 2000-04-24 14:19:21 +00:00
Andrei Zmievski 071c01a019 The third argument to fseek() is now one of the standard SEEK_* constants.
# The previous change to support seekfrom stuff was incorrect.
2000-04-24 14:18:11 +00:00
Thies C. Arntzen f4c9d96f2e fixed shutdown crash if MSHUTDOWN tries to php_error() something. 2000-04-24 12:47:07 +00:00
Thies C. Arntzen b73919eb50 enabel PDB 2000-04-24 12:36:01 +00:00
Thies C. Arntzen 57c20bf836 fix warning 2000-04-24 12:35:30 +00:00
a6face98c8 ChangeLog update 2000-04-24 01:09:16 +00:00
8cf5a64885 NEWS update 2000-04-24 01:09:13 +00:00
Sterling Hughes e5df341868 TODO:
Just did that.
PEAR:
  Fix typo
2000-04-23 19:19:56 +00:00
Sterling Hughes 21416083b1 @-Add an optional third argument to fseek to indicate were to seek from. (Sterling) 2000-04-23 19:16:24 +00:00
Frank M. Kromann e297737cb1 Moving output files to common folder 2000-04-23 10:59:20 +00:00
Frank M. Kromann 7c9435e741 Removing invalid readme file 2000-04-23 10:54:44 +00:00
Frank M. Kromann 662280560f moving pointers to header and library files to match php_build structure 2000-04-23 10:52:49 +00:00
Frank M. Kromann ed699b4263 adding project file for mcrypt module 2000-04-23 08:08:40 +00:00
Sterling Hughes 645156918c Add a new directory for File (it was supposed to be there
in the first place).
2000-04-23 04:47:45 +00:00
5a7c8f46c9 ChangeLog update 2000-04-23 01:09:13 +00:00
Chuck Hagenbuch 4b78e0aca6 back off from high-performance api in imap_rfc822_parse_adrlist. if you
called it twice on the same string, there were _strange_ side effects. This
may be slower, but it works.
2000-04-22 20:54:07 +00:00
Andi Gutmans 5da62dd57e - In Windows RAND_MAX is defined in stdlib.h
- Get rid of comment which is confusing.
2000-04-22 15:44:35 +00:00
Andi Gutmans 44908999a8 - Hopefully fix mt_rand() functions under Windows. This patch will effect
all platforms so I hope it's OK.
2000-04-22 15:40:23 +00:00
f9cdcc583c ChangeLog update 2000-04-22 01:09:13 +00:00
df96f5f8d5 NEWS update 2000-04-22 01:09:10 +00:00
Thies C. Arntzen 1651fbff64 add VDIR info 2000-04-21 16:20:11 +00:00
Thies C. Arntzen 75a00321c3 add oracle and oci8 2000-04-21 15:10:01 +00:00
Thies C. Arntzen 4f5f93efa1 . 2000-04-21 15:04:55 +00:00
Thies C. Arntzen 5132321c3e oracle compiles now on win32 - untested! 2000-04-21 15:04:41 +00:00
Thies C. Arntzen 0e2ac7d992 *** empty log message *** 2000-04-21 14:54:44 +00:00
Zeev Suraski 972ef3f31b - Missed second argument 2000-04-21 14:50:09 +00:00
Andi Gutmans dd05651046 - Fix last fix for Windows 2000-04-21 14:46:24 +00:00
Thies C. Arntzen eb786dc055 make it compile on Win32 2000-04-21 14:45:27 +00:00
Thies C. Arntzen 80486c95be export zval_add-ref and zvale_del_ref 2000-04-21 14:45:10 +00:00
Andi Gutmans 36faff14b1 - Small fix to virtual_Chdir_file() to include the trailing slash when
the file is in the root directory.
2000-04-21 14:42:20 +00:00
Frank M. Kromann 12e319b091 Moving output modules 2000-04-21 12:26:42 +00:00
Frank M. Kromann 91f1f7d3c3 Adding a short WIN32_HOWTO and moving library and header files to php_build 2000-04-21 12:21:47 +00:00
Thies C. Arntzen b27718ff00 @- OCIBindByName() will no longer complain about bindlength beeing zero. (Thies) 2000-04-21 09:54:15 +00:00
Rasmus Lerdorf 4789127d27 createfrom* fixes 2000-04-21 02:23:16 +00:00
5c366e4e52 ChangeLog update 2000-04-21 01:09:08 +00:00
Zeev Suraski ca10d9b2de Compile fixes 2000-04-20 23:35:28 +00:00
Zeev Suraski 389eca0c1b Add .txt files to .dsp's 2000-04-20 23:26:06 +00:00
Zeev Suraski 18c44ad873 Another consistency fix 2000-04-20 23:23:36 +00:00
Zeev Suraski a2984a5d50 Consistency fix 2000-04-20 23:23:02 +00:00
Zeev Suraski 0b8369196b A few .dsp fixes 2000-04-20 22:52:37 +00:00
Andi Gutmans 4928f63821 - Change a getcwd() 2000-04-20 21:07:39 +00:00
Frank M. Kromann 94d46c4fbc Adding Java project to modules workspace 2000-04-20 18:40:17 +00:00
Frank M. Kromann a1c480154a Adding ftp project to modules workspace 2000-04-20 18:31:50 +00:00
Andi Gutmans c0919bbd41 - virtual_lstat() doesn't exist on Windows. 2000-04-20 17:58:25 +00:00
Frank M. Kromann 46a7a05d57 Adding project file for ftp module on Win32 2000-04-20 17:49:26 +00:00
Zeev Suraski 50a93b5678 Remove strlcpy from the zlib project 2000-04-20 17:49:04 +00:00
Zeev Suraski 64c974e8b6 - Add the zlib project to the php_modules workspace, and fix it's C-runtime definitions
- Move IMAP to the high performance API
2000-04-20 17:48:22 +00:00
Frank M. Kromann 5f8e4c0474 Adding strlcpy to makefile 2000-04-20 17:41:18 +00:00
Andi Gutmans 503bb3bedb - Export strlcat()/strcpy() for Frank.
- Windows doesn't have lstat().
2000-04-20 17:40:03 +00:00
Zeev Suraski 883bd2b1de - Fix virtual cwd bug
- Add more V_STAT() V_LSTAT() changes
2000-04-20 17:24:01 +00:00
Frank M. Kromann 7412bd5c84 Making zlib compile under Win32 and fixing a typo 2000-04-20 16:59:55 +00:00
Andi Gutmans e40268d07c - Add missing V_STAT() 2000-04-20 16:38:08 +00:00
Frank M. Kromann ba37ae2c0b Fixing init problem for Zval's in mssql_query 2000-04-20 15:49:56 +00:00
Sascha Schumann dec71471df New style 2000-04-20 15:13:29 +00:00
Sascha Schumann e223693d0c Do not enable GD, if --without-gd was used 2000-04-20 14:59:59 +00:00
Zeev Suraski 9e10ac5b1d - Change macro names from Z to Z_ 2000-04-20 14:55:16 +00:00
Zeev Suraski 149c7f2a8a - CHange macro names from Z to Z_ 2000-04-20 14:52:54 +00:00
Zeev Suraski 9022a4bdbd Add some macros for nicer zval handling 2000-04-20 14:32:39 +00:00
Zeev Suraski a918842f30 Fix, beautify and convert the IMAP module to the high performance API 2000-04-20 14:23:35 +00:00
Andrei Zmievski bbe0df125e Do proper ieeefp.h check. 2000-04-20 13:49:07 +00:00
Andrei Zmievski 70b2013f9e Check for ieeefp.h. 2000-04-20 13:47:15 +00:00
Andi Gutmans 9aba6a94d3 - Another PHP_WIN32 patch 2000-04-20 13:43:48 +00:00
Andi Gutmans f9e9cab7ac - Change to PHP_WIN32 2000-04-20 13:23:19 +00:00
Thies C. Arntzen 0540bbe5af improve fix 2000-04-20 07:35:22 +00:00
Thies C. Arntzen c1c8422dbf compile before commit! compile before commit! compile before commit! 2000-04-20 07:24:56 +00:00
Thies C. Arntzen 2b3a575ab3 revert andrei's path (i can't compile anymore on linux)
we're always using #ifndef HAVE_BLA instead of if !HAVE_BLA and if we need ieeefp.h for some weird platform (which one is that?) we need an autoconf check for it.
2000-04-20 07:23:55 +00:00
a9755246c3 ChangeLog update 2000-04-20 01:09:15 +00:00
46d61dd857 NEWS update 2000-04-20 01:09:12 +00:00
Zeev Suraski ac8e7b96f4 Fix Win32 compilation. Hillarious April 1st joke! 2000-04-19 23:46:26 +00:00
Colin Viebrock 7ecf70047b *** empty log message *** 2000-04-19 23:18:15 +00:00
Colin Viebrock 900aae165e A little easter egg for April 1st ... :) 2000-04-19 23:17:02 +00:00
Andrei Zmievski eea8ae4fd1 Modified entry. 2000-04-19 18:38:01 +00:00
Andrei Zmievski a15b08a709 Just a type cast is sufficient. 2000-04-19 18:36:50 +00:00
Frank M. Kromann 429cf808e6 SIGPIPE is unknown on WIN32 platforms 2000-04-19 17:28:23 +00:00
Andrei Zmievski fe1147b01a Include proper files for finite. 2000-04-19 15:55:52 +00:00
Andrei Zmievski 284b0ae24e Make ext/calendar optional. 2000-04-19 15:53:09 +00:00
Thies C. Arntzen 19a9577901 ignore SIGPIPE in standalone-mode so that one can actually use fsockopen() *and* have the remote side close the socket whithout PHP dying! 2000-04-19 15:37:43 +00:00
Zeev Suraski a81e6bc04e author fixes 2000-04-19 15:21:22 +00:00
Zeev Suraski 708811184d Improve performance of the PHP_SELF registration under ISAPI 2000-04-19 15:15:33 +00:00
Zeev Suraski 9cbcade6c9 Support E_USER_* error types 2000-04-19 15:10:14 +00:00
Zeev Suraski 67f6974373 Initial support for trapping errors (not complete and disabled; will be enabled only
post-PHP 4.0.0)
2000-04-19 15:08:06 +00:00
Andrei Zmievski fae56aee27 Some fixes. 2000-04-19 14:59:02 +00:00
Andrei Zmievski 6f88327a12 Fix attribution 2000-04-19 14:50:19 +00:00
Zeev Suraski c31f6fbd90 Kill warning 2000-04-19 13:18:01 +00:00
Zeev Suraski 963d31198a Fix a couple of _ex()'s 2000-04-19 13:15:57 +00:00
Zeev Suraski a51d3058f7 - Renamed get_used_files() to get_required_files() for consistency
- Documented some functions
- Added user-level warning messages
- Added user_error()
2000-04-19 13:15:13 +00:00
Rasmus Lerdorf 03b562c93e fgetcsv() patch from Nick Talbott
@ The fgetcsv() function now handles embedded end-of-line in a quoted field
@ (Nick Talbott)
2000-04-19 13:03:47 +00:00
Zeev Suraski a81a1c7a1a phpcredits() update. 2000-04-19 12:43:54 +00:00
Andi Gutmans 207167c54b - Export pass_include() for Windows 2000-04-19 08:17:34 +00:00
61792f9cc5 ChangeLog update 2000-04-19 01:09:09 +00:00
2ad8fc6281 NEWS update 2000-04-19 01:09:06 +00:00
Evan Klinger d6c66f3b7c @- Fixed long2ip() to return the correct IP address. (Evan)
# ip2long() is still broken.
2000-04-18 22:50:24 +00:00
Zeev Suraski d191777b3f Add convert_to_writable_*_ex() macros (unused at this time) 2000-04-18 22:23:28 +00:00
Zeev Suraski 02f7ee57f7 - Fix many memory leaks in the IMAP module
- Begin migrating to the high performance API
2000-04-18 22:22:48 +00:00
Egon Schmid f1c268d79a Corrected some protos. 2000-04-18 20:00:21 +00:00
Zeev Suraski 43e04d5a77 indent/beautify 2000-04-18 19:42:22 +00:00
Zeev Suraski c007a7232d Document the ob_*() functions 2000-04-18 19:18:47 +00:00
Jouni Ahto 39b4163bfb # Document module status 2000-04-18 02:58:25 +00:00
Jouni Ahto 1dc32c2d52 # Reaching alpha status with this module... 2000-04-18 02:52:45 +00:00
ae6b0ea03f ChangeLog update 2000-04-18 01:09:12 +00:00
Frank M. Kromann d5bfb21f2f minor optimization 2000-04-17 19:54:50 +00:00
Andrew Skalski 0a3482f213 fixed imap quota/relogin compilation errors 2000-04-17 19:28:58 +00:00
Egon Schmid 830715a6d7 Have forgotten myself. 2000-04-17 18:57:40 +00:00
Andi Gutmans 4f15966d1b - Fix order of JMPZNZ arguments 2000-04-17 17:16:47 +00:00
Thies C. Arntzen 44e0d27685 ups, finite is already a macro on Win32 2000-04-17 13:25:16 +00:00
Thies C. Arntzen 297ca5c08a shut up CVS! 2000-04-17 11:51:26 +00:00
Stig Bakken df77365d29 ignore stuff 2000-04-17 11:23:18 +00:00
Thies C. Arntzen 8367275477 HPUX11 only has isfinite() 2000-04-17 10:39:13 +00:00
Hartmut Holzgraefe 0b91e2fcd3 initial checkin 2000-04-17 09:44:49 +00:00
2b36f579f1 ChangeLog update 2000-04-17 01:09:12 +00:00
Andrei Zmievski 544b65493e This doesn't belong in NEWS. 2000-04-16 19:34:10 +00:00
Sascha Schumann 93135c8b32 Undefine HAVE_*_R, so that we get our replacements 2000-04-16 16:32:51 +00:00
Nick Gorham 1b7bfe5bbf Removed unnecessary FAR's (I am assuming we don't need to work under
16 bit windows). They break several ODBC builds.
2000-04-16 16:16:59 +00:00
Egon Schmid d39724c536 The comma is also optional. 2000-04-16 16:02:31 +00:00
Rasmus Lerdorf 8b1b39b5b5 Move this check to the main configure.in file. Fixes #3979 2000-04-16 15:44:04 +00:00
Sascha Schumann e519d9ca6c Updates 2000-04-16 13:44:38 +00:00
Hartmut Holzgraefe 0866fef791 added unixtojd() and jdtounix() to convert from unix time_t to
Julian Days and vice versa
2000-04-16 11:40:19 +00:00
4e1f9412cf ChangeLog update 2000-04-16 01:09:15 +00:00
58e1d9ddd6 NEWS update 2000-04-16 01:09:12 +00:00
Hartmut Holzgraefe 3bc8debefe made calendar a real extension instead of a dl one only 2000-04-15 20:35:09 +00:00
Frank M. Kromann 3ee4f3ea7e Adding mssql to modules 2000-04-15 19:42:27 +00:00
Frank M. Kromann 9e601aaea7 Fixing compilation errors in MSSQL module 2000-04-15 19:30:45 +00:00
Frank M. Kromann 2e2642cfb3 Adding $PHP_SELF variable for compatibility with other platforms 2000-04-15 19:20:43 +00:00
Sascha Schumann d748c0827d SECTION is not defined in info.h anymore 2000-04-15 17:41:25 +00:00
Sascha Schumann 5d72b491c3 Support install directories other than srcdir/root 2000-04-15 17:41:02 +00:00
Sascha Schumann b128f39837 Add documentation on how to install PHP in AOLserver 2000-04-15 17:40:39 +00:00
Thies C. Arntzen 38c2b8ec63 hpux needs _REENTRANT 2000-04-15 17:06:21 +00:00
Andi Gutmans 5097f64256 - Fix leak in require_once() 2000-04-15 17:02:42 +00:00
Thies C. Arntzen a1608562ae fixes compile on platforms without dl() support.
#i think zend_register_extension should be declared static
2000-04-15 15:32:32 +00:00
Andi Gutmans b8fd674453 - PHP_FOPEN -> V_FOPEN 2000-04-15 14:37:28 +00:00
Zeev Suraski f0c7e0275f Remove unnecessary argument 2000-04-15 14:30:18 +00:00
Andi Gutmans c9911a151e - Change PHP_ to V_ (directory & file functions) 2000-04-15 14:28:48 +00:00
Andi Gutmans 1665cba750 - Change PHP_ to V_ (directory & file functions) 2000-04-15 14:20:01 +00:00
Zeev Suraski 603d5ff5d8 Fix ZTS 2000-04-15 14:17:18 +00:00
Andi Gutmans 938598b8d2 @ "use" is not yet supported; instead use include_once() or require_once()
@  for the time being (Andi, Zend library)
2000-04-15 13:56:09 +00:00
Andi Gutmans f2ff9eeef5 @ Fix bug in number_format (Jon Forsberg) 2000-04-15 13:53:32 +00:00
Zeev Suraski 81138a641a Forgot to commit the php4 fixes 2000-04-15 13:53:20 +00:00
Zeev Suraski 4cb9a483d2 - Clean up resource lists namespace
- Prepare extended resource list destructor APIs (currently unused)
2000-04-15 13:02:22 +00:00
Danny Heijl 53263049d2 - fix Win32 Release_TS build of Informix driver (danny). 2000-04-15 12:54:07 +00:00
689094634e ChangeLog update 2000-04-15 01:09:12 +00:00
a92fde9736 NEWS update 2000-04-15 01:09:09 +00:00
Egon Schmid 7b77b063a6 Small corrections. 2000-04-14 21:12:21 +00:00
3dae749f6f ChangeLog update 2000-04-14 20:53:21 +00:00
a5bb1466a3 NEWS update 2000-04-14 20:53:17 +00:00
Zeev Suraski b6b79a8d90 Add the documentation team to the credits page 2000-04-14 18:22:43 +00:00
Rasmus Lerdorf 6727342b7a Make error_prepend_string and error_append_string work
@Make error_prepend_string and error_append_string work
2000-04-14 14:00:32 +00:00
Rasmus Lerdorf 32a3c3987e Undo bogus commit 2000-04-14 13:40:27 +00:00
Rasmus Lerdorf 2acd0ad1fe I don't see why this should be gcc dependant and this fixes bugs 4140
and 4143
2000-04-14 13:14:30 +00:00
Andrei Zmievski 2206a9f7dd fseek() idea. 2000-04-13 19:43:56 +00:00
Sam Ruby a4016620bf Oops - remove debug statement 2000-04-13 19:05:01 +00:00
Sam Ruby 5424369f3a match changes to Tomcat example 2000-04-13 19:02:40 +00:00
Andrei Zmievski 9ffd5b5595 @- array_walk() now automatically resets the array. (Andrei) 2000-04-13 18:57:37 +00:00
Zeev Suraski aa6769dde2 - Make Windows builds build again
- Make non-gcc based platforms compile again
2000-04-13 16:08:49 +00:00
Zeev Suraski c6c261e922 Fix a memory leak when using assign-op bitwise operators on strings 2000-04-13 15:56:02 +00:00
Thies C. Arntzen 9f598b187c the asset call caused an undefined __eprintf here! 2000-04-13 13:04:02 +00:00
Martin Kraemer 06e504d32a Test for EBCDIC platform 2000-04-13 12:24:28 +00:00
Rasmus Lerdorf efabab1a34 Fix for bug #4125 2000-04-13 03:35:02 +00:00
David Hedbor 5f883ac86d - Fixed a couple of POST problems.
- Use virtual path functionality when available, to set the cwd of the
script to it's own directory prior to starting it.
- Fixed a bug in php_roxen_sapi_header_handler.
2000-04-12 22:59:46 +00:00
Andrei Zmievski bba955fd4f Claim some stuff. 2000-04-12 21:50:17 +00:00
Andrei Zmievski 25b95d2a97 Already done. 2000-04-12 20:41:52 +00:00
Andrei Zmievski c7100c4a1a Added natural comparison/sorting routines using code from Martin Pool.
@- Added natural comparison/sorting routines strnatcmp(), strnatcasecmp(),
@  natsort(), and natcasesort(). These are useful for comparing and sorting
@  strings that contain numbers. Based on the code from Martin Pool
@  <mbp@humbug.org.au>. See http://www.linuxcare.com.au/projects/natsort/
@  for more info on natural sorting. (Andrei)
2000-04-12 19:39:02 +00:00
Sam Ruby 5684953d59 make it compile on Win32 2000-04-12 18:18:49 +00:00
Thies C. Arntzen d337cbaae8 something with the @ commit stuff *is* broken. 2000-04-12 15:51:23 +00:00
Ben Mansell 67f867311b @- Zeus Webserver support (version 3.3.6+) for ISAPI 2000-04-12 09:48:26 +00:00
Zeev Suraski 021631d5eb *** empty log message *** 2000-04-12 00:50:21 +00:00
Andrei Zmievski da1cca03ae Re-add. 2000-04-11 18:40:47 +00:00
Andi Gutmans 804861c5ac - Fix memory leak 2000-04-11 18:16:58 +00:00
Andrei Zmievski c8e1057d1f One off the list. 2000-04-11 17:38:48 +00:00
Zeev Suraski d17e3d6b18 Fix warnings 2000-04-11 17:38:19 +00:00
Andrei Zmievski e39d70fff6 Added PCRE 3.01. 2000-04-11 17:36:06 +00:00
Andrei Zmievski beb6916cfc *** empty log message *** 2000-04-11 17:35:42 +00:00
Zeev Suraski 97c9603b02 Fix fd leak in include_once() 2000-04-11 17:30:37 +00:00
Andi Gutmans 7f54318897 - Turn off VIRTUAL_DIR by default 2000-04-11 17:00:21 +00:00
Andrei Zmievski a66283c7b9 another option 2000-04-11 15:16:49 +00:00
Sam Ruby 93f9fc77ad Eliminate warning if virtual cwd is specified 2000-04-11 00:30:33 +00:00
Zeev Suraski 8ec20a16ed Fix another missing opened_path assignment 2000-04-10 22:50:32 +00:00
Zeev Suraski 09ac924559 - Added support for reading properties that require arguments in the COM
module - writing to them will only be supported in PHP 4.1 (Zeev)
2000-04-10 21:54:15 +00:00
Zeev Suraski 578726ca2f indent 2000-04-10 21:32:19 +00:00
Zeev Suraski 38e458b86d *** empty log message *** 2000-04-10 21:25:09 +00:00
Andi Gutmans 73c6fbff7e - 2000-04-10 21:12:33 +00:00
Zeev Suraski e663d856b3 Fix object overloading support 2000-04-10 20:21:13 +00:00
Zeev Suraski 64f91d80fa Object overloading API changed slightly (llist is now a pointer) 2000-04-10 20:21:02 +00:00
Andi Gutmans c5d5c69bfe - Add warnings 2000-04-10 19:54:45 +00:00
Andi Gutmans cc0d6ac19c - Two more places needed changing 2000-04-10 18:24:38 +00:00
Zeev Suraski 232b90454f Clean up last/size definitions 2000-04-10 18:02:40 +00:00
Andi Gutmans 897b413c2d - Try and resolve the problem with current working directories not being
set to the script directory
2000-04-10 17:39:11 +00:00
Andi Gutmans c981be0bca - Don't need to extern functions
- Use virtual_file_ex() in expand_filepath()
2000-04-09 19:54:50 +00:00
Zeev Suraski 4cdcf638ce *** empty log message *** 2000-04-09 16:08:10 +00:00
Kristian Köhntopp 5b8c5bedac fixed unterminated string constant introduces by foreign patch. 2000-04-09 15:36:59 +00:00
Hartmut Holzgraefe 744fe82e0a added the other usefull constants besides M_PI from math.h
as PHP constants
2000-04-08 23:53:19 +00:00
Andi Gutmans 95f45d6c50 - Make all CVS users use the new virtual dir support.
Will probably disable this for the release.
2000-04-08 15:01:11 +00:00
Zeev Suraski 85e9d69f23 @- Fixed several problems with the PATH_TRANSLATED and PHP_SELF under Apache
@  (Paul Gregg & Zeev)
2000-04-08 11:16:19 +00:00
Sterling Hughes cd3305a2d1 @-Added ldap_get_values_len function from PHP3 to PHP4. (Sterling) 2000-04-07 23:20:22 +00:00
Zeev Suraski a0ba444959 Add a missing expand_filepath() 2000-04-07 22:10:04 +00:00
Zeev Suraski 1cf5c33627 Thoroughly fix include_once() 2000-04-07 22:03:46 +00:00
Zeev Suraski ed6e734047 Fix include_once() 2000-04-07 21:16:19 +00:00
Zeev Suraski 12aae5ab66 - Fix const declaratirs in virtual cwd
@- Fixed a problem in include_once() with non constant arguments (Andi & Zeev,
@  Zend Engine)
2000-04-07 21:16:08 +00:00
Zeev Suraski 83252f57b6 *** empty log message *** 2000-04-07 19:55:05 +00:00
Colin Viebrock 34ba0394cb recommended changes 2000-04-07 18:50:08 +00:00
Colin Viebrock adc5bbc925 last one ... promise 2000-04-07 17:09:18 +00:00
Colin Viebrock d02a351061 typo 2000-04-07 17:04:57 +00:00
Colin Viebrock 02c3eb2bd5 typo 2000-04-07 17:02:01 +00:00
Colin Viebrock 9130f05d08 prettying 2000-04-07 16:50:55 +00:00
Colin Viebrock 86cff779c3 *** empty log message *** 2000-04-07 16:46:59 +00:00
Colin Viebrock 5628b3f0ab more prettiness 2000-04-07 16:41:19 +00:00
Zeev Suraski 436ffa8a18 Unify 2000-04-07 15:30:47 +00:00
Ted Rolle Jr b251a4778d Removed some compiler warnings. 2000-04-07 15:07:56 +00:00
Zeev Suraski 982f4b525c @- Added php.ini-optimized (Zeev) 2000-04-07 14:55:53 +00:00
Andi Gutmans f118d94783 - This slipped in. Enable VIRTUAL_DIR when we're in ZTS. Eventually it
should always be enabled.
2000-04-07 10:26:28 +00:00
Andi Gutmans 89f99967b8 - Add wddx support to the default build 2000-04-07 10:21:17 +00:00
Chuck Hagenbuch 0fc483fed6 cleaning up some small off-by-one errors and argcount follies. Can someone
take a look at the errors imap_mime_header_decode() generates when
compiling? I took a quick look, but don't have time to puzzle through that
code.
2000-04-07 04:43:26 +00:00
Andi Gutmans 5c6bf64509 - ZEND_DEBUG is always defined 2000-04-06 22:54:33 +00:00
Colin Viebrock e4409a8556 phpinfo() pretying
That should be everything.
2000-04-06 21:17:50 +00:00
Colin Viebrock a7c8bfb9fb phpinfo() prettying 2000-04-06 21:07:44 +00:00
Andi Gutmans 56fc855afd *** empty log message *** 2000-04-06 17:39:52 +00:00
Colin Viebrock 4bd1af056e *** empty log message *** 2000-04-06 17:05:33 +00:00
Colin Viebrock 2cb6745cf0 a better way, i've been told (thanks) 2000-04-06 17:01:41 +00:00
Colin Viebrock 5115342c6e More phpinfo() prettying.
Can someone check my code for the interbase
support, and I need someone else to decode the LDAP stuff ... it's beyond
me.
2000-04-06 16:57:33 +00:00
Andi Gutmans a9159c2eec Initial preparation for OO overloading patch 2000-04-06 16:34:55 +00:00
Sterling Hughes 4766abb0e5 @- Added ldap_errno, ldap_err2str and ldap_error from PHP3 to PHP4. (Sterling) 2000-04-06 12:36:47 +00:00
Jakub Skopal ad0f9dbccb Corrected compilation error with wrong number of arguments to
php_info_print_box_start()
2000-04-06 12:26:16 +00:00
Colin Viebrock f133141bfb typo 2000-04-05 22:31:40 +00:00
Colin Viebrock 731404c0ba phpinfo() prettying
I will get to the rest of the functions later tonight or tomorrow
(i.e. from hyperwave to snmp)
2000-04-05 22:30:19 +00:00
Colin Viebrock 0c2b366ce1 phpinfo() prettying 2000-04-05 21:43:03 +00:00
Zeev Suraski 3ba4105fde Update the PHP logo 2000-04-05 21:41:38 +00:00
Andi Gutmans 4ee5cad9f9 - Bump up version number 2000-04-05 21:06:50 +00:00
Colin Viebrock f57d8a2c25 finally (thanks Andreas) 2000-04-05 21:03:30 +00:00
Colin Viebrock 1e344cf010 still cant get this 2000-04-05 21:00:35 +00:00
Andi Gutmans da3db3d864 - FIx JMPZNZ 2000-04-05 20:55:51 +00:00
Andi Gutmans 49a34c6811 - Not needed anymore 2000-04-05 20:50:57 +00:00
Andi Gutmans d7dc66bdbd - More fixes 2000-04-05 20:49:51 +00:00
Colin Viebrock 875ac538fb phpinfo() prettying 2000-04-05 20:48:46 +00:00
Andi Gutmans e3bbb4bc6c - Fix 2000-04-05 20:45:49 +00:00
Colin Viebrock fddd1201b4 phpinfo() prettying 2000-04-05 20:42:59 +00:00
Colin Viebrock 5e296bfe97 fixed the segfault problem (probably not the prettiest way, but) 2000-04-05 20:29:20 +00:00
Colin Viebrock 6882044a46 phpinfo() prettying 2000-04-05 20:18:58 +00:00
Colin Viebrock 1ddc9ff852 Prettying up the output of phpinfo(). Someone has to tell me how
to get a new .gif logo in there, and why the ZEND_DEBUG output is
causing seg faults.

I also need to go through all the modules and fix up the output they
create.
2000-04-05 20:17:02 +00:00
Zeev Suraski 794f312176 Fix a problem with the virtual directory mechanism (corruption of the filenames to open) 2000-04-05 19:02:28 +00:00
Zeev Suraski 7c70003d22 The ISAPI module was incompatible with the CGI fix, which ruined POST's 2000-04-05 18:06:13 +00:00
Sam Ruby 8372b2baf1 fix typo: wrong variable name 2000-04-05 12:15:57 +00:00
Sam Ruby c56888da7c look for Tomcat binaries too 2000-04-05 09:47:34 +00:00
Sam Ruby eb70d8361b Make it clear that the jawt example is only intented to be run as a CGI 2000-04-05 09:21:19 +00:00
Sam Ruby 5c40dfa374 Define PHP_SELF in sapi/servlet.
Reported by Lim Swee Tat <limst@ncscom.sg>
2000-04-05 09:06:05 +00:00
Sam Ruby f55b70e764 Windows build: xmltok is needed by wddx 2000-04-04 22:42:47 +00:00
Sam Ruby 7a6dddcc0b Make MySLS_FETCH use the same globals ID as ZEND_INIT_MODULE_GLOBALS 2000-04-04 20:10:11 +00:00
Andi Gutmans 2a15b85ca1 - One more fopen -> PHP_FOPEN patch 2000-04-04 20:06:45 +00:00
Chuck Hagenbuch 44e178e089 return false after determining that a message number is bad, instead of
going on to crash.
2000-04-04 18:10:24 +00:00
Andrei Zmievski ebce1ad787 Additional check for IS_OBJECT. 2000-04-04 16:41:13 +00:00
Uwe Steinmann db160e8164 - should fix a problem with ifdef 2000-04-04 16:03:39 +00:00
Thies C. Arntzen b491796a4c @- WDDX now defaults to ISO-8859-1. (Thies)
# andrei, plz have a look at my changes - seems to work for me!
2000-04-04 15:47:11 +00:00
Thies C. Arntzen 1fc8733dbf export xml_utf8_decode for wddx module 2000-04-04 15:42:05 +00:00
Thies C. Arntzen 6e2bf336f6 (var_dump) cleaned up some weird & buggy stuff 2000-04-04 15:14:23 +00:00
Uwe Steinmann 14e457d374 - all functions returning a list of object record should be faster now
and require less accesses on the server
2000-04-04 13:35:07 +00:00
Thies C. Arntzen 32aa845957 forgot @ thingie 2000-04-04 11:52:03 +00:00
Thies C. Arntzen 38cb3de2bc buffer was short by one 2000-04-04 11:35:01 +00:00
Egon Schmid 3e2a1034cb Return type was missing. 2000-04-04 08:52:57 +00:00
Chuck Hagenbuch d437ba9071 tweaks to prototypes 2000-04-04 02:56:42 +00:00
Chuck Hagenbuch 8153dc5772 update function protos. should all be there now 2000-04-04 00:51:38 +00:00
Chuck Hagenbuch da1bfb4211 adding mcal and gettext to MODULES_STATUS 2000-04-04 00:40:48 +00:00
Andi Gutmans d3dd529c23 - Fix build bug 2000-04-03 22:00:18 +00:00
Zeev Suraski c43fe80d6f @- Fix crash resulting from IMAP's error handling (Stanislav) 2000-04-03 19:00:34 +00:00
Zeev Suraski d0395d6f5b *** empty log message *** 2000-04-03 18:50:50 +00:00
Andi Gutmans 991f9ef9f4 - fopen and ZTS fixes 2000-04-03 17:40:44 +00:00
Andi Gutmans 2f41e1b979 - Fix typo 2000-04-03 17:00:01 +00:00
Sam Ruby 617e1b054c test -e doesn't exist on Solaris - substituting test -d 2000-04-03 15:29:39 +00:00
Zeev Suraski 074af16d34 *** empty log message *** 2000-04-03 05:35:56 +00:00
Zeev Suraski 538464f34d *** empty log message *** 2000-04-03 05:31:26 +00:00
Zeev Suraski f44afc6e99 Fix the problem with dl()'d modules not freeing their resources properly 2000-04-03 05:26:41 +00:00
Zeev Suraski 69ff396312 *** empty log message *** 2000-04-02 22:15:14 +00:00
Zeev Suraski 18e0850ba1 @- Add $HTTP_POST_FILES[filename][tmp_name] - it was previously impossible to
@  retrieve the temporary name of an uploaded file using $HTTP_POST_FILES[] (Zeev)
- Changed IMAP Win32 definitions
2000-04-02 21:27:32 +00:00
Andi Gutmans de0d354736 - Create dtor function 2000-04-02 20:26:06 +00:00
Andi Gutmans d8e64d623e - This version of chdir_file should be compatible with the Apache one. 2000-04-02 19:45:02 +00:00
Andi Gutmans ce283e2326 - A bit more cleanups.
- Need to implement virtual_chdir_file() to replace chdir_file() in
  sapi/apache so that we can start testing apache and debug it.
2000-04-02 19:28:25 +00:00
Andi Gutmans 6a2da70f94 - Virtual cwd compiles now (need to uncomment #define in php.h for it to
be enbaled right now).
  It seems to work very basic stuff
2000-04-02 19:04:59 +00:00
Zeev Suraski eefbe904b2 *** empty log message *** 2000-04-01 22:31:20 +00:00
Andi Gutmans 997e63993b - Move to new Zend macros 2000-04-01 20:11:01 +00:00
Andi Gutmans 301f8feab4 - PHP_WIN32 is not defined here use ZEND_WIN32 2000-04-01 18:22:46 +00:00
Andi Gutmans 57b398af1f - More virtual_cwd work 2000-04-01 18:21:03 +00:00
Andi Gutmans a73ba4b238 - Make php_virtual_cwd compile 2000-04-01 18:11:08 +00:00
Sam Ruby 34933225f6 Accomodate back level (JSDK 2.0) implementations 2000-04-01 17:57:42 +00:00
Andi Gutmans effa5bb024 - Need zend.h for ZTS 2000-04-01 17:20:29 +00:00
Andi Gutmans daf81344af - 2000-04-01 17:08:03 +00:00
Andi Gutmans 8a4805c831 - Intermediate commit 2000-04-01 17:02:32 +00:00
Zeev Suraski fc8c923bb2 Oh yeah, committing these would be a good idea:) 2000-04-01 16:49:39 +00:00
Zeev Suraski 06dab5e7e5 Several fixes 2000-04-01 16:48:08 +00:00
Zeev Suraski 491a315c11 @- Made the IMAP and LDAP modules compilable under Windows and thread-safe (Zeev) 2000-04-01 16:23:39 +00:00
Zeev Suraski 131d9cb2dc *** empty log message *** 2000-04-01 16:23:13 +00:00
Sam Ruby 47442c4c85 Don't try to install php_java.jar if --with-servlet was specified
(Fix to PHP 4.0 Bug #4001 submitted by sashi@easy.com.au)
2000-04-01 16:21:55 +00:00
Sascha Schumann 179672a980 Fix the HPUX 10.20 check for non-standard reentrant time functions 2000-04-01 16:00:34 +00:00
Sascha Schumann 007c325cc1 . 2000-04-01 15:51:34 +00:00
Zeev Suraski 983cc700a9 Have a standard way of exporting symbols 2000-04-01 15:16:11 +00:00
Sascha Schumann 77688ff3b5 Up version number to 4.0RC2-dev. (4.0-dev looks too general for now.) 2000-04-01 14:39:14 +00:00
Zeev Suraski 9e2fb7bb41 Use int 2000-04-01 14:36:41 +00:00
Zeev Suraski 0d21940d54 Generalize some common thread-safety stuff 2000-04-01 14:15:20 +00:00
Zeev Suraski ef426d467c Have a standard entry for the globals id 2000-04-01 13:20:51 +00:00
Zeev Suraski 53586378b0 @- Fix a problem when dealing with large POST blocks in CGI mode 2000-04-01 01:11:39 +00:00
Sterling Hughes eb224c7850 Added some things that I forgot to add when I did them. 2000-03-31 23:28:38 +00:00
Andi Gutmans 1bab18a00c - This shouldn't do any harm and might fix a problem with Win32 2000-03-31 22:48:59 +00:00
Andrei Zmievski cc6ca27dcb Would be good. 2000-03-31 21:57:09 +00:00
Zeev Suraski 0769927e01 That should be it 2000-03-31 19:55:33 +00:00
Zeev Suraski 5ed7a47a79 Remove more files 2000-03-31 19:54:44 +00:00
Zeev Suraski cf534695d2 Remove bindlib_w32 2000-03-31 19:46:49 +00:00
Zeev Suraski a82b3034b1 Several fixes, plus remove bindlib_w32 (it's more trouble than it's worth) 2000-03-31 19:46:35 +00:00
Zeev Suraski 708109e950 *** empty log message *** 2000-03-31 15:46:16 +00:00
Zeev Suraski 523f3cce5f The previous fix ended up being broken, this one should do it 2000-03-31 15:17:43 +00:00
Andi Gutmans 37282c9043 - One more update 2000-03-31 13:19:20 +00:00
Andi Gutmans fdc53674c8 - Add bindlib to the Win32 build 2000-03-31 13:08:58 +00:00
Andi Gutmans 38a4ccddb6 - Add bindlib_w32 to the PHP tree 2000-03-31 09:29:28 +00:00
Sam Ruby 8a64f51101 Use C style comments, per the CODING_STANDARDS 2000-03-31 00:53:45 +00:00
Andi Gutmans 24302e89e5 - Fix bug 2000-03-31 00:05:41 +00:00
Sascha Schumann 7dfcbd13c2 Remove trailing slash 2000-03-30 23:50:15 +00:00
Sam Ruby 57b4e1a3ee fix indentation (this project has tabstop=4!) 2000-03-30 23:35:55 +00:00
Sascha Schumann 2b1daf73eb * Include <stddef.h> for NULL
* Check for pthread_mutexattr_init() for improved SGI support
2000-03-30 23:35:26 +00:00
Sam Ruby 8a94c8d598 eliminate chdir if it is already virtual 2000-03-30 23:23:29 +00:00
Andi Gutmans 9c3d6304dd - Hopefully got most of them. We also need a chdir_file function like
for Apache.
2000-03-30 22:56:34 +00:00
Andi Gutmans 9df7df3293 - Baby steps... Use PHP_FOPEN() 2000-03-30 22:41:13 +00:00
Andi Gutmans 72b57c66f0 - Use PHP_CHDIR() 2000-03-30 22:39:29 +00:00
Andi Gutmans f9547241d5 - Fix another bug in session.c
- Start using the new PHP_GETCWD() and co. macros
2000-03-30 22:38:50 +00:00
Andi Gutmans 69a16e9693 - Fix compile bug in session_get_cookie_params() 2000-03-30 22:21:23 +00:00
Sterling Hughes ec9aae474a #Stylistic changes. 2000-03-30 20:02:21 +00:00
Sascha Schumann 27b736a192 Non-functional changes 2000-03-30 19:03:15 +00:00
Sascha Schumann 0a52ef6439 Build the bundled mysqlclient library thread-safe in thread-safe mode. 2000-03-30 19:02:52 +00:00
Sterling Hughes 149e6181e5 @-added session_get_cookie_params (sterling) 2000-03-30 18:50:09 +00:00
Zeev Suraski 5f6ad55543 Fix zend_register_extension() 2000-03-30 18:06:41 +00:00
Sascha Schumann f72bcaa648 kill warning 2000-03-30 17:55:50 +00:00
Sascha Schumann 1e31b7755c * Add --enable-libgcc which explicitly links against libgcc.
* Some cleanup and increased use of PHP_ARG_[ENABLE|WITH]
2000-03-30 15:00:30 +00:00
Sascha Schumann c97314257c Fix libpng and libz order and stuff the libjpeg into its own macro. 2000-03-30 14:59:23 +00:00
Andrei Zmievski 5cd7bf59b3 @- Fixed return of stristr() to no longer always be lowercased. (Andrei) 2000-03-30 14:34:46 +00:00
Sascha Schumann e282cefe20 . 2000-03-30 14:28:35 +00:00
Sascha Schumann fe92fef608 Allocate enough memory for additional /.
Also remove the extra check for the trailing /. Unix will automatically
apply s#/+#/#

Partly suggested by: drew@elysium.ltd.uk
PR: #3956
2000-03-30 12:55:59 +00:00
Andi Gutmans 0ccbd9d9ec - Bump up API number after Lars' change 2000-03-30 05:04:39 +00:00
Sascha Schumann 41eef61c69 Give another hint to BSD makes 2000-03-30 04:11:31 +00:00
Sascha Schumann 4179e85693 Propagate pthread_cflags to CXXFLAGS and INLINE_CFLAGS 2000-03-30 04:09:56 +00:00
Jim Jagielski 1469f420d6 Fix the problem with dbmopen() not being defined. Patch by
Geoff (geoff@mcrent.com) and The Red Fox
2000-03-30 02:42:28 +00:00
Sascha Schumann 3642282b07 Some OS prepend _ to symbol names while their dynamic linker
does not do that automatically. Thus we check manually for
_get_module.
2000-03-30 01:21:03 +00:00
Sascha Schumann c7040b71bc Specifically mention $(srcdir), so that OpenBSD's make gets it 2000-03-30 00:59:47 +00:00
Sascha Schumann 5e18db46c3 Specifically mention $(srcdir), so that OpenBSD's make gets it 2000-03-30 00:43:09 +00:00
Sterling Hughes 76a32c0ce8 fix bug 3971, SNMP now compiles on FreeBSD. 2000-03-30 00:19:24 +00:00
Zeev Suraski b7cd2bfa8e - Make the argument order for the stack applies more consistent with other Zend
data structures
- Fix a possible corruption problem due to switch() C-level optimization
2000-03-29 22:28:04 +00:00
Torben Wilson b543f9959c Missed Andrei's @ note... 2000-03-29 22:18:41 +00:00
Torben Wilson 521c8af6a4 Added !== (is not identical) operator. 2000-03-29 22:05:19 +00:00
Sascha Schumann f50de70308 GC now prints out how many session objects were removed 2000-03-29 20:37:29 +00:00
Sascha Schumann af9a852bf1 Improved error messages 2000-03-29 20:37:12 +00:00
Zeev Suraski 88041c4fc7 @- Changed the Windows version of PHP so that a php.ini file is no
@  longer mandatory (Zeev)
2000-03-29 19:45:15 +00:00
Zeev Suraski ee16ee2a38 *** empty log message *** 2000-03-29 19:44:44 +00:00
Zeev Suraski fcf0afce17 *** empty log message *** 2000-03-29 19:26:34 +00:00
Sascha Schumann 6c8f9bf3b4 Do not add dl function, if libdl is not present.
PR: #3947

Declare user_shutdown_function_name() as static to kill warning.
2000-03-29 17:33:44 +00:00
Andi Gutmans e9d126a7d3 - Make sure zend_API.h has Zend'ish versions of the ZEND macros so that
Zend'ish modules don't need to mix PHP & Zend notation.
2000-03-29 17:13:16 +00:00
Sterling Hughes 68d4298e71 #yikes stripes, didn't see that one
#its time to go to bed
Re-fixed return value of min and max
2000-03-29 12:43:13 +00:00
Sterling Hughes 2c975a2b06 single, sorta proto. 2000-03-29 11:38:47 +00:00
Sterling Hughes cc2c9d8f0f 1. Holy protos Batman.
2.  Converted some functions from using "return" to RETURN_FALSE
2000-03-29 11:19:01 +00:00
Thies C. Arntzen a692f15568 @- session_start() is now more verbose if headers cannot be send. (Thies) 2000-03-29 09:36:27 +00:00
Sterling Hughes 6db2262102 Tis protoriffic. 2000-03-29 01:39:04 +00:00
Egon Schmid 1a8dfac59d Sterling, only one line for the short descritption, even it is massiv. 2000-03-28 20:47:47 +00:00
Sterling Hughes 74d30dff7b *** empty log message *** 2000-03-28 20:26:02 +00:00
Sterling Hughes f76e0a4077 *** empty log message *** 2000-03-28 18:16:41 +00:00
Zeev Suraski a65971221f The checks for func_num_args() and friends were broken - fixed 2000-03-28 17:34:21 +00:00
Egon Schmid 27e5c89b21 Description differs between version 3 and 4. 2000-03-28 17:03:32 +00:00
Uwe Steinmann cdb7254384 - added pdf_open_image_file() to read jpeg, tiff, gif and png images 2000-03-28 16:45:05 +00:00
Sterling Hughes a4de43fe87 Couple of thangs:
1.  We've got protos!
  2.  The second half of the script is now most Zendiferous.
2000-03-28 01:38:50 +00:00
Sascha Schumann a97eccaba3 Use PHP_ARG_WITH 2000-03-27 23:43:00 +00:00
Sascha Schumann 1f822b98ce Welcome PHP_ARG_ENABLE and PHP_ARG_WITH. They are there to replace the common
AC_MSG_CHECKING, AC_ARG_[ENABLE,WITH], AC_MSG_RESULT trio.
2000-03-27 23:33:38 +00:00
Sascha Schumann 0cc5c94b37 Generate better skeleton config.m4 2000-03-27 22:52:48 +00:00
Sascha Schumann 31803785fd These should not be exported 2000-03-27 22:40:49 +00:00
Sascha Schumann 2cb0e69b51 * Check the default location of Berkeley DB 3.0
* Check additionally for libdb-3
2000-03-27 22:40:27 +00:00
Zeev Suraski a3ac1e5e59 That's one thing @ missed... 2000-03-27 20:00:51 +00:00
Sterling Hughes 0340340673 Slight change for time on the return side.
@-Added 'I' switch to test whether or not DST is active.
2000-03-27 18:11:33 +00:00
Sterling Hughes 3f029b61e8 *** empty log message *** 2000-03-27 16:35:01 +00:00
Sterling Hughes 6fb861d7a8 *** empty log message *** 2000-03-27 16:21:15 +00:00
Rasmus Lerdorf df03379b4e GNU make is not required 2000-03-27 01:35:17 +00:00
Sam Ruby 4ce6480745 Remove debug libraries from debug build 2000-03-27 01:00:21 +00:00
Sam Ruby fea19e97db Whoops! Not everybody want Java included by default! 2000-03-27 00:55:18 +00:00
Rasmus Lerdorf a582ce8735 Update the INSTALL docs 2000-03-27 00:33:47 +00:00
Sam Ruby 69d7ea4f30 Remove debug runtime libraries from Release builds 2000-03-27 00:18:59 +00:00
Sam Ruby e4b86c2cd5 support non-debug builds 2000-03-26 20:24:55 +00:00
Sam Ruby b280bec492 support non-debug builds 2000-03-26 20:01:59 +00:00
Sascha Schumann 5d568a2e22 PHP_EXTENSION sets $ext_src_base 2000-03-26 19:51:10 +00:00
Sascha Schumann b4db46606e Some white-space changes 2000-03-26 19:47:28 +00:00
Sascha Schumann 6da32c3314 Ignore errors at this place 2000-03-26 19:46:42 +00:00
Sascha Schumann 491792e0d0 Allow MySQL to be compiled against extern mysqlclient library 2000-03-26 19:46:11 +00:00
Zeev Suraski 8419dc332b Use compression for makedist 2000-03-26 19:26:09 +00:00
Zeev Suraski 8c79054ad2 Package RC1 2000-03-26 19:18:59 +00:00
Andi Gutmans 7fd92b524d - Stop zend_func_args() and co. from crashing 2000-03-26 18:40:24 +00:00
Zeev Suraski b43f85d641 - Change new -> result. Using C++ keywords isn't too hot 2000-03-26 17:06:19 +00:00
Andi Gutmans 9df63e183e - Didn't see Thies' commit message although I can't really see how it would
make a difference
2000-03-26 16:28:37 +00:00
Andi Gutmans b763b25c96 - Include Andrea's fix for alloca.h 2000-03-26 16:00:35 +00:00
Sascha Schumann 3b2bcf3c41 Fix internal_functions.c screwup for people not using --with-mm 2000-03-26 15:26:15 +00:00
Thies C. Arntzen 7ec4e5e21b <alloca.h> needs to be included before we define macros calling alloca()
atleast using SGI's cc - should not harm other platforms (i hope)
2000-03-26 14:46:25 +00:00
Sterling Hughes 6a048bfd64 Return value corrected. 2000-03-26 14:43:24 +00:00
Thies C. Arntzen 7b31a19305 no c++ comments // please 2000-03-26 14:27:10 +00:00
Thies C. Arntzen 70003624fa fix cast 2000-03-26 14:25:20 +00:00
Chuck Hagenbuch db546462b6 imap_clearflag_full now returns true appropriately. 2000-03-26 04:34:05 +00:00
Sam Ruby fcd82d34c5 JAVA_LIBPATH was not allways being added to the LIBPATH 2000-03-26 04:31:53 +00:00
Sascha Schumann a2d42419a5 Revamp session's config.m4 and reenable support for mm. The shared memory
module works now successfully again under Apache and other web servers.
2000-03-26 02:47:00 +00:00
Zeev Suraski a0f70aa618 @- Fix a data corruption bug in mysql_result(), if used in table.fieldname mode (Zeev)
Hopefully that settles this one.
2000-03-26 02:01:11 +00:00
Sascha Schumann 04daa555aa Add MSIE 5-specific Cache-Control fields 2000-03-26 00:43:56 +00:00
Sterling Hughes b880fb5bcc Tid Bit More. 2000-03-25 22:27:30 +00:00
Zeev Suraski 96f01b1414 Update .dsp's 2000-03-25 20:25:10 +00:00
Sterling Hughes a9f0e0176b - snmpwalkoid is an alias now
- small optimizations
- delete that switch case in php_snmp
  =The different functions are now in the PHP_FUNCTION declaration thingies
- If-else blocks have brackets
2000-03-25 19:58:19 +00:00
Andi Gutmans 2572b088d0 *** empty log message *** 2000-03-25 19:23:16 +00:00
Zeev Suraski 863e6fd242 - Update dsp
- Remove unnecessary includes
2000-03-25 19:17:41 +00:00
Zeev Suraski 5dba477467 - Some header dependencies cleanup
- Generalize zval_print() and zval_print_r()
2000-03-25 19:10:07 +00:00
Andi Gutmans 18e1e63e78 - Support getcwd() semantics.
- We need to change this whole business to work with ZTS globals
2000-03-25 16:28:16 +00:00
Sam Ruby 6a7bc777ca Dynamically load java support, for better error messages 2000-03-25 15:57:04 +00:00
Sam Ruby 1e4e9b34e2 RTLD_NOW => RTLD_LAZY|RTLD_GLOBAL 2000-03-25 15:40:08 +00:00
Zeev Suraski 7e576d36e8 Update dsp's 2000-03-25 15:35:35 +00:00
Thies C. Arntzen c8d0be50c5 andrei, i'm sure we're missing some @ entries in NEWS (this one is one of them) 2000-03-25 12:12:04 +00:00
Sterling Hughes c0cede82f1 Fixed a few protos and ... 2000-03-25 04:05:13 +00:00
Zeev Suraski 1239651126 @- Modified the registry INI entry reader (Win32) to work with drive letters. For
@  example, if you wish to wish to specify INI entries for C:\foo\bar, you should
@  create HKLM\PHP\Per Directory Values\C\foo\bar in the registry, and add
@  string values for each directive you want to override in this directory (Zeev)
2000-03-25 01:32:47 +00:00
Zeev Suraski 5bdd53972f - Fixed a crash when sending a non-variable expression to a runtime-bound function
that expected a reference.
2000-03-24 23:51:34 +00:00
Andrei Zmievski 7b02e9fc35 @- Fixed extract() for EXTR_PREFIX_SAME and EXTR_SKIP cases. (Andrei) 2000-03-24 14:56:19 +00:00
Andi Gutmans 5b2bad3825 - Nuke hash_*_ptr() functions 2000-03-24 11:16:24 +00:00
Andi Gutmans 6db18997bb - Nuke hash_*_ptr functions 2000-03-24 11:12:30 +00:00
Uwe Steinmann 334bde365c - several clean ups 2000-03-23 19:00:21 +00:00
Andrei Zmievski 0eaa79e4eb Use WRONG_PARAM_COUNT. 2000-03-23 18:40:55 +00:00
Zeev Suraski 7bd5794a07 - Make it compile 2000-03-23 18:31:18 +00:00
Andrei Zmievski 92ca446e47 Added get_class_methods(). 2000-03-23 17:54:02 +00:00
Andrei Zmievski 40e99c5e9f Added get_class_methods(). 2000-03-23 17:47:28 +00:00
Andi Gutmans 326f69f54e - Change Zend version as API has changed 2000-03-22 19:07:47 +00:00
Zeev Suraski 2e68fc59e3 - Wrong fix 2000-03-22 18:43:25 +00:00
Zeev Suraski 4d68c944d9 - Only free when result != op1 2000-03-22 18:36:02 +00:00
Thies C. Arntzen 3e99a228df @- stristr() no longer modifies it's arguments. (Thies)
fix #3890
2000-03-22 08:14:00 +00:00
Andrei Zmievski 7c003f8c0c Attribution. 2000-03-21 20:50:56 +00:00
Andi Gutmans 7acbcc9601 - Adjust for change in zend_startup() 2000-03-21 19:04:34 +00:00
Andi Gutmans 13e7413182 - Change zend_startup to accept a flag for starting builtin functions 2000-03-21 19:01:19 +00:00
Andi Gutmans bf18f87644 - Move #defines 2000-03-21 18:48:28 +00:00
65ccee97a6 ChangeLog update 2000-03-21 02:09:09 +00:00
6bd7d3db64 NEWS update 2000-03-21 02:09:06 +00:00
Andrei Zmievski 4ab3d2d22c Please use @ in front of _all_ lines intended for NEWS file. 2000-03-20 14:50:56 +00:00
Rasmus Lerdorf c32e09f791 As it turns out, there are some browsers that can't handle default
charsets.  I think forcing this on is going to cause us a lot of headache,
so turn it off by default.
@ Don't default to iso-8859-1 since this confuses some browsers
2000-03-20 08:19:51 +00:00
Rasmus Lerdorf 49c32728af Make it possible to specify both a port and a socket in mysql_[p]connect
@ Make it possible to specify both a port and a socket in mysql_[p]connect
2000-03-20 07:40:56 +00:00
Egon Schmid 48fc7c447f Fixed a proto. 2000-03-20 06:46:58 +00:00
7ef5212400 ChangeLog update 2000-03-20 02:09:10 +00:00
Chuck Hagenbuch 36912e5ff9 initial function prototypes 2000-03-19 23:39:05 +00:00
Rasmus Lerdorf 82aa0d1404 Leave sendmail_path commented out to pick up compiled-in default 2000-03-19 23:07:57 +00:00
Ted Rolle Jr d5ad9de048 Added new function: imap_mime_header_decode
Decodes mime header elements in accordance with RFC 2047.
2000-03-19 22:59:08 +00:00
Andi Gutmans 1c8c9ad231 - Quick fopen() support. The code needs some cleaning up and we might
need to think of performance issues with the strdup()'s (definitely
  use strndup() and maybe try to do with less string copies).
2000-03-19 21:10:48 +00:00
Shane Caraveo 073b7acc90 I suppose errors should be printed prior to endthread 2000-03-19 18:24:09 +00:00
Shane Caraveo 42c874ba5f do this only on win32 2000-03-19 18:22:11 +00:00
Shane Caraveo 0bf6633452 just a little more detail in exception report 2000-03-19 17:59:05 +00:00
Shane Caraveo 90ad09dc1d libmysql must use USE_TLS for multithreaded compilation on windows. 2000-03-19 17:34:01 +00:00
Sascha Schumann e5ceb99a1e Fix build problems with UCD-SNMP 4.1.x.
First, we need to include default_store.h.

Second, UCD-SNMP supports OpenSSL now, so we additionally need to
link against that.

The changes should be completely backwards-compatible.

Partly suggested by: thor2001@gmx.net
PR: #3451, #3668, #3868
2000-03-19 12:38:53 +00:00
Sascha Schumann 5366478e18 Cleanup 2000-03-19 12:09:01 +00:00
Thies C. Arntzen 7db7884e8c (var_dump) removed "refcount-hack" - comiles without warning again (&works). 2000-03-19 11:08:07 +00:00
Thies C. Arntzen 245428b241 fix some protos 2000-03-19 10:56:40 +00:00
Thies C. Arntzen 3b88c31bfc kill warning 2000-03-19 10:50:48 +00:00
d015d47527 ChangeLog update 2000-03-19 02:09:13 +00:00
6e6eb6002b NEWS update 2000-03-19 02:09:10 +00:00
Sander Steffann ec52ce44a9 A small fix when checking for libjpeg 2000-03-18 23:23:39 +00:00
Sascha Schumann 827ad656cb @- Added --disable-pic for disabling generating PIC for shared objects
on platforms which support it (i.e. Linux) (Sascha)

Additionally, we enforce passing pthread_cflags to the compiler, if
libtool chooses it as linker.
2000-03-18 17:58:09 +00:00
Sascha Schumann 608b96a8aa Make it compile 2000-03-18 17:50:43 +00:00
Andi Gutmans e88bde0a73 - Fix compile problem on FreeBSD. 2000-03-18 16:16:15 +00:00
Andi Gutmans 8b8077709e - Fix compile problem on FreeBSD 2000-03-18 16:11:42 +00:00
Andi Gutmans 512ff32f87 - No reason for refcount to be signed and move to zend_* typedefs 2000-03-18 16:00:30 +00:00
Thies C. Arntzen f5a77d04ff *** empty log message *** 2000-03-18 15:05:19 +00:00
Thies C. Arntzen e4df84a8da (serialize/unserialize) _sleep_() -> __sleep(), _wakeup_() -> __wakeup() rename. 2000-03-18 15:04:02 +00:00
Thies C. Arntzen 3092c10e93 renamed _string_value_() to __string_value(). 2000-03-18 14:55:29 +00:00
Zeev Suraski c059cd6181 *** empty log message *** 2000-03-18 14:51:58 +00:00
Zeev Suraski caf9049ae1 The third argument to define() wasn't working right, fixed 2000-03-18 14:45:29 +00:00
Zeev Suraski 0b8ea28832 false wouldn't automaticaly switch to an array type, which resulted in an
incompatibility with PHP 3.  Fixed.
2000-03-18 14:28:03 +00:00
cf6a2b1621 ChangeLog update 2000-03-18 02:09:09 +00:00
Hartmut Holzgraefe 1e0b71df1f is_executable() for root fixed
this is an intermediate patch, switching from stat() to
access() for is_(readable|writable|executable) shall
fix the whole topic once and for all
2000-03-17 12:41:55 +00:00
Andi Gutmans 959a550780 - Fix Win32 compile 2000-03-17 10:25:23 +00:00
0979233f5a ChangeLog update 2000-03-17 02:09:19 +00:00
9d3ca44e4d NEWS update 2000-03-17 02:09:16 +00:00
Sterling Hughes b3ecf2feaf ftruncate returns 1 on success and 0 on failure instead of 0 on success and -1 on failure. 2000-03-17 00:44:55 +00:00
Andi Gutmans cd83fb18c0 - Last one for today. 2000-03-16 22:46:53 +00:00
Andi Gutmans b46c44b485 - Allow passing of a verify function. This way we can easily create
chdir() and expandpath() wrappers.
2000-03-16 22:37:59 +00:00
Andi Gutmans 1bcdb436c1 - Note quite sure why this wasn't done. 2000-03-16 21:23:24 +00:00
Sascha Schumann 2a3fdcb73d Cleanup 2000-03-16 19:19:14 +00:00
Sascha Schumann 8c9388c984 Merge in local changes 2000-03-16 19:14:13 +00:00
Andi Gutmans 14f76028aa - php_is_dir_ok() should work on Windows now. 2000-03-16 19:10:01 +00:00
Andi Gutmans c46d1e3402 - Fix a leak (I think) 2000-03-16 18:56:08 +00:00
Andi Gutmans 5c281c6116 - Make it compile on Windows. 2000-03-16 18:52:15 +00:00
Sascha Schumann f0d631ad8f Use old_state 2000-03-16 18:41:02 +00:00
Sascha Schumann 1ed113d925 (php_check_dots) we don't need len 2000-03-16 18:37:34 +00:00
Sascha Schumann 3cb7cf43de virtual_chdir:
* added error handling
* fixed the special case where there were more DIRECTORY_UPs than
  directory parts (i.e. cwd is d:\foo and path is ../..)
* no spaces between # and preprocessor directive - breaks some compilers
# added directory-existence check (not activated)
2000-03-16 18:25:47 +00:00
Sam Ruby 74169f5fc4 restore compilation on ZTS enabled environments (like Windows) 2000-03-16 18:24:43 +00:00
Andi Gutmans 0583ae2648 - Add initial virtual_getcwd() and virtual_chdir() for discussing with the
rest of the folks
2000-03-16 16:54:42 +00:00
Andrei Zmievski ddf3740cf9 @ Added is_numeric() that returns true if the argument is a number
@ or a numeric string. (Andrei)
2000-03-16 16:02:23 +00:00
Thies C. Arntzen 033209b061 share some thoughts 2000-03-16 03:14:03 +00:00
Thies C. Arntzen f856855efd *** empty log message *** 2000-03-16 02:18:24 +00:00
Thies C. Arntzen 0fe5aef05e @- serialize()/unserialize() now call _sleep_() and _wakeup_() when
@  working on objects. (Thies)
@- renamed to_string() method to _string_value_() for consistency.
@  (Thies, Zend library)
2000-03-16 02:15:41 +00:00
Thies C. Arntzen a4bf381557 renamed "to_string" -> "_string_value_" 2000-03-16 02:09:47 +00:00
b28d6b50c2 ChangeLog update 2000-03-16 02:09:06 +00:00
Joey Smith 73b732a31c Adding .cvsignore to ext/recode 2000-03-15 23:27:23 +00:00
Sascha Schumann 7658768705 Use CPPFLAGS for reentrancy/thread flags 2000-03-15 21:40:03 +00:00
Andi Gutmans c56df5cac0 - WIN32 -> PHP_WIN32 2000-03-15 19:12:41 +00:00
Zeev Suraski 15dd8e61a2 - Fix newly introduced problem reported by Sam Ruby 2000-03-15 17:32:29 +00:00
Andrei Zmievski ee286febe7 Make zend_hash_move_forward()/zenv_hash_move_backwards() a little smarter. 2000-03-15 16:25:59 +00:00
Zeev Suraski f30765e1a0 - Fix warning (I thought I fixed this one before) 2000-03-15 16:18:21 +00:00
Uwe Steinmann 83304f3d2c - support for libxml 2.0 beta 2000-03-15 15:08:08 +00:00
Sam Ruby cc64b583fb Update README to indicate improvements in overload resolution and
easier configuration.

Add an entry for the Blackdown JDK on Linux, and a note as to why the Sun
JDK on Linux can't be supported at this time.
2000-03-15 14:28:34 +00:00
Sam Ruby 2702340dd9 Emulate user/group/other on Windows 2000-03-15 11:52:07 +00:00
Sam Ruby 3e5398ffba Cleanup, better error recovery, easier configuration 2000-03-15 10:35:38 +00:00
Uwe Steinmann 6ac297fbc1 - changed libgz to libz (Bug #3614) 2000-03-15 08:09:14 +00:00
Thies C. Arntzen 77b158159f . 2000-03-15 02:12:02 +00:00
Sam Ruby 2cb6e338a1 Get Blackdown support to compile. Doesn't seem to be able to find
classes yet...

It looks like the current Sun JDK 1.2.2 won't be able to be supported.
Green_threads don't work with JVM Initialization, and Sun doesn't support
native_threads yet...
2000-03-15 02:11:27 +00:00
ca7fcf038f ChangeLog update 2000-03-15 02:09:11 +00:00
95fa99702c NEWS update 2000-03-15 02:09:08 +00:00
Egon Schmid ae67ddc318 One space character is enough. 2000-03-14 21:47:47 +00:00
Andrei Zmievski 26eaf668e7 Implemented external list traversing. 2000-03-14 21:20:38 +00:00
Egon Schmid 29c41fe46d Thies, please check the function names and descriptions. 2000-03-14 21:17:07 +00:00
Uwe Steinmann db065413d1 - fixed invalid class names
- added standalone, encoding attribute to DocDocument class
2000-03-14 20:58:10 +00:00
Hartmut Holzgraefe 553eb2391d I SHALL NOT TOUCH MY EMACS BETWEEN COMPILE AND CHECKIN !!!
I SHALL NOT TOUCH MY EMACS BETWEEN COMPILE AND CHECKIN !!!
I SHALL NOT TOUCH MY EMACS BETWEEN COMPILE AND CHECKIN !!!
2000-03-14 20:41:31 +00:00
Hartmut Holzgraefe b19d1bdb0f imap_utf7_encode didn't expand international characters to 16bit
before coding
imap_fetch_overview could crash when some fields where missing
imap_fetch_overview will now take msg indices for default and
   UIDs by optional flag, as the other functions in the family
2000-03-14 20:20:43 +00:00
Andi Gutmans bc8e138250 - Allow array(1,2,3,) i.e. with trailing comma. You can only have one
trailing comma.
2000-03-14 15:37:15 +00:00
Thies C. Arntzen 49cc8a7805 @- fixed possible crash in unserialize if the serailized data was
@  damaged. (Thies)
2000-03-14 07:49:42 +00:00
Andi Gutmans 50a2574e97 - ELS are passed to internal functions 2000-03-14 05:15:33 +00:00
adc620708b ChangeLog update 2000-03-14 02:09:11 +00:00
4e21e2ee2e NEWS update 2000-03-14 02:09:08 +00:00
Egon Schmid 69c2faf510 Fixed some protos. 2000-03-13 20:36:59 +00:00
Zeev Suraski 84569c08fc - 2000-03-13 18:01:43 +00:00
Zeev Suraski fe37f4bca9 - Spare a byte :) 2000-03-13 17:59:30 +00:00
Andi Gutmans e7eccd2438 - Change Zend license version 2000-03-13 17:08:18 +00:00
Andi Gutmans 61379fe0c3 - Another zend_uchar 2000-03-13 15:59:24 +00:00
Andi Gutmans 7fc5c94478 *** empty log message *** 2000-03-13 15:49:47 +00:00
Andrei Zmievski ac7d60ecec Changed HTTP_STATE_VARS to HTTP_SESSION_VARS.
@ Changed $HTTP_STATE_VARS to $HTTP_SESSION_VARS. Use only the latter
@ version now! (Andrei)
2000-03-13 15:49:13 +00:00
Andi Gutmans e92f6f15cb - define zend_uint and zend_uchar and use them in a few places 2000-03-13 15:43:40 +00:00
Andrei Zmievski a32c54bdbb Introduced a way to traverse hashes through external pointers. 2000-03-13 15:25:18 +00:00
Andreas Karajannis 773d0560f2 odbc_close() and odbc_close_all() working again 2000-03-13 15:22:47 +00:00
Andi Gutmans 712ffd4c14 - Change type from int -> char 2000-03-13 15:11:07 +00:00
Zeev Suraski ea033715a9 - Fix filename/lineno initialization for do_return 2000-03-13 14:15:23 +00:00
Sam Ruby 9c146016d3 remove java.library from the README 2000-03-13 11:51:17 +00:00
Rasmus Lerdorf 9c192f526e # Oops - functions with multiple optional args suck 2000-03-13 10:09:02 +00:00
Andi Gutmans 70eb0c78f8 - Also check module API number 2000-03-13 06:00:36 +00:00
Rasmus Lerdorf da4f3edac4 gd-jpeg support
@Add GD-JPEG Support (Rasmus)
2000-03-13 05:58:50 +00:00
2f23538ba0 ChangeLog update 2000-03-13 02:09:09 +00:00
Sam Ruby 6e2c7e5137 Eliminate java.library ini option in favor of rpath 2000-03-13 01:11:36 +00:00
Chuck Hagenbuch 65b6639481 Adding imap_rfc822_parse_headers(). This function lets you grab mail headers
from anywhere - a saved message in an archive, a pop server, a database, etc
- and parse them into an object similar to what imap_headerinfo() returns.
It's just missing the flag info and other things that only come from the
IMAP server.

In the process of doing this, I seperated some more code out into a support
function - _php_make_header_object() - since it was used in multiple
functions. The module is slowly getting well organized.
2000-03-12 20:47:21 +00:00
Chuck Hagenbuch 20cc50db4c spelling correction, and rename make_event_object to _php_make_event_object
for consistency.
2000-03-12 20:02:41 +00:00
Jouni Ahto bd1140e71d # Compiles. Doesn't work yet. Unless leaking memory counts as 'working'.
# Trying to finish before RC1...
2000-03-12 19:44:23 +00:00
Kristian Köhntopp 85940d676f Finished porting recode module. 2000-03-12 19:42:29 +00:00
Chuck Hagenbuch fa5ab18f2e pval->zval
use the *_ex() functions
use zend_get_parameters_ex

Tested on my calendar code, and seems to be crash free. But I think I'll
wait on converting the IMAP module, since this was quite a pain. :)
2000-03-12 19:28:53 +00:00
Kristian Köhntopp 63fb0326e9 - using _ex() functions now, thanks to Andrej. 2000-03-12 19:08:52 +00:00
Zeev Suraski d0b9a3989b - Define these ones and declare them in modules.h 2000-03-12 18:13:01 +00:00
Zeev Suraski 05cf4423b9 - 2000-03-12 18:08:46 +00:00
Andi Gutmans 05aa5cb831 - Guessing this is the problem 2000-03-12 17:49:08 +00:00
Sascha Schumann bb09ee9505 Use sprintf everywhere and define sprintf to php_sprintf, if sprintf is broken. 2000-03-12 17:18:21 +00:00
Sascha Schumann 00c14f7413 Also search for freetype headers in $prefix/include/freetype
PR: #3775
2000-03-12 15:52:14 +00:00
Sascha Schumann caeaaf4d98 Fix build on systems which lack snprintf or vsnprintf.
PR: #3786
2000-03-12 15:47:34 +00:00
e20b13751b ChangeLog update 2000-03-12 02:09:12 +00:00
61b1fe45d2 NEWS update 2000-03-12 02:09:09 +00:00
Leo Baschy 355eda0cf3 remove recent patch to _close_odbc_conn calling _free_odbc_result 2000-03-12 01:03:23 +00:00
Andrei Zmievski 7cd40d3a53 Nuke DEBUG. 2000-03-11 22:22:31 +00:00
Kristian Köhntopp 1aba4ea9d0 - Added additional DEFER macro.
- First stab at porting the recode module. Still having problems
  with the _ex() functions, they core - why?
2000-03-11 22:05:41 +00:00
Andi Gutmans 649d8721db - Oops I commited a name change for consistency of Zend/modules.h to
Zend/zend_modules.h before it being finished. Revert it
2000-03-11 20:57:35 +00:00
Andi Gutmans 9dca788ca0 - Don't define DEBUG anymore. Everyone should use PHP_DEBUG.
There are 2-3 third-party libs in PHP which use DEBUG and I left them
  this way (primary example is pcrelib).
- Please test things and Andrei, can you check that pcrelib stopped
  printing the warning messages?
2000-03-11 20:48:49 +00:00
Andi Gutmans fe558092e4 - Don't load modules which have different debug and ZTS information than
PHP() (untested). Not sure how to handle API version. Should it also not
  load? It probably should but it might bite us at some point.
@ Prevent from loading dynamic PHP modules which were compiled with different
  debug and thread safety modes than PHP, which resulted in a crash (Andi)
2000-03-11 16:23:30 +00:00
Sascha Schumann 781b6e9435 Upgrade to libtool 1.3.4 2000-03-11 12:33:10 +00:00
Sam Ruby d63341ea5f Unix classpath fixes 2000-03-11 12:05:17 +00:00
Sascha Schumann 4a50fde509 mkextlib is not created anymore 2000-03-11 11:36:46 +00:00
Sascha Schumann cc14640f17 We don't need mkextlib anymore 2000-03-11 11:20:09 +00:00
Chuck Hagenbuch 7b346d0a12 switching the order of arguments of mcal_week_of_day() to be more flexible -
day, month, year now so that month and year can be defaulted at some point.
this is also consistent with the library function.
2000-03-11 05:40:22 +00:00
Chuck Hagenbuch f42a770f65 Add mcal_week_of_year(), submitted by jtaskine@hit.fi. 2000-03-11 02:15:14 +00:00
b460dcfa0a ChangeLog update 2000-03-11 02:09:12 +00:00
c405b64e57 NEWS update 2000-03-11 02:09:09 +00:00
Andi Gutmans 51c10e49dd - Remove inline from functions which are pretty large and besides eating up
memory in compile time probably doesn't boost performance.
2000-03-11 01:13:10 +00:00
Andrei Zmievski 715aa0388c Add generated file. 2000-03-10 22:23:17 +00:00
Andrei Zmievski 8ad55cbd94 Reminder. 2000-03-10 22:23:01 +00:00
Andi Gutmans 88c98d3e3f - Seems to be a problem here with the return value not being set 2000-03-10 21:22:48 +00:00
Andi Gutmans eedd3ac4d0 - Use strlcpy() insted of strcpy() 2000-03-10 18:19:08 +00:00
Andi Gutmans f3cd07fe7d *** empty log message *** 2000-03-10 16:50:53 +00:00
Andi Gutmans 5951b166c8 - Quick way of supporting include_once().
Good enough for RC1.
2000-03-10 16:36:30 +00:00
Andi Gutmans b5de395367 - Support require_once(). 2000-03-10 16:04:16 +00:00
Andi Gutmans 9cc704421a - Cleanup old IMPORT stuff 2000-03-10 15:05:00 +00:00
Andi Gutmans d609112c0e - Nuke import, add include_once and include_require scanner/parser rules.
Hope to nuke use too :)
2000-03-10 15:01:21 +00:00
Andi Gutmans cf89b8db5a - That broke the Win32 build 2000-03-10 12:26:59 +00:00
Uwe Steinmann fc1bc7102f - replaced some old code to access server variables 2000-03-10 11:36:27 +00:00
Andi Gutmans 29ed30f77c - Fix a bug and define an API_NO for the ZEND_MODULE_API 2000-03-10 10:14:05 +00:00
Andi Gutmans ab5ca792e4 - zend_config.h is enough 2000-03-10 08:36:04 +00:00
Andi Gutmans 909f3af8dc - Weird that this wasn't caught earlier 2000-03-10 08:34:13 +00:00
Andi Gutmans 3bd9e02380 - Save ZEND_DEBUG, ZTS, ZEND_API information 2000-03-10 08:28:54 +00:00
Thies C. Arntzen 9d0c2484c0 @- connection_aborted() and friends work again. (Thies) 2000-03-10 03:09:49 +00:00
ce562b6280 ChangeLog update 2000-03-10 02:09:08 +00:00
Leo Baschy db33bb8ff6 _close_odbc_conn calls _free_odbc_result if possible 2000-03-09 22:19:57 +00:00
Sascha Schumann f6460bfe6f VPATH builds were broken, if the user specified the path to configure
using an absolute path. With this change, absolute and relative paths
are accepted and processed correctly.
2000-03-09 22:07:10 +00:00
Stig Bakken 81ff62c271 PEAR now uses "use" instead of "include". 2000-03-09 21:57:14 +00:00
Sascha Schumann e8cf4a40d4 Fix build problem on systems where ulong is not defined.
There ulong was defined to `unsigned long long' resulting
in compile-time problems in libmysql. The client library
uses `ulong' an `unsigned long' interchangeable.

The removed tests are performed by the Zend library, thus
this change has no negative impact.

Reported by: Dan Larsson <dl@tyfon.net>
2000-03-09 17:30:08 +00:00
Andi Gutmans 5b570ecc01 - Fix bug in syntax highlighter 2000-03-09 16:02:05 +00:00
Uwe Steinmann bf87ec7aeb - fixed cpdf_set_font() error 2000-03-09 14:59:05 +00:00
Uwe Steinmann 69ee40691f - ups, fixed stupid compile errors 2000-03-09 14:53:30 +00:00
Uwe Steinmann 045653dfed - dropped support for version of pdflib < 3.0
- better detection of libs required for pdflib
2000-03-09 14:41:15 +00:00
Sam Ruby e24e95bdec Both PHP and Java can't read Post data - let java do it and reconstruct for
PHP.
2000-03-09 13:07:25 +00:00
Uwe Steinmann ff2443eb67 - bug fix, insertion of links back into HTML document
- smarter test script
2000-03-09 12:45:55 +00:00
Sam Ruby ba50898123 remove duplicate line 2000-03-09 04:04:05 +00:00
Thies C. Arntzen 9abeb4819f (OCILogon) fixed crash in OCILogon if username was not valid (newly introduced - no need for a NEWS entry) 2000-03-09 02:42:38 +00:00
1a3864b15c ChangeLog update 2000-03-09 02:09:09 +00:00
Uwe Steinmann d037fdc8be - several fixes and cleanups in hw module 2000-03-08 17:51:58 +00:00
Andrei Zmievski b5e13a0f97 Typo. 2000-03-08 15:04:19 +00:00
Andrei Zmievski 96351ba5ee blah 2000-03-08 15:02:41 +00:00
Andrei Zmievski 5f883e802a Anything in $HTTP_SESSION_VARS[] is auto-registered, if register_globals
is turned off.
2000-03-08 14:57:26 +00:00
3852f8076f ChangeLog update 2000-03-08 02:09:10 +00:00
Uwe Steinmann 70a6f84862 - support for pdflib 3.0 2000-03-07 20:51:15 +00:00
David Hedbor 71a4bdc882 Changed typo (interpretor->interpreter) 2000-03-07 20:20:42 +00:00
Sascha Schumann 77fb7d2b64 Write configuration parameters into `config.nice', so you can redo the
same configuration with exactly one command.
2000-03-07 18:05:16 +00:00
Uwe Steinmann bd418f0741 - quick hack to support pdflib 3.0 (not tested) 2000-03-07 17:29:25 +00:00
Sascha Schumann 9b98d3ca0b Try to locate the mysql.sock 2000-03-07 16:56:17 +00:00
Sascha Schumann a2121549aa Move the sincludes outside of AC_DEFUN(), so PHP can use the macros 2000-03-07 16:49:17 +00:00
Andi Gutmans 6e1ad8c00d - Enable MySQL by default 2000-03-07 16:33:30 +00:00
Andrei Zmievski 213491a146 Expanded checking for pcre.h and libpcre.a. 2000-03-07 16:12:35 +00:00
Andi Gutmans 2d2c494970 - Thies, it is crucial :) 2000-03-07 15:50:51 +00:00
Sam Ruby fa56e42b08 Sapi/servlet build on Unix broken 2000-03-07 15:41:34 +00:00
Uwe Steinmann a9f7101365 - some cleanups and fixed memory leak 2000-03-07 14:53:02 +00:00
Sam Ruby acdeb47444 Include metaphone on win32 builds 2000-03-07 14:43:39 +00:00
Sam Ruby 57f3e61220 Unresolved external php_if_ftruncate on Win32 2000-03-07 14:41:33 +00:00
Sascha Schumann 1ceb19f196 Use threads.m4 2000-03-07 13:27:37 +00:00
Sascha Schumann 05024cb094 Use improved POSIX threads check from threads.m4
This is shared between some projects (currently Apache 2.0, mhash, mcrypt)
2000-03-07 13:24:12 +00:00
Uwe Steinmann 4cb71a069b - switch to zend's double link list finished 2000-03-07 13:16:01 +00:00
Sam Ruby ec8add1a4c Only define crypt if it is present 2000-03-07 12:28:06 +00:00
Andrei Zmievski ae11f08d69 Can't believe it hasn't been done yet. 2000-03-07 04:28:43 +00:00
Andrei Zmievski 9f870d1e6c Kill warning. 2000-03-07 04:28:29 +00:00
Thies C. Arntzen 3b6d718f18 (php: dl) fixed MAXPATHLEN bug
# now it's /* SAFE */ !
2000-03-07 03:43:03 +00:00
f5c0eb98c4 ChangeLog update 2000-03-07 02:09:12 +00:00
d5005ff5d7 NEWS update 2000-03-07 02:09:09 +00:00
Sam Ruby fa7f4d1e6a It looks like a number of "standard" extensions are now truly builtin... 2000-03-07 01:50:02 +00:00
Sascha Schumann d69b38ea65 Change default UNIX sock to /tmp/mysql.sock 2000-03-06 23:12:56 +00:00
Sascha Schumann 12b2f2af8f Build fixes - MySQL now actually works 2000-03-06 22:38:49 +00:00
Stig Bakken 99e0b36321 @Cleaned up extension namespace (Stig)
Cleaned up extension namespace, and changed ext/standard into one single
extension.
2000-03-06 20:37:11 +00:00
Sascha Schumann 031808cd1b update 2000-03-06 20:14:18 +00:00
Stig S. Bakken b6bc7dcd10 added GINIT_FUNC_ARGS and GINIT_FUNC_ARGS_PASSTHRU 2000-03-06 20:13:04 +00:00
Sascha Schumann 5864290d20 Finish config.m4 changes 2000-03-06 20:12:12 +00:00
Sascha Schumann 0c3b839af9 Build always against embedded library 2000-03-06 20:06:55 +00:00
Sascha Schumann 4bc0565d14 Modularize mysql autoconf stuff 2000-03-06 20:06:23 +00:00
David Hedbor 42ca607e71 Use php_module_shutdown_wrapper as the shutdown function 2000-03-06 19:27:59 +00:00
David Hedbor 09ab7fc6ca Use 2000-03-06 19:26:39 +00:00
Zeev Suraski ca737cc01f - Bump up Zend's API version 2000-03-06 19:25:08 +00:00
Stig S. Bakken 4562f7b6d7 Added ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU. 2000-03-06 18:46:10 +00:00
Stig Bakken d02fe90b00 Change extension names in all extensions' zend_module_entry to their
directory name.
2000-03-06 18:44:01 +00:00
Andi Gutmans 31c9ad1831 - Fix memory leak 2000-03-06 17:13:38 +00:00
Sascha Schumann d7f21375d4 "User interface" for removing all files which are ignored by cvs
(i.e. object files, Makefiles)
2000-03-06 16:02:01 +00:00
Egon Schmid 0beaaa9356 Hartmut don't touch protos. Only two lines are allowed. 2000-03-06 16:01:54 +00:00
Andi Gutmans 6ef9f9fe9c - Missed one 2000-03-06 15:58:50 +00:00
Hartmut Holzgraefe 36abfe1121 off-by-one error (bug id #3741) fixed 2000-03-06 15:32:05 +00:00
Andrei Zmievski 898ff287f2 Need to pass PLS_DC. 2000-03-06 14:37:48 +00:00
Andrei Zmievski 29c133f11d (php_get_session_var)
The variables are now serialized either from globals or from
$HTTP_STATE_VARS[] array, depending on register_globals and track_vars
settings.
2000-03-06 14:36:11 +00:00
Sam Ruby edb2b71387 Cleanup 2000-03-06 13:19:58 +00:00
Uwe Steinmann 92943a0c3f - root property in Dom Doc class is now reference to array element in
children property
2000-03-06 13:11:21 +00:00
Sam Ruby fc173b6ace Unresolved externs 2000-03-06 10:46:40 +00:00
Thies C. Arntzen ad5b022ed1 @- OCINLogon() sessions are now closed again. (Thies)
# happy hacking in hongkong!
2000-03-06 08:02:15 +00:00
Zeev Suraski 5e55e47f7f It's official now... 2000-03-06 05:26:39 +00:00
331d0fd83c ChangeLog update 2000-03-06 02:09:09 +00:00
Sam Ruby dc70a25a1d Eliminate "wrong number of parameters" warning 2000-03-05 23:59:56 +00:00
Andi Gutmans fbea48211e - Make some fixes although there is a problem with getpid() being defined
in process.h as getpid(void) and thus having an arugment. We might need to
define a php_getpid() function to wrap getpid().
2000-03-05 21:40:40 +00:00
Sam Ruby 64df92e053 Fix traps due to sapi_global not being initialized when ZTS is set
Don't trap if php.ini can't be read
2000-03-05 21:37:47 +00:00
Sam Ruby 313de641eb Add support for PHP syntax highlighting
Remove debug output
Fix trap when string to be output is not null terminated
Add a MS workspace for project level dependencies
Match case of contentType header
2000-03-05 21:35:24 +00:00
Zeev Suraski 56251a7239 Wrap some commonly unused callbacks 2000-03-05 19:50:10 +00:00
Hartmut Holzgraefe dedd0eb898 SuSE 6.3 imap.rpm puts the library into /usr/lib and the include files into /usr/include/imap 2000-03-05 19:48:23 +00:00
Sascha Schumann 2897c6fe25 Avoid the side-effect of defining function names, so that the PHP functions
are not renamed to their prefixed variants.

PR: #3535
2000-03-05 17:39:41 +00:00
Egon Schmid 79e36bd365 Protos fixed. 2000-03-05 07:00:16 +00:00
Chuck Hagenbuch e7d03185c4 Attribute list support ported from php3. 2000-03-05 05:36:34 +00:00
Andrei Zmievski b4b82e05d8 Remove warning. 2000-03-05 04:25:12 +00:00
Andrei Zmievski 6cbb9fa288 *** empty log message *** 2000-03-05 02:18:52 +00:00
ceb247762f ChangeLog update 2000-03-05 02:09:09 +00:00
76d027d3e7 NEWS update 2000-03-05 02:09:06 +00:00
Andi Gutmans 0a092b6226 - Fix Win32 build 2000-03-04 19:58:59 +00:00
Andrei Zmievski b1de472ba3 Don't need this check. 2000-03-04 19:26:27 +00:00
Andrei Zmievski 0e18779e8b @Added ip2long() and long2ip() courtesy of Faisal Nasim <faisal@nasim.org> 2000-03-04 17:28:16 +00:00
Andrei Zmievski 5610800a7b @Added ftruncate() and fstat(), courtesy of Faisal Nasim <faisal@nasim.org> 2000-03-04 17:23:03 +00:00
Sascha Schumann 315999da94 Prefix some symbols with php_
^(pcre|Xml|XML).*
2000-03-04 14:44:01 +00:00
Sascha Schumann 365f379435 Don't export Lookahead 2000-03-04 14:22:15 +00:00
Sascha Schumann 84bafc1002 Remove outdated PHP 3.1 stuff 2000-03-04 14:21:22 +00:00
Zeev Suraski 99d782cf60 The default return value from include() and eval() changed from 1 to 0
unintentionally after the old return-reference patches - fixed
2000-03-04 03:12:17 +00:00
Zeev Suraski d34b144061 @- Added parse_ini_file(). Currently implemented in non thread safe version
@  of PHP, and currently lacks section support (Zeev)
- Bring the non thread safe .dsp's uptodate
2000-03-04 02:59:14 +00:00
0d19142fc2 ChangeLog update 2000-03-04 02:09:13 +00:00
Chuck Hagenbuch 9ade072706 adding the fix for bug #3685 to php4 as well. 2000-03-03 21:57:26 +00:00
Stig Bakken 9dd0086785 crazy idea brought on by someone at FAST 2000-03-03 17:08:18 +00:00
Sascha Schumann 3bfe29fddb Support HP-UX 10.x non-standard time-related reentrant functions 2000-03-03 16:10:38 +00:00
Jouni Ahto b053e6422f (imagearc) - Fix #3706. 2000-03-03 14:15:05 +00:00
Uwe Steinmann dd4f37a4cf - tiny changes to testscript and domxml 2000-03-03 12:38:20 +00:00
Uwe Steinmann 9318964f25 - more changes to use zend_llist 2000-03-03 12:37:10 +00:00
Sascha Schumann 6401dc10b2 make it work 2000-03-03 12:12:01 +00:00
Sascha Schumann 51e6ab21d7 Better lib check 2000-03-03 11:54:07 +00:00
Sascha Schumann 2139099781 Also consider $i/include while searching for rfc822.h 2000-03-03 11:47:13 +00:00
Uwe Steinmann 8afd1b1d97 - xmltree() now returns an 'Dom Document' object with prop root and
children. root contains just the root element, children is an array
  with all nodes on root level, e.g. comment, pi, element
2000-03-03 08:44:25 +00:00
Uwe Steinmann bd09614526 - added property type to obejct xml doc 2000-03-03 08:02:22 +00:00
eeb9e688f2 ChangeLog update 2000-03-03 02:09:44 +00:00
f14a3042be NEWS update 2000-03-03 02:09:28 +00:00
Zeev Suraski 70bd8c71b5 Fix spelling 2000-03-03 01:58:15 +00:00
Joe Martin 68c10efe1b Added functions to retrieve scale, precision and raw oracle data type for
columns.
2000-03-03 01:28:27 +00:00
David Hedbor ffd70dca19 Now recommend --enable-roxen-zts... 2000-03-02 22:13:24 +00:00
Uwe Steinmann 9e0ae58772 - using zend llist instead of dlist (not tested) 2000-03-02 19:56:50 +00:00
Sascha Schumann fc636abfa7 adjust comment II 2000-03-02 19:39:05 +00:00
Sascha Schumann aa52ee54c1 adjust comment 2000-03-02 19:38:27 +00:00
Sascha Schumann 4682085405 Enable by default 2000-03-02 19:35:41 +00:00
Uwe Steinmann 11c654bbcd - some minor changes, cleanups 2000-03-02 18:56:06 +00:00
Uwe Steinmann 2552876786 - dom class now distinguishes between $dom->root() and $dom->children()
$dom->root() returns just the element, $dom->children() all nodes e.g.
  comments
2000-03-02 16:58:07 +00:00
Uwe Steinmann ad311c35c7 - The root node of a xml doc is now an array since it is possible
to have a comment or pi and an element on root level.
2000-03-02 16:39:50 +00:00
Stig Bakken 74fba75ca0 @"none" is now equivalent with "" in Apache config directives (Stig)
"none" is now equivalent with "" in Apache config directives.
2000-03-02 14:32:24 +00:00
Sam Ruby 14c223b2c7 Eliminate 62 warnings 2000-03-02 02:55:01 +00:00
Sam Ruby 906b922051 Fix Win32 build breakage 2000-03-02 02:39:21 +00:00
f8aec3164c ChangeLog update 2000-03-02 02:09:12 +00:00
8b55704887 NEWS update 2000-03-02 02:09:09 +00:00
Evan Klinger bf8f42835f Add appropriate check for mckcrypto lib 2000-03-02 02:05:39 +00:00
Uwe Steinmann d693d6b2cb - started to implement overload class for xml node 2000-03-01 21:16:24 +00:00
David Hedbor 52eebff6f8 Removal of printf-debug, changed sp/fp to Pike_sp / Pike_fp instead of
using a define.
2000-03-01 20:43:12 +00:00
Egon Schmid 70893ff7af Only two lines are allowed here. 2000-03-01 19:56:46 +00:00
Hartmut Holzgraefe 33cb181af2 round(-0.1) will now return 0 instead of -0 2000-03-01 19:36:37 +00:00
Andi Gutmans 4dd71d4cfe - Upgrade to year 2000 2000-03-01 17:24:43 +00:00
Andi Gutmans 110b670d44 - Fix typos 2000-03-01 17:10:45 +00:00
Thies C. Arntzen e38c4ae3ad . 2000-03-01 14:09:26 +00:00
Thies C. Arntzen 4e5acab610 now 2000-03-01 13:59:51 +00:00
Thies C. Arntzen 490569ca28 @- OCINLogon no longer crashes. (Thies) 2000-03-01 08:17:33 +00:00
Evan Klinger ae552c39fd get rid of warning when $url["port"] isn't set 2000-03-01 07:03:33 +00:00
44a52bcd9b ChangeLog update 2000-03-01 02:09:07 +00:00
Chuck Hagenbuch 9f3c8ffeb0 Fix compile warnings. 2000-03-01 01:43:26 +00:00
Chuck Hagenbuch f19fe37dec Add _php_imap_parse_address(), which replaces a lot of duplicated,
hard-to-follow code in imap_headerinfo(). This code also happened to be
broken, causing the $h->to, $h->from, etc arrays to contain only the first
address, not every address. This is fixed now.
2000-03-01 01:35:15 +00:00
Chuck Hagenbuch c87f13951f Show the minor MCAL version if we have it. 2000-03-01 01:34:05 +00:00
Chuck Hagenbuch e37ddc1368 Fix Bug #3632 - sanity check to not access a message that doesn't exist. 2000-02-29 19:58:31 +00:00
Jouni Ahto aeb6f86fe6 (image(createfrom?)png) Fix a typo & remove unused variable. 2000-02-29 18:45:47 +00:00
Sascha Schumann cc91e5ea64 Automatically try to symlink c-client.a to libc-client.a, so people
can avoid changing things.
2000-02-29 13:21:51 +00:00
Sascha Schumann a05db57374 Rewrite IMAP checks. This should solve the problems people had with
shared imap libs
2000-02-29 13:12:48 +00:00
Sascha Schumann c5977f6503 AD_ADD_LIBRARY_DEFER allows people to add libraries in a deferred way
(needed for imap and recode)
2000-02-29 13:02:29 +00:00
Andrei Zmievski 4c7af667a7 Made php_escape_html_entities() as a separate function for export. 2000-02-29 04:38:14 +00:00
b7c1735cb8 ChangeLog update 2000-02-29 02:09:11 +00:00
4711a6113d NEWS update 2000-02-29 02:09:08 +00:00
David Hedbor 08427debe8 Fixed a compilation problem with roxen.c due to a change in Pike to fix a
conflict with embedded Perl.
2000-02-29 01:12:28 +00:00
David Hedbor 3e616b5a31 roxen.c 2000-02-29 01:11:16 +00:00
David Hedbor 97cea1b933 Removed warning about ZTS since it works fine now. 2000-02-29 01:10:37 +00:00
Chuck Hagenbuch d3d45277a1 fixing segfaults in imap_getmailboxes and imap_getsubscribed. 2000-02-28 21:03:08 +00:00
Andrei Zmievski 0e7e4d30f6 WDDX header comments now conform to the latest DTD. 2000-02-28 17:16:12 +00:00
Sam Ruby 6189e219ff Improved handing of instances of private classes. Added servlet examples. 2000-02-28 17:02:28 +00:00
Jouni Ahto bafbbea051 - Use *_ex-API and *_RESOURCE-macros (partial).
# Yell if this breaks all the hell loose. Otherwise I'll continue with the
# wonderful experience of learning PHP4/Zend-APIS.
2000-02-28 16:52:03 +00:00
Andrei Zmievski fd629e6ee0 (php_set_session_var)
$foo and $HTTP_SESSION_VARS["foo"] are no longer references to the same
value.
2000-02-28 16:00:46 +00:00
Sascha Schumann 250118b1b1 . 2000-02-28 16:00:23 +00:00
Andrei Zmievski 78c9eaccd9 WDDX additions. 2000-02-28 14:04:57 +00:00
Zeev Suraski 583556a3c2 @- Switched back to the old $HTTP_*_VARS[] behavior - $HTTP_GET_VARS["foo"]
@  and $foo are no longer references to each other, but separate variables
@  like they were prior to PHP 4.0 Beta 4 (Zeev)
2000-02-28 05:33:43 +00:00
45315698d8 ChangeLog update 2000-02-28 02:09:33 +00:00
Chuck Hagenbuch 556e2b9c6e fixing number of arguments to be consistent with php3 code. 2000-02-28 01:37:21 +00:00
Chuck Hagenbuch d91d3bbee2 mcal_next_recurrence() actually works again now (in addition to not
crashing).

Also, cleaned up the formatting.
2000-02-28 01:16:35 +00:00
Andi Gutmans e45c1af8b4 - Hopefully fix browscap problem 2000-02-27 20:23:31 +00:00
Andi Gutmans a4ea1d6826 - Bye bye Perl. 2000-02-27 19:40:19 +00:00
Egon Schmid 68ab1d3d07 Fixed some protos. 2000-02-27 18:41:19 +00:00
Thies C. Arntzen 42d553c8ae . 2000-02-27 18:21:18 +00:00
Sascha Schumann ff84e15146 . 2000-02-27 18:12:57 +00:00
Thies C. Arntzen 68df5c5019 *** empty log message *** 2000-02-27 18:06:12 +00:00
Thies C. Arntzen 08055feffa out of space in private (brain) memory;-) 2000-02-27 18:02:14 +00:00
Zeev Suraski 865b7ac545 *** empty log message *** 2000-02-27 17:43:35 +00:00
Zeev Suraski 863651dff1 Compile fix 2000-02-27 17:11:03 +00:00
Stig Bakken 67cc918c3c Avoid E_NOTICE errors in PEAR code. 2000-02-27 14:46:27 +00:00
Thies C. Arntzen 48bc90a8aa just so that i don't forget 2000-02-27 14:31:04 +00:00
Andi Gutmans 312071bd08 - Fix bug 3640 2000-02-27 05:22:48 +00:00
908cdfafe1 ChangeLog update 2000-02-27 02:09:13 +00:00
c33fa392de NEWS update 2000-02-27 02:09:10 +00:00
Chuck Hagenbuch 4beb8a0d7d Some formatting, and fix the crashes in mcal_next_recurrence (finally!) 2000-02-27 01:38:31 +00:00
Zeev Suraski 7a955aa1c1 @- Fixed a (fairly common) situation where error_reporting values would not be
@  properly restored after a call to error_reporting(), in between requests (Zeev)
2000-02-26 23:50:11 +00:00
Zeev Suraski 5222c8872d Verified $HTTP_*[] protection 2000-02-26 22:14:49 +00:00
Zeev Suraski ece1369191 Fix Sybase DB compilation 2000-02-26 21:35:15 +00:00
Andrei Zmievski 137e1a1379 (php_hash_environment)
Fixed a bunch of memory leaks from the recent HTTP_*_VARS[] protection
patch.
2000-02-26 21:20:38 +00:00
Sam Ruby f1d0753f71 compilation error - Win32 2000-02-26 21:12:44 +00:00
Zeev Suraski e5c8aeb3f1 - Protect $HTTP_POST_FILES[] as well 2000-02-26 18:59:29 +00:00
Andrei Zmievski f7f7094bcf Added notice about new functions. 2000-02-26 17:58:28 +00:00
Andrei Zmievski 685fd42965 Added get_class_vars() and get_object_vars() functions. 2000-02-26 17:54:00 +00:00
Zeev Suraski 0e90b9dc83 @- The various $HTTP_*_VARS[] are now protected, and cannot be manipulated by
@  user input (Zeev)
This patch is untested!  I'll only have time to test it thoroughly in a couple of hours...
2000-02-26 16:36:57 +00:00
Andrei Zmievski e6146d6bf3 Fix typo. 2000-02-26 16:21:29 +00:00
Andrei Zmievski 051a30bc65 Add a couple of entries. 2000-02-26 16:14:34 +00:00
Zeev Suraski 1bcdcebe67 Compile fix 2000-02-26 16:07:05 +00:00
Stig Bakken 3b783ef57b register package 2000-02-26 16:03:50 +00:00
Zeev Suraski 1261271839 Allow the INI callbacks to know at what stage PHP is 2000-02-26 15:36:23 +00:00
Zeev Suraski fd344d3602 @- Added ini_set() as an alias to ini_alter() (Zeev) 2000-02-26 14:53:18 +00:00
Zeev Suraski 88b31ecb28 @- The string None is now recognized as a keyword by the php.ini processor, and
@  can be used to denote an empty string (Zeev)
- Added None keyword support to the INI parser
- Removed specialized "none" code
2000-02-26 14:29:27 +00:00
Thies C. Arntzen ae08e0500e (sapi_send_headers) fix leak 2000-02-26 14:21:10 +00:00
Uwe Steinmann a86e27db95 - More function in php module 2000-02-26 11:58:49 +00:00
Thies C. Arntzen 6131b78748 correct 2000-02-26 10:36:06 +00:00
Chuck Hagenbuch 3a59390e9d fixing imap_undelete to accept 2 or 3 arguments, not 3 or 4. 2000-02-26 06:58:15 +00:00
Zeev Suraski a508bec819 - From CODING_STANDARDS:
[6] NEVER USE strncat().  If you're absolutely sure you know what you're doing,
      check its man page again, and only then, consider using it, and even then,
      try avoiding it.
  strncat() is your enemy!
- Fix several SAPI services, get rid of the default_content_type (it's always
  composed of the mime type and charset now).
- Win32 works again
2000-02-26 05:03:41 +00:00
Zeev Suraski c7843d3b4e *** empty log message *** 2000-02-26 04:09:16 +00:00
Zeev Suraski 80782eff1f Fix comparisons of "inf"=="inf" and "-inf"=="-inf"
@- Comparing the string "inf" with "inf" returned false - fixed (Zeev)
2000-02-26 04:07:03 +00:00
Stig Bakken 4d7150657c Added simple HTTP utility class, currently with Date() and
negotiateLanguage().
2000-02-26 03:38:27 +00:00
Zeev Suraski bf5cb890b0 - Convert 'PHP3' to 'PHP'
- Avoid declaring crypt() related salt types twice
2000-02-26 03:20:55 +00:00
Chuck Hagenbuch 1841e77906 - Removing the code that checks for Zend, since this is distinctly
php4-specific now.
- bringing it up to date with the mcal functions in php3
- cleanups

Unfortunately, it still segfaults. I'll file a bug report about that...
2000-02-26 03:09:11 +00:00
d4fd66687d ChangeLog update 2000-02-26 02:09:11 +00:00
1b42c94968 NEWS update 2000-02-26 02:09:08 +00:00
Sam Ruby bc3a6ebae0 Need to include php_ticks.c in the windows build 2000-02-25 23:37:00 +00:00
Sam Ruby 28a6ba5fc0 Win32 build error:
warning C4020: 'sapi_activate' : too many actual parameters
2000-02-25 23:31:42 +00:00
Sam Ruby 937db8cc80 Build failure on Win32:
error C2198: 'sapi_apply_default_charset' : too few actual parameters
2000-02-25 23:12:51 +00:00
Stig Bakken 3f6e1be9da let's not ignore Zend/TSRM 2000-02-25 21:38:16 +00:00
Stig Bakken d23e5d837a @- Implemented default_charset and default_mimetype config directives (Stig)
Implemented default_charset and default_mimetype configuration directives.
Started implementing ticks in PHP.
2000-02-25 21:27:03 +00:00
Stig Bakken 1170876974 add a note about include return values 2000-02-25 21:18:01 +00:00
Zeev Suraski 33a564c971 Use the fast cache here too 2000-02-25 17:55:33 +00:00
Zeev Suraski 99d572ad14 Make 4-diogit date RFC 2068 compliant 2000-02-25 16:45:52 +00:00
Egon Schmid 10f52b4805 Breaks funclist.txt 2000-02-25 11:28:41 +00:00
Thies C. Arntzen 83d20ab305 fix obvious crash.
stig, in sgi-mode i still "only" get:

(haven't touched my .ini file in ages - and don't plan to)

X-Powered-By: PHP/4.0b5-dev
Content-type: iso-8859-1   <<< where is text/html?
2000-02-25 10:10:43 +00:00
Egon Schmid c0b3d86d91 More protos. 2000-02-25 08:54:12 +00:00
Jouni Ahto ab7bbbb160 Ported T1lib support from PHP3.
@- Ported T1lib support from PHP3. (Jouni)
# That's almost a lie... needs still some work.
2000-02-25 06:43:51 +00:00
f0cfb4aee8 ChangeLog update 2000-02-25 02:09:12 +00:00
8fa4f7d83f NEWS update 2000-02-25 02:09:09 +00:00
Stig Bakken ba03c9f2aa started implementing directives for default mimetype/charset 2000-02-24 22:00:47 +00:00
Zeev Suraski b51805caeb Update .dsp 2000-02-24 20:03:58 +00:00
Egon Schmid e387105e35 Thies I will give up until tomorrow. 2000-02-24 17:23:04 +00:00
Egon Schmid 35a5c6f192 More protos. 2000-02-24 16:53:39 +00:00
Egon Schmid c846de3fb4 More protos. 2000-02-24 16:36:07 +00:00
Egon Schmid 0178fb1ab5 More protos. 2000-02-24 16:30:42 +00:00
Egon Schmid 76ec07c402 Is it ok, Andrei. 2000-02-24 16:03:27 +00:00
Zeev Suraski 5520a43b77 - Fix Win32 build in Release_TS* modes 2000-02-24 15:56:48 +00:00
Egon Schmid 478abf57d4 More protos. 2000-02-24 15:55:10 +00:00
Andrei Zmievski 7a22bb09d7 Revert the y2k ini patches.
# Adam's right, it shouldn't be here
2000-02-24 15:41:34 +00:00
Andrei Zmievski f5cc1929eb Turn on y2k_compliance by default. 2000-02-24 15:16:07 +00:00
Kristian Köhntopp 8481cdf62f Set y2k_compliance to "On" by default, as we do have y2k now. 2000-02-24 15:13:28 +00:00
Egon Schmid 971a6f1702 More protos. 2000-02-24 15:11:09 +00:00
Egon Schmid 284491887f There are more '|' and should be mixed. 2000-02-24 15:06:33 +00:00
Egon Schmid c07b5282af More protos. 2000-02-24 14:43:53 +00:00
Andrei Zmievski 2b9b11d3af Fix bug #3599. 2000-02-24 14:37:05 +00:00
Andrei Zmievski c401bbe22e Fix proto. 2000-02-24 14:07:35 +00:00
Sascha Schumann 3bd34bf386 @- Fixed -DEAPI inheritance from APXS. (Sascha) 2000-02-24 13:48:44 +00:00
Sascha Schumann 59d1066525 Improve APXS_CFLAGS checks 2000-02-24 13:43:28 +00:00
Thies C. Arntzen 4a37c618e6 @-Fixed possible crash in request-shutdown. (Thies)
(pvalue_config_destructor) gets a zval* not a zval**
2000-02-24 13:39:36 +00:00
Sascha Schumann d64c1652e2 Define EAPI, if Apache uses EAPI 2000-02-24 13:38:03 +00:00
Sascha Schumann fca41d2752 Remove XML_INCLUDE, we use the embedded expat always 2000-02-24 13:35:07 +00:00
Sascha Schumann 189847996d Revert last commit (cybercash has its own version of base64.h) 2000-02-24 10:58:21 +00:00
Egon Schmid 0275e4f665 Will watch the diffs as much as I can. 2000-02-24 10:11:42 +00:00
Thies C. Arntzen 88b903da66 zorro does a Z - egon does an e? 2000-02-24 09:32:50 +00:00
Egon Schmid fe615efb5c More protos. 2000-02-24 08:39:02 +00:00
Egon Schmid 7da7a50c69 More protos. 2000-02-24 08:07:29 +00:00
Egon Schmid 3b5efa05f7 More protos. 2000-02-24 07:49:43 +00:00
Egon Schmid dcf5f1a8d5 Most functions don't have protos. 2000-02-24 07:46:56 +00:00
Egon Schmid 5bccee70ae More protos. 2000-02-24 07:38:19 +00:00
Egon Schmid 9c94a2b971 More protos. 2000-02-24 07:27:39 +00:00
Sascha Schumann ac22cb771b WTF? 2000-02-24 03:05:28 +00:00
1200b075dc ChangeLog update 2000-02-24 02:09:09 +00:00
Zeev Suraski b82f261918 Fix name 2000-02-23 22:50:57 +00:00
David Hedbor 9d1847cdd4 The Roxen PHP4 module is now a part of the Roxen CVS which makes more sense. 2000-02-23 22:27:56 +00:00
Zeev Suraski 6981775d23 Remove obsolete code 2000-02-23 21:52:23 +00:00
Stig Bakken b275477b76 (PHP getrusage) don't define this function at all if the getrusage() function
is not available on the system.
2000-02-23 21:37:43 +00:00
Danny Heijl 4eae85673a - Win32 compile fixes 2000-02-23 21:18:06 +00:00
Andi Gutmans de6c9f35a1 - MySQL now compiles right into the PHP 4 binary on Windows 2000-02-23 21:10:18 +00:00
Sascha Schumann ccc386c8e3 Kill another warning 2000-02-23 20:56:18 +00:00
Sascha Schumann a965c2d73b Remove warning message 2000-02-23 20:48:12 +00:00
Sascha Schumann fcd0c2a03f . 2000-02-23 20:22:55 +00:00
Stig Bakken c475b6112a shut up cross compiling warnings 2000-02-23 19:26:31 +00:00
Sascha Schumann 1e1e162e31 Define SQL_SUCCEEDED for Solid.
PR: #3383
2000-02-23 19:16:34 +00:00
Thies C. Arntzen a8c7a9deb8 bump version number 2000-02-23 18:57:08 +00:00
Sascha Schumann 027512320f Include <sys/types.h> and <sys/time.h> before <sys/resource.h> 2000-02-23 17:39:58 +00:00
Egon Schmid 7bc9ea2b9f More protos. 2000-02-23 16:57:09 +00:00
Egon Schmid 11e2405489 More protos. 2000-02-23 16:38:38 +00:00
Andreas Karajannis 324391bc30 uodbc now uses zend's reference system. The crashes on request shutdown should be gone. 2000-02-23 16:34:08 +00:00
Egon Schmid 1970a527ff More protos. 2000-02-23 16:33:01 +00:00
Egon Schmid ecb74a01a1 More protos. 2000-02-23 16:26:10 +00:00
Egon Schmid 6aff02506e Thies, it looks now a little bit better.
Please correct my dummy entries.
2000-02-23 15:54:23 +00:00
Sascha Schumann 53e1ea7728 php.h should be the first file included, so that HAVE_* are defined 2000-02-23 15:44:02 +00:00
Egon Schmid 86c96359f3 More protos. 2000-02-23 15:04:36 +00:00
Egon Schmid eb1cc78be8 Changed here also. 2000-02-23 14:50:40 +00:00
Sascha Schumann 21ca719293 Include <sys/resource.h> for getrusage(2)
PR: #3479
2000-02-23 14:13:34 +00:00
Sascha Schumann 9dc605afe5 Fix include file path
Suggested by: stephen@ecoverage.com
PR: #3542
2000-02-23 14:08:16 +00:00
Sascha Schumann b828e6971c Speling mistake, fix suggested by zeekamotay@hotmail.com in #3558 2000-02-23 14:05:56 +00:00
Sascha Schumann da8c6bea46 Proper check for getrusage(), it somehow disappeared. 2000-02-23 13:57:06 +00:00
Egon Schmid 835fb93f63 More protos. 2000-02-23 09:29:10 +00:00
Andi Gutmans 4c0058f44a - Make libmsyql.lib compile. It fails with two unresolved symbols on link
with PHP 4 so I am not commiting the .dsw quite yet.
2000-02-23 05:25:28 +00:00
f788b6743b ChangeLog update 2000-02-23 02:09:12 +00:00
e3d76db455 NEWS update 2000-02-23 02:09:09 +00:00
Sascha Schumann 67f6945e8a Revert part of the last commit 2000-02-22 22:52:14 +00:00
Andrew Skalski ceebb2db61 added the ftp_site() function 2000-02-22 20:50:00 +00:00
Uwe Steinmann 5283b0b821 - added support for namespaces
- made entities in attributes possible
2000-02-22 20:24:56 +00:00
Andrei Zmievski 98674b73bd (PHP exec) Return last line of output properly. 2000-02-22 18:00:32 +00:00
Uwe Steinmann 9133a9b8b0 - some tiny changes to the test routine 2000-02-22 17:03:36 +00:00
Uwe Steinmann 5f34cfddbc - dom tree isn't editable anymore. Will probably change back in the future 2000-02-22 17:03:01 +00:00
Egon Schmid 18fee17d38 More protos. 2000-02-22 16:46:40 +00:00
Egon Schmid e06c2021c9 More protos. 2000-02-22 15:48:43 +00:00
Sascha Schumann 3b74bbe999 Print out a warning, if writing the session data failed. This might
happen in a request shutdown handler; php_error() worked for me in the
CGI version.
2000-02-22 14:44:29 +00:00
Sam Ruby b117adeded add proper dependencies 2000-02-22 14:37:45 +00:00
Andrei Zmievski 1e5749f47f Added phpextdist script for making external extension packages. 2000-02-22 14:26:12 +00:00
Andrei Zmievski 838bab821c Use 'cp' instead of 'install'. 2000-02-22 14:23:45 +00:00
Andrei Zmievski e9abf023b4 Typo. 2000-02-22 14:23:09 +00:00
Andrei Zmievski d5f6f5cb50 Remove duplicates. 2000-02-22 14:20:54 +00:00
74c94b2b1a ChangeLog update 2000-02-22 14:14:45 +00:00
485d10cb13 NEWS update 2000-02-22 14:14:42 +00:00
Thies C. Arntzen e0b0919375 @- Fixed OCI8 crash when returning cursors from stored-procedures. (Thies) 2000-02-22 13:56:48 +00:00
MySQL Team da98cacafc Ignore more 2000-02-21 18:54:27 +00:00
MySQL Team a75a9fb8ef Autogenerated file. 2000-02-21 16:42:14 +00:00
Zeev Suraski 2fb4209083 *** empty log message *** 2000-02-21 16:41:15 +00:00
Zeev Suraski a763da63ad Prepare a package 2000-02-21 16:34:50 +00:00
Uwe Steinmann aa7efd11b7 - Ups, 2000-02-21 16:24:05 +00:00
Uwe Steinmann 5dd0055c77 - pdf_set_text_matrix() disappeared in pdflib 2.30. Put in another ifdef
- small fix in testdom to suppress error msg.
2000-02-21 16:23:09 +00:00
Andi Gutmans 9ff0159bf4 - Update CVS with right version 2000-02-21 16:19:02 +00:00
Chuck Hagenbuch 13f27d8063 being accountable for the imap and mcal work that I've done (and adding an
MCAL credits line)
2000-02-21 14:50:41 +00:00
Andrew Skalski b99722ddf5 added myself to the FTP/IMAP credits 2000-02-21 14:35:28 +00:00
Thies C. Arntzen b7e53b12f6 compile-fix 2000-02-21 14:01:19 +00:00
Thies C. Arntzen 361ae6886e @- Fixed crash when magic_quotes were switched off. (Thies) 2000-02-21 12:13:27 +00:00
Thies C. Arntzen ef1ea9c895 the next baby is likely to be RC1, but... 2000-02-21 11:02:02 +00:00
22099d934e ChangeLog update 2000-02-21 02:09:03 +00:00
MySQL Team 8a61125a54 Some small changes for readability 2000-02-21 00:07:09 +00:00
MySQL Team bac6df0475 Autogenerated! 2000-02-21 00:03:28 +00:00
MySQL Team 349e81e468 Update for libmysql. 2000-02-20 22:50:57 +00:00
MySQL Team c3db2fe705 Update for libmysql. 2000-02-20 22:49:31 +00:00
Zeev Suraski 021836efcb Go B4, go! 2000-02-20 21:30:33 +00:00
Sam Ruby c764f2e3ab php4ts.lib => php4ts_debug.lib when building for Debug_TS target 2000-02-20 14:27:17 +00:00
Sam Ruby 9a7909c983 Potential trap when cookies are sent 2000-02-20 13:43:51 +00:00
Sam Ruby 6e7b5172ea Added support for arrays
Better support for instances of non-public classes (based on a suggestion
by Patrick Beard of NetScape)
2000-02-20 12:09:34 +00:00
Zeev Suraski e3f95d1c5f Win32 compile fix 2000-02-20 07:27:46 +00:00
Evan Klinger 7763337255 Eliminate compile errors relating to signals. 2000-02-20 05:32:51 +00:00
1ce2132b97 ChangeLog update 2000-02-20 02:09:08 +00:00
7eb1f5b28c NEWS update 2000-02-20 02:09:05 +00:00
Zeev Suraski ccaff4461b Win32 compile fix 2000-02-19 23:43:27 +00:00
Zeev Suraski 86fa2aade2 the pipe is breaking all the time 2000-02-19 23:41:32 +00:00
Zeev Suraski 17129a0deb It didn't all go through 2000-02-19 23:40:09 +00:00
Zeev Suraski 9b621d1c8f Get the license right... (this won't make it to RC1 of B4) 2000-02-19 23:21:46 +00:00
Zeev Suraski 80ca00005f Prepare for B4-RC1 2000-02-19 22:49:38 +00:00
Zeev Suraski 0ac9536d99 (c) patch 2000-02-19 22:46:42 +00:00
Zeev Suraski 43819ff6b2 *** empty log message *** 2000-02-19 22:45:49 +00:00
Zeev Suraski bf25d1cec9 Restore the singal protection in the MySQL module 2000-02-19 22:41:53 +00:00
MySQL Team d7c9624c5b Add missing files to Makefile 2000-02-19 21:45:44 +00:00
MySQL Team 71613cbd57 First version from the MySQL team. 2000-02-19 21:35:02 +00:00
Zeev Suraski 739bdec582 Worked on beautifying rfc1867.c a bit
@- Introduced $HTTP_POST_FILES[], that contains information about files uploaded
@  through HTTP upload (Zeev)
2000-02-19 20:12:26 +00:00
Andi Gutmans 4f8ae75f4f - Add two missing files 2000-02-19 19:51:47 +00:00
Zeev Suraski ceba50b6ed - Fix a nasty bug in the hash, introduced in the recent migration to macros
- Make array_init() and friends trackable
2000-02-19 19:21:45 +00:00
Andi Gutmans eb9d799876 - One more fix to link with Release_TS_inline 2000-02-19 19:01:09 +00:00
Andi Gutmans e4cc1ad900 - Link with the right php4ts library in Release_TS_inline mode. 2000-02-19 17:36:46 +00:00
Andrei Zmievski 6c330bd6bf New function instead of fix. 2000-02-19 16:05:26 +00:00
Zeev Suraski f77e6a4499 Generalize macros 2000-02-19 13:11:39 +00:00
Zeev Suraski 1c4532dcbf *** empty log message *** 2000-02-19 13:11:02 +00:00
Andi Gutmans 0cda28f77b - Add libmysql to the tree 2000-02-19 10:10:46 +00:00
fe9abd3219 ChangeLog update 2000-02-19 02:09:08 +00:00
Zeev Suraski c54864e3af *** empty log message *** 2000-02-18 21:15:48 +00:00
Sascha Schumann d7e34cf6ea Get rid of second declaration of compare_func_t. Either put in a common
header file or prefix it with i.e. zend_llist_
2000-02-18 20:04:32 +00:00
Zeev Suraski f1dac01f11 - Fix some issues with the ISAPI module, made it friendlier to non Win32 platforms
- Added .reg file for PWS setup
- Reordered some stuff in phpinfo()
2000-02-18 17:59:44 +00:00
Andi Gutmans e6b768105d - Quick and dirty hack for supporting sorts. Improve later on when I wake up. 2000-02-18 14:33:28 +00:00
Sascha Schumann 02d647b5f9 Fix warnings when compiling static Apache module 2000-02-18 10:13:15 +00:00
Sascha Schumann 9935ddee99 File is found in $(srcdir) 2000-02-18 09:59:42 +00:00
Andi Gutmans ee26ec5e9c - Didn't compile on Win32 2000-02-18 09:18:19 +00:00
51ef369d45 ChangeLog update 2000-02-18 02:09:14 +00:00
466e30c83e NEWS update 2000-02-18 02:09:11 +00:00
Chuck Hagenbuch f27920214c fixing imap_delete. All of the argcount checks were against one integer too
high.
2000-02-18 01:56:01 +00:00
Zeev Suraski ae22fe4c52 - Update .dsp's
- Fix a possible crash bug in failed file open error message
- Fix SAPI initialization issue that could lead to a crash
2000-02-18 01:52:11 +00:00
Andi Gutmans a0f2e9bf34 - Tiny change (I know I don't have to cast malloc() to void * but I like
casting my malloc()'s)
2000-02-18 00:22:20 +00:00
Andi Gutmans 18b8440c95 - Preliminary support for dynamic arrays. I need it on order to try out a
new hash implementation. It isn't used anywhere.
2000-02-18 00:14:23 +00:00
Andrei Zmievski 8f6a42f11b The list grows. 2000-02-17 23:36:10 +00:00
Andrei Zmievski 087e39a7ef Don't need dlist.h anymore. 2000-02-17 23:08:33 +00:00
Andrei Zmievski 588ea96deb Updated to use Zend's internal doubly-linked list instead of dlist.[ch]
implementation.
Also fixed serialization to always output objects as struct. In the past,
if the object did not have any member variables initialized it would've
been output as array of length 0.
2000-02-17 23:07:47 +00:00
Zeev Suraski 4549b969f9 Fix duplicate freeing 2000-02-17 20:46:13 +00:00
Stig Bakken 2f633d91ca typo 2000-02-17 20:32:51 +00:00
Uwe Steinmann d526de3fa8 - fixed bug if attribute value is entity 2000-02-17 20:30:00 +00:00
Zeev Suraski 9eef999b38 No need for a value (not that it seems to work anyway...) 2000-02-17 20:25:08 +00:00
Zeev Suraski a6393de6f7 Make POST handling the way it should be. RFC1867, and any future POST handlers we might
have in the future now obey to the variables_order directive, and there's a real way modular
way to handle POST content.
This is all untested, BEFORE_SAPI_POST_PATCH_17_FEB_2000 tagged before submission
@- Made multipart/form-data content obey to the variables_order directive (Zeev)
2000-02-17 20:23:59 +00:00
Stig Bakken 8805f09d87 install DB_pgsql and DB_storage 2000-02-17 20:22:56 +00:00
Stig Bakken 64057e992b * prepare/execute emulation moved into DB_common
* returning references everywhere in DB_mysql and DB_pgsql
* added a todo note to DB_pgsql
2000-02-17 20:21:01 +00:00
Uwe Steinmann 995c565fba - change some function name into php style 2000-02-17 15:05:24 +00:00
Andi Gutmans f1a2ee55e0 - Add ZEND_API 2000-02-17 08:03:13 +00:00
Sam Ruby 08dc9ba24f Allow non-public enumerations to be accessed 2000-02-17 06:44:14 +00:00
18f57df605 ChangeLog update 2000-02-17 02:09:12 +00:00
3a6dfeaa76 NEWS update 2000-02-17 02:09:09 +00:00
Frank M. Kromann 6062f199d9 Fixing up TS-modes. Non TS-modes will bee added later 2000-02-16 21:20:10 +00:00
Frank M. Kromann b770a07e9c Fixing up TS-modes. Non TS-modes will bee added later 2000-02-16 21:18:47 +00:00
Zeev Suraski 75b1316e70 @- Updated the browscap module to work with PHP 4.0 (Zeev) 2000-02-16 17:46:14 +00:00
Andi Gutmans 9bb9221642 -Fix bug 3504 concerning leaks with unset() 2000-02-16 16:49:44 +00:00
Zeev Suraski a5c143f415 - Update .dsp's
- Fix auth_user issue
2000-02-16 16:46:01 +00:00
Andrew Skalski 2ba009c0f1 recognize 125 as success for put/get commands 2000-02-16 16:07:27 +00:00
Sascha Schumann 1ed56d5d08 Add test to avoid recursion, if the build environment is not
correctly set up.
2000-02-16 16:06:12 +00:00
Andi Gutmans 9b840c5f59 - Hopefully fix Thies' bug report. 2000-02-16 16:00:02 +00:00
Andrei Zmievski fc74c302be I'd really like that. 2000-02-16 14:50:48 +00:00
Zeev Suraski 2a4d65f3b8 ZEND_TEST_EXCEPTIONS should be defined/undefined before it's checked 2000-02-16 13:55:22 +00:00
Andi Gutmans 6b51b3f92f Add to the news 2000-02-16 13:35:58 +00:00
Andi Gutmans d66d7c6e3a - In IIS ISAPI when the user presses the STOP button while the script is
running make sure it stops gracefully. Before it stuck the server.
2000-02-16 13:34:07 +00:00
Thies C. Arntzen af220872b9 speedup parse_url! 2000-02-16 11:48:58 +00:00
Thies C. Arntzen 9819391442 (url_parse) only free regex if compile worked. 2000-02-16 11:47:20 +00:00
Thies C. Arntzen 1fae341a98 (url_parse) fix memory leak (#3495) 2000-02-16 11:41:49 +00:00
Andi Gutmans 6dba297a79 - OK, for a change I remember to put my changes in the NEWS file. 2000-02-16 09:37:04 +00:00
Andi Gutmans c854703ad6 - PHP_WIN32 2000-02-16 09:33:19 +00:00
Andi Gutmans f79688e848 - Fix bug #3309 2000-02-16 09:20:10 +00:00
acddf10f80 ChangeLog update 2000-02-16 02:09:10 +00:00
74daa1d74a NEWS update 2000-02-16 02:09:07 +00:00
Zeev Suraski e9dcdb8f97 @- Improved ISAPI module - it should no longer be necessary to set PHP as
@  an ISAPI filter, only as an ISAPI extension, unless you wish to perform
@  authentication using PHP.  This didn't yet get enough testing, but it
@  should work (Zeev)
- Fixed auth_user/auth_password memory leak (I didn't have time to test it under
  Apache, feedback welcome!)
2000-02-15 23:31:10 +00:00
Andrei Zmievski 1f19c43d9d Fix enable again. 2000-02-15 22:55:45 +00:00
Zeev Suraski 4a211a80fb @- Fixed RFC1867 file upload under Windows (Zeev)
Fixed a memory leak
2000-02-15 22:51:18 +00:00
Chuck Hagenbuch ea459657d1 adding a missing PHP_FALIAS to imap_listsubscribed() 2000-02-15 20:06:53 +00:00
Andrei Zmievski 530bb8ec9e Changed --with-wddx to --enable-wddx. 2000-02-15 14:43:32 +00:00
Andrei Zmievski 4661030b38 Test for --enable-xml. 2000-02-15 14:24:59 +00:00
Andrei Zmievski 24150ded0d Changing the header. 2000-02-15 14:24:46 +00:00
Andrei Zmievski 42bcac7a18 Little correction. 2000-02-15 14:23:54 +00:00
Uwe Steinmann 385b6a22a4 - initial support for pdflib 2.20, little testing till now 2000-02-15 08:10:32 +00:00
Andi Gutmans f331c22623 - Get rid of mistake 2000-02-15 04:54:20 +00:00
69e950ecfc ChangeLog update 2000-02-15 02:09:11 +00:00
167f772966 NEWS update 2000-02-15 02:09:08 +00:00
Andi Gutmans 7fa17e8e08 - Put in the infrastructure for the unset() fix. Right now it has the old
behavior but I just need time tomorrow to add the correct behavior.
2000-02-14 20:31:01 +00:00
Andi Gutmans 95c7788747 - Fix bug in func_get_arg()
- Get rid of compiler warnings for unused function crash()
2000-02-14 19:08:51 +00:00
Stig Bakken e24bb8c492 @Re-introduced "none" for disabling auto_prepend/append_file (Stig)
Made auto_prepend_file and auto_append_file accept "none" as parameter
to disable, like in PHP 3.0.
2000-02-14 15:36:45 +00:00
Stig Bakken 475b31f1e0 @Added DB/storage to PEAR
@Introduced DB warnings
Added DB/storage to PEAR.
Introduced DB warnings
Revert to using Javadoc-style comments.
DB_common now returns references in the appropriate places
2000-02-14 15:12:20 +00:00
Andrei Zmievski f71098906b Fix for filesize() and others on sockets. 2000-02-14 14:18:17 +00:00
b881578f67 ChangeLog update 2000-02-14 14:06:49 +00:00
0811dfe257 NEWS update 2000-02-14 14:06:42 +00:00
Hartmut Holzgraefe f4c778ff04 imap_delet(),imap_undelete() and imap_move() will now optionaly accept UDIs 2000-02-14 13:09:51 +00:00
David Hedbor 12315f78a2 Use sapi_free_header. 2000-02-14 08:11:48 +00:00
Zeev Suraski 1cca60e704 Fix a few memory leaks 2000-02-13 22:17:09 +00:00
Zeev Suraski 603aca0bb3 Fix a memory leak 2000-02-13 22:15:06 +00:00
Frank M. Kromann 7fa7c8a8e3 Fixing compile and link with current cvs. 2000-02-13 19:06:51 +00:00
Andi Gutmans bac7a5085e - Not sure if len can be zero but it's better to check it once then
rechecking for it every loop and having an extra variable do nothing.
2000-02-13 15:59:32 +00:00
Andi Gutmans 7441ee5175 - Beautify a bit. 2000-02-13 15:56:07 +00:00
Zeev Suraski 6ae0902498 - Hopefully fix strip_tags bug
@- Fix overrun in strip_tags (Stas, Zend library)
2000-02-13 15:35:51 +00:00
Thies C. Arntzen 017a6353d1 @- Fixed crash in strip_tags() and related functions. (Thies) 2000-02-13 14:56:35 +00:00
Andi Gutmans e578fad099 - Save a function call one very hash_add 2000-02-13 13:31:29 +00:00
Andi Gutmans 3811b58a7d - Improve startup speed a bit by using the hash_*_ptr() functions 2000-02-13 13:25:01 +00:00
Andi Gutmans bb302a755c - Make startup a bit faster by changing some hash_update()'s and hash_add()'s
to hash_update_ptr()/hash_add_ptr()
2000-02-13 13:22:02 +00:00
Andi Gutmans 920b7b2841 - Fix a couple of potential bugs where we were using emalloc/efree instead
of pemalloc/pefree.
- Fix a bug were we potentially would be freeing the key by mistake
2000-02-13 12:45:36 +00:00
Danny Heijl 9d4e4545fe - PHP_WIN32 2000-02-13 11:24:14 +00:00
Zeev Suraski 23b633e071 Report access violations 2000-02-13 01:24:51 +00:00
Zeev Suraski 81662eb8f4 *** empty log message *** 2000-02-13 01:22:11 +00:00
Zeev Suraski b08f85aeef Make all of the ISAPI variables register themselves as Server variables 2000-02-13 01:14:45 +00:00
Zeev Suraski 0b1c8b455a Make (array) false == array() and not array(false) 2000-02-13 00:52:33 +00:00
Zeev Suraski 003ef1aa74 Trap bailout of shutdown functions 2000-02-13 00:26:54 +00:00
Andi Gutmans bbb25255b0 - Update the C file to use PHP_WIN32 2000-02-12 19:47:49 +00:00
Andi Gutmans d997d485ff - Update the project file with the Win32 defines. 2000-02-12 19:46:45 +00:00
Thies C. Arntzen d1db3691a1 having HTTP_UPLOAD_FILES[] seems logical to me 2000-02-12 18:03:09 +00:00
Thies C. Arntzen 829f4f334b @- Workaround for bogus POST-Data from IE/Mac. (Thies)
@  Patch by Alain Malek <alain@virtua.ch>
fix #2944
2000-02-12 17:37:11 +00:00
Andi Gutmans e781caf962 - Support wddx by default on Windows 2000-02-12 15:47:51 +00:00
Sascha Schumann 883c62b5e9 $ext_src_base is the source dir of the extension 2000-02-12 15:13:44 +00:00
Sascha Schumann e7a4d5f18d Tell expat the byte order 2000-02-12 15:08:32 +00:00
Sascha Schumann bfe09e8305 Never use Apache regex stuff 2000-02-12 14:48:09 +00:00
Sascha Schumann 0036b8bba0 #if WIN.* => #ifdef PHP_WIN32
#if !(WIN.* => #ifndef PHP_WIN32
2000-02-12 14:38:31 +00:00
Sascha Schumann f6eb750183 Use bundled expat library on UNIX. Note: Need to fix --enable-xml=shared 2000-02-12 14:28:49 +00:00
Andi Gutmans b1a00f722e - Fix the Release_inline part. 2000-02-12 11:41:19 +00:00
Sam Ruby 34723d02f8 on WIN32, PHP_WIN32 and ZEND_WIN32 need to be defined 2000-02-11 23:50:01 +00:00
Andrei Zmievski a60e91b313 (request_shutdown) Prevent infinite loop on shutdown if there is an error
in shutdown function.
(php_array_walk) Print a warning if the walk function doesn't exist.

Split shutdown function call into a separate function that's called with
zend_hash_apply() instead of as destructor to keep hash consistent.

This fixes bug #3419.
2000-02-11 21:14:42 +00:00
Andrei Zmievski 94be61fde5 Made a couple of typedefs for zend_hash_apply_*() calls. 2000-02-11 21:12:49 +00:00
Andrei Zmievski 0f4b9aa812 Fix prototype. 2000-02-11 19:19:06 +00:00
Thies C. Arntzen 6a79c379cc backed out some stuff that got committed by accident & broke things:(!
uwe: please read twice what you are commiting!
2000-02-11 19:17:57 +00:00
Andrei Zmievski 055645b079 (PHP passthru) Shouldn't return anything.
This fixes bugs #3428 and #3430.
2000-02-11 19:16:36 +00:00
Andrei Zmievski fe93919b48 request_info.h is gone. 2000-02-11 19:02:07 +00:00
Zeev Suraski 2e7093d5ef Update .dsp's 2000-02-11 16:28:50 +00:00
Zeev Suraski 80bdd19e03 Fine tune Andi's patch 2000-02-11 15:59:30 +00:00
Andrei Zmievski 80f4886c5a Define phpext_oracle_ptr properly. 2000-02-11 15:34:11 +00:00
Sascha Schumann 12d3e3d775 More cosmetic things 2000-02-11 13:41:30 +00:00
Sascha Schumann fe416bd353 Kill warnings 2000-02-11 13:25:26 +00:00
Sascha Schumann 89553f5df6 Some style(9) cosmetics 2000-02-11 12:59:08 +00:00
Andi Gutmans f9e0d94a65 - Baby steps with PHP_WIN32 :) 2000-02-11 12:56:54 +00:00
Andrei Zmievski a4c68caedd Avoid the 'unexpected end of file' error. 2000-02-10 22:19:02 +00:00
Andi Gutmans 1c7f36465b - A few more 2000-02-10 22:00:52 +00:00
Andi Gutmans 8d012c45e2 - A bit more PHP_WIN32 work 2000-02-10 21:55:30 +00:00
Andi Gutmans 29280bb9ec - Get rid of some more evil MSVC5's and switch standard/ to use PHP_WIN32 2000-02-10 21:53:56 +00:00
Zeev Suraski 732eeeabd9 Final build fixes - that's enough for now... 2000-02-10 20:24:28 +00:00
Zeev Suraski 8709369720 Update .dsp's 2000-02-10 20:18:57 +00:00
Zeev Suraski 49e98c3ddd request_info.c is dead! long live SAPI
@- Finished the server abstraction layer;  All of the PHP code is now shared
@  across different servers (Apache, CGI, IIS, etc.), except for thin
@  interface modules (Zeev)
2000-02-10 20:13:08 +00:00
Zeev Suraski 6723bdd920 request_info.c is giving up 2000-02-10 20:03:17 +00:00
Zeev Suraski 6d0ab6166c SAPIfication, Episode VI: Return of the SAPI
Remove mostly all references to APACHE and CGI_BINARY from the code.

- Apache include files are no longer included by any PHP code, except for the Apache SAPI module.
- No server specific code is in any of the base PHP code.

Still left to be done:
- Eliminate any references to APACHE from the few remaining modules.
- Move request_info.c's logic to SAPI
- Modify the regex function names, and globals, so that we can always
  include them, without having to fear any interference with Apache;
  Always use the bundled regex library
2000-02-10 19:41:21 +00:00
Zeev Suraski 9709f7ec73 The last patch wasn't that good, fix 2000-02-10 19:29:21 +00:00
Zeev Suraski 25b5cb9599 More protection... 2000-02-10 19:28:05 +00:00
Zeev Suraski 79726c8864 Make the CVS compile again 2000-02-10 19:24:44 +00:00
Zeev Suraski 42765d50e0 Only activate if we're inside an actual request 2000-02-10 19:22:36 +00:00
Zeev Suraski 5bdd18caf1 Yes, you guessed it... More cleanup 2000-02-10 18:44:33 +00:00
Zeev Suraski 41f6bca92f More cleanup! 2000-02-10 18:19:04 +00:00
Sascha Schumann aa50e6368a Set ext_base, a common prefix to the per-extension build directory
(ext/<ext-name> for in-tree builds, "" for rest)
2000-02-10 18:07:30 +00:00
Sascha Schumann c59993005c - Fixed ^#[ ]+preprocessor directive$ constructions which break
some compilers
- Made php_xml.h useable without having xmltok.h/xmlparse.h in the include
  path
2000-02-10 18:03:55 +00:00
Zeev Suraski 0fd89aa20d More cleanup - move getenv() to SAPI 2000-02-10 17:55:01 +00:00
Zeev Suraski 7d926a0e0c More cleanup... 2000-02-10 17:26:57 +00:00
Andi Gutmans ec0e2d7312 - Little fix 2000-02-10 17:22:25 +00:00
Andi Gutmans b48eebb114 - #define ZEND_WIN32 differently 2000-02-10 17:19:10 +00:00
Andi Gutmans 091acff312 - PHP_WIN32 2000-02-10 17:15:49 +00:00
Andi Gutmans f452c7762f - Introduce PHP_WIN32 2000-02-10 17:14:05 +00:00
Andi Gutmans bc5c9d8d7b - Finally beautify those WIN32|WINNT checks 2000-02-10 17:03:53 +00:00
Zeev Suraski 945e9c3f20 More cleanup 2000-02-10 16:52:07 +00:00
Andrei Zmievski 681f352a9d Should be 'deactivate' rather than the opposite. 2000-02-10 16:48:22 +00:00
Zeev Suraski 073b148167 More abstraction 2000-02-10 16:44:59 +00:00
Zeev Suraski 59b53ea2c8 Always use getopt with CGI, never use it for anything else 2000-02-10 16:27:28 +00:00
Zeev Suraski 404bbe1f26 Move the logging mechanism to SAPI 2000-02-10 15:55:10 +00:00
Thies C. Arntzen 4a824eb8cb @- Added NULL-support in gettype(). (Thies) 2000-02-10 15:51:50 +00:00
Uwe Steinmann 992e808451 - added funktion xmltree(), renamed dom() to xmldoc() and domfile()
to xmldocfile().
- testdom covers most of the functionality
2000-02-10 15:24:13 +00:00
Uwe Steinmann e79c87aca0 - added pdf_open_tiff() 2000-02-10 10:20:31 +00:00
Thies C. Arntzen c59c663619 @- base64_decode() will decode POST data correct. (Thies)
@  Patch submitted by: Turadg Aleahmad <turadg@wise.berkeley.edu>
2000-02-10 09:44:22 +00:00
Andi Gutmans c8b321c678 - Shouldn't be there 2000-02-10 05:41:28 +00:00
Andi Gutmans 39c4687816 - Cleanup the code 2000-02-10 05:41:05 +00:00
ba256fb835 ChangeLog update 2000-02-10 02:09:09 +00:00
Zeev Suraski de8471ab4e Fix last known nasty bugs in Zend. It'll be cool if there are no new ones :) 2000-02-09 21:48:16 +00:00
Uwe Steinmann e548a31510 - removed stupid leftover in testdom
- added more functions to domxml
2000-02-09 20:06:23 +00:00
Andrei Zmievski ab465c5857 Return by reference, where necessary. 2000-02-09 19:41:13 +00:00
Stig Bakken 338608ab31 Added three get modes: DB_GETMODE_ORDERED, DB_GETMODE_ASSOC and
DB_GETMODE_FLIPPED.  Docs are within.
2000-02-09 19:04:17 +00:00
Thies C. Arntzen 12f9173c6d *** empty log message *** 2000-02-09 15:43:14 +00:00
Thies C. Arntzen 2e7f24a487 foreach() works now for objects as well. 2000-02-09 15:38:56 +00:00
Uwe Steinmann 9603c7cc83 - new function to read and parse xml doc from file 2000-02-09 14:07:44 +00:00
Uwe Steinmann 06c586932a - fixed several bugs an did some testing. Parsing and creating simple
XML docs should work. See the script testdom.
2000-02-09 12:46:32 +00:00
Thies C. Arntzen 7ddde45863 shut-up CVS 2000-02-09 12:12:19 +00:00
01c532dc22 ChangeLog update 2000-02-09 02:09:10 +00:00
236db28a93 NEWS update 2000-02-09 02:09:07 +00:00
Zeev Suraski 2460569ccb Change string->str where possible; string is basic a C++ class, so gdb can't look
inside variables named 'string'.
2000-02-08 22:21:43 +00:00
Zeev Suraski ebddd16c75 Fix declaration 2000-02-08 22:18:21 +00:00
Zeev Suraski 489b705d4b @- Fixed memory corruption in fgetss(), strip_tags() and gzgetss() (Zeev) 2000-02-08 21:29:18 +00:00
Zeev Suraski ca5622c711 Fix an elusive bug 2000-02-08 20:10:47 +00:00
Andrei Zmievski a7063b1aee New function notice. 2000-02-08 18:03:19 +00:00
Andrei Zmievski 0f1c2504b1 Fix up the patch. 2000-02-08 17:59:28 +00:00
Andrei Zmievski c2fd6752cf Patches from Walter for strncmp() stuff. 2000-02-08 17:19:43 +00:00
Uwe Steinmann 3b5659ae92 - made hyperwave extension compile again 2000-02-08 09:47:55 +00:00
ed04cedecc ChangeLog update 2000-02-08 02:09:10 +00:00
018072529a NEWS update 2000-02-08 02:09:07 +00:00
Zeev Suraski d5abab7322 Remove old unnecessary check 2000-02-07 18:53:43 +00:00
Zeev Suraski 0c470af314 Syntax highlighting was erronously emitting more than one semicolon and/or garbage with heredocs 2000-02-07 18:39:14 +00:00
Thies C. Arntzen de0774041c @- Made the output of var_dump() more informative. (Thies) 2000-02-07 18:00:16 +00:00
Hartmut Holzgraefe ce62bbb674 another re-sync with the PHP3 tree
imap_mail deactivated for win builds, as the files
win32/imap_sendmail.c  win32/imap_sendmail.h from
PHP3 are still missing
2000-02-07 15:52:47 +00:00
Thies C. Arntzen aee1dd9ec0 kill warning
@- Fixed some OCIBindByName() problems. (Thies)
2000-02-07 10:31:43 +00:00
5194ebe6a8 ChangeLog update 2000-02-07 02:09:10 +00:00
264bf67584 NEWS update 2000-02-07 02:09:07 +00:00
Zeev Suraski 2da5f17e52 Fix buglet 2000-02-06 22:14:34 +00:00
Zeev Suraski 6a75df6cd7 @- Protect the ISAPI module against exceptions. Stack overflows in scripts are
@  now nicely detected and handled (Zeev)
2000-02-06 21:59:58 +00:00
Andi Gutmans 4b0da428e7 - Support the string offset syntax $a{2} with the regular array opcodes.
Will need to write new opcodes sometime but right now it's good enough
  to announce the change to this string offset syntax for beta 4.
2000-02-06 20:18:35 +00:00
Thies C. Arntzen aa539466f7 *** empty log message *** 2000-02-06 16:02:30 +00:00
Danny Heijl 44c0f591f7 - Make it compile again with new (p)list globals. 2000-02-06 15:36:44 +00:00
Thies C. Arntzen 90ac20ebb5 @- Fixed possible buffer-overflow in base64_decode. (Thies)
fix #3226
2000-02-06 15:18:59 +00:00
Thies C. Arntzen 59e466d54c fix for #3413
@- Fixed possible buffer-overflow in setcookie(). (Thies)
2000-02-06 14:36:27 +00:00
bc8c90f0d2 ChangeLog update 2000-02-06 02:09:10 +00:00
5aae762143 NEWS update 2000-02-06 02:09:07 +00:00
Zeev Suraski c630fe664f Standardize 2000-02-05 22:58:59 +00:00
Andi Gutmans 7f48989be6 - This hopefully fixes the list($a, $a) = array(1,2) crash, i.e. when list
by mistake contains the same variable twice.
- BTW, there is no defined order of assignment. The value of $a after the
  previous example is undefined, and should not be assumed to be either 1
  nor 2.
2000-02-05 20:19:46 +00:00
Thies C. Arntzen 1616b5193c @- Fixed signal() bug that could cause the Apache master process to
@  die. (Thies)

the problem was that we *did* register the signal in the apache
master process as well.
php_module_startup() -> REGISTER_INI_ENTRIES() -> OnChangeMaxExecutionTime() -> php_set_timeout().

from now on the .ini mechanism only sets PG(max_execution_time) and that gets
"converted" to a timeout-signal() in php_request_startup()!

we still need to think about the ZTS timeout mechanism.
2000-02-05 19:32:27 +00:00
Zeev Suraski 82dbc9c74f Get Win32 IMAP DLL to compile 2000-02-05 19:22:17 +00:00
Andi Gutmans 8c813dbb96 - Make Win32 compile again 2000-02-05 17:58:11 +00:00
Zeev Suraski 39cb8fe0ac Fix PostgreSQL startup routine in thread-safe mode 2000-02-05 17:26:35 +00:00
Zeev Suraski bf609338ae Fix 2000-02-05 17:09:00 +00:00
Zeev Suraski b1a837ad17 More cleanup 2000-02-05 16:38:50 +00:00
Thies C. Arntzen b29ad75564 fix compile 2000-02-05 16:36:15 +00:00
Zeev Suraski 3d297cfe81 *** empty log message *** 2000-02-05 16:31:02 +00:00
Andrei Zmievski 9d34140191 Add default registration of server vars.
# Zeev, what the hell is 'B'?
2000-02-05 16:13:39 +00:00
Zeev Suraski 212e25e4be PostgreSQL compile fixes 2000-02-05 16:12:23 +00:00
Zeev Suraski c12aa454ff Compile fixes 2000-02-05 15:44:20 +00:00
Zeev Suraski f207b3623e Pass the executor globals to internal functions 2000-02-05 15:40:05 +00:00
Zeev Suraski 3a816341f9 Cleanup patches 2000-02-05 15:16:12 +00:00
Zeev Suraski 9f51f154aa - Stop passing list/plist to internal functions
- Add a typedef for the pCopyConstructor function pointer
- Minor hacks
2000-02-05 15:11:24 +00:00
5ac1ee403b ChangeLog update 2000-02-05 02:09:42 +00:00
1755f655db NEWS update 2000-02-05 02:09:26 +00:00
Zeev Suraski ef5d72cc37 That was the broken downcasting that prevented the interactive C++ mode from working properly under UNIX 2000-02-05 01:26:15 +00:00
Andrei Zmievski c77aa759ea Implemented setting of session cookie parameters.
@ Added session_set_cookie_params() function. (Andrei)
2000-02-04 23:34:24 +00:00
Zeev Suraski 8055da9830 Use the new state functions
@- If header information is sent after output has already been sent, the warning
@  message will now state the filename and line number at which the first output
@  was made (Zeev)
2000-02-04 14:54:30 +00:00
Zeev Suraski b6197bcf90 Maintain a state of whether we're compiling and/or executing 2000-02-04 14:45:58 +00:00
2e90a7a368 ChangeLog update 2000-02-04 02:09:09 +00:00
Andi Gutmans 600e4a11c7 - Sounds nicer 2000-02-03 22:31:56 +00:00
Andi Gutmans 68413a7452 - Add some news 2000-02-03 22:29:12 +00:00
Uwe Steinmann 38fb57f9d6 - some more testing 2000-02-03 21:12:30 +00:00
Uwe Steinmann fb46032cbb - fixed several bugs, left some for tomorrow :-) 2000-02-03 21:11:58 +00:00
Andrei Zmievski e0628436f3 *** empty log message *** 2000-02-03 18:51:33 +00:00
Uwe Steinmann a6869f2333 - more functions added but none of them tested 2000-02-03 17:21:23 +00:00
Uwe Steinmann 0b414c4e4e - fixed segm fault in hw_docbyanchor() 2000-02-03 17:20:49 +00:00
Stig Bakken a04a28fbb5 * Started playing around with alternatives to javadoc.
* Fixed the "make install" rule so it doesn't temporarily break the
  installed scripts.
* implemented prepare/execute emulation for MySQL including file-reference
  parameters (only binmode/binfetchlen remains now)
* started fixing up the ODBC backend
2000-02-03 10:49:03 +00:00
Zeev Suraski ddc0f79f50 fix 2000-02-03 05:06:31 +00:00
cf20c54292 ChangeLog update 2000-02-03 02:09:07 +00:00
Zeev Suraski 8b9e07dace - Fix built-in classes with more than 5 methods 2000-02-02 22:23:37 +00:00
Andrei Zmievski 1a4e39838f (PHP wddx_deserialize) Fixed a problem with deserializing empty values.
(php_addslashes) Guard against NULL data.
2000-02-02 21:53:27 +00:00
Uwe Steinmann ef4cd692e0 - support libxml installed in gnome 2000-02-02 20:57:49 +00:00
Zeev Suraski e1a753c3d0 Add expat to the distribution
Add expat support to Win32 builds
2000-02-02 18:42:04 +00:00
Andrei Zmievski 0c535aa355 (php_sock_fgets) Respect timeout event. 2000-02-02 18:00:44 +00:00
Andrei Zmievski a6748c555e Fixed SAPI modules to properly register their related modules. 2000-02-02 17:19:36 +00:00
Andrei Zmievski 254fdd754c Initialize apache properly. 2000-02-02 16:49:39 +00:00
Zeev Suraski b3ec6d5d05 - Fix the annoying problem with list(), that surfaced up after our recent cleaning
patches
2000-02-02 16:47:43 +00:00
Andrei Zmievski b4864206aa Remove crud. 2000-02-02 15:33:14 +00:00
Andrei Zmievski 625828657a Forgot to add the actual file. 2000-02-02 14:29:27 +00:00
Andrei Zmievski 1258fbb077 Some rearranging. 2000-02-02 14:15:46 +00:00
Thies C. Arntzen 0ce0db5158 foreach note 2000-02-02 11:37:22 +00:00
Thies C. Arntzen 3ccff40306 use FREE_ZVAL where appropiate 2000-02-02 11:31:37 +00:00
Uwe Steinmann 22c5c021f0 - several minor cleanups like removing unused variables 2000-02-02 11:18:06 +00:00
Andrei Zmievski f0f00daa92 Moved ext/apache into sapi/apache. 2000-02-02 06:09:00 +00:00
135eb22124 ChangeLog update 2000-02-02 02:09:10 +00:00
bee49753c8 NEWS update 2000-02-02 02:09:07 +00:00
Andrei Zmievski b995d2cc2f Added add_property_unset() and add_property_bool(). 2000-02-01 23:12:48 +00:00
Andrei Zmievski 83a0278171 Not needed. 2000-02-01 22:17:06 +00:00
Zeev Suraski c47452f729 Compile fix 2000-02-01 22:13:13 +00:00
Zeev Suraski 485412ecb1 Improve dependencies 2000-02-01 22:04:52 +00:00
Andrei Zmievski a753430fb9 - Implemented socket_get_status() function. Some more stuff can be added
to it in the future.
- Renamed set_socket_timeout() to socket_set_timeout()
- Renamed set_socket_blocking() to socket_set_blocking() but kept the
  old name for compatibility. It now outputs a warning that
  set_socket_timeout() is deprecated but still goes through.
@ Added socket_get_status() function. Renamed:
@   set_socket_timeout() -> socket_set_timeout()
@   set_socket_blocking() -> socket_set_blocking(). (Andrei)
2000-02-01 20:02:44 +00:00
Zeev Suraski 5cabf74445 Sort out a gdb problem 2000-02-01 19:22:59 +00:00
Zeev Suraski 39adeaf4f4 Fix warning 2000-02-01 18:54:01 +00:00
Andrei Zmievski 01e6ca33ab Socket note. 2000-02-01 17:17:08 +00:00
Sam Ruby e30b061a06 Servlets work again! OK, so it crashes on shutdown, apparently trying to
report a memory leak, but it is worth committing the progress so far.
2000-02-01 16:25:43 +00:00
Andi Gutmans 131e3a06fb - Get rid of remains of garbage.
- This should fix Thies' UMR
2000-02-01 16:02:38 +00:00
Thies C. Arntzen c145f85638 make it work without the zend_hash_pointer*() functions. some work on the shutdown issues (more to follow) 2000-02-01 14:39:59 +00:00
Thies C. Arntzen 11f53347c7 moved destroying of garbage before resource-list gets destroyed - (see my previous mail)
zeev, andi - please comment!
2000-02-01 11:41:15 +00:00
Thies C. Arntzen 8c4ab98e17 added missing break. 2000-02-01 11:37:33 +00:00
Thies C. Arntzen d6afe4bac7 took out zend_hash_pointer_update() & zend_hash_pointer_index_update_or_next_insert() - i really prefer link-errors instead of runtime-errors, don't you? 2000-02-01 10:40:05 +00:00
Andrei Zmievski 91bb21c522 Implemented realpath().
@ Added realpath() function. (Andrei)
2000-02-01 06:06:03 +00:00
79daecb7d5 ChangeLog update 2000-02-01 02:09:10 +00:00
ca48239da1 NEWS update 2000-02-01 02:09:07 +00:00
Zeev Suraski 86a19f4714 Add the complement to the putenv() security 2000-01-31 22:31:00 +00:00
Andrei Zmievski 1d1b59da76 Another todo. 2000-01-31 22:10:04 +00:00
Andi Gutmans 45686e3a55 - This has to always be done. 2000-01-31 21:09:14 +00:00
Zeev Suraski f2d3ce4170 - Optimized garbage mechanism
- Fixed another buglet in the parser
2000-01-31 19:18:07 +00:00
Zeev Suraski 0517436bf9 - Fix foreach()
- Fix indirect reference with object properties
2000-01-31 18:21:54 +00:00
Sascha Schumann f8e1457be0 (PHP mktime) Added windowing support for 0..70
@- mktime interprets years in the range 0-70 now as 2000-2070. You can
@  continue to specify the complete year (i.e. 1920) (Sascha)
2000-01-31 17:22:17 +00:00
Andrei Zmievski 409f06b330 Another point. 2000-01-31 15:37:22 +00:00
11fdbdf427 NEWS update 2000-01-31 15:35:06 +00:00
Andrei Zmievski 2f50aaa349 *** empty log message *** 2000-01-31 15:09:09 +00:00
Zeev Suraski 53a0d6fb9d Fix typo 2000-01-30 22:14:58 +00:00
Zeev Suraski 5540028340 @- Added the ability to prevent the user from overriding certain environment
@  variables in Safe Mode (Zeev)
- Finished work, more or less
2000-01-30 22:10:30 +00:00
Andi Gutmans fdbca7526f - Fix the bug Thies found where I forgot to change a break; to NEXT_OPCODE();
- If you find anymore let me know
2000-01-30 21:17:29 +00:00
Zeev Suraski 01362974d6 Some more work, I'll finish this when I get home 2000-01-30 20:49:16 +00:00
Sam Ruby 54259250e5 PHP can install and run as a servlet again on Unix.
Still todo: allow access to ext/java functionality from within servlet.
2000-01-30 20:48:33 +00:00
Zeev Suraski 430571d62c Initial work on the protected env vars stuff 2000-01-30 20:31:41 +00:00
Andi Gutmans 0296bba808 - Run it on align_test 2000-01-30 04:49:43 +00:00
Sam Ruby b32b8d0d44 add installation 2000-01-30 00:42:26 +00:00
Zeev Suraski 8a2f6c5e60 @- Fixed a crash bug in strtr() working on large input strings (Zeev) 2000-01-29 17:54:30 +00:00
Sam Ruby 8a75e48bd4 Progress: sapi/servlet now builds again on Unix 2000-01-29 17:53:58 +00:00
Zeev Suraski 400f464307 Fix ``'s 2000-01-29 17:49:05 +00:00
Zeev Suraski ad115d2088 Fix require() 2000-01-29 17:19:47 +00:00
Sam Ruby c60c1b8172 First steps towards restoring sapi/servlet on Unix.
Cosmetic improvements to allow README to be read on systems with tabstop=8
2000-01-29 13:22:47 +00:00
Zeev Suraski 680d2dae32 Fix buglets in the argv/argc code 2000-01-29 12:57:08 +00:00
Rasmus Lerdorf 796ce90c1e No comment - will explain next week 2000-01-29 12:46:59 +00:00
Zeev Suraski b2449f929c - Change the argument order of php_register_variable() to something more
intuitive.
- Make the authentication variables be a part of the HTTP_SERVER_VARS[] array
2000-01-29 11:55:44 +00:00
Andi Gutmans 6864e05ae3 - Get rid of another rule which isn't needed. 2000-01-29 10:20:05 +00:00
Andi Gutmans 7663e4f65e - Add parser support for string offsets. This added three shift/reduce
conflicts but they all seem to be fine.
- Cleaned up the parsing rules a bit and made them much more compact and
  elegant.
- Please CVS update and see that I didn't break anything.
2000-01-29 10:16:04 +00:00
Andi Gutmans b862a8b728 - This will save some memory w/ GCC compilers on some platforms 2000-01-29 09:14:22 +00:00
Andi Gutmans 5da185594c - Yet another tiny optimization. 2000-01-29 00:33:07 +00:00
Andi Gutmans 336bf35a2c - Make loop a bit faster. 2000-01-28 22:23:28 +00:00
Andi Gutmans 059b64efbe - Make sure its use is understood. 2000-01-28 21:46:07 +00:00
Andi Gutmans c23056719e - Double the speed of some key switch() tests for Win32. 2000-01-28 21:43:46 +00:00
Zeev Suraski 99f079a349 - A few fixes
- Added register_argv_argc directive to allow disabling of argv/argc
2000-01-28 18:29:37 +00:00
Zeev Suraski ab16816eb8 Rename gpc_globals to register_globals 2000-01-28 17:43:41 +00:00
Zeev Suraski 7723bdbaa7 Apache module compile fixes 2000-01-28 17:38:08 +00:00
Andrei Zmievski e02d610df8 Use sizeof on the proper string. 2000-01-28 17:29:37 +00:00
Zeev Suraski 9ab35ae393 Tried to centralize global variable registration as much as possible:
- Added $HTTP_ENV_VARS[] and $HTTP_SERVER_VARS[] support, which similarly
  to $HTTP_GET_VARS[], contain environment and server variables.  Setting
  register_globals to Off will now also prevent registration of the
  environment and server variables into the global scope (Zeev)
- Renamed gpc_globals to register_globals (Zeev)
- Introduced variables_order that deprecates gpc_order, and allows control
  over the server and environment variables, in addition to GET/POST/Cookies
  (Zeev)
2000-01-28 17:24:53 +00:00
Zeev Suraski 270eff1dfe Use a more general and descriptive name 2000-01-28 14:57:19 +00:00
Zeev Suraski d231293832 dsp updates 2000-01-28 14:46:19 +00:00
Andi Gutmans a8bb0a452d - Make Win32 compile again 2000-01-28 13:53:06 +00:00
Zeev Suraski fc678100cd post.c really had nothing to do with POST anymore, and it belongs to the top level directory 2000-01-28 13:31:12 +00:00
Andi Gutmans 6f63373bb2 - This makes the switch() statement twice as quick. Moving to enum
might make this a general speed up for other platforms too
2000-01-28 13:25:55 +00:00
Zeev Suraski 3a35a6955d Get rid of the old implementation 2000-01-28 12:53:05 +00:00
Sam Ruby 137765c95a accomodate old versions of kaffe which don't support jar 2000-01-28 10:53:06 +00:00
Sam Ruby 302ccb0d97 Shutdown cleanly (prevents Kaffe from trapping on exit) 2000-01-28 00:32:28 +00:00
Chuck Hagenbuch b87e48802e Mcal cleanup, stage 1: it compiles again (the php3 syntax to php4/zend
syntax conversion left a lot of: PHP_FUNCTION void ... definitions, giving
two types to every function).

However, it's still segfaulting. I'll look into that next.
2000-01-27 16:38:45 +00:00
Sam Ruby 5924c920ec PHP now starts up in CGI mode with Kaffe on RedHat Linux 6.1.
status: segfault atexit, npe in jawt - but otherwise both samples work!
Installation needs more work
2000-01-27 13:44:45 +00:00
Sam Ruby 31e3466556 Forward progress, thanks to Sascha Schumann.
libphp_java.so is now built again - it just refuses to load.
At least I now have something I can debug!
2000-01-27 02:13:21 +00:00
Sascha Schumann d0cb4d09aa Allow shared libraries to be built everywhere 2000-01-26 21:58:46 +00:00
Andi Gutmans 8b9765a917 - Keep objects as references. 2000-01-26 21:10:46 +00:00
Uwe Steinmann 87f72a4b06 - add another comment to the script 2000-01-26 06:31:29 +00:00
Uwe Steinmann 49be46409c - test script for domxml 2000-01-26 06:22:44 +00:00
Andi Gutmans 4585f7bf1f - Allow is_ref to become 0 in case the refcount is back to 1. 2000-01-26 05:03:22 +00:00
Uwe Steinmann 5c3917478a - resumed work on domxml and found a way to circumwent a segm fault
(see the source). No solution to fix it, yet. Probably needs some
  understanding of zend, which I don't have.
- added more functions
2000-01-25 17:00:09 +00:00
Egon Schmid 99ff6e3b76 Proper indentation here also. 2000-01-24 20:25:57 +00:00
Andi Gutmans 58a0844b1c - Make foreach() now copy the array but use the original array. It can
still be optimized A LOT but it's only a performance issue and not
  a feature issue.
2000-01-24 19:04:07 +00:00
Zeev Suraski 97f64988e2 NULL out the ticks callback until Stig implements it 2000-01-24 19:03:50 +00:00
Zeev Suraski fafbf6d8da - Implement declare() with declarables framework
- Implement ticks - Germany&Norway - 5 points!
2000-01-24 19:00:30 +00:00
Zeev Suraski adec56938e Fixes 2000-01-24 17:29:15 +00:00
Zeev Suraski e6ba28b680 Fix an elusive bug 2000-01-22 17:02:48 +00:00
Zeev Suraski c3677ca907 Add some order... 2000-01-20 14:26:31 +00:00
Zeev Suraski 92633067af Indentation fixes 2000-01-20 05:27:57 +00:00
Andi Gutmans af2ef0830a - Optimize zend_hash_del a tiny bit. 2000-01-19 19:47:16 +00:00
Andi Gutmans aa73f6b68f - Hopefully fix the hash problem. 2000-01-19 19:44:32 +00:00
Andreas Karajannis 2b6d84ff37 Fix for wrong library ordering with adabas 2000-01-19 18:21:53 +00:00
Andi Gutmans 7271c050a3 - Hrm I'm not concentrating 2000-01-19 18:14:20 +00:00
Andi Gutmans 99783fe795 - Actually the destructor should run after the data is already detached
from the hash but before the bucket is freed.
2000-01-19 18:12:05 +00:00
Andi Gutmans d3690efffe - Rollback hash_apply and friends. They assume now that hash_del is reentrant
as it first applies the destructor and only later nukes the bucket
2000-01-19 18:05:16 +00:00
Andi Gutmans b7b97df93f - Run destructor before the hash structure is modified, thus, making
hash_del, reentrant (BLOCK_INTERRUPTIONS needs to be made a counter now).
2000-01-19 17:39:55 +00:00
Andi Gutmans 58fb1a3922 - Undo a bug we introduced. (Another one out there). 2000-01-19 17:31:33 +00:00
Sam Ruby e6c203832e First step to restoring the ability to build Java support on Unix:
1) Restore the ability to build CGI as a shared library
2) Correct make dependency rule so that the jar files are included
3) Search for jar executable, and use it, if found

Left TODO: actually build the shared libraries
2000-01-19 14:45:26 +00:00
Thies C. Arntzen fb6a1b8b83 RETURN_NULL -> RETURN_NULL() // we don't want macros without an argumnet 2000-01-19 09:38:45 +00:00
Zeev Suraski 4b006cb8b0 This doesn't seem to be necessary, and causes a leak in case of output_buffering=on 2000-01-18 22:25:48 +00:00
Zeev Suraski 549cf0381a Leak fix 2000-01-18 22:18:17 +00:00
Zeev Suraski f6ac18841d Make the phpinfo() images work properly again 2000-01-18 19:15:45 +00:00
Thies C. Arntzen cd377b646d RETURN_NULL & RETVAL_NULL don't need (). 2000-01-18 08:40:45 +00:00
Thies C. Arntzen c6df8ab565 @- Ora_GetColumn()/Ora_FetchInto() now return NULL for NULL-Columns. (Thies)
also changed return-type for list-dtor
2000-01-18 08:35:55 +00:00
Zeev Suraski df138c2e2f - MS-SQL fix
- Fix a crash bug in session_register()
2000-01-17 22:41:59 +00:00
Thies C. Arntzen bbe2172c38 use defines 2000-01-17 19:17:58 +00:00
Zeev Suraski 19d978d1c7 Get rid of the IsPointer functionality in the hash. 2000-01-17 18:45:46 +00:00
Zeev Suraski a965dc5b40 - Fixes a newly introduced bug in the hash 2000-01-17 18:09:03 +00:00
Zeev Suraski 62114c1806 Destructors no longer return ints, the low level problem it was intended to solve is long gone now... 2000-01-17 17:33:37 +00:00
Zeev Suraski ec386cc9fd - Remove the pre-request-shutdown hooks, they should no longer be necessary.
The session module may not work due to an unknown (and until now, IMO, misdiagnosed) problem,
if it does, please report it!
2000-01-16 21:03:49 +00:00
Zeev Suraski ee08b81aab - Make zend_hash_apply() (and friends) reentrant and much, much quicker
- Introduce zend_hash_graceful_destroy(), which allows the destructor functions to
  use zend_hash_apply() and/or zend_hash_graceful_destroy()
- Switch to zend_hash_graceful_destroy() in the resource list shutdowns
2000-01-16 20:59:03 +00:00
Zeev Suraski 97e1ad136a Fix 2000-01-16 20:37:09 +00:00
Zeev Suraski 2dea694ab4 Remove the post-startup callback support. Modules are now started only after
the entire engine is started.  People - please make sure that the session module
works properly for you.
2000-01-16 19:43:34 +00:00
Zeev Suraski dc0e663241 Allow module startup to be separate from the compiler/executor startup 2000-01-16 19:41:15 +00:00
Thies C. Arntzen 4352cb55f1 move call to php_execute_pre_request_shutdown() into php_request_shutdown()
so it will be called when script terminated due to call to exit().
2000-01-16 14:34:28 +00:00
Thies C. Arntzen 8950aa75c4 @- OCI8 now supports binding of NULL-values. Module cleanups. (Thies)
lots of cleanup - all invisible to the user (i hope;-)
- full refcounting of connections & statements
- cleanup of the descriptor-code (descriptors are now real resources)
- we now use SQLT_CHR instead of SQLT_STR (no trailing \0) - smarter & faster
- ocifetchinto(OCI_BOTH) will use references.
2000-01-16 13:30:57 +00:00
Thies C. Arntzen 83097f136a fixes #3220, #3221 finally 2000-01-16 12:34:18 +00:00
Thies C. Arntzen 437e396455 nother go on #3220, #3221 2000-01-16 11:12:44 +00:00
Thies C. Arntzen 840697c69b hopfully fixes #3220, #3221 2000-01-16 10:51:55 +00:00
Thies C. Arntzen bd375505f7 make the ht->inconsistent stuff less ugly:) 2000-01-16 09:45:10 +00:00
Andrei Zmievski 3e5dc58f35 (wddx_stack_destroy) Properly free the dangling varname.
(php_wddx_deserialize_ex) There should be only 1 value on the stack after
                          parser is done.
2000-01-15 23:34:51 +00:00
Zeev Suraski caaeb9ff12 Fix a bug in call_user_function_ex() 2000-01-15 22:52:24 +00:00
Andrei Zmievski 878906fbb8 Another idea I had today. 2000-01-15 21:35:50 +00:00
Andrei Zmievski 2fc0dac01e (php_sockwait_for_data) timeout is not assigned yet, so check the right one. 2000-01-15 20:39:06 +00:00
Sascha Schumann 44a712d810 (php_sockwait_for_data) clean up 2000-01-15 19:51:44 +00:00
Andrei Zmievski bfc85c288a Fix prototype. 2000-01-15 19:42:40 +00:00
Andrei Zmievski 4423bf9d10 Added ability to set timeout on socket read operations. New function
set_socket_timeout(socket, seconds, microseconds) sets the timeout.
@- Added ability to set timeout on socket read operations through
@ set_socket_timeout() function. (Andrei)
2000-01-15 19:41:17 +00:00
Zeev Suraski a0591b32c7 Fix logic 2000-01-15 17:23:18 +00:00
Zeev Suraski 470fe972f5 Added support for $foo->{$bar}["foobar"] notation (was supported in PHP 3) 2000-01-15 17:17:32 +00:00
Sascha Schumann b83739945e Initialize flag correctly 2000-01-15 17:16:21 +00:00
Zeev Suraski 259c05829b Compile fixes for ZTS 2000-01-15 16:56:30 +00:00
Thies C. Arntzen c93a189028 if ZEND_DEBUG mode is on we'll now see warnings when a HashTable is accessed
while it's inconsistent.

Zeev, Andi - you welcome to revert this patch if you don't like it - i find it
useful! accesssing inconsistent hashtables is one of the hardest things to track!
2000-01-15 13:40:17 +00:00
Thies C. Arntzen bf4d20aaa8 just add a remark. zend_hash_apply can & will cause problems here unless 2000-01-15 13:39:19 +00:00
Thies C. Arntzen b42603eee6 in an rshutdown function we should not access the regular_list like this. 2000-01-15 13:35:06 +00:00
Sascha Schumann c7667cec62 Initialize/destroy hook lists implicitly. 2000-01-15 13:30:32 +00:00
Sascha Schumann a0b08b5e0b Be more verbose, if headers were already sent and remove RSHUTDOWN handler 2000-01-15 13:20:39 +00:00
Thies C. Arntzen 64c6e1e90e sessions are now written via a _php_session_shutdown which is registered
via php_register_pre_request_shutdown().
2000-01-15 13:09:32 +00:00
Thies C. Arntzen 3ff75e5b8b - don't set php_errormsg on errors that will cause a zend_bailout().
using zend_hash_update() can make things worse in this situation.
- new function php_register_pre_request_shutdown(). this way modules
  can register callbacks that will be called as soon as execution of
  the script is done but *before* any cleanup (global symbol_table etc)
  has taken place.
2000-01-15 13:02:54 +00:00
Sascha Schumann e078a04fd0 Complain verbosely, if a destroy failed 2000-01-15 12:17:18 +00:00
Andrei Zmievski 7d425f38ee Since we're highlighting code, put <code> and </code> around the code. 2000-01-14 19:35:29 +00:00
Zeev Suraski 24156db252 @- Added implicit_flush INI directive (Zeev) 2000-01-13 20:39:33 +00:00
Zeev Suraski f24931222c Make Win32 compile again 2000-01-13 20:34:45 +00:00
Zeev Suraski 3f74baed02 Woops, forgot to commit the right version of the file... 2000-01-13 17:54:51 +00:00
Zeev Suraski 972631be71 - Added flush() support to SAPI
- Got rid of the old flush() implemenetation in favour of the new one
- Added implicit_flush() support to the output buffering layer.
@- Added implicit_flush() to control whether flush() should be called
@  implicitly after any output (Zeev)
2000-01-13 17:37:25 +00:00
Sascha Schumann c658fc5cbd Only suppress including dlfcn.h when we are in PHP. 2000-01-12 19:56:12 +00:00
Sascha Schumann bf7b292db9 Move dl stuff from acconfig.h into zend.h. That allows us finer control
when it comes to suppressing dlfcn.h.
2000-01-12 19:52:33 +00:00
Sascha Schumann da67577ed3 Avoid including dlfcn.h, if we are compiling as an Apache module. 2000-01-12 19:44:35 +00:00
Sascha Schumann 4d83b0a315 Full gear backwards. We still need acconfig.h.in for additional acconfig.h
files (from TSRM/Zend).
2000-01-12 19:09:59 +00:00
Sascha Schumann d67a4cec24 Add description for AC_DEFINEs 2000-01-12 19:03:34 +00:00
Sascha Schumann 03505c7226 acconfig.h.in became superflicious when we removed the config.h.stubs.
Let's get rid of it.
2000-01-12 19:02:23 +00:00
Sascha Schumann 3164ac7217 Fix compile on AIX, #2071 2000-01-12 18:21:39 +00:00
Sascha Schumann 0dab12ec9f Make cvsclean work on AIX 2000-01-12 16:52:57 +00:00
Zeev Suraski 736570923d @- Fixed a crash in pfsockopen() (Zeev) 2000-01-10 19:56:23 +00:00
Andrei Zmievski 0aeeb7b169 *** empty log message *** 2000-01-10 15:17:16 +00:00
Uwe Steinmann 78e84f9da3 - changed cpdf_global_set_document_settings() to cpdf_global_set_document_limits() 2000-01-10 12:42:05 +00:00
Uwe Steinmann a4dc650d11 - added cpdf_global_set_document_limits() 2000-01-10 11:01:56 +00:00
Zeev Suraski d3cad4f289 Functionality & crash fixes 2000-01-09 19:16:34 +00:00
Zeev Suraski 8acd3e3818 @- Fixed a possible crash in phpinfo() (Zeev)
phpinfo() now ensures that HTTP_*_VARS[] are actually arrays before it tries
to access them...
2000-01-09 18:32:13 +00:00
Rasmus Lerdorf e8b74e56c9 # Fix silly typo 2000-01-08 14:36:12 +00:00
Thies C. Arntzen e1334ec9bb fix solaris compile 2000-01-07 13:30:53 +00:00
Sascha Schumann 7d5ba9d058 Add another point 2000-01-07 11:12:29 +00:00
Sascha Schumann c32a44111f Recognize UnixWare 7
Patch submitted by: opoplawski@cqg.com
2000-01-07 11:04:00 +00:00
18a476686d ChangeLog update 2000-01-07 02:09:40 +00:00
b29063a1ea NEWS update 2000-01-07 02:09:36 +00:00
Thies C. Arntzen 48e10ec9c4 @- Applied safe-mode patch to popen(). (Patch by Kristian Köhntopp) 2000-01-06 15:27:03 +00:00
3559dc0037 ChangeLog update 2000-01-06 02:09:34 +00:00
Sascha Schumann 4bd0b72b98 Fix namespace pollution 2000-01-05 19:37:13 +00:00
Sascha Schumann b645013ee5 `cp' will do the job everywhere, even on AIX 2000-01-05 19:33:02 +00:00
Sascha Schumann 304d60c8f3 Move reentrancy initialisation/destruction into SAPI.
These calls only do something, if reentrancy emulation is required.
2000-01-05 19:25:19 +00:00
Jouni Ahto 9a07df6c4a (php_setlocale) Fixed memory leak (bug #3105).
# Must have been thinking something else when originally wrote this.
2000-01-05 12:26:41 +00:00
abd545682e ChangeLog update 2000-01-05 02:09:32 +00:00
3076a86685 NEWS update 2000-01-05 02:09:26 +00:00
Andrei Zmievski 16a35c234e Fix IS_UNSET -> IS_NULL rename. 2000-01-04 14:41:56 +00:00
Andi Gutmans 44e9e95933 - Rename IS_BC to FLAG_IS_BC. We will probably nuke it. 2000-01-04 14:25:42 +00:00
Thies C. Arntzen af22085c51 added ZVAL_*() macros. 2000-01-04 13:56:17 +00:00
Andi Gutmans 60841f1231 - Separate the overloaded objects' types from Zend's data types.
There is no reason for them to be the same, and IS_METHOD just cluttered
  the data types.
- Overloaded elements should now use OE_IS_OBJECT, OE_IS_ARRAY, and
  OE_IS_METHOD
2000-01-04 13:56:13 +00:00
Andi Gutmans b8cebe32e3 - Separate the overloaded objects' types from Zend's data types.
There is no reason for them to be the same, and IS_METHOD just cluttered
  there data types.
2000-01-04 13:52:52 +00:00
Andi Gutmans bdefd5da15 - Change IS_UNSET -> IS_NULL 2000-01-04 13:22:58 +00:00
Thies C. Arntzen 402a9db2fe @- str_repeat() now returns correct length. (Thies) 2000-01-04 09:45:28 +00:00
Sascha Schumann 95cd75dce7 Fix typo 2000-01-04 03:01:43 +00:00
Sascha Schumann 2602a59e87 Replace all += constructs with equivalent ones 2000-01-04 02:58:46 +00:00
Rasmus Lerdorf a2f46f8e68 # Grr 2000-01-04 02:45:42 +00:00
Rasmus Lerdorf ed3c962b39 @ Don't assume libz and libpng are installed for the GD checks (Rasmus) 2000-01-04 02:42:27 +00:00
a241a80d68 ChangeLog update 2000-01-04 02:09:39 +00:00
576df38f59 NEWS update 2000-01-04 02:09:32 +00:00
Zeev Suraski f29ee8f7ee Fix a bug when using [] on a string 2000-01-03 20:01:54 +00:00
Joey Smith c5589a9dd5 # There is no functions/ directory in PHP4.
@ number.h comes from ext/bcmath, not functions/
 number.h comes from ext/bcmath, not functions/
2000-01-03 18:53:29 +00:00
Andrei Zmievski 4595bf1e20 * Implemented <boolean> and <null> types. We now support WDDX version 1.0
as best as we can.
* Cleaned up the API function names, _ was really not needed.
* Cleaned up the repetitive stack var name stuff with a macro.
* WDDX now no longer converts numbers to strings in arrays when during
  serialization.
@Implemented support for <boolean> and <null> types according
@to WDDX version 1.0 (Andrei)
2000-01-03 18:10:27 +00:00
Zeev Suraski 8e99c415ab Fix 2000-01-03 17:26:24 +00:00
Thies C. Arntzen f04aeeb649 even better;-) 2000-01-03 16:02:13 +00:00
Thies C. Arntzen a667251458 yes sir! 2000-01-03 15:57:18 +00:00
Sascha Schumann cd2b3616bb FreeBSD 2.x/3.x fix. 2000-01-03 12:39:44 +00:00
Thies C. Arntzen 35286e2922 *** empty log message *** 2000-01-03 11:55:00 +00:00
Thies C. Arntzen c91ecdb1a0 forgot 2000-01-03 10:57:56 +00:00
Andi Gutmans da8ad4f20f - Fix compare_function() for IS_UNSET 2000-01-03 05:28:34 +00:00
a51deb5371 ChangeLog update 2000-01-03 02:09:36 +00:00
7b0b368fc3 NEWS update 2000-01-03 02:09:33 +00:00
Thies C. Arntzen c4b6a034f1 nice to have. 2000-01-02 17:56:02 +00:00
Zeev Suraski 990ac99c97 Fix 2000-01-02 16:47:00 +00:00
Andreas Karajannis 0ab3cda84a Statements get closed before connection shutdown.
Disabled fetching all errors for Adabas.
2000-01-02 15:59:01 +00:00
Thies C. Arntzen 953bf8bbf6 (var_dump, serialize, unserialize) support NULL
@- Added new NULL constant (Zeev, Zend library)
2000-01-02 11:49:27 +00:00
Thies C. Arntzen bc6811ec90 renamed RET???_UNSET -> RET???_NULL 2000-01-02 11:44:33 +00:00
6570dc0e31 ChangeLog update 2000-01-02 02:09:27 +00:00
Sascha Schumann e2961b5e11 Add some points 2000-01-01 21:20:35 +00:00
Sascha Schumann 890c1de998 Remove second (equal) definition of isleap() 2000-01-01 20:50:37 +00:00
Sascha Schumann 800ffda01c Some cleanup 2000-01-01 20:49:34 +00:00
Sascha Schumann 6bdbd306b1 Y2K updates 2000-01-01 20:48:42 +00:00
Andi Gutmans 4a4fe0974f - IS_NULL should be 0 when converted to a long although I don't think it
really should be documented.
2000-01-01 18:47:03 +00:00
Thies C. Arntzen 8edf2b88dc tiny optimisation 2000-01-01 16:54:55 +00:00
Thies C. Arntzen e81d9aaca3 Happy new year (especially to Zeev :) 2000-01-01 16:52:14 +00:00
Zeev Suraski a6d4b30d19 Fix buglet 2000-01-01 15:31:59 +00:00
Sascha Schumann 2fd8cbff2a Declare timezone only, if the system fails to do so. 2000-01-01 02:22:01 +00:00
3dce6028f7 ChangeLog update 2000-01-01 02:08:50 +00:00
Sascha Schumann 43ae2bffbb Happy Y2K patch! Happy new year (or the new millennium, depending on whether
you start counting at 0 or 1).
2000-01-01 01:32:05 +00:00
Sascha Schumann 3762f2d25c Be as portable as possible 2000-01-01 01:20:59 +00:00
Zeev Suraski 4765396846 .dsp updates 1999-12-31 16:20:04 +00:00
Zeev Suraski 61b9e78e1b - Add Release_inline builds 1999-12-31 15:41:18 +00:00
Zeev Suraski fce126bcb1 Add new Release_inline builds to Win32. Standard release versions will not use
inline under Win32.
1999-12-31 15:39:54 +00:00
Zeev Suraski ccb4b18348 Happy new year (especially to Thies :)
- Zend branch patches merged in - get the PHP tree uptodate
- Clean
1999-12-31 14:06:31 +00:00
Zeev Suraski f2d703e916 - Nuke undefined_variable_string
- Introduce IS_UNSET
1999-12-31 13:56:59 +00:00
Andi Gutmans 400ee6caa0 - Fix bug #3073. continue in do..while() loops should work now 1999-12-31 12:56:48 +00:00
a95547478a ChangeLog update 1999-12-31 02:08:59 +00:00
Sascha Schumann f5bf967660 Fix linking problems with iODBC. This is from the Adabas section, so
this might work for iODBC.
1999-12-31 00:38:22 +00:00
Sascha Schumann 797b8885c5 First try at getting the ODBC stuff right 1999-12-31 00:21:01 +00:00
Sascha Schumann a4e1579afa Synchronize with rules.mk 1999-12-31 00:18:08 +00:00
Sascha Schumann 6bbe440f6d Perform manual interpolation for EXTRA_INCLUDES and EXTRA_CFLAGS 1999-12-31 00:15:27 +00:00
Andreas Karajannis 7c88c6fce1 Replaced some ODBC 3 stuff to be backwards compatible to ODBC 2 1999-12-30 17:11:47 +00:00
Sascha Schumann 5b2ecc5b82 Typedef socklen_t, if it is not available 1999-12-30 16:09:17 +00:00
Sascha Schumann 701a00d391 THREAD_T refers to thread ids, not attributes 1999-12-30 15:52:08 +00:00
Sascha Schumann 5a5ef06c57 Fix for Solaris incapability 1999-12-30 15:05:04 +00:00
Sascha Schumann 0c46c25633 Append liblber to satisfy symbols in libldap 1999-12-30 14:49:17 +00:00
Sascha Schumann afe0e5601b Let m4 decide what to do 1999-12-30 14:48:26 +00:00
Sascha Schumann 2a7fb51466 Remove second {}, that shouldn't be there 1999-12-30 14:47:32 +00:00
Sascha Schumann 7948fe36c4 Fix define.
This should be the last one, my earlier search didn't find macro names
contain numbers.
1999-12-30 13:19:56 +00:00
Thies C. Arntzen c76f23420e fix AC_DEFINE 1999-12-30 12:27:09 +00:00
Sascha Schumann 48c35eaeaa Define to 1 1999-12-30 08:03:55 +00:00
Sascha Schumann b92aadb6ee Proper protection for GNU make's parallel build 1999-12-30 07:15:43 +00:00
Sascha Schumann 163f5f4993 Propagate error condition correctly 1999-12-30 06:16:55 +00:00
Sascha Schumann 3a82ae9244 Ease include file selection. Let's see which cpps support this construct. 1999-12-30 06:09:46 +00:00
Sascha Schumann 6e1884a352 Rebuild config.h.in whenever configure changes 1999-12-30 06:07:56 +00:00
Sascha Schumann 531b5ecbfc Add distclean target 1999-12-30 05:53:27 +00:00
Zeev Suraski 5864b57eec This should enable people to use ALLOC_ZVAL() in code outside the php4.dll 1999-12-30 05:25:44 +00:00
Sascha Schumann cf5a5fb1dd Whoops, defining them to empty values generates many parse errors.
Defaulting to 1.
1999-12-30 04:52:19 +00:00
Sascha Schumann 2c99bef442 Get rid of config.h.stub. Note that you should embed a comment about
what the respective define does into the AC_DEFINE macro. I.e.

AC_DEFINE(HAVE_FOO, 1, [Whether you have FOO])
1999-12-30 04:07:46 +00:00
Sascha Schumann e3af8ed321 We build in regex as well, create empty .deps 1999-12-30 03:23:05 +00:00
Sascha Schumann 7070605a17 Let genfiles work in the new environment 1999-12-30 03:13:21 +00:00
Sascha Schumann f2f8d38efa Integration of -ng changes. Changes:
- added support for externally built modules,
- improved support for in-tree shared modules,
- fixed diversion bugs,
- configure displays some informative messages,
- faster static build
  (libtool isn't used anymore for compiling non-PIC objects),
- dependencies comparable to automake's without requiring GNU make or GCC,
- working make clean for non-GNU makes.
1999-12-30 02:59:53 +00:00
Sascha Schumann 6bf3529919 Macro syntax has changed 1999-12-30 02:21:21 +00:00
Sascha Schumann 9aef66711e Rewrite TSRM_CHECK_GCC_ARG to cache its result 1999-12-30 02:19:39 +00:00
06dda03a98 ChangeLog update 1999-12-30 02:08:57 +00:00
Sascha Schumann d93da3c1c3 Solaris' sed does not like this expression. Since -O0 is the default,
we can also omit it.
1999-12-30 01:13:42 +00:00
Sascha Schumann 85a5a2873e Let check succeed on systems which don't need special flags for pthreads.
Also change the message to be more informative.
1999-12-30 00:48:45 +00:00
Sascha Schumann f62473e8c1 Don't search for config.h.stubs in sapi 1999-12-29 21:25:01 +00:00
Sascha Schumann 289dc0b6ed Get rid of some config.h.stubs. Comments are placed into AC_DEFINE() 1999-12-29 21:24:43 +00:00
Zeev Suraski 80e20b5fea - Change var_reset() to set bool(0) instead of string("")
Authors should go over their code and change it to use var_reset() instead of manually
setting it to string(""), in case they're interested in the false value.
1999-12-29 17:29:26 +00:00
Zeev Suraski 8f88443aba time_t is an int under Linux... this should always work. 1999-12-29 17:22:47 +00:00
381349a8cd ChangeLog update 1999-12-29 02:09:03 +00:00
Sascha Schumann eb0971609b Make sapi_module static. This is was the majority of SAPI modules uses.
I wonder how this has worked up to now..
1999-12-28 23:48:39 +00:00
Sascha Schumann aec0bb339b Fix -Wall warnings 1999-12-28 20:50:34 +00:00
Sascha Schumann 32ef59b290 Fix warnings 1999-12-28 20:33:02 +00:00
Sascha Schumann 09d2e3d159 Move include into source file 1999-12-28 18:47:59 +00:00
Sascha Schumann a20c76fcbc Add neccessary includes 1999-12-28 18:45:10 +00:00
Thies C. Arntzen 3238c7ec2c *** empty log message *** 1999-12-28 15:23:24 +00:00
Thies C. Arntzen 155fd22de0 not too bad: i can see phpinfo()! 1999-12-28 14:09:58 +00:00
Thies C. Arntzen fbff71727b shut up 1999-12-28 13:59:17 +00:00
Thies C. Arntzen f3240be016 SAPI module for phttpd - found at ftp://ftp.netuse.de/pub/phttpd/, ftp://ftp.signum.se/pub/phttpd/
(DOES NOT WORK YET!!)
1999-12-28 13:58:52 +00:00
Thies C. Arntzen eb1927d94e non-ZTS fix 1999-12-28 12:14:18 +00:00
Thies C. Arntzen 546af70783 new constant: SQL_NULL
new macros: RETURN_SQLNULL,RETVAL_SQLNULL,IS_SQLNULL
1999-12-28 12:05:48 +00:00
Sascha Schumann 5d65261362 Remove unneccessary include to make stand-alone build work 1999-12-28 07:54:21 +00:00
Sascha Schumann 8395516b7d Move .PHONY special target to the end 1999-12-28 05:38:43 +00:00
53da0c2fba ChangeLog update 1999-12-28 02:09:03 +00:00
5a0e5b7fc6 NEWS update 1999-12-28 02:08:58 +00:00
Ryan Bloom 28ef78e4cb Beginning work to get PHP 4 to work with Apache 2.0. This change detects
Apache 2.0 properly.
# This is extremely experimental because neither project is release
# quality yet.  I expect this to drive bugs out of Apache 2.0's configure
# process as well as provide a useful version of PHP for Apache 2.0, so it
# may take some time for this to become stable.  I will commit changes to
# PHP as needed although more modifications will be on the Apache side.
1999-12-27 23:42:46 +00:00
Zeev Suraski 39d9a93acc Fix 1999-12-27 22:03:25 +00:00
Zeev Suraski b640c27a08 @- Fixed -c support in the standalone CGI binary (Zeev)
Fixed -c support in the standalone CGI binary (Zeev)
1999-12-27 21:21:26 +00:00
Andi Gutmans c34a062f5c - Get rid of warning 1999-12-27 19:17:40 +00:00
Zeev Suraski b7a5b3c309 - Generalize the fast cache mechanism
- Add the HashTable struct to the fast cache mechanism
1999-12-27 19:07:33 +00:00
Andi Gutmans 27daca31f3 - Make zend_internal_function allocate a full zend_function structure so
that we don't get memory overruns and Thies doesn't get angry :)
1999-12-27 17:29:35 +00:00
Zeev Suraski 1ad06e428d *** empty log message *** 1999-12-27 17:24:33 +00:00
Zeev Suraski ebd4445ba2 Add cache statistics support 1999-12-27 16:42:59 +00:00
Andrei Zmievski 8eb145a3be Format fix. 1999-12-27 14:18:30 +00:00
Thies C. Arntzen 9cf1a98d0e fix UMR in ZTS mode 1999-12-27 11:22:57 +00:00
Sascha Schumann 7e156e73b5 Build correctly on systems which lack localtime_r 1999-12-27 10:52:46 +00:00
Sascha Schumann 4e1baf3a4e Save a few lines while checking for -pthread[s]? 1999-12-27 09:54:12 +00:00
a770520bff ChangeLog update 1999-12-27 02:09:03 +00:00
Zeev Suraski 3c50b7ee45 - Enable the new zval cache on debug too. No real reason not to, and it keeps
the code cleaner.
- ZTS compile fixes
1999-12-26 23:20:18 +00:00
Zeev Suraski b90bc0b15c Fix buglet 1999-12-26 22:50:08 +00:00
Zeev Suraski 90e1b0734e Add missing file 1999-12-26 22:41:20 +00:00
Sascha Schumann 068596552d Cache results of crypt capability checks 1999-12-26 22:35:55 +00:00
Zeev Suraski 10dd60795c *** empty log message *** 1999-12-26 21:58:46 +00:00
Zeev Suraski aec33aa753 Introduce a zval-specific cache - 5-15% speed improvement 1999-12-26 21:56:59 +00:00
Sascha Schumann 14f915ece6 Makefile.am: Add dummy target for dependencies
acinclude.m4: Cache result of broken sprintf check
1999-12-26 21:45:53 +00:00
Zeev Suraski 235386b245 Change ALLOC_ZVAL() semantics 1999-12-26 21:21:33 +00:00
Zeev Suraski c517633b49 namespace protection 1999-12-26 20:45:42 +00:00
809a2c6254 ChangeLog update 1999-12-26 02:08:58 +00:00
Zeev Suraski 90f1218fbb - Change uint32 to php_uint32 (PostgreSQL defines uint32, and perhaps other packages too)
- PostgreSQL finally compiles&links
1999-12-26 00:18:44 +00:00
Zeev Suraski 7d2d48e116 Make PostgreSQL compile again 1999-12-25 23:59:14 +00:00
Zeev Suraski 7f27821c5f inline functions cannot accept varargs 1999-12-25 23:52:00 +00:00
Andi Gutmans 88b7ed053f - Prepare Zend for the new $a{2} string offset syntax. 1999-12-25 16:46:32 +00:00
Andi Gutmans d6f788f56a - Get rid of two warnings 1999-12-25 09:06:55 +00:00
50e49b4a5f ChangeLog update 1999-12-25 02:09:05 +00:00
e0690e4e12 NEWS update 1999-12-25 02:09:00 +00:00
Sascha Schumann e3ff6b561d Update .cvsignore, make build.mk more verbose 1999-12-24 23:29:39 +00:00
Sascha Schumann 9120a4231c Enable dependencies for UNIX. Because this only works, if you use
GNU make and GCC, you need to enable it manually by running

$ touch php4/want_dependencies
1999-12-24 22:55:33 +00:00
Zeev Suraski e25e3f092a Use __forceinline under Win32 (inlining under Win32 gives roughly 30% performance
increase)
1999-12-24 21:27:55 +00:00
Zeev Suraski 735efc17f3 php3_realpath.c -> php_realpath.c 1999-12-24 20:47:35 +00:00
Zeev Suraski 21b403d4d9 Fix warnings 1999-12-24 20:47:01 +00:00
Zeev Suraski 57fbbf2036 Shut gcc up 1999-12-24 20:19:37 +00:00
Andi Gutmans 3bf1b04cb4 - Move more stuff to ALLOC_ZVAL(). We need to add those FREE_ZVAL()'s now. 1999-12-24 17:39:27 +00:00
Zeev Suraski e28aff2f7a Optimize 1999-12-24 16:03:44 +00:00
Sascha Schumann fc6c531ec2 Add -rdynamic, if supported by gcc and static Apache build is used 1999-12-24 15:56:40 +00:00
Sascha Schumann 0ef049d707 Remove --enable-low-memory, and preserve LIBS from TSRM 1999-12-24 15:47:44 +00:00
Sascha Schumann 69f8907a29 Put -pthreads? into CFLAGS; libtool still filters it out during shared
library linking; need to find a way to prevent that.
1999-12-24 15:44:58 +00:00
Andi Gutmans 3f6e00e48d - Use ALLOC_ZVAL() in PHP. Finding the places to put FREE_ZVAL(z) is much
more tricky and I'm not sure how many places this is. zval allocations
  were only made directly in 11 places.
1999-12-24 15:43:39 +00:00
Andi Gutmans 62b2087a84 - Create two new macro's. ALLOC_ZVAL() and FREE_ZVAL(z) and make Zend use
them.
1999-12-24 15:22:11 +00:00
Zeev Suraski 946df29029 - Use function_add_ref() here too 1999-12-24 14:49:57 +00:00
Zeev Suraski af925f0a14 - Beef up the INI file reader - it now supports PHP constants, as well as
bitwise operators on them (no more error_reporting = 7, from now on you
  can use error_reporting = E_ALL & ~E_NOTICE
@- Improved the php.ini reader to support constants and bitwise operators (Zeev)
1999-12-24 13:46:24 +00:00
9903bb93a2 ChangeLog update 1999-12-24 02:09:08 +00:00
eab451e6e8 NEWS update 1999-12-24 02:09:03 +00:00
Andi Gutmans 7a2471ede0 - Make the project compile again 1999-12-23 22:21:37 +00:00
Zeev Suraski b996436b4c Fix a class inheritence leak, when using static varibles in a parent class member function 1999-12-23 19:23:36 +00:00
Zeev Suraski 3b86ea7dc0 This one slipped away 1999-12-23 18:07:52 +00:00
Sascha Schumann 44ffdc182f Rename option to match description string 1999-12-23 17:48:56 +00:00
Thies C. Arntzen 3c8990eb36 clean up basic_functions 1999-12-23 15:18:56 +00:00
Zeev Suraski 67b4b3a634 - require() of a dynamic expression now has the standard require() semantics
- Fixed a memory leak in require() of a dynamic expression
1999-12-23 15:03:25 +00:00
Thies C. Arntzen 63d0849403 pval->zval 1999-12-23 14:59:01 +00:00
Thies C. Arntzen a94721fc4c @- strrev() no longer modifies arg1. (Thies) 1999-12-23 14:55:50 +00:00
Sascha Schumann 9156d86009 Compile zend_execute.c with special CFLAGS. For GCC, INLINE_CFLAGS
contains -O0 to disable optimizations. This can be disabled by using
the appropiate parameter.
1999-12-23 13:29:26 +00:00
Thies C. Arntzen a04805ce88 killed warning + added reminder 1999-12-23 12:52:12 +00:00
Thies C. Arntzen 337bcc7014 ZTS fix 1999-12-23 12:46:25 +00:00
Sascha Schumann 458f3e427f Also remove files which are ignored by default by CVS. 1999-12-23 12:34:55 +00:00
Thies C. Arntzen 4e095276af digital cc doe not like whitespaces before a # mark 1999-12-23 08:18:35 +00:00
34075d480e ChangeLog update 1999-12-23 02:09:10 +00:00
dd2a2a8072 NEWS update 1999-12-23 02:09:06 +00:00
Sascha Schumann 5eeb9db457 Kill compiler warning 1999-12-22 22:47:18 +00:00
Sascha Schumann 473632bf0d Kill compiler warning 1999-12-22 22:43:55 +00:00
Sascha Schumann 81913fc35c Clear LIBS as well, otherwise later linking checks (TSRM) might fail 1999-12-22 22:38:10 +00:00
Sascha Schumann a1160a3eb9 Add TSRM's LDFLAGS to EXTRA_LDFLAGS 1999-12-22 22:24:20 +00:00
Sascha Schumann aa3737e6e1 Improved check for GCC's -pthread and -pthreads flag 1999-12-22 22:23:06 +00:00
Sascha Schumann b0e1f9ca2f Enable --with-oci8 to use relative paths as input parameters 1999-12-22 22:16:47 +00:00
Sascha Schumann 304f1ebcb2 Don't set DEBUG_CFLAGS to -g, if -g is already in CFLAGS 1999-12-22 21:04:34 +00:00
Sascha Schumann 23f92bfa20 Limit _POSIX_PTHREAD_SEMANTICS to Solaris, and stop appending -O2. This
is automatically done by autoconf's AC_PROG_CC.
1999-12-22 21:02:31 +00:00
Sascha Schumann 1601a2dac9 Ignore these directory entries 1999-12-22 20:27:53 +00:00
Zeev Suraski 5ba5f00f65 export 1999-12-22 20:24:52 +00:00
Sascha Schumann 3ae459b83e Fix ltconfig, ltmain.sh
Update config.sub, config.guess from libtool-1.3.4
1999-12-22 20:24:30 +00:00
David Hedbor 41392f5497 unlock the serializing lock a tad bit later 1999-12-22 20:11:48 +00:00
Zeev Suraski 11967c94fc Those void's don't belong in there 1999-12-22 19:21:15 +00:00
Zeev Suraski 1fe57c9505 - Fix function_exists() 1999-12-22 18:49:23 +00:00
Zeev Suraski 5939b3d702 - Fix a very old legacy memory leak in break(n) statements 1999-12-22 18:10:38 +00:00
Zeev Suraski 5c56fd4793 Fix for the array() initialization bug Stas found 1999-12-22 15:34:38 +00:00
Andrei Zmievski 3d7d75cef8 Little fix. 1999-12-22 14:54:21 +00:00
Thies C. Arntzen ec33704c39 @- Fixed buffer overruns in iptcembed(). (Thies) 1999-12-22 14:46:31 +00:00
Andi Gutmans ff737b6090 - Remove unused variable. 1999-12-22 14:38:00 +00:00
David Hedbor f4d14ad69c Catch errors in the pike version-check script to avoid potential problems 1999-12-22 05:02:07 +00:00
19f0603885 ChangeLog update 1999-12-22 02:09:13 +00:00
6f5f74da55 NEWS update 1999-12-22 02:09:09 +00:00
David Hedbor c07a14a01f Removed C++ style comment 1999-12-22 01:09:08 +00:00
David Hedbor 4674b6d652 Some fixes in thread safe (ie ZTS) mode - now it actually seems to
work perfectly. Also fixed a couple of typos.
1999-12-22 01:00:30 +00:00
Sascha Schumann 095909be79 Logic fix, improved comments, better SID checking 1999-12-22 00:38:04 +00:00
Sascha Schumann f889148335 Warn users, if they have disabled gpc_globals and track_vars. Also work
correctly, if users have enabled track_vars/disabled gpc_globals.
1999-12-22 00:11:04 +00:00
Sascha Schumann a2276107ab Some cleanup 1999-12-21 22:58:04 +00:00
Zeev Suraski e538fcbf10 @- Fixed a bug in ODBC error reporting (Zeev)
@- Added PHP_Logo_GUID() and Zend_Logo_GUID() functions, that return the GUIDs
@  of the PHP and Zend logos used in phpinfo() (Zeev)
1999-12-21 20:35:43 +00:00
Zeev Suraski f0888ccaef Fix the highlighting problem. STR_REALLOC() should be used instead of plain erealloc()
whenever you're dealing with strings that might be coming back from the engine - there seem
to be a few other places like this in PHP.
1999-12-21 20:30:04 +00:00
Andrei Zmievski 42847f7d5c Some more php3->php stuff. 1999-12-21 20:02:26 +00:00
Andrei Zmievski 0f1acb60a1 php3 -> php prefix work 1999-12-21 19:43:38 +00:00
Andrei Zmievski cc205c60ae Correct PHP's mime type. 1999-12-21 19:40:27 +00:00
Andrei Zmievski 99b83a38de *** empty log message *** 1999-12-21 18:56:09 +00:00
Sascha Schumann 23e5aedd37 Move TSRM checks, so that additional flags can be considered
@- Added GNU Pth support (Sascha, TSRM library)
1999-12-21 18:04:31 +00:00
Sascha Schumann fa1f318d74 Enable TSRM to use Pth 1999-12-21 18:03:35 +00:00
Andrei Zmievski 80bab9d939 We're using ZVAL's now. 1999-12-21 17:14:31 +00:00
Thies C. Arntzen ff7a79c6cf some more thoughts 1999-12-21 16:55:07 +00:00
Thies C. Arntzen e96c5401f1 commented out select() & friends for now - we need to come up with a good API for those! 1999-12-21 16:51:27 +00:00
Sascha Schumann 4fb1e2788f Improve Pthreads check 1999-12-21 16:29:30 +00:00
Zeev Suraski 8a4170e6bd - Fix Sascha's leak. Good report! 1999-12-21 15:55:46 +00:00
Zeev Suraski 3a47431122 No need to block for interruptions so early 1999-12-21 15:48:56 +00:00
Andi Gutmans 5ae205fb41 - This should have made it into the NEWS 1999-12-21 15:25:13 +00:00
Andrei Zmievski 5c3666eb00 Optimize. 1999-12-21 15:16:21 +00:00
1a48d4d155 ChangeLog update 1999-12-21 15:12:04 +00:00
07bb5d89b3 NEWS update 1999-12-21 15:11:58 +00:00
Thies C. Arntzen 51bea21b3b would be nice & clean 1999-12-21 14:51:41 +00:00
Evan Klinger 8306501e48 Ex API 1999-12-21 06:11:52 +00:00
Zeev Suraski 06ab44337f This should get it to compile... 1999-12-21 05:22:43 +00:00
Sascha Schumann a31237a21f Only add additional include paths, if building in a separate directory
(cosmetic change)
1999-12-21 02:35:07 +00:00
Sascha Schumann 12f9894f54 Workaround for broken trs 1999-12-21 02:34:26 +00:00
Sam Ruby 8a34d1a7e0 Further cleanup as including php.h is no longer harmful
- thanks to Sascha for noticing it.
Tested on Linux and WinNT, should work everywhere.
1999-12-21 02:34:20 +00:00
Sascha Schumann 931bbca113 Change order to avoid system prototype mismatch (sprint is defined to
php_sprintf by php_config.h)
1999-12-21 01:22:31 +00:00
Sascha Schumann 2e07f02451 Propagate ZTS setting correctly 1999-12-21 00:15:51 +00:00
Sascha Schumann efeadf086b Explicitly check for C++ preprocessor, otherwise autoconf forces it onto
us at the wrong place (subsequent autoconf checks failed).
1999-12-21 00:02:20 +00:00
Sascha Schumann ed0a307ccd Use sapi_module_struct to contain SAPI module name 1999-12-20 23:09:54 +00:00
Andrei Zmievski 742c58c240 (PHP preg_quote) Made binary-safe.
@ Made preg_quote() binary-safe. (Andrei)
1999-12-20 20:49:56 +00:00
Andrei Zmievski 6e1dbe497c Made quotemeta() binary-safe.
@ Made quotemeta() binary-safe. (Andrei)
1999-12-20 20:43:47 +00:00
Zeev Suraski 469966917b Use Critical Sections under Win32 - shows roughly 40% performance increase under
multithreaded Win32!
1999-12-20 20:02:25 +00:00
Zeev Suraski a2cc070fc2 - Fix @expr 1999-12-20 20:01:19 +00:00
Andrei Zmievski 1ad5180f28 getParameters -> zend_get_parameters 1999-12-20 17:34:55 +00:00
Zeev Suraski be1bb28355 - Fix the crash Thies was experiencing (returning a function call could cause a crash)
- Fix the leak Thies was experiencing (@fcall() leaked)
1999-12-20 16:05:36 +00:00
Zeev Suraski f455a484bd Make the Win32 tree compile again 1999-12-20 15:38:44 +00:00
Andrei Zmievski 2603f1c419 Zend fixups. 1999-12-20 15:23:38 +00:00
Egon Schmid 5eba3fbd34 Corrected some protos. 1999-12-20 13:28:17 +00:00
Hartmut Holzgraefe a4c22c8b3a IMAP should now be in sync with its PHP3 counterpart 1999-12-20 11:10:33 +00:00
Sascha Schumann 724e4e2259 Fix typo 1999-12-20 08:10:38 +00:00
Sascha Schumann 839390c19c Add and fix a few entries 1999-12-20 07:37:38 +00:00
Sascha Schumann 0d70a91b6d Add information about chosen SAPI module to phpinfo() 1999-12-20 07:12:27 +00:00
Sascha Schumann 56a5e84f9d Add SAPI module for thttpd server. Quote from the README:
This is a SAPI module for PHP 4.0 supporting thttpd, the tiny,
    turbo, throttling HTTP server by Jef Poskanzer.

    The module contains a patch against version 2.10 of thttpd. The patch
    adds hooks to thttpd to call PHP, if a filename matches *.php. This
    patch will be applied when you install PHP.

    While functional, this module exists primarily to demonstrate the
    ability of PHP to work in almost every web server environment.
1999-12-20 07:11:14 +00:00
Evan Klinger f5d5637f72 Ex API 1999-12-20 02:09:58 +00:00
665078d0c4 ChangeLog update 1999-12-20 02:09:17 +00:00
Evan Klinger eb54c032c8 Ex API 1999-12-20 01:23:15 +00:00
Evan Klinger 9ea9ca32ba Ex API and UDP support.
@- Added UDP support in fsockopen() (Evan).
# UDP activated with "udp://hostname"
1999-12-20 00:55:58 +00:00
Zeev Suraski dc0a5f9c24 Fix PostgreSQL build 1999-12-19 22:44:55 +00:00
Zeev Suraski 8224207b26 Some updates 1999-12-19 21:29:24 +00:00
Zeev Suraski 4148381dff Win32 updates 1999-12-19 21:29:06 +00:00
Zeev Suraski 2d87ae9ab6 Make these work again 1999-12-19 21:17:32 +00:00
Zeev Suraski 4d2b0715d1 libzend -> Zend 1999-12-19 21:02:54 +00:00
Sascha Schumann b4b39c6886 Fix broken sprintf handling in PHP 1999-12-19 20:08:40 +00:00
Danny Heijl 4dbf758f4c (ext/informix) function name changes: zend_get_parameters_ex (danny) 1999-12-19 20:05:53 +00:00
Zeev Suraski 489de5dce2 Support the latest update to call_user_function_ex() 1999-12-19 18:58:27 +00:00
Zeev Suraski 223c674c2a - Made things work again (Thies, everybody - please check the latest CVS and see if you're
still getting any problems)
- Changed the interface of call_user_function_ex() to support returning of references
1999-12-19 18:54:40 +00:00
Hartmut Holzgraefe 9947223800 replaced PHP_FE by PHP_FALIAS in imap_functions[] where appropriate 1999-12-19 16:31:26 +00:00
Sascha Schumann cb45c2ea55 Use zend_sprintf by default (which is defined to sprintf, if the system's
sprintf is useable).
1999-12-19 14:39:41 +00:00
Sascha Schumann 143b02d8a4 Fix for missing RAND_MAX on SunOS 4.1 1999-12-19 14:27:45 +00:00
Sascha Schumann 48fb8ba3cd Refine PEAR option. Since it does not reference anything external, it should be
AC_ARG_ENABLE instead of AC_ARG_WITH.
1999-12-19 13:59:29 +00:00
Andi Gutmans 213d0e2fb2 - More fixes related to the return references patch
- eval_string() and call_user_function_ex() still don't work.
- The libzend tree is untested and might not be stabl yet.
1999-12-19 06:39:17 +00:00
Evan Klinger e760c2b3b9 DAV extension now compiles. 1999-12-19 02:15:18 +00:00
Sascha Schumann 63d4411560 Use workaround function for sprintf, if the return value of sprintf is needed 1999-12-19 02:12:31 +00:00
Evan Klinger 497b3fe2c5 Fix for #2994 1999-12-19 02:04:20 +00:00
Sascha Schumann b3c440c06a Add zend_sprintf.c 1999-12-19 01:50:10 +00:00
Sascha Schumann 2185831922 configure sets ZEND_BROKEN_SPRINTF 1999-12-19 01:47:43 +00:00
Sascha Schumann bf1effa4bc Variables are not interpolated unless we use _UNQUOTED 1999-12-19 00:10:08 +00:00
Sascha Schumann d15e7a5ec2 Fix for missing RAND_MAX on SunOS 4.1
Reported by: Brian Lalor <blalor@netDrives.com>
1999-12-18 23:28:43 +00:00
Andrei Zmievski ce10927efb Added --without-pear option. 1999-12-18 23:25:55 +00:00
Zeev Suraski a1ad2872ee - The tree compiles again 1999-12-18 22:40:35 +00:00
Sascha Schumann f1fcb022be Let autoconf check for the proper inline keyword 1999-12-18 22:37:22 +00:00
Sascha Schumann 11c9545416 automake created illegal target names due to the ZEND_SCANNER definition.
We now substitute @ZEND_SCANNER@ directly
1999-12-18 22:30:23 +00:00
Zeev Suraski cd7d5546ae - Introduce ZEND_NUM_ARGS(), to replace ARG_COUNT(ht)
- Rename getParameters() and friends for consistency and namespace cleanliness
1999-12-18 22:23:23 +00:00
Zeev Suraski 21e53485dd getParameters() and friends changed for consistency and namespace cleanliness 1999-12-18 22:21:51 +00:00
Sascha Schumann 47b49c8a68 Get rid of all GNUisms in build.mk. Verified to work with BSD make,
SysV make, and GNU make (tested on FreeBSD-current, Solaris 7, Linux with
GNU make 3.78).
1999-12-18 22:20:05 +00:00
Andi Gutmans 28bfab716b - Make Win32 compile again 1999-12-18 17:44:56 +00:00
Danny Heijl 6bdcfc745d (ext/informix) : remove traces of php3 (danny) 1999-12-18 17:08:41 +00:00
Andrei Zmievski 74dcad5107 Fix #2999. 1999-12-18 17:05:21 +00:00
Thies C. Arntzen 69c046e53b compiles again 1999-12-18 15:10:04 +00:00
Zeev Suraski e1e08ae506 Some more php3_ cleanup 1999-12-18 12:03:53 +00:00
Zeev Suraski ea20775565 More php3_ cleanup 1999-12-18 11:59:43 +00:00
Zeev Suraski e18a883796 More php3_ cleanup 1999-12-18 11:49:31 +00:00
Zeev Suraski 3db6716761 More php3_ annihilation 1999-12-18 11:38:04 +00:00
Sascha Schumann 6c3477c003 some style changes 1999-12-18 11:14:26 +00:00
Zeev Suraski 83fef4866d More php3_ cleanup 1999-12-18 04:08:03 +00:00
Zeev Suraski 3ee4e65c95 More php3_ annihilation 1999-12-18 04:01:20 +00:00
Zeev Suraski 8a581c3536 More php3_ annihilation 1999-12-18 03:20:53 +00:00
cce755591b ChangeLog update 1999-12-18 02:09:18 +00:00
2ad04e47c5 NEWS update 1999-12-18 02:09:12 +00:00
Zeev Suraski 396bccfb1d More php3_ cleanup 1999-12-17 22:34:04 +00:00
Zeev Suraski 878ed4934c More cleanup 1999-12-17 22:01:09 +00:00
Zeev Suraski bb3ca12629 More cleanup... 1999-12-17 21:50:07 +00:00
Zeev Suraski 502bb9c746 More php3 cleanup 1999-12-17 21:34:28 +00:00
Zeev Suraski 59a3b83bf5 More php3 cleanup 1999-12-17 21:19:59 +00:00
Zeev Suraski 66f5e50050 More cleanup... 1999-12-17 21:13:15 +00:00
Zeev Suraski 2d0b84ee30 More work on php3_ annihilation... 1999-12-17 20:55:32 +00:00
Zeev Suraski fb1c77bd4f - Made PHP_VERSION and PHP_OS work again
- More php3_ cleanup
@- Restored the PHP_VERSION and PHP_OS constants (Zeev)
1999-12-17 20:55:31 +00:00
Zeev Suraski 71dddd7db7 - Made PHP_VERSION and PHP_OS work again
- More php3_ cleanup
@- Restored the PHP_VERSION and PHP_OS constants (Zeev)
1999-12-17 20:01:47 +00:00
Zeev Suraski a3c6514332 More php3_ annihilation 1999-12-17 19:51:39 +00:00
Zeev Suraski 02d3b39420 More php3_ annihilation 1999-12-17 19:16:50 +00:00
Hartmut Holzgraefe 9ebd037226 merged in imap_search() from the PHP3 tree
more ( like imap_lasterror() ) will follow
1999-12-17 18:30:06 +00:00
Sascha Schumann fb61a2c944 Define inline to inline explicitly 1999-12-17 17:50:14 +00:00
Sascha Schumann 13b2c79f6a Remove passthru, it is not needed anymore 1999-12-17 14:36:53 +00:00
Sascha Schumann a4c484a4d8 Build structure change. Instead of using an external configure for libzend
and TSRM, the core code of these configures was separated into extra m4
files which we can now include into PHP's configure. Advantages:

- better integrated
- faster
- distribution becomes smaller (only one set of libtool files)
1999-12-17 14:28:35 +00:00
Sascha Schumann 1687075373 Make Apache SAPI module compile in ZTS mode 1999-12-17 14:24:39 +00:00
Sascha Schumann 91549cfa4f Move config code into separate file 1999-12-17 13:36:15 +00:00
Andi Gutmans 7fe808ea02 - By mistake commited this to the branch. It fixes a bug we introduced with
the return reference patch.
1999-12-17 08:24:10 +00:00
Andrei Zmievski 6aa9078d16 Fix up screw up. 1999-12-17 03:15:58 +00:00
5c95a044dd ChangeLog update 1999-12-17 03:08:01 +00:00
6dcfd23eeb NEWS update 1999-12-17 03:07:58 +00:00
Andrei Zmievski 8f17fbb900 Added get_loaded_extensions(), extension_loaded(), and
get_extension_funcs() functions.
@ Added get_loaded_extensions(), extension_loaded(), and
get_extension_funcs() functions. (Andrei)
1999-12-16 23:47:10 +00:00
Andrei Zmievski 17b74af457 A little renaming. 1999-12-16 17:48:32 +00:00
Sam Ruby 5da8a25c5c force ext/java to be built as a shared library 1999-12-16 17:15:02 +00:00
Sascha Schumann d787ea5346 (php_ns_request_handler) set SG(server_context) to non-NULL 1999-12-16 17:07:19 +00:00
5b4306d183 ChangeLog update 1999-12-16 03:08:02 +00:00
db67fc0cfd NEWS update 1999-12-16 03:07:58 +00:00
Andrei Zmievski 679bfd11aa And still more stuff. 1999-12-15 23:39:52 +00:00
Andrei Zmievski 43e0ef5e72 More stuff for me to do. 1999-12-15 23:38:42 +00:00
Andrei Zmievski 8a879b8fc5 Doh! I'm an idiot. 1999-12-15 22:37:05 +00:00
Andrei Zmievski 9201cfdd81 NEWS notice. 1999-12-15 22:36:24 +00:00
Andrei Zmievski c9c6446aa1 - s/inheritence/inheritance/g
- Added is_subclass_of() function
1999-12-15 21:26:43 +00:00
Zeev Suraski d8000684bf - Implement ability to turn off support for call-time pass by reference 1999-12-15 21:20:34 +00:00
Zeev Suraski ced9cee10c - Implement return by reference:
- In function declaration instead of the return statement
  - In the assignment phase
- Implement ability to turn off support for call-time pass by reference
1999-12-15 20:15:32 +00:00
Uwe Steinmann 3c700f9260 switched to Ex Api 1999-12-15 19:10:54 +00:00
Andrei Zmievski 158979f838 (return_one) removed.
(OnChangeMemoryLimit) Only defined if MEMORY_LIMIT is defined.
1999-12-15 17:41:19 +00:00
Andrei Zmievski b68f3af503 Added date/time stamping to PHP error log file. Idea credit goes
to Joey.
@ Added date/time stamping to PHP error log file. (Andrei, Joey)
1999-12-15 17:37:05 +00:00
Andrei Zmievski 22344ea595 val->len 1999-12-15 16:54:46 +00:00
Andrei Zmievski 005c9d0341 Fixing. 1999-12-15 16:07:04 +00:00
Andrei Zmievski 46b14f85c3 Faster, must go faster. 1999-12-15 15:59:04 +00:00
Uwe Steinmann 1ccad1ab7d fixed some compile errors. 1999-12-15 15:27:51 +00:00
Evan Klinger 4e86f5d754 Ex API 1999-12-15 05:21:28 +00:00
Evan Klinger 5ca6da5ae8 I would've compiled first, I swear... 1999-12-15 03:51:25 +00:00
Evan Klinger bc7b3fc745 Ex API 1999-12-15 03:46:00 +00:00
Andrei Zmievski 795295206b Not yet, Joey. 1999-12-15 03:41:01 +00:00
7bb95460d5 ChangeLog update 1999-12-15 03:08:10 +00:00
704151ca19 NEWS update 1999-12-15 03:08:05 +00:00
Andrei Zmievski 1be7a8d461 Moved function_exists() to Zend library. 1999-12-14 22:15:55 +00:00
Danny Heijl 88892c6792 (bcmath) Name of header changed from php3 to php but include forgotten. 1999-12-14 21:44:35 +00:00
Andrei Zmievski 3fdf0dbedc - Added class_exists()
- Moved function_exists() here from from the basic_functions.c
- Modified method_exists() to convert method name to lowercase
  when checking
1999-12-14 21:15:24 +00:00
Joey Smith 7dfeb4fd21 # Added date/time stamping to php3_log_error
@ Preliminary support for date/time stamping in error logs
Preliminary support for date/time stamping in error logs
1999-12-14 18:37:14 +00:00
Uwe Steinmann 7af301be55 always check if output is ok after php3_header() 1999-12-14 12:50:21 +00:00
Mark Musone 32486ef0b3 whoops..need to allow 7 parameters also 1999-12-14 06:22:41 +00:00
Thies C. Arntzen 1cad06afda (getimagesize) grrr, fixed newly (30 min ago) introduced NPR 1999-12-14 04:32:54 +00:00
Thies C. Arntzen ad764253ca use ex-API 1999-12-14 04:10:01 +00:00
Thies C. Arntzen 6553540153 @- implemented count_chars(). (Thies) 1999-12-14 03:52:12 +00:00
Thies C. Arntzen 8267934235 use ex-API 1999-12-14 03:49:42 +00:00
Thies C. Arntzen d90daba134 use _ex-API 1999-12-14 03:48:46 +00:00
Andrei Zmievski 8ebba516a3 Boo. 1999-12-14 03:25:04 +00:00
dfe01a37a4 ChangeLog update 1999-12-14 02:08:05 +00:00
660e392458 NEWS update 1999-12-14 02:08:01 +00:00
Sascha Schumann 63e8df2320 Postpone the execution of post request startup handlers until the symbol_table is populated 1999-12-14 00:01:08 +00:00
Andrei Zmievski a15916a47a Made strspn() and strcspn() binary-safe.
# Please test if you can, especially cases with embedded chr(0).

@ Made strspn() and strcspn() binary-safe.
1999-12-13 23:40:36 +00:00
Andrei Zmievski 457a13dac5 Finished array_multisort() function. Basically it sorts multiple arrays
similar to ORDER BY SQL clause.
@ Added array_multisort() function. (Andrei)
# Docs are coming soon
1999-12-13 19:42:26 +00:00
Sascha Schumann e911ee38bd Make rand.c thread-safe. 1999-12-13 18:31:29 +00:00
Sascha Schumann 9ac3e94dcc Reapply configuration for each request 1999-12-13 16:45:54 +00:00
Sascha Schumann 08d762cb0c (php_ns_config) use 3.0's Ns_ConfigGetPath instead of Ns_ConfigPath 1999-12-13 16:23:57 +00:00
Sascha Schumann 75db7e91c6 (_ps_files_path_create) terminate string correctly and append the whole key instead of the rest key 1999-12-13 15:55:49 +00:00
00e3bb678d ChangeLog update 1999-12-13 02:08:11 +00:00
050835e955 NEWS update 1999-12-13 02:08:07 +00:00
Sascha Schumann 61a6a92618 Make filestat.c thread-safe 1999-12-12 16:48:54 +00:00
Sascha Schumann d9258da42e @- Made pageinfo.c thread-safe (Sascha) 1999-12-12 16:14:40 +00:00
Stig Bakken f30278b96b - Documented classes, methods and constants in the source
- Defined DB_ERROR_NOSUCHTABLE and DB_ERROR_NOSUCHFIELD
- Renamed DB_common::capableOf to DB_common::provides
- Cleaned up the error code mapping
- Added simpleQuery method in DB_mysql
- Changed getXxx methods in DB_common to use simpleQuery
- Fixed bug in DB_common::getAssoc
1999-12-12 15:55:56 +00:00
Sascha Schumann 1627a57d96 Remove trailing white-spaces 1999-12-12 14:22:55 +00:00
Sascha Schumann 591cdd1cfb Reformat ini entries and add new options (cache_limiter, cache_expire). 1999-12-12 14:17:22 +00:00
Sascha Schumann 996216b499 Add cache_limiter and cache_expire options. Rename extern_referer_check
to referer_check.
1999-12-12 14:16:55 +00:00
Sascha Schumann 5928624a1c Kill a warning 1999-12-12 11:02:24 +00:00
Sascha Schumann ecb6e75add Initialize variables 1999-12-12 11:02:07 +00:00
Sascha Schumann 0233d7cf82 Initialize value properly 1999-12-12 10:55:27 +00:00
Sascha Schumann db27dadf27 Call SLS_FETCH() only, if it is needed 1999-12-12 10:53:45 +00:00
Sascha Schumann 58a33274c9 Make it compile in ZTS mode 1999-12-12 10:51:44 +00:00
Sascha Schumann 9279df2025 Include header file for php_file_le_fopen() 1999-12-12 10:51:13 +00:00
Sascha Schumann 9278d9d911 Remove unnecessary ARRAYLS_FETCH() calls 1999-12-12 10:50:30 +00:00
Sascha Schumann 4762285e40 Disable global lock for now. We will have to find a way to test subsystems
for thread-safety, and lock them appropiately, if they aren't thread-safe.
1999-12-12 10:49:03 +00:00
Stig Bakken 5d00c366e7 "setup" is obsolete 1999-12-12 08:38:10 +00:00
696ab2b0e6 ChangeLog update 1999-12-12 02:08:09 +00:00
a42bf72ec0 NEWS update 1999-12-12 02:08:06 +00:00
Andrei Zmievski dbaf6c5c65 Added array globals in preparation for multisort() changes. 1999-12-11 22:42:01 +00:00
Andrei Zmievski 0c779c51c9 (PHP php_implode) Made binary-safe.
@ Made implode() binary-safe (Andrei)
1999-12-11 20:00:40 +00:00
Andrei Zmievski 33d82cb6d1 get_meta_tags() was using php_stristr() so it needed to be changed.
Optimized it to use php_memnstr() directly.
1999-12-11 19:51:04 +00:00
Andrei Zmievski 17ff0f3af3 Made strstr(), stristr(), and ucwords() binary-safe(). Also corrected
stristr() behavior to match that of strstr() if needle is not a string.
@ Made strstr(), stristr(), and ucwords() binary-safe() (Andrei)
1999-12-11 19:50:01 +00:00
Sascha Schumann 7365698268 Moving APXS-specific checks into respective config.m4. The placement of
`%APXS -q..` caused error messages, if APXS was not used.
1999-12-11 17:48:41 +00:00
Andreas Karajannis 4bd855e69f Don't include functions not supported by Solid 1999-12-11 10:56:42 +00:00
e8c6e01dc5 ChangeLog update 1999-12-11 02:08:09 +00:00
Andrei Zmievski 2b2e6ff6cb Fixed #2952. 1999-12-10 14:27:19 +00:00
Stig Bakken 4b6a03236b Added makerpm by Samuel Liddicott <sam@campbellsci.co.uk> 1999-12-10 13:00:13 +00:00
Sascha Schumann 969c727b1e Output information about HTTP headers 1999-12-10 13:00:09 +00:00
Sascha Schumann e08b2e7b0f Export sapi_free_header() 1999-12-10 12:38:20 +00:00
Stig Bakken 415d53e751 remove uninteresting NEWS entries 1999-12-10 08:13:15 +00:00
Andrei Zmievski d18ff45c4c A few more fixes for php_strtolower(). 1999-12-10 04:44:32 +00:00
a14d2ce1b2 ChangeLog update 1999-12-10 02:08:33 +00:00
a70d0097c9 NEWS update 1999-12-10 02:08:28 +00:00
Andrei Zmievski 7e4bd9fb60 (PHP strtoupper, strtolower, substr_replace) Made binary-safe.
@Made strtoupper(), strtolower(), substr_replace() binary-safe. (Andrei)
1999-12-09 23:45:30 +00:00
Sascha Schumann 2a794e8205 (php_set_session_var): logic fix:
gpc_globals set? Add it to the global symbol table
track_vars set? Add it to the HTTP_STATE_VARS array
1999-12-09 18:57:57 +00:00
Zeev Suraski 7bbe67d25a @- Fix a crash in the Apache syntax highlighting mode (Zeev) 1999-12-09 17:13:20 +00:00
Thies C. Arntzen 06489b6ebe just went thru string.c and wrote down the functions that are obviously NOT binary-safe 1999-12-09 14:44:54 +00:00
Thies C. Arntzen 0489895d0b (unserialize) closed mem-leak 1999-12-09 11:24:51 +00:00
Thies C. Arntzen 99b5652f40 small cleanups in MINIT code
OCIInitialize is now called at the "right" spot again
1999-12-09 11:02:41 +00:00
Nick Gorham 25096ac9e9 Report all ODBC error's not just the top of the stack 1999-12-09 09:59:17 +00:00
Uwe Steinmann ec7088e1df - improved configuration due to compile problems which suddently show up 1999-12-09 07:15:36 +00:00
f8df1e98d9 ChangeLog update 1999-12-09 02:08:13 +00:00
580dd72a24 NEWS update 1999-12-09 02:08:10 +00:00
Zeev Suraski e19e57d2f7 - Use Set-Cookie for consistency with SetCookie() (and possibly for adherence with
with some clients?)
- Remove unnecessary directive from configuration-parser.y
1999-12-08 22:22:20 +00:00
Sascha Schumann 01c7fc6c8f Use global ctor in non-ZTS mode as well 1999-12-08 19:07:58 +00:00
Thies C. Arntzen 276c0a378d (unserialize) now cleans up better on failure! 1999-12-08 14:40:46 +00:00
Thies C. Arntzen f7089e600f make non-ZTS happy again 1999-12-08 14:18:28 +00:00
Thies C. Arntzen 40340b5aa0 @- OCI8 now returns NULL values in LONG columns correct. (Thies) 1999-12-08 14:04:55 +00:00
Stig Bakken 208696f489 Added some more error defines (CANNOT_CREATE/DELETE/DROP).
Folded up the methods in DB.php.
Started adding documentation for DB_result methods.
Added doOne() doRow() and doAssoc() methods in DB_common.
Added numCols() to DB_mysql.
1999-12-08 13:49:09 +00:00
Thies C. Arntzen 19023f3a05 ZTS compile fixes 1999-12-08 11:48:10 +00:00
Thies C. Arntzen 5fad6deb65 this is the "right" ZTS-fix 1999-12-08 11:47:50 +00:00
9e2cd01ac5 ChangeLog update 1999-12-08 02:08:15 +00:00
dac598790b NEWS update 1999-12-08 02:08:12 +00:00
Andrei Zmievski c2eae47a23 Oops. 1999-12-07 21:41:34 +00:00
Andrei Zmievski 44f6f66bd2 (DB::parseDSN) check for an extra / at the end purely to guard against
user error
1999-12-07 21:38:51 +00:00
Andrei Zmievski 9c89f731e8 (DB::parseDSN) Remove extraneous / at the end of the spec if no database
is specified.
1999-12-07 21:30:38 +00:00
Sam Ruby b9f27a4743 Fill in empty constructor in order to appease Sascha ;-)
More seriously, uninitialized values cause MSHUTDOWN to trap.
Only an issue because assert was added to internal_functions.
1999-12-07 21:07:42 +00:00
Sam Ruby 8abf724678 Provide basis for shared libraries/dlls to contain internal extensions 1999-12-07 20:49:01 +00:00
Andrei Zmievski 6068b5bdac Apparently already implemented by Thies. 1999-12-07 19:18:04 +00:00
Andrei Zmievski be197551c7 Revert the patch. 1999-12-07 18:18:17 +00:00
Rasmus Lerdorf 7284ec7ab4 Add check for broken apxs script 1999-12-07 16:52:13 +00:00
Thies C. Arntzen 7b7192dda3 added assert.quiet_eval plus a bit of cleaning (docs to follow!) 1999-12-07 16:45:46 +00:00
Sam Ruby 8fdd352404 fixed just enough to enable assert to build on win32 and Linux/ZTS 1999-12-07 16:28:27 +00:00
Andrei Zmievski 4f52bab52f Need to check for __inet_aton on Solaris. 1999-12-07 16:26:42 +00:00
Andi Gutmans e36be38140 - opened_path should not be freed here as the zend_file_dtor() takes care
of it. This doesn't fix the bug report for the crash of highlight_file()
  though.
1999-12-07 16:00:39 +00:00
Sascha Schumann 7ac99e5aa3 Move it to the right place 1999-12-07 15:22:49 +00:00
Thies C. Arntzen f02f67e83c fixed NPR 1999-12-07 13:33:37 +00:00
Thies C. Arntzen ccb7e4fa03 the order *does* matter! 1999-12-07 13:11:19 +00:00
Thies C. Arntzen 2f7693963d @- Added support for a C-like assert() function. (Thies) 1999-12-07 13:08:17 +00:00
Thies C. Arntzen 19ce7e05db getting there 1999-12-07 12:33:36 +00:00
Sascha Schumann c89b7e195c Ignore generated files 1999-12-07 12:17:53 +00:00
Thies C. Arntzen a807dd31e9 new assert() module. (Not yet finished!) 1999-12-07 11:37:30 +00:00
Uwe Steinmann 512c641794 - Several small corrections, typos, ... 1999-12-07 10:49:19 +00:00
Thies C. Arntzen 5cdb16ad09 (explode) fixed newly introduced bug (them shall check twice *before* committing!) 1999-12-07 08:14:00 +00:00
Zeev Suraski 3d160b5b7c Support ZTS definition in zend_config.h 1999-12-07 06:19:42 +00:00
ee1b5bdcec Email change. 1999-12-07 03:20:29 +00:00
Evan Klinger 1fe899d8cd Mention CyberCash. 1999-12-07 02:49:03 +00:00
Sam Ruby e3cbafdda6 -kludges -warning +reentrancy(more) +compiles(Unix) 1999-12-07 02:47:35 +00:00
Evan Klinger 091c58f734 More clean up. 1999-12-07 02:26:51 +00:00
2b843e37a0 ChangeLog update 1999-12-07 02:08:16 +00:00
32f91f5e6b NEWS update 1999-12-07 02:08:13 +00:00
Evan Klinger 76207d5de8 Now it compiles - couldn't find lib before. 1999-12-07 02:02:05 +00:00
Evan Klinger 998a9ed0ff Eliminate some warnings. 1999-12-07 01:41:25 +00:00
Evan Klinger 540f780735 Minor changes and clean up. 1999-12-07 01:17:25 +00:00
Evan Klinger 0d993a8c42 @- Added CyberCash support. (Evan)
CyberCash support.
1999-12-07 00:56:25 +00:00
Zeev Suraski ef596bbafb Move the #include of zend-parser.h out of zend_compile.h 1999-12-06 20:42:44 +00:00
Zeev Suraski 40eb2bb5b0 First step in making parsedate.y thread safe - use a pure parser 1999-12-06 19:04:01 +00:00
Zeev Suraski 291066c459 More localization 1999-12-06 19:03:57 +00:00
Thies C. Arntzen beb9723617 fixed warning 1999-12-06 19:01:21 +00:00
Thies C. Arntzen 1095f8a502 @- explode() is now binary-safe. (Thies)
we save one buffer-copy as well (hehe)
1999-12-06 18:29:22 +00:00
Thies C. Arntzen db3cf21e55 @- strpos() is now binary-safe. (Thies) 1999-12-06 17:37:59 +00:00
Andrei Zmievski a9a5f24029 Add another item. 1999-12-06 16:41:55 +00:00
Zeev Suraski 02d76f8b86 This is no longer needed. Note that we'll always need to undefine YYSTYPE, since
the template bison generated .h file defines it if it's not already defined.
1999-12-06 15:34:05 +00:00
Sascha Schumann b47cb50ccd Separate libpaths into PHP_LDFLAGS, so that we can address them
separately (required for Apache build).
1999-12-06 15:32:01 +00:00
Zeev Suraski 00c3ac908b Localize a couple of macros 1999-12-06 15:31:06 +00:00
Zeev Suraski 5df43c134f opened_path could end up uninitialized - fixed 1999-12-06 15:30:44 +00:00
Thies C. Arntzen 5201f90588 removed unneded CLS_FETCH() 1999-12-06 13:08:16 +00:00
Sam Ruby 7ae5d271b6 build error: wrong num parms to date_parse 1999-12-06 05:28:26 +00:00
Sam Ruby 0d7c37b0bf first pass at method overloading 1999-12-06 05:00:40 +00:00
Sam Ruby eee0bdadc4 Hmmm...must have misplaced the getcwd/chdir logic... 1999-12-06 04:58:55 +00:00
Evan Klinger 94bf353b51 *** empty log message *** 1999-12-06 02:24:01 +00:00
983ea2696e ChangeLog update 1999-12-06 02:08:20 +00:00
5aeba52b34 NEWS update 1999-12-06 02:08:14 +00:00
Sascha Schumann e793b11363 Give it a nicer looking module name 1999-12-05 23:38:25 +00:00
Zeev Suraski 624117e5e4 *** empty log message *** 1999-12-05 23:32:21 +00:00
Sascha Schumann d24a718b57 php3_* => php_* 1999-12-05 23:12:00 +00:00
Sascha Schumann 6d4c75202c Create helper library during configure time 1999-12-05 23:11:38 +00:00
Sascha Schumann 420b11a0fd Allow AC_ADD_LIBRARY to append library 1999-12-05 23:10:51 +00:00
Sascha Schumann f2a090c6f1 Add rpaths to LDFLAGS during configure, drop them later. 1999-12-05 22:41:08 +00:00
Evan Klinger 2e7c800e06 Revert changes. 1999-12-05 22:19:13 +00:00
Evan Klinger 9d975ee69e @- Fix Informix compile (Evan)
Fix --with-informix. Was adding wrong library.
1999-12-05 22:14:01 +00:00
Sascha Schumann 4a445c1bb7 Fix leak in pthreads, and add initial support for GNU Pth 1999-12-05 21:55:43 +00:00
Egon Schmid 6f41683925 Thies, can you provide some docs? I need something to show to my German translators.
Is the &obj correct?
1999-12-05 16:59:15 +00:00
Thies C. Arntzen f17f3e4fa1 @- added XML_Set_Object() function, now you can use the XML-Parser from
@  within an object. (Thies)
(XML_Set_Object) new function.
1999-12-05 16:43:42 +00:00
Sascha Schumann d9a86285f6 Fix some warnings 1999-12-05 16:43:32 +00:00
Sascha Schumann 4a60eed469 Fix some warnings 1999-12-05 16:25:32 +00:00
Sascha Schumann 9417570dc1 Prepend added libraries and separate LDFLAGS handling 1999-12-05 16:24:20 +00:00
Sascha Schumann 70df2d7478 Fix some warnings 1999-12-05 16:23:45 +00:00
Sascha Schumann e5d956dbac Add ts_allocate_dtor, use ts_allocate_[cd]tor where appropiate. 1999-12-05 16:21:37 +00:00
Rasmus Lerdorf 45f9527518 More maintainer-mode cleanups 1999-12-05 14:37:38 +00:00
Rasmus Lerdorf dfd0f8824c More maintainer-mode cleanups 1999-12-05 14:16:37 +00:00
Rasmus Lerdorf ca362445c4 Fix a maintainer-mode warning 1999-12-05 13:41:42 +00:00
Stig Bakken ae1b7bf4b8 @Fix warnings compiling in maintainer mode. (Stig)
Fix warnings compiling in maintainer mode.
Install DB/common.php and DB/mysql.php on "make install".
# We still have a warning from http_config.h:97.  Rasmus? :-)
1999-12-05 10:29:06 +00:00
2aaece2db6 ChangeLog update 1999-12-05 02:08:16 +00:00
289543b5f9 NEWS update 1999-12-05 02:08:13 +00:00
Zeev Suraski 8bd56f2b7e Win32 .dsp update 1999-12-04 23:53:08 +00:00
Zeev Suraski f362208033 That one is actually supposed to have 'php3' on it - it's the PHP 3.0 compatibility defines for 4.0 1999-12-04 23:03:01 +00:00
Stig Bakken 0dd9658485 #if -> #ifdef change for HAVE_LIBDL (to be consistent with the same symbol
in libzend).
1999-12-04 20:55:33 +00:00
Sascha Schumann 68aa4997e3 Create ``libs'' subdirectory as the current user and add /usr/ucblib
always to the libpath, if it exists (#2752).
1999-12-04 19:56:08 +00:00
Sam Ruby 0d96b8da6b Build error 1999-12-04 19:48:08 +00:00
Andrei Zmievski 0d885602f4 Cast val to (char *) to avoid compile warning.
Forgot ; at the end and need to derefence the ent pointer.
1999-12-04 19:46:12 +00:00
Sascha Schumann 5b983c944f Clean up php3.*\.h files. The files itself are renamed, and references in all
.*\.[ch] files were changed. There is a slight chance that my script missed
a few changes, please correct them manually.
1999-12-04 19:19:57 +00:00
Andrei Zmievski 83ce7c13d1 *** empty log message *** 1999-12-04 18:57:44 +00:00
Andrei Zmievski 43047fdca6 (php_set_session_var) Initialize the refcount here. 1999-12-04 18:56:17 +00:00
Sascha Schumann 7532393c1a ZTS fixes 1999-12-04 18:40:06 +00:00
Sascha Schumann 4993f93c7c Remove custom LDFLAGS/LIBS changes 1999-12-04 18:30:53 +00:00
Sascha Schumann 7fc583f7ff Don't overwrite EXTRA_LIBS, some ext config.m4s access it directly 1999-12-04 18:20:55 +00:00
Sascha Schumann 8713ce5d38 Remove code references to serverapi 1999-12-04 18:06:15 +00:00
Sascha Schumann d1820e47af Use LIBS instead of EXTRA_LIBS, so that inter-library dependences can
be tested for using standard autoconf macros.
1999-12-04 18:03:00 +00:00
Thies C. Arntzen b1eb7855cd some more ideas 1999-12-04 17:30:39 +00:00
Andrei Zmievski 7347ca9a08 (PHP session_register) Correct calling convention. 1999-12-04 17:05:45 +00:00
Andrei Zmievski 20190c966d Session variables now obey track_vars and gpc_globals settings.
If track_vars is on then decoded variables appear in $HTTP_STATE_VARS
array. If gpc_globals is on, then session vars are decoded into global
variables. If both are on, then globals and $HTTP_STATE_VARS contents
are references to each other.

The /decoder functions now just need to call php_set_session_var()
this behavior.

@ -Session vars are now decoded into $HTTP_STATE_VARS[] array and the
@ globals, depending on track_vars and gpc_globals settings (Andrei)

# Encoding source is currently only globals. We may want to change this
# in the future.
1999-12-04 17:02:04 +00:00
Andrei Zmievski f962a35df7 Added zend_set_hash_symbol() function. 1999-12-04 16:50:18 +00:00
Thies C. Arntzen 0a276c2ff3 backed out last change after andi decided on a different approach. 1999-12-04 16:08:43 +00:00
Andi Gutmans 4c8259b538 - Call ZEND_SET_SYMBOL_WITH_LENGTH() with refcount 1 from the standard
ZEND_SET_SYMBOL()
1999-12-04 14:56:44 +00:00
Stig Bakken 8f91051dda Fix shared mode for gd/xml/mysql extensions. 1999-12-04 14:45:38 +00:00
Zeev Suraski efc84af940 - Implement get_used_files() and get_imported_files() 1999-12-04 14:26:26 +00:00
Zeev Suraski ad30b198d4 - Added get_used_files() function - returns a hash mapping the use()'d files
to their full path (Zeev)
1999-12-04 14:24:36 +00:00
Zeev Suraski 9baad80459 - Break the zend->PHP dependency introduced by the .php extension for use(),
by providing an API
- Enable Stig's patch for use() extensions (it wasn't refered to by the parser)
- Fix a memory leak in that code
1999-12-04 13:26:57 +00:00
Zeev Suraski da5464b145 - zend_file_handles must now flag whether their .filename property should be
free by Zend or not (uses e*() functions)
1999-12-04 13:25:41 +00:00
Thies C. Arntzen 502bb337fe the new SET_VAR_* macros forgot to set the refcount! 1999-12-04 13:18:08 +00:00
Sascha Schumann b978a64ebb Check for htonl in libsocket (sol251), and move inet_aton check in libbind to configure.in, so that our later AC_CHECK_FUNCS(inet_aton) will find inet_aton in libbind (if it is there). 1999-12-04 13:16:04 +00:00
Sam Ruby 6fb3b8c66f build error - windows 1999-12-04 13:13:45 +00:00
Thies C. Arntzen f6e8a597a9 fixed tiny leak 1999-12-04 12:06:32 +00:00
Stig S. Bakken aaadc71d5d Fix typo, add prototype for use_filename(). 1999-12-04 11:45:14 +00:00
Stig S. Bakken 3570e8891d "use" should use arg+".php" as parameter to require 1999-12-04 11:43:07 +00:00
Zeev Suraski cad92c80cc This should fix the fd leak with include()/require() 1999-12-04 10:59:30 +00:00
2b3f80b776 ChangeLog update 1999-12-04 02:08:21 +00:00
34e71e378c NEWS update 1999-12-04 02:08:18 +00:00
Sascha Schumann 689265145a Fix for #2909 1999-12-03 22:08:32 +00:00
Sam Ruby 70b97864f8 windows build errors 1999-12-03 20:08:24 +00:00
Sascha Schumann 7c43bda4fb inet_aton is in libresolv on Solaris 2.5.1 1999-12-03 18:53:41 +00:00
David Hedbor b40afedd7e Added credit notes for Roxen SAPI module 1999-12-03 17:10:18 +00:00
Andrei Zmievski 99df46fa62 Include errno.h.
# Please try compiling before committing
1999-12-03 17:05:23 +00:00
Andrei Zmievski e345066140 *** empty log message *** 1999-12-03 17:03:35 +00:00
Andrei Zmievski fec413c557 Added ZEND_SET_GLOBAL_VAR_WITH_LENGTH_EX() macro. 1999-12-03 16:59:04 +00:00
Sascha Schumann 2e024a0005 Improve locking when O_EXCL is available 1999-12-03 16:19:38 +00:00
Rasmus Lerdorf c7b4d3cbf1 # I hate these * empty log message * notes that get added to the changelog
# telling us that nothing was added to the changelog.  The very fact that
# this empty log message is added to the changelog makes the message
# invalid.
1999-12-03 15:52:22 +00:00
Sascha Schumann 1a77231633 PHP_BUILD_* m4 macros are not intended to be used by extensions.
If you want to tell the user that the current choice of a specific SAPI
module is bad, check $php_build_target.
1999-12-03 15:28:51 +00:00
Sascha Schumann 39a99dd695 2<<30 (== 1<<31) overflows 32-bit signed int, reverting to 1<<30 1999-12-03 15:16:32 +00:00
Sascha Schumann f19426e412 Solaris needs -D_REENTRANT to define prototypes for localtime_r etc. 1999-12-03 15:12:20 +00:00
Sascha Schumann 7c209d774c Use socklen_t where appropiate 1999-12-03 14:57:29 +00:00
Sascha Schumann ebaeb919da Add check for socklen_t (we cannot use AC_CHECK_TYPE, because socklen_t
is defined in sys/socket.h).
1999-12-03 14:50:32 +00:00
Thies C. Arntzen 0d7e971355 revert my last patch - WARNING: we leak fd's again.
add initialzation of opened_path highlight_file()
1999-12-03 14:07:00 +00:00
Stig Bakken 6728e8e8d5 forgot the "@" 1999-12-03 13:35:10 +00:00
Stig Bakken a8f71d621f Add configure command to phpinfo() output (Stig) 1999-12-03 13:31:41 +00:00
Sascha Schumann 992eb497bf Add configure stuff
(note that --with-xxx should be only used, if it references something
 external.)
1999-12-03 13:24:30 +00:00
Sascha Schumann 401580a716 Add posix module 1999-12-03 13:13:48 +00:00
Sascha Schumann 639c491da4 Add X-Powered-By header in all configurations to ease PHP usage metering 1999-12-03 12:21:57 +00:00
Sascha Schumann 964bf9f288 (php_ns_sapi_header_handler): use sapi_free_header() 1999-12-03 11:46:04 +00:00
Andi Gutmans c34560b53d - Remove _EX and make it the old _LENGTH 1999-12-03 07:54:17 +00:00
Rasmus Lerdorf a050e023df # Here you go Andrei 1999-12-03 06:01:30 +00:00
Rasmus Lerdorf 162adb778e @ PHP 4 scripts will now obey the max_execution_time setting and actually
@ time out (Rasmus)
# Note that Apache clears all signal handler including SIGPROF before
# calling the content handler, so even though we set our itimer before
# this in the PHP_INI stuff, Apache kicks sand in our face and we need
# to set the timer again just before we start parsing
1999-12-03 05:03:16 +00:00
Sam Ruby 1e13f0fd20 Support DATE_to_pval and DISPATCH_to_pval 1999-12-03 02:25:22 +00:00
0c75839820 ChangeLog update 1999-12-03 02:08:24 +00:00
7107266d7c NEWS update 1999-12-03 02:08:21 +00:00
Andi Gutmans 2f5efbdea6 - Add _EX macro for Andrei 1999-12-02 20:38:41 +00:00
Rasmus Lerdorf c92db34492 # just some symbol cleanup while I am browsing through looking for this
# timeout problem
1999-12-02 20:00:16 +00:00
Rasmus Lerdorf 67f4cfe1aa @ Add optional socket path to the mysql_?connect() functions 1999-12-02 19:09:01 +00:00
Zeev Suraski fdcaba4096 Solve a couple of compile issues 1999-12-02 18:59:29 +00:00
Thies C. Arntzen b92d70aabe php_fopen_wrapper_for_zend() does *NOT* insert the opened files into any list - the caller needs to fclose() the file. (not sure if this is desired)
fixed "Uninitialized memory read" when including URLs
1999-12-02 14:37:16 +00:00
Andrei Zmievski 6fa71d811b *** empty log message *** 1999-12-02 03:44:06 +00:00
Sascha Schumann 117d6a4151 Let user override default setting of ``make'' 1999-12-02 02:14:06 +00:00
ccd5da30be ChangeLog update 1999-12-02 02:08:24 +00:00
1b6bead88f NEWS update 1999-12-02 02:08:17 +00:00
Sascha Schumann 23a1a8246e Define COMPILE_DL_MODNAME, if module is built as dynamic module 1999-12-01 23:46:17 +00:00
Stig Bakken 7e9a1bc5e7 Back out PIC/COMPILE_DL hack from gd/mysql. 1999-12-01 23:14:54 +00:00
Stig Bakken 2467dd6d05 @Fix some warnings when compiling in maintainer-mode (Stig)
@Made mysql and gd work as shared extensions again (Stig)
- Fixed some warnings in maintainer-mode.
- Made mysql and gd work as shared extensions again by defining
  COMPILE_DL if PIC is defined.
# We need a better solution for building .so extensions than this
# PIC/COMPILE_DL hack!
1999-12-01 22:59:45 +00:00
Stig S. Bakken 93536507f6 Fix warnings surfacing in maintainer-mode. 1999-12-01 22:55:20 +00:00
Zeev Suraski 2ddc4fe4f5 Make it possible to explicitly set refcount in ZEND_SET_SYMBOL_WITH_LENGTH(), part 2 1999-12-01 22:00:58 +00:00
Zeev Suraski 158088ca1a Allow to set the reference count explicitly for ZEND_SET_SYMBOL_WITH_LENGTH() 1999-12-01 21:47:47 +00:00
Zeev Suraski 15d47e551a Test commit, ignore 1999-12-01 21:30:45 +00:00
Zeev Suraski 3467337217 @- Made the GET/POST/Cookie and their HTTP_*_VARS[] counterparts be references
@  to each other (Zeev)
1999-12-01 21:29:09 +00:00
Zeev Suraski d6fd485692 @- Make the global GET/POST/Cookie variables and their $HTTP_*_VARS[] counterparts
@  be references to each other (Zeev)
1999-12-01 20:42:56 +00:00
Stig Bakken 9bba81c296 remove some debug output 1999-12-01 19:17:48 +00:00
Sascha Schumann 3b515617a4 Make array.c thread-safe 1999-12-01 17:21:52 +00:00
Sascha Schumann fce775e8a3 Remove fsock-specific members 1999-12-01 17:07:54 +00:00
Sascha Schumann 94c36e8846 Make fsock module thread-safe 1999-12-01 17:07:25 +00:00
Andi Gutmans 14382523bf - Forgot to check for BP_VAR_IS in the fix made for Thies' string offset
problem.
1999-12-01 14:55:58 +00:00
Sam Ruby 4f6a88aa9f use new PHP_BUILD_THREAD_SAFE macro 1999-12-01 14:26:01 +00:00
Sam Ruby 933c3121c5 libzend/zend_compile.h's #define YYSTYPE causes parsedate to barf on Windows 1999-12-01 14:24:45 +00:00
Thies C. Arntzen 126756d728 just a remark 1999-12-01 07:34:06 +00:00
d1056090dc ChangeLog update 1999-12-01 02:08:23 +00:00
9ee28d537f NEWS update 1999-12-01 02:08:18 +00:00
Rasmus Lerdorf ff9b75314f # Fix broken files 1999-12-01 01:26:02 +00:00
Sascha Schumann 00f8f24d74 Avoid Apache's regex.h, if system regex was chosen 1999-11-30 23:19:33 +00:00
Rasmus Lerdorf b9e59b296d # another oops 1999-11-30 22:54:16 +00:00
Rasmus Lerdorf 51572c2dcd # Oops 1999-11-30 22:24:11 +00:00
Rasmus Lerdorf 3bbe1e6a55 Kill some warnings 1999-11-30 22:18:40 +00:00
Sascha Schumann adf12b60d3 Add '--enable-low-memory' option. 1999-11-30 21:22:02 +00:00
Sascha Schumann cfc7e27a7f Add PHPAPI for Windows. 1999-11-30 20:46:07 +00:00
Andi Gutmans 3a17630121 - Applied Thies' bug fix. Great work! 1999-11-30 20:37:52 +00:00
Andi Gutmans 2337d110f9 - Added opened_path to php_fopen_wrapper() and the URL fopen wrapper (it's not
always properly set, it's a TODO for all of us).  This enables us to implement
  true 'use' support.
@- Added support for the 'use' keyword - behaves like 'require', but will not
@  use the same file more than once (Andi & Zeev, Zend library)
1999-11-30 20:18:11 +00:00
Andi Gutmans 5463dd5b38 - Add use support (behaves like require, but will not use the same file twice)
- Add import support (behaves like include, but requires parentheses;  will not
  use the same file twice; Currently, it is not yet properly implemented, and
  only behaves like include)
1999-11-30 20:15:04 +00:00
Andi Gutmans 08304a3c93 - Fix problem Thies reported. We by mistake separated variables which were
being fetched for read only.
1999-11-30 17:10:11 +00:00
Nick Gorham 2df67b7c9e Added check in the ODBC module that a connection is still valid before
reuse in a persistent connection.
1999-11-30 12:41:36 +00:00
Thies C. Arntzen bc38c052e9 the Zeus-Guys were nice enoug to give us a call similar to DllMain()! 1999-11-30 06:49:00 +00:00
Shane Caraveo 1e6c79bc15 need to prevent multiple usage 1999-11-30 03:54:51 +00:00
2086e31aa8 ChangeLog update 1999-11-30 02:08:31 +00:00
558c3272f5 NEWS update 1999-11-30 02:08:26 +00:00
Sander Steffann fc56fc8ae0 Show some extra info for GD with phpinfo() 1999-11-29 23:21:52 +00:00
Sascha Schumann 5c0f205383 Clean up code 1999-11-29 23:07:20 +00:00
Thies C. Arntzen d1f21493e1 ISAPI wants to run in ZTS 1999-11-29 21:32:11 +00:00
Sander Steffann f0eebb3e58 Oops, forgot to check for GIF support. Fixed. 1999-11-29 21:26:52 +00:00
Danny Heijl 1bb69dcf2d Typo 1999-11-29 20:04:02 +00:00
Andrei Zmievski 8f39384d91 Modified to use preg_* functions. 1999-11-29 18:10:05 +00:00
Sam Ruby e3b5b98813 add .cvsignore 1999-11-29 15:49:26 +00:00
Sam Ruby fd9265362c Initial alpha-level of sapi/servlet. See README for details. 1999-11-29 15:36:25 +00:00
Stig Bakken a76c133df1 more PECL -> PEAR renaming 1999-11-29 15:18:01 +00:00
Stig Bakken 4ba143907b - DB classes now inherit DB_common
- Added DB_ERROR_NODBSELECTED
- Added DB::connect($dsn[, $persistent] which creates a DB object and connects
  $dsn is a "data source name" in a format specific to DB:
    phptype(dbsyntax)://username:password@protocol+hostspec/database
  Don't worry, such a dsn can be as short as "mysql"
- Added mysql support
1999-11-29 15:13:55 +00:00
Andrei Zmievski e4191245cd *** empty log message *** 1999-11-29 14:43:31 +00:00
Andrei Zmievski 85d8128be8 Name update. 1999-11-29 14:42:57 +00:00
Sam Ruby 0383909477 Use thread-safe versions of localtime and gmtime on Win32 too 1999-11-29 14:04:16 +00:00
Stig Bakken 6c6c0a630c Remove some more redundant checks. buildconf is not but a simple wrapper
for build.mk & co.
1999-11-29 10:22:34 +00:00
Sascha Schumann 80cb563d0a Revert last patch (leak in libzend is fixed now) 1999-11-29 07:28:12 +00:00
33394b1d57 ChangeLog update 1999-11-29 02:08:25 +00:00
3c6fb15d55 NEWS update 1999-11-29 02:08:21 +00:00
Stig Bakken bd8b285a9e @Added DBMaker support (patch by Pax Tsai <paxtsai@lion.syscom.com.tw>)
Added DBMaker support (patch by Pax Tsai <paxtsai@lion.syscom.com.tw>)
1999-11-29 00:45:28 +00:00
Stig Bakken d9eb533c80 @Renamed "PECL" to "PEAR" (PHP Extension and Add-on Repository).
Renamed "PECL" to "PEAR" (PHP Extension and Add-on Repository).
New name courtesy of Peter Bowen <pzb@ARISTOTLE.ORG>.
1999-11-28 23:01:57 +00:00
Stig Bakken 263c6856dd @buildconf now uses build.mk
Removed redundancy in buildconf/build.mk, buildconf now runs "make -f build.mk"
1999-11-28 22:51:50 +00:00
Andi Gutmans 0ab2c37540 - Add OLS_C so that we can call php_output_init_globals() with it. 1999-11-28 20:38:44 +00:00
Sascha Schumann efddcd8313 Prevent mod_ssl's ap_hook.h from being included. 1999-11-28 17:09:59 +00:00
Rasmus Lerdorf 7cefad61ed # check link() as well 1999-11-28 16:35:26 +00:00
Rasmus Lerdorf 6132f85c8d (symlink) Disable symlinks to urls
@- Disable symlinks to urls
1999-11-28 16:23:30 +00:00
Sascha Schumann d3c941fc5f Add buildmk.stamp 1999-11-28 13:47:17 +00:00
Sascha Schumann 6803c62507 Add version checks from buildconf 1999-11-28 13:45:17 +00:00
Danny Heijl 97a44d2643 (ext/informix/ifx.ec) Reflect ESQL/C version used (Danny)
@- Informix driver now reflects version of ESQL/C used  (Danny)
1999-11-28 12:08:21 +00:00
236cd42699 ChangeLog update 1999-11-28 02:08:24 +00:00
Sascha Schumann bad23a1286 Remove INCLUDES line from Makefile.am skeleton 1999-11-28 00:55:39 +00:00
Sascha Schumann 6216edda44 Make basic/string functions thread-safe 1999-11-28 00:31:02 +00:00
Sascha Schumann 883e219bef ZTS fix 1999-11-28 00:13:46 +00:00
Sascha Schumann 77963c8d2b Improved build (now sets also runtime library search paths, works
out-of-the-box with Apache)
1999-11-27 22:04:26 +00:00
Andrei Zmievski 93bd6bc9de *** empty log message *** 1999-11-27 21:26:18 +00:00
Andrei Zmievski 82fb207f44 Don't cry, CVS. 1999-11-27 21:19:14 +00:00
Andrei Zmievski 10be07ab19 (PHP session_register) Modified to accept variable number of arguments,
any of which can be either string holding the variable name or an array
consisting of such variable names or other arrays.
1999-11-27 21:18:41 +00:00
Sascha Schumann 8573448db2 one tmbuf is enough 1999-11-27 21:18:01 +00:00
Zeev Suraski d7f3b5a182 - Win32 thread unsafe build updates 1999-11-27 21:08:49 +00:00
Andrew Skalski ecc77c81cc typecast void pointer to char* for pointer arithmetic 1999-11-27 20:58:33 +00:00
Jouni Ahto 3e8303abf0 Use thread-safe versions of localtime and gmtime 1999-11-27 20:51:17 +00:00
Zeev Suraski 33bdf19051 Update Win32 build 1999-11-27 17:11:20 +00:00
Sascha Schumann b6e6dddc30 Only compile the scanner, if trans_sid is enabled 1999-11-27 16:15:35 +00:00
Sascha Schumann 64a9858874 Test for PHP_THREAD_SAFETY 1999-11-27 12:04:14 +00:00
Sascha Schumann c73e2731c7 PERL_PATH is used nowhere 1999-11-27 11:58:16 +00:00
Sascha Schumann e4812c0fa3 Add --enable-experimental-zts 1999-11-27 11:33:13 +00:00
8812857f35 ChangeLog update 1999-11-27 02:08:29 +00:00
Zeev Suraski 85210ed9bf Get Win32 to compile again 1999-11-27 00:48:50 +00:00
Zeev Suraski 4481898ff7 Add ability to disable the memory cache 1999-11-27 00:04:36 +00:00
Zeev Suraski 6cdebd85a2 *** empty log message *** 1999-11-26 23:56:15 +00:00
Zeev Suraski 74f6202aa6 - Fix fd leak in ZTS mode 1999-11-26 23:54:05 +00:00
Zeev Suraski 6be3723f3d UNIX/non ZTS compile fixes 1999-11-26 23:48:04 +00:00
Zeev Suraski 58153dfed0 - Improve the file handle closing code 1999-11-26 23:45:22 +00:00
Zeev Suraski cd53944435 - Modify zend_llist_del() to receive a comparison function 1999-11-26 23:44:41 +00:00
Sascha Schumann 1a851b5d03 Kill undefined reference 1999-11-26 22:37:45 +00:00
Sascha Schumann 56a9e10b73 Enable _POSIX_THREAD_SEMANTICS for all configurations testwise 1999-11-26 21:45:57 +00:00
Sascha Schumann 9f386181f5 Undefine HAVE_PUTENV, if ZTS is used 1999-11-26 21:20:40 +00:00
Sascha Schumann 2ec047e1ec Kill one race. 1999-11-26 21:04:40 +00:00
Zeev Suraski 71b1219ee3 This request_shutdown() is no longer needed (never was needed really) 1999-11-26 20:19:28 +00:00
Sascha Schumann 3d092da662 unposixfy calls to TSRM 1999-11-26 19:27:08 +00:00
Sascha Schumann 1f9a496601 Define macros only, if one of the locking _r functions is used 1999-11-26 19:09:57 +00:00
Sascha Schumann 6d97609a31 Avoid fd leak which appears when using ZEND_HANDLE_FILENAME 1999-11-26 19:01:26 +00:00
Zeev Suraski b53bc48847 This should get the file to close properly 1999-11-26 18:37:06 +00:00
Sascha Schumann f0187ef3c9 Use php_init_output_globals() also in non-ZTS mode 1999-11-26 18:34:27 +00:00
Sascha Schumann ac8736c8ee Rebuild libzend.la, if the scanner was rebuilt 1999-11-26 17:53:56 +00:00
Sascha Schumann ec18b99d86 Fix typo (shutdown -> startup) 1999-11-26 17:37:22 +00:00
Sascha Schumann 524f0b1b0a - move strtok_r into reentrancy.c
- add rand_r()
1999-11-26 17:33:53 +00:00
Sascha Schumann a64691615a Add/update copyright headers 1999-11-26 17:12:01 +00:00
Sascha Schumann e56e63a6e4 Back out last commit. 1999-11-26 17:08:23 +00:00
Sascha Schumann 35b30a8d0c Add reentrant versions of ctime, localtime, gmtime, asctime.
These cannot be implemented platform-independent, so we fall back to the native
non-reentrant versions, but lock during each access (only if ZTS is used).

To initialize/destroy the used data structures, you need to call
reentrancy_startup() before sapi_startup(), and reentrancy_shutdown() after
sapi_shutdown().
1999-11-26 17:07:41 +00:00
Sascha Schumann 2f6ded9ac9 Convert more source files to use thread-safe functions 1999-11-26 16:51:57 +00:00
Sascha Schumann fe48f6ed6a Use thread-safe versions of asctime and localtime 1999-11-26 16:32:02 +00:00
Sascha Schumann 1c6173619e Use thread-safe versions of localtime and gmtime 1999-11-26 16:29:00 +00:00
Sascha Schumann 2f10b7ede8 Close a resource leak. 1999-11-26 15:33:42 +00:00
Zeev Suraski 957b079232 Undo previous bogus commit 1999-11-26 14:57:50 +00:00
Zeev Suraski 061cfea2ac *** empty log message *** 1999-11-26 13:56:33 +00:00
Zeev Suraski 94b5119898 Remove request_started, increase thread safety 1999-11-26 13:53:18 +00:00
Sascha Schumann 8696442671 (PHP_RINIT(session)) Never return FAILURE on trivial issues from a request
startup handler
1999-11-26 13:43:55 +00:00
Sascha Schumann 38819040b6 Replace strtok with strtok_r 1999-11-26 13:34:31 +00:00
Sascha Schumann 9fc9502ecc Add strtok_r replacement function from FreeBSD-current. 1999-11-26 13:34:02 +00:00
Sascha Schumann 5d34e43f8d Include php_config.h in both files, otherwise HAVE_STRLCAT/HAVE_STRLCPY
will never be defined, even on systems which have these functions.
1999-11-26 13:33:41 +00:00
327e8f7e06 ChangeLog update 1999-11-26 02:08:34 +00:00
Zeev Suraski f617a46305 That's a more thorough fix... 1999-11-25 16:21:01 +00:00
Zeev Suraski f62a08c2ae Fix bug #2817 - assignments to string offsets could erronously modify unrelated strings 1999-11-25 16:11:34 +00:00
Zeev Suraski 442f8b3c3c *** empty log message *** 1999-11-25 15:24:49 +00:00
Uwe Steinmann 7e3563c1c2 - changed encoding parameter of cpdf_set_font to string on advice from
fastio to better support asian fonts.
1999-11-25 07:00:27 +00:00
Uwe Steinmann 5d3ae9c2b2 - made domxml compile 1999-11-25 06:56:40 +00:00
David Hedbor cad85534c6 Now the new direct write is enabled too... 1999-11-25 02:15:59 +00:00
419f2a2511 ChangeLog update 1999-11-25 02:08:34 +00:00
David Hedbor 5f5bd0954b Implemented direct writing to the client's FD if RXML parsing of the result isn't selected. 1999-11-25 02:05:35 +00:00
David Hedbor 353686c9c5 Now ZTS can be used. Unless --enable-roxen-zts is specified at the
configure line the default process global Roxen PHP lock will be
used. In tests this was a lot faster for some reason and until the
reasons are figured out, it's recommended to use the non-thead-safe
version.
Cvs: ----------------------------------------------------------------------
1999-11-25 00:28:19 +00:00
Egon Schmid 4b8b9705e4 I'm dreaming that someone else can format this when he/she is looking at it. 1999-11-24 22:04:49 +00:00
Sander Steffann 0f7444c4a8 Some patched versions of GD support both GIF and PNG. The GD module now
checks for both instead of assuming that PNG support means that there is no
GIF support anymore.
1999-11-24 21:43:54 +00:00
Sander Steffann 9ed5ad0c58 Removed an empty -L from LDFLAGS which caused errors in configure when
running it with --with-gd (without path). Because of this configure detected
every GD as GD-1.2.
1999-11-24 18:50:10 +00:00
Sascha Schumann d462115341 Killing some unused variable warnings 1999-11-24 17:56:31 +00:00
Sascha Schumann 3b2a88d4d4 some cosmetical changes 1999-11-24 17:36:23 +00:00
Egon Schmid 2671eaa33b Descriptions should be different for different function names. 1999-11-24 12:10:15 +00:00
Thies C. Arntzen 3d4bef49b2 fix typo 1999-11-24 09:49:30 +00:00
David Hedbor 9284f73f4f Removed some forgotten C++ style comments 1999-11-24 07:28:17 +00:00
David Hedbor df5308e502 Now actually correctly checks for Pike paths etc. 1999-11-24 07:17:17 +00:00
Uwe Steinmann ad9b5927dc - new xml parser with dom support 1999-11-24 06:21:48 +00:00
Evan Klinger 18fb96efb4 Freeing the memory would be a good idea... 1999-11-24 06:16:37 +00:00
Evan Klinger 19f88f097c Mention new select(), fd_set() and fd_isset() functions 1999-11-24 05:53:12 +00:00
Andrei Zmievski 98d6afb90b Cleaning up remnants of ChangeLog manipulations. 1999-11-24 05:15:24 +00:00
Evan Klinger 633d18de0f Can't forget fd_isset() 1999-11-24 03:47:58 +00:00
Sascha Schumann a4c75707fb - add PHP_BUILD_THREAD_SAFE
- move #undef HAVE_AOLSERVER into its own config.h.stub
1999-11-24 03:27:53 +00:00
Evan Klinger 769e25e168 First attempt at fd_set() and select()
# Please test thoroughly
1999-11-24 03:05:10 +00:00
David Hedbor b86acfd3a2 - Added a couple of static for functions that don't need to be public.
- Removed some unused code.
- Started writing better comments.
1999-11-24 02:36:39 +00:00
David Hedbor 6262280ad4 Don't create a new thread for each php-script - use the handler thread. 1999-11-24 02:34:50 +00:00
bb557d26fe ChangeLog update 1999-11-24 02:08:39 +00:00
a69fb4b5e9 NEWS update 1999-11-24 02:08:35 +00:00
David Hedbor 1973990286 Moved HAVE_ROXEN to sapi/roxen/config.h.stub 1999-11-24 00:25:14 +00:00
David Hedbor dcd9bd9aa8 Added .cvsignore 1999-11-24 00:24:49 +00:00
David Hedbor 30476d6d21 Added the wrong file. 1999-11-24 00:02:13 +00:00
David Hedbor ec873323d2 Added HAVE_ROXEN for the Roxen sapi module 1999-11-23 23:08:34 +00:00
David Hedbor 8fb4122333 First version of Pike/Roxen module for embedding PHP. 1999-11-23 23:08:10 +00:00
Andrei Zmievski 96e1d4a4b1 *** empty log message *** 1999-11-23 22:46:41 +00:00
Andrei Zmievski cbf3bc3267 Re-arranging a bit. 1999-11-23 22:35:23 +00:00
59d34af972 Fixing results of an infelicity in ChangeLog generation. 1999-11-23 22:29:19 +00:00
Zeev Suraski db0fcc6d11 Use the unified notation... 1999-11-23 22:10:44 +00:00
Zeev Suraski e9742f5458 Cosmetic changes 1999-11-23 21:08:51 +00:00
Sascha Schumann 368e1960ea add some points 1999-11-23 20:53:20 +00:00
Andrei Zmievski 9781bf59cb (main) In this special case, free path_translated. Fix for #2795. 1999-11-23 20:25:55 +00:00
Sascha Schumann 6a25e05d95 Only create regex/Makefile, if we use the bundled regex library 1999-11-23 19:54:51 +00:00
Sascha Schumann 2681a6b169 (main) Remove redundant statement, this is part of the initialization
function.
1999-11-23 15:39:09 +00:00
Thies C. Arntzen 92aaf17ba2 *** empty log message *** 1999-11-23 13:02:55 +00:00
Sascha Schumann 1d593a89da Don't bail out, if PECL cannot be installed. PHP is often only an
intermediate step of the installation, so it is often not performed
by root.
1999-11-23 12:41:02 +00:00
Thies C. Arntzen b48b0734ca Getting Zeus-Support in place - i can already see phpinfo()! 1999-11-23 11:22:45 +00:00
Uwe Steinmann 503e97a66d - inform everybody about cpdf support 1999-11-23 10:05:32 +00:00
Uwe Steinmann 39a389d855 - extended test script for cpdf by GD image insertion 1999-11-23 09:04:31 +00:00
Evan Klinger 42f8f2516d Convert to Ex API
# If someone could please check these I'd appreciate it
1999-11-23 06:46:40 +00:00
Sam Ruby 5385610450 errors during startup trap server 1999-11-23 03:10:46 +00:00
Andrei Zmievski 43d857f5e5 Formatting. 1999-11-23 03:08:46 +00:00
Andrei Zmievski d580b7da3e Add .cvsignore. 1999-11-23 03:08:10 +00:00
ef7e7ebfc8 ChangeLog update 1999-11-23 02:08:41 +00:00
4733395538 NEWS update 1999-11-23 02:08:37 +00:00
Zeev Suraski b264733bc1 Fix compile problem with enable-memory-limit 1999-11-22 22:27:04 +00:00
Zeev Suraski 9820dd0927 Fixed a leak when using automatic output buffering
@ Fixed a leak when using automatic output buffering (Zeev)
1999-11-22 20:58:56 +00:00
Andrei Zmievski 103b5cb285 Don't forget the pickle. 1999-11-22 20:47:37 +00:00
Andrei Zmievski 4da3f0cc9a Reformatting. 1999-11-22 19:45:42 +00:00
Frank M. Kromann b5c521c3f8 add MS SQL module seams to be working 1999-11-22 19:11:42 +00:00
Frank M. Kromann 8aed1627c0 add MS SQL module to credit info 1999-11-22 19:10:14 +00:00
Frank M. Kromann 62ed6e2c06 Project changed to allow compilation for MS SQL 6.5 or 7.0 1999-11-22 19:01:00 +00:00
Zeev Suraski 3b9673ca58 Fix inconsistencies with here-docs implementation 1999-11-22 17:11:36 +00:00
Zeev Suraski 1a34aa8d73 *** empty log message *** 1999-11-22 17:10:42 +00:00
Zeev Suraski 86a0efcff5 Fix #2744 1999-11-22 16:30:23 +00:00
Uwe Steinmann e8b05d1137 - test for hyperwave module 1999-11-22 16:09:07 +00:00
Uwe Steinmann 7966dbc01c - test for cpdf module 1999-11-22 16:08:27 +00:00
Uwe Steinmann 62f7420001 - port of clibpdf module based on ClibPDF 2.x.
This module is not tested yet, it just compiles.
  I don't expect any real problem since the api hasn't changed.
  ClibPDF 1.x isn't support anymore.
1999-11-22 15:28:26 +00:00
Stig Bakken 541087d17a @Introduced PECL - PHP Extension and Code Library (prounounced "picke")
Introduced PECL - PHP Extension and Code Library (prounounced "picke"), in
the "pecl" subdir.  "make install" will now install the database abstraction
layer in PREFIX/lib/php.
I hereby dedicate this part of PHP to my daughter-of-yesterday Malin. :-)
1999-11-22 11:00:53 +00:00
Evan Klinger be6dde2639 Optimize a tiny bit 1999-11-22 02:38:00 +00:00
Evan Klinger 7bda9c0a2e Optimize LDAP a little with Ex API 1999-11-22 02:31:32 +00:00
78dd178857 ChangeLog update 1999-11-22 02:08:40 +00:00
fb50f7da29 NEWS update 1999-11-22 02:08:37 +00:00
Sascha Schumann fc95f04b10 (php_ns_hash_environment) Ns_ConnHost() may return NULL, check for it 1999-11-22 01:30:28 +00:00
Sascha Schumann 63a3e9ac45 (PHP getallheaders) added function for AOLserver
(php_ns_hash_environment) added REMOTE_PORT, SERVER_PORT, SERVER_NAME,
PATH_TRANSLATED, GATEWAY_INTERFACE variables
1999-11-22 00:42:06 +00:00
Sascha Schumann 11030ee410 (PHP urldecode) Fix for #2788, function changed parameter in place 1999-11-21 20:08:43 +00:00
Andi Gutmans f3ca328b34 That slipped away 1999-11-21 18:19:08 +00:00
Zeev Suraski 6358c6631b - Optimize class instanciation
- Fix constant instanciation for array elements inside objects
1999-11-21 18:11:10 +00:00
Thies C. Arntzen 5cc10ecec2 @- Fixed float-compare in min(),max(),a[r]sort(),[r]sort(). (Thies)
convert_to_long() after compare_function() destroys float-compares!
1999-11-21 17:13:39 +00:00
Egon Schmid 0929985414 Maybe later on today. Must buy some beer first. 1999-11-21 14:06:30 +00:00
Thies C. Arntzen f24db304ee @- Implemented get_html_translation_table() function. (Thies)
(PHP get_html_translation_table) new function.
1999-11-21 13:25:04 +00:00
Thies C. Arntzen 2451ff5368 @- Implemented array_flip() function. Returns input-array with key, value
@  flipped. (Thies)
(PHP array_flip) new function. no clash detection, only works for IS_STRING and IS_LONG datatypes in src-array.
1999-11-21 12:37:53 +00:00
Thies C. Arntzen ee1380e6b0 -renamed some macros
-return_value_used now used in a few more functions
1999-11-21 12:13:44 +00:00
Thies C. Arntzen 9788129e0e (PHP strtr) little smarter 1999-11-21 12:05:39 +00:00
Stefan Roehrich afcd361117 Java module now works with Linux jdk 1.2pre2. 1999-11-21 10:45:01 +00:00
Rasmus Lerdorf 1831279f0c # Fix ColorResolve bogosity
Fix gd problems
1999-11-21 04:07:56 +00:00
64eac40e77 ChangeLog update 1999-11-21 02:08:45 +00:00
450bd9c164 NEWS update 1999-11-21 02:08:42 +00:00
Sascha Schumann 9a047652cc add Berkeley DB3 support
@- Added Berkeley DB3 support in DBA (Sascha)
1999-11-20 22:50:42 +00:00
Andrei Zmievski 90ecf41b19 (PHP substr_replace) Changed the order of the arguments. 1999-11-20 22:09:27 +00:00
Sascha Schumann 51c83e9f4b --enable-versioning can now be used with CGI/AOLserver as well. Note that
we do not use versioning per se anymore, but export only the required
symbols.
1999-11-20 19:00:17 +00:00
Andi Gutmans e4e8c3539f - Changed path to MySQL library in Win32 project 1999-11-20 16:56:41 +00:00
Thies C. Arntzen 2013026c14 @- Implemented 2-Arg version of strtr($str,$translation_array). This can be used
@  to revert what htmlspecialchars() did. (Thies)
(PHP strtr) new 2-Arg version.
1999-11-20 15:53:18 +00:00
Thies C. Arntzen 111c24b5b1 *** empty log message *** 1999-11-20 10:11:36 +00:00
Andi Gutmans 9e26d8a3c9 - Fixed a typo in the name of the project file. It links now 1999-11-20 09:17:30 +00:00
22aeaedc0e ChangeLog update 1999-11-20 02:08:40 +00:00
f4767f385a NEWS update 1999-11-20 02:08:37 +00:00
Andi Gutmans b89689f2ef - More PGSQL thread-safe updates. It still doesn't work though. Crashes for
some reason at .dll load time
1999-11-20 01:14:36 +00:00
Andi Gutmans 0c65c8a23c - Should pretty much work now 1999-11-20 01:04:45 +00:00
Andi Gutmans 770ef718c5 - Add project file 1999-11-20 00:45:44 +00:00
Andi Gutmans cc3d636f66 - Start PostgreSQL support for Win32. Just added preliminary ZTS support.
Still need to make minit ZTS.
1999-11-20 00:30:08 +00:00
Andrei Zmievski 3ae0f5fdc4 (PHP preg_replace) Fixed a bug that cause backreferences to lose
their value after the first occurrence.
1999-11-19 22:59:12 +00:00
Andrei Zmievski 71a8c018cb Fixed a bug that would replace only the first occurrence and result in
a parse error for the rest when using /e modifier.
1999-11-19 22:28:06 +00:00
Thies C. Arntzen 3e59135a5c <sys/time.h> is needed on linux 1999-11-19 18:33:21 +00:00
Andi Gutmans 1f11e07fc6 - Moved var_uninit() for return_value to the beginning of DO_FCALL.
We forgot to do it for overloaded methods
1999-11-19 17:04:54 +00:00
Andi Gutmans 817a11e7ed - Functions whose return values aren't used have them freed in DO_FCALL
and don't need a special ZEND_FREE opcode following them anymore
1999-11-19 16:55:25 +00:00
Andi Gutmans 0094b765eb - Make it consistent with the rest of the stuff there. 1999-11-19 16:42:19 +00:00
Andi Gutmans 3bffcbef5b - Add array.c to the Win32 project 1999-11-19 15:06:57 +00:00
Thies C. Arntzen b712c9360d @- Fixed mem-overwrite in XML_Parse_Into_Struct. (Thies)
(PHP xml_parse_into_struct) buffer was sometimes short by 1.
1999-11-19 14:11:15 +00:00
Zeev Suraski 1f41ddfe7f Optimize a bit 1999-11-19 13:06:12 +00:00
Zeev Suraski 049b74b88f Fix a bug in sybase_fetch_hash() 1999-11-19 13:00:57 +00:00
8e34f69c09 ChangeLog update 1999-11-19 02:08:42 +00:00
Andrew Skalski 0cb70ef9bb Removed stdio wrapper from sockets; added timeouts to socket ops. 1999-11-18 20:29:32 +00:00
Sascha Schumann 111cedbbea Moving apMakefile.{libdir,tmpl} to sapi/apache directory. 1999-11-18 14:21:50 +00:00
Sam Ruby 560c0c4308 arg! alphabetize correctly! 1999-11-18 03:03:24 +00:00
Sam Ruby fd41750d87 add Java module to credit info 1999-11-18 02:40:52 +00:00
cee88d3852 ChangeLog update 1999-11-18 02:09:04 +00:00
Sascha Schumann 4bb5e353d5 Add post request startup handlers. These are called at the end of the
request startup function, and can use the initialized structures like
the symbol table.
1999-11-17 23:01:27 +00:00
Sascha Schumann abe0176840 (php_rinit_session): use post request startups to reenable session.auto_start 1999-11-17 22:59:27 +00:00
Sascha Schumann b416e57770 Remove --enable-thread-safety. There is no reason people should be able
to set this manually; most likely, they will burn themselves by using it.
1999-11-17 21:06:32 +00:00
Andi Gutmans 52045afb08 - If a function's return value is unused then don't create a ZEND_FREE
opcode but free it after the function call in zend_execute.
1999-11-17 17:21:15 +00:00
Stig Bakken 3150bd63e9 Bump version to 4.0b4-dev. 1999-11-17 13:25:44 +00:00
Thies C. Arntzen 927260bf57 b3 is already tagged in CVS 1999-11-17 09:38:21 +00:00
Andi Gutmans 800e00727a - Forgot this 1999-11-17 04:38:38 +00:00
51d018d292 ChangeLog update 1999-11-17 02:08:50 +00:00
407a1fbe66 NEWS update 1999-11-17 02:08:46 +00:00
Andrei Zmievski e46198bf7b (PHP substr_replace) New function.
@- Added substr_replace() function. (Andrei)
1999-11-16 22:44:13 +00:00
Andi Gutmans 3cd140cdef - Weird that this compiled for me. 1999-11-16 20:31:29 +00:00
Andrei Zmievski 61142e4341 Just some rearranging. 1999-11-16 20:14:55 +00:00
Andi Gutmans 247d3d3345 - CHange used_return_value -> return_value_used 1999-11-16 19:12:46 +00:00
Andi Gutmans 9e14736315 - Change used_return_value to return_value_used 1999-11-16 19:12:29 +00:00
Andi Gutmans 7239aad9c4 - Initial support for Thies' idea of passing functions a flag telling them
they don't need to return a value. Adjusted reset() to work with this.
  It is a bit problematic because if internal functions don't look at the
  flag and still return a value orginally this leaked. So I free the value
  in any case, which kind of makes the speed gain a bit smaller
1999-11-16 18:47:47 +00:00
Andi Gutmans b7b614d0b5 - In any case create the free opcode. Need to allow the functions to
create a hint.
1999-11-16 18:46:32 +00:00
Andi Gutmans dbb67ab9dc - Add support for used_return_value passed to internal functions. 1999-11-16 18:30:06 +00:00
Stig Bakken 87d6372a14 final news update before 4.0b3 1999-11-16 15:58:38 +00:00
Stig Bakken bb6dacfb69 final changelog update before 4.0b3 1999-11-16 15:52:32 +00:00
Stig Bakken 65557ffe88 4.0b3 coming up 1999-11-16 15:37:31 +00:00
dca71900c1 ChangeLog update 1999-11-16 02:08:50 +00:00
Andrei Zmievski c1e3f5cb17 cleaning up 1999-11-15 14:35:08 +00:00
6c51d44141 ChangeLog update 1999-11-15 02:08:54 +00:00
30cfeece94 NEWS update 1999-11-15 02:08:51 +00:00
Sascha Schumann 897127d44a (php_minit_mcrypt): Also allow never versions of mcrypt 1999-11-15 00:27:47 +00:00
Sascha Schumann d019ed533f (php_minit_mhash): Don't use REGISTER_LONG_CONSTANT macro, because we
don't have a fixed size array of chars (this used to work nevertheless).
1999-11-15 00:26:35 +00:00
Sascha Schumann b85f2cba43 (PHP mhash): don't segfault, if mhash_end() returns NULL 1999-11-14 23:11:31 +00:00
Sascha Schumann 13582b4fe2 Check for db1/ndbm.h and use it in db. Fixes #2647 1999-11-14 23:03:45 +00:00
Andi Gutmans 25c56d15cd - Fixing warnings in regex 1999-11-14 20:13:54 +00:00
Thies C. Arntzen 2b08dfec28 (PHP k[r]sort) now use compare_function from libzend to be consistent with the language-core. 1999-11-14 19:59:52 +00:00
Andi Gutmans f3bcc012c6 - Remove ISAPI project from main dir as it's been copied to sapi/isapi 1999-11-14 19:46:31 +00:00
Thies C. Arntzen 6755a85a38 clearify 1999-11-14 19:44:29 +00:00
Thies C. Arntzen 4127b34a0a @- ucfirst()/ucwords() no longer modify arg1. (Thies)
(PHP ucfirst,ucwords) no longer modify arg1
1999-11-14 17:20:56 +00:00
Thies C. Arntzen f2b0c70512 @- Fixed strtr() not to modify arg1. (Thies)
(PHP strtr) no longer modifies arg1.
1999-11-14 15:34:50 +00:00
Danny Heijl 2327b6b954 (ext/informix) Added WIN32 build files for informix driver
and make it compile with ZTS
@ -Added Win32 build files for Informix driver
@  and make it compile with ZTS (danny)
1999-11-14 12:55:36 +00:00
Stig Bakken 5f8f410e51 @Added tmpfile() function (Stig)
Removed the mkstemp stuff and added tmpfile() function instead.
1999-11-14 11:05:37 +00:00
Andi Gutmans 4ebf7b85ad - Fix comment as to Joey's findings 1999-11-14 10:30:39 +00:00
db59169015 ChangeLog update 1999-11-14 02:08:53 +00:00
Andrei Zmievski c898d87aad These are inserted automatically now. 1999-11-13 20:47:33 +00:00
Andrei Zmievski 62eeb9278c It's in array.c now. 1999-11-13 20:32:49 +00:00
Andrei Zmievski 438addf331 Split array functions into separate module. 1999-11-13 20:31:54 +00:00
Sascha Schumann afc9e1257b Suck in prototypes correctly with applied aliases
(otherwise php_reg* would not be prototyped)
1999-11-13 18:33:28 +00:00
Andi Gutmans d35ea24fc0 - Fix crash with string offset assignments. 1999-11-13 18:11:34 +00:00
Andi Gutmans 3c1b362235 - Make Win32 compile again 1999-11-13 18:03:07 +00:00
Sascha Schumann 677bf03f07 Allow --with-apxs and --with-regex=apache 1999-11-13 17:29:43 +00:00
Sascha Schumann bcb2214e99 Improve regex library selection. It lets user specify whether they want
system, apache, or php's regex library by using the --with-regex option.
"php" is the default; if you use --with-apache in combination with
Apache 1.3.x, the default is "apache".
1999-11-13 16:51:33 +00:00
Sascha Schumann c166a6fb83 Remove libtool targets 1999-11-13 16:04:56 +00:00
Sascha Schumann 117ebf3ca6 - remove extra CPPFLAGS from top-level Makefile
- HSREGEX defaults to what the user wants, but can be changed now internally
1999-11-13 13:27:49 +00:00
Sascha Schumann 942c0b3521 Export CPPFLAGS to propagate additional flags 1999-11-13 12:55:47 +00:00
Sascha Schumann 194d75c3a8 Fix typo (escape sign was one off) 1999-11-13 12:51:25 +00:00
Sascha Schumann c810659379 preparing 4.0b3-RC5 1999-11-13 12:48:57 +00:00
Sascha Schumann 3dc7757a99 Remove the extra INCLUDES line from most automake Mafiles. This is not
necessary, because we can change the value of INCLUDES globally in one
place (configure.in).

Also add two defines in thread-safe mode
(_REENTRANT and POSIX_PTHREAD_SEMANTICS)
1999-11-13 12:41:09 +00:00
Sascha Schumann 7dd7f38003 (AC_EXPAND_PATH) Expand relative paths completely 1999-11-13 12:38:23 +00:00
e82ad7e9c3 ChangeLog update 1999-11-13 02:08:56 +00:00
64070d9474 NEWS update 1999-11-13 02:08:53 +00:00
Sascha Schumann ceae3847b8 Enable selective regex library compilation. 1999-11-12 20:56:30 +00:00
Sascha Schumann 6f57224890 upgrade regex library to alpha3.8
@- Upgraded regex library to alpha3.8 (Sascha)
1999-11-12 20:27:52 +00:00
Thies C. Arntzen e20e9786b3 added missing function-alias 1999-11-12 17:05:57 +00:00
Thies C. Arntzen d64e09a322 oops, didn't mean to activate this! 1999-11-12 14:34:50 +00:00
Thies C. Arntzen e61fea3029 @- Fixed selecting nested-tables in OCI8. (Thies)
fixed mested-tables again (broke it when resourcified the driver)
1999-11-12 14:31:01 +00:00
d8d8b30972 ChangeLog update 1999-11-12 02:08:57 +00:00
ea3d47b804 NEWS update 1999-11-12 02:08:54 +00:00
Rasmus Lerdorf 4a22643375 # Add some ext's here 1999-11-11 21:45:59 +00:00
Thies C. Arntzen 639354357f @- RFC-854 fix for internal FTP-Code. Commands have to end in "\r\n" (Thies)
(PHP fopen) commands send to a FTP-server need to end in "\r\n" (RFC 854)
1999-11-11 13:49:42 +00:00
78e6e79a65 ChangeLog update 1999-11-11 02:08:57 +00:00
Frank M. Kromann 3581f0d037 Fixing the use of mssql.textsize in pconnect() 1999-11-10 19:58:07 +00:00
Rasmus Lerdorf 7a4e1a9b0f # Improve the GD lib detection when GD is on the ld_path and it is
# configure using just --with-gd
1999-11-10 19:22:35 +00:00
Rasmus Lerdorf 2de9baf655 This arg is optional 1999-11-10 18:57:19 +00:00
Stig Bakken 6e4114daf0 "import" libtool file preservation code from build.mk 1999-11-10 15:26:39 +00:00
Stig Bakken 044789447c Shut up warning from automake. 1999-11-10 13:12:30 +00:00
Rasmus Lerdorf 392659fabe # Fix comments 1999-11-10 05:50:20 +00:00
Andrei Zmievski f3fb441979 Remove duplicates. 1999-11-10 05:04:56 +00:00
3f1a9fd706 ChangeLog update 1999-11-10 02:08:58 +00:00
ab5c4e2230 NEWS update 1999-11-10 02:08:55 +00:00
Sam Ruby 2cc9f1d377 add Java and MSDev outputs 1999-11-10 00:48:53 +00:00
Frank M. Kromann cc5304a9d9 Adding default mssql ini-setings 1999-11-09 20:58:43 +00:00
Stig Bakken 45c254d89c #if -> #ifdef changes for the ODBC extension (for consistency) 1999-11-09 19:53:38 +00:00
Thies C. Arntzen f6f74737d3 IRIX ld likes this order better 1999-11-09 19:48:56 +00:00
Sascha Schumann 5bb017f6d4 Move only, if the file exists. 1999-11-09 18:18:16 +00:00
Sascha Schumann 16ea76a880 automake overwrites libtool's files, if
- --add-missing was used
- *_LTLIBRARIES targets are used

Thus, we preserve our customized files while automake runs
1999-11-09 18:06:58 +00:00
Sascha Schumann e07220a006 Add libtool helper files 1999-11-09 18:04:17 +00:00
Sam Ruby 5a7943c9ed add mergesort into build 1999-11-09 17:37:35 +00:00
Stig Bakken a5317327c7 - substitute JAVA_LFLAGS (not set, but used in libphp_java_la_LIBADD)
- add .cvsignore file
1999-11-09 17:32:05 +00:00
Stig Bakken ef941dd700 4.0b3-RC4 1999-11-09 17:03:46 +00:00
Stig Bakken 2204607b10 Preserve the CVS versions of ltconfig/ltmain.sh during makedist.
#This is a temporary fix!
1999-11-09 16:57:26 +00:00
Rasmus Lerdorf 5c28619f51 Better lib detection for ucd-snmp 1999-11-09 16:01:31 +00:00
Sam Ruby 751e5d15f9 location of output.c moved. 1999-11-09 16:01:30 +00:00
Rasmus Lerdorf 20c9a79432 Find ucd-snmp include files more intelligently 1999-11-09 15:55:37 +00:00
Stig Bakken fd056d0c01 Clean up ODBC HAVE_XXX symbols, compile fixes for OpenLink and Solid.
#The Solid support still does not link, though (looks like a side-effect of
#the way the Solid libs are named and our stubborn friend libtool).
#This can wait until after 4.0b3.
1999-11-09 14:28:59 +00:00
Sascha Schumann a4ff16dd68 - set default path for cookie to the root directory ("/")
- complete session documentation in php.ini-dist
1999-11-09 14:27:56 +00:00
Sam Ruby eb231bb180 add java 1999-11-09 14:21:18 +00:00
Sascha Schumann 0c2e3e4e7d Include proper header files (replacement functions were not used). 1999-11-09 13:57:11 +00:00
Stig Bakken a14d96ef72 Fix OpenLink ODBC support
@Fix OpenLink ODBC support (Stig)
1999-11-09 13:31:16 +00:00
Stig Bakken 9e1cfb4f6e Bump version to 4.0b3-RC3.
# We release RC2 just minutes before Sam Ruby commits his Java extension.
# What timing!
1999-11-09 12:20:34 +00:00
Sam Ruby d17a12319f @ Added Zend OO syntax overloading support for Java components
#
# My lawyer made me do this:
#
Users of PHP are hereby granted a non-exclusive, irrevocable, world-wide,
royalty-free, non-transferable license to use, execute, prepare derivative
works of, and distribute (internally and externally, and including derivative
works) the code accompanying this license as part of, and integrated into PHP.
WARRANTY OF ANY KIND EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTY OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
AND ANY WARRANTY OF NON-INFRINGEMENT.  THE ENTIRE RISK ARISING OUT OF THE USE
OR PERFORMANCE OF THIS CODE REMAINS WITH USERS OF PHP.  The owner of this code
represents and warrants that it is legally entitled to grant the above license.
1999-11-09 12:02:22 +00:00
Stig Bakken 60766eff5a Makedist can now be run from outside the CVS tree. 1999-11-09 11:56:27 +00:00
Stig Bakken fdc6d630db @Fix min/max behaviour (Thies)
#Andrei: I left the convert_to_long() in there, it doesn't really make
#much of a difference.
1999-11-09 07:59:50 +00:00
86418fde5b ChangeLog update 1999-11-09 02:09:01 +00:00
e95fe291d4 NEWS update 1999-11-09 02:08:58 +00:00
Jakub Skopal ce8e31be71 "sybase" is definitelly six characters long :-) 1999-11-08 20:57:59 +00:00
Stig Bakken ecf83739f4 Cleaned up makedist a bit more.
# Also changed 4.0B3-RC2 to 4.0b3-RC2.  I don't see why we should start
# using capital letters in 4.0.
1999-11-08 16:17:53 +00:00
Stig Bakken 9542dbaf54 ignore distribution files 1999-11-08 14:41:57 +00:00
Sascha Schumann 7bc251058a Add libtool files to CVS. Advantages:
- PHP-specific changes are easier to maintain
- it removes one dependency for users (i.e. GNU vs. FreeBSD ports)

I have not removed the libtool check in buildconf, since libzend/TSRM still
depend on a local version of libtool.
1999-11-08 11:04:14 +00:00
Sascha Schumann b87228e491 Remove prototype. The prototype was not necessary for UCD SNMP 3.5.3, and
broke the build for UCD SNMP 4.0.1.
1999-11-08 10:33:06 +00:00
Stig Bakken 63d47b7735 (PHP tempnam) now uses mkstemp() if available
@- tempnam() now uses mkstemp() if available (Stig)
1999-11-08 09:18:57 +00:00
d1ecda53b7 ChangeLog update 1999-11-08 02:09:00 +00:00
Sascha Schumann e5983e9ef5 (php_ns_request_ctor) enable HTTP Access Authentication
(php_ns_hash_environment) supply PATH_TRANSLATED to scripts
1999-11-07 13:16:14 +00:00
880d7666ab ChangeLog update 1999-11-07 02:09:04 +00:00
c2e062c843 NEWS update 1999-11-07 02:09:00 +00:00
Sascha Schumann 14a870e940 - limit find to PHP's automake Makefiles
- check whether patches were applied correctly
1999-11-06 13:05:14 +00:00
Sascha Schumann 9738fdff44 Disable auto_start until we find a way to access the necessary data fields. 1999-11-06 10:14:36 +00:00
Zeev Suraski 512f4519c6 Version update 1999-11-06 10:06:37 +00:00
Zeev Suraski 0700ad3417 - Win32 fixes
- COM module improvements from Boris Wedl
1999-11-06 10:01:55 +00:00
Thies C. Arntzen c6b05b2e6b (PHP var_dump, serialize) now use php.ini's precision size when displying/serializing doubles
@- serialize() and var_dump() now honor the precision as set in php.ini
@  for doubles. (Thies)
1999-11-06 08:16:25 +00:00
b1f13fcc35 ChangeLog update 1999-11-06 02:09:09 +00:00
abac416be7 NEWS update 1999-11-06 02:09:06 +00:00
Rasmus Lerdorf 84f8583426 We need to use mysql_field_count() instead of mysql_num_fields() if
we are using MySQL 3.22.24 or newer when we want to check a mysql struct
instead of a result struct.  The reference is here:
 http://www.mysql.com/Manual_chapter/manual_Clients.html#mysql_num_fields
1999-11-05 21:43:53 +00:00
Sam Ruby d5233c482b configuration failures trap server 1999-11-05 17:52:00 +00:00
Rasmus Lerdorf f8d111d153 # Fix group email address 1999-11-05 15:37:34 +00:00
Thies C. Arntzen ce4f149734 (php3_sybase_get_column_content) initialize buffer before call to dbconvert()
@- Fixed garbage returned at the end of certain Sybase-Columns (Thies)
@  Patch submitted by: neal@wanlink.com
1999-11-05 08:48:09 +00:00
1890a59cd6 ChangeLog update 1999-11-05 02:09:27 +00:00
Andrei Zmievski 602cb959fc (PHP multisort) More work, not yet done though. 1999-11-04 21:55:47 +00:00
Andrei Zmievski 3964c92f8b Made zend_hash_rehash() callable from outside. 1999-11-04 21:02:35 +00:00
Rasmus Lerdorf 0d5a9358f0 Try to avoid IBM/Berkeley DB2 confusion 1999-11-04 20:47:19 +00:00
Stig Bakken aa3123e87b # Updated to work with the new build system. 1999-11-04 09:52:44 +00:00
Stig Bakken f2099fccfb # First shot at 4.0b3. 1999-11-04 09:40:44 +00:00
Stig Bakken a4c8d7dddc # Workaround needed to run automake in makedist. 1999-11-04 09:34:35 +00:00
Andi Gutmans 170db8b580 - Add include path. Used relative include path assuming php4 and bindlib_w32
are in the same directory.
1999-11-04 04:48:32 +00:00
35e82edf47 ChangeLog update 1999-11-04 02:09:55 +00:00
Andrei Zmievski 2fb2c11c09 *** empty log message *** 1999-11-03 20:48:42 +00:00
Frank M. Kromann 1746a30108 Added MS SQL server module 1999-11-03 20:41:24 +00:00
Frank M. Kromann d400f52ca4 Changed directory names to match project 1999-11-03 20:37:51 +00:00
Frank M. Kromann e5ca107a3d Adding MS SQL Server module for Win32 1999-11-03 20:35:58 +00:00
Andi Gutmans a79bdcc28f #- Added support for forcing a variable number of internal function arguments
#    by reference.
#-  This is done by using BYREF_FORCE_REST as the last arg_types value.
1999-11-03 20:15:50 +00:00
Andi Gutmans 6d988ec694 - Add support for BYREF_FORCE_REST 1999-11-03 19:21:56 +00:00
Evan Klinger b1c4f8978d #I hope this is the correct way to 'fix' this.
Fix compile warning
1999-11-03 02:53:52 +00:00
af07e331ac ChangeLog update 1999-11-03 02:09:28 +00:00
1e0bc24992 NEWS update 1999-11-03 02:09:21 +00:00
Sascha Schumann 358af8b9eb Add <FORM ACTION=...> tag 1999-11-02 18:35:59 +00:00
Sascha Schumann 11287bba4d Additional check for concurrent use of --with-{apache,apxs} 1999-11-02 18:27:38 +00:00
Andrei Zmievski f31c9d7d2a Remove extraneous comment.
# Pay no attention to multisort() at the moment.
1999-11-02 14:39:12 +00:00
Evan Klinger 229a26a497 (PHP getprotoby{name,number}) New Functions
@- Implemented getprotoby{name,number} (Evan)
1999-11-02 03:47:09 +00:00
3ab5606732 ChangeLog update 1999-11-02 02:09:28 +00:00
81c24791e1 NEWS update 1999-11-02 02:09:23 +00:00
Andrei Zmievski 1fe76945f7 *** empty log message *** 1999-11-01 20:58:50 +00:00
Andrei Zmievski 92f6a8b20e Added array_pad() function.
# Ignore multisort() for now.
@- Added array_pad() function. (Andrei)
1999-11-01 20:51:04 +00:00
Chuck Hagenbuch fa09e56a43 Trying to clean up the last of the body->id/body->description confusion. 1999-11-01 16:44:36 +00:00
Andrei Zmievski 1fd576485f Added new session configuration directives.
# Sascha, please document them here.
1999-11-01 16:13:41 +00:00
Sascha Schumann fb52cb2d30 Fix for #2631 1999-11-01 11:48:31 +00:00
27b22a7ee3 ChangeLog update 1999-11-01 02:09:20 +00:00
ce63a5b611 NEWS update 1999-11-01 02:09:11 +00:00
Evan Klinger f7440c020d (PHP getservby{name,port}) New functions.
@- Added new getservby{name,port} functions. (Evan)
1999-11-01 01:07:51 +00:00
Sascha Schumann 093aaaa23e Add missing initialization entry 1999-10-31 13:29:00 +00:00
Sascha Schumann 82798e99c8 Support current mcrypt. Tested with libmcrypt-2.2.4 1999-10-31 13:27:35 +00:00
Sascha Schumann 6a30ec5343 Change session.lifetime to session.cookie_lifetime. And:
@ - Added session.cookie_path and session.cookie_domain (Sascha)
1999-10-31 13:26:40 +00:00
Sam Ruby 242631c4bb @Continue processing PHP_INI_SYSTEM knownDirectives after extension=
#
# Never saw a response to PHP-DEV post of 25-OCT
#
# Given the existence of knownDirectives, I figured that option 2
# was closest to the original design intent.
1999-10-31 11:56:22 +00:00
91f068e4c5 ChangeLog update 1999-10-31 01:09:17 +00:00
Rasmus Lerdorf 5a391e843a typing in the dark 1999-10-30 14:26:42 +00:00
Rasmus Lerdorf 3bfc215091 Damn, can't see underscores correctly on this silly terminal I am on 1999-10-30 14:24:36 +00:00
Rasmus Lerdorf cf0868fec8 Clean up regex header file mess. php.h now explicitly includes php_regex.h
and php_regex.h figures out which regex header files to include and
defines symbols that prevents other stuff from including the wrong versions
of regex header files.
1999-10-30 14:22:10 +00:00
bbb1a4f8eb ChangeLog update 1999-10-30 01:09:07 +00:00
Rasmus Lerdorf 5175c71cc0 Fix typo found by hholzgra@media-engineering.de 1999-10-29 21:00:43 +00:00
Rasmus Lerdorf f160ee8782 Kill the regex header file warnings 1999-10-29 17:33:19 +00:00
Rasmus Lerdorf a3a7413be8 Looked like this was done by RedHat the way I wrote it. 1999-10-29 17:08:46 +00:00
88ca873f3a ChangeLog update 1999-10-29 01:09:23 +00:00
5d291c8ea5 NEWS update 1999-10-29 01:09:20 +00:00
Rasmus Lerdorf 990d5d72ea (IBM DB2 Support) Fix stuff to allow IBM DB2 to work with PHP 4.
Tested against DB2 6.1 UDB on Linux (RH-6.0)
@- Enable IBM DB2 support - Tested against DB2 6.1 UDB on Linux (RH-6.0)
1999-10-28 20:33:43 +00:00
Sascha Schumann 9704cd4873 Remove set-if-not-set colon, since CPPFLAGS is never set by automake. 1999-10-28 17:33:36 +00:00
Andrei Zmievski e921d0feab Fix bug #2623. 1999-10-28 16:41:17 +00:00
Andi Gutmans 83c79bb154 - Fix for Thies' leak and Andrei's crash 1999-10-28 15:53:31 +00:00
Andrei Zmievski 10fa640f5c New function. 1999-10-28 01:40:14 +00:00
8fd99b071d ChangeLog update 1999-10-28 01:09:21 +00:00
e8bccbdca9 NEWS update 1999-10-28 01:09:18 +00:00
Sam Ruby 329de3041b look for output.c in its new location in the windows build 1999-10-28 00:18:51 +00:00
Andrei Zmievski b8ecfa18c1 (PHP str_repeat) New function. 1999-10-27 22:06:05 +00:00
Thies C. Arntzen ea880d2b86 moved output.c into ext/standart and made it thread-safe.
moved output-buffering related functions from basic_functions to output.c
Win32 project need to be updated to reflect new position.
# i'm not really happy with this solution, but it seemed the easiest one!
# the whole output code is a bit hard to understand...
@- Output-Buffering system is now Thread-Safe. (Thies)
1999-10-27 18:30:41 +00:00
Thies C. Arntzen c171eecd7a @- implemented OCI8 $lob->WriteToFile() function - very useful for streaming
@  large amounts of LOB-Data without to need of a huge buffer. (Thies)
1999-10-27 17:51:22 +00:00
Andrei Zmievski 1a2f656816 Forgot to remove function entry. 1999-10-27 02:19:53 +00:00
c885fc1f53 ChangeLog update 1999-10-27 01:09:20 +00:00
Thies C. Arntzen 6b69ebf2b8 eliminated warinigs 1999-10-26 20:09:59 +00:00
Andrei Zmievski 138d5e0f79 No tabs please. 1999-10-26 19:57:27 +00:00
Andrei Zmievski 21ce8b7c64 (PHP array_map) Away with it. 1999-10-26 19:57:10 +00:00
Andrei Zmievski 377ed94b2f Some todo things. 1999-10-26 19:49:36 +00:00
ad922a272d ChangeLog update 1999-10-26 01:09:27 +00:00
Zeev Suraski 7f35cfda71 *** empty log message *** 1999-10-25 16:07:14 +00:00
Thies C. Arntzen 5d70df50ba added some more options 1999-10-25 08:23:54 +00:00
d5b0e6d820 ChangeLog update 1999-10-25 01:09:29 +00:00
Thies C. Arntzen 31b1a8fc7f kill warning 1999-10-24 18:16:16 +00:00
Thies C. Arntzen 6581d11cea folding fix (xemacs 21 loads the file again;-) 1999-10-24 18:15:42 +00:00
Sascha Schumann 387f15d895 Define USE_BCOPY, if memmove is not found (i.e. SunOS 4). Fix for #2480 1999-10-24 16:41:07 +00:00
Sam Ruby a29baa30c8 Allow CYGWIN directory to be specified as via environment variable 1999-10-24 16:32:46 +00:00
Sascha Schumann 51ea5cc70a (PHP session_register, session_unregister) always return true 1999-10-24 16:17:45 +00:00
7305cb156c ChangeLog update 1999-10-24 01:09:36 +00:00
Sam Ruby 6576719dcb Allow CYGWIN directory to be specified as via environment variable 1999-10-23 19:27:24 +00:00
Thies C. Arntzen a9dcde33e2 one can now use callbacks for custom completion functions (still work-in-progress) 1999-10-23 17:36:45 +00:00
dfbf2ea001 ChangeLog update 1999-10-23 01:09:32 +00:00
Andi Gutmans 9b83d1ca5d - Fix isset() with string offsets. 1999-10-22 22:35:16 +00:00
Sascha Schumann 23882d31c4 Add session.use_cookies option 1999-10-22 08:10:08 +00:00
Thies C. Arntzen 3e307aacc4 unserialize no longer complaints about unserializing empty-strings (started that just a few days ago) 1999-10-22 06:59:05 +00:00
280f379186 ChangeLog update 1999-10-22 01:09:30 +00:00
Sascha Schumann e9fc8bb300 Add <AREA HREF=... 1999-10-21 20:22:12 +00:00
Sascha Schumann 31f38edf35 (_ps_files_valid_key): small logic fix 1999-10-21 18:51:57 +00:00
Uwe Steinmann 01400c0c15 Added hw_mapid(), read comment in hg_comm.c 1999-10-21 15:15:27 +00:00
Sascha Schumann 4703eb404d (_ps_files_open): evaluate key (session id) before path creation 1999-10-21 12:28:36 +00:00
230556b646 ChangeLog update 1999-10-21 01:09:59 +00:00
1747a5e505 NEWS update 1999-10-21 01:09:52 +00:00
Sascha Schumann d5bde1d658 (php_ns_hash_environment): provide more CGI/1.1 variables to scripts.
Added REQUEST_METHOD, QUERY_STRING, REMOTE_ADDR
1999-10-20 19:30:37 +00:00
Andi Gutmans 8a3e0ced12 - Make COM compile again 1999-10-20 19:16:17 +00:00
Andi Gutmans 5212b2fe5b - Make CVS compile on Win32.
- Rename php3_COM.h -> php_COM.h
1999-10-20 18:09:44 +00:00
Thies C. Arntzen 33ebd52387 (PHP getcwd()) added, needs to porting to Win32
@- added getcwd() function. (Thies)
# as we do have chdir() now we have getcwd() - i think we *should* restore the
# working directory in RSHUTDOWN!
1999-10-20 16:17:30 +00:00
Sascha Schumann df6d06def4 (_display_module_info): Add anchor for module names 1999-10-20 16:16:58 +00:00
Sascha Schumann 90087382e4 (php_info_aolserver): add more information from the server context 1999-10-20 15:53:23 +00:00
Thies C. Arntzen 604c14ab00 (PHP xml_parse_into_struct) sometimes the value was truncated
@- XML_Parse_Into_Struct no longer eats data. (Thies)
1999-10-20 14:58:03 +00:00
Thies C. Arntzen 41b87a238e (PHP var_dump, serialize) fixed mem_leak. 1999-10-20 14:34:16 +00:00
Andrei Zmievski af8f84a27c Ignore shared modules directory. 1999-10-20 14:23:19 +00:00
Andrei Zmievski 1dd908b102 Ignore generated libs. 1999-10-20 14:11:59 +00:00
Thies C. Arntzen c799969a81 (PHP xml_parse_into_struct): fixed mem-leak when encountering invalid XML. 1999-10-20 14:02:32 +00:00
Sascha Schumann b31ef32c1d (php_ns_hash_environment) add SERVER_SOFTWARE, SERVER_BOOTTIME, SERVER_BUILDDATE, SERVER_PROTOCOL 1999-10-20 13:49:19 +00:00
c4d21e7632 ChangeLog update 1999-10-20 01:09:25 +00:00
1e2bf3960b NEWS update 1999-10-20 01:09:19 +00:00
Andrei Zmievski 26c019eaa1 Revert my patches to error functions. 1999-10-19 19:11:02 +00:00
Thies C. Arntzen 65b152948e added === operator support (type *and* value match) . samples:
(1 == "1") is true
(1 === "1") is false (integer != string)
(0 == false) is true
(0 === false) is false (integer != boolean)
1999-10-19 16:00:57 +00:00
Thies C. Arntzen 816627b16c fixed is_identicat_function() 1999-10-19 15:48:25 +00:00
Andrei Zmievski ee6c1ea743 (PHP extract): Fixed bug that would mess up global and referenced
variables in certain cases.
1999-10-19 14:43:48 +00:00
Andrei Zmievski f3127955ba (PHP ldap_get_entries): Fix string function name. 1999-10-19 14:42:54 +00:00
Andi Gutmans 98f025430e - Move IS_IDENTICAL next to IS_EQUAL 1999-10-19 14:19:42 +00:00
Andi Gutmans 70b41809f2 - Fix is_identical function 1999-10-19 14:11:39 +00:00
Uwe Steinmann 24d2325ecb - some tiny changes to possible improve link extraction/insertion of HTML-docs 1999-10-19 13:54:45 +00:00
Andi Gutmans 7a205f6087 - Preliminary submit of Thie's patch. Will fix the rest on Windows
as this was added on UNIX with patch. Changed IS_SAME -> IS_IDENTICAL
1999-10-19 13:33:17 +00:00
Thies C. Arntzen 578c6035c8 (parse_url) fix for #2569: parse_url('-') crashes
@- Fixed parse_url('-') crash. (Thies)
1999-10-19 11:02:05 +00:00
b69656177b ChangeLog update 1999-10-19 01:09:32 +00:00
a3f5afb1c0 NEWS update 1999-10-19 01:09:26 +00:00
Egon Schmid 4fe14a780c More forgotten prototypes. 1999-10-18 20:00:42 +00:00
Stefan Roehrich 20a7232d95 Added zlib module to list of maintained extensions. (Stefan). 1999-10-18 19:27:56 +00:00
Thies C. Arntzen 4f013f8e2d @- unserialize() now gives a notice when passed invalid data. (Thies) 1999-10-18 17:46:33 +00:00
Thies C. Arntzen cf1134787a (PHP unserialize) - fixed mem-leak. 1999-10-18 15:03:29 +00:00
Andrei Zmievski 52a30fd21b Be safe, use (). 1999-10-18 14:17:36 +00:00
670654ea87 ChangeLog update 1999-10-18 13:42:43 +00:00
1d66fd7a94 NEWS update 1999-10-18 13:42:35 +00:00
Sascha Schumann 51b1d2af6a Add PNG support. Tested with gd 1.7.3. 1999-10-17 14:57:49 +00:00
Egon Schmid 515206ec4e Looks better, but isn't wrong 1999-10-17 08:07:50 +00:00
Egon Schmid 6025dd0bda One typo corrected. 1999-10-17 07:38:35 +00:00
Andrei Zmievski d8868ab205 Fix bug #2548. 1999-10-17 00:20:17 +00:00
Andrei Zmievski 9e0017536d _php3/_php3i -> php rename 1999-10-16 16:35:20 +00:00
Andi Gutmans 133c95cf8c - It's OK if we link dynamically. 1999-10-16 11:57:52 +00:00
Andi Gutmans ad84f02efb - Get windows version to compile again. No biggy if array_map is not #if 0'd
out even if it doesn't work.
1999-10-16 10:14:47 +00:00
Andrei Zmievski e74d81f2ed *** empty log message *** 1999-10-15 22:04:59 +00:00
Andrei Zmievski 0a829ab104 (PHP array_map) Temporarily #if 0 this. 1999-10-15 21:24:15 +00:00
Andrei Zmievski db69449d9f Update mergesort() proto. 1999-10-15 21:23:37 +00:00
Andrei Zmievski c279668168 unstatic'fy is_numeric_string() 1999-10-15 20:42:26 +00:00
Andrei Zmievski e956a266e2 *** empty log message *** 1999-10-15 20:37:53 +00:00
Andrei Zmievski ce1f3a7d83 Make string copying a little more efficient. 1999-10-15 20:36:10 +00:00
Andrei Zmievski e906d4548a Small tweak in the error format. 1999-10-15 20:32:47 +00:00
Andrei Zmievski b625bbd14a (php3_log_err): Don't output error message to stderr when
running as CGI binary.
1999-10-15 20:27:38 +00:00
Andrei Zmievski 22fb5f281a Renamed a couple of functions to have proper php_ prefix. 1999-10-15 20:04:31 +00:00
Andrei Zmievski 3ee9dbea0c (php_error): finally get rid of those annoying html tags
when running as CGI binary
1999-10-15 19:55:18 +00:00
Andrei Zmievski c671332b29 Massive change of zend_error() to php_error(). 1999-10-15 19:37:44 +00:00
Andrei Zmievski 738c36932a @- Fixed shuffle() so that it no longer breaks on Solaris. (Andrei) 1999-10-15 19:25:27 +00:00
Andrei Zmievski c5149f12b6 Add mergesort.c to compilation list. 1999-10-15 19:25:04 +00:00
Andrei Zmievski 86e031d9e8 Added mergesort.c from FreeBSD. 1999-10-15 19:23:04 +00:00
Thies C. Arntzen ac997bb6c2 (is_resource, is_bool) new functions
@- Added is_resource(), is_bool() functions. (Thies)
1999-10-15 18:15:02 +00:00
Andrei Zmievski d3a39771c1 (_php_replace_in_subject)
(PHP preg_replace):
Fixed a bug that happened when regex was an array and replacement was a
single non-string value. Also changed conversions to use
convert_to_string_ex().

(PHP preg_grep): use convert_to_string_ex() for proper conversion
1999-10-15 16:57:54 +00:00
Thies C. Arntzen b5c3c7bfc9 files are now resources, file.c is thread-safe, the le_ vars are no longer shared,
but they are accessible thru "php_file_le_socket(), php_file_le_uploads()..."
i also updated the ftp, pdf and file-upload stuff to match the new requirements.
@- Cleaned up File-Module (Thies)
1999-10-15 15:22:25 +00:00
Andrei Zmievski d69d118cbd (PHP implode): Properly separate zval for another case. 1999-10-15 14:53:56 +00:00
Zeev Suraski 231fe2e1aa That should do the trick - fix implode() not to modify its arguments 1999-10-15 14:45:54 +00:00
Andrei Zmievski 62c1407a4d *** empty log message *** 1999-10-15 13:45:28 +00:00
Zeev Suraski 9295bd2577 Make ODBC work under Win32 1999-10-15 12:28:20 +00:00
Andi Gutmans 4a8cac0878 - Converted math.c to use new convert_to_number_ex() macro. 1999-10-15 06:31:40 +00:00
Andi Gutmans 4d7c162d16 - Add convert_to_number_ex() 1999-10-15 06:25:42 +00:00
Sascha Schumann e77485a8f7 Add "--disable-inline" for low-memory machines (be it limited
RAM or virtual memory). It's also useful for Digital C where
the C++ compiler thinks "inline" is an invalid specifier.
1999-10-14 22:17:22 +00:00
Sascha Schumann d58e6f2b00 Use sources from $(srcdir) 1999-10-14 17:20:25 +00:00
Thies C. Arntzen 185d90fe22 configure works for me (RH 6.1)
@- Added readline support. Works *only* in standalone mode! (Thies)
1999-10-14 16:53:51 +00:00
Thies C. Arntzen ead9008644 forgot 1999-10-14 15:20:56 +00:00
Thies C. Arntzen 1d9584c087 interface to GNU-Readline! (not yet active, autoconf needs to be done)
very neat - but only usable in standalone (command-promt) mode!
1999-10-14 15:20:40 +00:00
Sascha Schumann a4e9a5ca8f Add dba and mcrypt extensions to list. 1999-10-13 21:01:37 +00:00
Thies C. Arntzen e2d66a6d28 new api fo dl() - renamed php3_dl to php_dl (added compat header) 1999-10-13 19:55:25 +00:00
Thies C. Arntzen f5fa29184c (PHP: htmlspecialchars, htmlentities): new zend-api for html-function (not worth mentioning in NEWS) 1999-10-13 19:51:11 +00:00
Thies C. Arntzen 8bafcd3aa7 @- Upgraded math-funtions to use new Zend function API (Thies) 1999-10-13 19:43:36 +00:00
Andrei Zmievski dea3d7527a Add mhash module. 1999-10-13 18:03:38 +00:00
Sascha Schumann 2170fa6dea Do not use $< for anything but implicit rules. 1999-10-13 16:16:09 +00:00
Thies C. Arntzen e6ffafa264 (shell_exec) use pclose for FILE* that has been opened via popen!
@- Fixed zombie problem in shell_exec() and $a = `some_command`
@  constructs. (Thies)
1999-10-13 14:01:47 +00:00
Thies C. Arntzen 6e07d060fc (zend_fetch_resource) added warinig if resource is of wrong type 1999-10-13 12:59:48 +00:00
489a49d2fe ChangeLog update 1999-10-13 01:07:57 +00:00
8819b58a65 NEWS update 1999-10-13 01:07:54 +00:00
Sascha Schumann 8cc4fc6111 Disable ZEND_EXTENSIONS_SUPPORT, if RTLD_NOW is not defined.
Note that this part could be made platform independent by using
libltdl (for Solaris, Linux, *BSD, HP-UX, Win16/32, BeOS).
1999-10-13 00:17:01 +00:00
Thies C. Arntzen 0cc1641447 starting to clean-up/new API'ize and resourcify the file-stuff - nothing happened yet - just renaming things around. 1999-10-12 18:50:05 +00:00
Danny Heijl 4fe8a2c1bd (Informix driver) Thies introduced ZEND_FETCH_RESOURCE2 (Danny).
@- Thies introduced ZEND_FETCH_RESOURCE2 (Danny).
1999-10-12 17:38:19 +00:00
Thies C. Arntzen 4a39d66973 made nice 1999-10-12 15:32:40 +00:00
Thies C. Arntzen 837596dc21 add myself 1999-10-12 15:30:38 +00:00
Thies C. Arntzen a02ac0c1fc (wddx_add_vars) adjusted to new resource-API 1999-10-12 15:23:59 +00:00
Thies C. Arntzen 7dfbf440ef (php sybase_close) fixed obvious bug. 1999-10-12 15:00:10 +00:00
Thies C. Arntzen 86bb3fa0c0 new improved resource-API (i hope everything still compiles) 1999-10-12 14:53:15 +00:00
Thies C. Arntzen 6d7c18c1f5 new improved resource-API 1999-10-12 14:51:17 +00:00
Sascha Schumann fc48083437 Use DL_LAZY for OpenBSD. This seems to be a compatibility flag which
should be used for the 2nd parameter to dlopen.

http://www.openbsd.org/cgi-bin/cvsweb/src/share/man/man3/dlfcn.3?rev=1.8
1999-10-12 14:48:32 +00:00
Andrei Zmievski d6feb3c1d2 Just some formatting. 1999-10-12 13:22:30 +00:00
Andi Gutmans faa1891782 - object.ptr was made NULL in DO_FCALL but wasn't restored. Right now I
push it in DO_FCALL and at the end of do_fcall_common it always gets
  popped. We might be able to optimize it out.
1999-10-12 11:41:17 +00:00
Danny Heijl 290db7ace3 Added Informix driver to list of maintained extensions. (Danny).
@- Added Informix driver to list of maintained extensions. (Danny).
1999-10-12 06:49:34 +00:00
ff4a3a6a94 *** empty log message *** 1999-10-12 04:14:04 +00:00
79977b7fcf ChangeLog update 1999-10-12 01:08:06 +00:00
d070e7e557 NEWS update 1999-10-12 01:08:03 +00:00
Andrei Zmievski 9e773dfde2 Modified sorting functions to use updated zend_hash() prototype. 1999-10-11 21:42:42 +00:00
Andrei Zmievski 531bc520c1 *** empty log message *** 1999-10-11 21:38:18 +00:00
Andrei Zmievski 8864313c48 Modified zend_hash() to accept a pointer to sort function. 1999-10-11 21:30:23 +00:00
Andrei Zmievski 4d52ee2bc6 Added notice about LXR and Bonsai. 1999-10-11 20:45:03 +00:00
Andi Gutmans 81aa9a36b6 - No idea why this bug didn't exist before. But I'm too tired to think of it.
During a regular do_fcall we need to set object.ptr to NULL and, thus,
  push it in the beginning and pop it in the end.
  I hope this fix more or less cuts it. I just want to sleep :)
1999-10-11 20:29:55 +00:00
Andrei Zmievski cab346f50c First revision. 1999-10-11 19:36:13 +00:00
Danny Heijl e1b77165c9 *** empty log message *** 1999-10-11 16:54:41 +00:00
Danny Heijl c72b97bf5b (ext/informix) Changed ifx.ec to use the new high-performance
ZEND API now that it compiles with libtool. (Danny)
@- Informix driver : Changed ifx.ec to use the new high-performance
@  ZEND API. (Danny)
1999-10-11 15:56:01 +00:00
Danny Heijl f2939ffadd (configure) Allow IFX_LIBDIR environment variable to specify the
Informix library path to allow linking with the static
            libraries (libtool related). (Danny).
@- IXF_LIBDIR environment variable specifies alternate Informix library
   path for configure (Danny).
1999-10-11 11:53:09 +00:00
4f4e2bd506 ChangeLog update 1999-10-11 01:08:08 +00:00
Andi Gutmans 3a88d5a68e - Didn't lower refcount when doing an internal function call linked to a regular object. 1999-10-10 18:31:42 +00:00
Thies C. Arntzen 283dd53bf5 added some more autoconf/libtool stuff to be ignored 1999-10-10 18:12:41 +00:00
Sascha Schumann c42142bc03 automake scans aclocal.m4 as well 1999-10-10 18:08:31 +00:00
Thies C. Arntzen f961f0e976 (build.mk) fix suggested by sascha. 1999-10-10 17:34:13 +00:00
Thies C. Arntzen 93f294b76f (build.mk) make cvsclean now also deletes the libzend & TSRM symlinks. 1999-10-10 17:24:26 +00:00
Sascha Schumann ee06ab4069 Add stub.c for helper library. 1999-10-10 17:15:19 +00:00
Thies C. Arntzen 8a23f7e215 (build.mk) added target cvsclean: removed all files listed in all .cvsignore files found in the current tree. 1999-10-10 17:14:29 +00:00
Sascha Schumann 7573b236ea Workaround for Informix set of libraries. One library depends on
another "library" (an object file). We build a standard library
out of this object here, so that we can link it in at the right place
later.
1999-10-10 17:12:23 +00:00
Zeev Suraski 40cc9d9d7a This should fix the deadlock 1999-10-10 13:30:03 +00:00
Sascha Schumann 00bcd72637 Remove -DPIC preprocessor macros. This is defined by libtool
automatically, if a shared library is built. This would lead
to multiple definitions of get_module(). If you want to build
modules, add -DCOMPILE_DL to your CFLAGS.
1999-10-10 12:41:56 +00:00
Sascha Schumann 594f61521b Link in IFX_LIBS properly. 1999-10-10 12:10:41 +00:00
Andi Gutmans 274ce69429 - Clean up a bit. Separate before the locking so that we can use SEPARATE_ZVAL
macro.
1999-10-10 04:38:51 +00:00
Sascha Schumann ea567a73f1 Add clean target which removes standard targets 1999-10-10 02:02:13 +00:00
Sascha Schumann f2608c3fdb build.mk can be used to generate build tools. It is usually
faster than buildconf, since it rebuilds only components, if
it is necessary. To use it, run

    $ make -f build.mk
1999-10-10 01:23:15 +00:00
f331865e3b ChangeLog update 1999-10-10 01:08:21 +00:00
Sascha Schumann c2d127b3ed Clean up and add 'clean' target which removes standard targets recursively 1999-10-10 01:04:39 +00:00
Sascha Schumann aab49be24a build.mk can be used to generate build tools. It is usually
faster than buildconf, since it rebuilds only components, if
it is necessary. To use it, run

    $ make -f build.mk
1999-10-10 00:22:05 +00:00
Andi Gutmans ec04c922aa - Shouldn't be needed 1999-10-09 20:37:08 +00:00
Andi Gutmans 37159e7863 - God damn this sucked. I hopefully fixed the problems with classes although
we might need to clean stuff up a bit.
1999-10-09 20:29:36 +00:00
Sascha Schumann 1df149ec1a Define RTLD_NOW to DL_NOW, if RTLD_NOW is not defined (for OpenBSD). 1999-10-09 18:03:23 +00:00
Sascha Schumann 4c920d1da6 Remove redundant library declaration. All libtool libraries
are referenced through DEPENDENCIES now.
1999-10-09 16:50:14 +00:00
Sascha Schumann 92a10866a9 Only link with bundled regex, if the user wants it. 1999-10-09 16:45:12 +00:00
Sascha Schumann 8090041fbb POSIX_MISTAKE is enabled by default. 1999-10-09 16:44:39 +00:00
Thies C. Arntzen a19f5933d5 fix suggested by sascha for xml-build in apxs mode 1999-10-09 13:43:27 +00:00
afdb73e62f ChangeLog update 1999-10-09 05:41:53 +00:00
200052b51c NEWS update 1999-10-09 05:41:39 +00:00
Andreas Karajannis 05ed227dde Forgot to remove workaround for SQLANY_BUG which is no longer needed 1999-10-08 19:43:27 +00:00
Andreas Karajannis 2051682665 Moved Environment handle to connection struct for thread safety 1999-10-08 19:35:50 +00:00
Andrei Zmievski 405934a483 Mention php-cvs-daily list. 1999-10-08 18:05:59 +00:00
Sascha Schumann 965c9c2187 Use correct data type for mutex. 1999-10-08 16:29:33 +00:00
Sascha Schumann 9c995e93d7 Implement temporary workaround for thread-safety issues. This
serializes all request accesses. To disable, define NO_GLOBAL_LOCK
1999-10-08 16:24:31 +00:00
Andrei Zmievski 3f6108b646 More emphasis on ChangeLog and NEWS daily updates. 1999-10-08 16:09:52 +00:00
442628d935 mailing list test 1999-10-08 16:00:10 +00:00
9e870afa39 testing 1999-10-08 15:29:13 +00:00
0bbe641a91 test 1999-10-08 15:23:58 +00:00
Andrei Zmievski 85575e9a2c More information on how to use the special prefixes and the frequency
of NEWS and ChangeLog updates.
1999-10-08 13:59:27 +00:00
Sascha Schumann 3909ab4195 (php_info_aolserver): Show information about the SAPI module
(php_ns_module_main): Return early, if request startup failed
1999-10-08 13:06:28 +00:00
Jouni Ahto cfd2a241da Added the files for t1lib support. No porting from PHP3 done yet. 1999-10-08 07:56:43 +00:00
d6fd672624 ChangeLog update 1999-10-08 03:51:25 +00:00
Jouni Ahto 379889339f (PHP gmmktime) Should now give right values. Note that there was never need for
the acrobacy adjusting the time for GMT. mktime() fills
	       tm_gmtoff with just the right offset to add.
@- Fixed gmmktime() so that the following should always be true:
   gmmktime([args]) == mktime([args]) + date('Z', mktime([args])) (Jouni)
# Heh, conforming to the rules anyway...
1999-10-08 03:08:44 +00:00
Jouni Ahto 9109d8dcdd (PHP setlocale) Locale settings are now correctly restored to the values
set in environment at request shutdown.
@- setlocale doesn't anymore screw up things if you forgot to change it back
   to the original settings. (Jouni)
# Trying to conform to the rules set up by Andrei. Let's hope this works.
1999-10-08 02:10:57 +00:00
Sascha Schumann 5a6fe43d58 Apparently, we did too much cleanup. The server survives now much longer. 1999-10-07 21:47:39 +00:00
Andrei Zmievski 02795f9961 NEWS update 1999-10-07 21:41:37 +00:00
Andrei Zmievski 3652bc01ab New files.
Please read README.CVS-RULES!
1999-10-07 21:38:22 +00:00
Sascha Schumann 02553b5e7c POST works now and does not block anymore. 1999-10-07 21:23:55 +00:00
Sascha Schumann 3f1c010615 Remove SAPI_TARGET and use PHP_SAPI completely.
The target filename is now available as SAPI_PROGRAM, SAPI_SHARED, and
SAPI_STATIC.
1999-10-07 21:04:26 +00:00
Sascha Schumann 93b12f5fbd (ns_globals_struct): remove content_type member
(php_ns_request_dtor): remove content_type destructor, re-add path_translated destructor
1999-10-07 20:21:55 +00:00
Sascha Schumann 483a4642f0 Add comments to the source code and fix POST-read-data bug. 1999-10-07 20:15:26 +00:00
Andrei Zmievski cfec25f3b2 Some ChangeLog surgery. 1999-10-07 19:53:33 +00:00
Sascha Schumann 36ff78d232 Add help to get people started. 1999-10-07 19:53:20 +00:00
Andreas Karajannis 6cd07c5165 Made henv a real global var. Seems to work basically when multithreaded 1999-10-07 18:49:41 +00:00
Sascha Schumann 2a6d170dc0 nsapi => aolserver changes 1999-10-07 18:46:40 +00:00
Sascha Schumann 743b3851b1 nsapi => aolserver
"NSAPI" suggests Netscape too often.
1999-10-07 18:45:30 +00:00
Andrei Zmievski 017aff4f6d Renaming ChangeLog to NEWS. All future entries intended for public should
go into NEWS.
1999-10-07 16:56:42 +00:00
Sascha Schumann 9b654728ef PHP_SHOW_LD_LIBRARY_PATH leaked out of my test environment. 1999-10-07 16:47:53 +00:00
Uwe Steinmann 60b2d65b2b - new functions pdf_get_font, pdf_get_fontsize, pdf_get_fontname 1999-10-07 16:00:48 +00:00
Andrei Zmievski ca6cf936b8 Test commit again.
# add white space
1999-10-07 14:32:07 +00:00
Andrei Zmievski 91dffe9126 Testing commit.
@ Removed white space.
1999-10-07 14:24:18 +00:00
Andrei Zmievski 3562eb2999 Ignore generated files. 1999-10-07 14:05:08 +00:00
Andrei Zmievski ac4a798570 Put PLS_FETCH() in the correct place. 1999-10-07 14:00:18 +00:00
Andrei Zmievski 718351f882 Ignore generated files. 1999-10-07 13:53:35 +00:00
Andrei Zmievski 0d89395481 Fix for #2457. 1999-10-07 13:23:33 +00:00
Thies C. Arntzen 2148fe61a0 fix ZTS compile 1999-10-07 12:49:25 +00:00
Thies C. Arntzen b311342faf fixed hopefully last XML problem. that one was hard! 1999-10-07 12:27:40 +00:00
Thies C. Arntzen f352444541 added zval_del_ref() function 1999-10-07 12:20:40 +00:00
Sascha Schumann d480d23e97 (php_ns_request_handler): call ts_free_thread() to clean up 1999-10-07 12:00:32 +00:00
Thies C. Arntzen b6a90547f6 compiles again - and gets compiled 1999-10-07 10:56:04 +00:00
Sascha Schumann 712105cd5d Pass -avoid-version when building a shared library to avoid problems
with "installing" symbolic links. We need to do this conditional, since
    some libtool versions imply --disable-static with this option.
1999-10-07 10:03:24 +00:00
Thies C. Arntzen 601b837c56 SET_VAR_STR* expect a emalloc'ed copy of the string! 1999-10-07 09:13:39 +00:00
Andi Gutmans 5fed1466ef - Reverse my patch 1999-10-07 04:38:03 +00:00
Sascha Schumann 966b87e814 Enable hardcoding runpaths for more platforms and allow Solaris' patch to run
buildconf.
1999-10-06 23:26:36 +00:00
Sascha Schumann 1606365a12 Ignore already applied patches.
If somebody could make this work on Solaris, I'd appreciate it.
1999-10-06 19:34:36 +00:00
Sascha Schumann b2edf87b39 Allow *.a and *.o as libtool objects, and hardcode runpaths into
shared libraries.

    (Both taken from FreeBSD's libtool port.)
1999-10-06 18:58:14 +00:00
Andi Gutmans e3d0c91dbb - Fixed memory leak with this pointer. It was somtimes initialized with refcount
of 2 instead of 1.
- Also fixed a place where object.ptr_ptr is set to pointing to a zval* instead
  of zval**. I don't think this is ever used so we might be able to remove it
  altogether.
1999-10-06 17:45:15 +00:00
Andrei Zmievski 8959144837 Move random functions related defines into its own header file. 1999-10-06 16:34:36 +00:00
Thies C. Arntzen 781a53b807 *** empty log message *** 1999-10-06 15:09:44 +00:00
Thies C. Arntzen c6b91f789d fix for using resources as array indices 1999-10-06 15:09:26 +00:00
Sascha Schumann bf61827518 Fix "make clean". automake does not define an extra target for clean. 1999-10-06 14:41:36 +00:00
Sascha Schumann 4fee036f43 unidiff isn't widely recognized, change to context format. 1999-10-06 13:18:12 +00:00
Sascha Schumann bd62c63c3b Fixed pg_fetch_array() with three arguments.
Submitted by: brian@soda.berkeley.edu
1999-10-06 13:15:23 +00:00
Thies C. Arntzen 657edcd50e - replaced most getParamters against getParamtersEx calls
- removed ParamterPassedByReference where appropiate
1999-10-06 12:54:45 +00:00
Sascha Schumann 4b212d1ce6 * --copy always, since we need to change ltmain.sh
* make patch on some obscure UNIX happy
1999-10-06 12:06:48 +00:00
Uwe Steinmann 3ec401ec84 - fixed some memory leaks 1999-10-06 05:31:24 +00:00
Uwe Steinmann 0817d2a8db - as always forgot the Changelog entry 1999-10-06 05:29:18 +00:00
Uwe Steinmann 8c473e1f47 - support for mimetype application/vnd.fdf needed by fdf module
(only active if fdf support is compiled in)
1999-10-06 05:26:25 +00:00
Uwe Steinmann 6f4cca9cff - fix to work with new version of FdfTk 1999-10-06 05:23:28 +00:00
Sascha Schumann 6dea22808e FreeBSD's libtool port seems to contain a bug which is triggered by
-avoid-version. Removing it, since we don't absolutely need this option.
1999-10-05 20:59:21 +00:00
Sascha Schumann dff6e711ce Apply patch automatically at buildconf time 1999-10-05 17:43:45 +00:00
Sascha Schumann d71eb7bbe6 Fix typo (xml_globals => dir_globals) 1999-10-05 16:18:40 +00:00
Thies C. Arntzen 7fe8812d3e use reference counting for emulating child<->parent (cursor<->connection) relationships. 1999-10-05 16:06:54 +00:00
Sascha Schumann f48a4916ea Explicit casts to ulong. Some compiler don't like pointers in % 1999-10-05 15:15:01 +00:00
Sascha Schumann b510a6d11f More portability stuff 1999-10-05 15:13:22 +00:00
Thies C. Arntzen 35e7bcbb9d dir modules is now resourcified & thread-safe! 1999-10-05 14:36:00 +00:00
Sascha Schumann 693207a845 Generate files for distribution (also adds parsedate.c) 1999-10-05 14:12:43 +00:00
Sascha Schumann 2dd9f01a69 Fix typo. 1999-10-05 13:55:23 +00:00
Sascha Schumann 2785fbce1e OSF/1 V4.0 wants -lcxx 1999-10-05 13:50:13 +00:00
Sascha Schumann 60d87e1914 Add $automake_flags, to allow propagation of --copy 1999-10-05 13:47:16 +00:00
Sascha Schumann 7976bcbd28 Get rid of *_SHLIB variables. Our config scripts don't need Perl,
unfortunately the "apxs" utility does. Someone slap the creator of apxs.
1999-10-05 13:46:52 +00:00
Andrei Zmievski f71789ee71 Remove _A. 1999-10-05 13:33:57 +00:00
Sascha Schumann 84df96ef37 Fix automake dependencies 1999-10-05 13:27:37 +00:00
Thies C. Arntzen e0fe7b9c03 *** empty log message *** 1999-10-05 12:11:26 +00:00
Thies C. Arntzen 7b8ee930f4 fixed ora_close again 1999-10-05 12:10:52 +00:00
Thies C. Arntzen 5a605ae6f4 fix some warnings 1999-10-05 12:09:08 +00:00
Sascha Schumann c36bff57ca Fix logic. 1999-10-05 12:06:35 +00:00
Sascha Schumann e0d561a35b Use libtool 1999-10-05 11:48:05 +00:00
Sascha Schumann 1a4f22e4ed automake does not find all subdirectories automatically. 1999-10-05 11:33:00 +00:00
Sascha Schumann 1877b0779c This causes link problems with anything higher than -O0. 1999-10-05 11:17:04 +00:00
Sascha Schumann c27bbc4086 * Get rid of libphp_util.la
* Don't build CGI from convenience library
    * Add additional checks to regex.h (Apache build broke)
1999-10-05 11:00:48 +00:00
Sascha Schumann e74b985432 100% speedup in buildconf.
We have a top-level Makefile.am, so find becomes superflicious
1999-10-05 10:23:48 +00:00
Sascha Schumann 2e32234461 Build program static. 1999-10-05 09:51:25 +00:00
Marko Karppinen 537aefdb26 Fix a typo? (compile bustage on Solaris 2.6) 1999-10-05 07:00:10 +00:00
Andrei Zmievski cb78ebc0de Taken from PHP3 source. 1999-10-04 21:10:26 +00:00
Andrei Zmievski cec7e90996 *** empty log message *** 1999-10-04 20:35:28 +00:00
Andrei Zmievski 95c970030b test 1999-10-04 20:34:46 +00:00
Andrei Zmievski 6b2003dd2a test 1999-10-04 20:28:44 +00:00
Andrei Zmievski cbddc54b6f test 1999-10-04 19:55:16 +00:00
Sascha Schumann 337541636b -module is already set in Makefile.am 1999-10-04 19:31:36 +00:00
Andrew Skalski f1f8b8a9a2 Added delete and rename functions. 1999-10-04 18:30:37 +00:00
Sascha Schumann 7aed3d51fc * Fix header("HTTP/..") behaviour
* Fix leak WRT http_status_line
    * Update sapi/README
    * Remove %PHP_OUTPUT_FILES sort
1999-10-04 18:07:46 +00:00
Sascha Schumann cfaf694afa Move %(EXTRA_LIBS). 1999-10-04 17:18:17 +00:00
Sascha Schumann afc51baaa3 The .sym format isn't that complex. 1999-10-04 15:42:32 +00:00
Sascha Schumann 590f9c1dee Add necessary rule. 1999-10-04 15:35:16 +00:00
Sascha Schumann f18254e433 Forgot these.. 1999-10-04 15:22:18 +00:00
Sascha Schumann e67005e748 Use libtool. 1999-10-04 15:21:39 +00:00
Sascha Schumann 8ae3f4b027 Use libtool to build. 1999-10-04 15:20:12 +00:00
Sascha Schumann 232afa4816 * archive-based convenience libraries completely replaced
with libtool components

        * SAPI targets can enable thread-safe mode and define
          shared/static/program build target

        * all configure scripts use the same config.cache

        * phplibdir is $(top_builddir)/modules to avoid
          permission problems

        * sapi/*/Makefile.inc are gone

        * runpath handling cleaned up

        * top-level Makefile.in obsoleted through Makefile.am

        * --enable-versioning uses libtool's cleaner and more
          portable -export-symbols feature
1999-10-04 15:18:26 +00:00
Sascha Schumann ec01d01400 Whoops, OSF/1 has -lpthread and -lpthreads, but defines most
pthread_* as __pthread*. According to pthread(3), -lpthread is the
    correct choice.
1999-10-04 15:00:38 +00:00
Sascha Schumann 3e202d75ff Polish this. 1999-10-04 14:29:18 +00:00
Thies C. Arntzen 95d49b10b4 upgraded the former basic_functions.c code to use new API. 1999-10-04 13:31:36 +00:00
Thies C. Arntzen ca1d1f832a use getParametersEx for all builtin functions 1999-10-04 13:27:12 +00:00
Thies C. Arntzen 008810dc29 ereg now returns a continious array 0..9 again - empty values are returned as false.
i think this is *more* compatible with PHP3 - unless anybody really dislikes it i'd prefer it like this.
1999-10-04 13:04:32 +00:00
Sascha Schumann 8266f8a515 -lpthreads is needed on OSF/1 aka Digital Unix aka Tru64 1999-10-04 12:34:04 +00:00
Thies C. Arntzen 6847fefad9 added add_*_resource() and add_*_bool() functions 1999-10-04 11:42:46 +00:00
Thies C. Arntzen b357d0eaf8 i swear, i compiled (at least) before i committed! 1999-10-04 10:39:32 +00:00
Sascha Schumann 3f1465a66e Object files are usually not found in the srcdir. 1999-10-04 09:57:00 +00:00
Thies C. Arntzen 0dbabb9871 "cc -32" on IRIX 6.4 does not like (PHP_TRACK_VARS?"1":"0") - at least not if PHP_TRACK_VARS is 0. 1999-10-04 09:56:52 +00:00
Sascha Schumann 0fe632bcee Fix typo. This caused strange errors when using --with-apxs. 1999-10-04 09:51:46 +00:00
Andi Gutmans 1c0f136405 - Hooray. This might actually work. (I hope) 1999-10-03 20:06:21 +00:00
Andi Gutmans f114050fc8 - Update changelog 1999-10-03 19:05:25 +00:00
Sascha Schumann 8617cc60ad Make config executable 1999-10-03 16:10:15 +00:00
Sascha Schumann a0296da876 Make it executable. 1999-10-03 15:49:27 +00:00
Sascha Schumann 27fb752fce *_config are executable, thus we don't need %(SHELL) 1999-10-03 15:07:41 +00:00
Sascha Schumann 079d9711ac Fix Apache-module build 1999-10-03 14:06:06 +00:00
Sascha Schumann 9e4b5f7c3a Test commit II. 1999-10-02 21:16:34 +00:00
Sascha Schumann 9009c4481b Test commit. 1999-10-02 21:16:04 +00:00
Sascha Schumann 55218a98f2 Reactivate autoheader 1999-10-02 21:14:23 +00:00
Andrei Zmievski 68d423b3ee test commit 1999-10-02 21:13:06 +00:00
Andrei Zmievski e721e560e5 test commit 1999-10-02 21:06:30 +00:00
Andi Gutmans b7e248dd06 *** empty log message *** 1999-10-02 20:50:20 +00:00
Andrei Zmievski 56af2d063e test commit 1999-10-02 20:46:41 +00:00
Andrei Zmievski bbc72d6eb6 test commit 1999-10-02 20:38:09 +00:00
Andrei Zmievski 26b5ef7435 test commit 1999-10-02 20:26:17 +00:00
Andrei Zmievski debf741e82 commit test 1999-10-02 20:22:29 +00:00
Andrei Zmievski 9387719dac test 1999-10-02 20:10:35 +00:00
Andrei Zmievski 62f0dbb0c4 test commit 1999-10-02 20:07:07 +00:00
Andrei Zmievski 34e4269172 test commit 1 1999-10-02 20:03:07 +00:00
Andrei Zmievski 32604578de test commit 1999-10-02 19:22:47 +00:00
Andi Gutmans 56834ff66a - Another locking fix. 1999-10-02 18:02:10 +00:00
Andi Gutmans e40667440d - Fixed locking problem when fetching string offsets 1999-10-02 16:40:25 +00:00
Zeev Suraski 77ddd3a35b Fix the leak reported on the PHP 3 list (isset() on string offsets) 1999-10-02 15:56:49 +00:00
Sascha Schumann be2668c027 Use the already compiled `mod_php4.o'. This avoids the trouble
apxs has with VPATH builds (assumes source dir = build dir).
1999-10-02 12:11:52 +00:00
Andi Gutmans 86357a9c27 - Move is_ref back to being an unsigned char and not a bit field. 1999-10-01 23:31:39 +00:00
Andi Gutmans 4dd47ffbc1 - Remove locking support completely 1999-10-01 23:26:00 +00:00
Andi Gutmans f67a65543d - I forgot this 1999-10-01 19:53:27 +00:00
Andrei Zmievski 23e8d1762d Added array_reverse() function. 1999-10-01 17:36:54 +00:00
Andrei Zmievski a92fb5fe3d rename. 1999-10-01 14:54:55 +00:00
Thies C. Arntzen 7e75bf8f88 one zval fix - cleanups 1999-10-01 13:44:07 +00:00
Andi Gutmans 03d354dcf9 - For Andrei. Implement references in array() initializations 1999-10-01 10:00:05 +00:00
Andrei Zmievski 6f34f1a68d test commit 1999-09-30 23:00:39 +00:00
Andrei Zmievski 7258842c29 preg_replace() now makes copies of array entries if arrays are passed in,
so that convert_to_string() preserves the originals. Is this the correct way to do it?
1999-09-30 21:59:46 +00:00
Sascha Schumann 7ed678f819 Fix typo--GD_* is for shared build mode. 1999-09-30 20:04:52 +00:00
Andrei Zmievski 97f105e450 Fix nl2br crash. 1999-09-30 20:03:32 +00:00
Sascha Schumann d926d95066 Test commit II. 1999-09-30 19:19:19 +00:00
Andrei Zmievski 7982d27528 No need for this anymore. 1999-09-30 18:56:46 +00:00
Sascha Schumann 33ba4ec2a9 Test commit. 1999-09-30 18:54:10 +00:00
Sascha Schumann 5320c897f5 Automatically add the SAPI target's Makefile to the list. This
frees us from doing this in each config.m4.
1999-09-30 12:56:24 +00:00
Thies C. Arntzen 16e1cbee07 major rework here - the refcount stuff gets better and better! 1999-09-30 08:41:45 +00:00
Sascha Schumann cf4afd61f0 * create Makefiles for ext, pcrelib, sapi/*
* copy files for Apache from $(srcdir)
1999-09-29 22:18:43 +00:00
Sascha Schumann 4db370ab9c * VPATH work
* add "--local" switch to buildconf which only recrates the local
      autoconf scripts.
1999-09-29 21:49:32 +00:00
Zeev Suraski dbccd75b06 *** empty log message *** 1999-09-29 21:46:37 +00:00
Chuck Hagenbuch 9221981fa3 cjh: closing bug #2407. 1999-09-29 21:18:35 +00:00
Thies C. Arntzen 02c0ab8d0c fix the order.. (thanx, andi) 1999-09-29 19:13:08 +00:00
Sascha Schumann 174c79dcba Fix a VPATH issue. 1999-09-29 18:35:45 +00:00
Andi Gutmans 202d7dd216 Fix leak in += with arrays 1999-09-29 17:45:44 +00:00
Andi Gutmans 06d04d15a8 - Fix SEND_VAR problem after fetch'ing a variable and not knowing the fetch type 1999-09-29 17:18:36 +00:00
Thies C. Arntzen 446e5d0fff added add_property_resource 1999-09-29 15:25:06 +00:00
Stig Bakken 16ff84429a *** empty log message *** 1999-09-29 15:17:29 +00:00
Stig Bakken 1cb0d88186 Decent configure speedup. Makefiles are now generated only for the
extensions you are including.  Got rid of configure.in.in.
Moved the last Apache-specific files into sapi/apache and made both
static and DSO build work again (it still doesn't run properly).
1999-09-29 15:17:02 +00:00
Stig Bakken db4820447f The $shared variable should normally never be used outside of a call to
AC_ARG_(ENABLE|WITH).  If it is necessary anyway, make sure it is set to
"no" before starting.
1999-09-29 15:13:25 +00:00
Andrey Hristov 2fa5e6dd6a Fix for my fix. 1999-09-29 14:25:40 +00:00
Thies C. Arntzen 284bc523d6 fixed crash in connection shutdown! 1999-09-29 14:20:27 +00:00
Thies C. Arntzen 73c8429282 just some renaming. 1999-09-29 13:35:12 +00:00
Andi Gutmans 59d5462a6a - Stop using the locking mechanism and start using refcount.
Now we know when we need to free but we still need to support it
1999-09-28 17:37:14 +00:00
Andi Gutmans cf6c92949c - Get rid of warning 1999-09-28 17:37:06 +00:00
Andi Gutmans b56fd4602f - First part of the patch which makes reads use ptr and not ptr_ptr. 1999-09-28 16:03:09 +00:00
Stig Bakken f83ff3eb73 disable --with-zeus for now. 1999-09-28 12:55:49 +00:00
Stig Bakken 4c4c8555eb Started working on the Zeus support. Zeus's ISAPI obviously differs from
Windows's, does someone have docs for the Windows API?
1999-09-28 12:08:34 +00:00
Sascha Schumann 7ed68c0f53 Provide alternative istdiostream.
This has been tested with Sun WorkShop 4.2 C++ which does not
    contain class istdiostream.
1999-09-28 11:54:02 +00:00
Thies C. Arntzen 74bc24d9d5 initialize OCI in threaded mode if ZTS is defined. 1999-09-28 11:12:32 +00:00
Thies C. Arntzen 9156c2c8d1 init in thread-safe mode if ZTS isdefined 1999-09-28 11:09:03 +00:00
Thies C. Arntzen 4c3f393743 fixed startup-deadlock. 1999-09-28 10:54:42 +00:00
Thies C. Arntzen a054e6e61e found a typo! 1999-09-28 09:59:59 +00:00
Andi Gutmans 20ba4ec0bd - Update project. 1999-09-27 19:42:53 +00:00
Sascha Schumann 9442b13939 Make an extra copy of input parameter. 1999-09-27 18:00:30 +00:00
Sascha Schumann e846baa14b * include from $(srcdir)
* use proper target for nsapi
1999-09-27 16:49:23 +00:00
Sascha Schumann 288c73580b Create directories, if they do not exist (for VPATH builds). 1999-09-27 16:42:34 +00:00
Stig Bakken 402b2a5d6d added README file with very brief docs 1999-09-27 16:37:33 +00:00
Stig Bakken 2a854ca8b9 Generalized server-API build process on UNIX. Each SAPI
implementation now has its own directory under sapi/, just like
extensions have theirs under ext/.  To make the final targets appear
in the main dir, the top-level Makefile includes sapi/NN/Makefile.inc
from the selected sapi backend.  This is a plan Makefile stub without
any autoconf substitutions.  Each SAPI backend also has its own
config.m4 like extensions (read at the end of diversion 2) and
config.h.stub files.

Each SAPI backend has to contain:

config.m4: just like for extensions, this file contains
autoconf/automake directives that end up in the configure script.  The
only difference is that the sapi config.m4 files are read in diversion
(output block) 2 instead of 3.  The sapi config.m4 files should set
two variables: PHP_SAPI (which sapi backend to choose) and SAPI_TARGET
(the name of the resulting library or program, previously BINNAME).
If they are not specified, they will default to "cgi" and "php",
respectively.

Makefile.inc: has to exist, has to define "INSTALL_IT" to the command
used to install the final target (or ":" for no operation).  It also
has to define a plain Makefile rule (without autoconf substitutions)
to build $(SAPI_TARGET)

Makefile.am: just what you think.  Make sure your target is called
"libphpsapi_NNN.a", where NNN is the value of PHP_SAPI.

Some testing and fixing probably remains.  To make everything hang
together, I've done some ugly tricks that I can imagine causing some
problems.  I've built and run the CGI version and built the Apache
DSO.
1999-09-27 16:34:28 +00:00
Sascha Schumann 154663e9a2 Remove C++ style comments from C source file. 1999-09-27 15:37:00 +00:00
Andrey Hristov 7665e9ef27 Fix for bug #2199. Redirect was returning http:// which resulted in a crash. 1999-09-27 15:17:28 +00:00
Andrey Hristov 375c85e27f I will follow portability guidelines.
I will follow portability guidelines.
I will follow portability guidelines.
I will follow...
1999-09-27 14:15:15 +00:00
Andrew Skalski 0413f52480 Added functions ftp_{pasv,size,mdtm,fget,fput}
PASV mode is now supported; file size and last-modified time can now
be fetched from servers that support them; files now may be stored to and
retrieved from open files, in addition to disk files.
1999-09-27 14:07:09 +00:00
Andrey Hristov 10591231ca Make it portable. 1999-09-27 14:05:18 +00:00
Stig Bakken 3bc6f8155c added AC_SYS_LFS from fileutils 1999-09-27 13:15:20 +00:00
Sascha Schumann b7a1130143 Actually allow to set CXXFLAGS 1999-09-26 20:59:47 +00:00
Sascha Schumann 96b6bdff27 Now thread safe version builds out of the box. libzend/TSRM
contain extra config scripts which pass the necessary libs back
    to our Makefile.
1999-09-26 20:17:28 +00:00
Sascha Schumann 0ac169b474 Build communication channel and add checks for C++ library 1999-09-26 20:12:05 +00:00
Sascha Schumann a5dbe81a76 Do not let PACKAGE/VERSION escape from tsrm_config.h. 1999-09-26 19:47:35 +00:00
Sascha Schumann feccd9f104 Undefine previously PACKAVE/VERSION macros. We should find a way
to suppress these from automake
1999-09-26 19:46:35 +00:00
Sascha Schumann 806abdb87c Use new tsrm_config script to determine libraries. 1999-09-26 19:26:54 +00:00
Sascha Schumann 17df2892bd Use helper script to determine compile time configuration for TSRM 1999-09-26 19:09:24 +00:00
Stig Bakken 1d9f6b8a57 Have to keep using AM_PROG_LIBTOOL to keep all automake versions happy. 1999-09-26 16:27:25 +00:00
Sascha Schumann 09ad17f67e Avoid specifying standard paths. This might result in compiler problems
(see #1937, #2367)
1999-09-26 15:38:58 +00:00
Sascha Schumann 182ac10749 Expand relative paths properly, otherwise build process will fail. 1999-09-26 15:00:12 +00:00
Sascha Schumann 8b462c1acf Do nothing, if PHP_RPATHS is empty. 1999-09-26 09:12:55 +00:00
Sascha Schumann df42e494d7 Disable rpaths optionally. 1999-09-26 09:05:56 +00:00
Andi Gutmans 4fff0386ac - Changed Ts{}.var to Ts{}.var.ptr_ptr. 1999-09-26 05:45:18 +00:00
Sascha Schumann 57668a27cf * Use per-thread structure for request data
* Update ChangeLog
1999-09-25 21:08:36 +00:00
Sascha Schumann 7922481919 Do not try to free NULLs. 1999-09-25 21:06:11 +00:00
Sascha Schumann b5524a0981 * use faster Ns_ConnWrite()
* access cookies correctly
    * set HTTP_* variables for script
1999-09-25 18:51:38 +00:00
Sascha Schumann 104209a328 * cleanup
* make cookies work
1999-09-25 16:51:18 +00:00
Thies C. Arntzen 091e91c051 fixed callback code -> now $parser is passed as a resource! 1999-09-25 16:42:31 +00:00
Sascha Schumann f8b9b0db69 * use consistent php_ns prefix
* improve configuration code
    * shutdown SAPI/TSRM correctly
1999-09-25 16:06:55 +00:00
Sascha Schumann dd7b4680da Add entry for AOLserver. 1999-09-25 15:41:51 +00:00
Sascha Schumann e6006d03ca * remove debugging message
* use SAPI's http response code
    * improve POST read (still blocks in Ns_ConnRead, even if there is enough
      data to read)
    * improve config data handling
1999-09-25 15:37:02 +00:00
Sascha Schumann 00b2df7b8f New Zend API 1999-09-25 12:09:50 +00:00
Sascha Schumann 9d1c26481a Use new Zend API 1999-09-25 11:55:42 +00:00
Andreas Karajannis 3ce44b1046 *** empty log message *** 1999-09-25 11:36:34 +00:00
Andreas Karajannis 7588b1bd81 odbc now uses the new Zend function api 1999-09-25 11:30:28 +00:00
Stefan Roehrich 2c9ee99743 Use new Zend API. 1999-09-25 11:23:02 +00:00
Sascha Schumann eb754de807 - support POST and HEAD requests
-   clean up module_main()
    -   allow arbitrary mappings
1999-09-25 01:06:33 +00:00
Sascha Schumann 4e8c8fd992 Initial AOLserver support. Note that the current way of creating
the shared library works only with GNU utilities. Some features
    have to be added yet (i.e. POST and cookie support).
1999-09-25 00:32:25 +00:00
Andrey Hristov bfa7b6b145 - Updated array functions to use high-performance API
- Updated preg_split() to allow returning only non-empty pieces
1999-09-24 22:44:41 +00:00
Sascha Schumann a412eb08cb PTHREADS is a custom symbol 1999-09-24 20:52:46 +00:00
Sascha Schumann 5453d0be3c Additionally check libc_r (*BSD) for pthread functions 1999-09-24 20:14:44 +00:00
Andrey Hristov 0c02153bb9 *** empty log message *** 1999-09-24 20:12:28 +00:00
Andrey Hristov ba01cefc0c Update to new high-performance function API. 1999-09-24 20:11:06 +00:00
Sascha Schumann 7a1fff1441 Use new Zend API. 1999-09-24 19:35:25 +00:00
Sascha Schumann d8895c02f7 Add _ex API implementation for booleans. 1999-09-24 19:22:25 +00:00
Sascha Schumann e303647058 Use new Zend API and some minor cleanup. 1999-09-24 19:15:17 +00:00
Andrey Hristov 5a35438c21 *** empty log message *** 1999-09-24 18:58:36 +00:00
Andrey Hristov 54fed6c652 Extended var_dump to handle IS_RESOURCE somewhat. 1999-09-24 18:57:02 +00:00
Andrey Hristov be0eeccdbc Update WDDX for new high-performance function API. 1999-09-24 18:43:34 +00:00
Thies C. Arntzen 8ad2f4a2e8 we want to know who to "blame";-) 1999-09-24 18:07:26 +00:00
Thies C. Arntzen c626d9e47b updated XML (only partly tested) 1999-09-24 18:02:58 +00:00
Stig Bakken 79e729d6b2 more high-tech shared building 1999-09-24 15:35:35 +00:00
Stig Bakken a4bc9478f8 kill another warning 1999-09-24 15:34:54 +00:00
Stig Bakken 63b101f36d kill warning 1999-09-24 15:34:30 +00:00
Stig Bakken 701bd7cfad set "phplibdir" in configure so it doesn't have to be set in Makefile.am 1999-09-24 15:34:06 +00:00
Thies C. Arntzen 032b459205 use getParameterEx 1999-09-24 15:10:13 +00:00
Stig Bakken 33a946d317 #if !HAVE_FOO -> #ifndef HAVE_FOO 1999-09-24 14:41:27 +00:00
Stig Bakken bd3132bcda AM_PROG_LIBTOOL is obsolete in libtool 1.3.3, which we now require.
Using AC_PROG_LIBTOOL instead.
1999-09-24 14:36:43 +00:00
Stig Bakken 56654596a3 Detect automake/libtool that are installed with different prefixes. 1999-09-24 14:29:28 +00:00
Thies C. Arntzen 10ec822b59 fixed warning 1999-09-24 14:18:33 +00:00
Zeev Suraski 360675cee3 Compile fixes for WDDX, XML and Zlib (untested) 1999-09-24 14:14:47 +00:00
Zeev Suraski 83a5bfdd04 This should make the Sybase CT module compile again (untested) 1999-09-24 14:11:53 +00:00
Zeev Suraski e99e7c04ba This should make the mSQL module compile again (untested) 1999-09-24 14:09:37 +00:00
Zeev Suraski 86133ef45e Ok guys, the prototype for zend_fetch_resource*() has changed - it now
accepts a zval ** instead of a zval *, to be suitable for use with the
getParametersEx() API.
You don't have to switch to the getParametersEx() API, but you will have to
go over your code and add &'s where it's applicable (of course, if you have
the mental strength to go over your code and convert it to use the Ex API,
it's best).

The MySQL module now uses the getParametersEx() API completely.
1999-09-24 14:07:15 +00:00
Zeev Suraski 85844ace95 Exify the standardized resource stuff 1999-09-24 14:03:45 +00:00
Sascha Schumann c8ac4bb069 Link with libtsrm.a, if thread-safety is chosen. 1999-09-23 20:27:17 +00:00
Sascha Schumann f0ee629b04 Exit, if subsequent configure scripts fail. 1999-09-23 20:17:07 +00:00
Sascha Schumann 8bf4fe02db Try to find ANSI/STDC compatible mode of host compiler 1999-09-23 19:34:42 +00:00
Andrew Skalski 1e573a9acd fixed php3 code problem 1999-09-23 17:54:26 +00:00
Andi Gutmans 63c15d292a - Fix bug #2364.
I haven't checked all of the conversion macros yet but there's a change
  there are more such bugs there.
1999-09-23 16:13:31 +00:00
Sascha Schumann 4efa22c84e Fix vpath build w/ thread-safe enabled on Unix. 1999-09-23 16:07:16 +00:00
Andrey Hristov 9f07657b48 Small clarification. 1999-09-23 15:37:01 +00:00
Sascha Schumann de8120f5d0 This version is finally the standard one. The last one was created
using the 'nested ifs mode' which seems to be the source of the problem.
1999-09-23 14:53:39 +00:00
Nick Gorham 7d759e6781 Added support for Easysoft ODBC-ODBC Bridge
Fixed bug in odbc_setoption
1999-09-23 14:46:35 +00:00
Andrew Skalski 1e13eb646e fixed typo in mcal_list_alarms() 1999-09-23 14:34:00 +00:00
Sascha Schumann ba8b703ba1 re2c's bit vectors appear to be not binary clean. Revert to
standard mode for the moment.
1999-09-23 14:09:42 +00:00
Thies C. Arntzen edb2032c4e tiny optimisation 1999-09-23 11:20:56 +00:00
Thies C. Arntzen 820adaddf1 Ora_Fetch_Into now resets the returned array in all cases 1999-09-23 10:23:12 +00:00
Thies C. Arntzen ed731497fe fixed NULL column
cleanups
1999-09-23 09:15:38 +00:00
Nick Gorham fd3f26c100 Added odbc metadata update log 1999-09-22 21:15:35 +00:00
Nick Gorham 21d8c984da Added support for metadata functions, odbc_tables, odbc_columns,
odbc_columnprivileges, odbc_foreignkeys, odbc_gettypeinfo,
    odbc_primarykeys, odbc_procedurecolumns, odbc_procedures,
    odbc_procedurecolumns, odbc_procedures, odbc_specialcolumns,
    odbc_statistics, odbc_tableprivileges
1999-09-22 21:14:03 +00:00
Andrew Skalski 1220513252 mcal fix 1999-09-22 20:23:34 +00:00
Andrew Skalski 4a35689b48 added null-checking in make_event_object 1999-09-22 20:21:40 +00:00
Andrew Skalski 4b0707cf32 Added optional port argument to ftp_connect() 1999-09-22 16:07:41 +00:00
Thies C. Arntzen 33de7a2ea4 i always forget something;-) 1999-09-22 15:26:16 +00:00
Thies C. Arntzen 24c5143122 fixed Ora_PLogon (rewrote ora_do_logon using php_mysql.c)
oracle_hack.c should no longer be needed!
1999-09-22 15:16:19 +00:00
Thies C. Arntzen 49c891f2cf preliminary fix for each until andi & zeev clean up! 1999-09-22 09:57:42 +00:00
Thies C. Arntzen 8c6da509f2 resourcified Oracle 1999-09-22 09:52:19 +00:00
Thies C. Arntzen 5f3515652a if you pass NULL as the resource_type_name to zend_fetch_resource*&friends the functions will not print any warnings if the resource is not found! 1999-09-22 09:46:44 +00:00
Stefan Roehrich 8b4000f4cb Added new allowable_tags for gzgetss() in ChangeLog, too. 1999-09-22 08:11:17 +00:00
Stefan Roehrich 0b1226219c Fixed gzgetss() with new _php3_strip_tags, corrected prototype. 1999-09-22 07:43:36 +00:00
Uwe Steinmann cc31ea96a5 - fixed misleading explaination of fdftk option 1999-09-22 05:27:55 +00:00
Andi Gutmans 7e5ef04b13 - Get rid of warning on win32, non-threadsafe mode. 1999-09-22 05:26:22 +00:00
Andrew Skalski 709286c0d2 removed NULL reference 1999-09-21 23:37:26 +00:00
Andrew Skalski 773a26bb22 added missing "addr.sin_family = AF_INET" to socket routines 1999-09-21 23:34:45 +00:00
Andrey Hristov 9ea5e71a75 *** empty log message *** 1999-09-21 21:39:20 +00:00
Andrey Hristov 33eb7d83ca WDDX can now serialize and deserialize objects. It uses a variable named
'php_classname' to store the class name as part of the structure. This way
WDDX modules in other languages don't get broken by extensions to DTD
we would have had to make otherwise.
1999-09-21 21:38:51 +00:00
Rasmus Lerdorf 1e57766b11 Slightly redundant to check for crypt() here again, but the TRY_RUN stuff
needs it defined in the same m4 file or it won't work, and it will just
get pulled out of the cache anyway, so it isn't a big deal.
1999-09-21 20:10:53 +00:00
Andi Gutmans 228a537bbe - Fix problem where function parameter fetches were created too late. 1999-09-21 20:00:01 +00:00
Rasmus Lerdorf cd0957112b fgetss/gzgetss fixes 1999-09-21 17:50:51 +00:00
Andrey Hristov 53fb0ea075 A couple of fixes. 1999-09-21 17:06:30 +00:00
Sascha Schumann 8771472210 AC_CRYPT_CAP depends on symbol checks performed later. 1999-09-21 15:00:22 +00:00
Sascha Schumann 5d70fbf6c1 * Do not check explicitly for symbols in the C library (fixes #2339)
* sort function checks
1999-09-21 14:51:24 +00:00
Thies C. Arntzen 8638a61df9 added krsort() function 1999-09-21 14:36:41 +00:00
Sascha Schumann 3f684e77a7 Continue, if re2c is not available.
Using the ".new" suffix, we prevent the shell from zeroing the file.
1999-09-21 12:24:41 +00:00
Sascha Schumann 240d17f12f Fix typo.
catched by: ssb
1999-09-21 08:41:31 +00:00
Sascha Schumann d47b44e3c2 Use install-sh (autoconf) script to install php. This automatically
creates the bindir path, so that the effect described in #2304 disappears.
1999-09-21 08:37:27 +00:00
Sascha Schumann cf00d75980 On at least Win32, gettimeofday() returns values in tv_usec which exceed
1,000,000.

    For portability reasons we set the integer part of our result to 0.
    This is equivalent to using tv_usec % 1000000.
1999-09-21 08:22:33 +00:00
Zeev Suraski 8b1195ffcc *** empty log message *** 1999-09-21 07:32:50 +00:00
Zeev Suraski a30f028a12 Add get_func_args() 1999-09-21 07:31:24 +00:00
Zeev Suraski 9f1d0dec47 *** empty log message *** 1999-09-21 00:46:22 +00:00
Rasmus Lerdorf 1324095627 woops 1999-09-21 00:21:01 +00:00
Rasmus Lerdorf 08389808ee Fix zlib compile problem 1999-09-21 00:15:21 +00:00
Andi Gutmans 6735ebb271 - Move some more language specific functions over to Zend.
get_class() and friends.
1999-09-20 21:29:41 +00:00
Andi Gutmans 68217ef564 - Move some more Zend internal functions from PHP 1999-09-20 21:28:37 +00:00
Sascha Schumann 7e686b1b95 Timestamp commit. I do consider removing the rule from Makefile.am 1999-09-20 21:17:26 +00:00
Egon Schmid 565c322797 Here was also something missing. 1999-09-20 20:05:26 +00:00
Andi Gutmans 5e3bbea0ff - Next part of locking fix.
$var = expr; and $var += expr; first create code for expr and later on
  for the fetch_w of $var.
1999-09-20 18:17:32 +00:00
Andrew Skalski 678c204e32 added FTP module 1999-09-20 18:12:55 +00:00
Andi Gutmans 7831d30265 - Newline for Sun's compiler 1999-09-20 17:01:38 +00:00
Andi Gutmans 06a18f169b - Add some internal functions to Zend 1999-09-20 16:56:09 +00:00
Andi Gutmans 96a19593b2 - Internal functions which are basic language functions should be in Zend
and not in PHP. I.e. strlen(), each(), error_reporting(), count(),
  get_class_name().
1999-09-20 16:56:02 +00:00
Rasmus Lerdorf c0dcedcafc Added optional allowable_tags arguments to strip_tags() and fgetss() to
allow you to specify a string of tags that are not to be stripped

Could have used flex for this, and Andrew sent me a flex file to do this,
but I could do the same thing with only minor additions to the existing
state machine and the resulting code is much smaller and tighter.
1999-09-20 15:50:56 +00:00
Andi Gutmans babad2694e - First step in fixing locking problem. Array fetches are now always done last.
Later on we will want to delay the write fetches even longer until after their
  resulting expression is parsed. The way it is now, will make it very easy
  to delay as long as we need.
1999-09-20 15:44:30 +00:00
Andrew Skalski 4247839610 php3 compatibility added 1999-09-20 15:40:22 +00:00
Andi Gutmans 82c8a9e745 - Indirect references had all of the fetches by mistakenly backpatched.
Actually all of the fetches are supposed to be read, except for the last
  one.
1999-09-20 14:45:36 +00:00
Andrey Hristov eb66458ed9 *** empty log message *** 1999-09-20 14:14:46 +00:00
Andrey Hristov f84ba1b039 - Upgraded var_dump() to take multiple arguments
- php3api_ is changed to php_
1999-09-20 14:14:26 +00:00
Andrew Skalski 85ca1dfb08 Replaced ftplib because of incompatible license. 1999-09-20 14:10:25 +00:00
Stig Bakken fffbcf5297 logic fix 1999-09-20 13:11:34 +00:00
Zeev Suraski 7a4a5944f9 Added zend_num_args() and zend_get_arg() 1999-09-20 13:00:35 +00:00
Thies C. Arntzen 6c0c410acf resource API & ZTS stuff 1999-09-20 12:51:20 +00:00
Zeev Suraski 13d840bc3f Add a file in which we can put Zend builtin functions 1999-09-20 12:24:39 +00:00
Zeev Suraski 8c75ad3dd3 *** empty log message *** 1999-09-20 11:56:45 +00:00
Zeev Suraski ee382ca76a Fixed a memory leak in the Apache per-directory directives handler 1999-09-20 11:54:06 +00:00
Thies C. Arntzen 4bb329eafb added array_count_values function. 1999-09-20 10:09:57 +00:00
Thies C. Arntzen 22d6f64f54 new API for var_dump 1999-09-20 09:34:39 +00:00
Zeev Suraski 4dcb388c0c *** empty log message *** 1999-09-19 11:07:49 +00:00
Andi Gutmans 3bfef7eef1 - Fix bug #2278 1999-09-18 23:21:33 +00:00
Andi Gutmans 1ac04fe9f4 - Try to fix the leak Rasmus reported. It's pretty sucky code so I'm really
not sure this fix is OK.I can't remember all of what we did there.
1999-09-18 22:07:12 +00:00
Andi Gutmans a5783da8a9 - Make Win32 compile again 1999-09-18 19:13:38 +00:00
Stefan Roehrich de13056307 Fixed prototype. 1999-09-18 19:03:35 +00:00
Zeev Suraski 6ddd686141 Safer behavior 1999-09-18 13:07:45 +00:00
Sascha Schumann 39dbe1d41b Aline escape signs in macro definitions. 1999-09-18 12:16:16 +00:00
Sascha Schumann a4838358f3 Pipe header names through sort and put only one on each line. This
makes them better accessible.

    Add stdlib.h to check headers.
1999-09-18 12:14:49 +00:00
Sascha Schumann dbc6964fbb There is no reason to define malloc() to xmalloc() in this context. 1999-09-18 12:13:48 +00:00
Andrey Hristov 8dbbeaf55a Make CVS quiet. 1999-09-17 22:25:00 +00:00
Thies C. Arntzen aa5102490a make SUNs c89 happy 1999-09-17 13:57:24 +00:00
Thies C. Arntzen ab185b11b5 SUN c89 doesn't like } direct after a label;-( 1999-09-17 12:32:18 +00:00
Thies C. Arntzen 20ee106672 no // in the sources please 1999-09-17 12:16:21 +00:00
Thies C. Arntzen 83bbb90d10 added newline at end of file 1999-09-17 12:14:31 +00:00
Gergely Madarász 32c7eaa9e3 note the shared modules in the changelog 1999-09-17 12:12:56 +00:00
Sascha Schumann 6780b649c6 Convert to Ex API. Does anyone have a better name for it? 1999-09-17 09:56:30 +00:00
Sascha Schumann 7d519f2f84 Use Ex API here as well. 1999-09-17 09:40:51 +00:00
Sascha Schumann c051b3868b Convert module to use Ex API. 1999-09-17 09:26:03 +00:00
Thies C. Arntzen 128b733eca fix #2316 - fetching empty LOBs via OCI8 1999-09-17 08:25:03 +00:00
Sascha Schumann 5a5646dce1 don't call empty function names 1999-09-17 05:45:52 +00:00
Sascha Schumann 55272d3df8 add user-level callbacks 1999-09-17 05:40:59 +00:00
Zeev Suraski 567b3cef6b - Fix bug #2318 1999-09-17 02:06:12 +00:00
Zeev Suraski d01370cdc2 *** empty log message *** 1999-09-17 02:06:08 +00:00
Sascha Schumann 09af5f967f supply path to xml include dir for APXS and APACI 1999-09-17 01:47:15 +00:00
Sascha Schumann 5a468e740c This format is also used by the XML module
allows us to compile with Apache's expat-lite dir
1999-09-17 01:38:10 +00:00
Sascha Schumann 61f288ced3 0' flag ignored with precision specifier and X' format 1999-09-17 01:16:54 +00:00
Sascha Schumann 79fd46c3a1 If available, use Apache's embedded expat 1999-09-17 00:57:28 +00:00
Sascha Schumann 51ad9501d1 fix Unix build 1999-09-17 00:12:58 +00:00
Zeev Suraski 98d95dd88e - Added support for unknown POST content types (Zeev)
- Introduce the convert_to_*_ex() API in strlen()
1999-09-16 23:18:15 +00:00
Zeev Suraski 52e769d883 Introduce convert_to_*_ex() 1999-09-16 23:15:34 +00:00
Zeev Suraski ec50085da3 *** empty log message *** 1999-09-16 22:42:21 +00:00
Zeev Suraski 71a4740847 *** empty log message *** 1999-09-16 22:31:33 +00:00
Zeev Suraski 13e67642fa Generalize SAPI a bit 1999-09-16 22:15:43 +00:00
Andrey Hristov f52ffb8943 Fixed memory leak. 1999-09-16 20:59:44 +00:00
Andrew Skalski 359a3af2a1 Added documentation hooks to ftp.c 1999-09-16 19:39:44 +00:00
Andrew Skalski 13a74e6979 added ftp_pwd() ftp_cdup() ftp_mkdir() and ftp_rmdir() 1999-09-16 19:03:27 +00:00
Andrew Skalski 93313c576c added ftp_systype() and ftp_listraw() functions 1999-09-16 18:38:11 +00:00
Andrew Skalski f0688ad7e2 Added rudimentary FTP support. 1999-09-16 15:57:51 +00:00
Sascha Schumann e20af627c2 improve short help messages 1999-09-16 15:35:49 +00:00
Sascha Schumann cf0ea12384 this was twice here 1999-09-16 14:07:56 +00:00
Sascha Schumann 119b85b736 this helps compiling on non-ANSI C compliant platforms 1999-09-16 14:06:35 +00:00
Rasmus Lerdorf 39df209ddd libtool check fix 1999-09-16 13:52:19 +00:00
Sascha Schumann 823a48558c . 1999-09-16 13:41:38 +00:00
Sascha Schumann 0320532962 Make some things accessible from outside for session module 1999-09-16 13:25:54 +00:00
Sascha Schumann 8ea07b1fd2 . 1999-09-16 13:00:06 +00:00
Sascha Schumann fa0f9ed367 wddx decode works as well 1999-09-16 12:55:31 +00:00
Sascha Schumann a597f24b5e wddx serialization works now 1999-09-16 12:00:58 +00:00
Sascha Schumann 92896a9945 Since Thies fixed var.c, objects work now, too. 1999-09-16 09:14:06 +00:00
Sascha Schumann efea424869 use AM_PROG_CC_STDC which covers AIX, Ultrix, OSF/1, HP-UX, and SVR4 1999-09-16 08:42:25 +00:00
Sascha Schumann e23d66fb5c silence libtool 1999-09-16 08:26:46 +00:00
Thies C. Arntzen 6ecd417b34 php4 now deserialized php3 objects correctly!
php3 will ignore objects serialized by php4 (that's the price we have to pay!)
small fix in deserializing objects with static initializers (thanx boris)
1999-09-16 08:05:17 +00:00
Thies C. Arntzen de73bd0123 when unserializing classes:
if the class is not known the standard class (no methods) will be used.
if the class is known - the created object will functional again!
1999-09-15 15:03:06 +00:00
Andrey Hristov b287aa2cf4 Fixed printf format. 1999-09-15 13:37:11 +00:00
Andrey Hristov 22ce3af972 HASH_OF is now in php.h. 1999-09-15 13:28:33 +00:00
Thies C. Arntzen e7ad3bbec2 use new API in var.c 1999-09-15 11:42:28 +00:00
Thies C. Arntzen 21a0c57cb1 i love id-strings 1999-09-15 11:09:32 +00:00
Thies C. Arntzen 3491633aa0 made serialize/unserialize work with classes! (also made the code "shorter")
CHANGES:
- the serialized string now also contains the class name (was not available in PHP3)!
- when unserializing php will create a fully working object of that class again
  therby the class has to be defined when unserializing - else you get a warning!
1999-09-15 11:08:25 +00:00
Stig Bakken 093e9f5e97 add LIBOBJS, used by AC_REPLACE_FUNCS 1999-09-15 11:08:00 +00:00
Thies C. Arntzen 328d08bd63 HASH_OF is usable enough (i hate duplicating macros all over the place) 1999-09-15 09:51:20 +00:00
Stig Bakken 1740e6ee4e Clean up the strlcat/strlcpy checks. 1999-09-15 09:35:20 +00:00
Andi Gutmans 36101a55ad - Leave this for now. 1999-09-15 05:44:59 +00:00
Andi Gutmans 100148168a - Thread-unsafe win32 compiles again
- Some strlcpy changes including one bug fix.
1999-09-15 05:42:36 +00:00
Andi Gutmans 0a7fc83253 - gettimeofday wasn't registered. 1999-09-15 05:08:45 +00:00
Andi Gutmans 0b601a7bea - Another small one. I'll leave the rest for now... 1999-09-14 20:15:32 +00:00
Andi Gutmans 37d7b91d48 - First go at using strlcat(). 1999-09-14 20:12:46 +00:00
Andi Gutmans 6a836bee6f - Support strlcpy/strlcat in windows. 1999-09-14 20:02:47 +00:00
Andrey Hristov 870a6679ff - Updated bundled PCRE library to version 2.08
- Made it possible to specify external location of the PCRE library
- Reworked PCRE extension to use updated PCRE library API

Hopefully now everything behaves just like Perl..
1999-09-14 19:24:37 +00:00
Andi Gutmans 61a3c147c3 Add strlcpy/strlcat to the build process 1999-09-14 19:12:57 +00:00
Uwe Steinmann 4b6328e052 - fixed memory leaks in pdf_open_memory_image() and pdf_add_bookmark() 1999-09-14 14:47:14 +00:00
Thies C. Arntzen cdd360043e forgot 1999-09-14 14:18:57 +00:00
Thies C. Arntzen da599af7cb is_array & friens speedups 1999-09-14 14:18:18 +00:00
Rasmus Lerdorf 0fd0323956 Fix a warning 1999-09-14 14:09:57 +00:00
Thies C. Arntzen 41da939988 count() now uses the new getParamertersEx API. 1999-09-14 13:34:27 +00:00
Thies C. Arntzen ac1a484c84 i'm sure this was left-over debugging code! 1999-09-14 13:32:54 +00:00
Thies C. Arntzen 598aaba8ca you can now position when doing lob-writes. 1999-09-14 12:41:00 +00:00
Andi Gutmans 331221eec6 - X-* is probably more standard. 1999-09-13 20:03:56 +00:00
Stig Bakken 809198b916 Added PHP_WITH_SHARED for checking "shared,*" prefix when configuring
extensions.
1999-09-13 17:17:51 +00:00
Thies C. Arntzen 95303a4bb2 added Metaphone support 1999-09-13 15:48:32 +00:00
Thies C. Arntzen c2042b1561 got rid of the define-callback stuff there's a bug in oracle-oci8! 1999-09-13 15:19:29 +00:00
Andrey Hristov 93c35c3352 Per Stig's suggestion. 1999-09-13 14:15:22 +00:00
Thies C. Arntzen c21663b3e7 ported $lob->savefile($filename) method from PHP3 1999-09-13 11:49:07 +00:00
Stig S. Bakken af1e5ad881 Make sure HAVE_LIBDL gets defined.
Disable more C++ tests when not configured for thread safety.
1999-09-13 11:29:44 +00:00
Thies C. Arntzen f858b6891c cleanups 1999-09-13 11:13:53 +00:00
Thies C. Arntzen d5bafdaa20 ported oci8 to use new class API
var_dump no longer tries to traverse avr->value.ht for objects but uses var->value.obj.properties instead
1999-09-13 10:52:54 +00:00
Zeev Suraski b88ef58a9f Modified phpinfo() to show the contents of arrays in HTTP_*_VARS[] 1999-09-13 01:11:41 +00:00
Zeev Suraski 3f0696dada Fix a buglet, and avoid crashing in phpinfo() (fixes an elusive legacy bug too) 1999-09-13 00:35:03 +00:00
Zeev Suraski b2c0acb9ec - Rewrote the GET/POST/Cookie data reader to support multi-dimensional
arrays! (Zeev)

This still needs a lot of more testing, but it seems to work more or less.
1999-09-12 23:51:12 +00:00
Zeev Suraski ce5a09ea40 Add PHP-Version header in IIS 1999-09-12 21:07:53 +00:00
Zeev Suraski 9e3315799c That's important enough to be cached 1999-09-12 20:36:48 +00:00
Zeev Suraski 5f1793e21c Make this class instanciatable 1999-09-12 19:27:50 +00:00
Sascha Schumann c656292b96 check for c++ only, if thread safety is enabled 1999-09-12 14:14:34 +00:00
Sascha Schumann 96559e91fe use static buffer for URLs instead of allocating/freeing memory
for each one
1999-09-12 13:03:10 +00:00
Sascha Schumann ac524d4b94 calculate length of cookie string correctly 1999-09-12 12:27:11 +00:00
Sascha Schumann 2e844a0799 add missing result msg 1999-09-12 12:20:59 +00:00
Sascha Schumann 691881a505 move session URL stuff to the last place before SAPI takes over 1999-09-12 11:36:45 +00:00
Sascha Schumann f2ff18e71e These shouldn't be here 1999-09-12 10:25:26 +00:00
Andi Gutmans d5968b8f21 - Oops 1999-09-12 09:57:51 +00:00
Andi Gutmans da973fe6bf - Make it compile on Win32 1999-09-12 09:55:53 +00:00
Zeev Suraski a1784083e9 Time to do that - rename the output layer prefix 1999-09-12 03:25:02 +00:00
Zeev Suraski 5a6b8653b9 *** empty log message *** 1999-09-12 03:08:29 +00:00
Sascha Schumann 036cc83ed6 expand version number 1999-09-12 00:45:38 +00:00
Sascha Schumann 3a9f68eb11 update 1999-09-12 00:44:08 +00:00
Andrey Hristov b203fb3481 Reverting to previous state. 1999-09-12 00:32:22 +00:00
Sascha Schumann 276c815f04 update macro 1999-09-12 00:31:23 +00:00
Andrey Hristov 0ac98aa95a Use global symbol table instead.. 1999-09-12 00:07:10 +00:00
Andrey Hristov 0c3ada7dd4 Use TRANS_SID macro for selective compilation.. 1999-09-12 00:05:45 +00:00
Andrey Hristov d8fc73b5c4 - Fixed mem leak when undefined variable was passed in for serialization
- Made it properly serialize object properties
1999-09-12 00:04:29 +00:00
Sascha Schumann 9531846163 add rule for url_scanner.c 1999-09-12 00:00:44 +00:00
Sascha Schumann b0f01a4778 - add standard disclaimer
- regenerate scanner with re2c -s
1999-09-11 23:53:40 +00:00
Sascha Schumann f040ce584d add transparent session id propagation
this uses a custom scanner which detects relative URIs and changes
  them appropiately.
  must be explicitly enabled with --enable-trans-sid
  (normal case is not affected, since session_adapt_uris defaults to
   void statement. Compiler should eliminate dead code in output.c then.)
1999-09-11 23:47:16 +00:00
Andrey Hristov 9706aa1daa - Added session_unset() function
- Fixed double session globals shutdown crash
- Added warning when session_destroy() is called without session_start()
1999-09-11 22:31:04 +00:00
Andrey Hristov 99caa5d43b Use OnUpdateBool for Boolean entries. 1999-09-11 20:36:47 +00:00
Sascha Schumann 2f39b484f5 avoid mmap overhead for small files 1999-09-11 18:38:34 +00:00
Sascha Schumann dda0b783df optimize fpassthru/readfile to use mmap instead of fread
which especially increases speed on large files.
1999-09-11 18:15:39 +00:00
Sascha Schumann 533ef3988b - support for external entropy sources
- extern_referer_chk => extern_referer_check
- kill a warning in mod_files.c
1999-09-11 17:20:31 +00:00
Zeev Suraski 7afbcb4fef Rename allow_builtin_links to expose_php 1999-09-11 16:32:08 +00:00
Zeev Suraski 27afe4e49b More cleanup 1999-09-11 16:16:16 +00:00
Zeev Suraski 7f42813ad8 Except for this small bug fix - it works 1999-09-11 15:36:00 +00:00
Zeev Suraski 15fee4d3a6 - Seriously optimize and clean php_parse_gpc_data()
- Added gpc_globals directive to turn global definitions of GPC variables on/off
(untested)
1999-09-11 15:04:45 +00:00
Zeev Suraski 1b6ccfe86c Cleanups & optimizations 1999-09-11 14:09:29 +00:00
Zeev Suraski fb910c64cd Cleanups 1999-09-11 13:44:23 +00:00
Sascha Schumann 177341f899 Move Linux check => more general --version-script check 1999-09-10 23:36:04 +00:00
Sascha Schumann b5c6dfdd0c add info about php3/php4 apache modules 1999-09-10 23:22:16 +00:00
Sascha Schumann 494defe52b tweak the INSTALL document a little bit 1999-09-10 22:55:32 +00:00
Sascha Schumann 9ae2115123 pass flag correctly to linker 1999-09-10 22:05:58 +00:00
Sascha Schumann 7cb18f7109 - better use of scoping
- support Solaris 2.x
1999-09-10 21:51:17 +00:00
Andrey Hristov b87e105411 Workaround for m4 weirdness. 1999-09-10 18:53:55 +00:00
Mark Musone b147536a10 lets not go down that road..were onyl going to use the internal event structure. No passing objects 1999-09-10 18:25:19 +00:00
Mark Musone 75b03f5f72 wrong preprocessor command 1999-09-10 18:21:41 +00:00
Mark Musone c8f88a0c0b ported the php3 stuff to php4. This module should work intechangably between the two versions also 1999-09-10 18:15:29 +00:00
Zeev Suraski d7357c0649 *** empty log message *** 1999-09-10 16:27:13 +00:00
Zeev Suraski ca1b3ffbc8 Shut up a warning 1999-09-10 16:16:24 +00:00
Uwe Steinmann 055472d3b4 - wrong use of php_print corrected 1999-09-10 05:23:02 +00:00
Zeev Suraski 2f9260fe4c Lost functionality in earlier fix... That should really work. 1999-09-10 02:59:37 +00:00
Zeev Suraski 7dc2579bfe That should do the trick (untested) 1999-09-10 02:55:28 +00:00
Mark Musone f2b3c3c2f6 my bad, sorry 1999-09-10 02:47:49 +00:00
Mark Musone 63243be5ac fixed memory leak 1999-09-10 02:37:46 +00:00
Andi Gutmans 22f066e708 - Add foreach() freeing code.
- Fix switch() freeing code to only free current function's switch expressions.
- I have a feeling break expr; in a switch where expr > 1 leaks because it
  won't free all of the expressions. Fix is probably not trivial.
1999-09-09 14:15:17 +00:00
Andi Gutmans 7567b96c22 - Add mcal to TS project. It seems that mcal needs to be patched a bit in
order to work TSRM. Right now it has globals.
1999-09-09 13:00:07 +00:00
Andi Gutmans f0a988a26a - Fix leak when decrementing strings which actually are longs. 1999-09-09 12:59:09 +00:00
Uwe Steinmann ca4005f623 forgot to change prototype 1999-09-09 06:41:15 +00:00
Uwe Steinmann 6bcb8eb1be pdf_setfont got optional parameter to embed fonts 1999-09-09 06:19:01 +00:00
Andi Gutmans 67daaa7aac - Fix for floating point array offsets. Same behaviour as in PHP 3.0. We
casted to (long).
1999-09-08 20:38:08 +00:00
Andrey Hristov 42e39d474b Remove extraneous debug dlerror() call which results in the subsequent
dlerror() returning NULL.
1999-09-08 19:36:18 +00:00
Andi Gutmans afecff3aa4 - Add -b option to flex++ 1999-09-08 17:16:22 +00:00
Gergely Madarász d4b10839b3 remove -Wl,--version-script from RPATHS, put it into a separate
variable
1999-09-08 14:31:57 +00:00
Danny Heijl 558d287af9 Be consistent. 1999-09-08 14:09:05 +00:00
Uwe Steinmann 66a636a6ae - add posibility to specify how objrec to objarr conversion
is performed (not ready yet)
1999-09-08 12:29:13 +00:00
Sascha Schumann b43cf1a583 add versioning support 1999-09-08 12:26:31 +00:00
Jakub Skopal bb4bc40cf9 Correct compiler warning. 1999-09-08 11:53:16 +00:00
Andi Gutmans e4e39b8263 - Update non-threadsafe project file 1999-09-07 20:42:20 +00:00
Andi Gutmans 48ab0fb57d - Fix warnings and win32 compile 1999-09-07 20:29:31 +00:00
Andrey Hristov 6101d108e0 Here you go, Egon. 1999-09-07 19:41:28 +00:00
Stefan Roehrich 06362129fa Fixed behavior with empty doc_root.
gzgetss() now uses _php3_strip_tags.
1999-09-07 19:05:37 +00:00
Stig Bakken 5c40e7c41e Add thread-safety notice here. The solution is using gethostbyname_r,
but it seems that it takes different parameters on Solaris and
Linux. ;-P We should probably make a wrapper function, and make a
configure test that checks if there is a reentrant version available,
and if not protect gethostbyname and similar calls with a mutex until
the results have been copied.  Ugly.
1999-09-07 18:46:25 +00:00
Andrey Hristov 7aacff63c9 Added second parameter to array_keys() which allows returning keys
only for a specific value in an array.
1999-09-07 18:29:59 +00:00
Andrey Hristov cff218cf54 Kill compiler warning. 1999-09-07 18:26:36 +00:00
Andrey Hristov d6c9c23ff5 Shut up, CVS. 1999-09-07 16:09:48 +00:00
Andrey Hristov 209fe717b1 Kill warnings. 1999-09-07 16:09:18 +00:00
Uwe Steinmann 51b01ca9b7 - uniqid() used the additional parameter even if it was not provided
this caused an segm fault. fixed it.
1999-09-07 10:34:17 +00:00
Stig S. Bakken 928863f85b define tests first, use after. 1999-09-07 09:02:41 +00:00
Zeev Suraski 959ad0e9ea A couple of BoundsChecker fixes 1999-09-06 22:40:27 +00:00
Andi Gutmans 4bc3097e6f - Fix win32 compile 1999-09-06 20:43:35 +00:00
Andi Gutmans f1afd5796c - Should fix Win32 compile 1999-09-06 20:43:25 +00:00
Andi Gutmans a0bad70bd1 - Make zend compile again in Win32. 1999-09-06 20:33:40 +00:00
Egon Schmid f0f7b9de53 File should here be string. 1999-09-06 20:13:23 +00:00
Danny Heijl c7cdb687da Forgot to update ChangeLog 1999-09-06 19:24:47 +00:00
Stefan Roehrich e4b7bf4ae8 Removed remaining PHP_31 defines.
First try with ZTS support, can someone with a working ZTS enabled setup test this, please?
1999-09-06 19:09:47 +00:00
Gergely Madarász 8ee14c990b Enabled shared build of gd module 1999-09-06 16:50:11 +00:00
Stig S. Bakken 2829eaeee8 ignore zend-scanner.cc 1999-09-06 16:15:52 +00:00
Stig S. Bakken 623406cf2b hand-patched some MSVC files 1999-09-06 16:15:27 +00:00
Stig S. Bakken 009025e00d * header file cleanup
* fixed --enable-thread-safety build for UNIX

I don't have a Win32 environment available, could someone please try
compiling on Win32 to see if I got all the header file stuff right there?
1999-09-06 16:14:08 +00:00
Stig S. Bakken 4d5491e285 Workaround to prevent TSRM from defining PACKAGE and VERSION.
No longer using autoheader.
1999-09-06 15:32:19 +00:00
Danny Heijl dad0716e37 - "Resourcified" the Informix driver. 1999-09-06 13:55:43 +00:00
Stig Bakken af2dca818c untabified 1999-09-06 13:35:37 +00:00
Jakub Skopal a38995a832 Workaround for crypt() getting too few characters for salt. 1999-09-06 13:24:36 +00:00
Stefan Roehrich 93252bd556 Fixed prototype. 1999-09-06 08:59:48 +00:00
Zeev Suraski f3e63d9e71 Fix the 4.0 tree (forgot to commit) 1999-09-06 05:21:45 +00:00
Jakub Skopal cb25b1222e Corrected the argument-list for getopt. -c expects argument. 1999-09-06 01:33:13 +00:00
Jakub Skopal 5cc16d86b0 Added addcslashes(), stripcslashes().
Reverted addslashes() to the very original behaviour.
1999-09-05 20:55:13 +00:00
Sascha Schumann 8aa0c92bc6 fix warning 1999-09-05 19:59:28 +00:00
Andi Gutmans 7ebbe20fb0 - Should fix short_tags and co. problem. 1999-09-05 19:49:54 +00:00
Andi Gutmans 2807ba18e1 - Oops 1999-09-05 19:37:24 +00:00
Andi Gutmans 52cb8bb275 - Make Win32 compile once again. 1999-09-05 19:36:04 +00:00
Andi Gutmans 14d9a59f1c - Make dir functions compile in Win32
- Fix too early memory manager initialization (For you Thies)
1999-09-05 19:04:40 +00:00
Andi Gutmans 99947a251e - Shift around header files. 1999-09-05 19:03:35 +00:00
Stefan Roehrich 5bcc067687 Find debian umich-ldap libraries/include files. 1999-09-05 16:28:16 +00:00
Andreas Karajannis dd509608a1 Changes for updated odbc module 1999-09-05 13:06:24 +00:00
Andreas Karajannis 361a09e5fa Renaming odbc files 1999-09-05 13:03:22 +00:00
Andreas Karajannis 8a7d806054 New resource handling for odbc module 1999-09-05 13:01:42 +00:00
Sascha Schumann 5a2189f3d3 work around gcc bug, otherwise compiler would die with
toplev.c:2261: Internal compiler error in function float_signal

in basic_functions.c
1999-09-05 11:38:01 +00:00
Andi Gutmans 04b0bc4c70 - php_error(E_ERROR,...) won't ever return so change the connection_status
before it is called.
1999-09-05 05:15:42 +00:00
Jakub Skopal 8c2f752c3d C++ comment fix... sorry. 1999-09-05 00:58:59 +00:00
Jakub Skopal 06545c3364 Appended second argument of addslashes(),
Changed php_addslashes() to add \000 instead of just \0
1999-09-05 00:55:48 +00:00
Rasmus Lerdorf bcb0020705 Forgot one 1999-09-04 22:18:43 +00:00
Rasmus Lerdorf f42659a8f1 Kill a warning 1999-09-04 22:15:51 +00:00
Zeev Suraski ce4e09daff This was actually intentional... put it back in and improve 1999-09-04 22:13:41 +00:00
Rasmus Lerdorf 54ec3a8e2f Cleanups
What the heck was that dangling (c) for in the PUTC macros?  Were they
supposed to serve some sort of purpose, because I sure don't see one for
them.
1999-09-04 22:06:12 +00:00
Zeev Suraski 7d33215124 Fix a stupid bug (from stefan@roehri.ch) 1999-09-04 21:58:51 +00:00
Stefan Roehrich fcd55e03cb First try with new resource handling in zlib module. 1999-09-04 21:51:54 +00:00
Rasmus Lerdorf 045aaef644 Oops, set_time_limit() would never have worked becase HAVE_SETITIMER
never got defined anywhere.
1999-09-04 21:33:18 +00:00
Rasmus Lerdorf 56b75920b4 Oops 1999-09-04 21:16:41 +00:00
Rasmus Lerdorf d3439023d3 Catch a timeout and add user-level interface for connection handling 1999-09-04 21:10:39 +00:00
Rasmus Lerdorf 82d975d671 Might as well bail as soon as we know we should since this is now
possible.  We still need to set our connection status bit field so a
shutdown function can figure out if a script was terminated due to an
abort, timeout or finished normally.
1999-09-04 20:37:24 +00:00
Rasmus Lerdorf 0bede914ab First part of the connection_status work. No user-callable functions
yet.  That is coming next.  Have also only done Apache and CGI so far.
Will have to crack open my ISAPI book to do that one.

Also changed the SAPI output functions to return an int.  We'll check
the connection status inside each one, but we might need the return
code at some other level and I don't see a good reason for just tossing
these return codes.
1999-09-04 20:12:47 +00:00
Andrey Hristov 8e9cd1e4ae Oops, don't need those commented out blocks. 1999-09-04 19:09:37 +00:00
Andrey Hristov 3af5f84c9d Kill compiler warnings. 1999-09-04 19:08:19 +00:00
Andrey Hristov ef943e75a5 Conform to new resource handling guidelines. 1999-09-04 19:07:57 +00:00
Zeev Suraski c12d4bc7d4 *** empty log message *** 1999-09-04 13:18:59 +00:00
Zeev Suraski 6d4ab7372d Add resource support to the Sybase CT module 1999-09-04 13:03:09 +00:00
Sascha Schumann 62fc17983a First try at WDDX serializer
(not active currently)
1999-09-04 11:25:43 +00:00
Zeev Suraski 81301ad2a9 A few fixes 1999-09-04 11:05:34 +00:00
Sascha Schumann 7e70c1ad91 cleanup 1999-09-04 08:33:31 +00:00
Sascha Schumann c49cdc9a64 remove superflicious enumaration 1999-09-04 08:21:36 +00:00
Sascha Schumann 7796f4d995 bail out, if ps_mm_instance wasn't initialized correctly
(should take place in global startup)
1999-09-04 08:21:09 +00:00
Sascha Schumann 7e50dda96b implement single directory garbage collector 1999-09-04 08:20:43 +00:00
Zeev Suraski 43523e9854 Update the mSQL module with the latest tech 1999-09-04 00:37:31 +00:00
Zeev Suraski 63b272998c Damn, forgot to commit that 1999-09-03 23:54:41 +00:00
Zeev Suraski 0d66693cc3 *** empty log message *** 1999-09-03 23:40:44 +00:00
Andrey Hristov 5e4a85f2e3 Static is good... 1999-09-03 21:12:10 +00:00
Zeev Suraski 3160cab22b Final MySQL tweaks 1999-09-03 19:54:12 +00:00
Danny Heijl a9fd483aff - backed out IS_RESOURCE stuff in favour of old php3-style IS_LONG
for now. This makes the Informix driver work again.
1999-09-03 19:50:14 +00:00
Zeev Suraski 90f67c6245 More cleanups 1999-09-03 19:37:46 +00:00
Zeev Suraski d7d966f7c6 Use the new API for resources in MySQL 1999-09-03 19:13:37 +00:00
Zeev Suraski 3feb4b3bdd Add new API for resources 1999-09-03 19:12:07 +00:00
Stefan Roehrich c1a4861eb1 Added detection of Oracle 8.1 (aka 8i) from PHP3. 1999-09-03 19:04:35 +00:00
Andrey Hristov f72897c29d Practice what you preach, I guess. 1999-09-03 19:01:19 +00:00
Sascha Schumann 3e591dabbd Add global startup/shutdown functions in Win32 version as well 1999-09-03 18:33:30 +00:00
Sascha Schumann 8e8d923fea Add prototypes for new functions in internal_functions.c.in 1999-09-03 18:32:34 +00:00
Sascha Schumann 5b293ecd4d - add global startup/shutdown handlers
- improve genif.sh to also consider all header files for inclusion
  (checks for phpext_)
- use vsnprintf in main.c to avoid buffer overflows
- improve sessions's mm module to cope better with OOM situations
  within the shared memory segment
- fix typo wrt session.auto_start
1999-09-03 17:46:39 +00:00
Sascha Schumann 690575e51f Add global startup/shutdown functions 1999-09-03 17:43:10 +00:00
Sascha Schumann 331823337c Makefile.in and other generated do not belong under CVS control 1999-09-03 17:41:58 +00:00
Gergely Madarász bc53807a17 Enabled shared build of mysql module 1999-09-03 17:13:53 +00:00
Gergely Madarász 9a17e7b6f5 Small cleanup 1999-09-03 16:37:00 +00:00
Gergely Madarász d447d17602 Enabled shared build of snmp module 1999-09-03 16:04:28 +00:00
Zeev Suraski 18d11eea40 Revert the IS_RESOURCE patch. It had some unintended behavior. 1999-09-03 15:22:04 +00:00
Gergely Madarász 94bc5f6c55 Enabled shared build of pgsql module 1999-09-03 14:58:51 +00:00
Andrey Hristov f8d9ef14b5 Fixed resource handling to conform to PHP4 guidelines. 1999-09-03 14:17:10 +00:00
Uwe Steinmann 303558e6cf - complete rewrite of object to array conversion 1999-09-03 10:21:55 +00:00
Zeev Suraski ee56524324 Version update 1999-09-03 08:26:13 +00:00
Zeev Suraski 276c876171 - Fixed several problems with output buffering and HEAD requests (Zeev)
- Fixed HTTP Status code issue with ISAPI module (Zeev)
1999-09-03 02:39:36 +00:00
Zeev Suraski 69fa5199bc Let $GLOBALS actually work... 1999-09-03 01:34:52 +00:00
Zeev Suraski 2521b5550a *** empty log message *** 1999-09-03 00:18:52 +00:00
Zeev Suraski 7b083fe5d1 Release resources when converting to other types (fix Thies's reported problem) 1999-09-03 00:11:47 +00:00
Zeev Suraski a3f77686ef Use \0NameFilenameLineno as key instead of numeric index for runtime defined functions 1999-09-02 21:06:05 +00:00
Stig Bakken 1bce4ebfd8 clean up library naming 1999-09-02 18:22:07 +00:00
Thies C. Arntzen 9e959a0b8a newest GetImageSize renamed header-file 1999-09-02 11:58:23 +00:00
Andi Gutmans 5b52d07ea6 - Small fix but it's important for people to know when B3 is released. 1999-09-02 04:26:48 +00:00
Mark Musone ed74428ca1 Added mcal module 1999-09-01 20:30:27 +00:00
Andi Gutmans b6789ae332 - Add sessions module to standard win32 build. 1999-09-01 19:28:07 +00:00
Andrey Hristov 7894c0cc1a Fix lcg.h location. 1999-09-01 14:20:15 +00:00
Uwe Steinmann 26415d0465 - Group-attribute may now appear multiple times in objrec record. 1999-09-01 06:15:46 +00:00
Stig Bakken 4092f4b8c0 ext/lcg -> ext/standard in various places 1999-08-31 18:05:22 +00:00
Stig Bakken b5375a323d oops 1999-08-31 15:57:30 +00:00
Thies C. Arntzen fb981b9650 we need DEFS when compiling this dir 1999-08-31 15:42:12 +00:00
Stig Bakken 788b25ccf8 fix for bug #2165 1999-08-31 15:39:13 +00:00
Stig Bakken b55d490ef0 fix for bug #2191 1999-08-31 15:27:31 +00:00
Stig Bakken 0e5f26c6bb compat fix, bug #2201 1999-08-31 15:20:21 +00:00
Thies C. Arntzen e8e88afd11 "fix" for #2202 1999-08-31 13:10:55 +00:00
Andreas Karajannis 125da02aa7 Add support for unixODBC 1999-08-30 10:48:23 +00:00
Stig Bakken 5600f889b2 moved lcg stuff to ext/standard 1999-08-29 20:12:12 +00:00
Sascha Schumann 869eeb62f4 PATH_TRANSLATED was not used at all, even if one comment implied
it should be used. After adding this, the CGI version works for me
w/ Apache + suexec
1999-08-29 18:25:37 +00:00
Egon Schmid 621fe70048 This one was nonesense. 1999-08-29 15:07:54 +00:00
Egon Schmid db44261039 Missing return type. 1999-08-29 15:00:18 +00:00
Egon Schmid 2c0b8b5ac8 Oops, file should be string here. 1999-08-29 09:59:12 +00:00
Rasmus Lerdorf 7c08c88a87 This check actually doesn't make a whole lot of sense. We need
something here, but if a mod_auth_* module declines, the type is
still set.  So, we need a check to see if there have been a
non-declined auth hook previously for this request.  I will ponder
a good approach to this.
1999-08-28 23:30:37 +00:00
Zeev Suraski a27ed294df Add -d switch 1999-08-28 23:06:07 +00:00
Zeev Suraski 3a52ee44f5 *** empty log message *** 1999-08-28 21:51:12 +00:00
Zeev Suraski 81e0131bc9 *** empty log message *** 1999-08-28 21:43:24 +00:00
Philippe Verdy ce6db81dce semicolon syntax error 1999-08-28 17:01:32 +00:00
Philippe Verdy 1dcee0c840 Bug in gmmktime():
it produced wrong results in New Foundland,
Central Australia, India, Iran, and Java, with
half-hour timezones.
1999-08-28 16:19:14 +00:00
Sascha Schumann 053712c95d when "track_vars" is disabled and a script which contains <?php_track_vars?> is
accessed for the first time, track vars were not created properly.
1999-08-28 14:00:44 +00:00
Sascha Schumann 52cd153723 merge in fix from php3 1999-08-28 13:53:46 +00:00
Zeev Suraski 4628f3021b New relay code 1999-08-28 11:17:28 +00:00
Sascha Schumann 563cb21539 If we stick to this style, parsing becomes easier (for humans and computers). 1999-08-28 10:31:54 +00:00
Zeev Suraski cda27ae9ac Beef up debug macros 1999-08-28 10:18:54 +00:00
Zeev Suraski 023cb6474b Fix a crash bug in case of aborted execution 1999-08-27 21:21:04 +00:00
Sascha Schumann 49824ee8cb - fix potential buffer problem in send_cookie
- fix gc probability algorithm
- don't access mod_data directly
- initial version of mm support for session data storage

  This works pretty good, but we need to create the initial mm pool
  from the parent process/thread. Still looking for a clean way to do that.
1999-08-27 21:03:22 +00:00
Zeev Suraski aa8b27ba1d Better debug macros 1999-08-27 19:17:19 +00:00
Andreas Karajannis 9eea00c086 Typo fix 1999-08-27 08:46:23 +00:00
Zeev Suraski f681b37c7b *** empty log message *** 1999-08-27 04:51:49 +00:00
Zeev Suraski afb0c684dc Tiny fixes 1999-08-27 04:39:19 +00:00
Zeev Suraski 1dadb97552 Log date&time on script logs 1999-08-27 04:31:53 +00:00
Mark Musone 6821da54f8 lets not make global functions unless we need to..actually this should be taken out someday 1999-08-27 04:22:39 +00:00
Mark Musone a92788ddd9 cleand up storing new events 1999-08-27 04:21:47 +00:00
Rasmus Lerdorf 8ccce347a3 Missing return types in prototypes 1999-08-26 14:13:14 +00:00
Andrey Hristov e0166ebc06 shut up CVS 1999-08-26 13:27:26 +00:00
Andrey Hristov aa147184ba *** empty log message *** 1999-08-26 13:26:57 +00:00
Andrey Hristov 1a218328da Fix for #2161 1999-08-26 13:25:53 +00:00
Andi Gutmans 02822cbc33 - Damn. It wasn't a correct fix. This should do it.
When the zval ** are equal we don't want to assign_ref, in any other case
  I can think of we do want to assign_ref.
1999-08-26 07:33:53 +00:00
Andi Gutmans 2c88f2950c - Fix leak when global is used in the global scope. 1999-08-26 07:26:15 +00:00
Andi Gutmans f297719cdb - Make Win32 compile again. 1999-08-26 06:49:42 +00:00
Andi Gutmans 1bfb1f7958 - Fix when redefining classes at run-time. 1999-08-26 06:47:45 +00:00
Sascha Schumann 8b44285b90 make it compile with gcc again 1999-08-25 21:54:00 +00:00
Andi Gutmans 746ce67b66 - Add hash_apply_with_arguments() 1999-08-25 19:02:13 +00:00
Sascha Schumann 3b408ce516 . 1999-08-25 16:58:01 +00:00
Sascha Schumann 33ed504ef4 AIX wants the value, not the pointer to the value.
Fixes #2149
1999-08-25 16:53:57 +00:00
Andi Gutmans 7a9ad9d0c8 Make fopen() work with URL's in Win32 1999-08-25 16:24:14 +00:00
Andi Gutmans c5d640d8af - More elegant fix for Win32 include_path 1999-08-25 13:46:52 +00:00
Andi Gutmans f065529b6d - Fix for include_path for Win32 (Zend library) 1999-08-25 12:22:45 +00:00
Andi Gutmans c7f7b1c3d6 - Temporary fix to allow Win32 MT safe version to use zend_fopen(). 1999-08-25 12:20:50 +00:00
Zeev Suraski 7e250d06f5 Add output_buffering directive 1999-08-24 23:12:50 +00:00
Mark Musone d8a322e7be argh..Finally 1999-08-24 20:56:02 +00:00
Sascha Schumann 9aea8d5bdc suppress error exit status on non Rhapsody systems 1999-08-23 23:02:09 +00:00
Sascha Schumann d9bf422f12 don't print out error message 1999-08-23 22:43:18 +00:00
Sascha Schumann a05e8e7a75 malloc.h is deprecated, use stdlib.h instead 1999-08-23 19:43:01 +00:00
Andi Gutmans 48a8b14a47 - Fixed a specific memory leak linked to locking. 1999-08-23 19:02:28 +00:00
Mark Musone 196b2350f4 changed to use the new, soon to be public libicap 0.99 1999-08-23 17:19:06 +00:00
Sascha Schumann 0e43d751ea return true to match documentation 1999-08-23 15:37:11 +00:00
Sascha Schumann d82728c4d0 This changes makes it work on egcs 1.1.2/Alpha 1999-08-22 19:43:04 +00:00
Andi Gutmans d13f6d754f - Add lcg to windows project. 1999-08-22 19:19:42 +00:00
Sascha Schumann 306c8a7fc8 . 1999-08-22 18:48:57 +00:00
Sascha Schumann 85151a61ce remove all references to RAW_RPATHs
Apache builds now correctly when shared core is used
1999-08-22 18:47:27 +00:00
Sascha Schumann 433880bc6e remove checks 1999-08-22 18:34:40 +00:00
Sascha Schumann 1dd31c38a6 - cleanup code
- add script which creates the directory tree for better scaling
  of mod_files

I have to decide yet whether we implement the garbage collection in the
module or if we simply let the user do

find path -ctime +1 | xargs rm
1999-08-22 14:14:46 +00:00
Sascha Schumann 02d6ec2a6b Use O_EXCL where possible. 1999-08-22 13:43:23 +00:00
Sascha Schumann 070dfe0833 - add session.extern_referer_chk
- use combined lcg in session id creation
1999-08-21 20:48:40 +00:00
Sascha Schumann f9b8901791 . 1999-08-21 17:34:55 +00:00
Sascha Schumann c9bb8db0ad get rid of that usleep() and add some entropy using the combined lcg 1999-08-21 17:22:08 +00:00
Zeev Suraski 6313238c63 Fix for Thies's UMR 1999-08-20 17:02:11 +00:00
Andrey Hristov e5aa4c844f *** empty log message *** 1999-08-20 13:04:05 +00:00
Andrey Hristov 01ed90ccef Fix bug #2025 1999-08-20 13:03:22 +00:00
Egon Schmid 17f132f9ee Here was also something missing 1999-08-19 20:31:57 +00:00
Mark Musone 67e81da36b *smack*...must..initialize...return...value.. 1999-08-19 19:02:22 +00:00
Uwe Steinmann c3fe95d971 On the way to make configure more robust 1999-08-19 17:07:27 +00:00
Andi Gutmans aeec4e198a - Fixed memory leaks. tsrm resource id deallocation still needs to be implemented. 1999-08-19 16:52:53 +00:00
Andi Gutmans e5fbf4414a - Make sure expr_list and echo_list are either empty or comma seperated
expressions
1999-08-19 15:15:34 +00:00
Uwe Steinmann 4747a40964 - fixed several memory leaks
- fixed broken hw_cp and hw_mv functions
1999-08-19 15:03:15 +00:00
Andrey Hristov 2bcf787a29 *** empty log message *** 1999-08-19 13:19:47 +00:00
Uwe Steinmann 7d52d5b786 missing return type 1999-08-19 06:43:44 +00:00
Rasmus Lerdorf 314f107498 TTF support tested and working now 1999-08-19 06:32:07 +00:00
Rasmus Lerdorf 7f97086631 This should fix TTF support - untested 1999-08-19 05:23:02 +00:00
Andi Gutmans fd28fec38b - Fixed typo in oci8 error message 1999-08-19 04:13:56 +00:00
Andrey Hristov c10c675f5b Fixed bug #2105 1999-08-18 17:23:01 +00:00
Chuck Hagenbuch 869c196fa0 cjh: fixing the imap_add_body crash in php4. 1999-08-18 17:19:20 +00:00
Thies C. Arntzen c1218de0d2 ZTS 1999-08-18 16:48:59 +00:00
Andrey Hristov 3f48a5524d Ported fixed for bug #2103 from PHP3. 1999-08-18 16:43:57 +00:00
Thies C. Arntzen f63da06238 ZTS fix 1999-08-18 15:40:54 +00:00
Thies C. Arntzen bed72caf06 some ZTS stuff 1999-08-18 15:39:46 +00:00
Thies C. Arntzen 9e9050a428 on unix ZTS gets defined in zend_config.h 1999-08-18 15:26:39 +00:00
Thies C. Arntzen e3aeb15678 ocifetchinto fix 1999-08-18 12:51:51 +00:00
Zeev Suraski 50bfff5502 Fix #2012 1999-08-17 22:31:45 +00:00
Zeev Suraski cd2006f8b7 Fix #2090 1999-08-17 22:06:55 +00:00
Zeev Suraski 39f6b22dae *** empty log message *** 1999-08-17 22:01:10 +00:00
Zeev Suraski 65e6d82771 Fix #2096 1999-08-17 22:00:02 +00:00
Zeev Suraski 96fd258d07 Fix #2070 1999-08-17 21:36:30 +00:00
Andi Gutmans acd6114fa7 - Add some ZENDAPI's 1999-08-17 19:25:22 +00:00
Sascha Schumann 71e3f6fde3 merge in change:
Date:   Monday June 28, 1999 @ 4:40
Author: bjh

Update of /repository/php3/functions
In directory php:/tmp/cvs-serv5697

Modified Files:
    crypt.c
Log Message:
Stop core dump using crypt() with standard DES. When PHP3_MAX_SALT_LEN = 2
adding the null terminator to the salt exceeds allocated space causing
stack corruption.
1999-08-17 18:21:04 +00:00
Sascha Schumann 52d6ab608f update 1999-08-17 18:08:37 +00:00
Sascha Schumann 1f4d09c09f HAVE_FREETYPE_H isn't defined anywhere. HAVE_LIBTTF should be sufficient 1999-08-17 18:06:39 +00:00
Sascha Schumann 4ceffd7131 fix persistency of mhash_* constants 1999-08-17 17:31:27 +00:00
Mark Musone 01b178292e dont have these library functiosn yet 1999-08-17 16:55:01 +00:00
Mark Musone b9d17aaab4 argh..heh..par for the course.. 1999-08-17 16:51:04 +00:00
Mark Musone f08430ec65 argh..bad day.. 1999-08-17 16:50:27 +00:00
Mark Musone 1d9a7c2623 please work... 1999-08-17 16:44:17 +00:00
Mark Musone 4136916e2f hrmmm 1999-08-17 15:17:01 +00:00
Mark Musone 8339e8c81d last few compile fixes 1999-08-17 15:07:22 +00:00
Mark Musone 4d738adb38 maybe it'll compile now..more php3->php4 conversions 1999-08-17 15:03:51 +00:00
Mark Musone 90e2bc1580 more changes 1999-08-17 14:41:23 +00:00
Thies C. Arntzen 3d05a0d9cc ZTS stuff 1999-08-17 14:40:28 +00:00
Mark Musone 0e1db64f8d thanks Andrey! 1999-08-17 14:31:39 +00:00
Sascha Schumann ba78cb9c53 fix flushing cached information to disk 1999-08-17 14:18:27 +00:00
Thies C. Arntzen f93ce67426 cleanups & ZTS stuff (ZTS untested!) 1999-08-17 13:54:25 +00:00
Thies C. Arntzen e30a2740cf imported diskfreespace from 3.0 1999-08-17 12:32:23 +00:00
Uwe Steinmann a5a5902fbc fixed potential segm faults 1999-08-17 09:59:19 +00:00
Andrey Hristov a0bf6b0923 Removed internal pointer reset from array_walk. 1999-08-16 14:19:49 +00:00
Philippe Verdy 236d54114c make pcre test program compile again with Zeev's
additions in the pcre_exec() function parameters
1999-08-15 23:52:37 +00:00
Andi Gutmans a08dc937c7 - Oopsie 1999-08-15 19:38:10 +00:00
Andi Gutmans b5f5e9a6d1 - Optimize the execute stack a bit. 1999-08-15 19:29:39 +00:00
Thies C. Arntzen 94ce166244 added a few PLS_FETCH() 1999-08-15 18:52:10 +00:00
Zeev Suraski 4e33a1d677 Close bug #1742 1999-08-14 16:52:28 +00:00
Andrey Hristov 796c4a021a *** empty log message *** 1999-08-14 16:45:51 +00:00
Andrey Hristov c85209985a Forgot to have internal pointer reset. 1999-08-14 16:43:38 +00:00
Danny Heijl f12728f13e more of the new ini stuff 1999-08-14 15:30:48 +00:00
Zeev Suraski 96d4220a5d Fix several class issues 1999-08-14 12:54:17 +00:00
Zeev Suraski ef5b7e212d Generate better warnings for class/function redefinitions 1999-08-14 11:50:36 +00:00
Zeev Suraski 2560bfd5f9 Rename TestClass to OverloadedTestClass 1999-08-14 11:08:26 +00:00
Zeev Suraski 55a6c270dd Fix thread unsafe version 1999-08-14 10:04:04 +00:00
Andi Gutmans 7145d1a21a - Make the non-threadsafe version compile again 1999-08-14 09:55:43 +00:00
Zeev Suraski 25829488c4 Add new-thread handlers 1999-08-14 09:35:52 +00:00
Zeev Suraski 58e24ac18a - Add PHP Modules workspace
- Get the MySQL module to compile&work under thread-safe Win32
- Fix various thread safety issues with dynamic modules
1999-08-13 21:03:27 +00:00
Andrey Hristov 5ae3f32b24 Fixed bug #2023. 1999-08-13 20:28:27 +00:00
Sascha Schumann e8f465f3d4 rerun checks if buildconf is newer than the time stamp file 1999-08-13 11:57:40 +00:00
Zeev Suraski 5fbe27828b Separate Sybase-CT from Sybase, and fix build process for Sybase-CT 1999-08-13 00:14:17 +00:00
Uwe Steinmann d13824b0bc fixed unresolved symbol pdf_open_memory_image when pdflib 2.01 is used 1999-08-12 17:45:01 +00:00
Philippe Verdy 2d3ef1b8ae no return warning removed. fixed TSRM constructor prototype 1999-08-12 11:05:43 +00:00
Philippe Verdy 646db4f072 signed/unsigned warning removed 1999-08-12 10:53:29 +00:00
Philippe Verdy 443b99805e Bison generated files 1999-08-12 10:49:04 +00:00
Uwe Steinmann d4346da6cb config for pdf module should now be similar to php3 1999-08-12 06:23:28 +00:00
Mark Musone e6241dc703 whoops, forgot to actually return the alarms :^) 1999-08-11 19:56:18 +00:00
Uwe Steinmann 205309f1c1 slight changes to config of pdf module 1999-08-10 17:07:00 +00:00
Andi Gutmans 28f9dc6e56 - Got rid of the C++ comments. 1999-08-10 15:43:32 +00:00
Stig Bakken 50f0a1b5d8 Makefile.in should not be added to CVS 1999-08-10 15:23:00 +00:00
Thies C. Arntzen 269785f95e starting to clean up 1999-08-10 14:33:59 +00:00
Thies C. Arntzen 63931ff4e8 you can now override the CFLAGS while doing make - eg:
make CFLAGS="-g"
1999-08-10 09:16:19 +00:00
Mark Musone 0076374125 more ports 1999-08-09 22:02:42 +00:00
Mark Musone f0552d929f ports to php4 1999-08-09 21:39:29 +00:00
Mark Musone c356371437 more moudle stuff 1999-08-09 21:34:52 +00:00
Mark Musone fdc253e99d added icap files from php3 sources 1999-08-09 21:22:11 +00:00
Egon Schmid 8588b58a5e More typos. 1999-08-09 20:52:58 +00:00
Egon Schmid 17bd995568 I missed that also. 1999-08-09 20:18:00 +00:00
Egon Schmid d8ad991022 Another typo. 1999-08-09 20:06:15 +00:00
Zeev Suraski 4bfcb29c46 that too 1999-08-09 18:33:22 +00:00
Andi Gutmans c791d60ad9 Go beta 2 (final) 1999-08-09 18:29:40 +00:00
Andi Gutmans 3516ee485a Fix HTTP/ header handling 1999-08-09 17:40:28 +00:00
Andi Gutmans 11781bdaa8 - Thies's crash fix. 1999-08-09 16:39:13 +00:00
Andreas Karajannis da536e8a32 Fixed odbc_fetch_into, added prototype return values.
Pconnects are not working
1999-08-09 16:35:47 +00:00
Thies C. Arntzen 5d2206d3af fixed sysv_shm* 1999-08-09 15:03:09 +00:00
Uwe Steinmann 3d8bd038d2 add changelog entries which I forget a couple of days ago 1999-08-09 08:39:28 +00:00
Philippe Verdy 26b123b7f9 solve infinite recursion error when including <signal.h> 1999-08-08 17:42:12 +00:00
Andreas Karajannis daa7982110 First shot at odbc for PHP4
Problems with LONGs to be investigated
1999-08-08 16:26:26 +00:00
Thies C. Arntzen 78f8d04e63 fix for #1995 (this module needs some more work.) 1999-08-08 11:37:50 +00:00
Zeev Suraski 720d32f581 Fix a few leaks 1999-08-07 23:04:01 +00:00
Danny Heijl 7ceaa82d30 More zend-izing. 1999-08-07 20:32:54 +00:00
Zeev Suraski 1e6c159422 Built-in phpinfo() links are now turned off by default. They can be
turned on using the allow_builtin_links INI directive
1999-08-07 18:21:35 +00:00
Zeev Suraski 9b09f412bf - Changed phpinfo() to list modules that have no info function 1999-08-07 17:52:11 +00:00
Andrey Hristov a7d6450ea1 *** empty log message *** 1999-08-07 16:44:32 +00:00
Andrey Hristov fd87bb3321 Modified array_walk() function so that the userland callback is passed
a key and possible user data in addition to the value.  It's still backward
compatible with one argument version.
1999-08-07 16:43:25 +00:00
Zeev Suraski 1701a9e22f Fix for bug #1980 1999-08-07 16:32:50 +00:00
Zeev Suraski 9f2e9c5140 Fix for bug #1754 1999-08-07 16:02:48 +00:00
Philippe Verdy 6c40fa15b6 unreferenced variable warning 1999-08-07 15:58:51 +00:00
Stefan Roehrich 4f3f4699ea Corrected spelling. 1999-08-07 15:50:26 +00:00
Zeev Suraski 125300b563 Fix&improve conversion scripts 1999-08-07 15:31:57 +00:00
Zeev Suraski 0487650536 Fix a bug in call_user_func_ex() 1999-08-06 21:43:49 +00:00
Zeev Suraski 6393ab1486 Now that's an annoying bug. 1999-08-06 16:54:32 +00:00
Zeev Suraski 53aea140df bump up the version number 1999-08-06 15:55:34 +00:00
Zeev Suraski edabed5604 count/sizeof had their arguments setup wrong (messup between Beta 1 and 2) 1999-08-06 15:34:51 +00:00
Zeev Suraski 37d7d08482 - Improved register_shutdown_function() - you may now supply arguments that
will be passed to the shutdown function
- Improved call_user_func() and call_user_method() - they now support passing
  arguments by reference
- Fixed usort() and uksort()
1999-08-06 15:25:11 +00:00
Zeev Suraski f95edc016b Introduce call_user_func_ex() 1999-08-06 15:24:10 +00:00
Zeev Suraski 65ee58da41 *** empty log message *** 1999-08-06 13:41:27 +00:00
Zeev Suraski 4f2dd59e24 *** empty log message *** 1999-08-06 11:12:08 +00:00
Uwe Steinmann 7ef3076a56 Made Hypwerwave module threat safe 1999-08-06 10:42:00 +00:00
Thies C. Arntzen 4b8a100ec9 fix for #1947 1999-08-06 08:56:15 +00:00
Uwe Steinmann 104de20298 Fdf module should now be up to date 1999-08-06 06:52:06 +00:00
Uwe Steinmann 96ab2781ab Order of freeing memory cause segm fault since efree seems to wipe
out the memory.
1999-08-06 06:39:55 +00:00
Uwe Steinmann 6b5f0dde77 renamed file 1999-08-05 19:28:07 +00:00
Uwe Steinmann f81c6b18f4 zend_hash_update() seems to be a bit different form php3_hash_update 1999-08-05 17:39:35 +00:00
Uwe Steinmann d172a6b581 Huge patch to update the hyperwave and pdflib module.
Only pdflib >2.0 is supported.
None is tested yet. Hyperwave seems to be broken now.
1999-08-05 16:25:10 +00:00
Andrey Hristov 48c3643753 Fixed. 1999-08-05 13:41:17 +00:00
Thies C. Arntzen 2c73cc3b29 hope i haven't missed anything - but we're no longer in the 3.x tree 1999-08-05 07:42:46 +00:00
Zeev Suraski b56086ae33 *** empty log message *** 1999-08-04 22:34:39 +00:00
Zeev Suraski 1a6f498b8c Fix makedist to work with the libtool enabled distribution 1999-08-04 22:33:18 +00:00
Zeev Suraski 7c7fe83615 * Fix bug #1963
* Support large ISAPI server variables
1999-08-04 22:21:29 +00:00
Steven Lawrance 9a1edceb46 Added a note about the SNMP changes 1999-08-04 21:47:56 +00:00
Steven Lawrance f09d8b68ab Fixed a little boo-boo I made during the PHP3->PHP4 conversion. 1999-08-04 21:12:57 +00:00
Steven Lawrance 2aa4138668 Updated the files so that they have all the functionality of
PHP 3.0.12.  These include snmpwalkoid, snmp_get_quick_print, snmp_set_quick_print, and snmpset.
1999-08-04 20:56:33 +00:00
Mike Gerdts 1570c5b30e Fix bug #1949: -rdynamic not handled properly with Sun's C compiler 1999-08-03 20:56:13 +00:00
Rasmus Lerdorf f2fe56ff69 [s]printf fix for bug #1952
(note, [s]printf doesn't work in PHP4 yet)
1999-08-03 20:08:33 +00:00
Andi Gutmans bbe27ffae9 - Initialize extended value's and put the fetch_type in it's own variable
name.
1999-08-03 18:54:49 +00:00
Mike Gerdts ecc1aa80e7 Last character of file not a newline, causing problems with Sun's C compiler 1999-08-03 16:49:33 +00:00
Mike Gerdts a36fa329a2 file did not end with a newline, causing problems for Sun's C compiler 1999-08-03 15:27:19 +00:00
Zeev Suraski 1207465e59 This should sort the buildconf bug... 1999-08-02 21:43:37 +00:00
Stefan Roehrich 5d10addd01 Fix for Redhat libc 2.1 and dynamic loading in zlib module.
Adapted zlib module to new PHP_Mxxx macros.
1999-08-02 21:12:16 +00:00
Zeev Suraski dcf9114329 AIX needs this include... 1999-08-02 19:59:04 +00:00
Zeev Suraski 30569aac45 Go Beta 2 1999-08-02 19:20:54 +00:00
Zeev Suraski 3cb1eb0471 Removed '3' from key functions in PHP (maintained compatibility through
php3_compat.h)
1999-08-02 19:17:14 +00:00
Andi Gutmans 07e0885519 Make set_compiled_filename() return a pointer to the allocated file name 1999-08-02 18:40:10 +00:00
Andrey Hristov 42c586b97c Fix function declarations. 1999-08-02 17:28:32 +00:00
Andrey Hristov 33d27f5bfe More symbol work. 1999-08-02 16:06:13 +00:00
Andrey Hristov 05585132ca More symbol work. 1999-08-02 15:02:52 +00:00
Andrey Hristov 98037c425d Updated proto 1999-08-02 14:31:41 +00:00
Egon Schmid b55a6c9185 Another forgotten prototype. Andrey, why is preg_grep in PHP3 missing? 1999-08-01 18:18:40 +00:00
Andi Gutmans 91ec4763fd Support resource type in gettype() 1999-08-01 17:56:09 +00:00
Zeev Suraski e2f17b298c Fix bug #1872 1999-08-01 00:33:03 +00:00
Zeev Suraski 7297f5196e Final IMAP fixes 1999-08-01 00:25:58 +00:00
Zeev Suraski 2dda8d7f97 More IMAP fixes 1999-07-31 20:21:07 +00:00
Zeev Suraski 2639ab7d03 Fix another compile warning 1999-07-31 19:53:02 +00:00
Zeev Suraski 41cf3b96db That should fix bug #1903 1999-07-31 19:23:22 +00:00
Zeev Suraski 698459ea93 Fix problem with include/require of URLs (bug #1832) 1999-07-31 19:06:36 +00:00
Zeev Suraski afeb7704c9 Fix problem with include/require of URLs 1999-07-31 18:57:41 +00:00
Zeev Suraski 01c2701a0f These aren't necessary 1999-07-31 18:48:47 +00:00
Zeev Suraski eb3d12c6dd Fix bug #1914 1999-07-31 16:20:06 +00:00
Zeev Suraski 338405d343 Declaration fix 1999-07-31 10:38:33 +00:00
Zeev Suraski ba290e05a8 Ok, that should be a good start. Can somebody verify that this actually compiles,
and perhaps check if it runs?
1999-07-30 23:36:20 +00:00
Zeev Suraski 6aefb8bae3 Early steps towards making the IMAP module PHP 4.0 compatible
(and readable - indent people, INDENT)
1999-07-30 23:14:01 +00:00
Zeev Suraski 3ee8c8f0da This should fix the implode() problem 1999-07-30 22:17:51 +00:00
Zeev Suraski 620d013499 Support symbols in any symbol table, not just the active one 1999-07-30 14:17:08 +00:00
Andrey Hristov e1a84e442e Fix for bug #1907. 1999-07-30 13:17:29 +00:00
Andi Gutmans 447eb3b031 - Damn that's more like it. 1999-07-30 12:27:04 +00:00
Andi Gutmans 2c32cc81dd - Cut&paste crap 1999-07-30 12:23:12 +00:00
Andi Gutmans e9e7bc6db3 - Add ptr_stack_n_{push,pop} in order to speed up function calls a bit.
There seems to be no reason for stack->top in the ptr_stack except for
  when realloc()'in the stack. I think I'll remove it.
1999-07-30 11:55:53 +00:00
Zeev Suraski 48ffdd79f7 * Setting variables in the global scope wasn't handling is_ref's properly 1999-07-30 02:49:12 +00:00
Andi Gutmans 739132e58d - Fixed a leak when doing inheritance. The parent class name wasn't being freed.
- Fixed a stack leak. Functions that had late argument binding were set up as
  INIT_FCALL_BY_NAME but were using DO_FCALL and not the corresponding
  DO_FCALL_BY_NAME.
1999-07-29 12:24:58 +00:00
Andi Gutmans e3246872e3 -Tiny fix 1999-07-29 04:03:03 +00:00
Andi Gutmans 7d0715d53d - Added function documentation prototypes. Thanks to Egon Schmid for
straightening me out :)
1999-07-29 03:48:29 +00:00
Andi Gutmans 741ca16711 - Fixed various inheritance problems & Andrey's leak 1999-07-28 17:59:55 +00:00
Andi Gutmans a7af382874 - Added get_class($obj), get_parent_class($obj) and method_exists($obj,"name") 1999-07-28 17:58:38 +00:00
Andrey Hristov 5aa3eff94f Fix link functions problem. 1999-07-28 13:59:35 +00:00
Danny Heijl d69ec49dc6 Make it compile again 1999-07-28 11:26:58 +00:00
Philippe Verdy e1b5df4b55 Commited changes in php3 function/soundex 1.32 1999-07-28 07:04:26 +00:00
Zeev Suraski fc478e5935 License update 1999-07-27 21:01:41 +00:00
Zeev Suraski 879bfc7a34 Inherit parent's constructor 1999-07-27 20:34:31 +00:00
Zeev Suraski d49b53b5e1 *** empty log message *** 1999-07-27 20:33:42 +00:00
Zeev Suraski c4bc4871ee Fix runtime inheritence (child functions/members should have higher precedence) 1999-07-27 20:14:58 +00:00
Andrey Hristov 07d691174b Symbol work. 1999-07-27 19:44:46 +00:00
Andi Gutmans bb8046c4a9 - Update Changelog 1999-07-27 18:38:01 +00:00
Andi Gutmans 348b2f0730 - Add missing lock 1999-07-27 18:35:22 +00:00
Andi Gutmans 71ffa09f41 - strttotime is compiled in on win32 again. 1999-07-27 17:30:45 +00:00
Andi Gutmans 88322d2ea0 - Fix up the new operator a bit more. 1999-07-27 17:30:16 +00:00
Andrey Hristov a99ccfc6ef Oops. 1999-07-27 17:17:05 +00:00
Andrey Hristov c6840056a9 More symbol work. 1999-07-27 17:09:35 +00:00
Andrey Hristov 15d87d2452 check for nKeyLength not arKey 1999-07-27 16:26:30 +00:00
Andrey Hristov 6b79bbe842 *** empty log message *** 1999-07-27 16:19:10 +00:00
Andrey Hristov cd0dd562f0 Fix for bug #1887. 1999-07-27 16:17:58 +00:00
Andrey Hristov ad671669ce Fix for bug #1891 1999-07-27 13:40:54 +00:00
Stig Bakken 55b31d5103 forgot to mention the password 1999-07-27 13:10:15 +00:00
Stig Bakken 9bee15a080 spoonfeed 1999-07-27 13:09:23 +00:00
Danny Heijl 3bea592273 >... If you can, please update your module to use these macros.
I could, so I did.
1999-07-27 11:29:36 +00:00
Zeev Suraski 9d0d2e5a69 Set reference count and is_ref values for new objects 1999-07-27 00:14:34 +00:00
Zeev Suraski 09628fd51e - Fixed a memory leak when using assignment-op operators with lvalue of type
string (or array/object)
1999-07-26 21:56:45 +00:00
Zeev Suraski 4215a17639 Fix bug #1867 1999-07-26 21:55:51 +00:00
Zeev Suraski 075146773f *** empty log message *** 1999-07-26 21:31:40 +00:00
Zeev Suraski 41308d4b43 Fix a bug in inheritence from classes defined in include files, that are
inherited from require()'d files
1999-07-26 21:18:35 +00:00
Zeev Suraski 980c803cd7 Fix bug #1851 1999-07-26 21:17:05 +00:00
Andrey Hristov 1b2c932cc2 More symbol work.
I've defined a few macros to help with module/request init/startup function definitions.
Basically:

PHP_MINIT_FUNCTION(module)
PHP_MSHUTDOWN_FUNCTION(module)
PHP_RINIT_FUNCTION(module)
PHP_RSHUTDOWN_FUNCTION(module)
PHP_MINFO_FUNCTION(module)

These will expand to proper function prototypes.

Now to specify these in the module entry, use:

PHP_MINIT(module)
PHP_MSHUTDOWN(module)
PHP_RINIT(module)
PHP_RSHUTDOWN(module)
PHP_MINFO(module)

I've updated all modules in ext/standard and everything from ext/apache to ext/db.
If you can, please update your module to use these macros.
1999-07-26 20:09:08 +00:00
Andi Gutmans 7af5579e3f - Oops I erased this by mistake 1999-07-26 19:35:57 +00:00
Andi Gutmans 7d77a63342 - Should be a complete fix now. This break away code should maybe be made
somewhat generic
1999-07-26 19:32:13 +00:00
Andi Gutmans fe0fbdc5b6 - Temporary fix for "this". Have to fix it tomorrow. 1999-07-26 19:24:54 +00:00
Andi Gutmans 221c80d26d - Fix compile error. Weird that Visual didn't catch this one. 1999-07-26 18:56:54 +00:00
Andi Gutmans 8f51f72dc6 - Fix the new operator incompatibility.
- I commented PHP_FUNCTION(strtotime) in datetime.c because it stopped
  win32 from compiling. This needs to be fixed!!!
- Check out libzend to compile the tree now.
1999-07-26 16:57:06 +00:00
Stig Bakken bc781c94ed "gd", not "-lgd" 1999-07-25 15:06:49 +00:00
Stig Bakken c901d4c528 use AC_ADD_ macros 1999-07-25 14:46:33 +00:00
Stig Bakken ac7768adbf final php3.ini -> php.ini renaming? 1999-07-25 12:57:50 +00:00
Andrey Hristov 736f4831a5 A bunch of grunt work updating function entries and declarations. 1999-07-24 22:16:54 +00:00
Sascha Schumann f6f0f285cc overlooked them 1999-07-24 21:40:37 +00:00
Andrey Hristov 97c496fc9d Remove buildconf.stamp on make distclean 1999-07-24 21:19:54 +00:00
Zeev Suraski fff675c448 Congrats Andrey 1999-07-24 20:36:31 +00:00
Stig Bakken 46783929a3 more Solaris fun 1999-07-24 19:10:17 +00:00
Stig Bakken 7c2f1384d4 added workaround for Solaris PIC weirdness.
added RPM spec file for a future "official" RPM, work-in-progress
1999-07-24 19:02:38 +00:00
Stig Bakken b81789eb1e temporary icon for RPMs until Colin gets back and can make us a spiffy new one 1999-07-24 19:00:06 +00:00
Zeev Suraski 68e32f6ac3 * Make Win32 build work again
* Make error_reporting value prior to the standard initialization be
  set so that errors show up
1999-07-24 16:52:00 +00:00
Stig Bakken 24eb90c524 Solaris 7 fix 1999-07-24 14:54:24 +00:00
Zeev Suraski ae64b9096e *** empty log message *** 1999-07-24 14:40:08 +00:00
Zeev Suraski 0cdb7d6a29 Fix that memory leak... nested function issue remains 1999-07-24 14:38:05 +00:00
Zeev Suraski 2b2bda778e * Fix a warning
* Update ChangeLog
1999-07-24 14:36:48 +00:00
Danny Heijl 4199c6d6a0 Get rid of most compiler warnings. 1999-07-24 14:28:29 +00:00
Zeev Suraski 9c754da0fc Fix RETURN & SWITCH memory leak issue 1999-07-24 11:43:21 +00:00
Zeev Suraski 1b6fae101a Thoroughly fix the SWITCH problem. No RETURN handling yet. 1999-07-24 11:24:19 +00:00
Rasmus Lerdorf b0c60bd249 Changelog 1999-07-24 02:44:53 +00:00
Rasmus Lerdorf d9f6ea2fc3 Fix broken build 1999-07-24 02:43:22 +00:00
Rasmus Lerdorf 8de073782c Bring rand.c up to date 1999-07-24 02:30:37 +00:00
Sascha Schumann cd8d7c7c8a fix for missing include path in CFLAGS 1999-07-24 00:56:56 +00:00
Sascha Schumann cb2ab20a11 Bourne Shell does not have -nt. 1999-07-24 00:46:47 +00:00
Andrey Hristov 974f278257 Added function entry for similar_text(). 1999-07-23 22:47:24 +00:00
Andrey Hristov 244cc30c14 Added function entry for strip_tags. 1999-07-23 22:35:14 +00:00
Andrey Hristov a30af3e355 Ignore generated file. 1999-07-23 21:24:53 +00:00
Andrey Hristov ecc51ad6de *** empty log message *** 1999-07-23 21:24:30 +00:00
Andrey Hristov 1d3b055eba Ignore parsedate.c 1999-07-23 21:22:20 +00:00
Andrey Hristov a100c51f51 Fixed a bug in WDDX that occured when a number was passed in instead
of a variable name.
1999-07-23 21:21:33 +00:00
Stig Bakken e4252b8092 generated and not required by windows 1999-07-23 20:47:59 +00:00
Stig Bakken 830be36b56 required for the Windows build, re-adding 1999-07-23 20:47:17 +00:00
Andrey Hristov 58cb2362c6 *** empty log message *** 1999-07-23 19:52:18 +00:00
Andrey Hristov 9dd45ec800 Ported strtotime() function. 1999-07-23 19:51:27 +00:00
Sascha Schumann 270be258d3 Improve speed on subsequent runs of buildconf 1999-07-23 19:37:59 +00:00
Andrey Hristov 63a48afcd5 Fix for compatibility. 1999-07-23 19:22:28 +00:00
Zeev Suraski 028cf1a368 Fix bug #1812 1999-07-23 18:41:58 +00:00
Zeev Suraski 76bef75836 Fix bug #1807 (requires libzend update) 1999-07-23 16:03:18 +00:00
Zeev Suraski 84aa8cce64 * Add an API macro users can use to ensure an array member can be modifed
before they modify it.
* Fix a bug and remove redundant code in convert_to_long() (booleans and
  resources weren't changing their types
1999-07-23 16:02:51 +00:00
Sascha Schumann 33f30aee64 gdttf update 1999-07-23 15:56:47 +00:00
Stig Bakken 2c2e4c463f run libtoolize during buildconf since we depend on libtool anyway 1999-07-23 15:53:50 +00:00
Stig Bakken 8bf949b5d6 generated file 1999-07-23 15:32:07 +00:00
Stig Bakken beceb905cd in case ltconfig isn't checked out executable 1999-07-23 15:29:57 +00:00
Stig Bakken 083b2df569 good boy 1999-07-23 15:22:36 +00:00
Stig Bakken 6d0fa9bdae updated the docstring for --with-xml 1999-07-23 15:20:48 +00:00
Zeev Suraski 00238ad1ba Added check for freetype.h 1999-07-23 15:18:37 +00:00
Stig Bakken b291b0902d small fix to libtool check 1999-07-23 15:13:22 +00:00
Stig Bakken 6c856de82d require libtool to be installed as well 1999-07-23 15:08:54 +00:00
Andi Gutmans 6cdea551cc - Make Win32 compile again. 1999-07-23 14:14:42 +00:00
Andrey Hristov 64ed8f7141 Changeloggin' 1999-07-23 13:47:57 +00:00
Danny Heijl 78d420e9fe ChangeLog 1999-07-23 12:26:26 +00:00
1021 changed files with 173104 additions and 48634 deletions

No files matched your search

+23311 -19
View File
File diff suppressed because it is too large. Load diff
-860
View File
@@ -1,860 +0,0 @@
PHP 3.0 CHANGE LOG ChangeLog
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
December 24 1998, Version 3.0.6
- Fix GetImageSize() to work with non-standard jpg images
- Add Mersenne Twister functions (mt_rand, mt_srand, etc)
- Add str_replace() function
- Add chunk_split() function
- Fixed a bug in the memory limit code, in cases where $php_errormsg was
also used.
- Add iptcparse() function
- Adobe FDF supported
- getallheaders() NULL string fix <michale@utko.fee.vutbr.cz>
- Add all configuration directives to phpinfo() page
- Functions pack() and unpack() rewritten to be binary and buffer overrun
safe and behave like the Perl functions for all implemented format codes.
- Ensured that msql_error() will not return error messages generated by
previously-run scripts.
- Add base_convert() function
- Make sprintf() and printf() output binary safe
- Made gzgetc binary safe
- Add convert_cyr_string() and quoted_printable_decode() functions
- Fix ldap_free_result() core dump bug
- Add support for current OpenLDAP-2.0-devel library
- Add php3_asp_tags directive so it can be set from Apache config files
- Added UTF-8 support in the XML extension
- Make rand(min,max) safer on older platforms where the low-order bits have
short cycles.
- Added new pdf (Portable Document Format) module
- Added an XML parsing extension using James Clark's "expat" library
- Optimized parts of the token cache code.
- Terminate on out-of-memory errors. Until now, PHP could crash in out of
memory situations (clean-up, no real effect).
- Unterminated comments in include files were being reported with the wrong line
number. Fixed.
- Added ImageCopy() and ImageColorDeallocate(). ImageCopy() is about
20% faster than ImageCopyResized(). ImageColorDeallocate() marks
palette entries free for reuse (by <mka@satama.com>).
- In the CGI version, it was impossible to access resources (e.g. SQL links,
images) from user-defined shutdown functions. Fixed.
- Added optional third parameter to strpos() to specify the offset to
start searching from.
- Fixed a crash bug in unset() when unsetting illegal variables (rare).
- Made ImageInterlace and ImageTransparentColor parameters optional, and made
them return the current/new settings.
- Optimized GetImageSize() <thies@digicol.de>.
- Made odbc_autocommit() without args return status
- Added connect workaround for OpenLink ODBC
- Added minimal InterBase support. Tested only on 4.0 & Linux.
- Fixed some memory leaks and bogus error messages in the URL handler of
the various file open functions. Should only affect error handling
in bad URLs.
October 5 1998 Version 3.0.5
- mysql_field_flags now reports all MySQL flags and the result is suitable
for automatic parsing. Compatibility warning: The result format has
changed. If you have scripts parsing the result of this function, you
may need to adapt them.
- Made nl2br() binary safe (not that it's of much use).
- Fixed a bug in the API function getThis(). It affected mostly the dir
functions, if nested within objects.
- Fixed a problem in require() in conjunction with switch(), and in some other
cases. Also fixed an identical problem with the call_user_function() API
function.
- Removed -lpthread when compiling with MySQL support. It caused various
serious problems when compiled into Apache.
- Add serialize() and unserialize() functions from jkl@njet.net
- Fix in_addr_t check for systems with in_addr_t in netinet/in.h
- Add atan2() function
September 22 1998 Version 3.0.4
- Added uksort() - array key sort using a user defined comparison function.
- Added 'j' support to date() - generates the day of the month, without
possible leading zeros.
- Added support for multiple crypt() encryptions if the system supports it
- Added optional support for ASP-style <% %> and <%= tags
- Fixed data loss problems with very large numeric array indices on 64-bit
platforms (e.g. DEC UNIX).
- 2 cursor_type parameters for ifx_query() and ifx_prepare changed
to 1 (bitmask). Added a few constants for use in Informix module.
- Added php3.ini option ifx.charasvarchar. If set, trailing blanks
are stripped from fixed-length char columns. (Makes life easier
for people using Informix SE.)
- Static SNMP module which compiles with ucd-snmp 3.5.2
- fixed imap_header & header_info from crashing when a header line
is > 1024 characters.
- Added patch for rfc822_parse_adr to return an array of objects instead
of a single object.
- Informix Online 7.x & SE 7.x support now fairly complete and stable
- Add dbase_get_record_with_names() function
- Added a special case for open_basedir. When open_basedir is set to "."
the directory in which the script is stored will be used as basedir.
- Include alloca.c in the distribution for platforms without alloca().
- Improved stripping of URL passwords from error messages - the length of the
username/password isn't obvious now, and all protocols are handled properly
(most importantly, http).
- Copying objects that had member functions with static variables produced
undetermined results. Fixed.
- Added function lstat() and cleaned up the status functions,
added tests for file status functions (this may break on some plattforms)
- Fixed is_link() - it was returning always false.
- Fixed apache_note() - it was corrupting memory.
- New Function. void get_meta_tags(string filename); Parses filename until
closing head tag and turns all meta tags into variables prefixed with 'meta_'.
The below meta tag would produce $meta_test="some string here"
<meta name="test" content="some string here">
- Generalized some internal functions in order to better support calling
user-level functions from C code. Fixes a few sporadic problems related
to constructors inside eval() and more.
- Fixed an endless loop in explode(), strstr() and strpos() in case of an
invalid empty delimiter.
- rand() now accepts two optional arguments, which denote the requested range
of the generated number. E.g., rand(3,7) would generate a random number
between 3 and 7.
- Added M_PI constant.
- Added deg2rad() and rad2deg() for converting radians<->degrees.
- ImageArc() misbehaved when given negative angles, fixed.
- Fixed a bug in ereg() that may have caused buglets under some circumstances.
- Added imap_status
- Shutdown functions, registered via register_shutdown_function(), could never
generate output in the Apache module version. Fixed.
- Brought IMAP docs into sync with acutal imap code
- imap_fetchstructure now takes in optional flags
- Fix potential core dumps in imap_append and imap_fetchtext_full
- Fix problem in SetCookie() function related to long cookies
- Add uasort() function to go along with usort (like sort() and asort())
- Add port number to Host header as per section 14.23 of the HTTP 1.1 RFC
- Fix imap_reopen to only take 2 arguments with an optional 3rd flags arg
- Add optional 2nd argument to imap_close
- Add CL_EXPUNGE flag to imap_open() flags
- Fix 4th arg on imap_append(). It was getting converted to a long by mistake.
- Fix shutdown warning in the LDAP module
- *COMPATIBILITY WARNING* imap_fetchstructure() "parametres" object and property
name changed to "parameters" to match the documentation and to be consistent
with the rest of the API.
- Delete uploaded temporary files automatically at the end of a request
- Add upload_max_filesize and correponsing php3_upload_max_filesize directive
to control the maximum size of an uploaded file. Setting this to 0 would
completely eliminate file uploads.
- Force $PHP_SELF to PATH_INFO value when running in CGI FORCE_CGI_REDIRECT mode
- Add apache_lookup_uri() function which does an internal sub-request lookup
and returns an object containing the request_rec fields for the URI. (Yes,
you have to be a bit of a gearhead to figure this one out)
- Fix a few signed char problems causing functions like ucfirst() not to work
correctly with non-English charsets
- md5() function not binary safe - fixed
August 15 1998 Version 3.0.3
- Changed the name of fopen_basedir to open_basedir, to be a little more
accurate about what it does.
- Added Hyperwave module
- Added config-option (php3_)enable_dl <on/off>. This enables/disables the
dl() function. In safe-mode dl() is always disabled.
- Auto-prepended files were crashing under some circumstances - fixed.
- Win32 mail fixes provided by walton@nordicdms.com
- Comparing between arrays and/or objects now generates a warning (it always
returns false, as it used to; no comparison is made)
- Fixed a bug in the syntax highlighting code, that made ending-double-quotes
appear twice under certain circumstances.
- Fix bug in filetype() function related to symlinks
- Started integrating Informix SE support to PHP configure/makefile setup.
- gdttf roundoff fixes from ellson@lucent.com
- Added initial Informix SE support files from Danny Heijl - This code still
needs to be integrated into the PHP configure/makefile setup and the code
itself needs more work.
- return in the global scope now terminates the execution of the current file.
- Added the ability to register shutdown function(s), via
register_shutdown_function($function_name).
- Clean up const warnings
- Add write support to ftp fopen wrappers
- Add strspn() and strcspn() functions
- On systems without strerror use Apache version if compiling as Apache module
- The PHP start tag was being ignored under some circumstances - fixed.
- The db, dbase and filepro functions are now Safe-Mode aware.
- Added config-option (php3_)fopen_basedir <path>. This limits the directory-
tree scripts can open files in to <path>.
- Fixed pg_loreadall that didn't always return all the contents in a PostgreSQL
large object. Also, doesn't pass through anything if method is HEAD.
- configure fix to create target Apache module dir
- Fix core dump in imageTTFtext() function
- Added static IMAP support
- Syntax highlighting was generating additional whitespace - fixed.
- Added ucwords. Works like ucfirst, but works on all words within a string.
- Added array_walk() - apply user function to every element of an array
- Added usort() - array sort that accepts a user defined comparison function!
- Added the ability to call user-level functions and object methods on demand
from the C source using a completely generalized, slick API function.
Miracles do happen every once in a while.
- Added constructors. Don't even squeek about destructors! :) (we mean that)
- Make pg_lowrite() binary safe
- Fixed mod_charset option in ./setup
- Fixed rewinddir() and dir()::rewind() under Win32 (they didn't work before).
- Add Win32 COM support! By-name referencing is supported using the IDispatch
interface (automation). Available functions - COM_Load(), COM_Invoke(),
COM_PropGet() and COM_PropSet().
July 20 1998 Version 3.0.2a
- Fix a quirk in the configuration file parser, the endless fountain of joy
and fun.
- Fix a bug in the API function add_method() that made dir() crash.
July 18 1998 Version 3.0.2
- Compile cleanups for *BSD
- Add support for the OpenLink ODBC Drivers
- Add PHP_SELF, PHP_AUTH_* and HTTP_*_VARS PHP variables to phpinfo() output
- Add workaround for broken makes
- Add Apache 1.3.1 support (some Apache header files were moved around)
- Added apache_note() function.
- Fix order of system libraries and detect libresolv correctly
- Fixed a bug in the Sybase-DB module. Several numeric field types were
getting truncated when having large values.
- Added testpages for unified odbc
- Fix php -s seg fault when filename was missing
- Made getdate() without args default to current time
- Added ImageColorResolve() and some fixes to the freetype support.
- Added strcasecmp()
- Added error_prepend_string and error_append_string .ini and .conf directives
to make it possible to configure the look of error messages displayed by PHP
to some extent
- Added E_ERROR, E_WARNING, E_NOTICE, E_PARSE and E_ALL constants, that can be
used in conjunction with error_reporting()
(e.g. error_reporting(E_ERROR|E_WARNING|E_NOTICE);
- Fixed a crash problem with classes that contained function(s) with default
values.
- Fixed a problem in the browscap module. Browscap files weren't being read
properly.
- Fix -L path in libphp4.module to make ApacheSSL compile without errors
- Fix StripSlashes so it correctly decodes a \0 to a NUL
July 04 1998 Version 3.0.1
- echo/print of empty strings don't trigger sending the header anymore.
- Implemented shift left and shift right operators (<< and >>)
- Compile fix for cc on HP-UX.
- Look for beta-version Solid libraries as well.
- Make GD module show more info in phpinfo().
- Compile fix for NextStep 3.0.
- Fix for Oracle extension on OSF/1.
- Fix gd 1.3 bug in ImageColorAt().
- pg_loread() hopefully handles binary data now.
- Turned off some warnings in dns.c
- Added ImageTTFBBox() and made ImageTTFText() return bounding box.
- Added constants for Ora_Bind()'s modes.
- Renamed all hash_*() routines to _php3_hash_*() to avoid clashes with other
libraries.
- Changed uodbc default LONG behaviour: longreadlen 4096 bytes, binmode 1.
The module now actually uses the php.ini settings.
- New PostgreSQL functions: pg_fetch_row(), pg_fetch_array()
and pg_fetch_object()
- Fix a segmentation fault when calling invalid functions in certain
circumstances
- Fix bug that caused link-related functions to not pay attention to
run-time safe mode setting (it was using whatever was set at compile time).
- Fix bug in exec() function when used in safe mode
June 6 1998 Version 3.0
- Add checkdnsrr function (check availability DNS records)
- Add getmxrr function (get MX hostnames and weights)
- Fixed bug in nl2br() function
- Fix for an RC5 related problem in the Sybase module, when dealing
with very long data types.
- Speed up string concatenation by roughly a factor of 2
- Add escape-handling to date function
- Make base64 functions binary safe
- Add strrpos function to complement strpos function added in RC5
- Add ltrim function (strips only at the start of string)
- Add rtrim as an alias to chop() for completeness sake
- Add trim function (similar to chop, except it strips at the start as well)
- Added 2 optional args to fsockopen function - errno and errstr
- Fixed bug in split() function related to leading matches
- Fixed problem in error_log() function (thanks to Jan Legenhausen)
- empty("0") was returning true - fixed
- Removed the old sybsql module. Use the new sybase_*() functions instead.
- Several fixes to the configuration file parser
- LDAP fixes - fixed return values on several functions
May 23 1998 Version 3.0RC5
- The BC math library functions now compile in by default.
- Fixed a bug in virtual() and other types of SSI's (e.g. <!--#exec). Under
certain circumstances, this used to result in random problems.
- Fixed a bug in virtual(). It was misbehaving if it was called before any
other output.
- Added mysql.default_port, mysql.default_host, mysql.default_user and
mysql.default_password ini-file directives.
- Improved handling of the MySQL default port. It now honors /etc/services
and $MYSQL_TCP_PORT.
- Fixed a crash in opening of broken ftp:// URLs, and improved error reporting
in opening of URLs.
- Fixed several non-critical scanner issues with syntax highlighting mode and
the <script language=php> tag.
- Fixed fseek on windows. (windows only): fseek will not return proper results
on files opened as text mode. PHP uses binary mode as the default for file
operations, but this can be overiden by fopen. Do not open files in text
mode and use fseek on them!
- Add strpos() function
- Added zlib module, requires zlib >= 1.0.9
- Improved the module API implementation. Dynamic modules may now register
persistent resources (not that it makes much sense, but at least PHP
won't crash). The API itself remains unchanged.
- bcmod() wasn't always behaving like modulus should behave (it was behaving
exactly like GNU bc's % operator). Fixed.
- Changed the Sybase-DB module to always return strings, instead of auto-typing
result sets. This was done for consistency with the other database modules,
and in order to avoid overflows due to the platform-dependant limitations
of the numeric data types of PHP. You can turn compatability mode on using
the sybase.compatability_mode directive in the php3.ini file.
- Fixed problems with the TINYINT field in the Sybase-CT module.
- Applied some small speed optimizations to the Sybase-DB module querying code.
- Added 'numeric' and 'type' properties to the object returned by
sybase_fetch_field().
- The 'new' operator doesn't accept all expressions anymore. Instead, it
accepts a class name, or a variable reference (scalar, array element, etc).
- Add ora_numcols() function
- Add ora_do() and ora_fetch_into() functions to Oracle driver
- Add persistent connection support to Oracle driver
- Make Oracle driver clean up open connections and open cursors automatically
- Added fread() and fwrite() that properly handle binary data.
- Add Ora_ColumnSize() to Oracle code
- The string "0" means FALSE again. This was done in order to maintain type
conversion consistency.
- Added solid_fetch_prev() for fetching the previous result row from Solid.
- Huge integers are now automatically converted to floating point numbers
(that have a wider range).
- Floating point numbers are now displayed using scientific notation when
they're extremely big or extremely small. The 'precision' php3.ini directive
no longer designates the number of decimal digits, but rather, the maximum
number of significant digits required.
- Added support for scientific notation for floating point numbers (e.g. 1E7)
throughout the entire language.
- Fixed a potential/probable memory corruption problem with HEAD request
handling.
- Using un-encapsulated strings now generates a NOTICE-level warning
(e.g. $a = foo; instead of $a = "foo";)
- Added defined("name") function to check if a certain constant is defined
or not.
- Support new Apache mechanism for setting SERVER_SUBVERSION
- Added PHP_OS and PHP_VERSION constants
- Added the ability to define constants in runtime! Constants are script-wide,
(there's no scope, once the constant is defined, it's valid everywhere).
Syntax is define("name", $value [, $case_insensitive]). 'name' can be any name
that is a valid variable name, *without* the $ prefix. 'value' can be
any *scalar* value. If the optional 'case_insensitive' parameter is 1,
then the constant is created case-insensitive (the default is case
sensitive). Note: define() is currently *NOT* supported in preprocessed
scripts.
- Added general support for constants. The Syslog constants (e.g.
LOG_ERR, LOG_CRIT, etc.) should be accessed as constants from now on (that
is, without a $ prefix). You can still set define_syslog_variables to On
in the php3.ini file if you want to define the various $ variables. The
default for this directive in the php3.ini-dist file has been changed to
Off.
- The configuration file path variable now expands . and .. into their
respective directories. You can obtain the path of the php3.ini file
that was used by printing get_cfg_var("cfg_file_path").
- Fixed a crash-recovery parser crash ($a=7; $a[3]+=5;)
- Add gmmktime() function
- Fixed a crash with implode() and empty arrays.
- Fixed a bug that, under fairly rare circumstances, caused PHP not to
recognize if(), require() and other statements as statements, and
to complain about them as being unsupported functions.
- Beautified php3.ini-dist and added more comments to it. Also changed
the behavior of the configuration file parser to be brighter about
the various constants (TRUE/FALSE/ON/OFF etc).
- Fixed a bug in openlog() - the specified device name was being mangled.
- Memory leaks were sometimes reported erroneously - fixed.
- Improved the convertor to handle some quirks of the PHP/FI 2 parser with
comments.
- Fixed number_format() to properly handle negative numbers, and optimized it
a bit.
- Fixed static variables inside class member functions. Note that using such
static variables inside member functions usually defeats the purpose of
objects, so it is not recommended.
- Fixed a bug in fpassthru() (the file was being closed twice).
- Added strftime().
- Add set_socket_blocking() function to control blocking on socket fd's
- The sendmail_path in php3.ini was being ignored - fixed.
- Fixed a bug with file upload, with files that contained the MIME boundary
inside them.
- Fixed a bug with form variables of type array, with spaces in their
index (e.g. name="foo[bar bar]").
- gd-1.3 autodetect and support
- Year 2000 compliance is now togglable from the php3.ini file. Setting PHP
to be y2k compliant effects the way it creates cookies, and means it'll
NOT work with many browsers out there that are not y2k compliant! For
that reason, the default for this option is off.
- safe mode / fix from monti@vesatec.com
- Integrated the FreeType support in the GD extension.
- Added --with-gd=DIR and --without-gd options to configure
April 18 1998 Version 3.0 Release Candidate 4
- Auto-prepended and auto-appended files were reporting the wrong filename
in errors and in __FILE__ - fixed.
- Fix GPC problem related to mixed scalar and array vars with the same name
- Made putenv() Apache-safe. Environment variables may no longer leak in
between requests.
- The trailing semicolon is no longer required in class declarations.
- Fixed a memory leak in the (array) and (object) operators under certain
conditions.
- <script> tags weren't working unless short tags were enabled - Fixed.
- Fixed a bug in certain array indices that weren't treated as numbers
even though they looked like numbers (e.g. "10", "20").
- Changes to support renamed API functions in Apache-1.3
- Fixed the -p and -e command line switches
- Fix a segfault when calling command line version without parameters
- Fix for feof() when used on a socket
- Fix off-by-one error in fgets() when used on a socket
- Fix bug in ImageSetPixel() (Thanks to ecain@Phosphor.net)
March 31 1998 Version 3.0 Release Candidate 3
- Tiny bugfix for magic_quotes_sybase
- Fix Apache build problems introduced in RC2
- $a["0"]==$a[0] fix
- Apache-1.3 build changes to support 100% automatic builds and shared library
module builds. See INSTALL file.
March 30 1998 Version 3.0 Release Candidate 2
- Changed the socket implementation under UNIX to not use FILE pointers, in
order to work around the buggy Solaris libc (and possibly buggy libc's
in other platforms).
- Fixed a bug in min() and max() with certain arrays.
- *WARNING* Move Apache 1.3 php3 file install to src/modules/php4 instead of
src/modules/extra. Make sure you change your AddModule line correctly
in your Apache Configuration file. This change is to take advantage of
new Apache-1.3 configuration mechanism which makes it easier to build an
Apache server with PHP automatically enabled. It will also help building
a shared library module version of PHP soon.
- Fixed a crash bug with auto-appended files.
- Made --enable-discard-path work on all Unix servers #!/path/php CGI scripts
should now work everywhere. I have tested on Apache, WN and Netscape 2.0
- Made $a["123"] and $a[123] be identical. $a["0123"] is still different,
though.
- Added 'precision' ini directive, to set the number of decimal digits
displayed for floating point numbers (default - 6).
- Made integer/integer divisions evaluate to floating point numbers when
applicable (e.g., 5/2==2.5(float), but 4/2==2(int))
- Get rid of reliance on tied streams and move all socket reads and writes
to recv/send calls
- Cleaned up head.c a bit and fixed CGI SetCookie order problem
- Changed default variable parsing order to Get-Cookie-Post (GPC)
- Fixed setup so it has all configure options and defaults.
- Added optional decimal point and thousands seperator to number_format()
e.g., number_format(1500,2,',','.') == 1.500,00
- Fixed cgi bug in windows that prevented files from being parsed on many
systems and servers.
March 23 1998 Version 3.0 Release Candidate
- Added support for the Raima database (ALPHA)
- Fixed a bug in persistent PostgreSQL links and the connection-string method.
- Added EXTENSION_STATUS file, that specifies the stability and status of
every module in the distribution.
- Added optional parameters to user functions with default values, variables
that are forced to be passed by reference and variables that can be
optionally passed by reference. The ini file directive
'ignore_missing_userfunc_args' is no longer supported.
- Added fhttpd support (by Alex Belits)
- Improved performance by approximately 20-30%.
- Added mysql_error(), mysql_errno() (if available) and msql_error().
Errors coming back from the database backend no longer issue warnings.
Instead, use these functions to retreive the error.
- Patched count(), each(), prev(), next(), reset() and end() to work around
the implementation side effects of unset(). As far as the users are
concerned, this should be transparent now (even though it's slower now,
until it's thoroughly fixed in 3.1).
- Added number_format(). number_format(2499,2)=='2,499.00'.
- error_reporting() now sets the error reporting level to the supplied
argument, without any interpretations.
- Fixed a lookahead parser bug that occured under rare circumstances.
- Change the comparison operators to compare numeric strings as numbers. If
you want to compare them as strings, you can use the new C-like strcmp()
- Fixed Ora_GetColumn() bug when fetching strings
- Added Ora_ColumnName() and Ora_ColumnType()
- Preliminary LONG and LONG RAW support in Oracle extension
- Add \123 and \xAB style octal and hex escapes to "" and `` strings
- Add "-c" command line flag for specifying path to php3.ini file
- Improved list() so that elements can be skipped, for example:
list($name,,,$realname) = explode(":",fgets($passwd_file));
- Fixed a tiny bug in the hash initialization which caused excessive use of
memory. Report and fix by short@k332.feld.cvut.cz
- Fixed strtolower() and strtoupper() to work with 8-bit chars
- Fixed to compile and run on SunOS 4.1
- Fixed a crash in soundex() of an empty string
- Fixed parse_str() - it wasn't always defining the right variables,
and didn't work with arrays.
- Made [m,My]SQL create/drop database functions return success status
- Fixed some memory leak/crash problems in the Adabas module
- Added each() in order to allow for easy and correct array traversing.
- Make Apache module version respect LOCALE setting
- Add support for Apache 1.3b6+ ap_config.h file
- Fixed a nasty corruption bug in eval() and show_source() that resulted in
script termination (e.g. eval("exit();").
- Fixed a syntax highlighting problem with keywords used as variable
names.
- Fixed a possible crash and/or file descriptor leak
- Fixed line number being off by one in #! shell style execution
- Made it possible to disable auto_prepend/append with "none" filename
- Allow safe CGI calling through #!php style scripts
March 2 1998 Version 3.0b6
- Made [s]printf handle %ld
- Changed CGI version to only open regular files as input script
- Added ignore_missing_userfunc_args directive to suppress warnings messages
about missing arguments to user-defined functions
- Added Postgres function - pg_cmdtuples(), by Vladimir Litovka
- Disabled command line options if used as CGI
- Changed CGI version to use PATH_TRANSLATED as the script file name
- Link with solid shared library instead of static one
- Fixed a crash with functions that aren't being called correctly
- Fixed file descriptor leak in auto-prepend/append
- Imap module is usable. See README in dl/imap.
February 24 1998 Version 3.0b5
- Made the URL aware file functions be enabled by default
- Fixed an unlikely crash bug in the parser, with uninitialized array elements
which are refered to as objects.
- Fixed several fields that were being incorrectly read in Sybase CT.
- Fix Apache-1.3 related SIGHUP problem which was preventing php3.ini from
getting re-read on a SIGHUP
- *** WARNING *** Downwards incompatible change: The plus operator (+) is not
longer overloaded as concatenation for strings. Instead, it converts its
arguments to numbers and performs numeric addition.
- Add Stig and Tin's bdf2gdfont script to extra/gd directory
- Added join() as an alias to implode()
- Made implode() accept arguments in the order used by explode() as well
- Made $php_errormsg local in function calls
- Fixed Apache configuration directive bugs
- Added a number of .ini directives to Apache .conf directive list
- Fixed a 'memory leak' with strtok()
- echo/print now handle binary data correctly.
- NEW now accepts any expression for the class name argument.
- Add ImageDashedLine() GD function
- Add arg_separator .ini directive so the '&' GET method separator can be
changed to ';' for example. Corresponding php3_arg_separator Apache .conf
directive works as well.
- Walked around an implementation side effect of switch(). <? switch(expr) { ?>
now works.
- Added memory caching, resulting in a significant performance boost
- Added support for for(): .. endfor; loops
- Added a new predicate - empty($var). Returns true if $var is not set,
or is FALSE. Returns false otherwise.
- Added is_integer() (same as is_long()) and is_real() (same as is_double()).
- Added sizeof() as an alias to the count() function
- Added --enable-force-cgi-redirect, to prevent the CGI from working if
someone directly accesses PHP not through Apache's CGI redirect
(off by default).
- Fixed marking of deleted dBase records. Noticed by Simon Gornall
<simon@oyster.co.uk>.
- Fixed fixed "%%" bug in [s]printf
- Fixed a UMR (initialized memory read) in the Oracle code
- Potential fix for mysql-related SIGPIPE problem which caused httpd to spin
- Made PHP responsive to the Apache link status (stop executing if the link
dies).
- Fixed a crash bug with StrongHold and secure pages
- Fixed StrongHold installation
- Optimized the function call sequence a bit.
- Fixed Sybase/CT date/datetime/money fields work to correctly.
- Fixed Apache module startup problems - php3_module_startup should only be
called once.
- Fixed ord() with characters >127
- Fixed bug in file_exists() function
- Fixed stripslashes() to remove the escaping quote (instead of backslash)
in case magic_quotes_sybase is true.
- Also make echo and print automatically remove trailing decimal zeros.
- Added htmlentities(), currently handling only ISO-8859-1 entities
- "0" is no longer considered false, the only string which is false is the
empty string "".
- Added 'true' and 'false' keywords
- Added 'xor' (logical exclusive or)
- Automatic conversion from double to string removes decimal trailing zeros.
- Added arsort() and rsort() to sort in descending order.
- Turned on "XLATOPT_NOCNV" by default for uODBC/Solid.
- Added support for a port number in the mysql_(p)connect() functions
- Fixed a file descriptor leak in the configuration parser.
- Fixed a few buglets with syntax highlighting with certain language keywords
- Added functions to control minimum severity level of Sybase messages to
display.
- Added highlight_string() - behaves like highlight_file(), only instead
of highlighting a file, it syntax highlights the contents of its
argument.
- Renamed show_source() to highlight_file(). show_source() is still
supported for downwards compatability.
- Fixed a bug in class inheritence - member functions with upper case
letters in their names couldn't be redefined.
- Made chown(), chgrp() and chmod() return TRUE/FALSE instead of 0/-1.
February 02 1998 Version 3.0b4
- Fixed a segfault bug in one of the unified ODBC error messages.
- Set default file modes to binary on Win32 (solved a lot of bs)
- Fixed file copy on Win32
- MIME file uploads fixed on Win32
- Added contributed icons by Colin Viebrock (undex extra/icons)
- Fixed the debugger enough to call it "beta code".
- Fixed some leaks in the Oracle module, tidied up the code a bit.
- Added __FILE__ and __LINE__ which evaluate to the currently parsed file
and currently parsed line respectively.
- Added ImageColorAt(), ImageColorSet(), ImageColorsForIndex(), and
ImageColorsTotal() to allow manipulating the palette of GIF images.
- Rename '--enable-url-includes' option to '--enable-url-fopen-wrapper' to
better describe what it does, and pay attention to the setting.
- Added optional parameter to the file(), readfile() and fopen() functions
to look for files located in the include path.
- Fixed bug that allowed the file() and readfile() to open files in the
include path inadvertantly.
- Fixed a (documented) bug in printf()/sprintf() with hard limited strings
and alignment (e.g. %-.20s).
- Optimized several quoted string routines.
- Added error_log ini directive to select where errors get logged when
log_errors is turned on or the error_log() function is used.
- Added the ability to direct errors to log files instead of or in addition
to the script output. Use the new display_errors and log_errors
php3.ini directives.
- Made environment variables uneraseable by POST/GET/Cookie variables.
- Fixed a bug in the elseif() construct. The expression was being evaluated
even if a previous if/elseif already evaluated to true and got executed.
- Fixed a bug in the exit code parameter of system()
- Tighten up all exec() related functions in safe mode
- Added error_log() function to log messages to the server error log, or
stderr for the CGI version.
- Added support for a general memory limit of scripts.
- Fixed a segfault bug that occured under certain circumstances with shell
escapes ($foo = `...`)
- Made keywords be valid property names of objects.
- Fixed a segfault bug when creating new objects of an unknown class.
- Fixed a problem with the maximum execution time limit, that may have
prevented this feature from working on certain platforms.
- PHP would now warn you with E_NOTICE about unknown escape characters,
e.g. "\f". It would still be considered as a backslash followed by f,
but the proper way of writing this is "\\f" or '\f'.
- Added support for ${...} inside encapsulated strings. Supported: ${foo},
${foo[bar]}, ${foo[0]}, ${$foo[$bar]}, ${$foo->bar} and ${$foo}
- Fixed a bug in automatic persistent link reconnect of the Sybase/DB module.
Thanks to Steve Willer for finding that 'stealth' bug!
- Fixed a crash bug in the GET/POST/Cookie parser in case of regular
and array variables with the same name.
- Added round() function.
- Can't use encapsed strings as variable names anymore, ie. $"blah blah".
- Fixed bug in gethostby*() functions that resulted in a core dump.
(Noticed by torben@coastnet.com.)
- Fixed bug in dbase_get_record that prevented number and date fields
from being properly decoded. (Thanks again to colins@infofind.com.)
- Make dbase_get_record include a 'deleted' field that indicates whether
that record had been marked for deletion.
- Fixed bug in dbase library that stomped on the deleted flag of the first
record in the file if it was set. (Thanks to colins@infofind.com.)
- Fixed putenv() to not report a memory leak and possibly prevent a bug
from that memory being freed.
- Added setlocale()
- Added pg_fieldisnull() (by Stephan Duehr)
- Changed pg_exec() to always return a result identifier on succees
- Solid linking fixes (tries to find the right library)
- Fixed a but with date() and the 'w' element.
- Tried to eliminate unimportant memory leak notifications.
- Made min() and max() backwards compatible and able to handle doubles.
- Add fgetc() function
- Fixed bug in getmyuid(), getmyinode() and getlastmod(). Thanks to
khim@sch57.msk.ru for pointing this out.
- Fixed http:// URL includes with no path specified send request for /.
- Added GetAllHeaders() (Apache-only)
- Added workaround that made the Image text functions 8-bit clean
- Made snmp internally compilable for Win32 (not the unix one though),
only adds 2k to binary size, so no reason not to have it there.
- Fixed ldap loading on Win32
- Fixed MySQL Info function on Win32 platform
- Fixed compilation of syntax highlighting mode
January 17 1998 Version 3.0b3
- Added mysql support under windows ;) happy happy joy joy
- Fixed dbase.dll for Win32 to actualy load now.
- Enhanced the convertor to recognize ?> as a php-close-block as well.
- Fixed potential SetCookie() core dumps
- Changed print to be an expression instead of a statement. That means you can
now do stuff like foobar() or print("Unable to foobar!"). echo has NOT been
changed.
- Removed the flex optimization flags to reduce the size of the scanner
- Added memory leak logging into apache log files (apache module only)
- Fixed a nasty bug in one of the internal stacks. This may have caused
random crashes in several occassions.
- Fixed bug in ImageGif() making it hang sometimes
- Added ImageLoadFont(), ImageFontWidth() and ImageFontHeight()
- error_reporting() now returns the old error reporting level
- Fixed url includes/opens not working under Win32
- Fixed errorneous handling of multipart/form-data input
- Added rawurlencode(), rawurldecode() and changed urlencode() and urldecode()
a bit too.
- Fixed a bug in [s]printf, sign was forgotten for doubles.
- Fixed a segfault bug in pg_fieldprtlen(), and made it accept field names
in addition to field offsets.
- Made the setup script a little more user-friendly.
- Added is_long(), is_double(), is_string(), is_array() and is_object()
- Fixed a bug in freeing of mSQL results.
- Improved pg_exec() to properly return true or false with queries that don't
return rows (i.e. insert, update, create, etc)
- Added get_cfg_var() to enable checking cfg file directives from within
a script.
- Fixed a bug with urlencode() and characters 0x80-0xff
- Changed the behaviour of ereg_replace to more intuitive. The
backslashes other than valid existing back references in the second
argument are no more evaluated as escape sequences.
- Fixed a bug in the configuration file loader and safe mode.
- Fixed a bug with configuration variables taken from the environment.
- Added <script language=php> </script> as PHP open/close tags, to allow
the use of editors such as Microsoft Frontpage.
- Fixed a bug in the default php3.ini directory - it wasn't defaulting to
/usr/local/lib properly.
- Added support for \r\n line endings
- Fixed a bug that may have prevented POST method variables from working
with certain scripts when using the CGI version.
- Convertor: Added support for single-quoted strings
- Fixed segfault bug in the Adabas module, with queries that don't return
rows (update, insert, etc).
December 22 1997 Version 3.0b2
- Changed variable type conversions that do not specify base to always use
base 10. "010" is no more 8, it is 10. Use intval ($x, 0) to get C-style
octal and hex numbers recognized.
- Fixed a possible segfault bug in several functions, when using the concat
operator and possibly other operators/functions.
- # is no longer accepted as a comment in php3.ini. Use ; instead.
- Added browscap support
- Configuration file directives are now case-sensitive
- Fixed msql_tablename() and msql_dbname()
- Added a PHP/FI 2.0 -> PHP 3.0 convertor
- Added support for shell/perl-style single quotes
- Added support for execution of external programs using backquotes ($a=`ls -l`)
- fixed mail() on windows, also fixed memory leaks in mail on windows
- added sendmail_from to handle return route on windows
- Changed the way the config file is searched. The file name is now
php3.ini (hardcoded), and it'll be looked for in: local directory, $PHPRC
and builtin path designated by ./configure under UNIX or Windows directory
under Windows.
- Fixed ereg_replace replacing empty matches and a one off buffer overflow
- Fixed File upload on windows platform
- Fixed a bug that caused 'HTTP/1.1 100 Continue' messages with
Internet Explorer 4.0 and certain scripts that receive POST variables
- Get/POST/Cookie data variables are from now *ALWAYS* strings. If you want
to use them in integer/real context, you must explicitly change their types.
This was done in order to avoid possible loss of data when doing these
conversions automatically.
- Variables named as keywords are now allowed (e.g. $function, $class, etc)
- Fixed a problem with msql() and mysql() with NULL fields
- Fixed a segfault bug with class declarations
- Fixed bugs with FOR loops and include() from within eval()
- Changed include() to be executed conditionally. PHP-3.0 efficient
unconditional include is now require()
December 08 1997 Version 3.0b1
- Switched to public beta test phase
- Generalized unset() and isset() to work on any type of variables, including
specific array indices or object properties (e.g., unset($a[4]) now works).
- Added support for object references inside encapsulated strings
(for example, 'echo "Username: $user->name"' now works)
- Added arbitary precision math support (basic operations with
unlimited range numbers, and support for unlimited decimal digits)
- Apache module can now handle preprocessed scripts (by using:
AddType application/x-httpd-php3-preprocessed .php3p
in the Apache configuration)
- Made settype() pass its first parameter by value. Improved it to be able
to convert to arrays and objects (originally by Steve Willer)
- Implemented CPU time limit on scripts when setitimer() is available
- Computed field names in the Sybase/CT and Sybase/DB modules are now named
computed, computed1, computed2, ...
- Added Sybase/CT client/server message handlers and updated the Sybase/DB ones
- Made the regexp function automatically take arguments by reference
when necessary
- Added builtin support for auto append and prepend in the parser level
- Improved the Sybase/CT sybase_query(). Should be more stable now, and
hopefully work with a wider range of queries. It's difficult to work
without docs, though, so it may still not be 100% right...
- Changed error messages to show error type, file and line with bold
- Added support for autoprepend and autoprepend
- Added some more warning flags if gcc is used
December 03 1997 Version 3.0a4
- Improved the internal functions API - no need to explicitly pass
parameters by reference to internal functions that specifically
require them, e.g. sort(), ksort(), reset(), count(), etc.
This is *STILL* downwards compatible with the previous alphas,
in the sense that you can explicitly pass the arguments by reference
if you want to.
- use srandom/random instead of srand/rand if available
- Added [m,My]sql_listfields() for downwards compatability
- -p now replaces .php3 extension with .php3p (otherwise it adds .php3p)
- Added C++ style comments (// comment)
- Fixed # commenting to terminate at a close PHP tag
- Added \0 back reference for full string match to *reg*_replace and
added backslash escaping to replace string
- Fixed a few bugs in the Sybase DB-library module.
- Added Sybase CT-library support. It should be considered experimental.
Syntax is identical to the one of the DB-library. Allows people to
connect to MS-SQL servers from Linux without having to pay for a
library!
- Beautified phpinfo()
- Add ImageColorClosest() and ImageColorExact() GD functions
- Make all .ini directives work as Apache .conf directives as well
- Added PHP2-like File() function with PHP3 URL support
- Upgraded the Sybase interface. It's practically MySQL compatible now!
Among other things, added sybase_fetch_array() and sybase_fetch_object().
- Fixed problem in multi dimensional array handling and self modifying
operators (+=, -=, etc).
- Safe Mode file open implementation
- SVR3 portability problem fix
November 23 1997 Version 3.0a3
- Made the global statement behave like PHP 2 with undefined variables
- Added msql_fetch_object() and msql_fetch_array()
- Switched between the 1st and 2nd parameters to explode(), so that it acts
like split()
- Fixed passthru(), exec() and system() functions
- Implemented second optional parameter to intval() to specify conversion base
(The default is to assume you want to do a base 10 conversion.)
- Implemented SQL safe mode for MySQL
- Read UploadTmpDir from php3.ini instead of apache conf files
- Added mysql_fetch_object() and mysql_fetch_array()
- Changed function->old_function. function is now an alias to cfunction.
- Split the magic_quotes directive to get/post/data and other
- Added generic copy() function
- Added a $GLOBALS[] array, which contains all global variables
- Fix broken getimagesize() function
- Made mysql_fetch_field() and msql_fetch_field() optionally accept a 2nd argument
- Fixed mysql_data_seek() and msql_data_seek()
- Changed list assignment to list(...) and array init to array(...)
- Made <?php_track_vars?> work
- cgi when not in debug mode uses regular malloc(), free() functions now
- Added preliminary support for perl-style list assignments
- Fixed a bug in mysql_result() and msql_result() when specifying table
- renamed internal error-handling function and levels
- Added basename and dirname functions similar to sh counterparts
- Added base64_encode() and base64_decode()
- Support Basic authorization for http url includes
- Added parse_url() function to extract url components
- Made it possible to use anonymous ftp on URL includes
- Fixed url includes to handle different URLs better
- Fixed mysql_field*() functions
- Made mysql_connect() smarter, after a mysql_close() (applies to msql and pgsql too)
November 6 1997 Version 3.0a2
- Fixed a segfault bug caused by non-persistent connect in [m,My,Postgres]SQL modules
- Fix command line argument handling
- Made empty array list assignments work ($a=({});)
- Made '$' escaping optional when a variable name parsing isn't possible
- Added support for mysql_[p]connect(host) and mysql_[p]connect(host,user)
- New layout in phpinfo()
- Update Oracle extension to use php3_list functions
- Add includepath support
- Add #!php shell script escape support
- Change name of CGI/command line version from php3.cgi to php
- Add SNMP extension
- show_source() support
- Parsing of command-line args for CGI version
- Support for backreferences in ereg_replace
- Support for hexadecimal numbers directly at the scanner level
- Support octal numbers directly at the scanner level
- Fixed problem with huge html files (with little or no php code)
- Fix eval() empty string argument core dump
- renamed 'install' to 'setup' to be more accurate and avoid name conflict
- Fixed Oracle compilation
- Fixed mSQL 1.0 compilation
- Fixed a problem in the mSQL, MySQL and PostgresSQL drivers and NULL fields.
- Fixed the GLOBAL statement to be able to declare an array.
October 29 1997 Version 3.0a1
- Start with excellent new parser from Andi and Zeev
-83
View File
@@ -1,83 +0,0 @@
This is the ChangeLog from PHP3 as of Apr 12 1999.
Entries should be removed from this file, if you transfer changes
over to PHP4.
============================================================================
?? 1999, Version 3.0.8
- added Oracle-OCI8 persistent connections
- fixed OCIDefineByName crash.
- fixed some NULL-column related problems in OCI8-module.
- Some Informix driver improvements.
- PUT method support (mlemos@acm.org)
- Fix parameter count problem in odbc_setoption()
- Really fix implode() this time. The fix in 3.0.7 was bogus
- Make fgetss() slightly smarter
- Add strip_tags() which uses the fgetss state-machine but acts on a string
March 1 1999, Version 3.0.7
- Added pdf_put_image and pdf_execute_image
- Initial work on an ImageMagick module - doesn't do anything yet
- Make configure script detect Netscape's LDAP SDK automagically
- Fixed Oracle-OCI8 module for windows.
- Add OCIRowCount function. (Number of affected rows for update-statements)
- Add OCIDefineByName function.
- Change the behaviour of open_basedir. It's now possible to supply more
than one directory. open_basedir paths from parent directories are now
automatically inherited.
- fix rand() and mt_rand() to make the ranges work correctly
- htmlspecialchars() and htmlentities() are now binary safe.
- Add extract() function.
- Oracle-OCI8 driver now supports BLOBS/CLOBS and IN/OUT binding of local php
variables.
- Clean up apxs build
- Add INSTALL.REDHAT file to walk RedHat users through the install
- Added optional second argument to mysql_fetch_array(); MYSQL_ASSOC will
cause the resulting array to contain the associative indices only,
MYSQL_NUM will cause the array to contain the numeric indices only (like
mysql_fetch_row()) and MYSQL_BOTH would cause them both to be defined
(default).
- Backport the Zend debugging memory manager into the PHP 3.0.x tree.
- Add function_exists() function.
- Add another version of WDDX module
(we need to pick a single implementation here)
- Fixed includes for iODBC to support both the old and the new LGPL version
- Fix implode() bug - When imploding an array that contained unset() elements
it wasn't correctly skipping past these
- Add connection_status() function. This returns the raw bitfield which
indicates whether the script terminated due to a user abort, a timeout
or normally. Note that if ignore_user_abort is enabled, then both the
timeout state and the user abort state can be active
- Add connection_timeout() function. This one can be called in a shutdown
function to tell you if you got there because of a timeout
- Add ignore_user_abort() function and .ini/.conf directive of same name
- Fix connection abort detection code - It should now work reliably with
Apache. Also added a user-level connection_aborted() function designed to
let people check whether the user aborted the connection in a user-level
shutdown function.
- Add pfsockopen() function
- Improvements in FreeType support: Macintosh fonts work, and non-antialiased
output is considerably cleaner <mka@satama.com>
- Fixed checkdate() function, range of valid years is now 0 to 32767
- hw_insertdocument() returns object id now
- Add pdf_open() warning in configure and documentation
- Add diskfreespace() function
- Added aspell support
- Iptcparse would sometimes find a wrong tag.
- Force var_dump() to output headers
- Add optional 3th parameter to ora_fetchinto.
- Serialize and var_dump no longer show array elements that
have been unset.
- Add IptcEmbed() function (can replace an APP13-Marker in a JPEG file)
- Add OCI8 module for Windows
- Fix bug in pdf_close() function
- Add WDDX support (see http://www.wddx.org for more info)
- Add similar_text() function
- Constructors of parent classes weren't accessible to derived classes (as
of 3.0.6). Fixed.
- Introduce simple regex compilation cache
+233 -27
View File
@@ -1,25 +1,67 @@
Installation Instructions for PHP 4.0
-------------------------------------
For the impatient here is a quick set of steps that will build PHP
as an Apache module for Apache 1.3.0 with MySQL support. A more verbose
explanation follows.
For the impatient here is a quick set of steps that will build PHP as
first a dynamic Apache module (DSO) for Apache 1.3.x with MySQL support
and then a static module. A more verbose explanation follows.
Note! Only install either the static module or the dynamic one. Do not
install both.
If you want both PHP 3 and 4 modules in the same Apache server, check the
bottom of this file for instructions.
INSTALLATION WITH THE ZEUS WEB SERVER:
--Please see the 'README.Zeus' file included in this distribution
QUICK INSTALL (DSO)
For this to work your Apache httpd must have mod_so enabled.
Check using httpd -l. You should see something like:
Compiled-in modules:
http_core.c
mod_so.c
Chances are you will see a lot more modules than these two. That's ok,
as long as mod_so.c shows up you can proceed with the following steps:
$ gunzip -c php-4.0.x.tar.gz | tar xf -
$ cd php-4.0.x
$ ./configure --with-mysql --with-apxs
$ make
$ make install
If you get an error telling you that the apxs script could not be found,
look for it on your system and if you find it, provide the full path to it
as: --with-apxs=/path/to/apxs
The only thing left to do is to edit your httpd.conf file and make sure the
PHP 4 mime type is there and uncommented. You need a line that looks like
this:
AddType application/x-httpd-php .php
Then restart your server (apachectl restart) and you should be able to
serve up PHP files now. Make a test file called test.php and put some
PHP tags in it. Like <?phpinfo()?>, for example.
QUICK INSTALL
QUICK INSTALL (Static)
gunzip apache_1.3.x.tar.gz
tar xvf apache_1.3.x.tar
gunzip php-4.0.x.tar.gz
tar xvf php-4.0.x.tar
cd apache_1.3.x
./configure --prefix=/www
cd ../php-4.0.x
./configure --with-mysql --with-apache=../apache_1.3.x --enable-track-vars
make
make install
cd ../apache_1.3.x
./configure --prefix=/www --activate-module=src/modules/php4/libphp4.a
$ gunzip -c apache_1.3.x.tar.gz | tar xf -
$ cd apache_1.3.x
$ ./configure
$ cd ..
$ gunzip -c php-4.0.x.tar.gz | tar xf -
$ cd php-4.0.x
$ ./configure --with-mysql --with-apache=../apache_1.3.x --enable-track-vars
$ make
$ make install
$ cd ../apache_1.3.x
$ ./configure --prefix=/www --activate-module=src/modules/php4/libphp4.a
(The above line is correct! Yes, we know libphp4.a does not exist at this
stage. It isn't supposed to. It will be created.)
make
@@ -33,25 +75,69 @@ Edit your httpd.conf or srm.conf file and add:
VERBOSE INSTALL
Chances are you are reading this because the quick install steps above
did not work for you. If this is the case, congratulations, you are
among the elite few that actually reads documentation. It really is
not a difficult install and once you have done it once you will fly
through it.
Installing PHP can be done in four simple steps:
1. Unpack your distribution file.
You will have downloaded a file named something like php4xn.tar.gz.
Unzip this file with a command like: gunzip php4xn.tar.gz
You will have downloaded a file named something like php-4.0.x.tar.gz.
Unzip this file with a command like: gunzip php-4.0.x.tar.gz
Next you have to untar it with: tar -xvf php4xn.tar
Next you have to untar it with: tar -xvf php-4.0.x.tar
This will create a php-4.0.x directory. cd into this new directory.
2. Configure PHP.
2a. Configure PHP (Dynamic Module) - Skip to 2b if you wish to build
a static module
You now have to choose the options you would like. There are quite
a few of them. To see a list, type: ./configure --help
You can also use the supplied 'setup' script, which will ask you
a series of questions and automatically run the configure script
for you.
The only options that you are likely to want to use are the ones in
the last section entitled, "--enable and --with options recognized:"
A popular choice is to build the Apache module version. In order to
build PHP as a dynamic module for Apache-1.3.x you have to first have
Apache installed. Assuming Apache is already installed, make sure
the shared object module is enabled. To check this, type: httpd -l
You should see something like:
Compiled-in modules:
http_core.c
mod_so.c
You will most likely have a lot more modules than what is shown here.
As long as mod_so.c shows up in the list, PHP should be happy.
Now, type: ./configure --with-mysql --with-apxs
If you get an error telling you that the apxs script could not be found,
look for it on your system and if you find it, provide the full path to it
as: --with-apxs=/path/to/apxs
You might also want other flags on this configure line. --with-mysql
is just an example.
There are a few things that can go wrong during this configure step.
The most common is that you have asked for an option and that the
configure script can not find the files required to enable this
option in PHP. Chances are you can provide the full path to the
base directory under which the related files were installed. For
example, if you have installed the GD library in /opt/gd which means
that /opt/gd/include has your GD header files and /opt/gd/lib contains
your GD library files, you would use --with-gd=/opt/gd
Skip to step 3 for compilation and installation instructions.
2b. Configure PHP (Static Module) - Skip if you performed 2a
You now have to choose the options you would like. There are quite
a few of them. To see a list, type: ./configure --help
The only options that you are likely to want to use are the ones in
the last section entitled, "--enable and --with options recognized:"
@@ -78,8 +164,16 @@ Installing PHP can be done in four simple steps:
Apache Configure script at least once before compiling PHP. It
doesn't matter how you have Apache configured at this point.
Skip to step 3b at this point.
3. Compile and install the files. Simply type: make install
3a. Dynamic Module Installation
Nothing else is needed here. Proceed to step 4a.
3b. Static Module Installation
For the Apache module version this will copy the appropriate files
to the src/modules/php4 directory in your Apache distribution if
you are using Apache 1.3.x. If you are still running Apache 1.2.x
@@ -137,11 +231,51 @@ Installing PHP can be done in four simple steps:
somewhere. Re-edit Configuration and try again. If it goes well,
type: make
4. Setting up the server.
Assuming it compiles without errors, proceed to step 4b.
4a. Setting up the server. (Dynamic Module)
The make install command in step 3 should have done most of your
work for you. It actually edits your httpd.conf file and tries to
enable the dynamic PHP module. To verify this, look for a line that
looks like this:
LoadModule php4_module libexec/libphp4.so
The actual path before the libphp4.so part might differ slightly. This
is likely fine. If you are paranoid you can examine the output from the
make install step to see where the libphp4.so file was actually put and
place the full path to this file on this LoadModule line.
If somewhere in your httpd.conf file you have a ClearModuleList line
then you also need this line:
AddModule mod_php4.c
And finally you need to tell Apache which file extension should trigger
PHP. You do this by creating a special mime type and associating it
with an extension. We suggest using:
AddType application/x-httpd-php .php
You are however free to use any extension you wish, including .html.
Note! If a line has a # at the beginning, then it is commented out
and you need to remove the # for that line to take effect.
Once you have made these changes you should be ready to restart your
server and try it out. Type: apachectl restart
The create a test file named test.php in your web tree somewhere and
put some test PHP tags in it. <?phpinfo()?> is a good first test.
This tag tells PHP to do a braindump and tells you all sorts of things
about itself.
4b. Setting up the server. (Static Module)
You should now have a new httpd binary. Shut down your existing server,
if you have one, and copy this new binary overtop of it. Perhaps make
a backup of your previous one first. Then edit your conf/srm.conf file
a backup of your previous one first. Then edit your conf/httpd.conf file
and add the line:
AddType application/x-httpd-php .php
@@ -155,5 +289,77 @@ Installing PHP can be done in four simple steps:
Any file ending in .phps will now be displayed with full colour syntax
highlighting instead of being executed.
When you are finished making changes to your srm.conf file, you can
start up your server.
When you are finished making changes to your httpd.conf file, you can
start up your server. Note that on some older server setups, the
AddType lines are in the conf/srm.conf file instead of conf/httpd.conf.
Note! If a line has a # at the beginning, then it is commented out
and you need to remove the # for that line to take effect.
WHY DISABLING -fPIC WORKS ON LINUX
From: Martin v. Loewis <martin@loewis.home.cs.tu-berlin.de>
To: glibc-linux@ricardo.ecn.wfu.edu
Subject: Re: Shared library -shared vs. -fpic
[In reply to Kaz Kylheku <kaz@ashi.footprints.net>]
> PIC stands for Position-Independent Code.
Correct.
> Code isn't position-independent (or ``relocatable'') cannot be
> loaded at an arbitrary address;
Wrong.
> it requires some references to be patched at load time.
Correct.
> Shared libraries need to be relocatable because it's not known
> beforehand what address they will be loaded at
Correct, depending on the meaning of "relocatable". PIC code typically
does not contain relocations; that's why its position-independent.
> Just because you don't specify -fPIC doesn't mean that the compiler
> won't emit position-independent code; the option prevents it from
> emitting position-dependent code in situations where it otherwise
> would.
Correct. However, a non-trivial shared library typically won't be
position-independent unless explicitly compiled with
-fPIC. Linux/glibc indeed does not require a shared library to be
position-independent; instead, it will perform the relocations in the
binary, even if they refer to code pages. As a result, those relocated
pages won't be shared across processes, anymore.
Regards,
Martin
USING PHP 3 AND PHP 4 AS CONCURRENT APACHE MODULES
Recent operating systems provide the ability to perform versioning and
scoping. This features make it possible to let PHP 3 and PHP 4 run as
concurrent modules in one Apache server.
This feature is known to work on the following platforms:
- Linux with recent binutils (binutils 2.9.1.0.25 tested)
- Solaris 2.5 or better
- FreeBSD (3.2, 4.0 tested)
To enable it, configure PHP 3 and PHP 4 to use APXS (--with-apxs) and the
necessary link extensions (--enable-versioning). Otherwise, all standard
installations instructions apply. For example:
$ ./configure \
--with-apxs=/apache/bin/apxs \
--enable-versioning \
--with-mysql \
--enable-track-vars
If this also works on your platform or if you know a way to do it, please
report it to our bug database at http://bugs.php.net
+28 -16
View File
@@ -1,6 +1,6 @@
--------------------------------------------------------------------
The PHP License, version 2.0
Copyright (c) 1999 The PHP Group. All rights reserved.
The PHP License, version 2.02
Copyright (c) 1999, 2000 The PHP Group. All rights reserved.
--------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -17,25 +17,37 @@ are met:
3. The name "PHP" must not be used to endorse or promote products
derived from this software without prior permission from the
PHP Group. This does not apply to add-on libraries or tools
that work in conjunction with PHP. In such a case the PHP
name may be used to indicate that the product supports PHP.
PHP Group. This does not apply to add-on libraries or tools
that work in conjunction with PHP. In such a case the PHP
name may be used to indicate that the product supports PHP.
4. The PHP Group reserves the right to modify the PHP license at
any time and without prior notice, as long as the changes keep
the free and open source nature of PHP.
4. The PHP Group may publish revised and/or new versions of the
license from time to time. Each version will be given a
distinguishing version number.
Once covered code has been published under a particular version
of the license, you may always continue to use it under the
terms of that version. You may also choose to use such covered
code under the terms of any subsequent version of the license
published by the PHP Group. No one other than the PHP Group has
the right to modify the terms applicable to covered code created
under this License.
5. Redistributions of any form whatsoever must retain the following
acknowledgment:
"This product includes PHP, freely available from
http://www.php.net/".
http://www.php.net/".
6. Permission to freely distribute and use Zend as an integrated
part of PHP is granted, under the conditions of version 0.91
of the Zend License.
The license is bundled with the Zend engine, and is available
at http://www.zend.com/license/0_91.txt, or by contacting
license@zend.com.
6. The software incorporates the Zend Engine, a product of Zend
Technologies, Ltd. ("Zend"). The Zend Engine is licensed to the
PHP Association (pursuant to a grant from Zend that can be
found at http://www.php.net/license/ZendGrant/) for
distribution to you under this license agreement, only as a
part of PHP. In the event that you separate the Zend Engine
(or any portion thereof) from the rest of the software, or
modify the Zend Engine, or any portion thereof, your use of the
separated or modified Zend Engine software shall not be governed
by this license, and instead shall be governed by the license
set forth at http://www.zend.com/license/ZendLicense/.
@@ -57,7 +69,7 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
This software consists of voluntary contributions made by many
individuals on behalf of the PHP Group.
The PHP Group can be contacted via Email at php-group@php.net.
The PHP Group can be contacted via Email at group@php.net.
For more information on the PHP Group and the PHP project,
please see <http://www.php.net>.
+129
View File
@@ -0,0 +1,129 @@
List of PHP maintainers
=======================
Status legend
-------------
Supported: Someone is actually paid to look after this.
Maintained: Someone actually looks after it.
Odd Fixes: It has a maintainer but they don't have time to do
much other than throw the odd patch in. See below..
Orphan: No current maintainer [but maybe you could take the
role as you write your new code].
Obsolete: Old code. Something tagged obsolete generally means
it has been replaced by a better system and you
should be using that.
--------------------------------------------------------------------------------
EXTENSION: apache
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: cybercash
PRIMARY MAINTAINER: Evan Klinger <evan715@sirius.com>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: dba
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: dbase
PRIMARY MAINTAINER: Jim Winstead <jimw@php.net>
STATUS: Odd Fixes
--------------------------------------------------------------------------------
EXTENSION: fdf
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: gd
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: hyperwave
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: informix
PRIMARY MAINTAINER: Danny Heijl <Danny.Heijl@cevi.be>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: interbase
PRIMARY MAINTAINER: Jouni Ahto <jah@mork.net>
STATUS: Odd Fixes
--------------------------------------------------------------------------------
EXTENSION: java
PRIMARY MAINTAINER: Sam Ruby <rubys@us.ibm.com>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: ldap
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
STATUS: Odd Fixes
--------------------------------------------------------------------------------
EXTENSION: mcrypt
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: mhash
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: mssql
PRIMARY MAINTAINER: Frank M. Kromann <fmk@swwwing.com>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: oci8
PRIMARY MAINTAINER: Thies C. Arntzen <thies@digicol.de>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: oracle
PRIMARY MAINTAINER: Thies C. Arntzen <thies@digicol.de>
STATUS: Maintained
COMMENT: Using the new OCI8 driver is encouraged where possible.
--------------------------------------------------------------------------------
EXTENSION: pcre
PRIMARY MAINTAINER: Andrei Zmievski <andrei@ispi.net>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: pdf
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: pgsql
PRIMARY MAINTAINER: Jouni Ahto <jah@mork.net>
STATUS: Odd fixes
--------------------------------------------------------------------------------
EXTENSION: posix
PRIMARY MAINTAINER: Kristian Köhntopp <kris@koehntopp.de>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: recode
PRIMARY MAINTAINER: Kristian Köhntopp <kris@koehntopp.de>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: session
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: snmp
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
STATUS: Odd Fixes
--------------------------------------------------------------------------------
EXTENSION: swf
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: wddx
PRIMARY MAINTAINER: Andrei Zmievski <andrei@ispi.net>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: xml
PRIMARY MAINTAINER: Thies C. Arntzen <thies@digicol.de>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: yaz
PRIMARY MAINTAINER: Adam Dickmeiss <adam@indexdata.dk>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: zlib
PRIMARY MAINTAINER: Stefan Roehrich <sr@linux.de>
STATUS: Maintained
--------------------------------------------------------------------------------
+11 -1
View File
@@ -11,7 +11,17 @@ dbase Working
aspell Working
imap Working
ldap Working
oci8 Working (but no blob-support yet)
oci8 Working
oracle Working
iptc Working
informix Working
zlib Working
sysvshm Working
odbc Working (except for persistent connections)
MS SQL Working (tested on phpts and isapi versions)
snmp Working
gettext Working
mcal Working
interbase Working
posix Working
recode Working
+42 -224
View File
@@ -1,238 +1,56 @@
# +----------------------------------------------------------------------+
# | PHP HTML Embedded Scripting Language Version 4.0 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-1999 PHP Development Team (See Credits file) |
# +----------------------------------------------------------------------+
# | This program is free software; you can redistribute it and/or modify |
# | it under the terms of one of the following licenses: |
# | |
# | A) the GNU General Public License as published by the Free Software |
# | Foundation; either version 2 of the License, or (at your option) |
# | any later version. |
# | |
# | B) the PHP License as published by the PHP Development Team and |
# | included in the distribution in the file: LICENSE |
# | |
# | This program is distributed in the hope that it will be useful, |
# | but WITHOUT ANY WARRANTY; without even the implied warranty of |
# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
# | GNU General Public License for more details. |
# | |
# | You should have received a copy of both licenses referred to here. |
# | If you did not, or have any questions about PHP licensing, please |
# | contact core@php.net. |
# +----------------------------------------------------------------------+
#
# $Id$
#
ZEND_DIR = $(srcdir)/Zend
SUBDIRS = Zend main ext sapi $(TSRM_DIR) $(REGEX_DIR) . $(PEAR_DIR)
prefix = @prefix@
exec_prefix = @exec_prefix@
srcdir = @srcdir@
VPATH = @srcdir@
bindir = @bindir@
LTLIBRARY_NAME = libphp4.la
LTLIBRARY_SOURCES = stub.c
top_builddir = .
LTLIBRARY_DEPENDENCIES = \
Zend/libZend.la \
sapi/$(PHP_SAPI)/libsapi.la \
main/libmain.la \
$(REGEX_LIB) \
$(EXT_LTLIBS) \
$(TSRM_LIB)
ZEND_DIR = $(srcdir)/libzend
SUBDIRS=libzend ext @TSRM_DIR@
LTLIBRARY_LDFLAGS = -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS)
LTLIBRARY_LIBADD = $(LTLIBRARY_DEPENDENCIES) $(EXTRA_LIBS)
PACKAGE = @PACKAGE@
VERSION = @VERSION@
LN_S = @LN_S@
CC = @CC@
AR = ar rc
BINNAME = @BINNAME@
INSTALL_IT = @INSTALL_IT@
EXTRA_LIBS = @EXTRA_LIBS@
EXT_LIBS = @EXT_LIBS@
INCLUDES = @INCLUDES@
INCLUDE = -I$(srcdir) -I. -I$(ZEND_DIR) -I$(srcdir)/TSRM $(INCLUDES)
PROF_CFLAGS =
CFLAGS_SHLIB = @CFLAGS_SHLIB@
LDFLAGS_SHLIB = @LDFLAGS_SHLIB@
LDFLAGS_SHLIB_EXPORT = @LDFLAGS_SHLIB_EXPORT@
CPPFLAGS = @CPPFLAGS@
CFLAGS = @CFLAGS@ $(CFLAGS_SHLIB) $(CPPFLAGS) $(INCLUDE) @DEBUG_CFLAGS@ @STRONGHOLD@ $(PROF_CFLAGS)
LDFLAGS = @RPATHS@ @LDFLAGS@ $(LDFLAGS_SHLIB) $(LDFLAGS_SHLIB_EXPORT) -L$(ZEND_DIR)
REGCFLAGS = $(CFLAGS)
RANLIB = @RANLIB@
YACC = @YACC@
MAINT = @MAINT@
APXS = @APXS@
APXS_LDFLAGS = $(EXTRA_LIBS) $(LIBS)
APXS_EXP = @APXS_EXP@
WARNING_LEVEL = @WARNING_LEVEL@
LEX_CFLAGS = -w$(WARNING_LEVEL) @LEX_CFLAGS@
EXT_SHARED = @EXT_SHARED@
PROGRAM_NAME = php
PROGRAM_SOURCES = stub.c
PROGRAM_LDADD = libphp4.la
PROGRAM_LDFLAGS = -export-dynamic
PROGRAM_DEPENDENCIES = $(PROGRAM_LDADD)
SOURCE = main.c internal_functions.c snprintf.c php3_sprintf.c \
configuration-parser.c configuration-scanner.c request_info.c \
safe_mode.c fopen-wrappers.c php3_realpath.c alloca.c output.c \
php_ini.c SAPI.c cgi_main.c rfc1867.c dlist.c
OBJS = main.o internal_functions.o snprintf.o php3_sprintf.o \
configuration-parser.o configuration-scanner.o request_info.o \
safe_mode.o fopen-wrappers.o php3_realpath.o alloca.o output.o \
php_ini.o SAPI.o cgi_main.o rfc1867.o dlist.o
targets = $(LTLIBRARY_NAME) $(PHP_PROGRAM)
PHPLIBS = -Llibzend -lzend -Lext -lphpext
LIBS = $(PHPLIBS) $(EXTRA_LIBS) @LIBS@
install_targets = install-sapi install-modules
all: $(BINNAME)
include $(top_srcdir)/build/rules.mk
include $(top_srcdir)/build/library.mk
include $(top_srcdir)/build/program.mk
all-recursive clean-recursive distclean-recursive \
maintainer-clean-depend-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
for subdir in $(SUBDIRS); do \
target=`echo $@ | sed s/-recursive//`; \
echo "Making $$target in $$subdir"; \
(cd $$subdir && $(MAKE) $$target) || fail=yes; \
done && test -z "$$fail"
# CGI binary or fhttpd module
php: all-recursive $(OBJS) @REGEX_LIB@ @FHTTPD_LIB@ @TSRM_LIB@
$(CC) $(CFLAGS) -o $(BINNAME) $(LDFLAGS) $(OBJS) $(LIBS)
# Apache modules
libphp4.a libmodphp4.a: all-recursive $(OBJS) @REGEX_LIB@
$(AR) $@.tmp $(OBJS)
$(srcdir)/scripts/armerge $@ $@.tmp ext/libphpext.a libzend/libzend.a @TSRM_LIB@
@rm -f $@.tmp
$(RANLIB) $(BINNAME)
# Apache modules
libmodphp4-so.a: all-recursive $(OBJS) @REGEX_LIB@
$(AR) $@.tmp $(OBJS)
$(srcdir)/scripts/armerge $@ $@.tmp ext/libphpext.a libzend/libzend.a @TSRM_LIB@
@rm -f $@.tmp
$(RANLIB) libmodphp4-so.a
# Apache 1.3 shared module
libphp4.so: $(srcdir)/mod_php4.c libmodphp4-so.a @REGEX_LIB@
-@test -f ./mod_php4.c || test -L ./mod_php4.c || $(LN_S) $(srcdir)/mod_php4.c ./mod_php4.c
-@test -f ./mod_php4.c || test -h ./mod_php4.c || $(LN_S) $(srcdir)/mod_php4.c ./mod_php4.c
$(APXS) $(INCLUDE) -c -o libphp4.so @RPATHS@ ./mod_php4.c libmodphp4-so.a $(APXS_LDFLAGS) $(APXS_EXP)
regex/libregex.a:
(cd regex; $(MAKE) lib)
configuration-parser.h configuration-parser.c: $(srcdir)/configuration-parser.y
bison -p cfg -v -d $(srcdir)/configuration-parser.y -o configuration-parser.c
configuration-scanner.o: configuration-scanner.c
$(CC) $(CFLAGS) $(LEX_CFLAGS) -c configuration-scanner.c
configuration-scanner.c: $(srcdir)/configuration-scanner.l
flex -Pcfg -oconfiguration-scanner.c -i $(srcdir)/configuration-scanner.l
clean: clean-recursive
-rm -f libphp4.a libmodphp4.a libphp4.so php *.o
-rm -f test/php.desc test/php.in test/php.out test/php.test
-rm -f test/a.tmp test/b.tmp test/test.dbm*
distclean: clean distclean-recursive
-rm -f *-parser.[ch] *-scanner.c *.output
-rm -f config.status config.cache config.log
-rm -f Makefile Makefile.depend php_config.h build-defs.h
-rm -f libphp4.module stamp-h
-rm -f regex/*.o regex/*.a regex/*.ih
-rm -f doc/checkdoc doc/funcparse doc/version.ent
-rm -f do-conf test/test.log
-rm -f doc/Makefile regex/Makefile
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
dist: distdir
-chmod -R a+r $(distdir)
tar chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
distdir:
-rm -rf $(distdir)
files=`echo *` ;\
mkdir $(distdir) ;\
for file in $$files ; do \
d=$(srcdir); \
if test -d $$d/$$file ; then \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
(cd $(distdir) ; $(MAKE) distclean)
cd $(distdir)/libzend ;\
flex -Pzend -ozend-scanner.c -i zend-scanner.l ;\
bison -p zend -v -d zend-parser.y -o zend-parser.c
cd $(distdir) ;\
flex -Pcfg -oconfiguration-scanner.c -i configuration-scanner.l ;\
bison -p cfg -v -d configuration-parser.y -o configuration-parser.c
find $(distdir) -name CVS -o -name .cvsignore | xargs rm -rf
maintainer-clean-depend: maintainer-clean-depend-recursive
bench: $(BINNAME)
./$(BINNAME) -c. tests/bench.phtml
# can't use a single rule for this because 'test' is a directory
test: regression
regression check: $(BINNAME)
cd test && ./testall
config.status: configure
./config.status --recheck
build-defs.h php_config.h: stamp-h
stamp-h: php_config.h.in config.status
CONFIG_FILES='build-defs.h stamp-h' ./config.status
Makefile: Makefile.in config.status
CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
#
# You must use '--enable-maintainer-mode' with configure to enable
# these rules, which requires autoconf be installed.
#
configure: @MAINT@ configure.in aclocal.m4
cd $(srcdir) && autoconf
php_config.h.in: @MAINT@ stamp-h.in
stamp-h.in: configure.in aclocal.m4 acconfig.h
cd ${srcdir} && autoheader && touch ${srcdir}/stamp-h.in
install: install-recursive $(BINNAME)
$(INSTALL_IT)
install-recursive:
if test "$(EXT_SHARED)" != ""; then \
for dir in X $(EXT_SHARED); do \
test -d ext/$$dir && (cd ext/$$dir; $(MAKE) install); \
install-sapi:
@$(LIBTOOL) --silent --mode=install cp libphp4.la $(phptempdir)/libphp4.la >/dev/null 2>&1
-@$(mkinstalldirs) $(bindir)
-@if test ! -r $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME); then \
for i in 0.0.0 0.0 0; do \
if test -r $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME).$$i; then \
$(LN_S) $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME).$$i $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME); \
break; \
fi; \
done; \
fi
$(INSTALL_IT)
indent: clean
indent -v -kr -cli4 -ts4 \
-T pval -T HashTable -T Bucket -T Token -T TokenCache -T TokenCacheManager \
-T switch_expr -T internal_function -T control_structure_data \
-T MemoryHashTable -T MemoryBucket \
-T pvalue_value -T Stack *.c *.h
rm -f *~
install-modules:
@test -d modules && \
$(mkinstalldirs) $(moduledir) && \
echo "installing shared modules into $(moduledir)" && \
rm -f modules/*.la && \
cp modules/* $(moduledir) >/dev/null 2>&1 || true
.c.o:
@rm -f $@
$(CC) $(CFLAGS) -c $< -o $@
# @bn=`echo $@ | sed -e 's#functions/##'`; test -f $@ || \
# (test "$@" != "$$bn" && test -f "$$bn" && mv $$bn $@)
install-su: install-modules
(cd pear && $(MAKE) install)
parser-scanner: configuration-parser.c configuration-scanner.c
depend: parser-scanner
$(CC) $(CFLAGS) -MM $(SOURCE) | perl -pe 's|regex/regex.h||;' > Makefile.depend
$(CC) $(CFLAGS) -MM $(FUNCTIONS_SOURCE) | perl -pe 's|^(.+\.o)|functions/$$1|; s|regex/regex.h||;' >> Makefile.depend
# Local Variables:
# tab-width: 4
# End:
.NOEXPORT:
+823
View File
@@ -0,0 +1,823 @@
PHP 4.0 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
28 Jun 2000, Version 4.0.1
- Fixed a possible crash in the LDAP modify code. (Eric Kilfoil)
- Fixed a bug in opendir(), which prevented readdir() from working properly if
the $dir argument wasn't explicitly specified (Zeev)
- Made --enable-discard-path work again. (Andi)
- Removed 8KB limit on line length of the file() function (Zeev)
- Disabled dl() when PHP is being used as a module inside a multithreaded web
server - it didn't work before, and caused weird results (Zeev)
- Added the ImageColorClosestHWB(), ImageCopyMerge() and ImagePaletteCopy()
functions. (Sterling)
- Added ImageCreateFromWBMP() function. (Jouni)
- Fixed problems with POST requests under the NSAPI module. (Roberto Biancardi)
- Added spliti() function. (Thies)
- Fixed serializer behaviour with regards to serializing objects whose class
definition was not available in the deserializing context. (Sascha)
- Improve memory cache performance and increase cache size. (Stas, Zend Engine)
- Added a crc32 checksum function - used by the UdmSearch search engine
and currently run through a system call. This will speed up the UdmSearch
php frontend significantly. (Rasmus)
- Modified in_array() to not touch array pointer. (Andrei)
- Added restore_error_handler(). (Zeev, Zend engine)
- Fixed erroneous file names and line numbers in error situations under the
multithreaded version of PHP - most noticeably Win32 (Zeev, Zend Engine)
- Fixed problem with CGI crashing on certain servers especially Windows Apache
& O'Reilly website (Andi)
- Added Pi3Web SAPI module; run ./configure --with-pi3web to enable this.
(Holger; zimpel@t-online.de)
- Enhanced WDDX functions to call __sleep() and __wakeup() when working on
objects. (Andrei)
- Changed WDDX to serialize arrays as structs only if needed. (Thies)
- Implemented max_execution_time under Win32 (Zeev)
- Updated strtotime() to handle many more formats. It now has complete
feature parity with GNU date command. (Andrei)
- Added support for multiple arguments in unset(). (Faisal, Zend Engine)
- Functions that expect a resource but are passed something else now return
NULL instead of FALSE. (Thies, Zend Engine)
- Fixed gmmktime(), on certain systems it incorrectly adjusted for the timezone
offset and daylight savings time. (Andrei)
- Moved VC++ Win32 project and workspace files to the win32 directory
(Zeev)
- Fixed checkdate() to not return true on non-numeric arguments (Rasmus)
- Added --enable-c9x-inline option for compilers which support the new C9x
standard. If you encounter undefined references to i_zend_is_true and
other symbols, you should enable this. (Sascha, Zend Library)
- Fixed a problem in ldap_add() and ldap_modify(), sometimes added trailing
garbage to the values (Stig Venaas)
- Fixed a problem with dbmopen() not handing 'c' correctly with dbm/db/ndbm
databases. (JimJag)
- Fixed a crash in number_format() when used with locales. (Andrei)
- Fixed an initialization problem in the MS-SQL problem that could cause
a crash in mssql_query() (Zeev)
- Upgraded PCRE to version 3.2 and fixed a bug when anchored pattern
matched an empty string. (Andrei)
- Fixed a bug that prevented PHP from paying attention to the extension_dir
directive with extensions that were loaded from the php.ini file (Zeev)
- Changed set_error_handler() to return the name of the previously defined
error handler, if any (Zeev, Zend Engine)
- Declared <?php_track_vars?> officially dead. It didn't work in PHP 4.0.0
either, but now it's gone for good (Zeev)
- Make convert_cyr_string() binary safe and stop it from corrupting other
PHP variables. (Andi)
- Added functions array_unique, array_intersect and array_diff (Stig Venaas)
- Fixed problem when using uninitialized values in comparisons with strings.
They behave as empty strings again just like in PHP 3.
(Andi & Zeev, Zend Engine)
- Fixed 'Z' flag in date() to adjust for daylight savings time. (Andrei)
- Fixed var_dump() not to modify the internal order of array elements (Zeev)
- Fixed stripcslashes() to remove to strip \ in unknown escapes instead of
leaving it. (Andrei)
- Changed WDDX to always serialize arrays as structs. (Andrei)
- Fixed include_once() to issue a warning in case the supplied file name is
not found (Zeev, Zend Engine)
- Fixed a bug in get_declared_classes() which could return the same class
multiple times under certain circumstances (Zeev, Zend Engine)
- Fixed a bug in rawurldecode() that would cause in rawurldecode() corrupting
its argument (Zeev)
- Parse errors (or other errors) in the php.ini files under Windows will no
longer mess up the HTTP headers in CGI mode and are now displayed in a
message box (Zeev)
- Fixed a crash in OCIFetchStatement() when trying to read after all data
has already been read. (Thies)
- fopen_wrappers() are now extensible via modules (Hartmut Holzgraefe)
- Make trim strip \0 to match php 3 (Rasmus)
- Added function imagecreatefromxbm(). (Jouni)
- Added function imagewbmp(). (Jouni, based on patch from Rune Nordbøe
Skillingstad)
- Added str_pad() for padding a string with an arbitrary string on left or
right. (Andrei)
- Made the short_tags, asp_tags and allow_call_time_pass_reference INI
directives work on a per-directory basis as well, e.g. from .htaccess
files. (Zeev)
- Added fflush() function. (Eric Huss)
- Fixed a problem with static variables, default function arguments and class
member variables, that contained array values. (Andi & Zeev, Zend Engine)
- Fix virtual() when used with output buffering (Marc Pohl)
- Clean up constants in flock() function and add optional 3rd arg which
is set to true on EWOULDBLOCK (Rasmus)
- Added functions pg_loimport(), pg_loexport(). (Jouni)
- Added SWF support to getimagesize() function (Derick Rethans)
- Added support for both indexed and non-indexed arrays of file uploads
eg. name="file[]" type="file" (Rasmus)
- Added create_function(), which gives the ability to create functions
on-the-fly (Zeev, Zend Engine)
- Added support for comparisons of arrays (with arrays) and objects (with
objects); The equality operator (==) performs an unordered comparison,
whereas the identity operator (===) performs an ordered comparison (Zeev,
Zend Engine)
- Allow all functions that receive user-defined function callbacks to accept
an array that contains an object and a method name, in place of a function
name, e.g. usort($array, array($obj, "ObjSort")) (Zeev, Zend Engine)
- Added set_error_handler() to allow custom error handling functions,
instead of the built-in error handling code (Zeev, Zend Engine)
- Renamed user_error() to trigger_error(); user_error() remains
defined for compatibility (Zeev, Zend Engine)
- Fix the global/static statements to require a trailing terminating
semi-colon ';'. (Andi, Zend Engine)
- Cleaned up PCRE extension and made it binary-safe. (Andrei)
- Added third argument to in_array(). If it's true, then in_array()
will use strict comparison instead of the default one. (Andrei)
- Added pg_trace() and pg_untrace (Dominic J. Eidson & Zeev)
- ignore_user_abort=Off is now default. (Thies)
- Added array_merge_recursive() that will recursively merge values
under the same keys. (Andrei)
- fixed crash in OCIParse when parsing invalid SQL. (Thies)
- Fixed a bug in mysql_connect() that made it ignore the socket argument, in
case of non-persistent connects (Zeev)
- Added disable_functions php.ini directive, to allow administrators to disable
certain functions for security reasons (Zeev)
- Fixed sessions on Win32. When setting the directory depth parameter in
save_path you need to now delimit it with a ';' instead of ':', e.g
"5;/tmp" instead of "5:/tmp" (Andi)
- Changed the Apache handler's return status to 'Declined' when a requested
PHP file could not be found. Returning 'Not Found' caused problems
in the ErrorDocument handler stage in that $REDIRECT_REDIRECT_ERROR_NOTES
was not getting set at all. Moving to 'Declined' should fix this and I
can't see any other side effects. (Rasmus)
- Fixed scanning decimal numbers in internationalized environments. They should
always be in standard US format e.g. 23.3. (Andi, Zend Engine)
- Added second argument to preg_quote() which allows quoting of
one additional character, usually the regex delimiter. (Andrei)
- Uncommitted outstanding OCI8 transactions are now rolled back
before the connection is closed. (Thies)
- ignore_user_abort() & friends should now work in CGI mode as well.
(Patch by daniel.braun@ercom.fr)
- Added extension YAZ (dickmeiss).
- Fixed a crash bug triggered by certain cases of class redeclarations
(Stanislav & Zeev, Zend Engine)
- Fixed min()/max() segfault. (Andrei)
- New module for reading EXIF header data from JPEG files. Most digital
cameras will embed all sorts of information about a picture inside the
jpeg images it generates. (Rasmus)
- Fixed basename() bug where "file.ext///" would not return the same
as "/path/file.ext///" (Rasmus)
- Added the swf_ortho function. (Sterling)
- Moved to virtual current working directory support. This highly improves the
functionality and stability of multi-threaded versions of PHP (Andi, Sascha)
22 May 2000, Version 4.0.0 Release
- Allow the writing of flash files to stdout.
- Fixed a crash bug in .phps syntax-highlighted files (Andi)
- Improved round() to allow specification of rounding precision.
(Andrei, Todd Kirby <kirbyt@yahoo.com>)
- Added SORT_REGULAR, SORT_NUMERIC, SORT_STRING flags that can be used with
non-user sort functions for precise sorting behavior. (Andrei)
- Fixed two 64-bit issues (startup crash, gethostbyaddr). (Sascha)
- NULL values are now preserved in the return value of mysql_fetch_array()
and mysql_fetch_object(). (Andrei)
- Ported InterBase module finally from PHP 3 to PHP 4. Full support for
InterBase 6. (Jouni)
- Added swf_definepoly for drawing polygons to the SWF functions. (Sterling)
- Ported imagegammacorrect from PHP3 to PHP4. (Sterling)
- Added array_rand() function. (Andrei)
8 May 2000, Version 4.0 Release Candidate 2
- NSAPI WIN32 Module compilable, untested (Shane)
- Apache WIN32 Module compilable and lightly tested. (Shane)
- Enabled assert() by default in php.ini-dist. (Andrei)
- Put in safeguards in case dynamic code evaluation in assert() and
preg_replace() with /e modifier fails. (Andrei)
- Fixed infinite recursion when serializing $GLOBALS[] in WDDX. (Andrei)
- Made WDDX serialization properly escape <, >, and &. Also speeded up
the serialization in general. (Andrei)
- Moved install-local to install-sapi for clarity. (Joey)
- Improved extension build framework. Refer to README.SELF-CONTAINED-EXTENSIONS
for an introduction. (Sascha)
- ImagePolygon() is no longer limited by a maximum number of polygons.
(Marc Pohl)
- Added configure time checking for bcmath package. (Joey, Sascha)
- Added get_declared_classes(). (Andrei, Zend Engine)
- Add initial NSAPI module from Jayakumar Muthukumarasamy. (Rasmus)
- Added the SWF module which allows you to create Macromedia Flash files via
libswf. (Sterling)
- Improved UNIX build system to support more vendor make tools (Sascha)
- Updated natural comparison/sorting algorithm by Martin Pool
<mbp@humbug.org.au>. (Andrei)
- Fixed a crash in array_multisort() that happened when empty arrays
were passed to it. (Andrei)
- Added substr_count() from Peter Kovacs. (Andrei)
- Add an optional third argument to fseek to indicate where to seek from.
(Andrei)
- OCIBindByName() will no longer complain about bindlength beeing zero. (Thies)
- Converted the IMAP module to the high performance API (Zeev)
- The fgetcsv() function now handles embedded end-of-line in a quoted field
(Nick Talbott)
- Added user_error(), to allow explicitly generate error messages from scripts
(Zeev, Zend Engine)
- Fixed a problem in long2ip() that occasionally returned incorrect IP address.
(Evan, Andrei)
- Fixed many memory leaks in the IMAP module (Stas, Andi, Zeev)
- Fixed bug in number_format (Jon Forsberg)
- Make error_prepend_string and error_append_string work (Rasmus)
- array_walk() now automatically resets the array. (Andrei)
- Added natural comparison/sorting routines strnatcmp(), strnatcasecmp(),
natsort(), and natcasesort(). These are useful for comparing and sorting
strings that contain numbers. Based on the code from Martin Pool
<mbp@humbug.org.au>. See http://www.linuxcare.com.au/projects/natsort/
for more info on natural sorting. (Andrei)
- Zeus Webserver support (version 3.3.6+) for ISAPI (Ben Mansell)
- Fixed several problems with the PATH_TRANSLATED and PHP_SELF under Apache
(Paul Gregg & Zeev)
- Ported ldap_get_values_len() function from PHP3 to PHP4. (Sterling)
- Fixed a problem in include_once() with non constant arguments (Andi & Zeev,
Zend Engine)
- Added php.ini-optimized (Zeev)
- Ported ldap_errno(), ldap_err2str() and ldap_error() from PHP3 to PHP4.
(Sterling)
- WDDX now defaults to ISO-8859-1. (Thies)
- Fixed crash resulting from IMAP's error handling (Stas)
- Added $HTTP_POST_FILES[filename][tmp_name] - it was previously impossible to
retrieve the temporary name of an uploaded file using $HTTP_POST_FILES[]
(Zeev)
- Made the IMAP and LDAP modules compilable under Windows and thread-safe
(Zeev)
- Fixed a problem when dealing with large POST blocks in CGI mode (Zeev)
- Added session_get_cookie_params() function. (Sterling)
- Fixed return of stristr() to no longer always be lowercased. (Andrei)
- Changed the Windows version of PHP so that a php.ini file is no
longer mandatory (Zeev)
- session_start() is now more verbose if headers cannot be send. (Thies)
- Fixed a memory leak when using assign-op bitwise operators on strings (Zeev,
Zend Engine)
- Added support for reading properties that require arguments in the COM
module - writing to them will only be supported in PHP 4.1 (Zeev)
- Fixed a very old legacy memory leak in the COM module (Zeev)
- Fixed problems with object-overloading support - noteably, COM and Java
(Zeev, Zend Engine)
- Fixed an overrun in WDDX. (Thies)
- Fixed a crash bug with modules loaded through dl() not properly freeing their
resources (Zeev, Zend Engine)
- Added localtime() function. (Sterling)
- Added the 'I' format option for the date function, this option will return
true or false depending on whether or not daylight savings time is in effect.
(Sterling)
- Added gmstrftime() function. (Sterling)
- snmp_walkoid is now an alias for snmp_realwalk. (Sterling)
- Fixed a bug that could cause a crash when using 'global' inside large include
files (Stas, Zend Engine)
- Added --enable-libgcc switch to force linking against libgcc (Sascha)
- Fixed dynamic loading where extension_dir had no trailing slash (Sascha)
- Fixed dynamic loading on OpenBSD (Sascha)
- Improved POSIX threads check. ZTS works now on at least Linux, Solaris,
FreeBSD and OpenBSD (Sascha, TSRM)
- Added !== operator support. (Torben, Zend Engine)
27 March 2000, Version 4.0 Release Candidate 1
- Added support for UCD-SNMP 4.1.x (Sascha)
- Fixed a data corruption bug in mysql_result(), if used in table.fieldname
mode (Zeev)
- Fixed a crash problem in func_num_args(), func_get_arg() and func_get_args()
when used as function arguments (Andi, Zend Engine)
- Added get_class_methods(string classname) function. (Andrei)
- Added 'I' switch to test whether or not DST is active. (Sterling)
- Fixed a data corruption bug in mysql_result(), if used in table.fieldname
mode (Zeev)
- Modified the registry INI entry reader (Win32) to work with drive letters.
For example, if you wish to wish to specify INI entries for C:\foo\bar, you
should create HKLM\PHP\Per Directory Values\C\foo\bar in the registry, and add
string values for each directive you want to override in this directory (Zeev)
- Fixed extract() for EXTR_PREFIX_SAME and EXTR_SKIP cases. (Andrei)
- stristr() no longer modifies it's arguments. (Thies)
- Don't default to iso-8859-1 since this confuses some browsers. (Rasmus)
- Make it possible to specify both a port and a socket
in mysql_[p]connect. (Rasmus)
- Added --disable-pic for disabling generating PIC for shared objects
on platforms which support it (i.e. Linux) (Sascha)
- serialize()/unserialize() now call __sleep() and __wakeup() when
working on objects. (Thies)
- renamed to_string() method to __string_value() for consistency.
(Thies, Zend Engine)
- Fixed a bug in the third argument to define()
- Added is_numeric() that returns true if the argument is a number
or a numeric string. (Andrei)
- domxml now supports libxml 2.0 Beta and drops support for older versions,
due to massive changes in libxml
- fixed possible crash in unserialize() if serialized data was
corrupted. (Thies)
- Changed $HTTP_STATE_VARS to $HTTP_SESSION_VARS. Use only the latter
version now! (Andrei)
- Added GD-JPEG Support (Rasmus)
- Prevent from loading dynamic PHP modules which were compiled with different
debug and thread safety modes than PHP, which resulted in a crash (Andi)
- connection_aborted() and friends work again (Thies)
- Upgraded to libtool 1.3.4 (Sascha)
- UNIX configure creates config.nice in the build directory now which allows
easy reuse of configuration options (Sascha)
- Added support for embedded MySQL client library. Unless you specify a path
to --with-mysql, the bundled MySQL client library will be used (Sascha)
- Added include_once() and require_once() functionality (Andi, Zend Engine)
- Removed support for pdflib < 3.0 (Uwe)
- Added auto-registration of everything in $HTTP_SESSION_VARS[] if
register_globals is turned off. (Andrei)
- Cleaned up extension namespace (Stig)
- OCINLogon() sessions are now closed again. (Thies)
- Added ip2long() and long2ip(),
courtesy of Faisal Nasim <faisal@nasim.org> (Andrei)
- Added ftruncate() and fstat(),
courtesy of Faisal Nasim <faisal@nasim.org> (Andrei)
- Added parse_ini_file(). Currently implemented in non thread safe version
of PHP, and currently lacks section support (Zeev)
- "none" is now equivalent with "" in Apache config directives (Stig)
- OCINLogon no longer crashes. (Thies)
- Fixed comparisons of (string) "nan" with (string) "nan". (Thies, Zend Engine)
- Switched back to the old $HTTP_*_VARS[] behavior - $HTTP_GET_VARS["foo"]
and $foo are no longer references to each other, but separate variables
like they were prior to PHP 4.0 Beta 4 (Zeev)
- Fixed Sybase-DB compilation (Zeev)
- Fixed a (fairly common) situation where error_reporting values would not be
properly restored after a call to error_reporting(), in between requests
(Zeev)
- The various $HTTP_*_VARS[] are now protected, and cannot be manipulated by
user input (Zeev)
- Added ini_set() as an alias to ini_alter() (Zeev)
- The string None is now recognized as a keyword by the php.ini processor, and
can be used to denote an empty string (Zeev)
- Added get_class_vars(string class_name) and get_object_vars(object obj)
functions. (Andrei, Zend Engine)
- Added pdf_set_parameter(), pdf_skew(), pdf_show_boxed() (Uwe)
- Fixed comparison of (string) "inf" with (string) "inf", which was erroneously
returning false (Zeev)
- Implemented default_charset and default_mimetype config directives (Stig)
- Ported T1lib support from PHP3. (Jouni)
- Fixed -DEAPI inheritance from APXS. (Sascha)
- Fixed possible crash in module-shutdown. (Thies)
- Fixed safe_mode_protected_env_vars INI directive (Zeev)
- Fixed getrusage() (Sascha)
- Fixed OCI8 crash when returning cursors from stored-procedures. (Thies)
21 February 2000 Version 4.0 Beta 4 patch level 1
- Fixed crash when magic_quotes were switched off. (Thies)
- Support for pdflib 2.30 (Uwe)
20 February 2000, Version 4.0 Beta 4
- Introduced $HTTP_POST_FILES[], that contains information about files uploaded
through HTTP upload (Zeev)
- Made PHP work under Microsoft Personal Web Server, under both Windows NT
workstation and Windows 95 (Zeev)
- Made multipart/form-data content obey to the variables_order directive (Zeev)
- Updated the browscap module to work with PHP 4.0 (Zeev)
- Recover gracefully in ISAPI after the client prematurely presses STOP (Andi)
- Fixed bug in unset() on array offsets which are referenced more than once
(Andi, Zend Engine)
- Improved ISAPI module - it should no longer be necessary to set PHP as
an ISAPI filter, only as an ISAPI extension, unless you wish to perform
authentication using PHP. This didn't yet get enough testing, but it
should work (Zeev)
- Fixed RFC1867 file upload under Windows (Zeev)
- Initital support for pdflib 2.20 (Uwe)
- Added PostgreSQL support for DB (Rui Hirokawa <louis@cityfujisawa.ne.jp>)
- Re-introduced "none" for disabling auto_prepend/append_file (Stig)
- Added DB/storage (Stig, PEAR)
- Introduced DB warnings (Stig, PEAR)
- Fixed overrun in strip_tags (Stas)
- Fixed crash in strip_tags() and related functions. (Thies)
- Workaround for bogus POST-Data from IE/Mac. (Thies)
Patch by Alain Malek <alain@virtua.ch>
- Finished the server abstraction layer; All of the PHP code is now shared
across different servers (Apache, CGI, IIS, etc.), except for thin
interface modules (Zeev)
- Added NULL-support in gettype(). (Thies)
- base64_decode() will decode POST data correct. (Thies)
Patch submitted by: Turadg Aleahmad <turadg@wise.berkeley.edu>
- Much more work on domxml. Build xml tree, create xml doc works (Uwe)
- Made foreach() work on objects. (Thies, Zend Engine)
- Added domxml extension based on libxml, still little functionality (Uwe)
- Fixed memory corruption in fgetss(), strip_tags() and gzgetss() (Zeev)
- Updated calendar dynamic library to work with PHP 4. (Evan)
- Added strncmp() function, courtesy of Walter. (Andrei)
- Made the output of var_dump() more informative. (Thies)
- Fixed some OCIBindByName() problems. (Thies)
- Protect the ISAPI module against exceptions. Stack overflows in scripts are
now nicely detected and handled (Zeev)
- Fixed possible buffer-overflow in base64_decode. (Thies)
- Fixed possible buffer-overflow in setcookie(). (Thies)
- Fixed signal() bug that could cause the Apache master process to
die. (Thies)
- Added session_set_cookie_params() function. (Andrei)
- If header information is sent after output has already been sent, the warning
message will now state the filename and line number at which the first output
was made (Zeev)
- Added the XML Expat library to the standard PHP source distribution thanks
to its author James Clark (Andi & Zeev)
- Added XML support to the default Win32 build (Andi & Zeev)
- Added socket_get_status() function. Renamed:
set_socket_timeout() -> socket_set_timeout()
set_socket_blocking() -> socket_set_blocking(). (Andrei)
- Added realpath() function. (Andrei)
- mktime interprets years in the range 0-70 now as 2000-2070. You can
continue to specify the complete year (i.e. 1920) (Sascha)
- Added the ability to control the environment variables the user is allowed
to change in Safe Mode, using INI directives (Zeev)
- Fixed a crash bug in strtr() working on large input strings (Zeev)
- Ora_GetColumn()/Ora_FetchInto() now return NULL for NULL-Columns. (Thies)
- OCI8 now supports binding of NULL-values. Module cleanups. (Thies)
- Added ability to set timeout on socket read operations through
set_socket_timeout() function. (Andrei)
- Added implicit_flush INI directive (Zeev)
- Added implicit_flush() to control whether flush() should be called
implicitly after any output (Zeev)
- Fixed a crash in pfsockopen() (Zeev)
- Fixed a possible crash in phpinfo() (Zeev)
- Added register_argc_argv INI directive, to allow to selectively disable
the declaration of the $argv and $argc variables for increased
performance (Zeev)
- Added $HTTP_ENV_VARS[] and $HTTP_SERVER_VARS[] support, which similarly
to $HTTP_GET_VARS[], contain environment and server variables. Setting
register_globals to Off will now also prevent registration of the
environment and server variables into the global scope (Zeev)
- Renamed gpc_globals INI directive to register_globals (Zeev)
- Introduced variables_order that deprecates gpc_order, and allows control
over the server and environment variables, in addition to GET/POST/Cookies
(Zeev)
- new function cpdf_set_document_limits() (Uwe)
- Applied safe-mode patch to popen(). (Patch by Kristian Köhntopp)
- str_repeat() now returns correct length. (Thies)
- Don't assume libz and libpng are installed for the GD checks (Rasmus)
- Implemented support for <boolean> and <null> types according
to WDDX version 1.0 (Andrei)
- Made var_dump()/serialize()/unserialize() NULL aware. (Thies)
- Added new NULL constant (Zeev, Zend Engine)
- Fixed -c support in the standalone CGI binary (Zeev)
- Increased PHP's performance by 5-15% using a new memory cache (Andi & Zeev,
Zend Engine)
- Improved the php.ini reader to support constants and bitwise operators (Zeev)
- Fixed strrev() to no longer modify arg1. (Thies)
- Fixed buffer overruns in iptcembed(). (Thies)
- Fixed a bug in ODBC error reporting (Zeev)
- Added PHP_Logo_GUID() and Zend_Logo_GUID() functions, that return the GUIDs
of the PHP and Zend logos used in phpinfo() (Zeev)
- Added GNU Pth support (Sascha, TSRM library)
- Removed select(), fd_set() and fd_isset() - will be reimplemented soon! (Thies)
- Improved Win32 performance significantly by using different mutexes (Zeev,
TSRM library)
- Made quotemeta() and preg_quote() binary-safe. (Andrei)
- Added UDP support in fsockopen(). (Evan)
- Added --disable-pear option (Andrei)
- Renamed libzend repository to Zend (Zeev)
- Added support for thttpd (Sascha)
- Added session.cache_limiter and cache_expire options (Sascha)
- Restored the PHP_VERSION and PHP_OS constants (Zeev)
- Added get_loaded_extensions(), extension_loaded(), and
get_extension_funcs() functions. (Andrei)
- Added date/time stamping to PHP error log file. (Andrei, Joey)
- Added is_subclass_of() function (Andrei, Zend Engine)
- Implemented count_chars(). (Thies)
- Added class_exists() function (Andrei, Zend Engine)
- Made strspn() and strcspn() binary-safe. (Andrei)
- Added array_multisort() function. (Andrei)
- Made pageinfo.c thread-safe (Sascha)
- Made implode() binary-safe (Andrei)
- Made strstr(), stristr(), and ucwords() binary-safe() (Andrei)
- Made strtoupper(), strtolower(), substr_replace() binary-safe. (Andrei)
- Fixed a crash in the Apache syntax highlighting mode (Zeev)
- Report all ODBC error's not just the one on the top of the stack (lurcher)
- OCI8 now returns NULL values in LONG columns correct. (Thies)
- Added support for a C-like assert() function. (Thies)
- Added CyberCash support. (Evan)
- Made explode() binary-safe. (Thies)
- Made strpos() binary-safe. (Thies)
- Added XML_Set_Object() function, now you can use the XML-Parser from
within an object. (Thies)
- Session vars are now decoded into $HTTP_STATE_VARS[] array and the
globals, depending on track_vars and gpc_globals settings (Andrei)
- Added get_used_files() function - returns a hash mapping the use()'d files
to their full path (Zeev)
- PHP 4 scripts will now obey the max_execution_time setting and actually
time out (Rasmus)
- Added configure command to phpinfo() output (Stig)
- Added optional socket path to the mysql_?connect() functions (Rasmus)
- Made mysql and gd work as shared extensions again (Stig)
- Make the global GET/POST/Cookie variables and their $HTTP_*_VARS[] counterparts
be references to each other (Zeev)
- Added support for the 'use' keyword - behaves like 'require', but will not
use the same file more than once (Andi & Zeev, Zend Engine)
- Added check to see if a persistent connection is still valid with the
ODBC interface before reusing (nick@easysoft.com)
- Added DBMaker support (patch by Pax Tsai <paxtsai@lion.syscom.com.tw>)
- Renamed "PECL" to "PEAR" (PHP Extension and Add-on Repository) (Stig)
- buildconf now uses build.mk (Stig)
- Disable symlinks to urls (Rasmus)
- Informix driver now reflects version of ESQL/C used (Danny)
- Modified session_register() to take variable number of arguments (Andrei)
- Fixed file descriptor leak in thread safe mode (Zeev, Zend Engine)
- Added select(), fd_set() and fd_isset() (Evan)
- cpdf support has been ported from php3, needs ClibPDF 2.x (Uwe)
- Fixed a leak when using automatic output buffering (Zeev)
- Introduced PECL - PHP Extension and Code Library
(prounounced "pickle") (Stig)
- Fixed inconsistencies in the implementation of here-docs (Andi & Zeev, Zend
library)
- Fixed a problem with constant class-member initializations (Andi & Zeev,
Zend Engine)
- Fixed float-compare in min(),max(),a[r]sort(),[r]sort() (Thies)
- Implemented get_html_translation_table() function (Thies)
- Implemented array_flip() function. Returns input-array with key, value
flipped (Thies)
- Added Berkeley DB3 support in DBA (Sascha)
- Implemented 2-Arg version of strtr($str,$translation_array). This can be used
to revert what htmlspecialchars() did (Thies)
- Fixed mem-overwrite in XML_Parse_Into_Struct (Thies)
- Added substr_replace() function (Andrei)
November 16 1999, Version 4.0 Beta 3
- ucfirst()/ucwords() no longer modify arg1 (Thies)
- Fixed strtr() not to modify arg1 (Thies)
- Added Win32 build files for Informix driver and make it
compile with ZTS (danny)
- Added tmpfile() function (Stig)
- Upgraded regex library to alpha3.8 (Sascha)
- Fixed selecting nested-tables in OCI8. (Thies)
- RFC-854 fix for internal FTP-Code. Commands have to end in "\r\n" (Thies)
- Fixed OpenLink ODBC support (Stig)
- min(),max(),a[r]sort(),[r]sort(),k[r]sort() now work consistent with the
language-core. (Thies)
- tempnam() now uses mkstemp() if available (Stig)
- serialize() and var_dump() now honor the precision as set in php.ini
for doubles. (Thies)
- Improved the Win32 COM module to support [out] parameters (Boris Wedl)
- Fixed garbage returned at the end of certain Sybase-Columns (Thies)
Patch submitted by: neal@wanlink.com
- Added Microsoft SQL Server module for Win32 (Frank)
- Added support for forcing a variable number of internal function arguments
by reference. (Andi & Zeev, Zend Engine)
- Implemented getprotoby{name,number} (Evan)
- Added array_pad() function. (Andrei)
- Added new getservby{name,port} functions. (Evan)
- Added session.cookie_path and session.cookie_domain (Sascha)
- Continue processing PHP_INI_SYSTEM knownDirectives after extension=
(Sam Ruby)
- Enable IBM DB2 support - Tested against DB2 6.1 UDB on Linux (Rasmus)
- Added new str_repeat() function. (Andrei)
- Output-Buffering system is now Thread-Safe. (Thies)
- implemented OCI8 $lob->WriteToFile() function - very useful for streaming
large amounts of LOB-Data without to need of a huge buffer. (Thies)
- Added session.use_cookies option (Sascha)
- Added getcwd() function. (Thies)
- XML_Parse_Into_Struct no longer eats data. (Thies)
- Fixed parse_url('-') crash. (Thies)
- added === operator support. (Andi & Thies, Zend Engine)
- unserialize() now gives a notice when passed invalid data. (Thies)
- Fixed shuffle() so that it no longer breaks on Solaris. (Andrei)
- Added is_resource(), is_bool() functions. (Thies)
- Cleaned up File-Module (Thies)
- Upgraded math-funtions to use new Zend function API (Thies)
- Fixed zombie problem in shell_exec() and $a = `some_command`
constructs. (Thies)
- Thies introduced ZEND_FETCH_RESOURCE2 (Danny).
- Added Informix driver to list of maintained extensions. (Danny).
- Informix driver : Changed ifx.ec to use the new high-performance
ZEND API. (Danny)
- IXF_LIBDIR environment variable specifies alternate Informix library
path for configure (Danny).
- Fixed gmmktime() so that the following should always be true:
gmmktime([args]) == mktime([args]) + date('Z', mktime([args])) (Jouni)
- setlocale doesn't anymore screw up things if you forgot to change it back
to the original settings. (Jouni)
- Switched to new system where ChangeLog is automagically updated from commit
messages. NEWS file is now the place for public announcements. (Andrei)
- Fixed refcount problem in XML module. (Thies)
- Fixed crash in HTTP_RAW_POST_DATA handling (Thies)
- You can use resources as array-indices again (Thies, Zend Engine)
- Fixed pg_fetch_array() with three arguments (Sascha)
Patch submitted by: brian@soda.berkeley.edu
- Upgraded a lot internal functions to use new Zend function API (Thies)
- fdf support ported; not completely tested with latest version 4.0 for
glibc (Uwe)
- OCI8 connections are now kept open as long as they are referenced (Thies)
- Cleaned up Directory-Module (Thies)
- Small fix in Ora_Close (Thies)
- Ported range() and shuffle() from PHP 3 to PHP 4 (Andrei)
- Fixed header("HTTP/..."); behaviour (Sascha)
- Improved UNIX build system. Now utilizes libtool (Sascha)
- Upgrade some more internal functions to use new Zend function API. (Thies,
Zend Engine)
- Fixed backwards incompatibility with ereg() (Thies)
- Updated Zend garbage collection with a much more thorough method.
(Andi, Zend Engine)
- Added the ability to use variable references in the array() construct.
For example, array("foo" => &$foo). (Andi, Zend Engine)
- Added array_reverse() function (Andrei)
- Some more XML fixes/cleanups (Thies)
- Updated preg_replace() so that if any argument passed in is an array
it will make a copy of each entry before converting it to string so that
the original is intact. If the subject is an array then it will preserve
the keys in the output as well (Andrei)
- Updated OCI8 to use the new high-performance Zend function API. (Thies)
- Configure speedup (Stig)
- Fixed LOB/Persistent-Connection related OCI8-Crash (Thies)
- Generalized server-API build procedure on UNIX (Stig)
- Added '--disable-rpath' option (Sascha)
- Added AOLserver SAPI module (Sascha)
- Fixed XML Callbacks. (Thies)
- Updated ODBC to use the new high-performance Zend function API (kara)
- Updated zlib to use the new high-performance Zend function API. (Stefan)
- Updated preg_split() to allow returning only non-empty pieces (Andrei)
- Updated PCRE to use the new high-performance Zend function API (Andrei)
- Updated session, dba, mhash, mcrypt, sysvshm, sysvsem, gettext modules to use
the new high-performance Zend function API (Sascha)
- Extended var_dump to handle resource type somewhat (Andrei)
- Updated WDDX to use the new high-performance Zend function API (Andrei)
- Updated XML to use the new high-performance Zend function API. (Thies)
- Updated Oracle to use the new high-performance Zend function API. (Thies)
- Improved the performance of the MySQL module significantly by using the new
high-performance Zend function API. (Zeev)
- Added support for the Easysoft ODBC-ODCB Bridge (martin@easysoft.com)
- Fixed bug in odbc_setoption, getParameter call incorrect (martin@easysoft.com)
- Ora_Fetch_Into now resets the returned array in all cases (Thies)
- Fixed NULL-Column problem in Oracle-Driver (Thies)
- Added extra metadata functions to ODBC, SQLTables etc (nick@easysoft.com)
- Fixed SEGV in mcal make_event_object() and
typo in mcal_list_alarms() (Andrew Skalski)
- Fixed Ora_PLogon (Thies)
- Resourcified Oracle (Thies)
- Implemented object serialization/deserialization in WDDX (Andrei)
- Added krsort() function (Thies)
- Added func_num_args(), func_get_arg() and func_get_args() for standard
access to variable number of arguments functions (Zeev)
- Added FTP support (Andrew Skalski)
- Added optional allowable_tags arguments to strip_tags(), gzgetss() and
fgetss() to allow you to specify a string of tags that are not to be
stripped (Rasmus)
- Upgraded var_dump() to take multiple arguments (Andrei)
- Resourcified XML (Thies)
- Fixed a memory leak in the Apache per-directory directives handler (Zeev)
- Added array_count_values() function. (Thies)
- snmp, pgsql, mysql and gd modules can be built as dynamically loaded
modules (Greg)
- OCI8 fix for fetching empty LOBs (Thies)
- Added user-level callbacks for session module (Sascha)
- Added support for unknown POST content types (Zeev)
- Added "wddx" serialization handler for session module (Sascha)
(automatically enabled, if you compile with --with-wddx)
- Fixed unserializing objects (Thies)
- PHP 4.0 now serializes Objects as 'O' (not understood by PHP 3.0), but
unserializes PHP 3.0 serialized objects as expected. (Thies)
- Made serialize/unserialize work on classes. If the class is known at
unserialize() time, you'll get back a fully working object! (Thies)
- Reworked preg_* functions according to the new PCRE API, which also made
them behave much more like Perl ones (Andrei)
- Made it possible to specify external location of PCRE library (Andrei)
- Updated bundled PCRE library to version 2.08 (Andrei)
- count()/is_array/is_object... speedups. (Thies)
- OCI8 supports appending and positioning when saving LOBs (Thies)
- Added metaphone support (Thies)
- OCI8 doesn't use define callbacks any longer. (Thies)
- OCI8 Driver now supports LOBs like PHP 3.0. (Thies)
- var_dump now dumps the properties of an object (Thies)
- Rewrote the GET/POST/Cookie data reader to support multi-dimensional
arrays! (Zeev)
- Renamed allow_builtin_links to expose_php (defaults to On). This directive
tells PHP whether it may expose its existence to the outside world, e.g.
by adding itself to the Web server header (Zeev)
- Added support for transparent session id propagation (Sascha)
- Made WDDX serialize object properties properly (Andrei)
- Fixed WDDX mem leak when undefined variable is passed in
for serialization (Andrei)
- Added session_unset() function (Andrei)
- Fixed double session globals shutdown crash (Andrei)
- Fixed crash related to ignore_user_abort ini entry (Andrei)
- Added support for external entropy sources for session id creation
(on Unices /dev/random and /dev/urandom) (Sascha)
- Added gpc_globals variable directive to php.ini. By default it is On, but
if it is set to Off, GET, POST and Cookie variables will not be inserted
to the global scope. Mostly makes sense when coupled with track_vars (Zeev)
- Added versioning support for shared library (Sascha)
This allows concurrent use of PHP 3.0 and PHP 4.0 as Apache modules. See
the end of the INSTALL file for more information.
- Added second parameter to array_keys which specifies search value
for which the key should be returned (Andrei)
- Resourcified Informix driver (Danny)
- New resource handling for odbc, renamed to php_odbc.[ch]
- Make set_time_limit() work on Unix (Rasmus)
- Added connection handling support (Rasmus)
- Improved the Sybase-CT module to make use of resources (Zeev)
- Improved the mSQL module to make use of resources (Zeev)
- Changed mysql_query() and mysql_db_query() to return false in case of saving
the result set data fails (Zeev)
- Improved the resource mechanism - resources were not getting freed as soon
as they could (Zeev)
- Added shared memory module for session data storage (Sascha)
- Fixed session.auto_start (Sascha)
- Fixed several problems with output buffering and HEAD requests (Zeev)
- Fixed HTTP Status code issue with ISAPI module (Zeev)
- Fixed a problem that prevented $GLOBALS from working properly (Zeev, Zend
library)
- Ported newest GetImageSize (Thies)
- Added session compile support in Win32 (Andi)
- Added -d switch to the CGI binary that allows overriding php.ini values
from the command line (Zeev)
- Fixed a crash that would occur if wddx_deserialize did not receive
a valid packet (Andrei)
- Fixed a bugglet when redefining a class at run-time (Andi, Zend Engine)
- Fixed sem_get() on AIX (Sascha)
- Fixed fopen() to work with URL's in Win32 (Andi & Zeev)
- Fixed include_path for Win32 (Andi, Zend Engine)
- Fixed bug in ISAPI header sending function (Charles)
- Fixed memory leak when using undefined values (Andi & Zeev, Zend Engine)
- Added output_buffering directive to php.ini, to enable output buffering
for all PHP scripts - default is off (Zeev).
- Fixed some more class inheritance issues (Zeev, Zend Engine)
- Fixed Apache build wrt to shared modules on FreeBSD/Linux (Sascha)
- Added session.extern_referer_chk which checks whether session ids were
referred to by an external site and eliminates them (Sascha)
- Improved session id generation (Sascha)
- Improved speed of uniqid() by using the combined LCG and removing
the extra usleep() (Sascha)
- Introduced general combined linear congruential generator (Sascha)
- Made ldap_close back into an alias for ldap_unbind (Andrei)
- OciFetchInto now resets the returned array in all cases (Thies)
- Fixed mysql_errno() to work with recent versions of MySQL (Zeev)
- Fixed a problem with define() and boolean values (Zeev)
- Fixed inclusion of gd/freetype functions (Sascha)
- Fixed persistency of MHASH_* constants (Sascha)
- Oracle is now ZTS-Safe (Thies)
- Fixed flushing of cached information to disk in DBA's DB2 module (Sascha)
- OCI8 is now ZTS-Safe (Thies)
- Fixed is_writeable/is_writable problem; they are both defined now (Andrei)
- Imported PHP 3.0 diskfreespace() function (Thies)
- Fixed thread-safety issues in the MySQL module (Zeev)
- Fixed thread-safe support for dynamic modules (Zeev)
- Fixed Sybase CT build process (Zeev)
August 9 1999, Version 4.0 Beta 2
- Fixed a problem when sending HTTP/1.x header lines using header() (Zeev)
- Win32 builds now include the ODBC module built-in (Zeev)
- Fixed SYSV-SHM interface (Thies).
- Updated hyperwave module, made it thread safe
- Updated pdflib module, version 0.6 of pdflib no longer supported
- Updated fdf module
- Built-in phpinfo() links are now turned off by default. They can be turned
on using the allow_builtin_links INI directive (Zeev)
- Changed phpinfo() to list modules that have no info function (Zeev)
- Modified array_walk() function so that the userland callback is passed
a key and possible user data in addition to the value (Andrei)
- Fixed ldap_search(), ldap_read() and ldap_list() (Zeev)
- Fixed Apache information in phpinfo() (sam@breakfree.com)
- Improved register_shutdown_function() - you may now supply arguments that
will be passed to the shutdown function (Zeev)
- Improved call_user_func() and call_user_method() - they now support passing
arguments by reference (Zeev)
- Fixed usort() and uksort() (Zeev)
- Fixed md5() in the Apache module (Thies)
- Introduced build process for dynamic modules (Stig)
- Improved ISAPI module to supprt large server variables (Zeev)
- Imported PHP 3.0 fixes for problem with PHP as a dynamic module and Redhat
libc2.1 in zlib module (Stefan)
- Fixed sybase_fetch_object() (Zeev)
- Made the IMAP module work with PHP 4.0 (Zeev)
- Fixed a problem with include()/require() of URLs (Sascha, Zeev)
- Fixed a bug in implode() that caused it to corrupt its arguments (Zeev)
- Added get_class($obj), get_parent_class($obj) and method_exists($obj,"name")
(Andi & Zeev)
- Fixed various inheritance problems (Andi & Zeev, Zend Engine)
- Children now inherit their parent's constructor, if they do not supply a
constructor of their own.
- Fixed runtime inheritance of classes (parent methods/properties were
overriding their children) (Zeev, Zend Engine)
- Fixed backwards incompatibility with the "new" operator (Andi, Zend Engine)
- Fixed bugs in uksort() and ksort() sort ordering (Andrei)
- Fixed a memory leak when using assignment-op operators with lvalue of type
string (Zeev, Zend Engine)
- Fixed a problem in inheritance from classes that are defined in include()d
files (Zeev, Zend Engine)
- Fixed a problem with the PHP error handler that could result in a crash
on certain operating systems (Zeev)
- Apache php_flag values only recognized 'On' (case sensitive) - changed
to case insensitive (Zeev)
- Fixed a memory leak with switch statement containing return statements
(Andi & Zeev, Zend Engine)
- Fixed a crash problem in switch statements that had a string offset
as a conditional (Andi & Zeev, Zend Engine)
- Imported PHP 3.0 fixes for rand() and mt_rand() (Rasmus)
- Added function entries for strip_tags() and similar_text() (Andrei)
- Fixed a bug in WDDX that would cause a crash if a number was passed in
instead of a variable name (Andrei)
- Ported strtotime() function from PHP 3.0 (Andrei)
- Merged in gdttf stuff from PHP 3.0 (Sascha)
- buildconf now checks your installation (Stig)
- XML module now built dynamically with --with-xml=shared (Stig)
- Added a check for freetype.h - fixed build on RedHat 6.0 (Zeev)
- Fixed array_walk() to work in PHP 4.0 (Andrei)
- Ported all remaining date() format options from PHP 3.0 (Andrei)
- $php_errormsg now works (Andrei)
- Added locale support for Perl Compatible Regexp functions (Andrei)
- Informix module ported (Danny)
- Removed --with-shared-apache (Sascha)
- Added patch for reverse lookup table in base64_decode (Sascha)
Submitted by bfranklin@dct.com
- Merged in PHP 3.0 version of str_replace (Sascha)
- Added DBA module (Sascha)
- Added session id detection within REQUEST_URI (Sascha)
- Merged in HP-UX/ANSI compatibility switch from PHP 3.0 (Sascha)
- Fixed rpath handling for utilitites built during Apache build (Sascha)
- Added missing E_ error level constants (Zeev, Zend Engine)
- Fixed a bug in sending multiple HTTP Cookies under Apache (Zeev)
- Fixed implicit connect on the MySQL, mSQL, PostgreSQL and Sybase
modules (Zeev)
- Gave PHP 4.0's SNMP extension all the functionality of PHP 3.0.12 (SteveL)
July 19 1999, Version 4.0 Beta 1
- First public beta of PHP 4.0
View File
File renamed without changes.
+104
View File
@@ -0,0 +1,104 @@
This is the first file you should be reading after you get your CVS account.
We'll assume you're basically familiar with CVS, but feel free to post
your questions on the mailing list.
PHP is developed through the efforts of a large number of people.
Collaboration is a Good Thing(tm), and CVS lets us do this. Thus, following
some basic rules with regards to CVS usage will:
a. Make everybody happier, especially those responsible for maintaining
the CVS itself.
b. Keep the changes consistently well documented and easily trackable.
c. Prevent some of those 'Oops' moments.
d. Increase the general level of good will on planet Earth.
Having said that, here are the organizational rules:
1. Respect other people working on the project.
2. Discuss any significant changes on the list before committing.
3. Look at MAINTANERS file to see who is the primary maintainer of
the code you want to contribute to.
4. If you "strongly disagree" about something another person did, don't
start fighting publicly - take it up in private email.
5. If you don't know how to do something, ask first!
6. Test your changes before committing them. We mean it. Really.
The next few rules are more of a technical nature.
1. DO NOT TOUCH ChangeLog! It is automagically updated from the commit
messages every day. Woe be to those who attempt to mess with it.
2. All news updates intended for public viewing, such as new features,
bug fixes, improvements, etc., should go into the NEWS file. Also see
the note below about automatically updating NEWS in your commit message.
3. Do not commit multiple file and dump all messages in one commit. If you
modified several unrelated files, commit each group separately and
provide a nice commit message for each one. See example below.
4. Do write your commit message in such a way that it makes sense even
without the corresponding diff. One should be able to look at it, and
immediately know what was modified. Definitely include the function name
in the message as shown below.
5. In your commit messages, keep each line shorter than 80 characters. And
try to align your lines vertically, if they wrap. It looks bad otherwise.
6. If you modified a function that is callable from PHP, prepend PHP to
the function name as shown below.
The format of the commit messages is pretty simple.
If a line begins with #, it is taken to be a comment and will not appear
in the ChangeLog. If the line begins with @, it will be redirected to the
NEWS file. Everything else goes into the ChangeLog.
It is important to note that if your comment or news logline spans multiple
lines, you have to put # or @ at the beginning of _every_ such line. Every
entry in NEWS has to have a name after it, so if you did it with someone's
help, put both your names there.
Example. Say you modified two files, datetime.c and string.c. In datetime.c
you added a new format option for date() function, and in string.c you fixed
a memory leak in php_trim(). Don't commit both of these at once. Commit them
separately and try to make sure your commit messages look something like the
following.
For datetime.c:
(PHP date) Added new 'K' format modifier for printing out number of
days until New Year's Eve.
@- Added new 'K' format modifier that will output the number of days
@ until New Year's Eve. (Bob)
For string.c:
(php_trim) Fixed a memory leak resulting from improper use of zval_dtor().
# Man, that thing was leaking all over the place!
@- Memory leak in trim() function has finally been fixed. (Bob)
The lines above marked with @ will go into NEWS file automagically, and the
# lines will be omitted from the ChangeLog. Alternatively, you might want
to modify NEWS file directly and not use the @ lines.
If you don't see your messages in ChangeLog and NEWS right away, don't worry!
These files are updated once a day, so your stuff will not show up until
somewhat later. Don't go adding stuff to NEWS by hand if you already put @
lines in the commit message.
You can use LXR (http://lxr.php.net/) and Bonsai (http://bonsai.php.net/)
to look at PHP CVS repository in various ways.
To receive daily updates to ChangeLog and NEWS, send an empty message to
php-cvs-daily-subscribe@lists.php.net.
Happy hacking,
PHP Team
+181
View File
@@ -0,0 +1,181 @@
WHAT IT IS
It's a tool for automatically creating the basic framework for a PHP module
and writing C code handling arguments passed to your functions from a simple
configuration file. See an example at the end of this file.
HOW TO USE IT
Very simple. First, cd do directory ext/ in PHP 4 sources. If you just need
the basic framework and will be writing all the code in your functions
yourself, you can now do
./ext_skel --extname=module_name
and everything you need is placed in directory module_name. In fact, if you
don't need to test the existence of any external header files, libraries or
functions in them, the module is already almost ready to be compiled in PHP.
Just remove 3 comments in your_module_name/config.m4, cd back up to PHP
sources top directory, and do
./buildconf; ./configure --enable-module_name; make
But if you already have planned the overall scheme of your module, what
functions it will contain, their return types and the arguments they take
(a very good idea) and don't want to bother yourself with creating function
definitions and handling arguments passed yourself, it's time to create a
function definitions file, which you will give as an argument to ext_skel
with option
--proto=filename.
FORMAT OF FUNCTION DEFINITIONS FILE
All the definitions must be on one line. In it's simplest form, it's just
the function name, ie.
my_function
but then you'll be left with an almost empty function body without any
argument handling.
Arguments are given in parenthesis after the function name, and are of
the form 'argument_type argument_name'. Arguments are separated from each
other with a comma and optional space. Argument_type can be one of int,
bool, double, float, string, array, object or mixed.
An optional argument is separated from the previous by an optional space,
then '[' and of course comma and optional space, like all the other
arguments. You should close a row of optional arguments with same amount of
']'s as there where '['s. Currently, it does not harm if you forget to do it
or there is a wrong amount of ']'s, but this may change in the future.
An example:
my_function(int arg1, int arg2 [, int arg3 [, int arg4]])
Arguments arg3 and arg4 are optional.
If possible, the function definition should also contain it's return type
in front of the definition. It's not actually used for any C code generating
purposes but PHP in-source documentation instead, and as such, very useful.
It can be any of int, double, string, bool, array, object, resource, mixed
or void.
The file must contain nothing else but function definitions, no comments or
empty lines.
OTHER OPTIONS
--no-help
By default, ext_skel creates both comments in the source code and a test
function to help first time module writers to get started and testing
configuring and compiling their module. This option turns off all such things
which may just annoy experienced PHP module coders. Especially useful with
--stubs=file
which will leave out also all module specific stuff and write just function
stubs with function value declarations and passed argument handling, and
function entries and definitions at the end of the file, for copying and
pasting into an already existing module.
--assign-params
--string-lens
By default, function proto 'void foo(string bar)' creates the following:
...
zval **bar;
... (zend_get_parameters_ex() called in the middle...)
convert_to_string_ex(bar);
Specifying both of these options changes the generated code to:
...
zval **bar_arg;
int bar_len;
char *bar = NULL;
... (zend_get_parameters_ex() called in the middle...)
convert_to_string_ex(bar_arg);
bar = Z_STRVAL_PP(bar_arg);
bar_len = Z_STRLEN_PP(bar_arg);
You shouldn't have to ask what happens if you leave --string-lens out. If you
have to, it's questionable whether you should be reading this document.
--with-xml[=file]
Creates the basics for phpdoc .xml file.
--full-xml
Not implemented yet. When or if there will ever be created a framework for
self-contained extensions to use phpdoc system for their documentation, this
option enables it on the created xml file.
CURRENT LIMITATIONS, BUGS AND OTHER ODDITIES
Only arguments of types int, bool, double, float, string and array are
handled. For other types you must write the code yourself. And for type
mixed, it wouldn't even be possible to write anything, because only you
know what to expect.
It can't handle correctly, and probably never will, variable list of
of arguments. (void foo(int bar [, ...])
Don't trust too much the generated code. It tries to be useful in most of
the situations you might encounter, but automatic code generating will never
beat a programmer who knows the real situation at hand. axt_skel is generally
best suited for quickly generating a wrapper for c-library functions you
might want to have available in PHP too.
This program doesn't have a --help option. It has --no-help instead.
EXAMPLE
The following _one_ line
bool my_drawtext(resource image, string text, resource font, int x, int y [, int color])
will create this function definition for you (note that there are a few
question marks to be replaced by you, and you must of course add your own
value definitions too):
/* {{{ proto bool my_drawtext(resource image, string text, resource font, int x, int y[, int color])
*/
PHP_FUNCTION(my_drawtext)
{
zval **image, **text, **font, **x, **y, **color;
int argc;
int image_id = -1;
int font_id = -1;
???LS_FETCH();
argc = ZEND_NUM_ARGS();
if (argc < 5 || argc > 6 || zend_get_parameters_ex(argc, &image, &text, &font, &x, &y, &color) == FAILURE) {
WRONG_PARAM_COUNT;
}
ZEND_FETCH_RESOURCE(???, ???, image, image_id, "???", ???G());
ZEND_FETCH_RESOURCE(???, ???, font, font_id, "???", ???G());
switch (argc) {
case 6:
convert_to_long_ex(color);
/* Fall-through. */
case 5:
convert_to_long_ex(y);
convert_to_long_ex(x);
/* font: fetching resources already handled. */
convert_to_string_ex(text);
/* image: fetching resources already handled. */
break;
default:
WRONG_PARAM_COUNT;
}
php_error(E_WARNING, "my_drawtext: not yet implemented");
}
/* }}} */
+161
View File
@@ -0,0 +1,161 @@
$Id$
=============================================================================
HOW TO CREATE A SELF-CONTAINED PHP EXTENSION
A self-contained extension can be distributed independently of
the PHP source. To create such an extension, three things are
required:
- Makefile template (Makefile.in)
- Configuration file (config.m4)
- Source code for your module
We will describe now how to create these and how to put things
together.
CONVERTING AN EXISTING EXTENSION
Just to show you how easy it is to create a self-contained
extension, we will convert an embedded extension into a
self-contained one. Install PHP and execute the following
commands.
$ mkdir /tmp/newext
$ cd /tmp/newext
You now have an empty directory. We will copy the files from
the mysql extension:
$ cp -rp php-4.0.X/ext/mysql/* .
It is time to finish the module. Run:
$ phpize
You can now ship the contents of the directory - the extension
can live completely on its own.
The user instructions boil down to
$ ./configure \
[--with-php-config=/path/to/php-config] \
[--with-mysql=MYSQL-DIR]
$ make install
The MySQL module will either use the embedded MySQL client
library or the MySQL installation in MYSQL-DIR.
DEFINING THE NEW EXTENSION
Our demo extension is called "foobar".
It consists of two source files "foo.c" and "bar.c"
(and any arbitrary amount of header files, but that is not
important here).
The demo extension does not reference any external
libraries (that is important, because the user does not
need to specify anything).
CREATING THE MAKEFILE TEMPLATE
The Makefile Template (Makefile.in) contains three lines:
------------------------------------------------------------------------------
LTLIBRARY_SHARED_NAME = foobar.la
LTLIBRARY_SOURCES = foo.c bar.c
include $(top_srcdir)/build/dynlib.mk
------------------------------------------------------------------------------
LTLIBRARY_SHARED_NAME specifies the name of the extension.
It must be of the form `ext-name.la'.
LTLIBRARY_SOURCES specifies the names of the sources files. You can
name an arbitrary number of source files here.
The final include directive includes the build rules (you usually
don't need to care about what happens there). rules.mk and other
files are installed by phpize which we will cover later.
CREATING THE M4 CONFIGURATION FILE
The m4 configuration can perform additional checks. For a
self-contained extension, you do not need more than a few
macro calls.
------------------------------------------------------------------------------
PHP_ARG_ENABLE(foobar,whether to enable foobar,
[ --enable-foobar Enable foobar])
if test "$PHP_FOOBAR" != "no"; then
PHP_EXTENSION(foobar, $ext_shared)
fi
------------------------------------------------------------------------------
PHP_ARG_ENABLE will automatically set the correct variables, so
that the extension will be enabled by PHP_EXTENSION in shared mode.
Please use always PHP_ARG_ENABLE or PHP_ARG_WITH. Even if you do not
plan to distribute your module with PHP, these facilities allow you
to integrate your module easily into the main PHP module framework.
CREATING SOURCE FILES
ext_skel can be of great help when creating the common code for all modules
in PHP for you and also writing basic function definitions and C code for
handling arguments passed to your functions. See README.EXT_SKEL for further
information.
As for the rest, you are currently alone here. There are a lot of existing
modules, use a simple module as a starting point and add your own code.
CREATING THE SELF-CONTAINED EXTENSION
Put Makefile.in, config.m4 and the source files into one directory.
Then run phpize (this is installed during make install by PHP 4.0).
For example, if you configured PHP with --prefix=/php, you would run
$ /php/bin/phpize
This will automatically copy the necessary build files and create
configure from your config.m4.
And that's it. You now have a self-contained extension.
INSTALLING A SELF-CONTAINED EXTENSION
An extension can be installed by running:
$ ./configure \
[--with-php-config=/path/to/php-config]
$ make install
ADDING SHARED MODULE SUPPORT TO A MODULE
In order to be useful, a self-contained extension must be loadable
as a shared module. I will explain now how you can add shared module
support to an existing module called foo.
1. In config.m4, use PHP_ARG_WITH/PHP_ARG_ENABLE. Then you will
automatically be able to use --with-foo=shared or
--enable-foo=shared.
2. In config.m4, use PHP_EXTENSION(foo, $ext_shared) to enable
building the extension.
3. Add the following line to Makefile.in:
LTLIBRARY_SHARED_NAME = foo.la
4. Add the following lines to your C source file:
#ifdef COMPILE_DL_FOO
ZEND_GET_MODULE(foo)
#endif
+99
View File
@@ -0,0 +1,99 @@
Using PHP4 with the Zeus Web Server
-----------------------------------
Zeus fully supports running PHP in combination with our webserver. A
significant improvement in PHP 4 is that you can now run PHP as an
ISAPI module, giving great performance benefits over traditional CGI
code.
Note that you will need to be running at least version 3.3.6 of the
webserver. If you are running an earlier version, please see our
website (http://www.zeus.com) for upgrade instructions.
To build the ISAPI version of PHP, start the configuration with:
./configure --with-zeus=/usr/local/zeus
Obviously, replace /usr/local/zeus with the location of where you have
installed Zeus on your machine. For PHP to build successfully, you
need to have 3.3.6 already installed, because the code relies on the
presence of header files provided with the latest version.
You may have to adjust the environment variable LDFLAGS and EXTRA_LIBS
in order to link in extra libraries. This depends on the platform on
which you are building and also on the compiler used (see below). A
standard GNU/Linux install with GCC should build fine with no changes.
Configuring the webserver
-------------------------
After running 'make' and 'make install', you will have a 'libphp4.so'
file. Copy this file into a directory reserved for ISAPI
binaries. Now, perform the following steps for each virtual server
that you wish to run PHP on:
1) On the Admin server, go to 'edit server->path mapping'
2) Add an alias to the directory with libphp4.so in it, mapped to
/isapi/ (or a location of your choice). Make sure you set the alias
type to ISAPI.
3) Click 'update'
4) Add a handler for file extension 'php' to be run by /isapi/libphp4.so
5) Click 'update', then go back to the previous page.
6) Click on the 'module configuration' button, ensure that ISAPI
support is ticked.
7) Click on the ISAPI link. At the bottom of the page, click the
checkbox for running ISAPI extensions 'out of process'.
8) Click 'update'. Then restart the virtual server. Done!
Troubleshooting
---------------
*) Why does the compile fail at Zend/zend-scanner-cc.cc
or Zend/zend-parser.c ?
These source files are auto-generated from the corresponding .y files.
The default distribution of PHP contains pre-generated versions of these
files that have caused problems for some people. The simplest solution is
to delete the files. They will then be rebuilt correctly. You must have the
following GNU tools to do this:
bison 1.28 or later
flex 2.5.4 or later
*) Why does my PHP library fail to load?
After configuring Zeus, if you get a '502 Bad Gateway' error when
accessing a PHP page, there are problems loading the PHP
library. Check the error log ($ZEUSHOME/web/log/errors) for errors.
Failing to load the PHP ISAPI module is likely to be due to unresolved
symbols in the module. A way to check for this is to visit our support
page at http://support.zeus.com/faq/entries/isapi_error.html and run
the program there on your libphp4.so. It will list any unresolved
symbols.
*) My libphp4.so has unresolved symbols. How do I fix this?
You must ensure that the PHP build process links in the appropriate
libraries that contain these symbols! The libraries required will
depend on the platform you are running PHP on.
You may need to set one or two environment variables before running
the 'configure' program to set up PHP; LDFLAGS and EXTRA_LIBS. Make
sure that you also export these variables to the build process.
(Type 'export LDFLAGS EXTRA_LIBS' in the shell to do this.)
Specific examples:
Solaris + gcc:
Ensure you run ./configure with the `--enable-libgcc' parameter. You
may need to set LDFLAGS to '-L/usr/local/egcs/lib' (path depends on
your gcc installation)
For more information and help with Zeus, please visit our website:
http://www.zeus.com
+118
View File
@@ -0,0 +1,118 @@
Things to do or at least think about doing in the future. Name in
parenthesis means that person has taken on this project.
Zend
----
* allow foreach ($array as $k => &$val) syntax. right now we cannot
traverse an array without copying each element.
* look at replacing c-lib call tolower().
global
------
* make everything on the language-level independent of your locale setings.
* always build the standalone executable as well as the chosen SAPI
target.
* make sure all source files have the "right" copyright.
* the following modules still use PHP3_TLS_*() macros (and thereby don't
work in ZTS mode): ext/dav/dav.c, ext/db/db.c, ext/gd/gd.c, ext/ldap/ldap.c
* make sure that all ZTS globals get destructed. Most ts_allocate_id()
calls should have a dtor entry.
* activate all extensions by default that don't rely on external
dependices. (eg ftp)
* --enable-all in configure. (--enable-shared=max ...)
* make configure print out a summary when it's done (like XEmacs)
* replace standard functions which work on static data with
reentrancy-safe functions.
* on some platforms unimplemented function will just do nothing (e.g. symlink)
they should print a warning or not even be defined!
* implement javadoc based function docs template system.
* use thread-safe resolver functions (either require BIND 8 or adns).
* provide optional IPv6 support.
* make SAPI conform to CGI/1.1. Currently, all SAPI modules
define REMOTE_ADDR etc. themselves and reach only various level
of compliance.
* find a better way to implement script timeouts. SIGVTALRM is used
by some POSIX threads implementations (i.e. OpenBSD) and is not
available in ZTS mode.
* add aliases to functions to conform to new naming conventions, e.g.
str_to_upper().
documentation
-------------
* add remarks in the documentation which functions are not implemented on win32.
* add remarks in the documentation which functions are not binary-safe.
ext/dav
--------
* rewrite.
ext/mcrypt
----------
* port to mcrypt-2.6 or later
ext/oci8
--------
* all OCIFetch*() functions should return 0 for no more data and false on error.
* have a flag that trims trailing spaces from CHAR fields on retrieval.
* make allow_call_time_pass_reference=Off working.
ext/pcre
--------
* have a non-greedy option for preg_replace().
* have an option for preg_grep() to return keys as well.
* update the online docs from version 3.1 man page
ext/session
-----------
* implement a call to set a session read-only to overcome
the need to serialize frame-loads.
* maybe implement finer-grained session variables that could be
locked individually.
ext/standard
------------
* add a version number to data serialized via serialize().
* array_add(). (Andrei)
* implement pathinfo()
$a = pathinfo("/some/file.bla");
=> array("dirname" => "/some/",
"basename" => "file.bla",
"extension" => "bla");
We could also make it return just one part as a sting if used
like this:
$a = pathinfo("/some/file.bla", PATHINFO_BASENAME);
* possibly modify parsing of GPC data to automatically create arrays if
variable name is seen more than once.
* implement regex-cache for url-functions.
* strcase_replace(). (Andrei)
* move socket related functions to fsock.c.
* get_defined_funcs(), get_defined_vars().
* NOT binary safe:
strtok()
basename()
dirname()
strrpos()
strrchr()
strip_tags()
ext/wddx
--------
* implement __sleep() and __wakeup() the way serialize()/unserialize() do.
* See if we can support the remaining datatypes:
dateTime
binary
recordset
http://www.wddx.org/WDDX_SDK_10a/7__References/WDDX_DTD.htm
(Andrei)
* implement wddx_packet_as_javascript(). (Andrei)
other cool stuff
----------------
* PVM extension
+2 -2
View File
@@ -1,4 +1,4 @@
## process this file with automake to produce Makefile.am
AUTOMAKE_OPTIONS=foreign
lib_LIBRARIES=libtsrm.a
libtsrm_a_SOURCES = TSRM.c
noinst_LTLIBRARIES=libtsrm.la
libtsrm_la_SOURCES = TSRM.c
+91 -23
View File
@@ -13,7 +13,6 @@
+----------------------------------------------------------------------+
*/
#include "TSRM.h"
#include <stdio.h>
#include <stdlib.h>
@@ -34,8 +33,8 @@ struct _tsrm_tls_entry {
typedef struct {
size_t size;
void (*ctor)(void *resource);
void (*dtor)(void *resource);
ts_allocate_ctor ctor;
ts_allocate_dtor dtor;
} tsrm_resource_type;
@@ -51,14 +50,22 @@ static int resource_types_table_size;
static MUTEX_T tsmm_mutex; /* thread-safe memory manager mutex */
/* New thread handlers */
static void (*tsrm_new_thread_begin_handler)();
static void (*tsrm_new_thread_end_handler)();
/* Debug support */
static int tsrm_debug(const char *format, ...);
static int tsrm_debug_status;
/* Startup TSRM (call once for the entire process) */
TSRM_FUNC int tsrm_startup(int expected_threads, int expected_resources, int debug_status)
TSRM_API int tsrm_startup(int expected_threads, int expected_resources, int debug_status)
{
#if defined(GNUPTH)
pth_init();
#endif
tsrm_tls_table_size = expected_threads;
tsrm_tls_table = (tsrm_tls_entry **) calloc(tsrm_tls_table_size, sizeof(tsrm_tls_entry *));
if (!tsrm_tls_table) {
@@ -75,6 +82,8 @@ TSRM_FUNC int tsrm_startup(int expected_threads, int expected_resources, int deb
tsmm_mutex = tsrm_mutex_alloc();
tsrm_new_thread_begin_handler = tsrm_new_thread_end_handler = NULL;
tsrm_debug_status = debug_status;
tsrm_debug("Started up TSRM, %d expected threads, %d expected resources\n", expected_threads, expected_resources);
@@ -83,7 +92,7 @@ TSRM_FUNC int tsrm_startup(int expected_threads, int expected_resources, int deb
/* Shutdown TSRM (call once for the entire process) */
TSRM_FUNC void tsrm_shutdown()
TSRM_API void tsrm_shutdown(void)
{
int i;
@@ -110,11 +119,14 @@ TSRM_FUNC void tsrm_shutdown()
}
tsrm_mutex_free(tsmm_mutex);
tsrm_debug("Shutdown TSRM\n");
#if defined(GNUPTH)
pth_kill();
#endif
}
/* allocates a new thread-safe-resource id */
TSRM_FUNC ts_rsrc_id ts_allocate_id(size_t size, void (*ctor)(void *resource), void (*dtor)(void *resource))
TSRM_API ts_rsrc_id ts_allocate_id(size_t size, ts_allocate_ctor ctor, ts_allocate_dtor dtor)
{
ts_rsrc_id new_id;
int i;
@@ -175,23 +187,37 @@ static void allocate_new_resource(tsrm_tls_entry **thread_resources_ptr, THREAD_
(*thread_resources_ptr)->count = id_count;
(*thread_resources_ptr)->thread_id = thread_id;
(*thread_resources_ptr)->next = NULL;
tsrm_mutex_unlock(tsmm_mutex);
if (tsrm_new_thread_begin_handler) {
tsrm_new_thread_begin_handler(thread_id);
}
for (i=0; i<id_count; i++) {
(*thread_resources_ptr)->storage[i] = (void *) malloc(resource_types_table[i].size);
if (resource_types_table[i].ctor) {
resource_types_table[i].ctor((*thread_resources_ptr)->storage[i]);
}
}
if (tsrm_new_thread_end_handler) {
tsrm_new_thread_end_handler(thread_id);
}
}
/* fetches the requested resource for the current thread */
void *ts_resource(ts_rsrc_id id)
TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
{
THREAD_T thread_id = tsrm_thread_id();
THREAD_T thread_id;
int hash_value;
tsrm_tls_entry *thread_resources;
void *resource;
if (th_id) {
thread_id = *th_id;
} else {
thread_id = tsrm_thread_id();
}
tsrm_debug("Fetching resource id %d for thread %ld\n", id, (long) thread_id);
tsrm_mutex_lock(tsmm_mutex);
@@ -200,7 +226,8 @@ void *ts_resource(ts_rsrc_id id)
if (!thread_resources) {
allocate_new_resource(&tsrm_tls_table[hash_value], thread_id);
thread_resources = tsrm_tls_table[hash_value];
return ts_resource(id);
/* thread_resources = tsrm_tls_table[hash_value]; */
} else {
do {
if (thread_resources->thread_id == thread_id) {
@@ -210,8 +237,11 @@ void *ts_resource(ts_rsrc_id id)
thread_resources = thread_resources->next;
} else {
allocate_new_resource(&thread_resources->next, thread_id);
thread_resources = thread_resources->next;
break;
return ts_resource(id);
/*
* thread_resources = thread_resources->next;
* break;
*/
}
} while (thread_resources);
}
@@ -226,7 +256,7 @@ void *ts_resource(ts_rsrc_id id)
/* frees all resources allocated for the current thread */
void ts_free_thread()
void ts_free_thread(void)
{
THREAD_T thread_id = tsrm_thread_id();
int hash_value;
@@ -278,10 +308,12 @@ void ts_free_id(ts_rsrc_id id)
*/
/* Obtain the current thread id */
TSRM_FUNC THREAD_T tsrm_thread_id(void)
TSRM_API THREAD_T tsrm_thread_id(void)
{
#ifdef WIN32
return GetCurrentThreadId();
#elif defined(GNUPTH)
return pth_self();
#elif defined(PTHREADS)
return pthread_self();
#elif defined(NSAPI)
@@ -293,12 +325,16 @@ TSRM_FUNC THREAD_T tsrm_thread_id(void)
/* Allocate a mutex */
TSRM_FUNC MUTEX_T tsrm_mutex_alloc( void )
TSRM_API MUTEX_T tsrm_mutex_alloc( void )
{
MUTEX_T mutexp;
#ifdef WIN32
mutexp = CreateMutex(NULL,FALSE,NULL);
mutexp = malloc(sizeof(CRITICAL_SECTION));
InitializeCriticalSection(mutexp);
#elif defined(GNUPTH)
mutexp = (MUTEX_T) malloc(sizeof(*mutexp));
pth_mutex_init(mutexp);
#elif defined(PTHREADS)
mutexp = (pthread_mutex_t *)malloc(sizeof(pthread_mutex_t));
pthread_mutex_init(mutexp,NULL);
@@ -315,12 +351,15 @@ TSRM_FUNC MUTEX_T tsrm_mutex_alloc( void )
/* Free a mutex */
TSRM_FUNC void tsrm_mutex_free( MUTEX_T mutexp )
TSRM_API void tsrm_mutex_free( MUTEX_T mutexp )
{
if (mutexp) {
#ifdef WIN32
CloseHandle(mutexp);
DeleteCriticalSection(mutexp);
#elif defined(GNUPTH)
free(mutexp);
#elif defined(PTHREADS)
pthread_mutex_destroy(mutexp);
free(mutexp);
#elif defined(NSAPI)
crit_terminate(mutexp);
@@ -335,11 +374,16 @@ TSRM_FUNC void tsrm_mutex_free( MUTEX_T mutexp )
/* Lock a mutex */
TSRM_FUNC int tsrm_mutex_lock( MUTEX_T mutexp )
TSRM_API int tsrm_mutex_lock( MUTEX_T mutexp )
{
//tsrm_debug("Mutex locked thread: %ld\n",tsrm_thread_id());
#if 0
tsrm_debug("Mutex locked thread: %ld\n",tsrm_thread_id());
#endif
#ifdef WIN32
return WaitForSingleObject(mutexp,1000);
EnterCriticalSection(mutexp);
return 1;
#elif defined(GNUPTH)
return pth_mutex_acquire(mutexp, 0, NULL);
#elif defined(PTHREADS)
return pthread_mutex_lock(mutexp);
#elif defined(NSAPI)
@@ -351,11 +395,16 @@ TSRM_FUNC int tsrm_mutex_lock( MUTEX_T mutexp )
/* Unlock a mutex */
TSRM_FUNC int tsrm_mutex_unlock( MUTEX_T mutexp )
TSRM_API int tsrm_mutex_unlock( MUTEX_T mutexp )
{
//tsrm_debug("Mutex unlocked thread: %ld\n",tsrm_thread_id());
#if 0
tsrm_debug("Mutex unlocked thread: %ld\n",tsrm_thread_id());
#endif
#ifdef WIN32
return ReleaseMutex(mutexp);
LeaveCriticalSection(mutexp);
return 1;
#elif defined(GNUPTH)
return pth_mutex_release(mutexp);
#elif defined(PTHREADS)
return pthread_mutex_unlock(mutexp);
#elif defined(NSAPI)
@@ -366,6 +415,25 @@ TSRM_FUNC int tsrm_mutex_unlock( MUTEX_T mutexp )
}
TSRM_API void *tsrm_set_new_thread_begin_handler(void (*new_thread_begin_handler)(THREAD_T thread_id))
{
void *retval = (void *) tsrm_new_thread_begin_handler;
tsrm_new_thread_begin_handler = new_thread_begin_handler;
return retval;
}
TSRM_API void *tsrm_set_new_thread_end_handler(void (*new_thread_end_handler)(THREAD_T thread_id))
{
void *retval = (void *) tsrm_new_thread_end_handler;
tsrm_new_thread_end_handler = new_thread_end_handler;
return retval;
}
/*
* Debug support
*/
+27 -2
View File
@@ -19,6 +19,7 @@ CFG=TSRM - Win32 Debug_TS
!MESSAGE
!MESSAGE "TSRM - Win32 Debug_TS" (based on "Win32 (x86) Static Library")
!MESSAGE "TSRM - Win32 Release_TS" (based on "Win32 (x86) Static Library")
!MESSAGE "TSRM - Win32 Release_TS_inline" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
@@ -41,7 +42,7 @@ RSC=rc.exe
# PROP Intermediate_Dir "Debug_TS"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "C:\Projects\TSRM" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_DEBUG" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_DEBUG" /D "TSRM_EXPORTS" /D "_LIB" /D "WIN32" /D "_MBCS" /YX /FD /GZ /c
# ADD BASE RSC /l 0x40d /d "_DEBUG"
# ADD RSC /l 0x40d /d "_DEBUG"
BSC32=bscmake.exe
@@ -64,7 +65,30 @@ LIB32=link.exe -lib
# PROP Intermediate_Dir "Release_TS"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "TSRM_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x40d /d "NDEBUG"
# ADD RSC /l 0x40d /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "TSRM - Win32 Release_TS_inline"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "TSRM___Win32_Release_TS_inline"
# PROP BASE Intermediate_Dir "TSRM___Win32_Release_TS_inline"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release_TS_inline"
# PROP Intermediate_Dir "Release_TS_inline"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "TSRM_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x40d /d "NDEBUG"
# ADD RSC /l 0x40d /d "NDEBUG"
BSC32=bscmake.exe
@@ -80,6 +104,7 @@ LIB32=link.exe -lib
# Name "TSRM - Win32 Debug_TS"
# Name "TSRM - Win32 Release_TS"
# Name "TSRM - Win32 Release_TS_inline"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+36 -22
View File
@@ -18,11 +18,17 @@
#define _TSRM_H
#ifdef HAVE_CONFIG_H
# undef PACKAGE
# undef VERSION
# include "tsrm_config.h"
# undef PACKAGE
# undef VERSION
#endif
#if WIN32||WINNT
# include <windows.h>
#elif defined(GNUPTH)
# include <pth.h>
#elif defined(PTHREADS)
# include <pthread.h>
#endif
@@ -40,18 +46,13 @@ typedef int ts_rsrc_id;
#endif
/* Define TSRM_FUNC */
#ifdef __cplusplus
#define TSRM_FUNC extern "C" TSRM_API
#else
#define TSRM_FUNC TSRM_API
#endif
/* Define THREAD_T and MUTEX_T */
#if defined(WIN32)
# define THREAD_T DWORD
# define MUTEX_T void *
# define MUTEX_T CRITICAL_SECTION *
#elif defined(GNUPTH)
# define THREAD_T pth_t
# define MUTEX_T pth_mutex_t *
#elif defined(PTHREADS)
# define THREAD_T pthread_t
# define MUTEX_T pthread_mutex_t *
@@ -63,35 +64,48 @@ typedef int ts_rsrc_id;
# define MUTEX_T PISync *
#endif
typedef void (*ts_allocate_ctor)(void *);
typedef void (*ts_allocate_dtor)(void *);
#define THREAD_HASH_OF(thr,ts) thr%ts
#define THREAD_HASH_OF(thr,ts) (unsigned long)thr%(unsigned long)ts
#ifdef __cplusplus
extern "C" {
#endif
/* startup/shutdown */
TSRM_FUNC int tsrm_startup(int expected_threads, int expected_resources, int debug_status);
TSRM_FUNC void tsrm_shutdown();
TSRM_API int tsrm_startup(int expected_threads, int expected_resources, int debug_status);
TSRM_API void tsrm_shutdown(void);
/* allocates a new thread-safe-resource id */
TSRM_FUNC ts_rsrc_id ts_allocate_id(size_t size, void (*ctor)(void *resource), void (*dtor)(void *resource));
TSRM_API ts_rsrc_id ts_allocate_id(size_t size, ts_allocate_ctor ctor, ts_allocate_dtor dtor);
/* fetches the requested resource for the current thread */
TSRM_FUNC void *ts_resource(ts_rsrc_id id);
TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id);
#define ts_resource(id) ts_resource_ex(id, NULL)
/* frees all resources allocated for the current thread */
TSRM_FUNC void ts_free_thread();
TSRM_API void ts_free_thread(void);
/* deallocates all occurrences of a given id */
TSRM_FUNC void ts_free_id(ts_rsrc_id id);
TSRM_API void ts_free_id(ts_rsrc_id id);
/* Debug support */
TSRM_FUNC void tsrm_debug_set(int status);
TSRM_API void tsrm_debug_set(int status);
/* utility functions */
TSRM_FUNC THREAD_T tsrm_thread_id(void);
TSRM_FUNC MUTEX_T tsrm_mutex_alloc(void);
TSRM_FUNC void tsrm_mutex_free(MUTEX_T mutexp);
TSRM_FUNC int tsrm_mutex_lock(MUTEX_T mutexp);
TSRM_FUNC int tsrm_mutex_unlock(MUTEX_T mutexp);
TSRM_API THREAD_T tsrm_thread_id(void);
TSRM_API MUTEX_T tsrm_mutex_alloc(void);
TSRM_API void tsrm_mutex_free(MUTEX_T mutexp);
TSRM_API int tsrm_mutex_lock(MUTEX_T mutexp);
TSRM_API int tsrm_mutex_unlock(MUTEX_T mutexp);
TSRM_API void *tsrm_set_new_thread_begin_handler(void (*new_thread_begin_handler)(THREAD_T thread_id));
TSRM_API void *tsrm_set_new_thread_end_handler(void (*new_thread_end_handler)(THREAD_T thread_id));
#ifdef __cplusplus
}
#endif
#endif /* _TSRM_H */
-6
View File
@@ -1,7 +1 @@
#undef PTHREADS
#ifdef DEFINE_TSRM_VERSION
# undef PACKAGE
# undef VERSION
#endif
+5
View File
@@ -0,0 +1,5 @@
AC_DEFUN(AM_SET_LIBTOOL_VARIABLE,[
LIBTOOL='$(SHELL) $(top_builddir)/libtool $1'
])
+43
View File
@@ -0,0 +1,43 @@
# Makefile to generate build tools
#
# Standard usage:
# make -f build.mk
#
# Written by Sascha Schumann
#
# $Id$
LT_TARGETS = ltmain.sh ltconfig
config_h_in = tsrm_config.h.in
makefile_am_files = Makefile.am
makefile_in_files = $(makefile_am_files:.am=.in)
makefile_files = $(makefile_am_files:e.am=e)
targets = $(makefile_in_files) $(LT_TARGETS) configure $(config_h_in)
all: $(targets)
clean:
rm -f $(targets)
$(LT_TARGETS):
rm -f $(LT_TARGETS)
libtoolize --automake $(AMFLAGS) -f
$(makefile_in_files): $(makefile_am_files)
automake -a -i $(AMFLAGS) $(makefile_files)
aclocal.m4: configure.in acinclude.m4
aclocal
$(config_h_in): configure.in acconfig.h
# explicitly remove target since autoheader does not seem to work
# correctly otherwise (timestamps are not updated)
@rm -f $@
autoheader
configure: aclocal.m4 configure.in
autoconf
+10 -1
View File
@@ -1,5 +1,14 @@
#!/bin/sh
case "$1" in
--copy)
automake_flags=--copy
shift
;;
esac
libtoolize --force --automake $automake_flags
mv aclocal.m4 aclocal.m4.old 2>/dev/null
aclocal
if cmp aclocal.m4.old aclocal.m4 > /dev/null 2>&1; then
@@ -11,7 +20,7 @@ fi
autoheader
automake --add-missing --include-deps
automake --add-missing --include-deps $automake_flags
mv configure configure.old 2>/dev/null
autoconf
+9 -12
View File
@@ -7,18 +7,15 @@ AC_INIT(TSRM.c)
AM_INIT_AUTOMAKE(TSRM, 1.0)
AM_CONFIG_HEADER(tsrm_config.h)
AC_PROG_CC
AC_PROG_CC_C_O
AC_PROG_RANLIB
sinclude(tsrm.m4)
TSRM_BASIC_CHECKS
AM_PROG_LIBTOOL
if test "$enable_debug" != "yes"; then
AM_SET_LIBTOOL_VARIABLE([--silent])
fi
AC_CHECK_LIB(pthread, pthread_create, [
AC_DEFINE(PTHREADS)
LIBS="$LIBS -lpthread"
],[
AC_MSG_ERROR(You need pthreads to build TSRM.)
])
AC_CHECK_HEADERS(stdarg.h)
TSRM_PTHREAD
AC_OUTPUT(Makefile)
+157
View File
@@ -0,0 +1,157 @@
dnl Copyright (c) 1999, 2000 Sascha Schumann. All rights reserved.
dnl
dnl Redistribution and use in source and binary forms, with or without
dnl modification, are permitted provided that the following conditions
dnl are met:
dnl
dnl 1. Redistributions of source code must retain the above copyright
dnl notice, this list of conditions and the following disclaimer.
dnl
dnl 2. Redistributions in binary form must reproduce the above copyright
dnl notice, this list of conditions and the following disclaimer in
dnl the documentation and/or other materials provided with the
dnl distribution.
dnl
dnl THIS SOFTWARE IS PROVIDED BY SASCHA SCHUMANN ``AS IS'' AND ANY
dnl EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
dnl PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SASCHA SCHUMANN OR
dnl HIS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
dnl SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
dnl NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
dnl LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
dnl HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
dnl STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
dnl ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
dnl OF THE POSSIBILITY OF SUCH DAMAGE.
dnl
dnl PTHREADS_FLAGS
dnl
dnl Set some magic defines to achieve POSIX threads conformance
dnl
AC_DEFUN(PTHREADS_FLAGS,[
if test -z "$host_alias"; then
AC_MSG_ERROR(host_alias is not set. Make sure to run config.guess)
fi
case "$host_alias" in
*solaris*)
PTHREAD_FLAGS="-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT";;
*freebsd*)
PTHREAD_FLAGS="-D_REENTRANT -D_THREAD_SAFE";;
*linux*)
PTHREAD_FLAGS="-D_REENTRANT";;
*aix*)
PTHREAD_FLAGS="-D_THREAD_SAFE";;
*irix*)
PTHREAD_FLAGS="-D_POSIX_THREAD_SAFE_FUNCTIONS";;
*hpux*)
PTHREAD_FLAGS="-D_REENTRANT";;
*sco*)
PTHREAD_FLAGS="-D_REENTRANT";;
dnl Solves sigwait() problem, creates problems with u_long etc.
dnl PTHREAD_FLAGS="-D_REENTRANT -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=199506 -D_XOPEN_SOURCE_EXTENDED=1";;
esac
if test -n "$PTHREAD_FLAGS"; then
CPPFLAGS="$CPPFLAGS $PTHREAD_FLAGS"
fi
])dnl
dnl
dnl PTHREADS_CHECK_COMPILE
dnl
dnl Check whether the current setup can use POSIX threads calls
dnl
AC_DEFUN(PTHREADS_CHECK_COMPILE, [
AC_TRY_RUN( [
#include <pthread.h>
#include <stddef.h>
void *thread_routine(void *data) {
return data;
}
int main() {
pthread_t thd;
pthread_mutexattr_t mattr;
int data = 1;
pthread_mutexattr_init(&mattr);
return pthread_create(&thd, NULL, thread_routine, &data);
} ], [
pthreads_working="yes"
], [
pthreads_working="no"
], pthreads_working="no" ) ] )dnl
dnl
dnl PTHREADS_CHECK()
dnl
dnl Try to find a way to enable POSIX threads
dnl
dnl Magic flags
dnl -kthread gcc (FreeBSD)
dnl -Kthread UDK cc (UnixWare)
dnl -mt WorkShop cc (Solaris)
dnl -mthreads gcc (AIX)
dnl -pthread gcc (Linux, FreeBSD, NetBSD, OpenBSD)
dnl -pthreads gcc (Solaris)
dnl -qthreaded AIX cc V5
dnl -threads gcc (HP-UX)
dnl
AC_DEFUN(PTHREADS_CHECK,[
save_CFLAGS="$CFLAGS"
save_LIBS="$LIBS"
PTHREADS_ASSIGN_VARS
PTHREADS_CHECK_COMPILE
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
AC_CACHE_CHECK(for pthreads_cflags,ac_cv_pthreads_cflags,[
ac_cv_pthreads_cflags=""
if test "$pthreads_working" != "yes"; then
for flag in -kthread -pthread -pthreads -mthreads -Kthread -threads -mt -qthreaded; do
ac_save="$CFLAGS"
CFLAGS="$CFLAGS $flag"
PTHREADS_CHECK_COMPILE
CFLAGS="$ac_save"
if test "$pthreads_working" = "yes"; then
ac_cv_pthreads_cflags="$flag"
break
fi
done
fi
])
AC_CACHE_CHECK(for pthreads_lib, ac_cv_pthreads_lib,[
ac_cv_pthreads_lib=""
if test "$pthreads_working" != "yes"; then
for lib in pthread pthreads c_r; do
ac_save="$LIBS"
LIBS="$LIBS -l$lib"
PTHREADS_CHECK_COMPILE
LIBS="$ac_save"
if test "$pthreads_working" = "yes"; then
ac_cv_pthreads_lib="$lib"
break
fi
done
fi
])
if test "$pthreads_working" = "yes"; then
threads_result="POSIX Threads found"
else
threads_result="POSIX Threads not found"
fi
])dnl
dnl
dnl
AC_DEFUN(PTHREADS_ASSIGN_VARS,[
if test -n "$ac_cv_pthreads_lib"; then
LIBS="$LIBS -l$ac_cv_pthreads_lib"
fi
if test -n "$ac_cv_pthreads_cflags"; then
CFLAGS="$CFLAGS $ac_cv_pthreads_cflags"
fi
])dnl
+98
View File
@@ -0,0 +1,98 @@
dnl TSRM_CHECK_GCC_ARG(ARG, ACTION-IF-FOUND, ACTION-IF-NOT_FOUND)
AC_DEFUN(TSRM_CHECK_GCC_ARG,[
gcc_arg_name=[ac_cv_gcc_arg]translit($1,A-Z-,a-z_)
AC_CACHE_CHECK([whether $CC supports $1], [ac_cv_gcc_arg]translit($1,A-Z-,a-z_), [
echo 'void somefunc() { };' > conftest.c
cmd='$CC $1 -c conftest.c'
if eval $cmd 2>&1 | egrep -e $1 >/dev/null ; then
ac_result=no
else
ac_result=yes
fi
eval $gcc_arg_name=$ac_result
rm -f conftest.*
])
if eval test "\$$gcc_arg_name" = "yes"; then
$2
else
:
$3
fi
])
AC_DEFUN(TSRM_BASIC_CHECKS,[
AC_REQUIRE([AC_PROG_CC])dnl
dnl AC_REQUIRE([AM_PROG_CC_STDC])dnl
AC_REQUIRE([AC_PROG_CC_C_O])dnl
AC_REQUIRE([AC_PROG_RANLIB])dnl
AC_CHECK_HEADERS(stdarg.h)
])
AC_DEFUN(TSRM_CHECK_PTH,[
AC_MSG_CHECKING(for GNU Pth)
PTH_PREFIX="`$1 --prefix`"
if test -z "$PTH_PREFIX"; then
AC_MSG_RESULT(Please check your Pth installation)
fi
CPPFLAGS="$CPPFLAGS `$1 --cflags`"
LDFLAGS="$LDFLAGS `$1 --ldflags`"
LIBS="$LIBS `$1 --libs`"
AC_DEFINE(GNUPTH, 1, [Whether you use GNU Pth])
AC_MSG_RESULT(yes - installed in $PTH_PREFIX)
])
sinclude(threads.m4)
sinclude(TSRM/threads.m4)
AC_DEFUN(TSRM_CHECK_PTHREADS,[
PTHREADS_CHECK
if test "$pthreads_working" != "yes"; then
AC_MSG_ERROR(Your system seems to lack POSIX threads.)
fi
AC_DEFINE(PTHREADS, 1, Whether to use Pthreads)
AC_MSG_CHECKING(for POSIX threads)
AC_MSG_RESULT(yes)
])
AC_DEFUN(TSRM_OTHER_CHECKS,[
dnl For the thread implementations, we always use --with-*
dnl to maintain consistency
AC_ARG_WITH(tsrm-pth,
[ --with-tsrm-pth[=pth-config] Use GNU Pth.],[
TSRM_PTH=$withval
],[
TSRM_PTH=no
])
AC_ARG_WITH(tsrm-pthreads,
[ --with-tsrm-pthreads Use POSIX threads (default)],[
TSRM_PTHREADS=$withval
],[
TSRM_PTHREADS=yes
])
test "$TSRM_PTH" = "yes" && TSRM_PTH=pth-config
if test "$TSRM_PTH" != "no"; then
TSRM_CHECK_PTH($TSRM_PTH)
elif test "$TSRM_PTHREADS" != "no"; then
TSRM_CHECK_PTHREADS
fi
])
+6 -6
View File
@@ -1,11 +1,11 @@
---------------------------------------------------------------------------
The Zend License, version 0.91
Copyright (C) 1999 Andi Gutmans & Zeev Suraski
The Zend License, version 0.92
Copyright (C) 1999-2000 Zend Technologies Ltd.
---------------------------------------------------------------------------
The Zend scripting engine library is a product of Andi Gutmans and
Zeev Suraski. It may be used and/or distributed under the terms of the
Q Public License (QPL) version 1.0, enclosed below.
The Zend scripting engine library is a product of Zend Technologies Ltd.
It may be used and/or distributed under the terms of the Q Public
License (QPL) version 1.0, enclosed below.
For more information about Zend please visit http://www.zend.com/
For license related questions please mail license@zend.com
@@ -113,4 +113,4 @@ OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE.
===========================================================================
===========================================================================
+27 -10
View File
@@ -3,24 +3,41 @@
#CLEANFILES = zend-parser.c zend-parser.h zend-scanner.c zend-parser.output
AUTOMAKE_OPTIONS=foreign
noinst_LIBRARIES=libzend.a
libzend_a_SOURCES=\
zend-parser.y zend-scanner.l \
zend_alloc.c zend_compile.c zend_constants.c \
EXTRA_LTLIBRARIES=libZend_cc.la libZend_c.la libZend_gcc.la
noinst_LTLIBRARIES=$(ZEND_SCANNER) $(ZEND_GCC) libZend.la
libZend_cc_la_SOURCES=zend-scanner-cc.cc
libZend_c_la_SOURCES=zend-scanner.c
libZend_gcc_la_SOURCES=zend_gcc_inline.c
libZend_la_SOURCES=\
zend-parser.y \
zend_alloc.c zend_compile.c zend_constants.c zend_dynamic_array.c \
zend_execute.c zend_execute_API.c zend_highlight.c zend_llist.c \
zend_opcode.c zend_operators.c zend_ptr_stack.c zend_stack.c \
zend_variables.c zend.c zend_API.c zend_extensions.c zend_hash.c \
zend_list.c zend_indent.c
zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c
libZend_la_LIBADD = $(ZEND_SCANNER) $(ZEND_GCC)
libZend_la_LDFLAGS = @EXTRA_LIBS@
libZend_la_DEPENDENCIES = $(ZEND_SCANNER)
# automake isn't too clever about "non-standard" use of lex and yacc
zend-scanner.c: zend-scanner.l
$(LEX) -Pzend -ozend-scanner.c -i $(srcdir)/zend-scanner.l
$(libZend_la_OBJECTS) zend-scanner.lo zend-scanner-cc.lo: zend-parser.h
zend-scanner.cc: zend-scanner.l
$(LEX) -+ -S$(srcdir)/flex.skl -Pzend -ozend-scanner.cc -i $(srcdir)/zend-scanner.l
zend-scanner.c: $(srcdir)/zend-scanner.l
$(LEX) -Pzend -o$@ -i $(srcdir)/zend-scanner.l
zend-scanner-cc.cc: $(srcdir)/zend-scanner.l
$(LEX) -+ -B -i -S$(srcdir)/flex.skl -Pzend -o$@ $(srcdir)/zend-scanner.l
zend-parser.h: zend-parser.c
zend-parser.c: zend-parser.y
zend-parser.c: $(srcdir)/zend-parser.y
$(YACC) -p zend -v -d $(srcdir)/zend-parser.y -o zend-parser.c
depend:
zend_execute.lo: $(srcdir)/zend_execute.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(INLINE_CFLAGS) -c $(srcdir)/zend_execute.c
+1 -1
View File
@@ -84,7 +84,7 @@ shamelessly lying about it. Here's why:
* static variable initializers only accept scalar values
(in PHP 3.0 they accepted any valid expression). The impact
should be somewhere in between void and non existant, since
should be somewhere in between void and non existent, since
initializing a static variable with anything but a simple
static value makes no sense at all.
+436 -363
View File
@@ -1,363 +1,436 @@
# Microsoft Developer Studio Project File - Name="libzend" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=libzend - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "libzend.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "libzend.mak" CFG="libzend - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "libzend - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "libzend - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "libzend - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDebug" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug" /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "WIN32" /D "_MBCS" /D ZEND_DEBUG=0 /FR /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x40d /d "NDebug"
# ADD RSC /l 0x40d /d "NDebug"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "libzend - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_Debug" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_Debug" /D "_LIB" /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D ZEND_DEBUG=1 /FR /YX /FD /GZ /c
# ADD BASE RSC /l 0x40d /d "_Debug"
# ADD RSC /l 0x40d /d "_Debug"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ENDIF
# Begin Target
# Name "libzend - Win32 Release"
# Name "libzend - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=".\zend-parser.c"
# End Source File
# Begin Source File
SOURCE=".\zend-scanner.c"
# End Source File
# Begin Source File
SOURCE=.\zend.c
# End Source File
# Begin Source File
SOURCE=.\zend_alloc.c
# End Source File
# Begin Source File
SOURCE=.\zend_API.c
# End Source File
# Begin Source File
SOURCE=.\zend_compile.c
# End Source File
# Begin Source File
SOURCE=.\zend_constants.c
# End Source File
# Begin Source File
SOURCE=.\zend_execute.c
# End Source File
# Begin Source File
SOURCE=.\zend_execute_API.c
# End Source File
# Begin Source File
SOURCE=.\zend_extensions.c
# End Source File
# Begin Source File
SOURCE=.\zend_hash.c
# End Source File
# Begin Source File
SOURCE=.\zend_highlight.c
# End Source File
# Begin Source File
SOURCE=.\zend_indent.c
# End Source File
# Begin Source File
SOURCE=.\zend_list.c
# End Source File
# Begin Source File
SOURCE=.\zend_llist.c
# End Source File
# Begin Source File
SOURCE=.\zend_opcode.c
# End Source File
# Begin Source File
SOURCE=.\zend_operators.c
# End Source File
# Begin Source File
SOURCE=.\zend_ptr_stack.c
# End Source File
# Begin Source File
SOURCE=.\zend_sprintf.c
# End Source File
# Begin Source File
SOURCE=.\zend_stack.c
# End Source File
# Begin Source File
SOURCE=.\zend_variables.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\config.w32.h
# End Source File
# Begin Source File
SOURCE=.\FlexLexer.h
# End Source File
# Begin Source File
SOURCE=.\modules.h
# End Source File
# Begin Source File
SOURCE=".\zend-parser.h"
# End Source File
# Begin Source File
SOURCE=".\zend-scanner.h"
# End Source File
# Begin Source File
SOURCE=.\zend.h
# End Source File
# Begin Source File
SOURCE=.\zend_alloc.h
# End Source File
# Begin Source File
SOURCE=.\zend_API.h
# End Source File
# Begin Source File
SOURCE=.\zend_compile.h
# End Source File
# Begin Source File
SOURCE=.\zend_constants.h
# End Source File
# Begin Source File
SOURCE=.\zend_errors.h
# End Source File
# Begin Source File
SOURCE=.\zend_execute.h
# End Source File
# Begin Source File
SOURCE=.\zend_extensions.h
# End Source File
# Begin Source File
SOURCE=.\zend_globals.h
# End Source File
# Begin Source File
SOURCE=.\zend_hash.h
# End Source File
# Begin Source File
SOURCE=.\zend_highlight.h
# End Source File
# Begin Source File
SOURCE=.\zend_indent.h
# End Source File
# Begin Source File
SOURCE=.\zend_list.h
# End Source File
# Begin Source File
SOURCE=.\zend_llist.h
# End Source File
# Begin Source File
SOURCE=.\zend_operators.h
# End Source File
# Begin Source File
SOURCE=.\zend_ptr_stack.h
# End Source File
# Begin Source File
SOURCE=.\zend_stack.h
# End Source File
# Begin Source File
SOURCE=.\zend_variables.h
# End Source File
# End Group
# Begin Group "Parsers"
# PROP Default_Filter "y"
# Begin Source File
SOURCE=".\zend-parser.y"
!IF "$(CFG)" == "libzend - Win32 Release"
# Begin Custom Build
InputDir=.
InputPath=".\zend-parser.y"
BuildCmds= \
bison --output=zend-parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend-parser.y
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "libzend - Win32 Debug"
# Begin Custom Build
InputDir=.
InputPath=".\zend-parser.y"
BuildCmds= \
bison --output=zend-parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend-parser.y
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ENDIF
# End Source File
# End Group
# Begin Group "Scanners"
# PROP Default_Filter "l"
# Begin Source File
SOURCE=".\zend-scanner.l"
!IF "$(CFG)" == "libzend - Win32 Release"
# Begin Custom Build
InputPath=".\zend-scanner.l"
"zend-scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -i -Pzend -ozend-scanner.c zend-scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "libzend - Win32 Debug"
# Begin Custom Build
InputPath=".\zend-scanner.l"
"zend-scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -i -Pzend -ozend-scanner.c zend-scanner.l
# End Custom Build
!ENDIF
# End Source File
# End Group
# Begin Group "Text Files"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\ZEND_BUGS
# End Source File
# Begin Source File
SOURCE=.\ZEND_CHANGES
# End Source File
# Begin Source File
SOURCE=.\ZEND_TODO
# End Source File
# End Group
# Begin Group "Resources"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\zend.ico
# End Source File
# End Group
# End Target
# End Project
# Microsoft Developer Studio Project File - Name="Zend" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=Zend - Win32 Release_inline
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "Zend.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "Zend.mak" CFG="Zend - Win32 Release_inline"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "Zend - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "Zend - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE "Zend - Win32 Release_inline" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "Zend - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDebug" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug" /D "_LIB" /D "Zend_EXPORTS" /D ZEND_DEBUG=0 /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /FR /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x40d /d "NDebug"
# ADD RSC /l 0x40d /d "NDebug"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_Debug" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_Debug" /D "_LIB" /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D ZEND_DEBUG=1 /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c
# ADD BASE RSC /l 0x40d /d "_Debug"
# ADD RSC /l 0x40d /d "_Debug"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
# PROP BASE Use_MFC 0
# PROP BASE Output_Dir "Zend___Win32_Release_inline"
# PROP BASE Intermediate_Dir "Zend___Win32_Release_inline"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Output_Dir "Release_inline"
# PROP Intermediate_Dir "Release_inline"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug" /D "_LIB" /D "Zend_EXPORTS" /D ZEND_DEBUG=0 /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /FR /FD /c
# SUBTRACT BASE CPP /YX
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug" /D "_LIB" /D "Zend_EXPORTS" /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D ZEND_DEBUG=0 /D "ZEND_WIN32_FORCE_INLINE" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /FR /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x40d /d "NDebug"
# ADD RSC /l 0x40d /d "NDebug"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ENDIF
# Begin Target
# Name "Zend - Win32 Release"
# Name "Zend - Win32 Debug"
# Name "Zend - Win32 Release_inline"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=".\zend-parser.c"
# End Source File
# Begin Source File
SOURCE=".\zend-scanner.c"
# End Source File
# Begin Source File
SOURCE=.\zend.c
# End Source File
# Begin Source File
SOURCE=.\zend_alloc.c
# End Source File
# Begin Source File
SOURCE=.\zend_API.c
# End Source File
# Begin Source File
SOURCE=.\zend_builtin_functions.c
# End Source File
# Begin Source File
SOURCE=.\zend_compile.c
# End Source File
# Begin Source File
SOURCE=.\zend_constants.c
# End Source File
# Begin Source File
SOURCE=.\zend_execute.c
# End Source File
# Begin Source File
SOURCE=.\zend_execute_API.c
# End Source File
# Begin Source File
SOURCE=.\zend_extensions.c
# End Source File
# Begin Source File
SOURCE=.\zend_gcc_inline.c
# End Source File
# Begin Source File
SOURCE=.\zend_hash.c
# End Source File
# Begin Source File
SOURCE=.\zend_highlight.c
# End Source File
# Begin Source File
SOURCE=.\zend_indent.c
# End Source File
# Begin Source File
SOURCE=.\zend_list.c
# End Source File
# Begin Source File
SOURCE=.\zend_llist.c
# End Source File
# Begin Source File
SOURCE=.\zend_opcode.c
# End Source File
# Begin Source File
SOURCE=.\zend_operators.c
# End Source File
# Begin Source File
SOURCE=.\zend_ptr_stack.c
# End Source File
# Begin Source File
SOURCE=.\zend_sprintf.c
# End Source File
# Begin Source File
SOURCE=.\zend_stack.c
# End Source File
# Begin Source File
SOURCE=.\zend_variables.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\FlexLexer.h
# End Source File
# Begin Source File
SOURCE=.\modules.h
# End Source File
# Begin Source File
SOURCE=".\zend-parser.h"
# End Source File
# Begin Source File
SOURCE=".\zend-scanner.h"
# End Source File
# Begin Source File
SOURCE=.\zend.h
# End Source File
# Begin Source File
SOURCE=.\zend_alloc.h
# End Source File
# Begin Source File
SOURCE=.\zend_API.h
# End Source File
# Begin Source File
SOURCE=.\zend_builtin_functions.h
# End Source File
# Begin Source File
SOURCE=.\zend_compile.h
# End Source File
# Begin Source File
SOURCE=.\zend_config.w32.h
# End Source File
# Begin Source File
SOURCE=.\zend_constants.h
# End Source File
# Begin Source File
SOURCE=.\zend_errors.h
# End Source File
# Begin Source File
SOURCE=.\zend_execute.h
# End Source File
# Begin Source File
SOURCE=.\zend_extensions.h
# End Source File
# Begin Source File
SOURCE=.\zend_fast_cache.h
# End Source File
# Begin Source File
SOURCE=.\zend_globals.h
# End Source File
# Begin Source File
SOURCE=.\zend_hash.h
# End Source File
# Begin Source File
SOURCE=.\zend_highlight.h
# End Source File
# Begin Source File
SOURCE=.\zend_indent.h
# End Source File
# Begin Source File
SOURCE=.\zend_list.h
# End Source File
# Begin Source File
SOURCE=.\zend_llist.h
# End Source File
# Begin Source File
SOURCE=.\zend_operators.h
# End Source File
# Begin Source File
SOURCE=.\zend_ptr_stack.h
# End Source File
# Begin Source File
SOURCE=.\zend_stack.h
# End Source File
# Begin Source File
SOURCE=.\zend_variables.h
# End Source File
# End Group
# Begin Group "Parsers"
# PROP Default_Filter "y"
# Begin Source File
SOURCE=".\zend-parser.y"
!IF "$(CFG)" == "Zend - Win32 Release"
# Begin Custom Build
InputDir=.
InputPath=".\zend-parser.y"
BuildCmds= \
if not "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p zend zend-parser.y \
if "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend-parser.y \
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
# Begin Custom Build
InputDir=.
InputPath=".\zend-parser.y"
BuildCmds= \
if not "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p zend zend-parser.y \
if "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend-parser.y \
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
# Begin Custom Build
InputDir=.
InputPath=".\zend-parser.y"
BuildCmds= \
if not "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p zend zend-parser.y \
if "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend-parser.y \
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ENDIF
# End Source File
# End Group
# Begin Group "Scanners"
# PROP Default_Filter "l"
# Begin Source File
SOURCE=".\zend-scanner.l"
!IF "$(CFG)" == "Zend - Win32 Release"
# Begin Custom Build
InputPath=".\zend-scanner.l"
"zend-scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -i -Pzend -ozend-scanner.c zend-scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
# Begin Custom Build
InputPath=".\zend-scanner.l"
"zend-scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -i -Pzend -ozend-scanner.c zend-scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
# Begin Custom Build
InputPath=".\zend-scanner.l"
"zend-scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -i -Pzend -ozend-scanner.c zend-scanner.l
# End Custom Build
!ENDIF
# End Source File
# End Group
# Begin Group "Text Files"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\ZEND_BUGS
# End Source File
# Begin Source File
SOURCE=.\ZEND_CHANGES
# End Source File
# Begin Source File
SOURCE=.\ZEND_TODO
# End Source File
# End Group
# Begin Group "Resources"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\zend.ico
# End Source File
# End Group
# End Target
# End Project
+236
View File
@@ -0,0 +1,236 @@
AC_DEFUN(LIBZEND_BISON_CHECK,[
if test "$YACC" != "bison -y"; then
AC_MSG_WARN(You will need bison if you want to regenerate the Zend parser.)
else
AC_MSG_CHECKING(bison version)
set `bison --version| sed -e 's/^GNU Bison version //' -e 's/\./ /'`
if test "${1}" = "1" -a "${2}" -lt "25"; then
AC_MSG_WARN(You will need bison 1.25 if you want to regenerate the Zend parser (found ${1}.${2}).)
fi
AC_MSG_RESULT(${1}.${2} (ok))
fi
])
AC_DEFUN(LIBZEND_BASIC_CHECKS,[
AC_REQUIRE([AC_PROG_YACC])
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_PROG_CC_C_O])
AC_REQUIRE([AM_PROG_LEX])
AC_REQUIRE([AC_HEADER_STDC])
LIBZEND_BISON_CHECK
dnl Ugly hack to get around a problem with gcc on AIX.
if test "$CC" = "gcc" -a "$ac_cv_prog_cc_g" = "yes" -a \
"`uname -sv`" = "AIX 4"; then
CFLAGS=`echo $CFLAGS | sed -e 's/-g//'`
fi
dnl Hack to work around a Mac OS X cpp problem
dnl Known versions needing this workaround are 5.3 and 5.4
if test "$ac_cv_prog_gcc" = "yes" -a "`uname -s`" = "Rhapsody"; then
CPPFLAGS="$CPPFLAGS -traditional-cpp"
fi
AC_CHECK_HEADERS(
limits.h \
malloc.h \
string.h \
unistd.h \
stdarg.h \
sys/types.h \
signal.h \
unix.h \
dlfcn.h)
AC_TYPE_SIZE_T
AC_TYPE_SIGNAL
AC_CHECK_LIB(dl, dlopen, [LIBS="-ldl $LIBS"])
AC_CHECK_FUNC(dlopen,[AC_DEFINE(HAVE_LIBDL, 1,[ ])])
dnl This is required for QNX and may be some BSD derived systems
AC_CHECK_TYPE( uint, unsigned int )
AC_CHECK_TYPE( ulong, unsigned long )
dnl Checks for library functions.
AC_FUNC_VPRINTF
AC_FUNC_MEMCMP
AC_FUNC_ALLOCA
AC_CHECK_FUNCS(memcpy strdup getpid kill strtod strtol finite)
AC_ZEND_BROKEN_SPRINTF
AC_CHECK_FUNCS(finite isfinite isinf isnan)
ZEND_FP_EXCEPT
AC_SUBST(ZEND_SCANNER)
])
AC_DEFUN(LIBZEND_ENABLE_DEBUG,[
AC_ARG_ENABLE(debug,
[ --enable-debug Compile with debugging symbols],[
ZEND_DEBUG=$enableval
],[
ZEND_DEBUG=no
])
])
AC_DEFUN(LIBZEND_OTHER_CHECKS,[
AC_ARG_ENABLE(c9x-inline,
[ --enable-c9x-inline Enable C9x-inline semantics],[
ZEND_C9X_INLINE=$enableval
],[
ZEND_C9X_INLINE=no
])
AC_ARG_ENABLE(experimental-zts,
[ --enable-experimental-zts This will most likely break your build],[
ZEND_EXPERIMENTAL_ZTS=$enableval
],[
ZEND_EXPERIMENTAL_ZTS=no
])
AC_ARG_ENABLE(inline-optimization,
[ --enable-inline-optimization If you have much memory and are using
gcc, you might try this.],[
ZEND_INLINE_OPTIMIZATION=$enableval
],[
ZEND_INLINE_OPTIMIZATION=no
])
AC_ARG_ENABLE(memory-limit,
[ --enable-memory-limit Compile with memory limit support. ], [
ZEND_MEMORY_LIMIT=$enableval
],[
ZEND_MEMORY_LIMIT=no
])
AC_MSG_CHECKING(whether to enable C9x-inline semantics)
AC_MSG_RESULT($ZEND_C9X_INLINE)
AC_MSG_CHECKING(whether to enable experimental ZTS)
AC_MSG_RESULT($ZEND_EXPERIMENTAL_ZTS)
AC_MSG_CHECKING(whether to enable inline optimization for GCC)
AC_MSG_RESULT($ZEND_INLINE_OPTIMIZATION)
AC_MSG_CHECKING(whether to enable a memory limit)
AC_MSG_RESULT($ZEND_MEMORY_LIMIT)
AC_MSG_CHECKING(whether to enable Zend debugging)
AC_MSG_RESULT($ZEND_DEBUG)
if test "$ZEND_DEBUG" = "yes"; then
AC_DEFINE(ZEND_DEBUG,1,[ ])
echo " $CFLAGS" | grep ' -g' >/dev/null || DEBUG_CFLAGS="-g"
test -n "$GCC" && DEBUG_CFLAGS="$DEBUG_CFLAGS -Wall"
test -n "$GCC" && test "$USE_MAINTAINER_MODE" = "yes" && \
DEBUG_CFLAGS="$DEBUG_CFLAGS -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations"
else
AC_DEFINE(ZEND_DEBUG,0,[ ])
fi
test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS"
if test "$ZEND_EXPERIMENTAL_ZTS" = "yes"; then
AC_DEFINE(ZTS,1,[ ])
ZEND_SCANNER_TYPE=cc
CPPFLAGS="$CPPFLAGS -I../TSRM"
LIBZEND_CPLUSPLUS_CHECKS
else
ZEND_SCANNER_TYPE=c
fi
if test "$ZEND_C9X_INLINE" = "yes"; then
AC_DEFINE(C9X_INLINE_SEMANTICS, 1, [whether to enable C9x-inline semantics])
else
ZEND_GCC=libZend_gcc.la
AC_SUBST(ZEND_GCC)
fi
ZEND_SCANNER="libZend_${ZEND_SCANNER_TYPE}.la"
if test "$ZEND_MEMORY_LIMIT" = "yes"; then
AC_DEFINE(MEMORY_LIMIT, 1, [Memory limit])
else
AC_DEFINE(MEMORY_LIMIT, 0, [Memory limit])
fi
changequote({,})
if test -n "$GCC" && test "$ZEND_INLINE_OPTIMIZATION" != "yes"; then
INLINE_CFLAGS=`echo $ac_n "$CFLAGS $ac_c" | sed s/-O[0-9]*//`
else
INLINE_CFLAGS="$CFLAGS"
fi
changequote([,])
AC_C_INLINE
AC_SUBST(INLINE_CFLAGS)
])
AC_DEFUN(LIBZEND_CPLUSPLUS_CHECKS,[
dnl extra check to avoid C++ preprocessor testing if in non-ZTS mode
if test "$ZEND_EXPERIMENTAL_ZTS" = "yes"; then
AC_PROG_CXX
AC_PROG_CXXCPP
AC_LANG_CPLUSPLUS
AC_CHECK_HEADER(stdiostream.h, [ AC_DEFINE(HAVE_STDIOSTREAM_H, [], Whether you have stdiostream.h) ])
AC_CHECK_LIB(C, cin)
AC_CHECK_LIB(g++, cin)
AC_CHECK_LIB(stdc++, cin)
dnl Digital Unix 4.0
AC_CHECK_LIB(cxx, cin)
AC_CHECK_LIB(cxxstd, __array_delete)
AC_CACHE_CHECK(for class istdiostream,ac_cv_class_istdiostream,[
AC_TRY_COMPILE([
#include <sys/types.h>
#include <unistd.h>
#include <fstream.h>
#include <stdiostream.h>
],[
istdiostream *foo = new istdiostream((FILE *) 0);
],[
ac_cv_class_istdiostream=yes
],[
ac_cv_class_istdiostream=no
])
])
if test "$ac_cv_class_istdiostream" = "yes"; then
AC_DEFINE(HAVE_CLASS_ISTDIOSTREAM, 1, [Whether you have class istdiostream])
fi
AC_LANG_C
fi
])
+16 -16
View File
@@ -4,7 +4,7 @@
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_compile.h"\
".\config.w32.h"\
".\zend_config.w32.h"\
".\zend_execute.h"\
".\zend_llist.h"\
".\zend_ptr_stack.h"\
@@ -17,7 +17,7 @@
.\alloca.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\config.w32.h"\
".\zend_config.w32.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_hash.h"\
@@ -27,7 +27,7 @@
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_compile.h"\
".\config.w32.h"\
".\zend_config.w32.h"\
".\zend_execute.h"\
".\zend_llist.h"\
".\modules.h"\
@@ -46,7 +46,7 @@
.\zend_constants.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\config.w32.h"\
".\zend_config.w32.h"\
".\zend_constants.h"\
".\zend_operators.h"\
".\zend_variables.h"\
@@ -59,7 +59,7 @@
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_compile.h"\
".\config.w32.h"\
".\zend_config.w32.h"\
".\zend_constants.h"\
".\zend_execute.h"\
".\zend_llist.h"\
@@ -80,7 +80,7 @@
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_compile.h"\
".\config.w32.h"\
".\zend_config.w32.h"\
".\zend_execute.h"\
".\zend_highlight.h"\
".\zend_llist.h"\
@@ -96,7 +96,7 @@
.\zend_llist.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\config.w32.h"\
".\zend_config.w32.h"\
".\zend_llist.h"\
".\zend.h"\
".\zend_errors.h"\
@@ -107,7 +107,7 @@
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_compile.h"\
".\config.w32.h"\
".\zend_config.w32.h"\
".\zend_execute.h"\
".\zend_llist.h"\
".\modules.h"\
@@ -127,7 +127,7 @@
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_compile.h"\
".\config.w32.h"\
".\zend_config.w32.h"\
".\zend_execute.h"\
".\zend_llist.h"\
".\zend_operators.h"\
@@ -143,7 +143,7 @@
.\zend_ptr_stack.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\config.w32.h"\
".\zend_config.w32.h"\
".\zend_ptr_stack.h"\
".\zend.h"\
".\zend_errors.h"\
@@ -153,7 +153,7 @@
.\zend_stack.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\config.w32.h"\
".\zend_config.w32.h"\
".\zend_stack.h"\
".\zend.h"\
".\zend_errors.h"\
@@ -164,7 +164,7 @@
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_compile.h"\
".\config.w32.h"\
".\zend_config.w32.h"\
".\zend_constants.h"\
".\zend_execute.h"\
".\zend_llist.h"\
@@ -184,7 +184,7 @@
.\zend.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\config.w32.h"\
".\zend_config.w32.h"\
".\zend_operators.h"\
".\zend_variables.h"\
".\zend.h"\
@@ -196,7 +196,7 @@
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\zend_compile.h"\
".\config.w32.h"\
".\zend_config.w32.h"\
".\zend_constants.h"\
".\zend_execute.h"\
".\zend_llist.h"\
@@ -216,7 +216,7 @@
.\zend_hash.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\config.w32.h"\
".\zend_config.w32.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_hash.h"\
@@ -225,7 +225,7 @@
.\zend_ini.c : \
"..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
".\zend_alloc.h"\
".\config.w32.h"\
".\zend_config.w32.h"\
".\zend.h"\
".\zend_errors.h"\
".\zend_hash.h"\
+452 -363
View File
@@ -1,363 +1,452 @@
# Microsoft Developer Studio Project File - Name="libzendts" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=libzendts - Win32 Debug_TS
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "libzendts.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "libzendts.mak" CFG="libzendts - Win32 Debug_TS"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "libzendts - Win32 Release_TS" (based on "Win32 (x86) Static Library")
!MESSAGE "libzendts - Win32 Debug_TS" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "libzendts - Win32 Release_TS"
# PROP BASE Use_MFC 0
# PROP BASE Output_Dir "Release_TS"
# PROP BASE Intermediate_Dir "Release_TS"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Output_Dir "Release_TS"
# PROP Intermediate_Dir "Release_TS"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDebug_TS" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "WIN32" /D "_MBCS" /D ZEND_DEBUG=0 /FR /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x40d /d "NDebug_TS"
# ADD RSC /l 0x40d /d "NDebug_TS"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "libzendts - Win32 Debug_TS"
# PROP BASE Use_MFC 0
# PROP BASE Output_Dir "Debug_TS"
# PROP BASE Intermediate_Dir "Debug_TS"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Output_Dir "Debug_TS"
# PROP Intermediate_Dir "Debug_TS"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_Debug_TS" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_Debug_TS" /D "_LIB" /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D "ZTS" /D ZEND_DEBUG=1 /FR /YX /FD /GZ /c
# ADD BASE RSC /l 0x40d /d "_Debug_TS"
# ADD RSC /l 0x40d /d "_Debug_TS"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ENDIF
# Begin Target
# Name "libzendts - Win32 Release_TS"
# Name "libzendts - Win32 Debug_TS"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=".\zend-parser.c"
# End Source File
# Begin Source File
SOURCE=".\zend-scanner.cpp"
# End Source File
# Begin Source File
SOURCE=.\zend.c
# End Source File
# Begin Source File
SOURCE=.\zend_alloc.c
# End Source File
# Begin Source File
SOURCE=.\zend_API.c
# End Source File
# Begin Source File
SOURCE=.\zend_compile.c
# End Source File
# Begin Source File
SOURCE=.\zend_constants.c
# End Source File
# Begin Source File
SOURCE=.\zend_execute.c
# End Source File
# Begin Source File
SOURCE=.\zend_execute_API.c
# End Source File
# Begin Source File
SOURCE=.\zend_extensions.c
# End Source File
# Begin Source File
SOURCE=.\zend_hash.c
# End Source File
# Begin Source File
SOURCE=.\zend_highlight.c
# End Source File
# Begin Source File
SOURCE=.\zend_indent.c
# End Source File
# Begin Source File
SOURCE=.\zend_list.c
# End Source File
# Begin Source File
SOURCE=.\zend_llist.c
# End Source File
# Begin Source File
SOURCE=.\zend_opcode.c
# End Source File
# Begin Source File
SOURCE=.\zend_operators.c
# End Source File
# Begin Source File
SOURCE=.\zend_ptr_stack.c
# End Source File
# Begin Source File
SOURCE=.\zend_sprintf.c
# End Source File
# Begin Source File
SOURCE=.\zend_stack.c
# End Source File
# Begin Source File
SOURCE=.\zend_variables.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\config.w32.h
# End Source File
# Begin Source File
SOURCE=.\FlexLexer.h
# End Source File
# Begin Source File
SOURCE=.\modules.h
# End Source File
# Begin Source File
SOURCE=".\zend-parser.h"
# End Source File
# Begin Source File
SOURCE=".\zend-scanner.h"
# End Source File
# Begin Source File
SOURCE=.\zend.h
# End Source File
# Begin Source File
SOURCE=.\zend_alloc.h
# End Source File
# Begin Source File
SOURCE=.\zend_API.h
# End Source File
# Begin Source File
SOURCE=.\zend_compile.h
# End Source File
# Begin Source File
SOURCE=.\zend_constants.h
# End Source File
# Begin Source File
SOURCE=.\zend_errors.h
# End Source File
# Begin Source File
SOURCE=.\zend_execute.h
# End Source File
# Begin Source File
SOURCE=.\zend_extensions.h
# End Source File
# Begin Source File
SOURCE=.\zend_globals.h
# End Source File
# Begin Source File
SOURCE=.\zend_hash.h
# End Source File
# Begin Source File
SOURCE=.\zend_highlight.h
# End Source File
# Begin Source File
SOURCE=.\zend_indent.h
# End Source File
# Begin Source File
SOURCE=.\zend_list.h
# End Source File
# Begin Source File
SOURCE=.\zend_llist.h
# End Source File
# Begin Source File
SOURCE=.\zend_operators.h
# End Source File
# Begin Source File
SOURCE=.\zend_ptr_stack.h
# End Source File
# Begin Source File
SOURCE=.\zend_stack.h
# End Source File
# Begin Source File
SOURCE=.\zend_variables.h
# End Source File
# End Group
# Begin Group "Parsers"
# PROP Default_Filter "y"
# Begin Source File
SOURCE=".\zend-parser.y"
!IF "$(CFG)" == "libzendts - Win32 Release_TS"
# Begin Custom Build
InputDir=.
InputPath=".\zend-parser.y"
BuildCmds= \
bison --output=zend-parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend-parser.y
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "libzendts - Win32 Debug_TS"
# Begin Custom Build
InputDir=.
InputPath=".\zend-parser.y"
BuildCmds= \
bison --output=zend-parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend-parser.y
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ENDIF
# End Source File
# End Group
# Begin Group "Scanners"
# PROP Default_Filter "l"
# Begin Source File
SOURCE=".\zend-scanner.l"
!IF "$(CFG)" == "libzendts - Win32 Release_TS"
# Begin Custom Build
InputPath=".\zend-scanner.l"
"zend-scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -+ -i -Sflex.skl -Pzend -ozend-scanner.cpp zend-scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "libzendts - Win32 Debug_TS"
# Begin Custom Build
InputPath=".\zend-scanner.l"
"zend-scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -+ -i -Sflex.skl -Pzend -ozend-scanner.cpp zend-scanner.l
# End Custom Build
!ENDIF
# End Source File
# End Group
# Begin Group "Text Files"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\LICENSE
# End Source File
# Begin Source File
SOURCE=.\ZEND_BUGS
# End Source File
# Begin Source File
SOURCE=.\ZEND_CHANGES
# End Source File
# End Group
# Begin Group "Resources"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\zend.ico
# End Source File
# End Group
# End Target
# End Project
# Microsoft Developer Studio Project File - Name="ZendTS" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=ZendTS - Win32 Release_TS_inline
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "ZendTS.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "ZendTS.mak" CFG="ZendTS - Win32 Release_TS_inline"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "ZendTS - Win32 Release_TS" (based on "Win32 (x86) Static Library")
!MESSAGE "ZendTS - Win32 Debug_TS" (based on "Win32 (x86) Static Library")
!MESSAGE "ZendTS - Win32 Release_TS_inline" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
# PROP BASE Use_MFC 0
# PROP BASE Output_Dir "Release_TS"
# PROP BASE Intermediate_Dir "Release_TS"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Output_Dir "Release_TS"
# PROP Intermediate_Dir "Release_TS"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDebug_TS" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x40d /d "NDebug_TS"
# ADD RSC /l 0x40d /d "NDebug_TS"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
# PROP BASE Use_MFC 0
# PROP BASE Output_Dir "Debug_TS"
# PROP BASE Intermediate_Dir "Debug_TS"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Output_Dir "Debug_TS"
# PROP Intermediate_Dir "Debug_TS"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_Debug_TS" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_Debug_TS" /D ZEND_DEBUG=1 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c
# ADD BASE RSC /l 0x40d /d "_Debug_TS"
# ADD RSC /l 0x40d /d "_Debug_TS"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
# PROP BASE Use_MFC 0
# PROP BASE Output_Dir "ZendTS___Win32_Release_TS_inline"
# PROP BASE Intermediate_Dir "ZendTS___Win32_Release_TS_inline"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Output_Dir "Release_TS_inline"
# PROP Intermediate_Dir "Release_TS_inline"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "WIN32" /D "_MBCS" /D ZEND_DEBUG=0 /FR /FD /c
# SUBTRACT BASE CPP /YX
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D "ZEND_WIN32_FORCE_INLINE" /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x40d /d "NDebug_TS"
# ADD RSC /l 0x40d /d "NDebug_TS"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ENDIF
# Begin Target
# Name "ZendTS - Win32 Release_TS"
# Name "ZendTS - Win32 Debug_TS"
# Name "ZendTS - Win32 Release_TS_inline"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=".\zend-parser.c"
# End Source File
# Begin Source File
SOURCE=".\zend-scanner.cpp"
# End Source File
# Begin Source File
SOURCE=.\zend.c
# End Source File
# Begin Source File
SOURCE=.\zend_alloc.c
# End Source File
# Begin Source File
SOURCE=.\zend_API.c
# End Source File
# Begin Source File
SOURCE=.\zend_builtin_functions.c
# End Source File
# Begin Source File
SOURCE=.\zend_compile.c
# End Source File
# Begin Source File
SOURCE=.\zend_constants.c
# End Source File
# Begin Source File
SOURCE=.\zend_dynamic_array.c
# End Source File
# Begin Source File
SOURCE=.\zend_execute.c
# End Source File
# Begin Source File
SOURCE=.\zend_execute_API.c
# End Source File
# Begin Source File
SOURCE=.\zend_extensions.c
# End Source File
# Begin Source File
SOURCE=.\zend_gcc_inline.c
# End Source File
# Begin Source File
SOURCE=.\zend_hash.c
# End Source File
# Begin Source File
SOURCE=.\zend_highlight.c
# End Source File
# Begin Source File
SOURCE=.\zend_indent.c
# End Source File
# Begin Source File
SOURCE=.\zend_list.c
# End Source File
# Begin Source File
SOURCE=.\zend_llist.c
# End Source File
# Begin Source File
SOURCE=.\zend_opcode.c
# End Source File
# Begin Source File
SOURCE=.\zend_operators.c
# End Source File
# Begin Source File
SOURCE=.\zend_ptr_stack.c
# End Source File
# Begin Source File
SOURCE=.\zend_sprintf.c
# End Source File
# Begin Source File
SOURCE=.\zend_stack.c
# End Source File
# Begin Source File
SOURCE=.\zend_variables.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\FlexLexer.h
# End Source File
# Begin Source File
SOURCE=.\modules.h
# End Source File
# Begin Source File
SOURCE=".\zend-parser.h"
# End Source File
# Begin Source File
SOURCE=".\zend-scanner.h"
# End Source File
# Begin Source File
SOURCE=.\zend.h
# End Source File
# Begin Source File
SOURCE=.\zend_alloc.h
# End Source File
# Begin Source File
SOURCE=.\zend_API.h
# End Source File
# Begin Source File
SOURCE=.\zend_builtin_functions.h
# End Source File
# Begin Source File
SOURCE=.\zend_compile.h
# End Source File
# Begin Source File
SOURCE=.\zend_config.w32.h
# End Source File
# Begin Source File
SOURCE=.\zend_constants.h
# End Source File
# Begin Source File
SOURCE=.\zend_dynamic_array.h
# End Source File
# Begin Source File
SOURCE=.\zend_errors.h
# End Source File
# Begin Source File
SOURCE=.\zend_execute.h
# End Source File
# Begin Source File
SOURCE=.\zend_execute_locks.h
# End Source File
# Begin Source File
SOURCE=.\zend_extensions.h
# End Source File
# Begin Source File
SOURCE=.\zend_fast_cache.h
# End Source File
# Begin Source File
SOURCE=.\zend_globals.h
# End Source File
# Begin Source File
SOURCE=.\zend_globals_macros.h
# End Source File
# Begin Source File
SOURCE=.\zend_hash.h
# End Source File
# Begin Source File
SOURCE=.\zend_highlight.h
# End Source File
# Begin Source File
SOURCE=.\zend_indent.h
# End Source File
# Begin Source File
SOURCE=.\zend_list.h
# End Source File
# Begin Source File
SOURCE=.\zend_llist.h
# End Source File
# Begin Source File
SOURCE=.\zend_operators.h
# End Source File
# Begin Source File
SOURCE=.\zend_ptr_stack.h
# End Source File
# Begin Source File
SOURCE=.\zend_stack.h
# End Source File
# Begin Source File
SOURCE=.\zend_variables.h
# End Source File
# End Group
# Begin Group "Parsers"
# PROP Default_Filter "y"
# Begin Source File
SOURCE=".\zend-parser.y"
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
# Begin Custom Build
InputDir=.
InputPath=".\zend-parser.y"
BuildCmds= \
if not "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p zend zend-parser.y \
if "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend-parser.y \
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
# Begin Custom Build
InputDir=.
InputPath=".\zend-parser.y"
BuildCmds= \
if not "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p zend zend-parser.y \
if "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend-parser.y \
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
# Begin Custom Build
InputDir=.
InputPath=".\zend-parser.y"
BuildCmds= \
if not "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "%CYGWIN%\share\bison.simple" -p zend zend-parser.y \
if "X%CYGWIN%"=="X" bison --output=zend-parser.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" -p zend zend-parser.y \
"$(InputDir)\zend-parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(InputDir)\zend-parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ENDIF
# End Source File
# End Group
# Begin Group "Scanners"
# PROP Default_Filter "l"
# Begin Source File
SOURCE=".\zend-scanner.l"
!IF "$(CFG)" == "ZendTS - Win32 Release_TS"
# Begin Custom Build
InputPath=".\zend-scanner.l"
"zend-scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -+ -i -Sflex.skl -Pzend -ozend-scanner.cpp zend-scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Debug_TS"
# Begin Custom Build
InputPath=".\zend-scanner.l"
"zend-scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -+ -B -i -Sflex.skl -Pzend -ozend-scanner.cpp zend-scanner.l
# End Custom Build
!ELSEIF "$(CFG)" == "ZendTS - Win32 Release_TS_inline"
# Begin Custom Build
InputPath=".\zend-scanner.l"
"zend-scanner.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
flex -+ -i -Sflex.skl -Pzend -ozend-scanner.cpp zend-scanner.l
# End Custom Build
!ENDIF
# End Source File
# End Group
# Begin Group "Text Files"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\LICENSE
# End Source File
# Begin Source File
SOURCE=.\ZEND_BUGS
# End Source File
# Begin Source File
SOURCE=.\ZEND_CHANGES
# End Source File
# End Group
# Begin Group "Resources"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\zend.ico
# End Source File
# End Group
# End Target
# End Project
+45 -38
View File
@@ -1,50 +1,57 @@
/* This is the default configuration file to read */
#define USE_CONFIG_FILE 1
#define ZEND_API
#define ZEND_DLEXPORT
@TOP@
/* these are defined by automake */
#undef PACKAGE
#undef VERSION
/* define uint by configure if it is missed (QNX and BSD derived) */
#undef uint
/* define ulong by configure if it is missed (most probably is) */
#undef ulong
/* type check for in_addr_t */
#undef in_addr_t
/* Define if you have dirent.h but opendir() resides in libc rather than in libdir */
/* This will cause HAVE_DIRENT_H defined twice sometimes, but it should be problem */
#define HAVE_DIRENT_H 0
/* Define if you have struct flock */
#define HAVE_STRUCT_FLOCK 0
/* Define if you have the resolv library (-lresolv). */
#define HAVE_LIBRESOLV 0
/* Undefine if you want stricter XML/SGML compliance by default */
/* (this disables "<?expression?>" by default) */
#define T_DEFAULT_SHORT_OPEN_TAG 1
/* Define both of these if you want the bundled REGEX library */
#define REGEX 0
#define HSREGEX 0
/* Define if you have libdl (used for dynamic linking) */
#define HAVE_LIBDL 0
#undef ZEND_DEBUG
/* Define if you want to enable bc style precision math support */
#define WITH_BCMATH 0
/* Define if you want to enable memory limit support */
#define MEMORY_LIMIT 0
/* Define if you have broken sprintf function like SunOS 4 */
#define BROKEN_SPRINTF 0
@BOTTOM@
/* Define to compile Zend thread safe */
#undef ZTS
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_STRING_H
# include <string.h>
#else
# include <strings.h>
#endif
#if ZEND_BROKEN_SPRINTF
int zend_sprintf(char *buffer, const char *format, ...);
#else
# define zend_sprintf sprintf
#endif
#ifdef HAVE_FINITE
#define zend_finite(a) finite(a)
#elif defined(HAVE_ISFINITE)
#define zend_finite(a) isfinite(a)
#elif defined(HAVE_ISNAN) && defined(HAVE_ISINF)
#define zend_finite(a) (isnan(a) ? 0 : isinf(a) ? 0 : 1)
#elif defined(HAVE_ISNAN)
#define zend_finite(a) (isnan(a) ? 0 : 1)
#elif defined(HAVE_ISINF)
#define zend_finite(a) (isinf(a) ? 0 : 1)
#else
#define zend_finite(a) (1)
#endif
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
+38 -11
View File
@@ -2,19 +2,46 @@ dnl $Id$
dnl
dnl This file contains local autoconf functions.
AC_DEFUN(ZEND_FP_EXCEPT,[
AC_CACHE_CHECK(whether fp_except is defined, ac_cv_type_fp_except,[
AC_TRY_COMPILE([
#include <floatingpoint.h>
],[
fp_except x = (fp_except) 0;
],[
ac_cv_type_fp_except=yes
],[
ac_cv_type_fp_except=no
],[
ac_cv_type_fp_except=no
])])
if test "$ac_cv_type_fp_except" = "yes"; then
AC_DEFINE(HAVE_FP_EXCEPT, 1, [whether floatingpoint.h defines fp_except])
fi
])
dnl
dnl Check for broken sprintf()
dnl
AC_DEFUN(AC_BROKEN_SPRINTF,[
AC_MSG_CHECKING([for broken sprintf])
AC_TRY_RUN([main() { char buf[20]; exit (sprintf(buf,"testing 123")!=11); }],[
AC_DEFINE(BROKEN_SPRINTF,0)
AC_MSG_RESULT(ok)
],[
AC_DEFINE(BROKEN_SPRINTF,1)
AC_MSG_RESULT(broken)
],[
AC_DEFINE(BROKEN_SPRINTF,0)
AC_MSG_RESULT(cannot check, guessing ok)
AC_DEFUN(AC_ZEND_BROKEN_SPRINTF,[
AC_CACHE_CHECK(whether sprintf is broken, ac_cv_broken_sprintf,[
AC_TRY_RUN([main() {char buf[20];exit(sprintf(buf,"testing 123")!=11); }],[
ac_cv_broken_sprintf=no
],[
ac_cv_broken_sprintf=yes
],[
ac_cv_broken_sprintf=no
])
])
if test "$ac_cv_broken_sprintf" = "yes"; then
ac_result=1
else
ac_result=0
fi
AC_DEFINE_UNQUOTED(ZEND_BROKEN_SPRINTF, $ac_result, [Whether sprintf is broken])
])
AC_DEFUN(AM_SET_LIBTOOL_VARIABLE,[
LIBTOOL='$(SHELL) $(top_builddir)/libtool $1'
])
+43
View File
@@ -0,0 +1,43 @@
# Makefile to generate build tools
#
# Standard usage:
# make -f build.mk
#
# Written by Sascha Schumann
#
# $Id$
LT_TARGETS = ltmain.sh ltconfig
config_h_in = zend_config.h.in
makefile_am_files = Makefile.am
makefile_in_files = $(makefile_am_files:.am=.in)
makefile_files = $(makefile_am_files:e.am=e)
targets = $(makefile_in_files) $(LT_TARGETS) configure $(config_h_in)
all: $(targets)
clean:
rm -f $(targets)
$(LT_TARGETS):
rm -f $(LT_TARGETS)
libtoolize --automake $(AMFLAGS) -f
$(makefile_in_files): $(makefile_am_files)
automake -a -i $(AMFLAGS) $(makefile_files)
aclocal.m4: configure.in acinclude.m4
aclocal
$(config_h_in): configure.in acconfig.h
# explicitly remove target since autoheader does not seem to work
# correctly otherwise (timestamps are not updated)
@rm -f $@
autoheader
configure: aclocal.m4 configure.in
autoconf
+10 -1
View File
@@ -1,5 +1,14 @@
#!/bin/sh
case "$1" in
--copy)
automake_flags=--copy
shift
;;
esac
libtoolize --force --automake $automake_flags
mv aclocal.m4 aclocal.m4.old 2>/dev/null
aclocal
if cmp aclocal.m4.old aclocal.m4 > /dev/null 2>&1; then
@@ -11,7 +20,7 @@ fi
autoheader
automake --add-missing --include-deps
automake --add-missing --include-deps $automake_flags
mv configure configure.old 2>/dev/null
autoconf
+14 -123
View File
@@ -6,38 +6,21 @@ AM_INIT_AUTOMAKE(zend, 0.80A)
AM_CONFIG_HEADER(zend_config.h)
AM_SANITY_CHECK
AM_MAINTAINER_MODE
AC_PROG_CC
AM_PROG_LEX
AM_PROG_CC_STDC
ZEND_VERSION=$VERSION
dnl We want this one before the checks, so the checks can modify CFLAGS.
test -z "$CFLAGS" && auto_cflags=1
dnl Checks for programs.
AC_PROG_YACC
if test "$YACC" != "bison -y"; then
AC_MSG_WARN(You will need bison if you want to regenerate the Zend parser.)
else
AC_MSG_CHECKING(bison version)
set `bison --version| sed -e 's/^GNU Bison version //' -e 's/\./ /'`
if test "$1" = "1" -a "$2" -lt "25"; then
AC_MSG_WARN(You will need bison 1.25 if you want to regenerate the Zend parser (found $1.$2).)
fi
AC_MSG_RESULT($1.$2 (ok))
fi
AC_PROG_CC
AC_PROG_RANLIB
AC_PROG_CC_C_O
AM_PROG_LEX
sinclude(Zend.m4)
dnl Hack to work around a Mac OS X cpp problem
dnl Known versions needing this workaround are 5.3 and 5.4
if test "$ac_cv_prog_gcc" = "yes" -a "`uname -s`" = "Rhapsody"; then
CPPFLAGS="$CPPFLAGS -traditional-cpp"
fi
LIBZEND_BASIC_CHECKS
dnl Ugly hack to get around a problem with gcc on AIX.
if test "$CC" = "gcc" -a "$ac_cv_prog_cc_g" = "yes" -a \
"`uname -sv`" = "AIX 4"; then
CFLAGS=`echo $CFLAGS | sed -e 's/-g//'`
AM_PROG_LIBTOOL
if test "$enable_debug" != "yes"; then
AM_SET_LIBTOOL_VARIABLE([--silent])
fi
dnl
@@ -49,105 +32,13 @@ if test -d /usr/pkg/include -a -d /usr/pkg/lib ; then
LDFLAGS="$LDFLAGS -L/usr/pkg/lib"
fi
AC_CHECK_LIB(c, dlopen, [
# fake it
AC_DEFINE(HAVE_LIBDL) ], [
AC_CHECK_LIB(dl, dlopen, [
LIBS="-ldl $LIBS"
AC_DEFINE(HAVE_LIBDL) ], []) ])
dnl The sin may be in a library which need not be specifed
dnl as well as res_search resides in libsocket
AC_CHECK_LIB(c, sin, [:], [
AC_CHECK_LIB(m, sin) ])
dnl Checks for header files.
AC_HEADER_STDC
dnl In QNX opendir resides in libc but dirent.h is still required
if test "`uname -s 2>/dev/null`" != "QNX"; then
AC_HEADER_DIRENT
else
AC_CHECK_HEADERS(dirent.h)
fi
dnl QNX requires unix.h to allow functions in libunix to work properly
AC_CHECK_HEADERS(fcntl.h unistd.h crypt.h sys/file.h memory.h pwd.h grp.h sys/socket.h sys/wait.h syslog.h string.h sys/varargs.h stdarg.h sys/resource.h sys/time.h signal.h netinet/in.h dlfcn.h limits.h sys/types.h sys/statvfs.h sys/statfs.h unix.h db.h ndbm.h)
dnl Checks for types
AC_TYPE_SIZE_T
dnl This is required for QNX and may be some BSD derived systems
AC_CHECK_TYPE( uint, unsigned int )
AC_CHECK_TYPE( ulong, unsigned long )
AC_CHECK_SIZEOF(void *, 4)
dnl Checks for library functions.
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(memcpy memmove strdup strerror strcasecmp strstr flock lockf putenv tempnam usleep setlocale gettimeofday setvbuf srand48 lrand48 srandom random link symlink regcomp getlogin cuserid vsnprintf snprintf gcvt utime crypt setitimer rint unsetenv strftime setsockopt tzset statvfs statfs inet_aton getpid kill)
AC_FUNC_UTIME_NULL
AC_FUNC_ALLOCA
AC_BROKEN_SPRINTF
AC_REPLACE_FUNCS(getopt)
AC_MSG_CHECKING(whether to include debugging symbols)
AC_ARG_ENABLE(debug,
[ --disable-debug Compile without debugging symbols],
[
if test "$enableval" = "yes"; then
AC_MSG_RESULT(yes)
AC_DEFINE(ZEND_DEBUG,1)
DEBUG_CFLAGS="-g"
test -n "$GCC" && DEBUG_CFLAGS="$DEBUG_CFLAGS -Wall"
test -n "$GCC" && test "$USE_MAINTAINER_MODE" = "yes" && \
DEBUG_CFLAGS="$DEBUG_CFLAGS -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations"
else
AC_MSG_RESULT(no)
AC_DEFINE(ZEND_DEBUG,0)
DEBUG_CFLAGS=""
fi
],[
AC_MSG_RESULT(yes)
AC_DEFINE(ZEND_DEBUG,1)
DEBUG_CFLAGS="-g"
])
AC_SUBST(DEBUG_CFLAGS)
CFLAGS="$CFLAGS $DEBUG_CFLAGS"
AC_MSG_CHECKING(whether to enable a memory limit)
AC_ARG_ENABLE(memory-limit,
[ --enable-memory-limit Compile with memory limit support. ],
[
if test "$enableval" = "yes"; then
AC_DEFINE(MEMORY_LIMIT, 1)
AC_MSG_RESULT(yes)
else
AC_DEFINE(MEMORY_LIMIT, 0)
AC_MSG_RESULT(no)
fi
],[
AC_DEFINE(MEMORY_LIMIT, 0)
AC_MSG_RESULT(no)
])
AC_MSG_CHECKING(whether to build Zend thread-safe)
AC_ARG_ENABLE(thread-safety,
[ --enable-thread-safety Whether to build Zend thread-safe.],[
AC_DEFINE(ZTS)
AC_MSG_RESULT(yes)
],[
AC_MSG_RESULT(no)
])
AC_SUBST(TSRM_DIR)
AC_SUBST(TSRM_LIB)
AC_SUBST(CFLAGS_SHLIB)
AC_SUBST(LDFLAGS_SHLIB)
AC_SUBST(LDFLAGS_SHLIB_EXPORT)
AC_OUTPUT(Makefile, [], [])
LIBZEND_ENABLE_DEBUG
LIBZEND_OTHER_CHECKS
EXTRA_LIBS="$LIBS"
LIBS=""
AC_SUBST(EXTRA_LIBS)
AC_OUTPUT(Makefile)
# Local Variables:
# tab-width: 4
+170 -99
View File
@@ -3,12 +3,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -27,41 +27,45 @@
*
*/
#include "zend_compile.h"
#include "zend.h"
#include "zend_list.h"
#include "zend_globals.h"
#include "zend_API.h"
#include "zend_variables.h"
#include "zend_operators.h"
#define YYERROR_VERBOSE
#define YYSTYPE znode
#ifdef ZTS
# define YYPARSE_PARAM compiler_globals
# define YYLEX_PARAM compiler_globals
#endif
%}
%pure_parser
%expect 4
%left T_INCLUDE T_EVAL
%left T_INCLUDE T_INCLUDE_ONCE T_EVAL
%left ','
%left T_LOGICAL_OR
%left T_LOGICAL_XOR
%left T_LOGICAL_AND
%right T_PRINT
%left '=' T_PLUS_EQUAL T_MINUS_EQUAL T_MUL_EQUAL T_DIV_EQUAL T_CONCAT_EQUAL T_MOD_EQUAL T_AND_EQUAL T_OR_EQUAL XT_OR_EQUAL T_SL_EQUAL T_SR_EQUAL
%left '=' T_PLUS_EQUAL T_MINUS_EQUAL T_MUL_EQUAL T_DIV_EQUAL T_CONCAT_EQUAL T_MOD_EQUAL T_AND_EQUAL T_OR_EQUAL T_XOR_EQUAL T_SL_EQUAL T_SR_EQUAL
%left '?' ':'
%left T_BOOLEAN_OR
%left T_BOOLEAN_AND
%left '|'
%left '^'
%left '&'
%nonassoc T_IS_EQUAL T_IS_NOT_EQUAL
%nonassoc T_IS_EQUAL T_IS_NOT_EQUAL T_IS_IDENTICAL T_IS_NOT_IDENTICAL
%nonassoc '<' T_IS_SMALLER_OR_EQUAL '>' T_IS_GREATER_OR_EQUAL
%left T_SL T_SR
%left '+' '-' '.'
%left '*' '/' '%'
%right '!' '~' T_INC T_DEC T_INT_CAST T_DOUBLE_CAST T_STRING_CAST T_ARRAY_CAST T_OBJECT_CAST T_BOOL_CAST '@'
%right '!' '~' T_INC T_DEC T_INT_CAST T_DOUBLE_CAST T_STRING_CAST T_ARRAY_CAST T_OBJECT_CAST T_BOOL_CAST T_UNSET_CAST '@'
%right '['
%nonassoc T_NEW
%token T_EXIT
@@ -88,6 +92,8 @@
%token T_ENDFOR
%token T_FOREACH
%token T_ENDFOREACH
%token T_DECLARE
%token T_ENDDECLARE
%token T_AS
%token T_SWITCH
%token T_ENDSWITCH
@@ -100,6 +106,8 @@
%token T_CONST
%token T_RETURN
%token T_REQUIRE
%token T_REQUIRE_ONCE
%token T_USE
%token T_GLOBAL
%token T_STATIC
%token T_VAR
@@ -120,16 +128,20 @@
%token T_OPEN_TAG_WITH_ECHO
%token T_CLOSE_TAG
%token T_WHITESPACE
%token T_HEREDOC
%token T_START_HEREDOC
%token T_END_HEREDOC
%token T_DOLLAR_OPEN_CURLY_BRACES
%token T_CURLY_OPEN
%token T_PAAMAYIM_NEKUDOTAYIM
%token T_PHP_TRACK_VARS
%% /* Rules */
start:
top_statement_list
;
top_statement_list:
top_statement_list { do_extended_info(CLS_C); } top_statement { ELS_FETCH(); HANDLE_INTERACTIVE(); }
top_statement_list { do_extended_info(CLS_C); } top_statement { HANDLE_INTERACTIVE(); }
| /* empty */
;
@@ -141,7 +153,7 @@ top_statement:
inner_statement_list:
inner_statement_list { do_extended_info(CLS_C); } inner_statement { ELS_FETCH(); HANDLE_INTERACTIVE(); }
inner_statement_list { do_extended_info(CLS_C); } inner_statement { HANDLE_INTERACTIVE(); }
| /* empty */
;
@@ -153,11 +165,16 @@ inner_statement:
statement:
unticked_statement { do_ticks(CLS_C); }
;
unticked_statement:
'{' inner_statement_list '}'
| T_IF '(' expr ')' { do_if_cond(&$3, &$4 CLS_CC); } statement { do_if_after_statement(&$4, 1 CLS_CC); } elseif_list else_single { do_if_end(CLS_C); }
| T_IF '(' expr ')' ':' { do_if_cond(&$3, &$4 CLS_CC); } inner_statement_list { do_if_after_statement(&$4, 1 CLS_CC); } new_elseif_list new_else_single T_ENDIF ';' { do_if_end(CLS_C); }
| T_WHILE '(' { $1.u.opline_num = get_next_op_number(CG(active_op_array)); } expr ')' { do_while_cond(&$4, &$5 CLS_CC); } while_statement { do_while_end(&$1, &$5 CLS_CC); }
| T_DO { $1.u.opline_num = get_next_op_number(CG(active_op_array)); do_do_while_begin(CLS_C); } statement T_WHILE '(' expr ')' ';' { do_do_while_end(&$1, &$6 CLS_CC); }
| T_DO { $1.u.opline_num = get_next_op_number(CG(active_op_array)); do_do_while_begin(CLS_C); } statement T_WHILE '(' { $5.u.opline_num = get_next_op_number(CG(active_op_array)); } expr ')' ';' { do_do_while_end(&$1, &$5, &$7 CLS_CC); }
| T_FOR
'('
for_expr
@@ -172,24 +189,47 @@ statement:
| T_BREAK expr ';' { do_brk_cont(ZEND_BRK, &$2 CLS_CC); }
| T_CONTINUE ';' { do_brk_cont(ZEND_CONT, NULL CLS_CC); }
| T_CONTINUE expr ';' { do_brk_cont(ZEND_CONT, &$2 CLS_CC); }
| T_RETURN ';' { do_return(NULL CLS_CC); }
| T_RETURN expr ';' { do_return(&$2 CLS_CC); }
| T_GLOBAL global_var_list
| T_STATIC static_var_list
| T_RETURN ';' { do_return(NULL, 0 CLS_CC); }
| T_RETURN expr_without_variable ';' { do_return(&$2, 0 CLS_CC); }
| T_RETURN cvar ';' { do_return(&$2, 1 CLS_CC); }
| T_GLOBAL global_var_list ';'
| T_STATIC static_var_list ';'
| T_ECHO echo_expr_list ';'
| T_INLINE_HTML { do_echo(&$1 CLS_CC); }
| expr ';' { do_free(&$1 CLS_CC); }
| T_REQUIRE expr ';' { if ($2.op_type==IS_CONST && $2.u.constant.type==IS_STRING) { require_filename($2.u.constant.value.str.val CLS_CC); zval_dtor(&$2.u.constant); } else { do_include_or_eval(ZEND_INCLUDE, &$$, &$2 CLS_CC); } }
| T_UNSET '(' r_cvar ')' ';' { do_unset(&$3 CLS_CC); }
| T_REQUIRE expr ';' { do_require(&$2, 0 CLS_CC); }
| T_REQUIRE_ONCE use_filename ';' { do_require(&$2, 1 CLS_CC); }
| T_USE use_filename ';' { use_filename($2.u.constant.value.str.val, $2.u.constant.value.str.len CLS_CC); zval_dtor(&$2.u.constant); }
| T_UNSET '(' unset_variables ')' ';'
| T_FOREACH '(' expr T_AS { do_foreach_begin(&$1, &$3, &$2, &$4 CLS_CC); } w_cvar foreach_optional_arg ')' { do_foreach_cont(&$6, &$7, &$4 CLS_CC); } foreach_statement { do_foreach_end(&$1, &$2 CLS_CC); }
| T_DECLARE { do_declare_begin(CLS_C); } '(' declare_list ')' declare_statement { do_declare_end(CLS_C); }
| ';' /* empty statement */
;
unset_variables:
unset_variable
| unset_variables ',' unset_variable
;
unset_variable:
cvar { do_end_variable_parse(BP_VAR_UNSET, 0 CLS_CC); do_unset(&$1 CLS_CC); }
;
use_filename:
T_CONSTANT_ENCAPSED_STRING { $$ = $1; }
| '(' T_CONSTANT_ENCAPSED_STRING ')' { $$ = $2; }
;
declaration_statement:
T_FUNCTION { $1.u.opline_num = CG(zend_lineno); } T_STRING { do_begin_function_declaration(&$1, &$3, 0 CLS_CC); }
unticked_declaration_statement { do_ticks(CLS_C); }
;
unticked_declaration_statement:
T_FUNCTION { $1.u.opline_num = CG(zend_lineno); } is_reference T_STRING { do_begin_function_declaration(&$1, &$4, 0, $3.op_type CLS_CC); }
'(' parameter_list ')' '{' inner_statement_list '}' { do_end_function_declaration(&$1 CLS_CC); }
| T_OLD_FUNCTION { $1.u.opline_num = CG(zend_lineno); } T_STRING { do_begin_function_declaration(&$1, &$3, 0 CLS_CC); }
| T_OLD_FUNCTION { $1.u.opline_num = CG(zend_lineno); } is_reference T_STRING { do_begin_function_declaration(&$1, &$4, 0, $3.op_type CLS_CC); }
parameter_list '(' inner_statement_list ')' ';' { do_end_function_declaration(&$1 CLS_CC); }
| T_CLASS T_STRING { do_begin_class_declaration(&$2, NULL CLS_CC); } '{' class_statement_list '}' { do_end_class_declaration(CLS_C); }
| T_CLASS T_STRING T_EXTENDS T_STRING { do_begin_class_declaration(&$2, &$4 CLS_CC); } '{' class_statement_list '}' { do_end_class_declaration(CLS_C); }
@@ -214,6 +254,18 @@ foreach_statement:
;
declare_statement:
statement
| ':' inner_statement_list T_ENDDECLARE ';'
;
declare_list:
T_STRING '=' static_scalar { do_declare_stmt(&$1, &$3 CLS_CC); }
| declare_list ',' T_STRING '=' static_scalar { do_declare_stmt(&$3, &$5 CLS_CC); }
;
switch_case_list:
'{' case_list '}' { $$ = $2; }
| '{' ';' case_list '}' { $$ = $3; }
@@ -223,9 +275,9 @@ switch_case_list:
case_list:
/* empty */ { $$.u.opline_num = -1; }
| case_list T_CASE expr case_separator { do_case_before_statement(&$1, &$2, &$3 CLS_CC); } inner_statement_list { do_case_after_statement(&$$, &$2 CLS_CC); }
| case_list T_DEFAULT case_separator { do_default_before_statement(&$1, &$2 CLS_CC); } inner_statement_list { do_case_after_statement(&$$, &$2 CLS_CC); }
/* empty */ { $$.op_type = IS_UNUSED; }
| case_list T_CASE expr case_separator { do_case_before_statement(&$1, &$2, &$3 CLS_CC); } inner_statement_list { do_case_after_statement(&$$, &$2 CLS_CC); $$.op_type = IS_CONST }
| case_list T_DEFAULT case_separator { do_default_before_statement(&$1, &$2 CLS_CC); } inner_statement_list { do_case_after_statement(&$$, &$2 CLS_CC); $$.op_type = IS_CONST; }
;
@@ -279,12 +331,10 @@ non_empty_parameter_list:
| '&' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$2, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; INIT_PZVAL(&$$.u.constant); do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_FORCE CLS_CC); }
| T_CONST T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$2, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; INIT_PZVAL(&$$.u.constant); do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
| T_VARIABLE '=' static_scalar { znode tmp; fetch_simple_variable(&tmp, &$1, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; INIT_PZVAL(&$$.u.constant); do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, &$3, BYREF_NONE CLS_CC); }
| T_VARIABLE '=' T_UNSET { znode tmp; fetch_simple_variable(&tmp, &$1, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=1; $$.u.constant.type=IS_LONG; INIT_PZVAL(&$$.u.constant); do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
| non_empty_parameter_list ',' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$3, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
| non_empty_parameter_list ',' '&' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$4, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_FORCE CLS_CC); }
| non_empty_parameter_list ',' T_CONST T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$4, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
| non_empty_parameter_list ',' T_VARIABLE '=' static_scalar { znode tmp; fetch_simple_variable(&tmp, &$3, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, &$5, BYREF_NONE CLS_CC); }
| non_empty_parameter_list ',' T_VARIABLE '=' T_UNSET { znode tmp; fetch_simple_variable(&tmp, &$3, 0 CLS_CC); $$=$1; $$.u.constant.value.lval++; do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
;
@@ -333,13 +383,16 @@ class_statement_list:
class_statement:
T_VAR class_variable_decleration ';'
| T_FUNCTION { $1.u.opline_num = CG(zend_lineno); } T_STRING { do_begin_function_declaration(&$1, &$3, 1 CLS_CC); } '('
| T_FUNCTION { $1.u.opline_num = CG(zend_lineno); } is_reference T_STRING { do_begin_function_declaration(&$1, &$4, 1, $3.op_type CLS_CC); } '('
parameter_list ')' '{' inner_statement_list '}' { do_end_function_declaration(&$1 CLS_CC); }
| T_OLD_FUNCTION { $1.u.opline_num = CG(zend_lineno); } T_STRING { do_begin_function_declaration(&$1, &$3, 1 CLS_CC); }
| T_OLD_FUNCTION { $1.u.opline_num = CG(zend_lineno); } is_reference T_STRING { do_begin_function_declaration(&$1, &$4, 1, $3.op_type CLS_CC); }
parameter_list '(' inner_statement_list ')' ';' { do_end_function_declaration(&$1 CLS_CC); }
;
is_reference:
/* empty */ { $$.op_type = ZEND_RETURN_VAL; }
| '&' { $$.op_type = ZEND_RETURN_REF; }
class_variable_decleration:
class_variable_decleration ',' T_VARIABLE { do_declare_property(&$3, NULL CLS_CC); }
@@ -348,9 +401,8 @@ class_variable_decleration:
| T_VARIABLE '=' static_scalar { do_declare_property(&$1, &$3 CLS_CC); }
;
echo_expr_list:
/* empty */
| echo_expr_list ',' expr { do_echo(&$3 CLS_CC); }
| expr { do_echo(&$1 CLS_CC); }
;
@@ -358,27 +410,32 @@ echo_expr_list:
for_expr:
/* empty */ { $$.op_type = IS_CONST; $$.u.constant.type = IS_BOOL; $$.u.constant.value.lval = 1; }
| for_expr ',' { do_free(&$1 CLS_CC); } expr { $$ = $4; }
| non_empty_for_expr { $$ = $1; }
;
non_empty_for_expr:
non_empty_for_expr ',' { do_free(&$1 CLS_CC); } expr { $$ = $4; }
| expr { $$ = $1; }
;
expr_without_variable:
T_LIST '(' { do_list_init(CLS_C); } assignment_list ')' '=' expr { do_list_end(&$$, &$7 CLS_CC); }
| w_cvar '=' expr { do_assign(&$$, &$1, &$3 CLS_CC); }
| w_cvar '=' '&' w_cvar { do_assign_ref(&$$, &$1, &$4 CLS_CC); }
| w_cvar '=' T_NEW class_name { do_extended_fcall_begin(CLS_C); do_begin_new_object(&$2, &$1, &$3, &$4 CLS_CC); } ctor_arguments { do_end_new_object(&$4, &$3, &$6 CLS_CC); do_extended_fcall_end(CLS_C); $$ = $2;}
| rw_cvar T_PLUS_EQUAL expr { do_binary_assign_op(ZEND_ASSIGN_ADD, &$$, &$1, &$3 CLS_CC); }
| rw_cvar T_MINUS_EQUAL expr { do_binary_assign_op(ZEND_ASSIGN_SUB, &$$, &$1, &$3 CLS_CC); }
| rw_cvar T_MUL_EQUAL expr { do_binary_assign_op(ZEND_ASSIGN_MUL, &$$, &$1, &$3 CLS_CC); }
| rw_cvar T_DIV_EQUAL expr { do_binary_assign_op(ZEND_ASSIGN_DIV, &$$, &$1, &$3 CLS_CC); }
| rw_cvar T_CONCAT_EQUAL expr { do_binary_assign_op(ZEND_ASSIGN_CONCAT, &$$, &$1, &$3 CLS_CC); }
| rw_cvar T_MOD_EQUAL expr { do_binary_assign_op(ZEND_ASSIGN_MOD, &$$, &$1, &$3 CLS_CC); }
| rw_cvar T_AND_EQUAL expr { do_binary_assign_op(ZEND_ASSIGN_BW_AND, &$$, &$1, &$3 CLS_CC); }
| rw_cvar T_OR_EQUAL expr { do_binary_assign_op(ZEND_ASSIGN_BW_OR, &$$, &$1, &$3 CLS_CC); }
| rw_cvar XT_OR_EQUAL expr { do_binary_assign_op(ZEND_ASSIGN_BW_XOR, &$$, &$1, &$3 CLS_CC); }
| rw_cvar T_SL_EQUAL expr { do_binary_assign_op(ZEND_ASSIGN_SL, &$$, &$1, &$3 CLS_CC); }
| rw_cvar T_SR_EQUAL expr { do_binary_assign_op(ZEND_ASSIGN_SR, &$$, &$1, &$3 CLS_CC); }
| cvar '=' expr { do_end_variable_parse(BP_VAR_W, 0 CLS_CC); do_assign(&$$, &$1, &$3 CLS_CC); }
| cvar '=' '&' w_cvar { do_end_variable_parse(BP_VAR_W, 0 CLS_CC); do_assign_ref(&$$, &$1, &$4 CLS_CC); }
| cvar '=' '&' function_call { do_end_variable_parse(BP_VAR_W, 0 CLS_CC); do_assign_ref(&$$, &$1, &$4 CLS_CC); }
| T_NEW class_name { do_extended_fcall_begin(CLS_C); do_begin_new_object(&$1, &$2 CLS_CC); } ctor_arguments { do_end_new_object(&$$, &$2, &$1, &$4 CLS_CC); do_extended_fcall_end(CLS_C);}
| cvar T_PLUS_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_ADD, &$$, &$1, &$3 CLS_CC); }
| cvar T_MINUS_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_SUB, &$$, &$1, &$3 CLS_CC); }
| cvar T_MUL_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_MUL, &$$, &$1, &$3 CLS_CC); }
| cvar T_DIV_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_DIV, &$$, &$1, &$3 CLS_CC); }
| cvar T_CONCAT_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_CONCAT, &$$, &$1, &$3 CLS_CC); }
| cvar T_MOD_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_MOD, &$$, &$1, &$3 CLS_CC); }
| cvar T_AND_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_BW_AND, &$$, &$1, &$3 CLS_CC); }
| cvar T_OR_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_BW_OR, &$$, &$1, &$3 CLS_CC); }
| cvar T_XOR_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_BW_XOR, &$$, &$1, &$3 CLS_CC); }
| cvar T_SL_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_SL, &$$, &$1, &$3 CLS_CC); }
| cvar T_SR_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_SR, &$$, &$1, &$3 CLS_CC); }
| rw_cvar T_INC { do_post_incdec(&$$, &$1, ZEND_POST_INC CLS_CC); }
| T_INC rw_cvar { do_pre_incdec(&$$, &$2, ZEND_PRE_INC CLS_CC); }
| rw_cvar T_DEC { do_post_incdec(&$$, &$1, ZEND_POST_DEC CLS_CC); }
@@ -403,6 +460,8 @@ expr_without_variable:
| '-' expr { $1.u.constant.value.lval=0; $1.u.constant.type=IS_LONG; $1.op_type = IS_CONST; INIT_PZVAL(&$1.u.constant); do_binary_op(ZEND_SUB, &$$, &$1, &$2 CLS_CC); }
| '!' expr { do_unary_op(ZEND_BOOL_NOT, &$$, &$2 CLS_CC); }
| '~' expr { do_unary_op(ZEND_BW_NOT, &$$, &$2 CLS_CC); }
| expr T_IS_IDENTICAL expr { do_binary_op(ZEND_IS_IDENTICAL, &$$, &$1, &$3 CLS_CC); }
| expr T_IS_NOT_IDENTICAL expr { do_binary_op(ZEND_IS_NOT_IDENTICAL, &$$, &$1, &$3 CLS_CC); }
| expr T_IS_EQUAL expr { do_binary_op(ZEND_IS_EQUAL, &$$, &$1, &$3 CLS_CC); }
| expr T_IS_NOT_EQUAL expr { do_binary_op(ZEND_IS_NOT_EQUAL, &$$, &$1, &$3 CLS_CC); }
| expr '<' expr { do_binary_op(ZEND_IS_SMALLER, &$$, &$1, &$3 CLS_CC); }
@@ -413,15 +472,7 @@ expr_without_variable:
| expr '?' { do_begin_qm_op(&$1, &$2 CLS_CC); }
expr ':' { do_qm_true(&$4, &$2, &$5 CLS_CC); }
expr { do_qm_false(&$$, &$7, &$2, &$5 CLS_CC); }
| T_STRING '(' { do_extended_fcall_begin(CLS_C); do_begin_function_call(&$1 CLS_CC); }
function_call_parameter_list
')' { do_end_function_call(&$1, &$$, &$4, 0 CLS_CC); do_extended_fcall_end(CLS_C); }
| r_cvar '(' { do_extended_fcall_begin(CLS_C); do_begin_dynamic_function_call(&$1 CLS_CC); }
function_call_parameter_list
')' { do_end_function_call(&$1, &$$, &$4, 0 CLS_CC); do_extended_fcall_end(CLS_C);}
| T_STRING T_PAAMAYIM_NEKUDOTAYIM T_STRING '(' { do_extended_fcall_begin(CLS_C); do_begin_class_member_function_call(&$1, &$3 CLS_CC); }
function_call_parameter_list
')' { do_end_function_call(&$3, &$$, &$6, 1 CLS_CC); do_extended_fcall_end(CLS_C);}
| function_call { $$ = $1; }
| internal_functions_in_yacc { $$ = $1; }
| T_INT_CAST expr { do_cast(&$$, &$2, IS_LONG CLS_CC); }
| T_DOUBLE_CAST expr { do_cast(&$$, &$2, IS_DOUBLE CLS_CC); }
@@ -429,6 +480,7 @@ expr_without_variable:
| T_ARRAY_CAST expr { do_cast(&$$, &$2, IS_ARRAY CLS_CC); }
| T_OBJECT_CAST expr { do_cast(&$$, &$2, IS_OBJECT CLS_CC); }
| T_BOOL_CAST expr { do_cast(&$$, &$2, IS_BOOL CLS_CC); }
| T_UNSET_CAST expr { do_cast(&$$, &$2, IS_NULL CLS_CC); }
| T_EXIT exit_expr { do_exit(&$$, &$2 CLS_CC); }
| '@' { do_begin_silence(&$1 CLS_CC); } expr { do_end_silence(&$1 CLS_CC); $$ = $3; }
| scalar { $$ = $1; }
@@ -438,9 +490,22 @@ expr_without_variable:
;
function_call:
T_STRING '(' { do_extended_fcall_begin(CLS_C); $2.u.opline_num = do_begin_function_call(&$1 CLS_CC); }
function_call_parameter_list
')' { do_end_function_call(&$1, &$$, &$4, 0, $2.u.opline_num CLS_CC); do_extended_fcall_end(CLS_C); }
| r_cvar '(' { do_extended_fcall_begin(CLS_C); do_begin_dynamic_function_call(&$1 CLS_CC); }
function_call_parameter_list
')' { do_end_function_call(&$1, &$$, &$4, 0, 1 CLS_CC); do_extended_fcall_end(CLS_C);}
| T_STRING T_PAAMAYIM_NEKUDOTAYIM T_STRING '(' { do_extended_fcall_begin(CLS_C); do_begin_class_member_function_call(&$1, &$3 CLS_CC); }
function_call_parameter_list
')' { do_end_function_call(&$3, &$$, &$6, 1, 1 CLS_CC); do_extended_fcall_end(CLS_C);}
;
exit_expr:
/* empty */ { $$.op_type = IS_UNUSED; }
| '(' ')' { $$.op_type = IS_UNUSED; }
/* empty */ { memset(&$$, 0, sizeof(znode)); $$.op_type = IS_UNUSED; }
| '(' ')' { memset(&$$, 0, sizeof(znode)); $$.op_type = IS_UNUSED; }
| '(' expr ')' { $$ = $2; }
;
@@ -472,7 +537,7 @@ static_scalar: /* compile-time evaluated scalars */
| T_STRING { do_fetch_constant(&$$, &$1, ZEND_CT CLS_CC); }
| '+' static_scalar { $$ = $1; }
| '-' static_scalar { zval minus_one; minus_one.type = IS_LONG; minus_one.value.lval = -1; mul_function(&$2.u.constant, &$2.u.constant, &minus_one); $$ = $2; }
| T_ARRAY '(' static_array_pair_list ')' { $$ = $3; }
| T_ARRAY '(' static_array_pair_list ')' { $$ = $3; $$.u.constant.type = IS_CONSTANT_ARRAY; }
;
@@ -482,15 +547,19 @@ scalar:
| common_scalar { $$ = $1; }
| '"' encaps_list '"' { $$ = $2; }
| '\'' encaps_list '\'' { $$ = $2; }
| T_HEREDOC encaps_list T_HEREDOC { $$ = $2; do_end_heredoc(CLS_C); }
| T_START_HEREDOC encaps_list T_END_HEREDOC { $$ = $2; do_end_heredoc(CLS_C); }
;
static_array_pair_list:
/* empty */ { $$.op_type = IS_CONST; INIT_PZVAL(&$$.u.constant); array_init(&$$.u.constant); }
| non_empty_static_array_pair_list { $$ = $1; }
| non_empty_static_array_pair_list possible_comma { $$ = $1; }
;
possible_comma:
/* empty */
| ','
;
non_empty_static_array_pair_list:
non_empty_static_array_pair_list ',' static_scalar T_DOUBLE_ARROW static_scalar { do_add_static_array_element(&$$, &$3, &$5); }
@@ -504,20 +573,26 @@ expr:
| expr_without_variable { $$ = $1; }
;
/*
w_expr:
w_cvar { $$ = $1; }
| expr_without_variable { $$ = $1; }
;
*/
r_cvar:
cvar { do_end_variable_parse(BP_VAR_R CLS_CC); $$ = $1; }
cvar { do_end_variable_parse(BP_VAR_R, 0 CLS_CC); $$ = $1; }
;
w_cvar:
cvar { do_end_variable_parse(BP_VAR_W CLS_CC); $$ = $1; }
cvar { do_end_variable_parse(BP_VAR_W, 0 CLS_CC); $$ = $1; }
;
rw_cvar:
cvar { do_end_variable_parse(BP_VAR_RW CLS_CC); $$ = $1; }
cvar { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); $$ = $1; }
;
@@ -534,8 +609,9 @@ cvar_without_objects:
reference_variable:
dim_list ']' { $$ = $1; }
| compound_variable { do_fetch_globals(&$1 CLS_CC); do_begin_variable_parse(CLS_C); fetch_simple_variable(&$$, &$1, 1 CLS_CC); }
reference_variable '[' dim_offset ']' { fetch_array_dim(&$$, &$1, &$3 CLS_CC); }
| reference_variable '{' expr '}' { fetch_string_offset(&$$, &$1, &$3 CLS_CC); }
| compound_variable { do_fetch_globals(&$1 CLS_CC); do_begin_variable_parse(CLS_C); fetch_simple_variable(&$$, &$1, 1 CLS_CC); }
;
@@ -544,39 +620,30 @@ compound_variable:
| '$' '{' expr '}' { $$ = $3; }
;
dim_list:
dim_list ']' '[' dim_offset { fetch_array_dim(&$$, &$1, &$4 CLS_CC); }
| compound_variable { do_fetch_globals(&$1 CLS_CC); do_begin_variable_parse(CLS_C); } '[' dim_offset { fetch_array_begin(&$$, &$1, &$4 CLS_CC); }
;
dim_offset:
/* empty */ { $$.op_type = IS_UNUSED; }
| expr { $$ = $1; }
;
ref_list:
object_property { $$ = $1; }
| ref_list T_OBJECT_OPERATOR { do_push_object(&$1 CLS_CC); } object_property { $$ = $4; }
;
object_property:
scalar_object_property { znode tmp_znode; do_pop_object(&tmp_znode CLS_CC); do_fetch_property(&$$, &tmp_znode, &$1 CLS_CC); }
| object_dim_list ']' { $$ = $1; }
object_dim_list { $$ = $1; }
| cvar_without_objects { do_end_variable_parse(BP_VAR_R, 0 CLS_CC); } { znode tmp_znode; do_pop_object(&tmp_znode CLS_CC); do_fetch_property(&$$, &tmp_znode, &$1 CLS_CC);}
;
scalar_object_property:
T_STRING { $$ = $1; }
| '{' expr '}' { $$ = $2; }
| cvar_without_objects { do_end_variable_parse(BP_VAR_R CLS_CC); $$ = $1; }
;
object_dim_list:
object_dim_list ']' '[' dim_offset { fetch_array_dim(&$$, &$1, &$4 CLS_CC); }
| T_STRING { znode tmp_znode, res; do_pop_object(&tmp_znode CLS_CC); do_fetch_property(&res, &tmp_znode, &$1 CLS_CC); $1 = res; } '[' dim_offset { fetch_array_dim(&$$, &$1, &$4 CLS_CC); }
object_dim_list '[' dim_offset ']' { fetch_array_dim(&$$, &$1, &$3 CLS_CC); }
| object_dim_list '{' expr '}' { fetch_string_offset(&$$, &$1, &$3 CLS_CC); }
| variable_name { znode tmp_znode; do_pop_object(&tmp_znode CLS_CC); do_fetch_property(&$$, &tmp_znode, &$1 CLS_CC);}
;
variable_name:
T_STRING { $$ = $1; }
| '{' expr '}' { $$ = $2; }
;
@@ -592,37 +659,40 @@ assignment_list:
assignment_list_element:
w_cvar { do_add_list_element(&$1 CLS_CC); }
cvar { do_add_list_element(&$1 CLS_CC); }
| T_LIST '(' { do_new_list_begin(CLS_C); } assignment_list ')' { do_new_list_end(CLS_C); }
| /* empty */ { do_add_list_element(NULL CLS_CC); }
;
array_pair_list:
/* empty */ { do_init_array(&$$, NULL, NULL CLS_CC); }
| non_empty_array_pair_list { $$ = $1; }
/* empty */ { do_init_array(&$$, NULL, NULL, 0 CLS_CC); }
| non_empty_array_pair_list possible_comma { $$ = $1; }
;
non_empty_array_pair_list:
non_empty_array_pair_list ',' expr T_DOUBLE_ARROW expr { do_add_array_element(&$$, &$5, &$3 CLS_CC); }
| non_empty_array_pair_list ',' expr { do_add_array_element(&$$, &$3, NULL CLS_CC); }
| expr T_DOUBLE_ARROW expr { do_init_array(&$$, &$3, &$1 CLS_CC); }
| expr { do_init_array(&$$, &$1, NULL CLS_CC); }
non_empty_array_pair_list ',' expr T_DOUBLE_ARROW expr { do_add_array_element(&$$, &$5, &$3, 0 CLS_CC); }
| non_empty_array_pair_list ',' expr { do_add_array_element(&$$, &$3, NULL, 0 CLS_CC); }
| expr T_DOUBLE_ARROW expr { do_init_array(&$$, &$3, &$1, 0 CLS_CC); }
| expr { do_init_array(&$$, &$1, NULL, 0 CLS_CC); }
| non_empty_array_pair_list ',' expr T_DOUBLE_ARROW '&' w_cvar { do_add_array_element(&$$, &$6, &$3, 1 CLS_CC); }
| non_empty_array_pair_list ',' '&' w_cvar { do_add_array_element(&$$, &$4, NULL, 1 CLS_CC); }
| expr T_DOUBLE_ARROW '&' w_cvar { do_init_array(&$$, &$4, &$1, 1 CLS_CC); }
| '&' w_cvar { do_init_array(&$$, &$2, NULL, 1 CLS_CC); }
;
encaps_list:
encaps_list encaps_var { do_end_variable_parse(BP_VAR_R CLS_CC); do_add_variable(&$$, &$1, &$2 CLS_CC); }
encaps_list encaps_var { do_end_variable_parse(BP_VAR_R, 0 CLS_CC); do_add_variable(&$$, &$1, &$2 CLS_CC); }
| encaps_list T_STRING { do_add_string(&$$, &$1, &$2 CLS_CC); }
| encaps_list T_NUM_STRING { do_add_string(&$$, &$1, &$2 CLS_CC); }
| encaps_list T_ENCAPSED_AND_WHITESPACE { do_add_string(&$$, &$1, &$2 CLS_CC); }
| encaps_list T_CHARACTER { do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list T_BAD_CHARACTER { do_add_string(&$$, &$1, &$2 CLS_CC); }
| encaps_list '[' { $2.u.constant.value.chval = '['; do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list ']' { $2.u.constant.value.chval = ']'; do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list '{' { $2.u.constant.value.chval = '{'; do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list '}' { $2.u.constant.value.chval = '}'; do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list T_OBJECT_OPERATOR { znode tmp; $2.u.constant.value.chval = '-'; do_add_char(&tmp, &$1, &$2 CLS_CC); $2.u.constant.value.chval = '>'; do_add_char(&$$, &tmp, &$2 CLS_CC); }
| encaps_list '[' { $2.u.constant.value.lval = (long) '['; do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list ']' { $2.u.constant.value.lval = (long) ']'; do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list '{' { $2.u.constant.value.lval = (long) '{'; do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list '}' { $2.u.constant.value.lval = (long) '}'; do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list T_OBJECT_OPERATOR { znode tmp; $2.u.constant.value.lval = (long) '-'; do_add_char(&tmp, &$1, &$2 CLS_CC); $2.u.constant.value.lval = (long) '>'; do_add_char(&$$, &tmp, &$2 CLS_CC); }
| /* empty */ { do_init_string(&$$ CLS_CC); }
;
@@ -650,6 +720,7 @@ internal_functions_in_yacc:
T_ISSET '(' cvar ')' { do_isset_or_isempty(ZEND_ISSET, &$$, &$3 CLS_CC); }
| T_EMPTY '(' cvar ')' { do_isset_or_isempty(ZEND_ISEMPTY, &$$, &$3 CLS_CC); }
| T_INCLUDE expr { do_include_or_eval(ZEND_INCLUDE, &$$, &$2 CLS_CC); }
| T_INCLUDE_ONCE expr { do_include_or_eval(ZEND_INCLUDE_ONCE, &$$, &$2 CLS_CC); }
| T_EVAL '(' expr ')' { do_include_or_eval(ZEND_EVAL, &$$, &$3 CLS_CC); }
;
+14 -10
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -33,20 +33,24 @@ public:
#endif /* ZTS */
#ifndef ZTS
typedef struct _zend_lex_state {
#ifndef ZTS
YY_BUFFER_STATE buffer_state;
int state;
uint return_offset;
uint lineno;
FILE *in;
char *filename;
} zend_lex_state;
#else
typedef struct _zend_lex_state {
ZendFlexLexer *ZFL;
istream *input_file;
} zend_lex_state;
#endif
uint lineno;
char *filename;
} zend_lex_state;
void zend_fatal_scanner_error(char *);
inline void restore_lexical_state(zend_lex_state * CLS_DC);
BEGIN_EXTERN_C()
int zend_compare_file_handles(zend_file_handle *fh1, zend_file_handle *fh2);
END_EXTERN_C()
#endif
+304 -98
View File
@@ -4,12 +4,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -33,24 +33,14 @@
%{
#if WIN32|WINNT
#include <winsock.h>
#ifdef ZEND_WIN32
#include <io.h>
#endif
#include <errno.h>
#ifdef ZTS
#include <fstream.h>
# if WIN32||WINNT
# include <strstrea.h>
# else
# include <strstream.h>
# endif
#endif
#include "zend.h"
#include "zend_alloc.h"
#include "zend-parser.h"
#include "zend_compile.h"
#include "zend-scanner.h"
#include "zend_highlight.h"
@@ -58,12 +48,27 @@
#include "zend_variables.h"
#include "zend_operators.h"
#if HAVE_STDARG_H
#include <stdarg.h>
#ifdef ZTS
# include <fstream.h>
# ifdef HAVE_STDIOSTR_H
# include <stdiostr.h>
# endif
# ifdef HAVE_STDIOSTREAM_H
# include <stdiostream.h>
# endif
# ifdef ZEND_WIN32
# include <strstrea.h>
# else
# include <strstream.h>
# endif
#endif
#if HAVE_UNISTD_H
#include <unistd.h>
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifdef ZTS
@@ -79,6 +84,17 @@
# define MY_INPUT input
#endif
#if defined(ZTS) && !defined(HAVE_CLASS_ISTDIOSTREAM)
class istdiostream : public istream
{
private:
stdiobuf _file;
public:
istdiostream (FILE* __f) : istream(), _file(__f) { init(&_file); }
stdiobuf* rdbuf()/* const */ { return &_file; }
};
#endif
#define YY_FATAL_ERROR zend_fatal_scanner_error
#define HANDLE_NEWLINES(s,l) \
@@ -132,12 +148,12 @@ static inline void save_lexical_state(zend_lex_state *lex_state CLS_DC)
#ifndef ZTS
memcpy(&lex_state->buffer_state,&YY_CURRENT_BUFFER,sizeof(YY_BUFFER_STATE));
lex_state->in = yyin;
lex_state->lineno = CG(zend_lineno);
lex_state->state = YYSTATE;
lex_state->filename = zend_get_compiled_filename();
#else
lex_state->ZFL = CG(ZFL);
#endif
lex_state->filename = zend_get_compiled_filename(CLS_C);
lex_state->lineno = CG(zend_lineno);
}
@@ -154,60 +170,100 @@ inline void restore_lexical_state(zend_lex_state *lex_state CLS_DC)
yy_delete_buffer(original_buffer_state);
yyin = lex_state->in;
CG(zend_lineno) = lex_state->lineno;
BEGIN(lex_state->state);
zend_restore_compiled_filename(lex_state->filename);
#else
delete((ZendFlexLexer *) CG(ZFL));
CG(ZFL) = lex_state->ZFL;
#endif
CG(zend_lineno) = lex_state->lineno;
zend_restore_compiled_filename(lex_state->filename);
}
BEGIN_EXTERN_C()
ZEND_API void zend_open_file_dtor(void *f)
ZEND_API void zend_open_file_dtor(zend_file_handle *fh)
{
switch (fh->type) {
case ZEND_HANDLE_FP:
fclose(fh->handle.fp);
break;
case ZEND_HANDLE_FILENAME:
/* We're only supposed to get here when destructing the used_files hash,
* which doesn't really contain open files, but references to their names/paths
*/
break;
#ifdef ZTS
delete *((ifstream **) f);
#else
fclose(*((FILE **) f));
case ZEND_HANDLE_FSTREAM:
delete ((ifstream *) fh->handle.is);
break;
case ZEND_HANDLE_STDIOSTREAM:
istdiostream *pstdiostream = (istdiostream *) fh->handle.is;
fclose(pstdiostream->rdbuf()->stdiofile());
delete pstdiostream;
break;
#endif
}
if (fh->opened_path) {
free(fh->opened_path);
}
if (fh->free_filename && fh->filename) {
efree(fh->filename);
}
}
int zend_compare_file_handles(zend_file_handle *fh1, zend_file_handle *fh2)
{
if (fh1->type != fh2->type) {
return 0;
}
switch (fh1->type) {
case ZEND_HANDLE_FP:
return fh1->handle.fp==fh2->handle.fp;
break;
#ifdef ZTS
case ZEND_HANDLE_FSTREAM:
case ZEND_HANDLE_STDIOSTREAM:
return fh1->handle.is==fh2->handle.is;
break;
#endif
}
return 0;
}
ZEND_API void zend_close_file_handle(zend_file_handle *file_handle CLS_DC)
{
#ifdef ZTS
zend_llist_del_element(&CG(open_files), &file_handle->handle.is);
#else
zend_llist_del_element(&CG(open_files), &file_handle->handle.fp);
#endif
zend_llist_del_element(&CG(open_files), file_handle, (int (*)(void *, void *)) zend_compare_file_handles);
}
ZEND_API inline int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
{
#ifndef ZTS
switch (file_handle->type) {
case ZEND_HANDLE_FILENAME:
file_handle->handle.fp = zend_fopen(file_handle->filename);
file_handle->handle.fp = zend_fopen(file_handle->filename, &file_handle->opened_path);
break;
case ZEND_HANDLE_FD:
file_handle->opened_path = NULL;
file_handle->handle.fp = fdopen(file_handle->handle.fd, "r");
break;
case ZEND_HANDLE_FP:
file_handle->opened_path = NULL;
file_handle->handle.fp = file_handle->handle.fp;
break;
}
if (!file_handle->handle.fp) {
return FAILURE;
}
if (file_handle->handle.fp != stdin) {
zend_llist_add_element(&CG(open_files), &file_handle->handle.fp);
}
file_handle->type = ZEND_HANDLE_FP;
if (file_handle->handle.fp != stdin) {
zend_llist_add_element(&CG(open_files), file_handle);
}
/* Reset the scanner for scanning the new file */
yyin = file_handle->handle.fp;
yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE));
@@ -215,17 +271,30 @@ ZEND_API inline int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
#else
switch (file_handle->type) {
case ZEND_HANDLE_FD:
file_handle->opened_path = NULL;
file_handle->handle.is = new ifstream(file_handle->handle.fd);
file_handle->type = ZEND_HANDLE_FSTREAM;
break;
case ZEND_HANDLE_FILENAME:
file_handle->handle.is = new ifstream(file_handle->filename, ios::nocreate|ios::in|ios::binary);
break;
{
file_handle->handle.fp = zend_fopen(file_handle->filename, &file_handle->opened_path);
if (!file_handle->handle.fp) {
return FAILURE;
}
file_handle->handle.is = new istdiostream(file_handle->handle.fp);
file_handle->type = ZEND_HANDLE_STDIOSTREAM;
break;
}
case ZEND_HANDLE_FP:
file_handle->opened_path = NULL;
if (file_handle->handle.fp==stdin) {
file_handle->handle.is = (ifstream *) &cin;
file_handle->handle.is = &cin;
} else {
fclose(file_handle->handle.fp);
file_handle->handle.is = new ifstream(file_handle->filename, ios::nocreate|ios::in|ios::binary);
if (!file_handle->handle.fp) {
return FAILURE;
}
file_handle->handle.is = new istdiostream(file_handle->handle.fp);
file_handle->type = ZEND_HANDLE_STDIOSTREAM;
}
break;
}
@@ -234,9 +303,8 @@ ZEND_API inline int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
return FAILURE;
}
if (file_handle->handle.is != &cin) {
zend_llist_add_element(&CG(open_files), &file_handle->handle.is);
zend_llist_add_element(&CG(open_files), file_handle);
}
file_handle->type = ZEND_HANDLE_ISTREAM;
CG(ZFL) = new ZendFlexLexer;
CG(ZFL)->switch_streams(file_handle->handle.is, &cout);
@@ -248,46 +316,66 @@ ZEND_API inline int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
END_EXTERN_C()
ZEND_API zend_op_array *compile_files(int mark_as_ref CLS_DC, int file_count, ...)
ZEND_API zend_op_array *zend_compile_files(int type CLS_DC, int file_count, ...)
{
va_list files;
zend_op_array *op_array;
va_start(files, file_count);
op_array = v_compile_files(mark_as_ref CLS_CC, file_count, files);
op_array = zend_v_compile_files(type CLS_CC, file_count, files);
va_end(files);
return op_array;
}
ZEND_API zend_op_array *v_compile_files(int mark_as_ref CLS_DC, int file_count, va_list files)
ZEND_API zend_op_array *v_compile_files(int type CLS_DC, int file_count, va_list files)
{
zend_lex_state original_lex_state;
zend_op_array *op_array = (zend_op_array *) emalloc(sizeof(zend_op_array));
zend_op_array *original_active_op_array = CG(active_op_array);
zend_op_array *retval=NULL;
zend_file_handle *file_handle;
int i;
int compiler_result;
int compiled_files=0;
int last_file=0;
znode retval_znode;
zend_bool original_in_compilation = CG(in_compilation);
zend_file_handle **file_handles = (zend_file_handle **) do_alloca(file_count * sizeof(zend_file_handle *));
init_op_array(op_array, INITIAL_OP_ARRAY_SIZE);
retval_znode.op_type = IS_CONST;
retval_znode.u.constant.type = IS_LONG;
retval_znode.u.constant.value.lval = 1;
retval_znode.u.constant.is_ref = 0;
retval_znode.u.constant.refcount = 1;
init_op_array(op_array, ZEND_USER_FUNCTION, INITIAL_OP_ARRAY_SIZE);
save_lexical_state(&original_lex_state CLS_CC);
retval = op_array; /* success oriented */
for (i=0; i<file_count; i++) {
file_handle = va_arg(files, zend_file_handle *);
if (!file_handle) {
file_handles[i] = va_arg(files, zend_file_handle *);
if (file_handles[i]) {
last_file = i;
}
}
for (i=0; i<file_count; i++) {
if (!file_handles[i]) {
continue;
}
if (open_file_for_scanning(file_handle CLS_CC)==FAILURE) {
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, file_handle->filename);
if (open_file_for_scanning(file_handles[i] CLS_CC)==FAILURE) {
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, file_handles[i]->filename);
} else {
CG(in_compilation) = 1;
CG(active_op_array) = op_array;
compiler_result = zendparse(CLS_C);
zend_close_file_handle(file_handle CLS_CC);
zend_close_file_handle(file_handles[i] CLS_CC);
if (i == last_file) {
do_return(&retval_znode, 0 CLS_CC);
}
restore_lexical_state(&original_lex_state CLS_CC);
CG(active_op_array) = original_active_op_array;
CG(in_compilation) = original_in_compilation;
if (compiler_result==1) { /* parser error */
CG(unclean_shutdown) = 1;
retval = NULL;
@@ -299,25 +387,26 @@ ZEND_API zend_op_array *v_compile_files(int mark_as_ref CLS_DC, int file_count,
if (retval) {
if (compiled_files>0) {
CG(active_op_array) = original_active_op_array;
pass_two(op_array);
if (mark_as_ref) {
pass_include_eval(op_array);
}
} else {
CG(active_op_array) = original_active_op_array;
destroy_op_array(op_array);
efree(op_array);
retval = NULL;
}
}
free_alloca(file_handles);
return retval;
}
zend_op_array *compile_filename(zval *filename CLS_DC)
zend_op_array *compile_filename(int type, zval *filename CLS_DC ELS_DC)
{
zend_file_handle file_handle;
zval tmp;
zend_op_array *retval;
int error_reporting=0;
if (filename->type != IS_STRING) {
tmp = *filename;
@@ -326,8 +415,28 @@ zend_op_array *compile_filename(zval *filename CLS_DC)
filename = &tmp;
}
file_handle.filename = filename->value.str.val;
file_handle.free_filename = 0;
file_handle.type = ZEND_HANDLE_FILENAME;
retval = zend_compile_files(1 CLS_CC, 1, &file_handle);
file_handle.opened_path = NULL;
if (type==ZEND_REQUIRE) {
/* We don't want to hear about inclusion failures; If we fail,
* we'll generate a require failure
*/
error_reporting = EG(error_reporting);
EG(error_reporting) = 0;
}
retval = zend_compile_files(type CLS_CC, 1, &file_handle);
if (type==ZEND_REQUIRE) {
EG(error_reporting) = error_reporting;
if (!retval) {
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, filename->value.str.val);
zend_bailout();
}
}
if (filename==&tmp) {
zval_dtor(&tmp);
}
@@ -339,7 +448,7 @@ static inline int prepare_string_for_scanning(zval *str CLS_DC)
{
#ifndef ZTS
/* enforce two trailing NULLs for flex... */
str->value.str.val = (char *) erealloc(str->value.str.val,str->value.str.len+2);
STR_REALLOC(str->value.str.val, str->value.str.len+2);
str->value.str.val[str->value.str.len+1]=0;
@@ -351,6 +460,8 @@ static inline int prepare_string_for_scanning(zval *str CLS_DC)
CG(ZFL)->switch_streams(input_stream, &cout);
#endif
zend_set_compiled_filename("Eval code");
CG(zend_lineno) = 1;
return SUCCESS;
}
@@ -363,18 +474,21 @@ zend_op_array *compile_string(zval *source_string CLS_DC)
zend_op_array *retval;
zval tmp;
int compiler_result;
zend_bool original_in_compilation = CG(in_compilation);
if (source_string->value.str.len==0) {
efree(op_array);
return NULL;
}
CG(in_compilation) = 1;
tmp = *source_string;
zval_copy_ctor(&tmp);
convert_to_string(&tmp);
source_string = &tmp;
init_op_array(op_array, INITIAL_OP_ARRAY_SIZE);
op_array->type = ZEND_EVAL_CODE;
init_op_array(op_array, ZEND_EVAL_CODE, INITIAL_OP_ARRAY_SIZE);
save_lexical_state(&original_lex_state CLS_CC);
if (prepare_string_for_scanning(source_string CLS_CC)==FAILURE) {
destroy_op_array(op_array);
@@ -389,30 +503,34 @@ zend_op_array *compile_string(zval *source_string CLS_DC)
#endif
compiler_result = zendparse(CLS_C);
restore_lexical_state(&original_lex_state CLS_CC);
CG(active_op_array) = original_active_op_array;
if (compiler_result==1) {
CG(active_op_array) = original_active_op_array;
CG(unclean_shutdown)=1;
retval = NULL;
} else {
do_return(NULL, 0 CLS_CC);
CG(active_op_array) = original_active_op_array;
pass_two(op_array);
pass_include_eval(op_array);
retval = op_array;
}
}
zval_dtor(&tmp);
CG(in_compilation) = original_in_compilation;
return retval;
}
BEGIN_EXTERN_C()
int require_filename(char *filename CLS_DC)
int require_filename(char *filename, zend_bool unique CLS_DC)
{
zend_file_handle file_handle;
file_handle.type = ZEND_HANDLE_FILENAME;
file_handle.filename = filename;
if (require_file(&file_handle CLS_CC)==FAILURE) {
file_handle.free_filename = 0;
if (require_file(&file_handle, unique CLS_CC)==FAILURE) {
zend_bailout();
return FAILURE; /* will never get here */
}
@@ -420,7 +538,32 @@ int require_filename(char *filename CLS_DC)
}
int require_file(zend_file_handle *file_handle CLS_DC)
int use_filename(char *filename, uint filename_length CLS_DC)
{
zend_error(E_COMPILE_ERROR,"use: Not yet supported. Please use include_once() or require_once()");
return FAILURE;
#if 0
zend_file_handle file_handle;
file_handle.filename = (char *) emalloc(filename_length + zend_uv.import_use_extension_length);
memcpy(file_handle.filename, filename, filename_length);
memcpy(file_handle.filename+filename_length, zend_uv.import_use_extension, zend_uv.import_use_extension_length);
file_handle.filename[filename_length+zend_uv.import_use_extension_length] = 0;
file_handle.free_filename = 1;
file_handle.type = ZEND_HANDLE_FILENAME;
if (require_file(&file_handle, 1 CLS_CC)==FAILURE) {
efree(file_handle.filename);
zend_bailout();
return FAILURE; /* will never get here */
}
return SUCCESS;
#endif
}
int require_file(zend_file_handle *file_handle, zend_bool unique CLS_DC)
{
zend_lex_state original_lex_state;
int compiler_result;
@@ -430,6 +573,27 @@ int require_file(zend_file_handle *file_handle CLS_DC)
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, file_handle->filename);
return FAILURE;
}
if (file_handle->opened_path) {
if (unique) {
zend_file_handle *pfh;
if (zend_hash_add(&CG(used_files), file_handle->opened_path, strlen(file_handle->opened_path)+1, file_handle, sizeof(zend_file_handle), (void **) &pfh)==FAILURE) {
zend_close_file_handle(file_handle CLS_CC);
restore_lexical_state(&original_lex_state CLS_CC);
return SUCCESS;
} else {
/* pfh is a copy we only save for get_used_files() */
pfh->type = ZEND_HANDLE_FILENAME;
if (pfh->filename) {
pfh->filename = estrdup(pfh->filename);
pfh->free_filename = 1;
}
if (pfh->opened_path) {
pfh->opened_path = strdup(pfh->opened_path);
}
}
}
}
compiler_result = zendparse(CLS_C);
zend_close_file_handle(file_handle CLS_CC);
restore_lexical_state(&original_lex_state CLS_CC);
@@ -448,6 +612,8 @@ int highlight_file(char *filename, zend_syntax_highlighter_ini *syntax_highlight
file_handle.type = ZEND_HANDLE_FILENAME;
file_handle.filename = filename;
file_handle.free_filename = 0;
file_handle.opened_path = NULL;
save_lexical_state(&original_lex_state CLS_CC);
if (open_file_for_scanning(&file_handle CLS_CC)==FAILURE) {
zend_message_dispatcher(ZMSG_FAILED_HIGHLIGHT_FOPEN, filename);
@@ -524,7 +690,7 @@ int yyFlexLexer::yylex()
/* redefine YY_INPUT to handle urls for win32*/
#if 0 /*WIN32|WINNT*/
#if 0 /*defined(ZEND_WIN32)*/
#define YY_INPUT(buf,result,max_size) \
if ( yyin->_tmpfname != "url" ){ \
if ( yy_current_buffer->yy_is_interactive ) \
@@ -648,6 +814,14 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
return T_ENDFOREACH;
}
<ST_IN_SCRIPTING>"declare" {
return T_DECLARE;
}
<ST_IN_SCRIPTING>"enddeclare" {
return T_ENDDECLARE;
}
<ST_IN_SCRIPTING>"as" {
return T_AS;
}
@@ -747,6 +921,10 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
return T_BOOL_CAST;
}
<ST_IN_SCRIPTING>"("{TABS_AND_SPACES}("unset"){TABS_AND_SPACES}")" {
return T_UNSET_CAST;
}
<ST_IN_SCRIPTING>"eval" {
return T_EVAL;
}
@@ -755,10 +933,22 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
return T_INCLUDE;
}
<ST_IN_SCRIPTING>"include_once" {
return T_INCLUDE_ONCE;
}
<ST_IN_SCRIPTING>"require" {
return T_REQUIRE;
}
<ST_IN_SCRIPTING>"require_once" {
return T_REQUIRE_ONCE;
}
<ST_IN_SCRIPTING>"use" {
return T_USE;
}
<ST_IN_SCRIPTING>"global" {
return T_GLOBAL;
}
@@ -799,6 +989,14 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
return T_DEC;
}
<ST_IN_SCRIPTING>"===" {
return T_IS_IDENTICAL;
}
<ST_IN_SCRIPTING>"!==" {
return T_IS_NOT_IDENTICAL;
}
<ST_IN_SCRIPTING>"==" {
return T_IS_EQUAL;
}
@@ -857,7 +1055,7 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
}
<ST_IN_SCRIPTING>"^=" {
return XT_OR_EQUAL;
return T_XOR_EQUAL;
}
<ST_IN_SCRIPTING>"||" {
@@ -965,7 +1163,7 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
}
<ST_IN_SCRIPTING>"__FILE__" {
char *filename = zend_get_compiled_filename();
char *filename = zend_get_compiled_filename(CLS_C);
if (!filename) {
filename = "";
@@ -1025,6 +1223,7 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
zendlval->value.str.len = yyleng;
zendlval->type = IS_STRING;
BEGIN(ST_IN_SCRIPTING);
return T_OPEN_TAG;
} else {
zendlval->value.str.val = (char *) estrndup(yytext, yyleng);
zendlval->value.str.len = yyleng;
@@ -1045,9 +1244,12 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
<INITIAL>"<?php_track_vars?>"([\n]|"\r\n")? {
zend_message_dispatcher(ZMSG_ENABLE_TRACK_VARS, NULL);
zend_error(E_WARNING, "<?php_track_vars?> is no longer supported - please use the track_vars INI directive instead");
HANDLE_NEWLINE(yytext[yyleng-1]);
return T_PHP_TRACK_VARS;
zendlval->value.str.val = (char *) estrndup(yytext, yyleng);
zendlval->value.str.len = yyleng;
zendlval->type = IS_STRING;
return T_INLINE_HTML;
}
<ST_IN_SCRIPTING,ST_DOUBLE_QUOTES,ST_HEREDOC,ST_BACKQUOTE>"$"{LABEL} {
@@ -1089,6 +1291,7 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
}
<ST_IN_SCRIPTING>"/*" {
CG(comment_start_line) = CG(zend_lineno);
BEGIN(ST_COMMENT);
yymore();
}
@@ -1119,14 +1322,15 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
<ST_IN_SCRIPTING>"%>"([\n]|"\r\n")? {
zendlval->value.str.val = yytext; /* no copying - intentional */
zendlval->value.str.len = yyleng;
zendlval->type = IS_STRING;
HANDLE_NEWLINES(yytext,yyleng);
if (CG(asp_tags)) {
BEGIN(INITIAL);
zendlval->value.str.val = yytext; /* no copying - intentional */
return T_CLOSE_TAG; /* implicit ';' at php-end tag */
} else {
zendlval->value.str.val = (char *) estrndup(yytext, yyleng);
return T_INLINE_HTML;
}
}
@@ -1271,7 +1475,7 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
}
CG(heredoc) = estrndup(s, CG(heredoc_len));
BEGIN(ST_HEREDOC);
return T_HEREDOC;
return T_START_HEREDOC;
}
@@ -1306,6 +1510,8 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
}
if (label_len==CG(heredoc_len) && !memcmp(yytext, CG(heredoc), label_len)) {
zendlval->value.str.val = estrndup(yytext, yyleng); /* unput destroys yytext */
zendlval->value.str.len = yyleng;
if (unput_semicolon) {
unput(';');
}
@@ -1313,7 +1519,7 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
CG(heredoc)=NULL;
CG(heredoc_len)=0;
BEGIN(ST_IN_SCRIPTING);
return T_HEREDOC;
return T_END_HEREDOC;
} else {
zendlval->value.str.val = (char *)estrndup(yytext, yyleng);
zendlval->value.str.len = yyleng;
@@ -1357,7 +1563,7 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
<ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC>"$"[^a-zA-Z_\x7f-\xff{] {
zendlval->value.chval = yytext[0];
zendlval->value.lval = (long) yytext[0];
if (yyleng == 2) {
yyless(1);
/*unput(yytext[1]);
@@ -1369,12 +1575,12 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
<ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC>{ENCAPSED_TOKENS} {
zendlval->value.chval = yytext[0];
zendlval->value.lval = (long) yytext[0];
return yytext[0];
}
<ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC>"{$" {
zendlval->value.chval = yytext[0];
zendlval->value.lval = (long) yytext[0];
yy_push_state(ST_IN_SCRIPTING);
/*unput('$');*/
yyless(1);
@@ -1383,54 +1589,54 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
<ST_SINGLE_QUOTE>"\\'" {
zendlval->value.chval='\'';
zendlval->value.lval = (long) '\'';
return T_CHARACTER;
}
<ST_SINGLE_QUOTE>"\\\\" {
zendlval->value.chval='\\';
zendlval->value.lval = (long)'\\';
return T_CHARACTER;
}
<ST_DOUBLE_QUOTES>"\\\"" {
zendlval->value.chval='"';
zendlval->value.lval = (long) '"';
return T_CHARACTER;
}
<ST_BACKQUOTE>"\\`" {
zendlval->value.chval='`';
zendlval->value.lval = (long) '`';
return T_CHARACTER;
}
<ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC>"\\"[0-7]{1,3} {
zendlval->value.chval = (char) strtol (yytext+1, NULL, 8);
zendlval->value.lval = strtol(yytext+1, NULL, 8);
return T_CHARACTER;
}
<ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC>"\\x"[0-9A-Fa-f]{1,2} {
zendlval->value.chval = (char) strtol (yytext+2, NULL, 16);
zendlval->value.lval = strtol (yytext+2, NULL, 16);
return T_CHARACTER;
}
<ST_DOUBLE_QUOTES,ST_BACKQUOTE>"\\". {
<ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC>"\\". {
switch (yytext[1]) {
case 'n':
zendlval->value.chval='\n';
zendlval->value.lval = (long) '\n';
break;
case 't':
zendlval->value.chval='\t';
zendlval->value.lval = (long) '\t';
break;
case 'r':
zendlval->value.chval='\r';
zendlval->value.lval = (long) '\r';
break;
case '\\':
zendlval->value.chval='\\';
zendlval->value.lval = (long) '\\';
break;
case '$':
zendlval->value.chval=yytext[1];
zendlval->value.lval = (long) yytext[1];
break;
case '{':
zendlval->value.chval=yytext[1];
zendlval->value.lval = (long) yytext[1];
break;
default:
zendlval->value.str.val = estrndup(yytext,yyleng);
@@ -1443,12 +1649,6 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
}
<ST_HEREDOC>"\\$"|"\\{" {
zendlval->value.chval = yytext[1];
return T_CHARACTER;
}
<ST_HEREDOC>["'`]+ {
zendlval->value.str.val = (char *) estrndup(yytext, yyleng);
zendlval->value.str.len = yyleng;
@@ -1479,7 +1679,13 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
return 0;
}
<ST_COMMENT><<EOF>> {
zend_error(E_COMPILE_WARNING,"Unterminated comment starting line %d", CG(comment_start_line));
return 0;
}
<ST_IN_SCRIPTING,INITIAL,ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_SINGLE_QUOTE>. {
<ST_IN_SCRIPTING,INITIAL,ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_SINGLE_QUOTE,ST_HEREDOC>. {
zend_error(E_COMPILE_WARNING,"Unexpected character in input: '%c' (ASCII=%d) state=%d",yytext[0],yytext[0],YYSTATE);
}
+286 -62
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -19,13 +19,12 @@
#include "zend.h"
#include "zend_operators.h"
#include "zend_variables.h"
#include "zend_extensions.h"
#include "modules.h"
#include "zend_constants.h"
#include "zend_list.h"
#include "zend_API.h"
#include "zend_builtin_functions.h"
#ifdef ZTS
# define GLOBAL_FUNCTION_TABLE global_function_table
@@ -37,21 +36,28 @@
# define GLOBAL_CONSTANTS_TABLE CG(zend_constants)
#endif
#ifdef ZEND_WIN32
BOOL WINAPI IsDebuggerPresent(VOID);
#endif
/* true multithread-shared globals */
ZEND_API zend_class_entry zend_standard_class_def;
ZEND_API int (*zend_printf)(const char *format, ...);
ZEND_API int (*zend_write)(const char *str, uint str_length);
ZEND_API void (*zend_error)(int type, const char *format, ...);
void (*zend_message_dispatcher)(long message, void *data);
FILE *(*zend_fopen)(const char *filename);
void (*zend_block_interruptions)();
void (*zend_unblock_interruptions)();
ZEND_API int (*zend_get_ini_entry)(char *name, uint name_length, zval *contents);
ZEND_API zend_write_func_t zend_write;
ZEND_API FILE *(*zend_fopen)(const char *filename, char **opened_path);
ZEND_API void (*zend_block_interruptions)(void);
ZEND_API void (*zend_unblock_interruptions)(void);
ZEND_API void (*zend_ticks_function)(int ticks);
ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
static void (*zend_message_dispatcher_p)(long message, void *data);
static int (*zend_get_ini_entry_p)(char *name, uint name_length, zval *contents);
#ifdef ZTS
ZEND_API int compiler_globals_id;
ZEND_API int executor_globals_id;
int alloc_globals_id;
ZEND_API int alloc_globals_id;
HashTable *global_function_table;
HashTable *global_class_table;
HashTable *global_constants_table;
@@ -59,13 +65,15 @@ HashTable *global_constants_table;
zend_utility_values zend_uv;
ZEND_API zval zval_used_for_init; /* True global variable */
/* version information */
static char *zend_version_info;
static uint zend_version_info_length;
#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski\n"
#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998-2000 Zend Technologies\n"
#define PRINT_PVAL_INDENT 4
#define PRINT_ZVAL_INDENT 4
static void print_hash(HashTable *ht, int indent)
{
@@ -78,7 +86,7 @@ static void print_hash(HashTable *ht, int indent)
ZEND_PUTS(" ");
}
ZEND_PUTS("(\n");
indent += PRINT_PVAL_INDENT;
indent += PRINT_ZVAL_INDENT;
zend_hash_internal_pointer_reset(ht);
while (zend_hash_get_current_data(ht, (void **) &tmp) == SUCCESS) {
for (i=0; i<indent; i++) {
@@ -95,11 +103,11 @@ static void print_hash(HashTable *ht, int indent)
break;
}
ZEND_PUTS("] => ");
zend_print_zval_r(*tmp, indent+PRINT_PVAL_INDENT);
zend_print_zval_r(*tmp, indent+PRINT_ZVAL_INDENT);
ZEND_PUTS("\n");
zend_hash_move_forward(ht);
}
indent -= PRINT_PVAL_INDENT;
indent -= PRINT_ZVAL_INDENT;
for (i=0; i<indent; i++) {
ZEND_PUTS(" ");
}
@@ -114,8 +122,11 @@ ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_cop
return;
}
switch (expr->type) {
case IS_NULL:
expr_copy->value.str.len = 0;
expr_copy->value.str.val = empty_string;
break;
case IS_BOOL:
#if 1
if (expr->value.lval) {
expr_copy->value.str.len = 1;
expr_copy->value.str.val = estrndup("1", 1);
@@ -123,15 +134,6 @@ ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_cop
expr_copy->value.str.len = 0;
expr_copy->value.str.val = empty_string;
}
#else
if (expr->value.lval) {
expr_copy->value.str.len = sizeof("true")-1;
expr_copy->value.str.val = estrndup("true", expr_copy->value.str.len);
} else {
expr_copy->value.str.len = sizeof("false")-1;
expr_copy->value.str.val = estrndup("false", expr_copy->value.str.len);
}
#endif
break;
case IS_RESOURCE:
expr_copy->value.str.val = (char *) emalloc(sizeof("Resource id #")-1 + MAX_LENGTH_OF_LONG);
@@ -143,10 +145,7 @@ ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_cop
break;
case IS_OBJECT: {
zval function_name;
function_name.value.str.len = sizeof("to_string")-1;
function_name.value.str.val = estrndup("to_string", function_name.value.str.len);
function_name.type = IS_STRING;
ZVAL_STRING(&function_name,"__string_value",1);
if (call_user_function(NULL, expr, &function_name, expr_copy, 0, NULL)==FAILURE) {
expr_copy->value.str.len = sizeof("Object")-1;
@@ -167,6 +166,12 @@ ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_cop
ZEND_API int zend_print_zval(zval *expr, int indent)
{
return zend_print_zval_ex(zend_write, expr, indent);
}
ZEND_API int zend_print_zval_ex(zend_write_func_t write_func, zval *expr, int indent)
{
zval expr_copy;
int use_copy;
@@ -181,7 +186,7 @@ ZEND_API int zend_print_zval(zval *expr, int indent)
}
return 0;
}
ZEND_WRITE(expr->value.str.val,expr->value.str.len);
write_func(expr->value.str.val,expr->value.str.len);
if (use_copy) {
zval_dtor(expr);
}
@@ -189,7 +194,13 @@ ZEND_API int zend_print_zval(zval *expr, int indent)
}
ZEND_API void zend_print_zval_r(zval *expr, int indent)
ZEND_API void zend_print_zval_r(zval *expr, int indent)
{
zend_print_zval_r_ex(zend_write, expr, indent);
}
ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int indent)
{
switch(expr->type) {
case IS_ARRAY:
@@ -207,26 +218,39 @@ ZEND_API void zend_print_zval_r(zval *expr, int indent)
}
static FILE *zend_fopen_wrapper(const char *filename)
static FILE *zend_fopen_wrapper(const char *filename, char **opened_path)
{
return fopen(filename, "r");
if (opened_path) {
*opened_path = strdup(filename);
}
return fopen(filename, "rb");
}
static void register_standard_class()
static void register_standard_class(void)
{
zend_standard_class_def.type = ZEND_INTERNAL_CLASS;
zend_standard_class_def.name_length = sizeof("stdClass") - 1;
zend_standard_class_def.name = zend_strndup("stdClass", zend_standard_class_def.name_length);
zend_standard_class_def.parent = NULL;
zend_hash_init(&zend_standard_class_def.default_properties, 0, NULL, PVAL_PTR_DTOR, 1);
zend_hash_init(&zend_standard_class_def.default_properties, 0, NULL, ZVAL_PTR_DTOR, 1);
zend_hash_init(&zend_standard_class_def.function_table, 0, NULL, ZEND_FUNCTION_DTOR, 1);
zend_standard_class_def.handle_function_call = NULL;
zend_standard_class_def.handle_property_get = NULL;
zend_standard_class_def.handle_property_set = NULL;
zend_standard_class_def.refcount = (int *) malloc(sizeof(int));
*zend_standard_class_def.refcount = 1;
zend_hash_add(GLOBAL_CLASS_TABLE, "stdClass", sizeof("stdClass"), &zend_standard_class_def, sizeof(zend_class_entry), NULL);
zend_hash_add(GLOBAL_CLASS_TABLE, "stdclass", sizeof("stdclass"), &zend_standard_class_def, sizeof(zend_class_entry), NULL);
}
static void zend_set_default_compile_time_values(CLS_D)
{
/* default compile-time values */
CG(asp_tags) = 0;
CG(short_tags) = 1;
CG(allow_call_time_pass_reference) = 1;
CG(extended_info) = 0;
}
@@ -242,7 +266,9 @@ static void compiler_globals_ctor(zend_compiler_globals *compiler_globals)
compiler_globals->class_table = (HashTable *) malloc(sizeof(HashTable));
zend_hash_init(compiler_globals->class_table, 10, NULL, ZEND_CLASS_DTOR, 1);
zend_hash_copy(compiler_globals->class_table, global_class_table, zend_class_add_ref, &tmp_class, sizeof(zend_class_entry));
zend_hash_copy(compiler_globals->class_table, global_class_table, (copy_ctor_func_t) zend_class_add_ref, &tmp_class, sizeof(zend_class_entry));
zend_set_default_compile_time_values(CLS_C);
}
@@ -262,56 +288,77 @@ static void compiler_globals_dtor(zend_compiler_globals *compiler_globals)
static void executor_globals_ctor(zend_executor_globals *executor_globals)
{
if (global_constants_table) {
zend_startup_constants(executor_globals->zend_constants ELS_CC);
zend_startup_constants(ELS_C);
zend_copy_constants(executor_globals->zend_constants, global_constants_table);
}
init_resource_plist(ELS_C);
zend_init_rsrc_plist(ELS_C);
EG(lambda_count)=0;
}
static void executor_globals_dtor(zend_executor_globals *executor_globals)
{
zend_shutdown_constants(ELS_C);
destroy_resource_plist();
zend_destroy_rsrc_plist(ELS_C);
}
static void alloc_globals_ctor(zend_alloc_globals *alloc_globals)
{
start_memory_manager();
start_memory_manager(ALS_C);
}
#endif
#ifdef __FreeBSD__
/* FreeBSD floating point precision fix */
#include <floatingpoint.h>
#endif
int zend_startup(zend_utility_functions *utility_functions, char **extensions)
int zend_startup(zend_utility_functions *utility_functions, char **extensions, int start_builtin_functions)
{
#ifdef ZTS
zend_compiler_globals *compiler_globals;
zend_executor_globals *executor_globals;
alloc_globals_id = ts_allocate_id(sizeof(zend_alloc_globals), alloc_globals_ctor, NULL);
alloc_globals_id = ts_allocate_id(sizeof(zend_alloc_globals), (ts_allocate_ctor) alloc_globals_ctor, NULL);
#else
start_memory_manager(ALS_C);
#endif
start_memory_manager();
#ifdef __FreeBSD__
{
/* FreeBSD floating point precision fix */
#ifdef HAVE_FP_EXCEPT
fp_except
#else
fp_except_t
#endif
mask;
mask = fpgetmask();
fpsetmask(mask & ~FP_X_IMP);
}
#endif
/* Set up utility functions and values */
zend_error = utility_functions->error_function;
zend_error_cb = utility_functions->error_function;
zend_printf = utility_functions->printf_function;
zend_write = utility_functions->write_function;
zend_write = (zend_write_func_t) utility_functions->write_function;
zend_fopen = utility_functions->fopen_function;
if (!zend_fopen) {
zend_fopen = zend_fopen_wrapper;
}
zend_message_dispatcher = utility_functions->message_handler;
zend_message_dispatcher_p = utility_functions->message_handler;
zend_block_interruptions = utility_functions->block_interruptions;
zend_unblock_interruptions = utility_functions->unblock_interruptions;
zend_get_ini_entry = utility_functions->get_ini_entry;
zend_get_ini_entry_p = utility_functions->get_ini_entry;
zend_ticks_function = utility_functions->ticks_function;
zend_compile_files = compile_files;
zend_v_compile_files = v_compile_files;
zend_execute = execute;
zend_llist_init(&zend_extensions, sizeof(zend_extension), (void (*)(void *)) zend_extension_dtor, 1);
zend_startup_extensions();
/* set up version */
zend_version_info = strdup(ZEND_CORE_VERSION_INFO);
@@ -323,7 +370,12 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions)
zend_hash_init(GLOBAL_CLASS_TABLE, 10, NULL, ZEND_CLASS_DTOR, 1);
register_standard_class();
zend_hash_init(&module_registry, 50, NULL, ZEND_MODULE_DTOR, 1);
zend_hash_init(&list_destructors, 50, NULL, NULL, 1);
zend_init_rsrc_list_dtors();
/* This zval can be used to initialize allocate zval's to an uninit'ed value */
zval_used_for_init.is_ref = 0;
zval_used_for_init.refcount = 1;
zval_used_for_init.type = IS_NULL;
#ifdef ZTS
global_constants_table = NULL;
@@ -334,27 +386,35 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions)
compiler_globals_dtor(compiler_globals);
compiler_globals->function_table = GLOBAL_FUNCTION_TABLE;
compiler_globals->class_table = GLOBAL_CLASS_TABLE;
zend_startup_constants(EG(zend_constants), executor_globals);
zend_startup_constants(executor_globals);
GLOBAL_CONSTANTS_TABLE = EG(zend_constants);
#else
zend_startup_constants(EG(zend_constants));
zend_startup_constants();
zend_set_default_compile_time_values(CLS_C);
#endif
zend_register_standard_constants(ELS_C);
#ifndef ZTS
init_resource_plist(ELS_C);
zend_init_rsrc_plist(ELS_C);
#endif
if (start_builtin_functions) {
zend_startup_builtin_functions();
}
return SUCCESS;
}
void zend_shutdown()
{
#ifndef ZTS
destroy_resource_plist();
#ifdef ZEND_WIN32
zend_shutdown_timeout_thread();
#endif
zend_hash_destroy(&list_destructors);
#ifndef ZTS
zend_destroy_rsrc_plist();
#endif
zend_destroy_rsrc_list_dtors();
zend_hash_destroy(&module_registry);
zend_hash_destroy(GLOBAL_FUNCTION_TABLE);
free(GLOBAL_FUNCTION_TABLE);
@@ -363,7 +423,7 @@ void zend_shutdown()
zend_shutdown_extensions();
free(zend_version_info);
#ifndef ZTS
zend_shutdown_constants(ELS_C);
zend_shutdown_constants();
#endif
}
@@ -371,6 +431,7 @@ void zend_shutdown()
void zend_set_utility_values(zend_utility_values *utility_values)
{
zend_uv = *utility_values;
zend_uv.import_use_extension_length = strlen(zend_uv.import_use_extension);
}
@@ -428,10 +489,173 @@ void zend_activate(CLS_D ELS_DC)
startup_scanner(CLS_C);
}
void zend_activate_modules()
{
zend_hash_apply(&module_registry, (int (*)(void *)) module_registry_request_startup);
}
void zend_deactivate_modules()
{
ELS_FETCH();
EG(opline_ptr) = NULL; /* we're no longer executing anything */
zend_hash_apply(&module_registry, (int (*)(void *)) module_registry_cleanup);
}
void zend_deactivate(CLS_D ELS_DC)
{
zend_hash_apply(&module_registry, (int (*)(void *)) module_registry_cleanup);
EG(opline_ptr) = NULL; /* we're no longer executing anything */
shutdown_scanner(CLS_C);
shutdown_executor(ELS_C);
shutdown_compiler(CLS_C);
}
BEGIN_EXTERN_C()
ZEND_API void zend_message_dispatcher(long message, void *data)
{
if (zend_message_dispatcher_p) {
zend_message_dispatcher_p(message, data);
}
}
END_EXTERN_C()
ZEND_API int zend_get_ini_entry(char *name, uint name_length, zval *contents)
{
if (zend_get_ini_entry_p) {
return zend_get_ini_entry_p(name, name_length, contents);
} else {
return FAILURE;
}
}
#define ZEND_ERROR_BUFFER_SIZE 1024
ZEND_API void zend_error(int type, const char *format, ...)
{
va_list args;
zval ***params;
zval *retval;
zval *error_type, *error_message;
char *error_filename;
uint error_lineno;
ELS_FETCH();
CLS_FETCH();
/* Obtain relevant filename and lineno */
switch (type) {
case E_CORE_ERROR:
case E_CORE_WARNING:
error_filename = NULL;
error_lineno = 0;
break;
case E_PARSE:
case E_COMPILE_ERROR:
case E_COMPILE_WARNING:
case E_ERROR:
case E_NOTICE:
case E_WARNING:
case E_USER_ERROR:
case E_USER_WARNING:
case E_USER_NOTICE:
if (zend_is_compiling()) {
error_filename = zend_get_compiled_filename(CLS_C);
error_lineno = zend_get_compiled_lineno(CLS_C);
} else if (zend_is_executing()) {
error_filename = zend_get_executed_filename(ELS_C);
error_lineno = zend_get_executed_lineno(ELS_C);
} else {
error_filename = NULL;
error_lineno = 0;
}
break;
default:
error_filename = NULL;
error_lineno = 0;
break;
}
if (!error_filename) {
error_filename = "Unknown";
}
va_start(args, format);
/* if we don't have a user defined error handler */
if (!EG(user_error_handler)) {
zend_error_cb(type, error_filename, error_lineno, format, args);
} else switch (type) {
case E_ERROR:
case E_PARSE:
case E_CORE_ERROR:
case E_CORE_WARNING:
case E_COMPILE_ERROR:
case E_COMPILE_WARNING:
/* The error may not be safe to handle in user-space */
zend_error_cb(type, error_filename, error_lineno, format, args);
break;
default:
/* Handle the error in user space */
ALLOC_INIT_ZVAL(error_message);
ALLOC_INIT_ZVAL(error_type);
error_message->value.str.val = (char *) emalloc(ZEND_ERROR_BUFFER_SIZE);
#ifdef HAVE_VSNPRINTF
error_message->value.str.len = vsnprintf(error_message->value.str.val, ZEND_ERROR_BUFFER_SIZE, format, args);
#else
/* This is risky... */
error_message->value.str.len = vsprintf(error_message->value.str.val, format, args);
#endif
error_message->type = IS_STRING;
error_type->value.lval = type;
error_type->type = IS_LONG;
params = (zval ***) emalloc(sizeof(zval **)*2);
params[0] = &error_type;
params[1] = &error_message;
if (call_user_function_ex(CG(function_table), NULL, EG(user_error_handler), &retval, 2, params, 1, NULL)==SUCCESS) {
zval_ptr_dtor(&retval);
} else {
/* The user error handler failed, use built-in error handler */
zend_error_cb(type, error_filename, error_lineno, format, args);
}
efree(params);
zval_ptr_dtor(&error_message);
zval_ptr_dtor(&error_type);
break;
}
va_end(args);
}
ZEND_API void zend_output_debug_string(zend_bool trigger_break, char *format, ...)
{
#if ZEND_DEBUG
va_list args;
va_start(args, format);
# ifdef ZEND_WIN32
{
char output_buf[1024];
vsnprintf(output_buf, 1024, format, args);
OutputDebugString(output_buf);
OutputDebugString("\n");
if (trigger_break && IsDebuggerPresent()) {
DebugBreak();
}
}
# else
vfprintf(stderr, format, args);
fprintf(stderr, "\n");
# endif
va_end(args);
#endif
}
+249 -64
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -21,8 +21,7 @@
#ifndef _ZEND_H
#define _ZEND_H
#define ZEND_VERSION "0.90"
#define ZEND_VERSION "1.0.1"
#ifdef __cplusplus
#define BEGIN_EXTERN_C() extern "C" {
@@ -32,42 +31,123 @@
#define END_EXTERN_C()
#endif
#include <stdio.h>
/*
* general definitions
*/
#if WINNT||WIN32
#include "config.w32.h"
#ifdef ZEND_WIN32
# include "zend_config.w32.h"
#else
#include "zend_config.h"
#include "config.unix.h"
# include "zend_config.h"
#endif
/* all HAVE_XXX test have to be after the include of zend_config above */
#ifdef HAVE_UNIX_H
# include <unix.h>
#endif
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#endif
#ifdef HAVE_DLFCN_H
# include <dlfcn.h>
#endif
#if defined(HAVE_LIBDL)
# ifndef RTLD_LAZY
# define RTLD_LAZY 1 /* Solaris 1, FreeBSD's (2.1.7.1 and older) */
# endif
# ifndef RTLD_GLOBAL
# define RTLD_GLOBAL 0
# endif
# define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL)
# define DL_UNLOAD dlclose
# define DL_FETCH_SYMBOL dlsym
# define DL_HANDLE void *
# define ZEND_EXTENSIONS_SUPPORT 1
#elif defined(ZEND_WIN32)
# define DL_LOAD(libname) LoadLibrary(libname)
# define DL_FETCH_SYMBOL GetProcAddress
# define DL_UNLOAD FreeLibrary
# define DL_HANDLE HMODULE
# define ZEND_EXTENSIONS_SUPPORT 1
#else
# define DL_HANDLE void *
# define ZEND_EXTENSIONS_SUPPORT 0
#endif
#if HAVE_ALLOCA_H
# include <alloca.h>
#endif
#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && defined(ZEND_WIN32))
# define do_alloca(p) alloca(p)
# define free_alloca(p)
#else
# define do_alloca(p) emalloc(p)
# define free_alloca(p) efree(p)
#endif
#if ZEND_DEBUG
#define ZEND_FILE_LINE_D char *__zend_filename, uint __zend_lineno
#define ZEND_FILE_LINE_DC , ZEND_FILE_LINE_D
#define ZEND_FILE_LINE_ORIG_D char *__zend_orig_filename, uint __zend_orig_lineno
#define ZEND_FILE_LINE_ORIG_DC , ZEND_FILE_LINE_ORIG_D
#define ZEND_FILE_LINE_RELAY_C __zend_filename, __zend_lineno
#define ZEND_FILE_LINE_RELAY_CC , ZEND_FILE_LINE_RELAY_C
#define ZEND_FILE_LINE_C __FILE__, __LINE__
#define ZEND_FILE_LINE_CC , ZEND_FILE_LINE_C
#define ZEND_FILE_LINE_EMPTY_C NULL, 0
#define ZEND_FILE_LINE_EMPTY_CC , ZEND_FILE_LINE_EMPTY_C
#define ZEND_FILE_LINE_ORIG_RELAY_C __zend_orig_filename, __zend_orig_lineno
#define ZEND_FILE_LINE_ORIG_RELAY_CC , ZEND_FILE_LINE_ORIG_RELAY_C
#else
#define ZEND_FILE_LINE_D
#define ZEND_FILE_LINE_DC
#define ZEND_FILE_LINE_ORIG_D
#define ZEND_FILE_LINE_ORIG_DC
#define ZEND_FILE_LINE_RELAY_C
#define ZEND_FILE_LINE_RELAY_CC
#define ZEND_FILE_LINE_C
#define ZEND_FILE_LINE_CC
#define ZEND_FILE_LINE_EMPTY_C
#define ZEND_FILE_LINE_EMPTY_CC
#define ZEND_FILE_LINE_ORIG_RELAY_C
#define ZEND_FILE_LINE_ORIG_RELAY_CC
#endif /* ZEND_DEBUG */
#ifdef ZTS
#define ZTS_V 1
#else
#define ZTS_V 0
#endif
#include "zend_errors.h"
#include "zend_alloc.h"
/* this is a workaround for a bug in gcc */
#if SIZEOF_VOID_P == 8 || (1)
typedef unsigned int zend_bool;
#else
typedef unsigned char zend_bool;
#endif
typedef unsigned char zend_uchar;
typedef unsigned int zend_uint;
typedef unsigned short zend_ushort;
#undef SUCCESS
#undef FAILURE
#define SUCCESS 0
#define FAILURE -1 /* this MUST stay a negative number, or it may effect functions! */
#define FAILURE -1 /* this MUST stay a negative number, or it may affect functions! */
#include "zend_hash.h"
#include "zend_llist.h"
#define INTERNAL_FUNCTION_PARAMETERS int ht, zval *return_value, HashTable *list, HashTable *plist, zval *this_ptr
#define INTERNAL_FUNCTION_PARAM_PASSTHRU ht, return_value, list, plist, this_ptr
#define INTERNAL_FUNCTION_PARAMETERS int ht, zval *return_value, zval *this_ptr, int return_value_used ELS_DC
#define INTERNAL_FUNCTION_PARAM_PASSTHRU ht, return_value, this_ptr, return_value_used ELS_CC
/*
* zval
@@ -82,7 +162,6 @@ typedef union _zvalue_value {
char *val;
int len;
} str;
char chval; /* char value */
HashTable *ht; /* hash table value */
struct {
zend_class_entry *ce;
@@ -94,12 +173,9 @@ typedef union _zvalue_value {
struct _zval_struct {
/* Variable information */
zvalue_value value; /* value */
unsigned char type; /* active type */
struct {
unsigned int locks:7;
unsigned int is_ref:1;
} EA;
short refcount;
zend_uchar type; /* active type */
zend_uchar is_ref;
zend_ushort refcount;
};
@@ -113,8 +189,8 @@ typedef struct _zend_function_entry {
typedef struct _zend_property_reference {
int type; /* read, write or r/w */
zval **object;
zend_llist elements_list;
zval *object;
zend_llist *elements_list;
} zend_property_reference;
@@ -124,6 +200,8 @@ typedef struct _zend_overloaded_element {
zval element;
} zend_overloaded_element;
/* excpt.h on Digital Unix 4.0 defines function_table */
#undef function_table
struct _zend_class_entry {
char type;
@@ -131,6 +209,7 @@ struct _zend_class_entry {
uint name_length;
struct _zend_class_entry *parent;
int *refcount;
zend_bool constants_updated;
HashTable function_table;
HashTable default_properties;
@@ -145,80 +224,124 @@ struct _zend_class_entry {
typedef struct _zend_utility_functions {
void (*error_function)(int type, const char *format, ...);
void (*error_function)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
int (*printf_function)(const char *format, ...);
int (*write_function)(const char *str, uint str_length);
FILE *(*fopen_function)(const char *filename);
FILE *(*fopen_function)(const char *filename, char **opened_path);
void (*message_handler)(long message, void *data);
void (*block_interruptions)();
void (*unblock_interruptions)();
void (*block_interruptions)(void);
void (*unblock_interruptions)(void);
int (*get_ini_entry)(char *name, uint name_length, zval *contents);
void (*ticks_function)(int ticks);
} zend_utility_functions;
typedef struct _zend_utility_values {
unsigned char short_tags;
unsigned char asp_tags;
char *import_use_extension;
uint import_use_extension_length;
} zend_utility_values;
typedef int (*zend_write_func_t)(const char *str, uint str_length);
#undef MIN
#undef MAX
#define MAX(a,b) (((a)>(b))?(a):(b))
#define MIN(a,b) (((a)<(b))?(a):(b))
#define ZEND_STRL(str) (str), (sizeof(str)-1)
#define ZEND_STRS(str) (str), (sizeof(str)
#define ZEND_NORMALIZE_BOOL(n) \
((n) ? (((n)>0) ? 1 : -1) : 0)
/* data types */
#define IS_NULL 0
#define IS_LONG 1
#define IS_DOUBLE 2
#define IS_STRING 3
#define IS_ARRAY 4
#define IS_OBJECT 5
#define IS_BC 6 /* for parser internal use only */
#define IS_BOOL 7
#define IS_RESOURCE 8
#define IS_CONSTANT 9
#define IS_METHOD 10 /* for overloaded function calls */
#define IS_BOOL 6
#define IS_RESOURCE 7
#define IS_CONSTANT 8
#define IS_CONSTANT_ARRAY 9
int zend_startup(zend_utility_functions *utility_functions, char **extensions);
void zend_shutdown();
/* Special data type to temporarily mark large numbers */
#define FLAG_IS_BC 10 /* for parser internal use only */
/* overloaded elements data types */
#define OE_IS_ARRAY (1<<0)
#define OE_IS_OBJECT (1<<1)
#define OE_IS_METHOD (1<<2)
/* Argument passing types */
#define BYREF_NONE 0
#define BYREF_FORCE 1
#define BYREF_ALLOW 2
#define BYREF_FORCE_REST 3
int zend_startup(zend_utility_functions *utility_functions, char **extensions, int start_builtin_functions);
void zend_shutdown(void);
void zend_set_utility_values(zend_utility_values *utility_values);
BEGIN_EXTERN_C()
ZEND_API void zend_bailout();
ZEND_API void zend_bailout(void);
END_EXTERN_C()
ZEND_API char *get_zend_version();
ZEND_API char *get_zend_version(void);
ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_copy);
ZEND_API int zend_print_zval(zval *expr, int indent);
ZEND_API int zend_print_zval_ex(zend_write_func_t write_func, zval *expr, int indent);
ZEND_API void zend_print_zval_r(zval *expr, int indent);
ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int indent);
ZEND_API void zend_output_debug_string(zend_bool trigger_break, char *format, ...);
#if ZEND_DEBUG
#define Z_DBG(expr) (expr)
#else
#define Z_DBG(expr)
#endif
ZEND_API extern char *empty_string;
ZEND_API extern char *undefined_variable_string;
#define STR_FREE(ptr) if (ptr && ptr!=empty_string && ptr!=undefined_variable_string) { efree(ptr); }
#define STR_FREE(ptr) if (ptr && ptr!=empty_string) { efree(ptr); }
#define STR_FREE_REL(ptr) if (ptr && ptr!=empty_string) { efree_rel(ptr); }
#define STR_REALLOC(ptr, size) \
if (ptr!=empty_string) { \
ptr = (char *) erealloc(ptr, size); \
} else { \
ptr = (char *) emalloc(size); \
memset(ptr, 0, size); \
}
/* output support */
#define ZEND_WRITE(str, str_len) zend_write((str), (str_len))
#define ZEND_PUTS(str) zend_write((str), strlen((str)))
#define ZEND_PUTC(c) zend_write(&(c), 1), (c)
BEGIN_EXTERN_C()
extern ZEND_API int (*zend_printf)(const char *format, ...);
extern ZEND_API int (*zend_write)(const char *str, uint str_length);
extern ZEND_API void (*zend_error)(int type, const char *format, ...);
extern FILE *(*zend_fopen)(const char *filename);
extern void (*zend_block_interruptions)();
extern void (*zend_unblock_interruptions)();
extern void (*zend_message_dispatcher)(long message, void *data);
extern ZEND_API int (*zend_get_ini_entry)(char *name, uint name_length, zval *contents);
END_EXTERN_C()
extern ZEND_API zend_write_func_t zend_write;
extern ZEND_API FILE *(*zend_fopen)(const char *filename, char **opened_path);
extern ZEND_API void (*zend_block_interruptions)(void);
extern ZEND_API void (*zend_unblock_interruptions)(void);
extern ZEND_API void (*zend_ticks_function)(int ticks);
extern ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
ZEND_API void zend_error(int type, const char *format, ...);
void zenderror(char *error);
extern ZEND_API zend_class_entry zend_standard_class_def;
extern zend_utility_values zend_uv;
extern ZEND_API zval zval_used_for_init;
END_EXTERN_C()
#define ZEND_UV(name) (zend_uv.name)
@@ -226,23 +349,85 @@ extern zend_utility_values zend_uv;
#define HANDLE_BLOCK_INTERRUPTIONS() if (zend_block_interruptions) { zend_block_interruptions(); }
#define HANDLE_UNBLOCK_INTERRUPTIONS() if (zend_unblock_interruptions) { zend_unblock_interruptions(); }
BEGIN_EXTERN_C()
ZEND_API void zend_message_dispatcher(long message, void *data);
END_EXTERN_C()
ZEND_API int zend_get_ini_entry(char *name, uint name_length, zval *contents);
/* Messages for applications of Zend */
#define ZMSG_ENABLE_TRACK_VARS 1L
#define ZMSG_FAILED_INCLUDE_FOPEN 2L
#define ZMSG_FAILED_REQUIRE_FOPEN 3L
#define ZMSG_FAILED_HIGHLIGHT_FOPEN 4L
#define ZMSG_MEMORY_LEAK_DETECTED 5L
#define ZMSG_MEMORY_LEAK_REPEATED 6L
#define ZMSG_LOG_SCRIPT_NAME 7L
#define ZMSG_FAILED_INCLUDE_FOPEN 1L
#define ZMSG_FAILED_REQUIRE_FOPEN 2L
#define ZMSG_FAILED_HIGHLIGHT_FOPEN 3L
#define ZMSG_MEMORY_LEAK_DETECTED 4L
#define ZMSG_MEMORY_LEAK_REPEATED 5L
#define ZMSG_LOG_SCRIPT_NAME 6L
#define INIT_PZVAL(z) \
(z)->refcount = 1; \
(z)->EA.is_ref = 0; \
(z)->EA.locks = 0;
(z)->is_ref = 0;
#define MAKE_STD_ZVAL(zv) \
zv = (zval *) emalloc(sizeof(zval)); \
#define INIT_ZVAL(z) z = zval_used_for_init;
#define ALLOC_INIT_ZVAL(zp) \
ALLOC_ZVAL(zp); \
INIT_ZVAL(*zp);
#define MAKE_STD_ZVAL(zv) \
ALLOC_ZVAL(zv); \
INIT_PZVAL(zv);
#define PZVAL_IS_REF(z) ((z)->is_ref)
#define SEPARATE_ZVAL(ppzv) \
{ \
zval *orig_ptr = *(ppzv); \
\
if (orig_ptr->refcount>1) { \
orig_ptr->refcount--; \
ALLOC_ZVAL(*(ppzv)); \
**(ppzv) = *orig_ptr; \
zval_copy_ctor(*(ppzv)); \
(*(ppzv))->refcount=1; \
(*(ppzv))->is_ref = 0; \
} \
}
#define SEPARATE_ZVAL_IF_NOT_REF(ppzv) \
if (!PZVAL_IS_REF(*ppzv)) { \
SEPARATE_ZVAL(ppzv); \
}
#define COPY_PZVAL_TO_ZVAL(zv, pzv) \
(zv) = *(pzv); \
if ((pzv)->refcount>1) { \
zval_copy_ctor(&(zv)); \
(pzv)->refcount--; \
} else { \
FREE_ZVAL(pzv); \
} \
INIT_PZVAL(&(zv));
#define ZEND_MAX_RESERVED_RESOURCES 2
#ifdef ZEND_WIN32
/* Only use this macro if you know for sure that all of the switches values
are covered by its case statements */
#define EMPTY_SWITCH_DEFAULT_CASE() \
default: \
__assume(0); \
break;
#else
#define EMPTY_SWITCH_DEFAULT_CASE()
#endif
#endif /* _ZEND_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
+346 -133
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -19,32 +19,29 @@
#include "zend.h"
#include "zend_variables.h"
#include "zend_execute.h"
#include "zend_API.h"
#include "modules.h"
#include "zend_constants.h"
#include "zend_operators.h"
#if HAVE_STDARG_H
#ifdef HAVE_STDARG_H
#include <stdarg.h>
#endif
/* these variables are true statics/globals, and have to be mutex'ed on every access */
static int module_count=0;
HashTable list_destructors, module_registry;
HashTable module_registry;
/* this function doesn't check for too many parameters */
ZEND_API int getParameters(int ht, int param_count,...)
ZEND_API int zend_get_parameters(int ht, int param_count, ...)
{
void **p;
int arg_count;
va_list ptr;
zval **param, *param_ptr;
ELS_FETCH();
ALS_FETCH();
p = EG(argument_stack).top_element-1;
p = EG(argument_stack).top_element-2;
arg_count = (ulong) *p;
if (param_count>arg_count) {
@@ -53,22 +50,22 @@ ZEND_API int getParameters(int ht, int param_count,...)
va_start(ptr, param_count);
while (param_count>0) {
while (param_count-->0) {
param = va_arg(ptr, zval **);
param_ptr = *(p-param_count);
param_ptr = *(p-arg_count);
if (!PZVAL_IS_REF(param_ptr) && param_ptr->refcount>1) {
zval *new_tmp;
new_tmp = (zval *) emalloc(sizeof(zval));
ALLOC_ZVAL(new_tmp);
*new_tmp = *param_ptr;
zval_copy_ctor(new_tmp);
INIT_PZVAL(new_tmp);
param_ptr = new_tmp;
((zval *) *(p-param_count))->refcount--;
*(p-param_count) = param_ptr;
((zval *) *(p-arg_count))->refcount--;
*(p-arg_count) = param_ptr;
}
*param = param_ptr;
param_count--;
arg_count--;
}
va_end(ptr);
@@ -76,36 +73,35 @@ ZEND_API int getParameters(int ht, int param_count,...)
}
ZEND_API int getParametersArray(int ht, int param_count, zval **argument_array)
ZEND_API int zend_get_parameters_array(int ht, int param_count, zval **argument_array)
{
void **p;
int arg_count;
zval *param_ptr;
ELS_FETCH();
p = EG(argument_stack).top_element-1;
p = EG(argument_stack).top_element-2;
arg_count = (ulong) *p;
if (param_count>arg_count) {
return FAILURE;
}
while (param_count>0) {
param_ptr = *(p-param_count);
while (param_count-->0) {
param_ptr = *(p-arg_count);
if (!PZVAL_IS_REF(param_ptr) && param_ptr->refcount>1) {
zval *new_tmp;
new_tmp = (zval *) emalloc(sizeof(zval));
ALLOC_ZVAL(new_tmp);
*new_tmp = *param_ptr;
zval_copy_ctor(new_tmp);
INIT_PZVAL(new_tmp);
param_ptr = new_tmp;
((zval *) *(p-param_count))->refcount--;
*(p-param_count) = param_ptr;
((zval *) *(p-arg_count))->refcount--;
*(p-arg_count) = param_ptr;
}
*(argument_array++) = param_ptr;
param_count--;
arg_count--;
}
return SUCCESS;
@@ -116,7 +112,7 @@ ZEND_API int getParametersArray(int ht, int param_count, zval **argument_array)
/* Zend-optimized Extended functions */
/* this function doesn't check for too many parameters */
ZEND_API int getParametersEx(int param_count,...)
ZEND_API int zend_get_parameters_ex(int param_count, ...)
{
void **p;
int arg_count;
@@ -124,7 +120,7 @@ ZEND_API int getParametersEx(int param_count,...)
zval ***param;
ELS_FETCH();
p = EG(argument_stack).top_element-1;
p = EG(argument_stack).top_element-2;
arg_count = (ulong) *p;
if (param_count>arg_count) {
@@ -132,9 +128,9 @@ ZEND_API int getParametersEx(int param_count,...)
}
va_start(ptr, param_count);
while (param_count>0) {
while (param_count-->0) {
param = va_arg(ptr, zval ***);
*param = (zval **) p-(param_count--);
*param = (zval **) p-(arg_count--);
}
va_end(ptr);
@@ -142,21 +138,21 @@ ZEND_API int getParametersEx(int param_count,...)
}
ZEND_API int getParametersArrayEx(int param_count, zval ***argument_array)
ZEND_API int zend_get_parameters_array_ex(int param_count, zval ***argument_array)
{
void **p;
int arg_count;
ELS_FETCH();
p = EG(argument_stack).top_element-1;
p = EG(argument_stack).top_element-2;
arg_count = (ulong) *p;
if (param_count>arg_count) {
return FAILURE;
}
while (param_count>0) {
*(argument_array++) = (zval **) p-(param_count--);
while (param_count-->0) {
*(argument_array++) = (zval **) p-(arg_count--);
}
return SUCCESS;
@@ -170,7 +166,7 @@ ZEND_API int ParameterPassedByReference(int ht, uint n)
zval *arg;
ELS_FETCH();
p = EG(argument_stack).elements+EG(argument_stack).top-1;
p = EG(argument_stack).elements+EG(argument_stack).top-2;
arg_count = (ulong) *p;
if (n>arg_count) {
@@ -187,11 +183,12 @@ ZEND_API void wrong_param_count()
}
ZEND_API inline int array_init(zval *arg)
ZEND_API inline int _array_init(zval *arg ZEND_FILE_LINE_DC)
{
arg->value.ht = (HashTable *) emalloc(sizeof(HashTable));
if (!arg->value.ht || zend_hash_init(arg->value.ht, 0, NULL, PVAL_PTR_DTOR, 0)) {
zend_error(E_CORE_ERROR, "Cannot allocate memory for array");
ALLOC_HASHTABLE_REL(arg->value.ht);
if (!arg->value.ht || zend_hash_init(arg->value.ht, 0, NULL, ZVAL_PTR_DTOR, 0)) {
zend_error(E_ERROR, "Cannot allocate memory for array");
return FAILURE;
}
arg->type = IS_ARRAY;
@@ -199,37 +196,42 @@ ZEND_API inline int array_init(zval *arg)
}
static void zval_update_const_and_ref(zval **p)
{
zval_update_constant(*p);
zval_add_ref(p);
}
ZEND_API inline int object_init_ex(zval *arg, zend_class_entry *class_type)
ZEND_API inline int _object_init_ex(zval *arg, zend_class_entry *class_type ZEND_FILE_LINE_DC)
{
zval *tmp;
arg->value.obj.properties = (HashTable *) emalloc(sizeof(HashTable));
zend_hash_init(arg->value.obj.properties, 0, NULL, PVAL_PTR_DTOR, 0);
zend_hash_copy(arg->value.obj.properties, &class_type->default_properties, (void (*)(void *)) zval_update_const_and_ref, (void *) &tmp, sizeof(zval *));
if (!class_type->constants_updated) {
zend_hash_apply_with_argument(&class_type->default_properties, (int (*)(void *,void *)) zval_update_constant, (void *) 1);
class_type->constants_updated = 1;
}
ALLOC_HASHTABLE_REL(arg->value.obj.properties);
zend_hash_init(arg->value.obj.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
zend_hash_copy(arg->value.obj.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
arg->type = IS_OBJECT;
arg->value.obj.ce = class_type;
return SUCCESS;
}
ZEND_API inline int object_init(zval *arg)
ZEND_API inline int _object_init(zval *arg ZEND_FILE_LINE_DC)
{
return object_init_ex(arg, &zend_standard_class_def);
return _object_init_ex(arg, &zend_standard_class_def ZEND_FILE_LINE_CC);
}
ZEND_API inline int add_assoc_function(zval *arg, char *key,void (*function_ptr)(INTERNAL_FUNCTION_PARAMETERS))
{
zend_error(E_WARNING, "add_assoc_function() is no longer supported");
return FAILURE;
}
ZEND_API inline int add_assoc_long(zval *arg, char *key, long n)
{
zval *tmp = (zval *) emalloc(sizeof(zval));
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_LONG;
tmp->value.lval = n;
INIT_PZVAL(tmp);
@@ -237,10 +239,45 @@ ZEND_API inline int add_assoc_long(zval *arg, char *key, long n)
}
ZEND_API inline int add_assoc_unset(zval *arg, char *key)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_NULL;
INIT_PZVAL(tmp);
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_assoc_bool(zval *arg, char *key, int b)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_BOOL;
tmp->value.lval = b;
INIT_PZVAL(tmp);
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_assoc_resource(zval *arg, char *key, int r)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_RESOURCE;
tmp->value.lval = r;
INIT_PZVAL(tmp);
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_assoc_double(zval *arg, char *key, double d)
{
zval *tmp = (zval *) emalloc(sizeof(zval));
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_DOUBLE;
tmp->value.dval = d;
INIT_PZVAL(tmp);
@@ -250,8 +287,9 @@ ZEND_API inline int add_assoc_double(zval *arg, char *key, double d)
ZEND_API inline int add_assoc_string(zval *arg, char *key, char *str, int duplicate)
{
zval *tmp = (zval *) emalloc(sizeof(zval));
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_STRING;
tmp->value.str.len = strlen(str);
if (duplicate) {
@@ -266,8 +304,9 @@ ZEND_API inline int add_assoc_string(zval *arg, char *key, char *str, int duplic
ZEND_API inline int add_assoc_stringl(zval *arg, char *key, char *str, uint length, int duplicate)
{
zval *tmp = (zval *) emalloc(sizeof(zval));
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_STRING;
tmp->value.str.len = length;
if (duplicate) {
@@ -280,17 +319,11 @@ ZEND_API inline int add_assoc_stringl(zval *arg, char *key, char *str, uint leng
}
ZEND_API inline int add_assoc_function(zval *arg, char *key,void (*function_ptr)(INTERNAL_FUNCTION_PARAMETERS))
{
zend_error(E_WARNING, "add_assoc_function() is no longer supported");
return FAILURE;
}
ZEND_API inline int add_index_long(zval *arg, uint index, long n)
{
zval *tmp = (zval *) emalloc(sizeof(zval));
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_LONG;
tmp->value.lval = n;
INIT_PZVAL(tmp);
@@ -298,10 +331,46 @@ ZEND_API inline int add_index_long(zval *arg, uint index, long n)
}
ZEND_API inline int add_index_unset(zval *arg, uint index)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_NULL;
INIT_PZVAL(tmp);
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_index_bool(zval *arg, uint index, int b)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_BOOL;
tmp->value.lval = b;
INIT_PZVAL(tmp);
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),NULL);
}
ZEND_API inline int add_index_resource(zval *arg, uint index, int r)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_RESOURCE;
tmp->value.lval = r;
INIT_PZVAL(tmp);
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),NULL);
}
ZEND_API inline int add_index_double(zval *arg, uint index, double d)
{
zval *tmp = (zval *) emalloc(sizeof(zval));
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_DOUBLE;
tmp->value.dval = d;
INIT_PZVAL(tmp);
@@ -311,8 +380,9 @@ ZEND_API inline int add_index_double(zval *arg, uint index, double d)
ZEND_API inline int add_index_string(zval *arg, uint index, char *str, int duplicate)
{
zval *tmp = (zval *) emalloc(sizeof(zval));
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_STRING;
tmp->value.str.len = strlen(str);
if (duplicate) {
@@ -327,8 +397,9 @@ ZEND_API inline int add_index_string(zval *arg, uint index, char *str, int dupli
ZEND_API inline int add_index_stringl(zval *arg, uint index, char *str, uint length, int duplicate)
{
zval *tmp = (zval *) emalloc(sizeof(zval));
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_STRING;
tmp->value.str.len = length;
if (duplicate) {
@@ -343,8 +414,9 @@ ZEND_API inline int add_index_stringl(zval *arg, uint index, char *str, uint len
ZEND_API inline int add_next_index_long(zval *arg, long n)
{
zval *tmp = (zval *) emalloc(sizeof(zval));
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_LONG;
tmp->value.lval = n;
INIT_PZVAL(tmp);
@@ -352,10 +424,46 @@ ZEND_API inline int add_next_index_long(zval *arg, long n)
}
ZEND_API inline int add_next_index_unset(zval *arg)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_NULL;
INIT_PZVAL(tmp);
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_next_index_bool(zval *arg, int b)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_BOOL;
tmp->value.lval = b;
INIT_PZVAL(tmp);
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_next_index_resource(zval *arg, int r)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_RESOURCE;
tmp->value.lval = r;
INIT_PZVAL(tmp);
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_next_index_double(zval *arg, double d)
{
zval *tmp = (zval *) emalloc(sizeof(zval));
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_DOUBLE;
tmp->value.dval = d;
INIT_PZVAL(tmp);
@@ -365,8 +473,9 @@ ZEND_API inline int add_next_index_double(zval *arg, double d)
ZEND_API inline int add_next_index_string(zval *arg, char *str, int duplicate)
{
zval *tmp = (zval *) emalloc(sizeof(zval));
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_STRING;
tmp->value.str.len = strlen(str);
if (duplicate) {
@@ -381,8 +490,9 @@ ZEND_API inline int add_next_index_string(zval *arg, char *str, int duplicate)
ZEND_API inline int add_next_index_stringl(zval *arg, char *str, uint length, int duplicate)
{
zval *tmp = (zval *) emalloc(sizeof(zval));
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_STRING;
tmp->value.str.len = length;
if (duplicate) {
@@ -397,8 +507,9 @@ ZEND_API inline int add_next_index_stringl(zval *arg, char *str, uint length, in
ZEND_API inline int add_get_assoc_string(zval *arg, char *key, char *str, void **dest, int duplicate)
{
zval *tmp = (zval *) emalloc(sizeof(zval));
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_STRING;
tmp->value.str.len = strlen(str);
if (duplicate) {
@@ -413,8 +524,9 @@ ZEND_API inline int add_get_assoc_string(zval *arg, char *key, char *str, void *
ZEND_API inline int add_get_assoc_stringl(zval *arg, char *key, char *str, uint length, void **dest, int duplicate)
{
zval *tmp = (zval *) emalloc(sizeof(zval));
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_STRING;
tmp->value.str.len = length;
if (duplicate) {
@@ -429,8 +541,9 @@ ZEND_API inline int add_get_assoc_stringl(zval *arg, char *key, char *str, uint
ZEND_API inline int add_get_index_long(zval *arg, uint index, long l, void **dest)
{
zval *tmp = (zval *) emalloc(sizeof(zval));
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_LONG;
tmp->value.lval = l;
INIT_PZVAL(tmp);
@@ -440,8 +553,9 @@ ZEND_API inline int add_get_index_long(zval *arg, uint index, long l, void **des
ZEND_API inline int add_get_index_double(zval *arg, uint index, double d, void **dest)
{
zval *tmp = (zval *) emalloc(sizeof(zval));
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_DOUBLE;
tmp->value.dval= d;
INIT_PZVAL(tmp);
@@ -451,8 +565,9 @@ ZEND_API inline int add_get_index_double(zval *arg, uint index, double d, void *
ZEND_API inline int add_get_index_string(zval *arg, uint index, char *str, void **dest, int duplicate)
{
zval *tmp = (zval *) emalloc(sizeof(zval));
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_STRING;
tmp->value.str.len = strlen(str);
if (duplicate) {
@@ -467,8 +582,9 @@ ZEND_API inline int add_get_index_string(zval *arg, uint index, char *str, void
ZEND_API inline int add_get_index_stringl(zval *arg, uint index, char *str, uint length, void **dest, int duplicate)
{
zval *tmp = (zval *) emalloc(sizeof(zval));
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_STRING;
tmp->value.str.len = length;
if (duplicate) {
@@ -483,19 +599,53 @@ ZEND_API inline int add_get_index_stringl(zval *arg, uint index, char *str, uint
ZEND_API inline int add_property_long(zval *arg, char *key, long n)
{
zval *tmp = (zval *) emalloc(sizeof(zval));
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_LONG;
tmp->value.lval = n;
INIT_PZVAL(tmp);
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_property_bool(zval *arg, char *key, int b)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_BOOL;
tmp->value.lval = b;
INIT_PZVAL(tmp);
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_property_unset(zval *arg, char *key)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_NULL;
INIT_PZVAL(tmp);
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_property_resource(zval *arg, char *key, long n)
{
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_RESOURCE;
tmp->value.lval = n;
INIT_PZVAL(tmp);
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API inline int add_property_double(zval *arg, char *key, double d)
{
zval *tmp = (zval *) emalloc(sizeof(zval));
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_DOUBLE;
tmp->value.dval = d;
INIT_PZVAL(tmp);
@@ -505,8 +655,9 @@ ZEND_API inline int add_property_double(zval *arg, char *key, double d)
ZEND_API inline int add_property_string(zval *arg, char *key, char *str, int duplicate)
{
zval *tmp = (zval *) emalloc(sizeof(zval));
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_STRING;
tmp->value.str.len = strlen(str);
if (duplicate) {
@@ -521,8 +672,9 @@ ZEND_API inline int add_property_string(zval *arg, char *key, char *str, int dup
ZEND_API inline int add_property_stringl(zval *arg, char *key, char *str, uint length, int duplicate)
{
zval *tmp = (zval *) emalloc(sizeof(zval));
zval *tmp;
ALLOC_ZVAL(tmp);
tmp->type = IS_STRING;
tmp->value.str.len = length;
if (duplicate) {
@@ -535,12 +687,14 @@ ZEND_API inline int add_property_stringl(zval *arg, char *key, char *str, uint l
}
int zend_startup_module(zend_module_entry *module)
ZEND_API int zend_startup_module(zend_module_entry *module)
{
if (module) {
module->module_number = zend_next_free_module();
if (module->module_startup_func) {
if (module->module_startup_func(MODULE_PERSISTENT, module->module_number)==FAILURE) {
ELS_FETCH();
if (module->module_startup_func(MODULE_PERSISTENT, module->module_number ELS_CC)==FAILURE) {
zend_error(E_CORE_ERROR,"Unable to start %s module",module->name);
return FAILURE;
}
@@ -552,50 +706,38 @@ int zend_startup_module(zend_module_entry *module)
}
ZEND_API int _register_list_destructors(void (*list_destructor)(void *), void (*plist_destructor)(void *), int module_number)
{
list_destructors_entry ld;
#if 0
printf("Registering destructors %d for module %d\n", list_destructors.nNextFreeElement, module_number);
#endif
ld.list_destructor=(void (*)(void *)) list_destructor;
ld.plist_destructor=(void (*)(void *)) plist_destructor;
ld.module_number = module_number;
ld.resource_id = list_destructors.nNextFreeElement;
if (zend_hash_next_index_insert(&list_destructors,(void *) &ld,sizeof(list_destructors_entry),NULL)==FAILURE) {
return FAILURE;
}
return list_destructors.nNextFreeElement-1;
}
/* registers all functions in *library_functions in the function hash */
int zend_register_functions(zend_function_entry *functions, HashTable *function_table)
int zend_register_functions(zend_function_entry *functions, HashTable *function_table, int type)
{
zend_function_entry *ptr = functions;
zend_internal_function internal_function;
zend_function function;
zend_internal_function *internal_function = (zend_internal_function *)&function;
int count=0,unload=0;
HashTable *target_function_table = function_table;
int error_type;
CLS_FETCH();
if (type==MODULE_PERSISTENT) {
error_type = E_CORE_WARNING;
} else {
error_type = E_WARNING;
}
if (!target_function_table) {
target_function_table = CG(function_table);
}
internal_function.type = ZEND_INTERNAL_FUNCTION;
internal_function->type = ZEND_INTERNAL_FUNCTION;
while (ptr->fname) {
internal_function.handler = ptr->handler;
internal_function.arg_types = ptr->func_arg_types;
internal_function.function_name = ptr->fname;
if (!internal_function.handler) {
zend_error(E_CORE_WARNING,"Null function defined as active function");
internal_function->handler = ptr->handler;
internal_function->arg_types = ptr->func_arg_types;
internal_function->function_name = ptr->fname;
if (!internal_function->handler) {
zend_error(error_type, "Null function defined as active function");
zend_unregister_functions(functions, count, target_function_table);
return FAILURE;
}
if (zend_hash_add(target_function_table, ptr->fname, strlen(ptr->fname)+1, &internal_function, sizeof(zend_internal_function), NULL) == FAILURE) {
if (zend_hash_add(target_function_table, ptr->fname, strlen(ptr->fname)+1, &function, sizeof(zend_function), NULL) == FAILURE) {
unload=1;
break;
}
@@ -605,7 +747,7 @@ int zend_register_functions(zend_function_entry *functions, HashTable *function_
if (unload) { /* before unloading, display all remaining bad function in the module */
while (ptr->fname) {
if (zend_hash_exists(target_function_table, ptr->fname, strlen(ptr->fname)+1)) {
zend_error(E_CORE_WARNING, "Function registration failed - duplicate name - %s",ptr->fname);
zend_error(error_type, "Function registration failed - duplicate name - %s",ptr->fname);
}
ptr++;
}
@@ -647,7 +789,7 @@ ZEND_API int zend_register_module(zend_module_entry *module)
#if 0
zend_printf("%s: Registering module %d\n",module->name, module->module_number);
#endif
if (module->functions && zend_register_functions(module->functions, NULL)==FAILURE) {
if (module->functions && zend_register_functions(module->functions, NULL, module->type)==FAILURE) {
zend_error(E_CORE_WARNING,"%s: Unable to register functions, unable to load",module->name);
return FAILURE;
}
@@ -659,17 +801,12 @@ ZEND_API int zend_register_module(zend_module_entry *module)
void module_destructor(zend_module_entry *module)
{
if (module->type == MODULE_TEMPORARY) {
zend_hash_apply_with_argument(&list_destructors, (int (*)(void *,void *)) clean_module_resource_destructors, (void *) &(module->module_number));
zend_clean_module_rsrc_dtors(module->module_number);
clean_module_constants(module->module_number);
if (module->request_shutdown_func)
module->request_shutdown_func(module->type, module->module_number);
}
if (module->request_started && module->request_shutdown_func) {
#if 0
zend_printf("%s: Request shutdown\n",module->name);
#endif
module->request_shutdown_func(module->type, module->module_number);
}
module->request_started=0;
if (module->module_started && module->module_shutdown_func) {
#if 0
zend_printf("%s: Module shutdown\n",module->name);
@@ -692,13 +829,17 @@ void module_destructor(zend_module_entry *module)
/* call request startup for all modules */
int module_registry_request_startup(zend_module_entry *module)
{
if (!module->request_started && module->request_startup_func) {
if (module->request_startup_func) {
ELS_FETCH();
#if 0
zend_printf("%s: Request startup\n",module->name);
#endif
module->request_startup_func(module->type, module->module_number);
if (module->request_startup_func(module->type, module->module_number ELS_CC)==FAILURE) {
zend_error(E_WARNING, "request_startup() for %s module failed", module->name);
exit(1);
}
}
module->request_started=1;
return 0;
}
@@ -710,13 +851,12 @@ int module_registry_cleanup(zend_module_entry *module)
{
switch(module->type) {
case MODULE_PERSISTENT:
if (module->request_started && module->request_shutdown_func) {
if (module->request_shutdown_func) {
#if 0
zend_printf("%s: Request shutdown\n",module->name);
#endif
module->request_shutdown_func(module->type, module->module_number);
}
module->request_started=0;
return 0;
break;
case MODULE_TEMPORARY:
@@ -733,8 +873,31 @@ int zend_next_free_module(void)
return ++module_count;
}
/* If parent_ce is not NULL then it inherits from parent_ce
* If parent_ce is NULL and parent_name isn't then it looks for the parent and inherits from it
* If both parent_ce and parent_name are NULL it does a regular class registration
* If parent_name is specified but not found NULL is returned
*/
ZEND_API zend_class_entry *zend_register_internal_class_ex(zend_class_entry *class_entry, zend_class_entry *parent_ce, char *parent_name)
{
zend_class_entry *register_class;
CLS_FETCH();
ZEND_API zend_class_entry *register_internal_class(zend_class_entry *class_entry)
if (!parent_ce && parent_name) {
if (zend_hash_find(CG(class_table), parent_name, strlen(parent_name)+1, (void **) &parent_ce)==FAILURE) {
return NULL;
}
}
register_class = zend_register_internal_class(class_entry);
if (parent_ce) {
do_inheritance(register_class, parent_ce);
}
return register_class;
}
ZEND_API zend_class_entry *zend_register_internal_class(zend_class_entry *class_entry)
{
zend_class_entry *register_class;
char *lowercase_name = zend_strndup(class_entry->name, class_entry->name_length);
@@ -746,15 +909,17 @@ ZEND_API zend_class_entry *register_internal_class(zend_class_entry *class_entry
class_entry->parent = NULL;
class_entry->refcount = (int *) malloc(sizeof(int));
*class_entry->refcount = 1;
zend_hash_init(&class_entry->default_properties, 0, NULL, PVAL_PTR_DTOR, 1);
class_entry->constants_updated = 0;
zend_hash_init(&class_entry->default_properties, 0, NULL, ZVAL_PTR_DTOR, 1);
zend_hash_init(&class_entry->function_table, 0, NULL, ZEND_FUNCTION_DTOR, 1);
if (class_entry->builtin_functions) {
zend_register_functions(class_entry->builtin_functions, &class_entry->function_table, MODULE_PERSISTENT);
}
zend_hash_update(CG(class_table), lowercase_name, class_entry->name_length+1, class_entry, sizeof(zend_class_entry), (void **) &register_class);
free(lowercase_name);
if (class_entry->builtin_functions) {
zend_register_functions(class_entry->builtin_functions, &class_entry->function_table);
}
return register_class;
}
@@ -769,3 +934,51 @@ ZEND_API zend_module_entry *zend_get_module(int module_number)
return NULL;
}
}
ZEND_API int zend_set_hash_symbol(zval *symbol, char *name, int name_length,
int is_ref, int num_symbol_tables, ...)
{
HashTable *symbol_table;
va_list symbol_table_list;
if (num_symbol_tables <= 0) return FAILURE;
symbol->is_ref = is_ref;
va_start(symbol_table_list, num_symbol_tables);
while(num_symbol_tables-- > 0) {
symbol_table = va_arg(symbol_table_list, HashTable *);
zend_hash_update(symbol_table, name, name_length + 1, &symbol, sizeof(zval *), NULL);
zval_add_ref(&symbol);
}
va_end(symbol_table_list);
return SUCCESS;
}
/* Disabled functions support */
static ZEND_FUNCTION(display_disabled_function)
{
zend_error(E_WARNING, "%s() has been disabled for security reasons.", get_active_function_name());
}
static zend_function_entry disabled_function[] = {
ZEND_FE(display_disabled_function, NULL)
{ NULL, NULL, NULL }
};
ZEND_API int zend_disable_function(char *function_name, uint function_name_length)
{
CLS_FETCH();
if (zend_hash_del(CG(function_table), function_name, function_name_length+1)==FAILURE) {
return FAILURE;
}
disabled_function[0].fname = function_name;
return zend_register_functions(disabled_function, CG(function_table), MODULE_PERSISTENT);
}
+259 -71
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -23,13 +23,59 @@
#include "modules.h"
#include "zend_list.h"
#include "zend_fast_cache.h"
#include "zend_operators.h"
#include "zend_variables.h"
#include "zend_execute.h"
#define ZEND_FN(name) zend_if_##name
#define ZEND_NAMED_FUNCTION(name) void name(INTERNAL_FUNCTION_PARAMETERS)
#define ZEND_FUNCTION(name) ZEND_NAMED_FUNCTION(zend_if_##name)
#define ZEND_FUNCTION(name) ZEND_NAMED_FUNCTION(ZEND_FN(name))
#define ZEND_NAMED_FE(zend_name, name, arg_types) { #zend_name, name, arg_types },
#define ZEND_FE(name, arg_types) ZEND_NAMED_FE(name, ZEND_FN(name), arg_types)
#define ZEND_FALIAS(name, alias, arg_types) ZEND_NAMED_FE(name, ZEND_FN(alias), arg_types)
#define ZEND_MINIT(module) zend_minit_##module
#define ZEND_MSHUTDOWN(module) zend_mshutdown_##module
#define ZEND_RINIT(module) zend_rinit_##module
#define ZEND_RSHUTDOWN(module) zend_rshutdown_##module
#define ZEND_MINFO(module) zend_info_##module
#define ZEND_GINIT(module) zend_ginit_##module
#define ZEND_GSHUTDOWN(module) zend_gshutdown_##module
#define ZEND_MINIT_FUNCTION(module) int ZEND_MINIT(module)(INIT_FUNC_ARGS)
#define ZEND_MSHUTDOWN_FUNCTION(module) int ZEND_MSHUTDOWN(module)(SHUTDOWN_FUNC_ARGS)
#define ZEND_RINIT_FUNCTION(module) int ZEND_RINIT(module)(INIT_FUNC_ARGS)
#define ZEND_RSHUTDOWN_FUNCTION(module) int ZEND_RSHUTDOWN(module)(SHUTDOWN_FUNC_ARGS)
#define ZEND_MINFO_FUNCTION(module) void ZEND_MINFO(module)(ZEND_MODULE_INFO_FUNC_ARGS)
#define ZEND_GINIT_FUNCTION(module) int ZEND_GINIT(module)(GINIT_FUNC_ARGS)
#define ZEND_GSHUTDOWN_FUNCTION(module) int ZEND_GSHUTDOWN(module)(void)
#define ZEND_GET_MODULE(name) \
ZEND_DLEXPORT zend_module_entry *get_module(void) { return &name##_module_entry; }
#define ZEND_BEGIN_MODULE_GLOBALS(module_name) \
typedef struct _zend_##module_name##_globals {
#define ZEND_END_MODULE_GLOBALS(module_name) \
} zend_##module_name##_globals;
#ifdef ZTS
#define ZEND_DECLARE_MODULE_GLOBALS(module_name) \
static ts_rsrc_id module_name##_globals_id;
#define ZEND_INIT_MODULE_GLOBALS(module_name, globals_ctor, globals_dtor) \
module_name##_globals_id = ts_allocate_id(sizeof(zend_##module_name##_globals), (ts_allocate_ctor) globals_ctor, (ts_allocate_dtor) globals_dtor);
#else
#define ZEND_DECLARE_MODULE_GLOBALS(module_name) \
static zend_##module_name##_globals module_name##_globals;
#define ZEND_INIT_MODULE_GLOBALS(module_name, globals_ctor, globals_dtor) \
globals_ctor(&module_name##_globals);
#endif
#define ZEND_NAMED_FE(runtime_name, name, arg_types) { #runtime_name, name, arg_types },
#define ZEND_FE(name, arg_types) ZEND_NAMED_FE(name, zend_if_##name, arg_types)
#define INIT_CLASS_ENTRY(class_container, class_name, functions) \
@@ -56,75 +102,149 @@
int zend_next_free_module(void);
ZEND_API int getParameters(int ht, int param_count,...);
ZEND_API int getParametersArray(int ht, int param_count, zval **argument_array);
ZEND_API int getParametersEx(int param_count,...);
ZEND_API int getParametersArrayEx(int param_count, zval ***argument_array);
ZEND_API int zend_get_parameters(int ht, int param_count, ...);
ZEND_API int zend_get_parameters_array(int ht, int param_count, zval **argument_array);
ZEND_API int zend_get_parameters_ex(int param_count, ...);
ZEND_API int zend_get_parameters_array_ex(int param_count, zval ***argument_array);
ZEND_API int ParameterPassedByReference(int ht, uint n);
int zend_register_functions(zend_function_entry *functions, HashTable *function_table);
int zend_register_functions(zend_function_entry *functions, HashTable *function_table, int type);
void zend_unregister_functions(zend_function_entry *functions, int count, HashTable *function_table);
ZEND_API int zend_register_module(zend_module_entry *module_entry);
ZEND_API zend_class_entry *register_internal_class(zend_class_entry *class_entry);
ZEND_API zend_class_entry *zend_register_internal_class(zend_class_entry *class_entry);
ZEND_API zend_class_entry *zend_register_internal_class_ex(zend_class_entry *class_entry, zend_class_entry *parent_ce, char *parent_name);
ZEND_API zend_module_entry *zend_get_module(int module_number);
ZEND_API int zend_disable_function(char *function_name, uint function_name_length);
ZEND_API void wrong_param_count(void);
#define getThis() (this_ptr)
#define WRONG_PARAM_COUNT { wrong_param_count(); return; }
#define WRONG_PARAM_COUNT_WITH_RETVAL(ret) { wrong_param_count(); return ret; }
#define ARG_COUNT(ht) (ht)
#define WRONG_PARAM_COUNT ZEND_WRONG_PARAM_COUNT()
#define WRONG_PARAM_COUNT_WITH_RETVAL(ret) ZEND_WRONG_PARAM_COUNT_WITH_RETVAL(ret)
#define ARG_COUNT(dummy) (ht)
#define ZEND_NUM_ARGS() (ht)
#define ZEND_WRONG_PARAM_COUNT() { wrong_param_count(); return; }
#define ZEND_WRONG_PARAM_COUNT_WITH_RETVAL(ret) { wrong_param_count(); return ret; }
#define BYREF_NONE 0
#define BYREF_FORCE 1
#define BYREF_ALLOW 2
#if !(WIN32||WINNT)
#ifndef ZEND_WIN32
#define DLEXPORT
#endif
int zend_startup_module(zend_module_entry *module);
ZEND_API int zend_startup_module(zend_module_entry *module);
#define array_init(arg) _array_init((arg) ZEND_FILE_LINE_CC)
#define object_init(arg) _object_init((arg) ZEND_FILE_LINE_CC)
#define object_init_ex(arg, ce) _object_init_ex((arg), (ce) ZEND_FILE_LINE_CC)
ZEND_API int _array_init(zval *arg ZEND_FILE_LINE_DC);
ZEND_API int _object_init(zval *arg ZEND_FILE_LINE_DC);
ZEND_API int _object_init_ex(zval *arg, zend_class_entry *ce ZEND_FILE_LINE_DC);
/* no longer supported */
ZEND_API int add_assoc_function(zval *arg, char *key,void (*function_ptr)(INTERNAL_FUNCTION_PARAMETERS));
ZEND_API int array_init(zval *arg);
ZEND_API int object_init(zval *arg);
ZEND_API int object_init_ex(zval *arg, zend_class_entry *ce);
ZEND_API int add_assoc_long(zval *arg, char *key, long n);
ZEND_API int add_assoc_unset(zval *arg, char *key);
ZEND_API int add_assoc_bool(zval *arg, char *key, int b);
ZEND_API int add_assoc_resource(zval *arg, char *key, int r);
ZEND_API int add_assoc_double(zval *arg, char *key, double d);
ZEND_API int add_assoc_string(zval *arg, char *key, char *str, int duplicate);
ZEND_API int add_assoc_stringl(zval *arg, char *key, char *str, uint length, int duplicate);
ZEND_API int add_assoc_function(zval *arg, char *key,void (*function_ptr)(INTERNAL_FUNCTION_PARAMETERS));
ZEND_API int add_index_long(zval *arg, uint idx, long n);
ZEND_API int add_index_unset(zval *arg, uint idx);
ZEND_API int add_index_bool(zval *arg, uint idx, int b);
ZEND_API int add_index_resource(zval *arg, uint idx, int r);
ZEND_API int add_index_double(zval *arg, uint idx, double d);
ZEND_API int add_index_string(zval *arg, uint idx, char *str, int duplicate);
ZEND_API int add_index_stringl(zval *arg, uint idx, char *str, uint length, int duplicate);
ZEND_API int add_next_index_long(zval *arg, long n);
ZEND_API int add_next_index_unset(zval *arg);
ZEND_API int add_next_index_bool(zval *arg, int b);
ZEND_API int add_next_index_resource(zval *arg, int r);
ZEND_API int add_next_index_double(zval *arg, double d);
ZEND_API int add_next_index_string(zval *arg, char *str, int duplicate);
ZEND_API int add_next_index_stringl(zval *arg, char *str, uint length, int duplicate);
ZEND_API int add_get_assoc_string(zval *arg, char *key, char *str, void **dest, int duplicate);
ZEND_API int add_get_assoc_stringl(zval *arg, char *key, char *str, uint length, void **dest, int duplicate);
ZEND_API int add_get_index_long(zval *arg, uint idx, long l, void **dest);
ZEND_API int add_get_index_double(zval *arg, uint idx, double d, void **dest);
ZEND_API int add_get_assoc_string(zval *arg, char *key, char *str, void **dest, int duplicate);
ZEND_API int add_get_assoc_stringl(zval *arg, char *key, char *str, uint length, void **dest, int duplicate);
ZEND_API int add_get_index_string(zval *arg, uint idx, char *str, void **dest, int duplicate);
ZEND_API int add_get_index_stringl(zval *arg, uint idx, char *str, uint length, void **dest, int duplicate);
ZEND_API int call_user_function(HashTable *function_table, zval *object, zval *function_name, zval *retval, int param_count, zval *params[]);
ZEND_API int call_user_function(HashTable *function_table, zval *object, zval *function_name, zval *retval_ptr, int param_count, zval *params[]);
ZEND_API int call_user_function_ex(HashTable *function_table, zval *object, zval *function_name, zval **retval_ptr_ptr, int param_count, zval **params[], int no_separation, HashTable *symbol_table);
ZEND_API int add_property_long(zval *arg, char *key, long l);
ZEND_API int add_property_unset(zval *arg, char *key);
ZEND_API int add_property_bool(zval *arg, char *key, int b);
ZEND_API int add_property_resource(zval *arg, char *key, long r);
ZEND_API int add_property_double(zval *arg, char *key, double d);
ZEND_API int add_property_string(zval *arg, char *key, char *str, int duplicate);
ZEND_API int add_property_stringl(zval *arg, char *key, char *str, uint length, int duplicate);
ZEND_API int zend_set_hash_symbol(zval *symbol, char *name, int name_length,
int is_ref, int num_symbol_tables, ...);
#define add_method(arg,key,method) add_assoc_function((arg),(key),(method))
#define ZVAL_RESOURCE(z,l) { \
(z)->type = IS_RESOURCE; \
(z)->value.lval = l; \
}
#define ZVAL_BOOL(z,b) { \
(z)->type = IS_BOOL; \
(z)->value.lval = b; \
}
#define ZVAL_NULL(z) { \
(z)->type = IS_NULL; \
}
#define ZVAL_LONG(z,l) { \
(z)->type = IS_LONG; \
(z)->value.lval = l; \
}
#define ZVAL_DOUBLE(z,d) { \
(z)->type = IS_DOUBLE; \
(z)->value.dval = d; \
}
#define ZVAL_STRING(z,s,duplicate) { \
char *__s=(s); \
(z)->value.str.len = strlen(__s); \
(z)->value.str.val = (duplicate?estrndup(__s,(z)->value.str.len):__s); \
(z)->type = IS_STRING; \
}
#define ZVAL_STRINGL(z,s,l,duplicate) { \
char *__s=(s); int __l=l; \
(z)->value.str.len = __l; \
(z)->value.str.val = (duplicate?estrndup(__s,__l):__s); \
(z)->type = IS_STRING; \
}
#define ZVAL_EMPTY_STRING(z) { \
(z)->value.str.len = 0; \
(z)->value.str.val = empty_string \
(z)->type = IS_STRING; \
}
#define ZVAL_FALSE { (z)->value.lval = 0; (z)->type = IS_BOOL; }
#define ZVAL_TRUE { (z)->value.lval = 1; (z)->type = IS_BOOL; }
#define RETVAL_RESOURCE(l) { \
return_value->type = IS_RESOURCE;\
return_value->value.lval = l; \
}
#define RETVAL_BOOL(b) { \
return_value->type = IS_BOOL; \
return_value->value.lval = b; \
}
#define RETVAL_NULL() { \
return_value->type = IS_NULL; \
}
#define RETVAL_LONG(l) { \
return_value->type = IS_LONG; \
return_value->value.lval = l; \
@@ -146,6 +266,12 @@ ZEND_API int add_property_stringl(zval *arg, char *key, char *str, uint length,
return_value->type = IS_STRING; \
}
#define RETVAL_EMPTY_STRING() { \
return_value->value.str.len = 0; \
return_value->value.str.val = empty_string \
return_value->type = IS_STRING; \
}
#define RETVAL_FALSE { return_value->value.lval = 0; return_value->type = IS_BOOL; }
#define RETVAL_TRUE { return_value->value.lval = 1; return_value->type = IS_BOOL; }
@@ -154,6 +280,18 @@ ZEND_API int add_property_stringl(zval *arg, char *key, char *str, uint length,
return_value->value.lval = l; \
return; \
}
#define RETURN_BOOL(b) { \
return_value->type = IS_BOOL; \
return_value->value.lval = b; \
return; \
}
#define RETURN_NULL() { \
return_value->type = IS_NULL; \
return; \
}
#define RETURN_LONG(l) { \
return_value->type = IS_LONG; \
return_value->value.lval = l; \
@@ -179,56 +317,106 @@ ZEND_API int add_property_stringl(zval *arg, char *key, char *str, uint length,
return; \
}
#define RETURN_EMPTY_STRING() { \
return_value->value.str.len = 0; \
return_value->value.str.val = empty_string \
return_value->type = IS_STRING; \
return; \
}
#define RETURN_FALSE { RETVAL_FALSE; return; }
#define RETURN_TRUE { RETVAL_TRUE; return; }
#define SET_VAR_STRING(n,v) { \
{ \
zval *var = (zval *) emalloc(sizeof(zval)); \
\
char *str=v; /* prevent 'v' from being evaluated more than once */ \
var->value.str.val = (str); \
var->value.str.len = strlen((str)); \
var->type = IS_STRING; \
INIT_PZVAL(var); \
zend_hash_update(&EG(symbol_table), (n), strlen((n))+1, &var, sizeof(zval *), NULL); \
} \
#define SET_VAR_STRING(n,v) { \
{ \
zval *var; \
char *str=(v); /* prevent 'v' from being evaluated more than once */ \
\
ALLOC_ZVAL(var); \
var->value.str.val = (str); \
var->value.str.len = strlen((str)); \
var->type = IS_STRING; \
ZEND_SET_GLOBAL_VAR(n, var); \
} \
}
#define SET_VAR_STRINGL(n,v,l) { \
{ \
zval *var = (zval *) emalloc(sizeof(zval)); \
\
char *name=(n); \
var->value.str.val = (v); \
var->value.str.len = (l); \
var->type = IS_STRING; \
INIT_PZVAL(var); \
zend_hash_update(&EG(symbol_table), name, strlen(name)+1, &var, sizeof(zval *), NULL); \
} \
#define SET_VAR_STRINGL(n,v,l) { \
{ \
zval *var; \
\
ALLOC_ZVAL(var); \
var->value.str.val = (v); \
var->value.str.len = (l); \
var->type = IS_STRING; \
ZEND_SET_GLOBAL_VAR(n, var); \
} \
}
#define SET_VAR_LONG(n,v) { \
{ \
zval *var = (zval *) emalloc(sizeof(zval)); \
\
var->value.lval = (v); \
var->type = IS_LONG; \
INIT_PZVAL(var); \
zend_hash_update(&EG(symbol_table), (n), strlen((n))+1, &var, sizeof(zval *), NULL); \
} \
#define SET_VAR_LONG(n,v) { \
{ \
zval *var; \
\
ALLOC_ZVAL(var); \
var->value.lval = (v); \
var->type = IS_LONG; \
ZEND_SET_GLOBAL_VAR(n, var); \
} \
}
#define SET_VAR_DOUBLE(n,v) { \
{ \
zval *var = (zval *) emalloc(sizeof(zval)); \
\
var->value.dval = (v); \
var->type = IS_DOUBLE; \
INIT_PZVAL(var); \
zend_hash_update(&EG(symbol_table)), (n), strlen((n))+1, &var, sizeof(zval *), NULL); \
} \
#define SET_VAR_DOUBLE(n,v) { \
{ \
zval *var; \
\
ALLOC_ZVAL(var); \
var->value.dval = (v); \
var->type = IS_DOUBLE; \
ZEND_SET_GLOBAL_VAR(n, var); \
} \
}
#endif /* _ZEND_API_H */
#define ZEND_SET_SYMBOL(symtable, name, var) \
{ \
char *_name = (name); \
\
ZEND_SET_SYMBOL_WITH_LENGTH(symtable, _name, strlen(_name)+1, var, 1, 0); \
}
#define ZEND_SET_SYMBOL_WITH_LENGTH(symtable, name, name_length, var, _refcount, _is_ref) \
{ \
zval **orig_var; \
\
if (zend_hash_find(symtable, (name), (name_length), (void **) &orig_var)==SUCCESS \
&& PZVAL_IS_REF(*orig_var)) { \
(var)->refcount = (*orig_var)->refcount; \
(var)->is_ref = 1; \
\
if (_refcount) { \
(var)->refcount += _refcount-1; \
} \
zval_dtor(*orig_var); \
**orig_var = *(var); \
FREE_ZVAL(var); \
} else { \
(var)->is_ref = _is_ref; \
if (_refcount) { \
(var)->refcount = _refcount; \
} \
zend_hash_update(symtable, (name), (name_length), &(var), sizeof(zval *), NULL); \
} \
}
#define ZEND_SET_GLOBAL_VAR(name, var) \
ZEND_SET_SYMBOL(&EG(symbol_table), name, var)
#define ZEND_SET_GLOBAL_VAR_WITH_LENGTH(name, name_length, var, _refcount, _is_ref) \
ZEND_SET_SYMBOL_WITH_LENGTH(&EG(symbol_table), name, name_length, var, _refcount, _is_ref)
#define HASH_OF(p) ((p)->type==IS_ARRAY ? (p)->value.ht : (((p)->type==IS_OBJECT ? (p)->value.obj.properties : NULL)))
#define ZVAL_IS_NULL(z) ((z)->type==IS_NULL)
#endif /* _ZEND_API_H */
/*
* Local variables:
+220 -132
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -23,18 +23,22 @@
#include "zend.h"
#include "zend_alloc.h"
#include "zend_globals.h"
#if HAVE_SIGNAL_H
#include <signal.h>
#include "zend_fast_cache.h"
#ifdef HAVE_SIGNAL_H
# include <signal.h>
#endif
#if HAVE_UNISTD_H
#include <unistd.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifndef ZTS
static zend_alloc_globals alloc_globals;
ZEND_API zend_alloc_globals alloc_globals;
#endif
#define ZEND_DISABLE_MEMORY_CACHE 0
#if ZEND_DEBUG
# define END_MAGIC_SIZE sizeof(long)
# define END_ALIGNMENT(size) (((size)%PLATFORM_ALIGNMENT)?(PLATFORM_ALIGNMENT-((size)%PLATFORM_ALIGNMENT)):0)
@@ -46,12 +50,12 @@ static zend_alloc_globals alloc_globals;
# if MEMORY_LIMIT
# if ZEND_DEBUG
#define CHECK_MEMORY_LIMIT(s) _CHECK_MEMORY_LIMIT(s,filename,lineno)
#define CHECK_MEMORY_LIMIT(s, rs) _CHECK_MEMORY_LIMIT(s, rs, __zend_filename, __zend_lineno)
# else
#define CHECK_MEMORY_LIMIT(s) _CHECK_MEMORY_LIMIT(s,NULL,0)
#define CHECK_MEMORY_LIMIT(s, rs) _CHECK_MEMORY_LIMIT(s, rs, NULL,0)
# endif
#define _CHECK_MEMORY_LIMIT(s,file,lineno) { AG(allocated_memory) += (s);\
#define _CHECK_MEMORY_LIMIT(s, rs, file, lineno) { AG(allocated_memory) += rs;\
if (AG(memory_limit)<AG(allocated_memory)) {\
if (!file) { \
zend_error(E_ERROR,"Allowed memory size of %d bytes exhausted (tried to allocate %d bytes)", AG(memory_limit),s); \
@@ -63,7 +67,7 @@ static zend_alloc_globals alloc_globals;
# endif
#ifndef CHECK_MEMORY_LIMIT
#define CHECK_MEMORY_LIMIT(s)
#define CHECK_MEMORY_LIMIT(s, rs)
#endif
@@ -93,40 +97,62 @@ static zend_alloc_globals alloc_globals;
} \
AG(head) = p; \
} \
p->pLast = (mem_header *) NULL;
p->pLast = (zend_mem_header *) NULL;
#define DECLARE_CACHE_VARS \
unsigned int real_size; \
unsigned int cache_index;
#define REAL_SIZE(size) ((size+7) & ~0x7)
#if ZEND_DEBUG
ZEND_API void *_emalloc(size_t size, char *filename, uint lineno)
#else
ZEND_API void *_emalloc(size_t size)
#endif
#define CALCULATE_REAL_SIZE_AND_CACHE_INDEX(size) \
real_size = REAL_SIZE(size); \
cache_index = real_size >> 3;
#define SIZE real_size
#define CACHE_INDEX cache_index
ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
mem_header *p;
zend_mem_header *p;
DECLARE_CACHE_VARS
ALS_FETCH();
CALCULATE_REAL_SIZE_AND_CACHE_INDEX(size);
if (!ZEND_DISABLE_MEMORY_CACHE && (CACHE_INDEX < MAX_CACHED_MEMORY) && (AG(cache_count)[CACHE_INDEX] > 0)) {
p = AG(cache)[CACHE_INDEX][--AG(cache_count)[CACHE_INDEX]];
#if ZEND_DEBUG
p->filename = __zend_filename;
p->lineno = __zend_lineno;
p->orig_filename = __zend_orig_filename;
p->orig_lineno = __zend_orig_lineno;
p->magic = MEM_BLOCK_START_MAGIC;
p->reported = 0;
AG(cache_stats)[CACHE_INDEX][1]++;
#endif
p->persistent = 0;
p->cached = 0;
p->size = size;
HANDLE_BLOCK_INTERRUPTIONS();
ADD_POINTER_TO_LIST(p);
HANDLE_UNBLOCK_INTERRUPTIONS();
return (void *)((char *)p + sizeof(zend_mem_header) + PLATFORM_PADDING);
} else {
#if ZEND_DEBUG
if (CACHE_INDEX<MAX_CACHED_MEMORY) {
AG(cache_stats)[CACHE_INDEX][0]++;
}
#endif
p = (zend_mem_header *) malloc(sizeof(zend_mem_header) + SIZE + PLATFORM_PADDING + END_ALIGNMENT(SIZE) + END_MAGIC_SIZE);
}
HANDLE_BLOCK_INTERRUPTIONS();
if ((size < MAX_CACHED_MEMORY) && (AG(cache_count)[size] > 0)) {
p = AG(cache)[size][--AG(cache_count)[size]];
#if ZEND_DEBUG
p->filename = filename;
p->lineno = lineno;
p->magic = MEM_BLOCK_START_MAGIC;
p->reported = 0;
#endif
HANDLE_UNBLOCK_INTERRUPTIONS();
p->persistent = 0;
p->cached = 0;
return (void *)((char *)p + sizeof(mem_header) + PLATFORM_PADDING);
} else {
p = (mem_header *) malloc(sizeof(mem_header) + size + PLATFORM_PADDING + END_ALIGNMENT(size) + END_MAGIC_SIZE);
}
if (!p) {
fprintf(stderr,"FATAL: emalloc(): Unable to allocate %ld bytes\n", (long) size);
#if ZEND_DEBUG && HAVE_KILL && HAVE_GETPID
#if ZEND_DEBUG && defined(HAVE_KILL) && defined(HAVE_GETPID)
kill(getpid(), SIGSEGV);
#else
exit(1);
@@ -136,51 +162,55 @@ ZEND_API void *_emalloc(size_t size)
}
p->persistent = p->cached = 0;
ADD_POINTER_TO_LIST(p);
p->size = size;
p->size = size; /* Save real size for correct cache output */
#if ZEND_DEBUG
p->filename = filename;
p->lineno = lineno;
p->filename = __zend_filename;
p->lineno = __zend_lineno;
p->orig_filename = __zend_orig_filename;
p->orig_lineno = __zend_orig_lineno;
p->magic = MEM_BLOCK_START_MAGIC;
p->reported = 0;
*((long *)(((char *) p) + sizeof(mem_header)+size+PLATFORM_PADDING+END_ALIGNMENT(size))) = MEM_BLOCK_END_MAGIC;
*((long *)(((char *) p) + sizeof(zend_mem_header)+SIZE+PLATFORM_PADDING+END_ALIGNMENT(SIZE))) = MEM_BLOCK_END_MAGIC;
#endif
#if MEMORY_LIMIT
CHECK_MEMORY_LIMIT(size);
CHECK_MEMORY_LIMIT(size, SIZE);
#endif
HANDLE_UNBLOCK_INTERRUPTIONS();
return (void *)((char *)p + sizeof(mem_header) + PLATFORM_PADDING);
return (void *)((char *)p + sizeof(zend_mem_header) + PLATFORM_PADDING);
}
#if ZEND_DEBUG
ZEND_API void _efree(void *ptr, char *filename, uint lineno)
#else
ZEND_API void _efree(void *ptr)
#endif
ZEND_API void _efree(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
mem_header *p = (mem_header *) ((char *)ptr - sizeof(mem_header) - PLATFORM_PADDING);
zend_mem_header *p = (zend_mem_header *) ((char *)ptr - sizeof(zend_mem_header) - PLATFORM_PADDING);
DECLARE_CACHE_VARS
ALS_FETCH();
CALCULATE_REAL_SIZE_AND_CACHE_INDEX(p->size);
#if ZEND_DEBUG
if (!_mem_block_check(ptr, 1, filename, lineno)) {
if (!_mem_block_check(ptr, 1 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC)) {
return;
}
memset(ptr, 0x5a, p->size);
memset(ptr, 0x5a, SIZE);
#endif
if (!p->persistent && (p->size < MAX_CACHED_MEMORY) && (AG(cache_count)[p->size] < MAX_CACHED_ENTRIES)) {
AG(cache)[p->size][AG(cache_count)[p->size]++] = p;
if (!ZEND_DISABLE_MEMORY_CACHE
&& !p->persistent && (CACHE_INDEX < MAX_CACHED_MEMORY) && (AG(cache_count)[CACHE_INDEX] < MAX_CACHED_ENTRIES)) {
AG(cache)[CACHE_INDEX][AG(cache_count)[CACHE_INDEX]++] = p;
p->cached = 1;
#if ZEND_DEBUG
p->magic = MEM_BLOCK_CACHED_MAGIC;
#endif
HANDLE_BLOCK_INTERRUPTIONS();
REMOVE_POINTER_FROM_LIST(p);
HANDLE_UNBLOCK_INTERRUPTIONS();
return;
}
HANDLE_BLOCK_INTERRUPTIONS();
REMOVE_POINTER_FROM_LIST(p);
#if MEMORY_LIMIT
AG(allocated_memory) -= p->size;
AG(allocated_memory) -= SIZE;
#endif
free(p);
@@ -188,51 +218,39 @@ ZEND_API void _efree(void *ptr)
}
#if ZEND_DEBUG
ZEND_API void *_ecalloc(size_t nmemb, size_t size, char *filename, uint lineno)
#else
ZEND_API void *_ecalloc(size_t nmemb, size_t size)
#endif
ZEND_API void *_ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
void *p;
int final_size=size*nmemb;
HANDLE_BLOCK_INTERRUPTIONS();
#if ZEND_DEBUG
p = _emalloc(final_size,filename,lineno);
#else
p = emalloc(final_size);
#endif
p = _emalloc(final_size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
if (!p) {
HANDLE_UNBLOCK_INTERRUPTIONS();
return (void *) p;
}
memset(p,(int)NULL,final_size);
memset(p,(int)NULL, final_size);
HANDLE_UNBLOCK_INTERRUPTIONS();
return p;
}
#if ZEND_DEBUG
ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure, char *filename, uint lineno)
#else
ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure)
#endif
ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
mem_header *p = (mem_header *) ((char *)ptr-sizeof(mem_header)-PLATFORM_PADDING);
mem_header *orig = p;
zend_mem_header *p = (zend_mem_header *) ((char *)ptr-sizeof(zend_mem_header)-PLATFORM_PADDING);
zend_mem_header *orig = p;
DECLARE_CACHE_VARS
ALS_FETCH();
if (!ptr) {
#if ZEND_DEBUG
return _emalloc(size, filename, lineno);
#else
return emalloc(size);
#endif
return _emalloc(size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
}
CALCULATE_REAL_SIZE_AND_CACHE_INDEX(size);
HANDLE_BLOCK_INTERRUPTIONS();
REMOVE_POINTER_FROM_LIST(p);
p = (mem_header *) realloc(p,sizeof(mem_header)+size+PLATFORM_PADDING+END_ALIGNMENT(size)+END_MAGIC_SIZE);
p = (zend_mem_header *) realloc(p,sizeof(zend_mem_header)+SIZE+PLATFORM_PADDING+END_ALIGNMENT(SIZE)+END_MAGIC_SIZE);
if (!p) {
if (!allow_failure) {
fprintf(stderr,"FATAL: erealloc(): Unable to allocate %ld bytes\n", (long) size);
@@ -248,37 +266,29 @@ ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure)
}
ADD_POINTER_TO_LIST(p);
#if ZEND_DEBUG
p->filename = filename;
p->lineno = lineno;
p->filename = __zend_filename;
p->lineno = __zend_lineno;
p->magic = MEM_BLOCK_START_MAGIC;
*((long *)(((char *) p) + sizeof(mem_header)+size+PLATFORM_PADDING+END_ALIGNMENT(size))) = MEM_BLOCK_END_MAGIC;
*((long *)(((char *) p) + sizeof(zend_mem_header)+SIZE+PLATFORM_PADDING+END_ALIGNMENT(SIZE))) = MEM_BLOCK_END_MAGIC;
#endif
#if MEMORY_LIMIT
CHECK_MEMORY_LIMIT(size - p->size);
CHECK_MEMORY_LIMIT(size - p->size, SIZE - REAL_SIZE(p->size));
#endif
p->size = size;
HANDLE_UNBLOCK_INTERRUPTIONS();
return (void *)((char *)p+sizeof(mem_header)+PLATFORM_PADDING);
return (void *)((char *)p+sizeof(zend_mem_header)+PLATFORM_PADDING);
}
#if ZEND_DEBUG
ZEND_API char *_estrdup(const char *s, char *filename, uint lineno)
#else
ZEND_API char *_estrdup(const char *s)
#endif
ZEND_API char *_estrdup(const char *s ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
int length;
char *p;
length = strlen(s)+1;
HANDLE_BLOCK_INTERRUPTIONS();
#if ZEND_DEBUG
p = (char *) _emalloc(length,filename,lineno);
#else
p = (char *) emalloc(length);
#endif
p = (char *) _emalloc(length ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
if (!p) {
HANDLE_UNBLOCK_INTERRUPTIONS();
return (char *)NULL;
@@ -289,20 +299,12 @@ ZEND_API char *_estrdup(const char *s)
}
#if ZEND_DEBUG
ZEND_API char *_estrndup(const char *s, uint length, char *filename, uint lineno)
#else
ZEND_API char *_estrndup(const char *s, uint length)
#endif
ZEND_API char *_estrndup(const char *s, uint length ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
char *p;
HANDLE_BLOCK_INTERRUPTIONS();
#if ZEND_DEBUG
p = (char *) _emalloc(length+1,filename,lineno);
#else
p = (char *) emalloc(length+1);
#endif
p = (char *) _emalloc(length+1 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
if (!p) {
HANDLE_UNBLOCK_INTERRUPTIONS();
return (char *)NULL;
@@ -343,9 +345,12 @@ ZEND_API int zend_set_memory_limit(unsigned int memory_limit)
}
ZEND_API void start_memory_manager(void)
ZEND_API void start_memory_manager(ALS_D)
{
ALS_FETCH();
#ifndef ZTS
int i, j;
void *cached_entries[MAX_CACHED_MEMORY][MAX_CACHED_ENTRIES];
#endif
AG(phead) = AG(head) = NULL;
@@ -355,25 +360,60 @@ ZEND_API void start_memory_manager(void)
AG(memory_exhausted)=0;
#endif
memset(AG(cache_count),0,MAX_CACHED_MEMORY*sizeof(unsigned char));
memset(AG(fast_cache_list_head), 0, sizeof(AG(fast_cache_list_head)));
memset(AG(cache_count),0,sizeof(AG(cache_count)));
#ifndef ZTS
/* Initialize cache, to prevent fragmentation */
/* We can't do this in ZTS mode, because calling emalloc() from within start_memory_manager()
* will yield an endless recursion calling to alloc_globals_ctor()
*/
for (i=1; i<MAX_CACHED_MEMORY; i++) {
for (j=0; j<PRE_INIT_CACHE_ENTRIES; j++) {
cached_entries[i][j] = emalloc(8*i);
}
}
for (i=1; i<MAX_CACHED_MEMORY; i++) {
for (j=0; j<PRE_INIT_CACHE_ENTRIES; j++) {
efree(cached_entries[i][j]);
}
}
#endif
#if ZEND_DEBUG
memset(AG(cache_stats), 0, sizeof(AG(cache_stats)));
memset(AG(fast_cache_stats), 0, sizeof(AG(fast_cache_stats)));
#endif
}
ZEND_API void shutdown_memory_manager(int silent, int clean_cache)
{
mem_header *p, *t;
#ifdef ZEND_DEBUG
zend_mem_header *p, *t;
unsigned int fci, i, j;
#if ZEND_DEBUG
int had_leaks=0;
#endif
zend_fast_cache_list_entry *fast_cache_list_entry, *next_fast_cache_list_entry;
ALS_FETCH();
for (fci=0; fci<MAX_FAST_CACHE_TYPES; fci++) {
fast_cache_list_entry = AG(fast_cache_list_head)[fci];
while (fast_cache_list_entry) {
next_fast_cache_list_entry = fast_cache_list_entry->next;
efree(fast_cache_list_entry);
fast_cache_list_entry = next_fast_cache_list_entry;
}
AG(fast_cache_list_head)[fci] = NULL;
}
p=AG(head);
t=AG(head);
while (t) {
if (!t->cached || clean_cache) {
#if ZEND_DEBUG
if (!t->cached && !t->reported) {
mem_header *iterator;
zend_mem_header *iterator;
int total_leak=0, total_leak_count=0;
had_leaks=1;
@@ -403,6 +443,54 @@ ZEND_API void shutdown_memory_manager(int silent, int clean_cache)
t = t->pNext;
}
}
if(clean_cache) {
for (i=1; i<MAX_CACHED_MEMORY; i++) {
for (j=0; j<AG(cache_count)[i]; j++) {
free(AG(cache)[i][j]);
}
}
}
#if (ZEND_DEBUG)
do {
zval display_memory_cache_stats;
int i, j;
if (clean_cache) {
/* we're shutting down completely, don't even touch the INI subsystem */
break;
}
if (zend_get_ini_entry("display_memory_cache_stats", sizeof("display_memory_cache_stats"), &display_memory_cache_stats)==FAILURE) {
break;
}
if (!atoi(display_memory_cache_stats.value.str.val)) {
break;
}
fprintf(stderr, "Memory cache statistics\n"
"-----------------------\n\n"
"[zval, %2ld]\t\t%d / %d (%.2f%%)\n"
"[hash, %2ld]\t\t%d / %d (%.2f%%)\n",
(long) sizeof(zval),
AG(fast_cache_stats)[ZVAL_CACHE_LIST][1], AG(fast_cache_stats)[ZVAL_CACHE_LIST][0]+AG(fast_cache_stats)[ZVAL_CACHE_LIST][1],
((double) AG(fast_cache_stats)[ZVAL_CACHE_LIST][1] / (AG(fast_cache_stats)[ZVAL_CACHE_LIST][0]+AG(fast_cache_stats)[ZVAL_CACHE_LIST][1]))*100,
(long) sizeof(HashTable),
AG(fast_cache_stats)[HASHTABLE_CACHE_LIST][1], AG(fast_cache_stats)[HASHTABLE_CACHE_LIST][0]+AG(fast_cache_stats)[HASHTABLE_CACHE_LIST][1],
((double) AG(fast_cache_stats)[HASHTABLE_CACHE_LIST][1] / (AG(fast_cache_stats)[HASHTABLE_CACHE_LIST][0]+AG(fast_cache_stats)[HASHTABLE_CACHE_LIST][1]))*100);
for (i=0; i<MAX_CACHED_MEMORY; i+=2) {
fprintf(stderr, "[%2d, %2d]\t\t", i, i+1);
for (j=0; j<2; j++) {
fprintf(stderr, "%d / %d (%.2f%%)\t\t",
AG(cache_stats)[i+j][1], AG(cache_stats)[i+j][0]+AG(cache_stats)[i+j][1],
((double) AG(cache_stats)[i+j][1] / (AG(cache_stats)[i+j][0]+AG(cache_stats)[i+j][1]))*100);
}
fprintf(stderr, "\n");
}
} while (0);
#endif
}
@@ -416,7 +504,7 @@ void zend_debug_alloc_output(char *format, ...)
vsprintf(output_buf, format, args);
va_end(args);
#if WIN32||WINNT
#ifdef ZEND_WIN32
OutputDebugString(output_buf);
#else
fprintf(stderr, output_buf);
@@ -424,9 +512,9 @@ void zend_debug_alloc_output(char *format, ...)
}
ZEND_API int _mem_block_check(void *ptr, int silent, char *filename, int lineno)
ZEND_API int _mem_block_check(void *ptr, int silent ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
mem_header *p = (mem_header *) ((char *)ptr - sizeof(mem_header) - PLATFORM_PADDING);
zend_mem_header *p = (zend_mem_header *) ((char *)ptr - sizeof(zend_mem_header) - PLATFORM_PADDING);
int no_cache_notice=0;
int valid_beginning=1;
int had_problems=0;
@@ -442,7 +530,10 @@ ZEND_API int _mem_block_check(void *ptr, int silent, char *filename, int lineno)
if (!silent) {
zend_message_dispatcher(ZMSG_LOG_SCRIPT_NAME, NULL);
zend_debug_alloc_output("---------------------------------------\n");
zend_debug_alloc_output("%s(%d) : Block 0x%0.8lX status:\n", filename, lineno, (long) p);
zend_debug_alloc_output("%s(%d) : Block 0x%0.8lX status:\n" ZEND_FILE_LINE_RELAY_CC, (long) p);
if (__zend_orig_filename) {
zend_debug_alloc_output("%s(%d) : Actual location (location was relayed)\n" ZEND_FILE_LINE_ORIG_RELAY_CC);
}
zend_debug_alloc_output("%10s\t","Beginning: ");
}
@@ -457,7 +548,7 @@ ZEND_API int _mem_block_check(void *ptr, int silent, char *filename, int lineno)
zend_debug_alloc_output("Freed\n");
had_problems=1;
} else {
return _mem_block_check(ptr, 0, filename, lineno);
return _mem_block_check(ptr, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
}
break;
case MEM_BLOCK_CACHED_MAGIC:
@@ -468,7 +559,7 @@ ZEND_API int _mem_block_check(void *ptr, int silent, char *filename, int lineno)
}
} else {
if (!no_cache_notice) {
return _mem_block_check(ptr, 0, filename, lineno);
return _mem_block_check(ptr, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
}
}
break;
@@ -476,7 +567,7 @@ ZEND_API int _mem_block_check(void *ptr, int silent, char *filename, int lineno)
if (!silent) {
zend_debug_alloc_output("Overrun (magic=0x%0.8lX, expected=0x%0.8lX)\n", p->magic, MEM_BLOCK_START_MAGIC);
} else {
return _mem_block_check(ptr, 0, filename, lineno);
return _mem_block_check(ptr, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
}
had_problems=1;
valid_beginning=0;
@@ -485,17 +576,17 @@ ZEND_API int _mem_block_check(void *ptr, int silent, char *filename, int lineno)
if (valid_beginning
&& *((long *)(((char *) p)+sizeof(mem_header)+p->size+PLATFORM_PADDING+END_ALIGNMENT(p->size))) != MEM_BLOCK_END_MAGIC) {
&& *((long *)(((char *) p)+sizeof(zend_mem_header)+REAL_SIZE(p->size)+PLATFORM_PADDING+END_ALIGNMENT(REAL_SIZE(p->size)))) != MEM_BLOCK_END_MAGIC) {
long magic_num = MEM_BLOCK_END_MAGIC;
char *overflow_ptr, *magic_ptr=(char *) &magic_num;
int overflows=0;
int i;
if (silent) {
return _mem_block_check(ptr, 0, filename, lineno);
return _mem_block_check(ptr, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
}
had_problems=1;
overflow_ptr = ((char *) p)+sizeof(mem_header)+p->size+PLATFORM_PADDING;
overflow_ptr = ((char *) p)+sizeof(zend_mem_header)+REAL_SIZE(p->size)+PLATFORM_PADDING;
for (i=0; i<sizeof(long); i++) {
if (overflow_ptr[i]!=magic_ptr[i]) {
@@ -505,7 +596,7 @@ ZEND_API int _mem_block_check(void *ptr, int silent, char *filename, int lineno)
zend_debug_alloc_output("%10s\t", "End:");
zend_debug_alloc_output("Overflown (magic=0x%0.8lX instead of 0x%0.8lX)\n",
*((long *)(((char *) p) + sizeof(mem_header)+p->size+PLATFORM_PADDING+END_ALIGNMENT(p->size))), MEM_BLOCK_END_MAGIC);
*((long *)(((char *) p) + sizeof(zend_mem_header)+REAL_SIZE(p->size)+PLATFORM_PADDING+END_ALIGNMENT(REAL_SIZE(p->size)))), MEM_BLOCK_END_MAGIC);
zend_debug_alloc_output("%10s\t","");
if (overflows>=sizeof(long)) {
zend_debug_alloc_output("At least %d bytes overflown\n", sizeof(long));
@@ -534,9 +625,9 @@ ZEND_API int _mem_block_check(void *ptr, int silent, char *filename, int lineno)
}
ZEND_API void _full_mem_check(int silent, char *filename, uint lineno)
ZEND_API void _full_mem_check(int silent ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
mem_header *p;
zend_mem_header *p;
int errors=0;
ALS_FETCH();
@@ -544,31 +635,27 @@ ZEND_API void _full_mem_check(int silent, char *filename, uint lineno)
zend_debug_alloc_output("------------------------------------------------\n");
zend_debug_alloc_output("Full Memory Check at %s:%d\n", filename, lineno);
zend_debug_alloc_output("Full Memory Check at %s:%d\n" ZEND_FILE_LINE_RELAY_CC);
while (p) {
if (!_mem_block_check((void *)((char *)p + sizeof(mem_header) + PLATFORM_PADDING), (silent?2:3), filename, lineno)) {
if (!_mem_block_check((void *)((char *)p + sizeof(zend_mem_header) + PLATFORM_PADDING), (silent?2:3) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC)) {
errors++;
}
p = p->pNext;
}
zend_debug_alloc_output("End of full memory check %s:%d (%d errors)\n", filename, lineno, errors);
zend_debug_alloc_output("End of full memory check %s:%d (%d errors)\n" ZEND_FILE_LINE_RELAY_CC, errors);
zend_debug_alloc_output("------------------------------------------------\n");
}
#endif
#if ZEND_DEBUG
ZEND_API void _persist_alloc(void *ptr, char *filename, uint lineno)
#else
ZEND_API void _persist_alloc(void *ptr)
#endif
ZEND_API int _persist_alloc(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
mem_header *p = (mem_header *) ((char *)ptr-sizeof(mem_header)-PLATFORM_PADDING);
zend_mem_header *p = (zend_mem_header *) ((char *)ptr-sizeof(zend_mem_header)-PLATFORM_PADDING);
ALS_FETCH();
#if ZEND_DEBUG
_mem_block_check(ptr, 1, filename, lineno);
_mem_block_check(ptr, 1 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
#endif
HANDLE_BLOCK_INTERRUPTIONS();
@@ -581,6 +668,7 @@ ZEND_API void _persist_alloc(void *ptr)
/* add the block to the persistent list */
ADD_POINTER_TO_LIST(p);
HANDLE_UNBLOCK_INTERRUPTIONS();
return REAL_SIZE(p->size)+sizeof(zend_mem_header)+PLATFORM_PADDING;
}
+55 -50
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -23,24 +23,28 @@
#include <stdio.h>
#include "zend_globals_macros.h"
#define MEM_BLOCK_START_MAGIC 0x7312F8DCL
#define MEM_BLOCK_END_MAGIC 0x2A8FCC84L
#define MEM_BLOCK_END_MAGIC 0x2A8FCC84L
#define MEM_BLOCK_FREED_MAGIC 0x99954317L
#define MEM_BLOCK_CACHED_MAGIC 0xFB8277DCL
typedef struct _mem_header {
typedef struct _zend_mem_header {
#if ZEND_DEBUG
long magic;
char *filename;
uint lineno;
int reported;
char *orig_filename;
uint orig_lineno;
#endif
struct _mem_header *pNext;
struct _mem_header *pLast;
struct _zend_mem_header *pNext;
struct _zend_mem_header *pLast;
unsigned int size:30;
unsigned int persistent:1;
unsigned int cached:1;
} mem_header;
} zend_mem_header;
typedef union _align_test {
void *ptr;
@@ -48,50 +52,51 @@ typedef union _align_test {
long lng;
} align_test;
#define MAX_CACHED_MEMORY 64
#define MAX_CACHED_ENTRIES 16
#define MAX_CACHED_MEMORY 11
#define MAX_CACHED_ENTRIES 256
#define PRE_INIT_CACHE_ENTRIES 32
#if (defined (__GNUC__) && __GNUC__ >= 2)
#define PLATFORM_ALIGNMENT (__alignof__ (align_test))
#else
#define PLATFORM_ALIGNMENT (sizeof(align_test))
#define PLATFORM_PADDING (((PLATFORM_ALIGNMENT-sizeof(mem_header))%PLATFORM_ALIGNMENT+PLATFORM_ALIGNMENT)%PLATFORM_ALIGNMENT)
#endif
#define PLATFORM_PADDING (((PLATFORM_ALIGNMENT-sizeof(zend_mem_header))%PLATFORM_ALIGNMENT+PLATFORM_ALIGNMENT)%PLATFORM_ALIGNMENT)
ZEND_API char *zend_strndup(const char *s, unsigned int length);
BEGIN_EXTERN_C()
#if ZEND_DEBUG
ZEND_API void *_emalloc(size_t size, char *filename, uint lineno);
ZEND_API void _efree(void *ptr, char *filename, uint lineno);
ZEND_API void *_ecalloc(size_t nmemb, size_t size, char *filename, uint lineno);
ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure, char *filename, uint lineno);
ZEND_API char *_estrdup(const char *s, char *filename, uint lineno);
ZEND_API char *_estrndup(const char *s, unsigned int length, char *filename, uint lineno);
ZEND_API void _persist_alloc(void *ptr, char *filename, uint lineno);
#define emalloc(size) _emalloc((size),__FILE__,__LINE__)
#define efree(ptr) _efree((ptr),__FILE__,__LINE__)
#define ecalloc(nmemb,size) _ecalloc((nmemb),(size),__FILE__,__LINE__)
#define erealloc(ptr,size) _erealloc((ptr),(size),0,__FILE__,__LINE__)
#define erealloc_recoverable(ptr,size) _erealloc((ptr),(size),1,__FILE__,__LINE__)
#define estrdup(s) _estrdup((s),__FILE__,__LINE__)
#define estrndup(s,length) _estrndup((s),(length),__FILE__,__LINE__)
#define persist_alloc(p) _persist_alloc((p),__FILE__,__LINE__)
#else
ZEND_API void *_emalloc(size_t size);
ZEND_API void _efree(void *ptr);
ZEND_API void *_ecalloc(size_t nmemb, size_t size);
ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure);
ZEND_API char *_estrdup(const char *s);
ZEND_API char *_estrndup(const char *s, unsigned int length);
ZEND_API void _persist_alloc(void *ptr);
#define emalloc(size) _emalloc((size))
#define efree(ptr) _efree((ptr))
#define ecalloc(nmemb,size) _ecalloc((nmemb),(size))
#define erealloc(ptr,size) _erealloc((ptr),(size),0)
#define erealloc_recoverable(ptr,size) _erealloc((ptr),(size),1)
#define estrdup(s) _estrdup((s))
#define estrndup(s,length) _estrndup((s),(length))
#define persist_alloc(p) _persist_alloc((p))
#endif
ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
ZEND_API void _efree(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
ZEND_API void *_ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
ZEND_API char *_estrdup(const char *s ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
ZEND_API char *_estrndup(const char *s, unsigned int length ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
ZEND_API int _persist_alloc(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
/* Standard wrapper macros */
#define emalloc(size) _emalloc((size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
#define efree(ptr) _efree((ptr) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
#define ecalloc(nmemb,size) _ecalloc((nmemb), (size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
#define erealloc(ptr,size) _erealloc((ptr), (size),0 ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
#define erealloc_recoverable(ptr,size) _erealloc((ptr), (size),1 ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
#define estrdup(s) _estrdup((s) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
#define estrndup(s,length) _estrndup((s), (length) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
#define persist_alloc(p) _persist_alloc((p) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
/* Relay wrapper macros */
#define emalloc_rel(size) _emalloc((size) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
#define efree_rel(ptr) _efree((ptr) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
#define ecalloc_rel(nmemb, size) _ecalloc((nmemb), (size) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
#define erealloc_rel(ptr, size) _erealloc((ptr), (size), 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
#define erealloc_recoverable_rel(ptr, size) _erealloc((ptr), (size), 1 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
#define estrdup_rel(s) _estrdup((s) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
#define estrndup_rel(s, length) _estrndup((s), (length) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
#define persist_alloc_rel(p) _persist_alloc((p) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
/* Selective persistent/non persistent allocation macros */
#define pemalloc(size,persistent) ((persistent)?malloc(size):emalloc(size))
#define pefree(ptr,persistent) ((persistent)?free(ptr):efree(ptr))
#define pecalloc(nmemb,size,persistent) ((persistent)?calloc((nmemb),(size)):ecalloc((nmemb),(size)))
@@ -104,15 +109,15 @@ ZEND_API void _persist_alloc(void *ptr);
ZEND_API int zend_set_memory_limit(unsigned int memory_limit);
ZEND_API void start_memory_manager(void);
ZEND_API void start_memory_manager(ALS_D);
ZEND_API void shutdown_memory_manager(int silent, int clean_cache);
#if ZEND_DEBUG
ZEND_API int _mem_block_check(void *ptr, int silent, char *filename, int lineno);
ZEND_API void _full_mem_check(int silent, char *filename, uint lineno);
#define mem_block_check(ptr, silent) _mem_block_check(ptr, silent, __FILE__, __LINE__)
#define mem_block_check(ptr, silent) _mem_block_check(ptr, silent, __FILE__, __LINE__)
#define full_mem_check(silent) _full_mem_check(silent, __FILE__, __LINE__)
ZEND_API int _mem_block_check(void *ptr, int silent ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
ZEND_API void _full_mem_check(int silent ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
void zend_debug_alloc_output(char *format, ...);
#define mem_block_check(ptr, silent) _mem_block_check(ptr, silent ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
#define full_mem_check(silent) _full_mem_check(silent ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
#else
#define mem_block_check(type, ptr, silent)
#define full_mem_check(silent)
+899
View File
@@ -0,0 +1,899 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include "zend.h"
#include "zend_API.h"
#include "zend_builtin_functions.h"
#include "zend_constants.h"
#undef ZEND_TEST_EXCEPTIONS
static ZEND_FUNCTION(zend_version);
static ZEND_FUNCTION(func_num_args);
static ZEND_FUNCTION(func_get_arg);
static ZEND_FUNCTION(func_get_args);
static ZEND_FUNCTION(strlen);
static ZEND_FUNCTION(strcmp);
static ZEND_FUNCTION(strncmp);
static ZEND_FUNCTION(strcasecmp);
static ZEND_FUNCTION(each);
static ZEND_FUNCTION(error_reporting);
static ZEND_FUNCTION(define);
static ZEND_FUNCTION(defined);
static ZEND_FUNCTION(get_class);
static ZEND_FUNCTION(get_parent_class);
static ZEND_FUNCTION(method_exists);
static ZEND_FUNCTION(class_exists);
static ZEND_FUNCTION(function_exists);
static ZEND_FUNCTION(leak);
#ifdef ZEND_TEST_EXCEPTIONS
static ZEND_FUNCTION(crash);
#endif
static ZEND_FUNCTION(get_required_files);
static ZEND_FUNCTION(get_included_files);
static ZEND_FUNCTION(is_subclass_of);
static ZEND_FUNCTION(get_class_vars);
static ZEND_FUNCTION(get_object_vars);
static ZEND_FUNCTION(get_class_methods);
static ZEND_FUNCTION(trigger_error);
static ZEND_FUNCTION(set_error_handler);
static ZEND_FUNCTION(restore_error_handler);
static ZEND_FUNCTION(get_declared_classes);
static ZEND_FUNCTION(create_function);
#if ZEND_DEBUG
static ZEND_FUNCTION(zend_test_func);
#endif
unsigned char first_arg_force_ref[] = { 1, BYREF_FORCE };
unsigned char first_arg_allow_ref[] = { 1, BYREF_ALLOW };
unsigned char second_arg_force_ref[] = { 2, BYREF_NONE, BYREF_FORCE };
unsigned char second_arg_allow_ref[] = { 2, BYREF_NONE, BYREF_ALLOW };
static zend_function_entry builtin_functions[] = {
ZEND_FE(zend_version, NULL)
ZEND_FE(func_num_args, NULL)
ZEND_FE(func_get_arg, NULL)
ZEND_FE(func_get_args, NULL)
ZEND_FE(strlen, NULL)
ZEND_FE(strcmp, NULL)
ZEND_FE(strncmp, NULL)
ZEND_FE(strcasecmp, NULL)
ZEND_FE(each, first_arg_force_ref)
ZEND_FE(error_reporting, NULL)
ZEND_FE(define, NULL)
ZEND_FE(defined, NULL)
ZEND_FE(get_class, NULL)
ZEND_FE(get_parent_class, NULL)
ZEND_FE(method_exists, NULL)
ZEND_FE(class_exists, NULL)
ZEND_FE(function_exists, NULL)
ZEND_FE(leak, NULL)
#ifdef ZEND_TEST_EXCEPTIONS
ZEND_FE(crash, NULL)
#endif
ZEND_FE(get_required_files, NULL)
ZEND_FE(get_included_files, NULL)
ZEND_FE(is_subclass_of, NULL)
ZEND_FE(get_class_vars, NULL)
ZEND_FE(get_object_vars, NULL)
ZEND_FE(get_class_methods, NULL)
ZEND_FE(trigger_error, NULL)
ZEND_FALIAS(user_error, trigger_error, NULL)
ZEND_FE(set_error_handler, NULL)
ZEND_FE(restore_error_handler, NULL)
ZEND_FE(get_declared_classes, NULL)
ZEND_FE(create_function, NULL)
#if ZEND_DEBUG
ZEND_FE(zend_test_func, NULL)
#endif
{ NULL, NULL, NULL }
};
int zend_startup_builtin_functions()
{
return zend_register_functions(builtin_functions, NULL, MODULE_PERSISTENT);
}
ZEND_FUNCTION(zend_version)
{
RETURN_STRINGL(ZEND_VERSION, sizeof(ZEND_VERSION)-1, 1);
}
ZEND_FUNCTION(func_num_args)
{
void **p;
int arg_count;
p = EG(argument_stack).top_element-1-1;
arg_count = (ulong) *p; /* this is the amount of arguments passed to func_num_args(); */
p -= 1+arg_count;
if (*p) {
zend_error(E_ERROR, "func_num_args(): Can't be used as a function parameter");
}
--p;
if (p>=EG(argument_stack).elements) {
RETURN_LONG((ulong) *p);
} else {
zend_error(E_WARNING, "func_num_args(): Called from the global scope - no function context");
RETURN_LONG(-1);
}
}
ZEND_FUNCTION(func_get_arg)
{
void **p;
int arg_count;
zval **z_requested_offset;
zval *arg;
long requested_offset;
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &z_requested_offset)==FAILURE) {
RETURN_FALSE;
}
convert_to_long_ex(z_requested_offset);
requested_offset = (*z_requested_offset)->value.lval;
p = EG(argument_stack).top_element-1-1;
arg_count = (ulong) *p; /* this is the amount of arguments passed to func_get_arg(); */
p -= 1+arg_count;
if (*p) {
zend_error(E_ERROR, "func_get_arg(): Can't be used as a function parameter");
}
--p;
if (p<EG(argument_stack).elements) {
zend_error(E_WARNING, "func_get_arg(): Called from the global scope - no function context");
RETURN_FALSE;
}
arg_count = (ulong) *p;
if (requested_offset>=arg_count) {
zend_error(E_WARNING, "func_get_arg(): Argument %d not passed to function", requested_offset);
RETURN_FALSE;
}
arg = *(p-(arg_count-requested_offset));
*return_value = *arg;
zval_copy_ctor(return_value);
}
ZEND_FUNCTION(func_get_args)
{
void **p;
int arg_count;
int i;
p = EG(argument_stack).top_element-1-1;
arg_count = (ulong) *p; /* this is the amount of arguments passed to func_get_args(); */
p -= 1+arg_count;
if (*p) {
zend_error(E_ERROR, "func_get_args(): Can't be used as a function parameter");
}
--p;
if (p<EG(argument_stack).elements) {
zend_error(E_WARNING, "func_get_args(): Called from the global scope - no function context");
RETURN_FALSE;
}
arg_count = (ulong) *p;
array_init(return_value);
for (i=0; i<arg_count; i++) {
zval *element;
ALLOC_ZVAL(element);
*element = **((zval **) (p-(arg_count-i)));
zval_copy_ctor(element);
INIT_PZVAL(element);
zend_hash_next_index_insert(return_value->value.ht, &element, sizeof(zval *), NULL);
}
}
/* {{{ proto int strlen(string str)
Get string length */
ZEND_FUNCTION(strlen)
{
zval **str;
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(str);
RETVAL_LONG((*str)->value.str.len);
}
/* }}} */
/* {{{ proto int strcmp(string str1, string str2)
Binary safe string comparison */
ZEND_FUNCTION(strcmp)
{
zval **s1, **s2;
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &s1, &s2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(s1);
convert_to_string_ex(s2);
RETURN_LONG(zend_binary_zval_strcmp(*s1,*s2));
}
/* }}} */
/* {{{ proto int strncmp(string str1, string str2, int len)
Binary safe string comparison */
ZEND_FUNCTION(strncmp)
{
zval **s1, **s2, **s3;
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &s1, &s2, &s3) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(s1);
convert_to_string_ex(s2);
convert_to_long_ex(s3);
RETURN_LONG(zend_binary_zval_strncmp(*s1,*s2,*s3));
}
/* }}} */
/* {{{ proto int strcasecmp(string str1, string str2)
Binary safe case-insensitive string comparison */
ZEND_FUNCTION(strcasecmp)
{
zval **s1, **s2;
if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, &s1, &s2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(s1);
convert_to_string_ex(s2);
RETURN_LONG(zend_binary_zval_strcasecmp(*s1, *s2));
}
/* }}} */
ZEND_FUNCTION(each)
{
zval **array,*entry,**entry_ptr, *tmp;
char *string_key;
ulong num_key;
zval **inserted_pointer;
HashTable *target_hash;
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
WRONG_PARAM_COUNT;
}
target_hash = HASH_OF(*array);
if (!target_hash) {
zend_error(E_WARNING,"Variable passed to each() is not an array or object");
return;
}
if (zend_hash_get_current_data(target_hash, (void **) &entry_ptr)==FAILURE) {
RETURN_FALSE;
}
array_init(return_value);
entry = *entry_ptr;
/* add value elements */
if (entry->is_ref) {
ALLOC_ZVAL(tmp);
*tmp = *entry;
zval_copy_ctor(tmp);
tmp->is_ref=0;
tmp->refcount=0;
entry=tmp;
}
zend_hash_index_update(return_value->value.ht, 1, &entry, sizeof(zval *), NULL);
entry->refcount++;
zend_hash_update(return_value->value.ht, "value", sizeof("value"), &entry, sizeof(zval *), NULL);
entry->refcount++;
/* add the key elements */
switch (zend_hash_get_current_key(target_hash, &string_key, &num_key)) {
case HASH_KEY_IS_STRING:
add_get_index_string(return_value,0,string_key,(void **) &inserted_pointer,0);
break;
case HASH_KEY_IS_LONG:
add_get_index_long(return_value,0,num_key, (void **) &inserted_pointer);
break;
}
zend_hash_update(return_value->value.ht, "key", sizeof("key"), inserted_pointer, sizeof(zval *), NULL);
(*inserted_pointer)->refcount++;
zend_hash_move_forward(target_hash);
}
ZEND_FUNCTION(error_reporting)
{
zval **arg;
int old_error_reporting;
old_error_reporting = EG(error_reporting);
switch (ZEND_NUM_ARGS()) {
case 0:
break;
case 1:
if (zend_get_parameters_ex(1,&arg) == FAILURE) {
RETURN_FALSE;
}
convert_to_long_ex(arg);
EG(error_reporting)=(*arg)->value.lval;
break;
default:
WRONG_PARAM_COUNT;
break;
}
RETVAL_LONG(old_error_reporting);
}
ZEND_FUNCTION(define)
{
zval **var, **val, **non_cs;
int case_sensitive;
zend_constant c;
switch(ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &var, &val)==FAILURE) {
RETURN_FALSE;
}
case_sensitive = CONST_CS;
break;
case 3:
if (zend_get_parameters_ex(3, &var, &val, &non_cs)==FAILURE) {
RETURN_FALSE;
}
convert_to_long_ex(non_cs);
if ((*non_cs)->value.lval) {
case_sensitive = 0;
} else {
case_sensitive = CONST_CS;
}
break;
default:
WRONG_PARAM_COUNT;
break;
}
switch((*val)->type) {
case IS_LONG:
case IS_DOUBLE:
case IS_STRING:
case IS_BOOL:
case IS_RESOURCE:
case IS_NULL:
break;
default:
zend_error(E_WARNING,"Constants may only evaluate to scalar values");
RETURN_FALSE;
break;
}
convert_to_string_ex(var);
c.value = **val;
zval_copy_ctor(&c.value);
c.flags = case_sensitive; /* non persistent */
c.name = zend_strndup((*var)->value.str.val, (*var)->value.str.len);
c.name_len = (*var)->value.str.len+1;
zend_register_constant(&c ELS_CC);
RETURN_TRUE;
}
ZEND_FUNCTION(defined)
{
zval **var;
zval c;
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &var)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(var);
if (zend_get_constant((*var)->value.str.val, (*var)->value.str.len, &c)) {
zval_dtor(&c);
RETURN_LONG(1);
} else {
RETURN_LONG(0);
}
}
/* {{{ proto string get_class(object object)
Retrieves the class name */
ZEND_FUNCTION(get_class)
{
zval **arg;
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &arg)==FAILURE) {
WRONG_PARAM_COUNT;
}
if ((*arg)->type != IS_OBJECT) {
RETURN_FALSE;
}
RETURN_STRINGL((*arg)->value.obj.ce->name, (*arg)->value.obj.ce->name_length, 1);
}
/* }}} */
/* {{{ proto string get_parent_class(object object)
Retrieves the parent class name */
ZEND_FUNCTION(get_parent_class)
{
zval **arg;
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &arg)==FAILURE) {
WRONG_PARAM_COUNT;
}
if (((*arg)->type != IS_OBJECT) || !(*arg)->value.obj.ce->parent) {
RETURN_FALSE;
}
RETURN_STRINGL((*arg)->value.obj.ce->parent->name, (*arg)->value.obj.ce->parent->name_length, 1);
}
/* }}} */
/* {{{ proto bool is_subclass_of(object object, string class_name)
Returns true if the object has this class as one of its parents */
ZEND_FUNCTION(is_subclass_of)
{
zval **obj, **class_name;
char *lcname;
zend_class_entry *parent_ce = NULL;
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &obj, &class_name)==FAILURE) {
WRONG_PARAM_COUNT;
}
if ((*obj)->type != IS_OBJECT) {
RETURN_FALSE;
}
convert_to_string_ex(class_name);
lcname = estrndup((*class_name)->value.str.val, (*class_name)->value.str.len);
zend_str_tolower(lcname, (*class_name)->value.str.len);
for (parent_ce = (*obj)->value.obj.ce->parent; parent_ce != NULL; parent_ce = parent_ce->parent) {
if (!strcmp(parent_ce->name, lcname)) {
efree(lcname);
RETURN_TRUE;
}
}
efree(lcname);
RETURN_FALSE;
}
/* }}} */
/* {{{ proto array get_class_vars(string class_name)
Returns an array of default properties of the class */
ZEND_FUNCTION(get_class_vars)
{
zval **class_name;
char *lcname;
zend_class_entry *ce;
zval *tmp;
CLS_FETCH();
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &class_name)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(class_name);
lcname = estrndup((*class_name)->value.str.val, (*class_name)->value.str.len);
zend_str_tolower(lcname, (*class_name)->value.str.len);
if (zend_hash_find(CG(class_table), lcname, (*class_name)->value.str.len+1, (void **)&ce)==FAILURE) {
efree(lcname);
RETURN_FALSE;
} else {
efree(lcname);
array_init(return_value);
zend_hash_copy(return_value->value.ht, &ce->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
}
}
/* }}} */
/* {{{ proto array get_object_vars(object obj)
Returns an array of object properties */
ZEND_FUNCTION(get_object_vars)
{
zval **obj;
zval *tmp;
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &obj) == FAILURE) {
WRONG_PARAM_COUNT;
}
if ((*obj)->type != IS_OBJECT) {
RETURN_FALSE;
}
array_init(return_value);
zend_hash_copy(return_value->value.ht, (*obj)->value.obj.properties,
(copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
}
/* }}} */
/* {{{ proto array get_class_methods(string class_name)
Returns an array of class methods' names */
ZEND_FUNCTION(get_class_methods)
{
zval **class_name;
zval *method_name;
char *lcname;
zend_class_entry *ce;
char *string_key;
ulong num_key;
int key_type;
CLS_FETCH();
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &class_name)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(class_name);
lcname = estrndup((*class_name)->value.str.val, (*class_name)->value.str.len);
zend_str_tolower(lcname, (*class_name)->value.str.len);
if (zend_hash_find(CG(class_table), lcname, (*class_name)->value.str.len+1, (void **)&ce)==FAILURE) {
efree(lcname);
RETURN_NULL();
} else {
efree(lcname);
array_init(return_value);
zend_hash_internal_pointer_reset(&ce->function_table);
while ((key_type = zend_hash_get_current_key(&ce->function_table, &string_key, &num_key)) != HASH_KEY_NON_EXISTANT) {
if (key_type == HASH_KEY_IS_STRING) {
MAKE_STD_ZVAL(method_name);
ZVAL_STRING(method_name, string_key, 0);
zend_hash_next_index_insert(return_value->value.ht, &method_name, sizeof(zval *), NULL);
}
zend_hash_move_forward(&ce->function_table);
}
}
}
/* }}} */
/* {{{ proto bool method_exists(object object, string method)
Checks if the class method exists */
ZEND_FUNCTION(method_exists)
{
zval **klass, **method_name;
char *lcname;
if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, &klass, &method_name)==FAILURE) {
WRONG_PARAM_COUNT;
}
if ((*klass)->type != IS_OBJECT) {
RETURN_FALSE;
}
convert_to_string_ex(method_name);
lcname = estrndup((*method_name)->value.str.val, (*method_name)->value.str.len);
zend_str_tolower(lcname, (*method_name)->value.str.len);
if(zend_hash_exists(&(*klass)->value.obj.ce->function_table, lcname, (*method_name)->value.str.len+1)) {
efree(lcname);
RETURN_TRUE;
} else {
efree(lcname);
RETURN_FALSE;
}
}
/* }}} */
/* {{{ proto bool class_exists(string classname)
Checks if the class exists */
ZEND_FUNCTION(class_exists)
{
zval **class_name;
char *lcname;
CLS_FETCH();
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &class_name)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(class_name);
lcname = estrndup((*class_name)->value.str.val, (*class_name)->value.str.len);
zend_str_tolower(lcname, (*class_name)->value.str.len);
if (zend_hash_exists(CG(class_table), lcname, (*class_name)->value.str.len+1)) {
efree(lcname);
RETURN_TRUE;
} else {
efree(lcname);
RETURN_FALSE;
}
}
/* }}} */
/* {{{ proto bool function_exists(string function_name)
Checks if the function exists */
ZEND_FUNCTION(function_exists)
{
zval **function_name;
char *lcname;
int retval;
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &function_name)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(function_name);
lcname = estrndup((*function_name)->value.str.val, (*function_name)->value.str.len);
zend_str_tolower(lcname, (*function_name)->value.str.len);
retval = zend_hash_exists(EG(function_table), lcname, (*function_name)->value.str.len+1);
efree(lcname);
RETURN_BOOL(retval);
}
/* }}} */
ZEND_FUNCTION(leak)
{
int leakbytes=3;
zval **leak;
if (ZEND_NUM_ARGS()>=1) {
if (zend_get_parameters_ex(1, &leak)==SUCCESS) {
convert_to_long_ex(leak);
leakbytes = (*leak)->value.lval;
}
}
emalloc(leakbytes);
}
#ifdef ZEND_TEST_EXCEPTIONS
ZEND_FUNCTION(crash)
{
char *nowhere=NULL;
memcpy(nowhere, "something", sizeof("something"));
}
#endif
static int copy_import_use_file(zend_file_handle *fh, zval *array)
{
if (fh->filename) {
char *extension_start;
extension_start = strstr(fh->filename, zend_uv.import_use_extension);
if (extension_start) {
*extension_start = 0;
if (fh->opened_path) {
add_assoc_string(array, fh->filename, fh->opened_path, 1);
} else {
add_assoc_stringl(array, fh->filename, "N/A", sizeof("N/A")-1, 1);
}
*extension_start = zend_uv.import_use_extension[0];
}
}
return 0;
}
/* {{{ proto array get_required_files(void)
Returns an array with the file names that were require_once()'d */
ZEND_FUNCTION(get_required_files)
{
CLS_FETCH();
if (ZEND_NUM_ARGS() != 0) {
WRONG_PARAM_COUNT;
}
array_init(return_value);
zend_hash_apply_with_argument(&CG(used_files), (apply_func_arg_t) copy_import_use_file, return_value);
}
/* }}} */
/* {{{ proto array get_included_files(void)
Returns an array with the file names that were include_once()'d */
ZEND_FUNCTION(get_included_files)
{
if (ZEND_NUM_ARGS() != 0) {
WRONG_PARAM_COUNT;
}
array_init(return_value);
zend_hash_apply_with_argument(&EG(included_files), (apply_func_arg_t) copy_import_use_file, return_value);
}
/* }}} */
/* {{{ proto void trigger_error(string messsage [, int error_type])
Generates a user-level error/warning/notice message */
ZEND_FUNCTION(trigger_error)
{
int error_type = E_USER_NOTICE;
zval **z_error_type, **z_error_message;
switch(ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &z_error_message)==FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
break;
case 2:
if (zend_get_parameters_ex(2, &z_error_message, &z_error_type)==FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
convert_to_long_ex(z_error_type);
error_type = (*z_error_type)->value.lval;
switch (error_type) {
case E_USER_ERROR:
case E_USER_WARNING:
case E_USER_NOTICE:
break;
default:
zend_error(E_WARNING, "Invalid error type specified");
RETURN_FALSE;
break;
}
break;
}
convert_to_string_ex(z_error_message);
zend_error(error_type, (*z_error_message)->value.str.val);
RETURN_TRUE;
}
/* }}} */
/* {{{ proto string set_error_handler(string error_handler)
Sets a user-defined error handler function. Returns the previously defined error handler, or false on error */
ZEND_FUNCTION(set_error_handler)
{
zval **error_handler;
zend_bool had_orig_error_handler=0;
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &error_handler)==FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(error_handler);
if (EG(user_error_handler)) {
had_orig_error_handler = 1;
*return_value = *EG(user_error_handler);
zval_copy_ctor(return_value);
zend_ptr_stack_push(&EG(user_error_handlers), EG(user_error_handler));
}
ALLOC_ZVAL(EG(user_error_handler));
if (Z_STRLEN_PP(error_handler)==0) { /* unset user-defined handler */
FREE_ZVAL(EG(user_error_handler));
EG(user_error_handler) = NULL;
RETURN_TRUE;
}
*EG(user_error_handler) = **error_handler;
zval_copy_ctor(EG(user_error_handler));
if (!had_orig_error_handler) {
RETURN_NULL();
}
}
/* }}} */
/* {{{ proto void restore_error_handler(void)
Restores the previously defined error handler function */
ZEND_FUNCTION(restore_error_handler)
{
if (EG(user_error_handler)) {
zval_ptr_dtor(&EG(user_error_handler));
}
if (zend_ptr_stack_num_elements(&EG(user_error_handlers))==0) {
EG(user_error_handler) = NULL;
} else {
EG(user_error_handler) = zend_ptr_stack_pop(&EG(user_error_handlers));
}
RETURN_TRUE;
}
static int copy_class_name(zend_class_entry *ce, int num_args, va_list args, zend_hash_key *hash_key)
{
zval *array = va_arg(args, zval *);
if (hash_key->nKeyLength==0 || hash_key->arKey[0]!=0) {
add_next_index_stringl(array, ce->name, ce->name_length, 1);
}
return 0;
}
/* {{{ proto array get_declared_classes(void)
Returns an array of all declared classes. */
ZEND_FUNCTION(get_declared_classes)
{
CLS_FETCH();
if (ZEND_NUM_ARGS() != 0) {
WRONG_PARAM_COUNT;
}
array_init(return_value);
zend_hash_apply_with_arguments(CG(class_table), (apply_func_args_t)copy_class_name, 1, return_value);
}
/* }}} */
#define LAMBDA_TEMP_FUNCNAME "__lambda_func"
/* {{{ proto string create_function(string args, string code)
Creates an anonymous function, and returns its name (funny, eh?) */
ZEND_FUNCTION(create_function)
{
char *eval_code, *function_name;
int eval_code_length, function_name_length;
zval **z_function_args, **z_function_code;
int retval;
CLS_FETCH();
if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, &z_function_args, &z_function_code)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(z_function_args);
convert_to_string_ex(z_function_code);
eval_code_length = sizeof("function " LAMBDA_TEMP_FUNCNAME)
+Z_STRLEN_PP(z_function_args)
+2 /* for the args parentheses */
+2 /* for the curly braces */
+Z_STRLEN_PP(z_function_code);
eval_code = (char *) emalloc(eval_code_length);
sprintf(eval_code, "function " LAMBDA_TEMP_FUNCNAME "(%s){%s}", Z_STRVAL_PP(z_function_args), Z_STRVAL_PP(z_function_code));
retval = zend_eval_string(eval_code, NULL CLS_CC ELS_CC);
efree(eval_code);
if (retval==SUCCESS) {
zend_function *func;
if (zend_hash_find(EG(function_table), LAMBDA_TEMP_FUNCNAME, sizeof(LAMBDA_TEMP_FUNCNAME), (void **) &func)==FAILURE) {
zend_error(E_ERROR, "Unexpected inconsistency in create_function()");
RETURN_FALSE;
}
function_add_ref(func);
function_name = (char *) emalloc(sizeof("0lambda_")+MAX_LENGTH_OF_LONG);
do {
sprintf(function_name, "%clambda_%d", 0, ++EG(lambda_count));
function_name_length = strlen(function_name+1)+1;
} while (zend_hash_add(EG(function_table), function_name, function_name_length+1, func, sizeof(zend_function), NULL)==FAILURE);
zend_hash_del(EG(function_table), LAMBDA_TEMP_FUNCNAME, sizeof(LAMBDA_TEMP_FUNCNAME));
RETURN_STRINGL(function_name, function_name_length, 0);
} else {
RETURN_FALSE;
}
}
/* }}} */
ZEND_FUNCTION(zend_test_func)
{
zval *arg1, *arg2;
zend_get_parameters(ht, 2, &arg1, &arg2);
}
+26
View File
@@ -0,0 +1,26 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef _ZEND_BUILTIN_FUNCTIONS_H
#define _ZEND_BUILTIN_FUNCTIONS_H
int zend_startup_builtin_functions(void);
#endif /* _ZEND_BUILTIN_FUNCTIONS_H */
+524 -193
View File
File diff suppressed because it is too large. Load diff
+240 -172
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -23,20 +23,18 @@
#include "zend.h"
#if HAVE_STDARG_H
#include <stdarg.h>
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#endif
#include "zend_llist.h"
#define YYSTYPE znode
#include "zend-parser.h"
#define DEBUG_ZEND 0
#ifndef ZTS
#define SUPPORT_INTERACTIVE 1
# define SUPPORT_INTERACTIVE 1
#else
#define SUPPORT_INTERACTIVE 0
# define SUPPORT_INTERACTIVE 0
#endif
#define FREE_PNODE(znode) zval_dtor(&znode->u.constant);
@@ -60,19 +58,20 @@ typedef struct _znode {
union {
zval constant;
int var;
int opline_num;
zend_uint var;
zend_uint opline_num; /* Needs to be signed */
zend_uint fetch_type;
zend_op_array *op_array;
struct {
int var; /* dummy */
int type;
zend_uint var; /* dummy */
zend_uint type;
} EA;
} u;
} znode;
typedef struct _zend_op {
int opcode;
zend_uchar opcode;
znode result;
znode op1;
znode op2;
@@ -90,23 +89,22 @@ typedef struct _zend_brk_cont_element {
struct _zend_op_array {
int type; /* MUST be the first element of this struct! */
zend_uchar type; /* MUST be the first element of this struct! */
unsigned char *arg_types; /* MUST be the second element of this struct! */
zend_uchar *arg_types; /* MUST be the second element of this struct! */
char *function_name; /* MUST be the third element of this struct! */
int *refcount;
zend_uint *refcount;
zend_op *opcodes;
int last, size;
zend_uint last, size;
int T;
char *function_name;
zend_uint T;
zend_brk_cont_element *brk_cont_array;
int last_brk_cont;
int current_brk_cont;
unsigned char uses_globals;
zend_uint last_brk_cont;
zend_uint current_brk_cont;
zend_bool uses_globals;
/* static variables support */
HashTable *static_variables;
@@ -116,37 +114,51 @@ struct _zend_op_array {
int last_executed_op_number;
int backpatch_count;
#endif
zend_bool return_reference;
zend_bool done_pass_two;
void *reserved[4];
void *reserved[ZEND_MAX_RESERVED_RESOURCES];
};
typedef struct _zend_internal_function {
int type; /* MUST be the first element of this struct! */
zend_uchar type; /* MUST be the first element of this struct! */
unsigned char *arg_types; /* MUST be the second element of this struct */
zend_uchar *arg_types; /* MUST be the second element of this struct */
char *function_name; /* MUST be the third element of this struct */
void (*handler)(INTERNAL_FUNCTION_PARAMETERS);
char *function_name;
} zend_internal_function;
typedef struct _zend_overloaded_function {
zend_uchar type; /* MUST be the first element of this struct! */
zend_uchar *arg_types; /* MUST be the second element of this struct */
char *function_name; /* MUST be the third element of this struct */
zend_uint var;
} zend_overloaded_function;
typedef union _zend_function {
int type; /* MUST be the first element of this struct! */
zend_uchar type; /* MUST be the first element of this struct! */
struct {
int type; /* never used */
unsigned char *arg_types;
zend_uchar type; /* never used */
zend_uchar *arg_types;
char *function_name;
} common;
zend_op_array op_array;
zend_internal_function internal_function;
zend_overloaded_function overloaded_function;
} zend_function;
typedef struct _zend_function_state {
HashTable *function_symbol_table;
zend_function *function;
void *reserved[4];
void *reserved[ZEND_MAX_RESERVED_RESOURCES];
} zend_function_state;
@@ -165,8 +177,9 @@ typedef struct _list_llist_element {
typedef struct _zend_file_handle {
int type;
zend_uchar type;
char *filename;
char *opened_path;
union {
int fd;
FILE *fp;
@@ -174,10 +187,10 @@ typedef struct _zend_file_handle {
istream *is;
#endif
} handle;
zend_bool free_filename;
} zend_file_handle;
#include "zend_globals.h"
#define IS_CONST (1<<0)
#define IS_TMP_VAR (1<<1)
@@ -187,29 +200,35 @@ typedef struct _zend_file_handle {
#define EXT_TYPE_UNUSED (1<<0)
#include "zend_globals.h"
BEGIN_EXTERN_C()
void init_compiler(CLS_D ELS_DC);
void shutdown_compiler(CLS_D);
BEGIN_EXTERN_C()
extern ZEND_API zend_op_array *(*zend_compile_files)(int mark_as_ref CLS_DC, int file_count, ...);
extern ZEND_API zend_op_array *(*zend_v_compile_files)(int type CLS_DC, int file_count, va_list files);
void zend_activate(CLS_D ELS_DC);
void zend_deactivate(CLS_D ELS_DC);
void zend_activate_modules(void);
void zend_deactivate_modules(void);
int lex_scan(zval *zendlval CLS_DC);
void startup_scanner(CLS_D);
void shutdown_scanner(CLS_D);
ZEND_API void zend_set_compiled_filename(char *new_compiled_filename);
ZEND_API char *zend_set_compiled_filename(char *new_compiled_filename);
ZEND_API void zend_restore_compiled_filename(char *original_compiled_filename);
ZEND_API char *zend_get_compiled_filename();
ZEND_API char *zend_get_compiled_filename(CLS_D);
ZEND_API int zend_get_compiled_lineno(CLS_D);
#ifdef ZTS
const char *zend_get_zendtext(CLS_D);
int zend_get_zendleng(CLS_D);
#endif
END_EXTERN_C()
/* parser-driven code generators */
void do_binary_op(int op, znode *result, znode *op1, znode *op2 CLS_DC);
@@ -218,12 +237,14 @@ void do_binary_assign_op(int op, znode *result, znode *op1, znode *op2 CLS_DC);
void do_assign(znode *result, znode *variable, znode *value CLS_DC);
void do_assign_ref(znode *result, znode *lvar, znode *rvar CLS_DC);
void fetch_simple_variable(znode *result, znode *varname, int bp CLS_DC);
void fetch_simple_variable_ex(znode *result, znode *varname, int bp, int op CLS_DC);
void do_indirect_references(znode *result, znode *num_references, znode *variable CLS_DC);
void do_fetch_global_or_static_variable(znode *varname, znode *static_assignment, int fetch_type CLS_DC);
void do_fetch_globals(znode *varname CLS_DC);
void fetch_array_begin(znode *result, znode *varname, znode *first_dim CLS_DC);
void fetch_array_dim(znode *result, znode *parent, znode *dim CLS_DC);
void fetch_string_offset(znode *result, znode *parent, znode *offset CLS_DC);
void do_print(znode *result, znode *arg CLS_DC);
void do_echo(znode *arg CLS_DC);
typedef int (*unary_op_type)(zval *, zval *);
@@ -233,7 +254,7 @@ ZEND_API void *get_binary_op(int opcode);
void do_while_cond(znode *expr, znode *close_bracket_token CLS_DC);
void do_while_end(znode *while_token, znode *close_bracket_token CLS_DC);
void do_do_while_begin(CLS_D);
void do_do_while_end(znode *do_token, znode *expr CLS_DC);
void do_do_while_end(znode *do_token, znode *expr_open_bracket, znode *expr CLS_DC);
void do_if_cond(znode *cond, znode *closing_bracket_token CLS_DC);
@@ -248,7 +269,7 @@ void do_pre_incdec(znode *result, znode *op1, int op CLS_DC);
void do_post_incdec(znode *result, znode *op1, int op CLS_DC);
void do_begin_variable_parse(CLS_D);
void do_end_variable_parse(int type CLS_DC);
void do_end_variable_parse(int type, int arg_offset CLS_DC);
void do_free(znode *op1 CLS_DC);
@@ -257,15 +278,16 @@ void do_add_char(znode *result, znode *op1, znode *op2 CLS_DC);
void do_add_string(znode *result, znode *op1, znode *op2 CLS_DC);
void do_add_variable(znode *result, znode *op1, znode *op2 CLS_DC);
void do_begin_function_declaration(znode *function_token, znode *function_name, int is_method CLS_DC);
void do_begin_function_declaration(znode *function_token, znode *function_name, int is_method, int return_reference CLS_DC);
void do_end_function_declaration(znode *function_token CLS_DC);
void do_receive_arg(int op, znode *var, znode *offset, znode *initialization, unsigned char pass_type CLS_DC);
void do_begin_function_call(znode *function_name CLS_DC);
int do_begin_function_call(znode *function_name CLS_DC);
void do_begin_dynamic_function_call(znode *function_name CLS_DC);
void do_begin_class_member_function_call(znode *class_name, znode *function_name CLS_DC);
void do_end_function_call(znode *function_name, znode *result, znode *argument_list, int is_method CLS_DC);
void do_return(znode *expr CLS_DC);
ZEND_API void do_bind_function_or_class(zend_op *opline, HashTable *function_table, HashTable *class_table);
void do_end_function_call(znode *function_name, znode *result, znode *argument_list, int is_method, int is_dynamic_fcall CLS_DC);
void do_return(znode *expr, int do_end_vparse CLS_DC);
ZEND_API int do_bind_function_or_class(zend_op *opline, HashTable *function_table, HashTable *class_table, int compile_time);
void do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce);
void do_early_binding(CLS_D);
void do_pass_param(znode *param, int op, int offset CLS_DC);
@@ -295,17 +317,17 @@ void do_push_object(znode *object CLS_DC);
void do_pop_object(znode *object CLS_DC);
void do_begin_new_object(znode *result, znode *variable, znode *new_token, znode *class_name CLS_DC);
void do_end_new_object(znode *class_name, znode *new_token, znode *argument_list CLS_DC);
void do_begin_new_object(znode *new_token, znode *class_name CLS_DC);
void do_end_new_object(znode *result, znode *class_name, znode *new_token, znode *argument_list CLS_DC);
void do_fetch_constant(znode *result, znode *constant_name, int mode CLS_DC);
void do_shell_exec(znode *result, znode *cmd CLS_DC);
void do_init_array(znode *result, znode *expr, znode *offset CLS_DC);
void do_add_array_element(znode *result, znode *expr, znode *offset CLS_DC);
void do_init_array(znode *result, znode *expr, znode *offset, int is_ref CLS_DC);
void do_add_array_element(znode *result, znode *expr, znode *offset, int is_ref CLS_DC);
void do_add_static_array_element(znode *result, znode *offset, znode *expr);
void do_list_init();
void do_list_init(CLS_D);
void do_list_end(znode *result, znode *expr CLS_DC);
void do_add_list_element(znode *element CLS_DC);
void do_new_list_begin(CLS_D);
@@ -313,6 +335,7 @@ void do_new_list_end(CLS_D);
void do_cast(znode *result, znode *expr, int type CLS_DC);
void do_include_or_eval(int type, znode *result, znode *op1 CLS_DC);
void do_require(znode *filename, zend_bool unique CLS_DC);
void do_unset(znode *variable CLS_DC);
void do_isset_or_isempty(int type, znode *result, znode *variable CLS_DC);
@@ -321,6 +344,10 @@ void do_foreach_begin(znode *foreach_token, znode *array, znode *open_brackets_t
void do_foreach_cont(znode *value, znode *key, znode *as_token CLS_DC);
void do_foreach_end(znode *foreach_token, znode *open_brackets_token CLS_DC);
void do_declare_begin(CLS_D);
void do_declare_stmt(znode *var, znode *val CLS_DC);
void do_declare_end(CLS_D);
void do_end_heredoc(CLS_D);
void do_exit(znode *result, znode *message CLS_DC);
@@ -336,45 +363,46 @@ void do_extended_info(CLS_D);
void do_extended_fcall_begin(CLS_D);
void do_extended_fcall_end(CLS_D);
void do_ticks(CLS_D);
ZEND_API void function_add_ref(zend_function *function);
#define INITIAL_OP_ARRAY_SIZE 64
/* helper functions in zend-scanner.l */
BEGIN_EXTERN_C()
ZEND_API int require_file(zend_file_handle *file_handle CLS_DC);
ZEND_API int require_filename(char *filename CLS_DC);
ZEND_API zend_op_array *compile_files(int mark_as_ref CLS_DC, int file_count, ...);
ZEND_API zend_op_array *v_compile_files(int mark_as_ref CLS_DC, int file_count, va_list files);
ZEND_API int require_file(zend_file_handle *file_handle, zend_bool unique CLS_DC);
ZEND_API int require_filename(char *filename, zend_bool unique CLS_DC);
ZEND_API int use_filename(char *filename, uint filename_length CLS_DC);
ZEND_API zend_op_array *zend_compile_files(int type CLS_DC, int file_count, ...);
ZEND_API zend_op_array *v_compile_files(int type CLS_DC, int file_count, va_list files);
ZEND_API zend_op_array *compile_string(zval *source_string CLS_DC);
ZEND_API zend_op_array *compile_filename(zval *filename CLS_DC);
ZEND_API inline int open_file_for_scanning(zend_file_handle *file_handle CLS_DC);
ZEND_API void init_op_array(zend_op_array *op_array, int initial_ops_size);
ZEND_API zend_op_array *compile_filename(int type, zval *filename CLS_DC ELS_DC);
ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC);
ZEND_API void init_op_array(zend_op_array *op_array, int type, int initial_ops_size);
ZEND_API void destroy_op_array(zend_op_array *op_array);
ZEND_API void zend_close_file_handle(zend_file_handle *file_handle CLS_DC);
ZEND_API void zend_open_file_dtor(void *f);
END_EXTERN_C()
ZEND_API void zend_open_file_dtor(zend_file_handle *fh);
ZEND_API int destroy_zend_function(zend_function *function);
ZEND_API int destroy_zend_class(zend_class_entry *ce);
ZEND_API void destroy_zend_function(zend_function *function);
ZEND_API void destroy_zend_class(zend_class_entry *ce);
void zend_class_add_ref(zend_class_entry *ce);
#define ZEND_FUNCTION_DTOR (int (*)(void *)) destroy_zend_function
#define ZEND_CLASS_DTOR (int (*)(void *)) destroy_zend_class
#define ZEND_FUNCTION_DTOR (void (*)(void *)) destroy_zend_function
#define ZEND_CLASS_DTOR (void (*)(void *)) destroy_zend_class
zend_op *get_next_op(zend_op_array *op_array CLS_DC);
void init_op(zend_op *op CLS_DC);
int get_next_op_number(zend_op_array *op_array);
int print_class(zend_class_entry *class_entry);
void print_op_array(zend_op_array *op_array, int optimizations);
BEGIN_EXTERN_C()
int pass_two(zend_op_array *op_array);
void pass_include_eval(zend_op_array *op_array);
END_EXTERN_C()
ZEND_API void pass_include_eval(zend_op_array *op_array);
zend_brk_cont_element *get_next_brk_cont_element(zend_op_array *op_array);
ZEND_API zend_bool zend_is_compiling(void);
int zendlex(znode *zendlval CLS_DC);
#define ZEND_NOP 0
#define ZEND_ADD 1
@@ -391,111 +419,122 @@ int zendlex(znode *zendlval CLS_DC);
#define ZEND_BW_NOT 12
#define ZEND_BOOL_NOT 13
#define ZEND_BOOL_XOR 14
#define ZEND_IS_EQUAL 15
#define ZEND_IS_NOT_EQUAL 16
#define ZEND_IS_SMALLER 17
#define ZEND_IS_SMALLER_OR_EQUAL 18
#define ZEND_CAST 19
#define ZEND_QM_ASSIGN 20
#define ZEND_IS_IDENTICAL 15
#define ZEND_IS_NOT_IDENTICAL 16
#define ZEND_IS_EQUAL 17
#define ZEND_IS_NOT_EQUAL 18
#define ZEND_IS_SMALLER 19
#define ZEND_IS_SMALLER_OR_EQUAL 20
#define ZEND_CAST 21
#define ZEND_QM_ASSIGN 22
#define ZEND_ASSIGN_ADD 21
#define ZEND_ASSIGN_SUB 22
#define ZEND_ASSIGN_MUL 23
#define ZEND_ASSIGN_DIV 24
#define ZEND_ASSIGN_MOD 25
#define ZEND_ASSIGN_SL 26
#define ZEND_ASSIGN_SR 27
#define ZEND_ASSIGN_CONCAT 28
#define ZEND_ASSIGN_BW_OR 29
#define ZEND_ASSIGN_BW_AND 30
#define ZEND_ASSIGN_BW_XOR 31
#define ZEND_ASSIGN_ADD 23
#define ZEND_ASSIGN_SUB 24
#define ZEND_ASSIGN_MUL 25
#define ZEND_ASSIGN_DIV 26
#define ZEND_ASSIGN_MOD 27
#define ZEND_ASSIGN_SL 28
#define ZEND_ASSIGN_SR 29
#define ZEND_ASSIGN_CONCAT 30
#define ZEND_ASSIGN_BW_OR 31
#define ZEND_ASSIGN_BW_AND 32
#define ZEND_ASSIGN_BW_XOR 33
#define ZEND_PRE_INC 32
#define ZEND_PRE_DEC 33
#define ZEND_POST_INC 34
#define ZEND_POST_DEC 35
#define ZEND_PRE_INC 34
#define ZEND_PRE_DEC 35
#define ZEND_POST_INC 36
#define ZEND_POST_DEC 37
#define ZEND_ASSIGN 38
#define ZEND_ASSIGN_REF 39
#define ZEND_ECHO 40
#define ZEND_PRINT 41
#define ZEND_JMP 42
#define ZEND_JMPZ 43
#define ZEND_JMPNZ 44
#define ZEND_JMPZNZ 45
#define ZEND_JMPZ_EX 46
#define ZEND_JMPNZ_EX 47
#define ZEND_CASE 48
#define ZEND_SWITCH_FREE 49
#define ZEND_BRK 50
#define ZEND_CONT 51
#define ZEND_BOOL 52
#define ZEND_INIT_STRING 53
#define ZEND_ADD_CHAR 54
#define ZEND_ADD_STRING 55
#define ZEND_ADD_VAR 56
#define ZEND_BEGIN_SILENCE 57
#define ZEND_END_SILENCE 58
#define ZEND_INIT_FCALL_BY_NAME 59
#define ZEND_DO_FCALL 60
#define ZEND_DO_FCALL_BY_NAME 61
#define ZEND_RETURN 62
#define ZEND_RECV 63
#define ZEND_RECV_INIT 64
#define ZEND_ASSIGN 36
#define ZEND_ASSIGN_REF 37
#define ZEND_SEND_VAL 65
#define ZEND_SEND_VAR 66
#define ZEND_SEND_REF 67
#define ZEND_ECHO 38
#define ZEND_PRINT 39
#define ZEND_JMP 40
#define ZEND_JMPZ 41
#define ZEND_JMPNZ 42
#define ZEND_JMPZNZ 43
#define ZEND_JMPZ_EX 44
#define ZEND_JMPNZ_EX 45
#define ZEND_CASE 46
#define ZEND_BRK 47
#define ZEND_CONT 48
#define ZEND_BOOL 49
#define ZEND_INIT_STRING 50
#define ZEND_ADD_CHAR 51
#define ZEND_ADD_STRING 52
#define ZEND_ADD_VAR 53
#define ZEND_BEGIN_SILENCE 54
#define ZEND_END_SILENCE 55
#define ZEND_INIT_FCALL_BY_NAME 56
#define ZEND_DO_FCALL 57
#define ZEND_DO_FCALL_BY_NAME 58
#define ZEND_RETURN 59
#define ZEND_RECV 60
#define ZEND_RECV_INIT 61
#define ZEND_NEW 68
#define ZEND_JMP_NO_CTOR 69
#define ZEND_FREE 70
#define ZEND_SEND_VAL 62
#define ZEND_SEND_VAR 63
#define ZEND_SEND_REF 64
#define ZEND_NEW 65
#define ZEND_JMP_NO_CTOR 66
#define ZEND_FREE 67
#define ZEND_INIT_ARRAY 71
#define ZEND_ADD_ARRAY_ELEMENT 72
#define ZEND_INIT_ARRAY 68
#define ZEND_ADD_ARRAY_ELEMENT 69
#define ZEND_INCLUDE_OR_EVAL 73
#define ZEND_INCLUDE_OR_EVAL 70
#define ZEND_UNSET_VAR 74
#define ZEND_UNSET_DIM_OBJ 75
#define ZEND_ISSET_ISEMPTY 76
#define ZEND_UNSET_VAR 71
#define ZEND_UNSET_DIM_OBJ 72
#define ZEND_ISSET_ISEMPTY 73
#define ZEND_FE_RESET 77
#define ZEND_FE_FETCH 78
#define ZEND_FE_RESET 74
#define ZEND_FE_FETCH 75
#define ZEND_EXIT 76
#define ZEND_EXIT 79
/* the following 12 opcodes are 4 groups of 3 opcodes each, and must
/* the following 18 opcodes are 6 groups of 3 opcodes each, and must
* remain in that order!
*/
#define ZEND_FETCH_R 77
#define ZEND_FETCH_DIM_R 78
#define ZEND_FETCH_OBJ_R 79
#define ZEND_FETCH_W 80
#define ZEND_FETCH_DIM_W 81
#define ZEND_FETCH_OBJ_W 82
#define ZEND_FETCH_RW 83
#define ZEND_FETCH_DIM_RW 84
#define ZEND_FETCH_OBJ_RW 85
#define ZEND_FETCH_IS 86
#define ZEND_FETCH_DIM_IS 87
#define ZEND_FETCH_OBJ_IS 88
#define ZEND_FETCH_R 80
#define ZEND_FETCH_DIM_R 81
#define ZEND_FETCH_OBJ_R 82
#define ZEND_FETCH_W 83
#define ZEND_FETCH_DIM_W 84
#define ZEND_FETCH_OBJ_W 85
#define ZEND_FETCH_RW 86
#define ZEND_FETCH_DIM_RW 87
#define ZEND_FETCH_OBJ_RW 88
#define ZEND_FETCH_IS 89
#define ZEND_FETCH_DIM_IS 90
#define ZEND_FETCH_OBJ_IS 91
#define ZEND_FETCH_FUNC_ARG 92
#define ZEND_FETCH_DIM_FUNC_ARG 93
#define ZEND_FETCH_OBJ_FUNC_ARG 94
#define ZEND_FETCH_UNSET 95
#define ZEND_FETCH_DIM_UNSET 96
#define ZEND_FETCH_OBJ_UNSET 97
#define ZEND_FETCH_DIM_TMP_VAR 89
#define ZEND_FETCH_CONSTANT 90
#define ZEND_FETCH_DIM_TMP_VAR 98
#define ZEND_FETCH_CONSTANT 99
#define ZEND_DECLARE_FUNCTION_OR_CLASS 91
#define ZEND_DECLARE_FUNCTION_OR_CLASS 100
#define ZEND_EXT_STMT 92
#define ZEND_EXT_FCALL_BEGIN 93
#define ZEND_EXT_FCALL_END 94
#define ZEND_EXT_NOP 95
#define ZEND_EXT_STMT 101
#define ZEND_EXT_FCALL_BEGIN 102
#define ZEND_EXT_FCALL_END 103
#define ZEND_EXT_NOP 104
#define ZEND_TICKS 105
/* end of block */
@@ -508,11 +547,13 @@ int zendlex(znode *zendlval CLS_DC);
#define ZEND_FETCH_STATIC 2
/* var status for backpatching */
#define BP_VAR_R 0
#define BP_VAR_W 1
#define BP_VAR_RW 2
#define BP_VAR_IS 3
#define BP_VAR_NA 4 /* if not applicable */
#define BP_VAR_R 0
#define BP_VAR_W 1
#define BP_VAR_RW 2
#define BP_VAR_IS 3
#define BP_VAR_NA 4 /* if not applicable */
#define BP_VAR_FUNC_ARG 5
#define BP_VAR_UNSET 6
#define ZEND_INTERNAL_FUNCTION 1
@@ -525,6 +566,8 @@ int zendlex(znode *zendlval CLS_DC);
#define ZEND_EVAL (1<<0)
#define ZEND_INCLUDE (1<<1)
#define ZEND_INCLUDE_ONCE (1<<2)
#define ZEND_REQUIRE (1<<3)
#define ZEND_ISSET (1<<0)
#define ZEND_ISEMPTY (1<<1)
@@ -533,10 +576,11 @@ int zendlex(znode *zendlval CLS_DC);
#define ZEND_RT (1<<1)
#define ZEND_HANDLE_FILENAME 0
#define ZEND_HANDLE_FD 1
#define ZEND_HANDLE_FP 2
#define ZEND_HANDLE_ISTREAM 3
#define ZEND_HANDLE_FILENAME 0
#define ZEND_HANDLE_FD 1
#define ZEND_HANDLE_FP 2
#define ZEND_HANDLE_STDIOSTREAM 3
#define ZEND_HANDLE_FSTREAM 4
#define ZEND_DECLARE_CLASS 1
#define ZEND_DECLARE_FUNCTION 2
@@ -549,11 +593,35 @@ int zendlex(znode *zendlval CLS_DC);
#define ZEND_CTOR_CALL 1<<1
#define PZVAL_IS_REF(z) ((z)->EA.is_ref)
#define PZVAL_IS_LOCKED(z) ((z)->EA.locks>0)
#define AI_USE_PTR(ai) \
if ((ai).ptr_ptr) { \
(ai).ptr = *((ai).ptr_ptr); \
(ai).ptr_ptr = &((ai).ptr); \
} else { \
(ai).ptr = NULL; \
}
#define PZVAL_LOCK(z) (z)->EA.locks++
#define PZVAL_UNLOCK(z) (z)->EA.locks--
/* Lost In Stupid Parentheses */
#define ARG_SHOULD_BE_SENT_BY_REF(offset, conduct_check, arg_types) \
( \
conduct_check \
&& arg_types \
&& \
( \
( \
offset<=arg_types[0] \
&& arg_types[offset]==BYREF_FORCE \
) \
|| ( \
offset>=arg_types[0] \
&& arg_types[arg_types[0]]==BYREF_FORCE_REST \
) \
) \
)
#define ZEND_RETURN_VAL 0
#define ZEND_RETURN_REF 1
END_EXTERN_C()
#endif /* _COMPILE_H */
+29 -14
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -24,17 +24,29 @@
#include <string.h>
#include <windows.h>
#include <float.h>
typedef unsigned long ulong;
typedef unsigned int uint;
#define HAVE_ALLOCA 1
#define HAVE_LIMITS_H 1
#include <malloc.h>
#define HAVE_DIRENT_H 0
#undef HAVE_KILL
#define HAVE_GETPID 1
/* #define HAVE_ALLOCA_H 1 */
#define HAVE_MEMCPY 1
#define HAVE_STRDUP 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_STDIOSTR_H 1
#define HAVE_CLASS_ISTDIOSTREAM
#define istdiostream stdiostream
#define HAVE_STDARG_H 1
#define HAVE_SNPRINTF 1
#define HAVE_VSNPRINTF 1
#define HAVE_KILL 0
#define HAVE_GETPID 1
#define vsnprintf _vsnprintf
#ifdef inline
#undef inline
@@ -42,15 +54,16 @@ typedef unsigned int uint;
#define zend_sprintf sprintf
/* Visual C++ doesn't really work with inline for C */
#define inline
/* This will cause the compilation process to be MUCH longer, but will generate
* a much quicker PHP binary
*/
#ifdef ZEND_WIN32_FORCE_INLINE
# define inline __forceinline
#else
# define inline
#endif
#define DL_LOAD(libname) LoadLibrary(libname)
#define DL_FETCH_SYMBOL GetProcAddress
#define DL_UNLOAD FreeLibrary
#define DL_HANDLE HMODULE
#define ZEND_EXTENSIONS_SUPPORT 1
#define zend_finite(A) _finite(A)
#ifdef LIBZEND_EXPORTS
# define ZEND_API __declspec(dllexport)
@@ -58,4 +71,6 @@ typedef unsigned int uint;
# define ZEND_API __declspec(dllimport)
#endif
#define ZEND_DLEXPORT __declspec(dllexport)
#endif /* _ZEND_CONFIG_W32_H */
+28 -33
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -25,20 +25,21 @@
#include "zend_globals.h"
int free_zend_constant(zend_constant *c)
void free_zend_constant(zend_constant *c)
{
if (!(c->flags & CONST_PERSISTENT)) {
zval_dtor(&c->value);
}
free(c->name);
return 1;
}
void copy_zend_constant(zend_constant *c)
{
c->name = zend_strndup(c->name, c->name_len);
zval_copy_ctor(&c->value);
if (!(c->flags & CONST_PERSISTENT)) {
zval_copy_ctor(&c->value);
}
}
@@ -46,7 +47,7 @@ void zend_copy_constants(HashTable *target, HashTable *source)
{
zend_constant tmp_constant;
zend_hash_copy(target, source, (void (*)(void *)) copy_zend_constant, &tmp_constant, sizeof(zend_constant));
zend_hash_copy(target, source, (copy_ctor_func_t) copy_zend_constant, &tmp_constant, sizeof(zend_constant));
}
@@ -78,9 +79,9 @@ void clean_module_constants(int module_number)
}
int zend_startup_constants(HashTable *constants ELS_DC)
int zend_startup_constants(ELS_D)
{
#if WIN32|WINNT
#ifdef ZEND_WIN32
DWORD dwBuild=0;
DWORD dwVersion = GetVersion();
DWORD dwWindowsMajorVersion = (DWORD)(LOBYTE(LOWORD(dwVersion)));
@@ -99,26 +100,6 @@ int zend_startup_constants(HashTable *constants ELS_DC)
void zend_register_standard_constants(ELS_D)
{
/* ZEND_FIX: Move to PHP */
#if 0
#if WIN32|WINNT
// Get build numbers for Windows NT or Win95
if (dwVersion < 0x80000000){
php3_os="WINNT";
} else {
php3_os="WIN32";
}
#else
php3_os=PHP_OS;
#endif
#endif
#if 0
/* This should go back to PHP */
REGISTER_MAIN_STRINGL_CONSTANT("PHP_VERSION", PHP_VERSION, sizeof(PHP_VERSION)-1, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_STRINGL_CONSTANT("PHP_OS", php3_os, strlen(php3_os), CONST_PERSISTENT | CONST_CS);
#endif
REGISTER_MAIN_LONG_CONSTANT("E_ERROR", E_ERROR, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_WARNING", E_WARNING, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_PARSE", E_PARSE, CONST_PERSISTENT | CONST_CS);
@@ -127,6 +108,9 @@ void zend_register_standard_constants(ELS_D)
REGISTER_MAIN_LONG_CONSTANT("E_CORE_WARNING", E_CORE_WARNING, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_COMPILE_ERROR", E_COMPILE_ERROR, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_COMPILE_WARNING", E_COMPILE_WARNING, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_USER_ERROR", E_USER_ERROR, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_USER_WARNING", E_USER_WARNING, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_USER_NOTICE", E_USER_NOTICE, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_ALL", E_ALL, CONST_PERSISTENT | CONST_CS);
@@ -138,17 +122,28 @@ void zend_register_standard_constants(ELS_D)
c.flags = CONST_PERSISTENT;
c.module_number = 0;
c.name = zend_strndup("TRUE",4);
c.name_len = 5;
c.name = zend_strndup(ZEND_STRL("TRUE"));
c.name_len = sizeof("TRUE");
c.value.value.lval = 1;
c.value.type = IS_BOOL;
zend_register_constant(&c ELS_CC);
c.name = zend_strndup("FALSE",5);
c.name_len = 6;
c.name = zend_strndup(ZEND_STRL("FALSE"));
c.name_len = sizeof("FALSE");
c.value.value.lval = 0;
c.value.type = IS_BOOL;
zend_register_constant(&c ELS_CC);
c.name = zend_strndup(ZEND_STRL("ZEND_THREAD_SAFE"));
c.name_len = sizeof("ZEND_THREAD_SAFE");
c.value.value.lval = ZTS_V;
c.value.type = IS_BOOL;
zend_register_constant(&c ELS_CC);
c.name = zend_strndup(ZEND_STRL("NULL"));
c.name_len = sizeof("NULL");
c.value.type = IS_NULL;
zend_register_constant(&c ELS_CC);
}
}
+7 -6
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -45,8 +45,8 @@ typedef struct _zend_constant {
#define REGISTER_MAIN_STRINGL_CONSTANT(name,str,len,flags) zend_register_stringl_constant((name),sizeof(name),(str),(len),(flags),0 ELS_CC)
void clean_module_constants(int module_number);
int free_zend_constant(zend_constant *c);
int zend_startup_constants(HashTable *constants ELS_DC);
void free_zend_constant(zend_constant *c);
int zend_startup_constants(ELS_D);
int zend_shutdown_constants(ELS_D);
void zend_register_standard_constants(ELS_D);
void clean_non_persistent_constants(void);
@@ -57,7 +57,8 @@ ZEND_API void zend_register_string_constant(char *name, uint name_len, char *str
ZEND_API void zend_register_stringl_constant(char *name, uint name_len, char *strval, uint strlen, int flags, int module_number ELS_DC);
ZEND_API void zend_register_constant(zend_constant *c ELS_DC);
void zend_copy_constants(HashTable *target, HashTable *sourc);
void copy_zend_constant(zend_constant *c);
#define ZEND_CONSTANT_DTOR (int (*)(void *)) free_zend_constant
#define ZEND_CONSTANT_DTOR (void (*)(void *)) free_zend_constant
#endif
+62
View File
@@ -0,0 +1,62 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include "zend.h"
typedef struct _dynamic_array {
char *array;
unsigned int element_size;
unsigned int current;
unsigned int allocated;
} dynamic_array;
ZEND_API int zend_dynamic_array_init(dynamic_array *da, unsigned int element_size, unsigned int size)
{
da->element_size = element_size;
da->allocated = size;
da->current = 0;
da->array = (char *) emalloc(size*element_size);
if (da->array == NULL) {
return 1;
}
return 0;
}
ZEND_API void *zend_dynamic_array_push(dynamic_array *da)
{
if (da->current == da->allocated) {
da->allocated *= 2;
da->array = (char *) erealloc(da->array, da->allocated*da->element_size);
}
return (void *)(da->array+(da->current++)*da->element_size);
}
ZEND_API void *zend_dynamic_array_pop(dynamic_array *da)
{
return (void *)(da->array+(--(da->current))*da->element_size);
}
ZEND_API void *zend_dynamic_array_get_element(dynamic_array *da, unsigned int index)
{
if (index >= da->current) {
return NULL;
}
return (void *)(da->array+index*da->element_size);
}
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -17,43 +17,22 @@
+----------------------------------------------------------------------+
*/
#ifndef _CONFIG_UNIX_H
#define _CONFIG_UNIX_H
#define ZEND_API
#ifndef _DYNAMIC_ARRAY_H
#define _DYNAMIC_ARRAY_H
#include <stdlib.h>
typedef struct _dynamic_array {
char *array;
unsigned int element_size;
unsigned int last_used;
unsigned int allocated;
} dynamic_array;
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
BEGIN_EXTERN_C()
ZEND_API int zend_dynamic_array_init(dynamic_array *da);
ZEND_API void *zend_dynamic_array_push(dynamic_array *da);
ZEND_API void *zend_dynamic_array_pop(dynamic_array *da);
ZEND_API void *zend_dynamic_array_get_element(dynamic_array *da, unsigned int index);
END_EXTERN_C()
#if HAVE_STRING_H
#include <string.h>
#else
#include <strings.h>
#endif
#if HAVE_LIBDL
# include <dlfcn.h>
# define DL_LOAD(libname) dlopen(libname, RTLD_NOW)
# define DL_UNLOAD dlclose
# define DL_FETCH_SYMBOL dlsym
# define DL_HANDLE void *
# define ZEND_EXTENSIONS_SUPPORT 1
#else
# define DL_HANDLE void *
# define ZEND_EXTENSIONS_SUPPORT 0
#endif
#if BROKEN_SPRINTF
int zend_sprintf(char *buffer, const char *format, ...);
#else
# define zend_sprintf sprintf
#endif
#if ZEND_DEBUG
# define inline
#endif
#endif /* _CONFIG_UNIX_H */
#endif /* _ZEND_DYNAMIC_ARRAY_H */
+7 -4
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -29,8 +29,11 @@
#define E_CORE_WARNING (1<<5L)
#define E_COMPILE_ERROR (1<<6L)
#define E_COMPILE_WARNING (1<<7L)
#define E_USER_ERROR (1<<8L)
#define E_USER_WARNING (1<<9L)
#define E_USER_NOTICE (1<<10L)
#define E_ALL (E_ERROR | E_WARNING | E_PARSE | E_NOTICE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING)
#define E_ALL (E_ERROR | E_WARNING | E_PARSE | E_NOTICE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE)
#define E_CORE (E_CORE_ERROR | E_CORE_WARNING)
#endif /* _ZEND_ERRORS_H */
+995 -579
View File
File diff suppressed because it is too large. Load diff
+172 -15
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -23,15 +23,26 @@
#include "zend_compile.h"
#include "zend_hash.h"
#include "zend_variables.h"
#include "zend_execute_locks.h"
typedef union _temp_variable {
zval tmp_var;
zval **var;
struct {
zval **var_dummy; /* a dummy */
zval **ptr_ptr;
zval *ptr;
} var;
struct {
zval tmp_var; /* a dummy */
zval *str;
int offset;
union {
struct {
zval *str;
int offset;
} str_offset;
zend_property_reference overloaded_element;
} data;
unsigned char type;
} EA;
} temp_variable;
@@ -43,15 +54,95 @@ void init_executor(CLS_D ELS_DC);
void shutdown_executor(ELS_D);
void execute(zend_op_array *op_array ELS_DC);
ZEND_API int zend_is_true(zval *op);
ZEND_API inline void safe_free_zval_ptr(zval *p);
ZEND_API void zend_eval_string(char *str, zval *retval CLS_DC ELS_DC);
ZEND_API inline int i_zend_is_true(zval *op);
ZEND_API void zval_update_constant(zval *p);
ZEND_API inline void zend_assign_to_variable_reference(znode *result, zval **variable_ptr_ptr, zval **value_ptr_ptr, temp_variable *Ts ELS_DC);
ZEND_API inline void safe_free_zval_ptr(zval *p)
#if defined(C9X_INLINE_SEMANTICS)
{
ELS_FETCH();
if (p!=EG(uninitialized_zval_ptr)) {
FREE_ZVAL(p);
}
}
#else
;
#endif
ZEND_API int zend_eval_string(char *str, zval *retval_ptr CLS_DC ELS_DC);
ZEND_API inline int i_zend_is_true(zval *op)
#if defined(C9X_INLINE_SEMANTICS)
{
int result;
switch (op->type) {
case IS_NULL:
result = 0;
break;
case IS_LONG:
case IS_BOOL:
case IS_RESOURCE:
result = (op->value.lval?1:0);
break;
case IS_DOUBLE:
result = (op->value.dval ? 1 : 0);
break;
case IS_STRING:
if (op->value.str.len == 0
|| (op->value.str.len==1 && op->value.str.val[0]=='0')) {
result = 0;
} else {
result = 1;
}
break;
case IS_ARRAY:
result = (zend_hash_num_elements(op->value.ht)?1:0);
break;
case IS_OBJECT:
result = (zend_hash_num_elements(op->value.obj.properties)?1:0);
break;
default:
result = 0;
break;
}
return result;
}
#else
;
#endif
ZEND_API int zval_update_constant(zval **pp, void *arg);
/* dedicated Zend executor functions - do not use! */
ZEND_API inline void zend_ptr_stack_clear_multiple(ELS_D);
ZEND_API inline int zend_ptr_stack_get_arg(int requested_arg, void **data ELS_DC);
ZEND_API inline void zend_ptr_stack_clear_multiple(ELS_D)
#if defined(C9X_INLINE_SEMANTICS)
{
void **p = EG(argument_stack).top_element-2;
int delete_count = (ulong) *p;
EG(argument_stack).top -= (delete_count+2);
while (--delete_count>=0) {
zval_ptr_dtor((zval **) --p);
}
EG(argument_stack).top_element = p;
}
#else
;
#endif
ZEND_API inline int zend_ptr_stack_get_arg(int requested_arg, void **data ELS_DC)
#if defined(C9X_INLINE_SEMANTICS)
{
void **p = EG(argument_stack).top_element-2;
int arg_count = (ulong) *p;
if (requested_arg>arg_count) {
return FAILURE;
}
*data = (p-arg_count+requested_arg-1);
return SUCCESS;
}
#else
;
#endif
#if SUPPORT_INTERACTIVE
void execute_new_code(CLS_D);
@@ -59,15 +150,81 @@ void execute_new_code(CLS_D);
/* services */
ZEND_API char *get_active_function_name();
ZEND_API char *get_active_function_name(void);
ZEND_API char *zend_get_executed_filename(ELS_D);
ZEND_API uint zend_get_executed_lineno(ELS_D);
ZEND_API zend_bool zend_is_executing(void);
void zend_set_timeout(long seconds);
void zend_unset_timeout(void);
void zend_timeout(int dummy);
#ifdef ZEND_WIN32
void zend_init_timeout_thread();
void zend_shutdown_timeout_thread();
#define WM_REGISTER_ZEND_TIMEOUT (WM_USER+1)
#define WM_UNREGISTER_ZEND_TIMEOUT (WM_USER+2)
#endif
#define zendi_zval_copy_ctor(p) zval_copy_ctor(&(p))
#define zendi_zval_dtor(p) zval_dtor(&(p))
#define active_opline (*EG(opline_ptr))
ZEND_API inline void zend_assign_to_variable_reference(znode *result, zval **variable_ptr_ptr, zval **value_ptr_ptr, temp_variable *Ts ELS_DC)
#if defined(C9X_INLINE_SEMANTICS)
{
zval *variable_ptr = *variable_ptr_ptr;
zval *value_ptr;
if (!value_ptr_ptr) {
zend_error(E_ERROR, "Cannot create references to string offsets nor overloaded objects");
return;
}
value_ptr = *value_ptr_ptr;
if (variable_ptr == EG(error_zval_ptr) || value_ptr==EG(error_zval_ptr)) {
variable_ptr_ptr = &EG(uninitialized_zval_ptr);
/* } else if (variable_ptr==&EG(uninitialized_zval) || variable_ptr!=value_ptr) { */
} else if (variable_ptr_ptr != value_ptr_ptr) {
variable_ptr->refcount--;
if (variable_ptr->refcount==0) {
zendi_zval_dtor(*variable_ptr);
FREE_ZVAL(variable_ptr);
}
if (!PZVAL_IS_REF(value_ptr)) {
/* break it away */
value_ptr->refcount--;
if (value_ptr->refcount>0) {
ALLOC_ZVAL(*value_ptr_ptr);
**value_ptr_ptr = *value_ptr;
value_ptr = *value_ptr_ptr;
zendi_zval_copy_ctor(*value_ptr);
}
value_ptr->refcount = 1;
value_ptr->is_ref = 1;
}
*variable_ptr_ptr = value_ptr;
value_ptr->refcount++;
} else {
if (variable_ptr->refcount>1) { /* we need to break away */
SEPARATE_ZVAL(variable_ptr_ptr);
}
(*variable_ptr_ptr)->is_ref = 1;
}
if (result && (result->op_type != IS_UNUSED)) {
Ts[result->u.var].var.ptr_ptr = variable_ptr_ptr;
SELECTIVE_PZVAL_LOCK(*variable_ptr_ptr, result);
AI_USE_PTR(Ts[result->u.var].var);
}
}
#else
;
#endif
#define IS_OVERLOADED_OBJECT 1
#define IS_STRING_OFFSET 2
+373 -171
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -26,14 +26,26 @@
#include "zend_execute.h"
#include "zend_API.h"
#include "zend_ptr_stack.h"
#include "zend_variables.h"
#include "zend_operators.h"
#include "zend_constants.h"
#include "zend_extensions.h"
#include "zend_execute_locks.h"
#if HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
ZEND_API void (*zend_execute)(zend_op_array *op_array ELS_DC);
#ifdef ZEND_WIN32
#include <process.h>
/* true global */
static WNDCLASS wc;
static HWND timeout_window;
static HANDLE timeout_thread_event;
static DWORD timeout_thread_id;
static int timeout_thread_initialized=0;
#endif
#if ZEND_DEBUG
static void (*original_sigsegv_handler)(int);
@@ -79,28 +91,33 @@ static void zend_extension_deactivator(zend_extension *extension)
}
static int is_not_internal_function(zend_function *function)
{
return(function->type != ZEND_INTERNAL_FUNCTION);
}
static int is_not_internal_class(zend_class_entry *ce)
{
return(ce->type != ZEND_INTERNAL_CLASS);
}
void init_executor(CLS_D ELS_DC)
{
var_uninit(&EG(uninitialized_zval));
var_uninit(&EG(error_zval));
EG(uninitialized_zval).refcount = 1;
EG(uninitialized_zval).EA.is_ref=0;
EG(uninitialized_zval).EA.locks = 0;
INIT_ZVAL(EG(uninitialized_zval));
INIT_ZVAL(EG(error_zval));
EG(uninitialized_zval_ptr)=&EG(uninitialized_zval);
EG(error_zval).refcount = 1;
EG(error_zval).EA.is_ref=0;
EG(error_zval).EA.locks = 0;
EG(error_zval_ptr)=&EG(error_zval);
zend_ptr_stack_init(&EG(arg_types_stack));
zend_stack_init(&EG(overloaded_objects_stack));
/* destroys stack frame, therefore makes core dumps worthless */
#if 0
#if ZEND_DEBUG
#if 0&&ZEND_DEBUG
original_sigsegv_handler = signal(SIGSEGV, zend_handle_sigsegv);
#endif
#endif
EG(return_value) = &EG(global_return_value);
var_reset(EG(return_value));
EG(return_value_ptr_ptr) = &EG(global_return_value_ptr);
EG(global_return_value_ptr) = &EG(global_return_value);
INIT_ZVAL(EG(global_return_value));
EG(symtable_cache_ptr) = EG(symtable_cache)-1;
EG(symtable_cache_limit)=EG(symtable_cache)+SYMTABLE_CACHE_SIZE-1;
EG(no_extensions)=0;
@@ -108,22 +125,40 @@ void init_executor(CLS_D ELS_DC)
EG(function_table) = CG(function_table);
EG(class_table) = CG(class_table);
EG(in_execution) = 0;
zend_ptr_stack_init(&EG(argument_stack));
EG(main_op_array) = NULL;
zend_hash_init(&EG(symbol_table), 50, NULL, PVAL_PTR_DTOR, 0);
zend_hash_init(&EG(symbol_table), 50, NULL, ZVAL_PTR_DTOR, 0);
EG(active_symbol_table) = &EG(symbol_table);
zend_llist_apply(&zend_extensions, (void (*)(void *)) zend_extension_activator);
EG(opline_ptr) = NULL;
EG(garbage_ptr) = 0;
zend_hash_init(&EG(included_files), 5, NULL, NULL, 0);
EG(ticks_count) = 0;
EG(user_error_handler) = NULL;
zend_ptr_stack_init(&EG(user_error_handlers));
#ifdef ZEND_WIN32
EG(timed_out) = 0;
#endif
}
void shutdown_executor(ELS_D)
{
zval_dtor(EG(return_value));
if (EG(global_return_value_ptr) == &EG(global_return_value)) {
zval_dtor(&EG(global_return_value));
} else {
zval_ptr_dtor(EG(return_value_ptr_ptr));
}
zend_ptr_stack_destroy(&EG(arg_types_stack));
zend_stack_destroy(&EG(overloaded_objects_stack));
while (EG(symtable_cache_ptr)>=EG(symtable_cache)) {
zend_hash_destroy(*EG(symtable_cache_ptr));
@@ -134,17 +169,40 @@ void shutdown_executor(ELS_D)
zend_hash_destroy(&EG(symbol_table));
destroy_resource_list(); /* must be destroyed after the main symbol table is destroyed */
while (EG(garbage_ptr)--) {
if (EG(garbage)[EG(garbage_ptr)]->refcount==1) {
zval_ptr_dtor(&EG(garbage)[EG(garbage_ptr)]);
}
}
zend_ptr_stack_destroy(&EG(argument_stack));
/* Destroy all op arrays */
if (EG(main_op_array)) {
destroy_op_array(EG(main_op_array));
efree(EG(main_op_array));
}
zend_hash_apply(EG(function_table), (int (*)(void *)) is_not_internal_function);
zend_hash_apply(EG(class_table), (int (*)(void *)) is_not_internal_class);
zend_destroy_rsrc_list(ELS_C); /* must be destroyed after the main symbol table and
* op arrays are destroyed.
*/
clean_non_persistent_constants();
#if ZEND_DEBUG
signal(SIGSEGV, original_sigsegv_handler);
#endif
zend_hash_destroy(&EG(included_files));
if (EG(user_error_handler)) {
zval_dtor(EG(user_error_handler));
FREE_ZVAL(EG(user_error_handler));
}
zend_ptr_stack_clean(&EG(user_error_handlers), ZVAL_DESTRUCTOR, 1);
zend_ptr_stack_destroy(&EG(user_error_handlers));
}
@@ -192,20 +250,16 @@ ZEND_API uint zend_get_executed_lineno(ELS_D)
}
ZEND_API inline void safe_free_zval_ptr(zval *p)
ZEND_API zend_bool zend_is_executing()
{
ELS_FETCH();
if (p!=EG(uninitialized_zval_ptr)) {
efree(p);
}
return EG(in_execution);
}
ZEND_API int zval_ptr_dtor(zval **zval_ptr)
ZEND_API void _zval_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC)
{
int locked = PZVAL_IS_LOCKED(*zval_ptr);
#if DEBUG_ZEND>=2
printf("Reducing refcount for %x (%x): %d->%d\n", *zval_ptr, zval_ptr, (*zval_ptr)->refcount, (*zval_ptr)->refcount-1);
#endif
@@ -213,49 +267,11 @@ ZEND_API int zval_ptr_dtor(zval **zval_ptr)
if ((*zval_ptr)->refcount==0) {
zval_dtor(*zval_ptr);
safe_free_zval_ptr(*zval_ptr);
}
if (locked) {
return 0; /* don't kill the container bucket */
} else {
return 1;
} else if (((*zval_ptr)->refcount == 1) && ((*zval_ptr)->type != IS_OBJECT)) {
(*zval_ptr)->is_ref = 0;
}
}
ZEND_API inline int i_zend_is_true(zval *op)
{
int result;
switch (op->type) {
case IS_LONG:
case IS_BOOL:
case IS_RESOURCE:
result = (op->value.lval?1:0);
break;
case IS_DOUBLE:
result = (op->value.dval ? 1 : 0);
break;
case IS_STRING:
if (op->value.str.len == 0
|| (op->value.str.len==1 && op->value.str.val[0]=='0')) {
result = 0;
} else {
result = 1;
}
break;
case IS_ARRAY:
result = (zend_hash_num_elements(op->value.ht)?1:0);
break;
case IS_OBJECT:
result = (zend_hash_num_elements(op->value.obj.properties)?1:0);
break;
default:
result = 0;
break;
}
return result;
}
ZEND_API int zend_is_true(zval *op)
{
@@ -263,88 +279,181 @@ ZEND_API int zend_is_true(zval *op)
}
ZEND_API void zval_update_constant(zval *p)
ZEND_API int zval_update_constant(zval **pp, void *arg)
{
zval *p = *pp;
zend_bool inline_change = (zend_bool) (unsigned long) arg;
if (p->type == IS_CONSTANT) {
zval c;
int refcount;
SEPARATE_ZVAL(pp);
p = *pp;
refcount = p->refcount;
if (!zend_get_constant(p->value.str.val, p->value.str.len, &c)) {
zend_error(E_NOTICE, "Use of undefined constant %s - assumed '%s'",
p->value.str.val,
p->value.str.val);
p->type = IS_STRING;
if (!inline_change) {
zval_copy_ctor(p);
}
} else {
STR_FREE(p->value.str.val);
if (inline_change) {
STR_FREE(p->value.str.val);
}
*p = c;
}
INIT_PZVAL(p);
p->refcount = refcount;
} else if (p->type == IS_CONSTANT_ARRAY) {
SEPARATE_ZVAL(pp);
p = *pp;
p->type = IS_ARRAY;
zend_hash_apply_with_argument(p->value.ht, (int (*)(void *,void *)) zval_update_constant, (void *) 1);
}
return 0;
}
int call_user_function(HashTable *function_table, zval *object, zval *function_name, zval *retval, int param_count, zval *params[])
int call_user_function(HashTable *function_table, zval *object, zval *function_name, zval *retval_ptr, int param_count, zval *params[])
{
zval ***params_array = (zval ***) emalloc(sizeof(zval **)*param_count);
int i;
int ex_retval;
zval *local_retval_ptr;
for (i=0; i<param_count; i++) {
params_array[i] = &params[i];
}
ex_retval = call_user_function_ex(function_table, object, function_name, &local_retval_ptr, param_count, params_array, 1, NULL);
if (local_retval_ptr) {
COPY_PZVAL_TO_ZVAL(*retval_ptr, local_retval_ptr);
} else {
INIT_ZVAL(*retval_ptr);
}
efree(params_array);
return ex_retval;
}
int call_user_function_ex(HashTable *function_table, zval *object, zval *function_name, zval **retval_ptr_ptr, int param_count, zval **params[], int no_separation, HashTable *symbol_table)
{
int i;
zval *original_return_value;
zval **original_return_value;
HashTable *calling_symbol_table;
zend_function_state function_state;
zend_function_state *original_function_state_ptr;
zend_op_array *original_op_array;
zend_op **original_opline_ptr;
CLS_FETCH();
ELS_FETCH();
*retval_ptr_ptr = NULL;
if (function_name->type==IS_ARRAY) { /* assume array($obj, $name) couple */
zval **tmp_object_ptr, **tmp_real_function_name;
if (zend_hash_index_find(function_name->value.ht, 0, (void **) &tmp_object_ptr)==FAILURE) {
return FAILURE;
}
if (zend_hash_index_find(function_name->value.ht, 1, (void **) &tmp_real_function_name)==FAILURE) {
return FAILURE;
}
function_name = *tmp_real_function_name;
object = *tmp_object_ptr;
}
if (object) {
if (object->type != IS_OBJECT) {
return FAILURE;
}
function_table = &object->value.obj.ce->function_table;
}
if (function_name->type!=IS_STRING) {
return FAILURE;
}
original_function_state_ptr = EG(function_state_ptr);
zend_str_tolower(function_name->value.str.val, function_name->value.str.len);
if (zend_hash_find(function_table, function_name->value.str.val, function_name->value.str.len+1, (void **) &function_state.function)==FAILURE) {
return FAILURE;
}
for (i=0; i<param_count; i++) {
zval *param;
param = (zval *) emalloc(sizeof(zval));
*param = *(params[i]);
INIT_PZVAL(param);
zval_copy_ctor(param);
if (function_state.function->common.arg_types
&& i<function_state.function->common.arg_types[0]
&& function_state.function->common.arg_types[i+1]==BYREF_FORCE
&& !PZVAL_IS_REF(*params[i])) {
if ((*params[i])->refcount>1) {
zval *new_zval;
if (no_separation) {
return FAILURE;
}
ALLOC_ZVAL(new_zval);
*new_zval = **params[i];
zval_copy_ctor(new_zval);
new_zval->refcount = 1;
(*params[i])->refcount--;
*params[i] = new_zval;
}
(*params[i])->refcount++;
(*params[i])->is_ref = 1;
param = *params[i];
} else if (*params[i] != &EG(uninitialized_zval)) {
(*params[i])->refcount++;
param = *params[i];
} else {
ALLOC_ZVAL(param);
*param = **(params[i]);
INIT_PZVAL(param);
}
zend_ptr_stack_push(&EG(argument_stack), param);
}
zend_ptr_stack_push(&EG(argument_stack), (void *) (long) param_count);
zend_ptr_stack_n_push(&EG(argument_stack), 2, (void *) (long) param_count, NULL);
var_uninit(retval);
if (function_state.function->type == ZEND_USER_FUNCTION) {
calling_symbol_table = EG(active_symbol_table);
EG(active_symbol_table) = (HashTable *) emalloc(sizeof(HashTable));
zend_hash_init(EG(active_symbol_table), 0, NULL, PVAL_PTR_DTOR, 0);
if (symbol_table) {
EG(active_symbol_table) = symbol_table;
} else {
ALLOC_HASHTABLE(EG(active_symbol_table));
zend_hash_init(EG(active_symbol_table), 0, NULL, ZVAL_PTR_DTOR, 0);
}
if (object) {
zval *dummy = (zval *) emalloc(sizeof(zval)), **this_ptr;
zval *dummy, **this_ptr;
var_uninit(dummy);
INIT_PZVAL(dummy);
zend_hash_update_ptr(EG(active_symbol_table), "this", sizeof("this"), dummy, sizeof(zval *), (void **) &this_ptr);
ALLOC_ZVAL(dummy);
INIT_ZVAL(*dummy);
zend_hash_update(EG(active_symbol_table), "this", sizeof("this"), &dummy, sizeof(zval *), (void **) &this_ptr);
zend_assign_to_variable_reference(NULL, this_ptr, &object, NULL ELS_CC);
}
original_return_value = EG(return_value);
original_return_value = EG(return_value_ptr_ptr);
original_op_array = EG(active_op_array);
EG(return_value) = retval;
EG(return_value_ptr_ptr) = retval_ptr_ptr;
EG(active_op_array) = (zend_op_array *) function_state.function;
original_opline_ptr = EG(opline_ptr);
original_opline_ptr = EG(opline_ptr);
zend_execute(EG(active_op_array) ELS_CC);
zend_hash_destroy(EG(active_symbol_table));
efree(EG(active_symbol_table));
if (!symbol_table) {
zend_hash_destroy(EG(active_symbol_table));
FREE_HASHTABLE(EG(active_symbol_table));
}
EG(active_symbol_table) = calling_symbol_table;
EG(active_op_array) = original_op_array;
EG(return_value)=original_return_value;
EG(return_value_ptr_ptr)=original_return_value;
EG(opline_ptr) = original_opline_ptr;
} else {
((zend_internal_function *) function_state.function)->handler(param_count, retval, &EG(regular_list), &EG(persistent_list), object);
ALLOC_INIT_ZVAL(*retval_ptr_ptr);
((zend_internal_function *) function_state.function)->handler(param_count, *retval_ptr_ptr, object, 1 ELS_CC);
INIT_PZVAL(*retval_ptr_ptr);
}
zend_ptr_stack_clear_multiple(ELS_C);
EG(function_state_ptr) = original_function_state_ptr;
@@ -353,15 +462,16 @@ int call_user_function(HashTable *function_table, zval *object, zval *function_n
}
ZEND_API void zend_eval_string(char *str, zval *retval CLS_DC ELS_DC)
ZEND_API int zend_eval_string(char *str, zval *retval_ptr CLS_DC ELS_DC)
{
zval pv;
zend_op_array *new_op_array;
zend_op_array *original_active_op_array = EG(active_op_array);
zend_function_state *original_function_state_ptr = EG(function_state_ptr);
int original_handle_op_arrays;
int retval;
if (retval) {
if (retval_ptr) {
pv.value.str.len = strlen(str)+sizeof("return ;")-1;
pv.value.str.val = emalloc(pv.value.str.len+1);
strcpy(pv.value.str.val, "return ");
@@ -381,79 +491,44 @@ ZEND_API void zend_eval_string(char *str, zval *retval CLS_DC ELS_DC)
CG(handle_op_arrays) = original_handle_op_arrays;
if (new_op_array) {
zval dummy_retval;
zval *original_return_value = EG(return_value);
zval *local_retval_ptr=NULL;
zval **original_return_value_ptr_ptr = EG(return_value_ptr_ptr);
zend_op **original_opline_ptr = EG(opline_ptr);
EG(return_value) = (retval?retval:&dummy_retval);
var_reset(EG(return_value));
EG(return_value_ptr_ptr) = &local_retval_ptr;
EG(active_op_array) = new_op_array;
EG(no_extensions)=1;
zend_execute(new_op_array ELS_CC);
if (local_retval_ptr) {
if (retval_ptr) {
COPY_PZVAL_TO_ZVAL(*retval_ptr, local_retval_ptr);
} else {
zval_ptr_dtor(&local_retval_ptr);
}
} else {
if (retval_ptr) {
INIT_ZVAL(*retval_ptr);
}
}
EG(no_extensions)=0;
EG(opline_ptr) = original_opline_ptr;
EG(active_op_array) = original_active_op_array;
EG(function_state_ptr) = original_function_state_ptr;
destroy_op_array(new_op_array);
efree(new_op_array);
EG(return_value) = original_return_value;
if (!retval) {
zval_dtor(&dummy_retval);
}
EG(return_value_ptr_ptr) = original_return_value_ptr_ptr;
retval = SUCCESS;
} else {
printf("Failed executing:\n%s\n", str);
retval = FAILURE;
}
zval_dtor(&pv);
return retval;
}
ZEND_API inline void zend_assign_to_variable_reference(znode *result, zval **variable_ptr_ptr, zval **value_ptr_ptr, temp_variable *Ts ELS_DC)
{
zval *variable_ptr = *variable_ptr_ptr;
zval *value_ptr;
if (!value_ptr_ptr) {
zend_error(E_ERROR, "Cannot create references to string offsets nor overloaded objects");
return;
}
value_ptr = *value_ptr_ptr;
if (variable_ptr == EG(error_zval_ptr) || value_ptr==EG(error_zval_ptr)) {
variable_ptr_ptr = &EG(uninitialized_zval_ptr);
} else if (variable_ptr==&EG(uninitialized_zval) || variable_ptr!=value_ptr) {
variable_ptr->refcount--;
if (variable_ptr->refcount==0) {
zendi_zval_dtor(*variable_ptr);
efree(variable_ptr);
}
if (!PZVAL_IS_REF(value_ptr)) {
/* break it away */
value_ptr->refcount--;
if (value_ptr->refcount>0) {
*value_ptr_ptr = (zval *) emalloc(sizeof(zval));
**value_ptr_ptr = *value_ptr;
value_ptr = *value_ptr_ptr;
zendi_zval_copy_ctor(*value_ptr);
}
value_ptr->refcount = 1;
value_ptr->EA.is_ref = 1;
value_ptr->EA.locks = 0;
}
*variable_ptr_ptr = value_ptr;
value_ptr->refcount++;
} else {
/* nothing to do */
}
if (result && (result->op_type != IS_UNUSED)) {
Ts[result->u.var].var = variable_ptr_ptr;
PZVAL_LOCK(*variable_ptr_ptr);
}
}
#if SUPPORT_INTERACTIVE
void execute_new_code(CLS_D)
@@ -475,32 +550,159 @@ void execute_new_code(CLS_D)
#endif
/* these are a dedicated, optimized, function, and shouldn't be used for any purpose
* other than by Zend's executor
*/
ZEND_API inline void zend_ptr_stack_clear_multiple(ELS_D)
void zend_timeout(int dummy)
{
void **p = EG(argument_stack).top_element-1;
int delete_count = (ulong) *p;
ELS_FETCH();
EG(argument_stack).top -= (delete_count+1);
while (--delete_count>=0) {
zval_ptr_dtor((zval **) --p);
/* is there any point in this? we're terminating the request anyway...
PLS_FETCH();
PG(connection_status) |= PHP_CONNECTION_TIMEOUT;
*/
zend_error(E_ERROR, "Maximum execution time of %d second%s exceeded",
EG(timeout_seconds), EG(timeout_seconds) == 1 ? "" : "s");
}
#ifdef ZEND_WIN32
static LRESULT CALLBACK zend_timeout_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message) {
case WM_DESTROY:
PostQuitMessage(0);
break;
case WM_REGISTER_ZEND_TIMEOUT:
/* wParam is the thread id pointer, lParam is the timeout amount in seconds */
if (lParam==0) {
KillTimer(timeout_window, wParam);
} else {
SetTimer(timeout_window, wParam, lParam*1000, NULL);
}
break;
case WM_UNREGISTER_ZEND_TIMEOUT:
/* wParam is the thread id pointer */
KillTimer(timeout_window, wParam);
break;
case WM_TIMER: {
#ifdef ZTS
zend_executor_globals *executor_globals;
executor_globals = ts_resource_ex(executor_globals_id, &wParam);
if (!executor_globals) {
/* Thread died before receiving its timeout? */
break;
}
#endif
KillTimer(timeout_window, wParam);
EG(timed_out) = 1;
}
break;
default:
return DefWindowProc(hWnd,message,wParam,lParam);
}
EG(argument_stack).top_element = p;
return 0;
}
ZEND_API int zend_ptr_stack_get_arg(int requested_arg, void **data ELS_DC)
static unsigned __stdcall timeout_thread_proc(void *pArgs)
{
void **p = EG(argument_stack).top_element-1;
int arg_count = (ulong) *p;
MSG message;
if (requested_arg>arg_count) {
return FAILURE;
wc.style=0;
wc.lpfnWndProc = zend_timeout_WndProc;
wc.cbClsExtra=0;
wc.cbWndExtra=0;
wc.hInstance=NULL;
wc.hIcon=NULL;
wc.hCursor=NULL;
wc.hbrBackground=(HBRUSH)(COLOR_BACKGROUND + 5);
wc.lpszMenuName=NULL;
wc.lpszClassName = "Zend Timeout Window";
if(!RegisterClass(&wc)) {
return -1;
}
*data = (p-arg_count+requested_arg-1);
return SUCCESS;
timeout_window = CreateWindow(wc.lpszClassName, wc.lpszClassName, 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, NULL, NULL);
SetEvent(timeout_thread_event);
while (GetMessage(&message, NULL, 0, 0)) {
SendMessage(timeout_window, message.message, message.wParam, message.lParam);
if (message.message == WM_QUIT) {
break;
}
}
DestroyWindow(timeout_window);
UnregisterClass(wc.lpszClassName, NULL);
return 0;
}
void zend_init_timeout_thread()
{
timeout_thread_event = CreateEvent(NULL, FALSE, FALSE, NULL);
_beginthreadex(NULL, 0, timeout_thread_proc, NULL, 0, &timeout_thread_id);
WaitForSingleObject(timeout_thread_event, INFINITE);
}
void zend_shutdown_timeout_thread()
{
if (!timeout_thread_initialized) {
return;
}
PostThreadMessage(timeout_thread_id, WM_QUIT, 0, 0);
}
#endif
/* This one doesn't exists on QNX */
#ifndef SIGPROF
#define SIGPROF 27
#endif
void zend_set_timeout(long seconds)
{
ELS_FETCH();
EG(timeout_seconds) = seconds;
#ifdef ZEND_WIN32
if (timeout_thread_initialized==0 && InterlockedIncrement(&timeout_thread_initialized)==1) {
/* We start up this process-wide thread here and not in zend_startup(), because if Zend
* is initialized inside a DllMain(), you're not supposed to start threads from it.
*/
zend_init_timeout_thread();
}
PostThreadMessage(timeout_thread_id, WM_REGISTER_ZEND_TIMEOUT, (WPARAM) GetCurrentThreadId(), (LPARAM) seconds);
#else
# ifdef HAVE_SETITIMER
{
struct itimerval t_r; /* timeout requested */
t_r.it_value.tv_sec = seconds;
t_r.it_value.tv_usec = t_r.it_interval.tv_sec = t_r.it_interval.tv_usec = 0;
setitimer(ITIMER_PROF, &t_r, NULL);
signal(SIGPROF, zend_timeout);
}
# endif
#endif
}
void zend_unset_timeout(void)
{
ELS_FETCH();
#ifdef ZEND_WIN32
PostThreadMessage(timeout_thread_id, WM_UNREGISTER_ZEND_TIMEOUT, (WPARAM) GetCurrentThreadId(), (LPARAM) 0);
#else
# ifdef HAVE_SETITIMER
{
struct itimerval no_timeout;
no_timeout.it_value.tv_sec = no_timeout.it_value.tv_usec = no_timeout.it_interval.tv_sec = no_timeout.it_interval.tv_usec = 0;
setitimer(ITIMER_PROF, &no_timeout, NULL);
}
# endif
#endif
}
+22
View File
@@ -0,0 +1,22 @@
#ifndef _ZEND_EXECUTE_LOCKS_H
#define _ZEND_EXECUTE_LOCKS_H
#define PZVAL_LOCK(z) ((z)->refcount++)
#define PZVAL_UNLOCK(z) { ((z)->refcount--); \
if (!(z)->refcount) { \
(z)->refcount = 1; \
(z)->is_ref = 0; \
EG(garbage)[EG(garbage_ptr)++] = (z); \
if (EG(garbage_ptr) == 4) { \
zval_ptr_dtor(&EG(garbage)[0]); \
zval_ptr_dtor(&EG(garbage)[1]); \
EG(garbage)[0] = EG(garbage)[2]; \
EG(garbage)[1] = EG(garbage)[3]; \
EG(garbage_ptr) -= 2; \
} \
} \
}
#define SELECTIVE_PZVAL_LOCK(pzv, pzn) if (!((pzn)->u.EA.type & EXT_TYPE_UNUSED)) { PZVAL_LOCK(pzv); }
#endif /* _ZEND_EXECUTE_LOCKS_H */
+67 -22
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -44,12 +44,12 @@ int zend_load_extension(char *path)
{
#if ZEND_EXTENSIONS_SUPPORT
DL_HANDLE handle;
zend_extension extension, *new_extension;
zend_extension *new_extension;
zend_extension_version_info *extension_version_info;
handle = DL_LOAD(path);
if (!handle) {
#if !(WIN32||WINNT)
#ifndef ZEND_WIN32
fprintf(stderr, "Failed loading %s: %s\n", path, dlerror());
#else
fprintf(stderr, "Failed loading %s\n", path);
@@ -65,18 +65,19 @@ int zend_load_extension(char *path)
}
if (extension_version_info->zend_extension_api_no > ZEND_EXTENSION_API_NO) {
fprintf(stderr, "%s requires Zend version %s or later\n"
"Current version %s, API version %d\n",
fprintf(stderr, "%s requires Zend Engine API version %d\n"
"The installed Zend Engine API version is %d\n\n",
new_extension->name,
extension_version_info->required_zend_version,
ZEND_VERSION,
extension_version_info->zend_extension_api_no,
ZEND_EXTENSION_API_NO);
DL_UNLOAD(handle);
return FAILURE;
} else if (extension_version_info->zend_extension_api_no < ZEND_EXTENSION_API_NO) {
/* we may be able to allow for downwards compatability in some harmless cases. */
fprintf(stderr, "%s is outdated (API version %d, current version %d)\n"
"Contact %s at %s for a later version of this module.\n",
fprintf(stderr, "%s designed to be used with the Zend Engine API %d is outdated\n"
"It requires a more recent version of the Zend Engine\n"
"The installed Zend Engine API version is %d\n"
"Contact %s at %s for a later version of this module.\n\n",
new_extension->name,
extension_version_info->zend_extension_api_no,
ZEND_EXTENSION_API_NO,
@@ -91,36 +92,50 @@ int zend_load_extension(char *path)
(ZTS_V?"is":"isn't"));
DL_UNLOAD(handle);
return FAILURE;
} else if (ZEND_DEBUG_V!=extension_version_info->debug) {
} else if (ZEND_DEBUG!=extension_version_info->debug) {
fprintf(stderr, "Cannot load %s - it %s debug information, whereas Zend %s\n",
new_extension->name,
(extension_version_info->debug?"contains":"does not contain"),
(ZEND_DEBUG_V?"does":"does not"));
(ZEND_DEBUG?"does":"does not"));
DL_UNLOAD(handle);
return FAILURE;
}
return zend_register_extension(new_extension, handle);
#else
fprintf(stderr, "Extensions are not supported on this platform.\n");
return FAILURE;
#endif
}
int zend_register_extension(zend_extension *new_extension, DL_HANDLE handle)
{
#if ZEND_EXTENSIONS_SUPPORT
zend_extension extension;
if (new_extension->startup) {
if (new_extension->startup(new_extension)!=SUCCESS) {
DL_UNLOAD(handle);
return FAILURE;
}
}
extension = *new_extension;
extension.handle = handle;
zend_extension_dispatch_message(ZEND_EXTMSG_NEW_EXTENSION, &extension);
zend_llist_add_element(&zend_extensions, &extension);
/*fprintf(stderr, "Loaded %s, version %s\n", extension.name, extension.version);*/
zend_append_version_info(&extension);
return SUCCESS;
#else
fprintf(stderr, "Extensions are not supported on this platform.\n");
return FAILURE;
/*fprintf(stderr, "Loaded %s, version %s\n", extension.name, extension.version);*/
#endif
return SUCCESS;
}
static void zend_extension_shutdown(zend_extension *extension)
{
#if ZEND_EXTENSIONS_SUPPORT
@@ -131,6 +146,14 @@ static void zend_extension_shutdown(zend_extension *extension)
}
int zend_startup_extensions()
{
zend_llist_init(&zend_extensions, sizeof(zend_extension), (void (*)(void *)) zend_extension_dtor, 1);
last_resource_number = 0;
return SUCCESS;
}
void zend_shutdown_extensions()
{
zend_llist_apply(&zend_extensions, (void (*)(void *)) zend_extension_shutdown);
@@ -141,16 +164,38 @@ void zend_shutdown_extensions()
void zend_extension_dtor(zend_extension *extension)
{
#if ZEND_EXTENSIONS_SUPPORT
DL_UNLOAD(extension->handle);
if (extension->handle) {
DL_UNLOAD(extension->handle);
}
#endif
}
static void zend_extension_message_dispatcher(zend_extension *extension, int num_args, va_list args)
{
int message;
void *arg;
if (!extension->message_handler || num_args!=2) {
return;
}
message = va_arg(args, int);
arg = va_arg(args, void *);
extension->message_handler(message, arg);
}
ZEND_API void zend_extension_dispatch_message(int message, void *arg)
{
zend_llist_apply_with_arguments(&zend_extensions, (llist_apply_with_args_func_t) zend_extension_message_dispatcher, 2, message, arg);
}
ZEND_API int zend_get_resource_handle(zend_extension *extension)
{
if (last_resource_number<4) {
if (last_resource_number<ZEND_MAX_RESERVED_RESOURCES) {
extension->resource_number = last_resource_number;
return last_resource_number;
return last_resource_number++;
} else {
return -1;
}
+17 -22
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -23,7 +23,7 @@
#include "zend_compile.h"
#define ZEND_EXTENSION_API_NO 19990619
#define ZEND_EXTENSION_API_NO 20000622
typedef struct _zend_extension_version_info {
int zend_extension_api_no;
@@ -47,14 +47,16 @@ struct _zend_extension {
void (*activate)();
void (*deactivate)();
void (*message_handler)(int message, void *arg);
void (*op_array_handler)(zend_op_array *op_array);
void (*statement_handler)(zend_op_array *op_array);
void (*fcall_begin_handler)(zend_op_array *op_array);
void (*fcall_end_handler)(zend_op_array *op_array);
void (*op_array_ctor)(void **resource);
void (*op_array_dtor)(void **resource);
void (*op_array_ctor)(zend_op_array *op_array);
void (*op_array_dtor)(zend_op_array *op_array);
void *reserved1;
void *reserved2;
@@ -70,23 +72,14 @@ struct _zend_extension {
};
ZEND_API int zend_get_resource_handle();
ZEND_API int zend_get_resource_handle(zend_extension *extension);
ZEND_API void zend_extension_dispatch_message(int message, void *arg);
#ifdef ZTS
#define ZTS_V 1
#else
#define ZTS_V 0
#endif
#ifdef ZEND_DEBUG
#define ZEND_DEBUG_V 1
#else
#define ZEND_DEBUG_V 0
#endif
#define ZEND_EXTMSG_NEW_EXTENSION 1
#define ZEND_EXTENSION() \
ZEND_EXT_API zend_extension_version_info extension_version_info = { ZEND_EXTENSION_API_NO, "0.90", ZTS_V, ZEND_DEBUG_V }
ZEND_EXT_API zend_extension_version_info extension_version_info = { ZEND_EXTENSION_API_NO, ZEND_VERSION, ZTS_V, ZEND_DEBUG }
#define STANDARD_ZEND_EXTENSION_PROPERTIES NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -1
@@ -94,9 +87,11 @@ ZEND_API int zend_get_resource_handle();
ZEND_API extern zend_llist zend_extensions;
void zend_extension_dtor(zend_extension *extension);
int zend_load_extension(char *path);
int zend_load_extensions(char **extension_paths);
ZEND_API int zend_load_extension(char *path);
ZEND_API int zend_load_extensions(char **extension_paths);
ZEND_API int zend_register_extension(zend_extension *new_extension, DL_HANDLE handle);
void zend_append_version_info(zend_extension *extension);
void zend_shutdown_extensions();
int zend_startup_extensions(void);
void zend_shutdown_extensions(void);
#endif /* _ZEND_EXTENSIONS_H */
+140
View File
@@ -0,0 +1,140 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef _ZEND_FAST_CACHE_H
#define _ZEND_FAST_CACHE_H
#ifndef ZEND_ENABLE_FAST_CACHE
# if ZEND_DEBUG
# define ZEND_ENABLE_FAST_CACHE 0
# else
# define ZEND_ENABLE_FAST_CACHE 1
# endif
#endif
typedef struct _zend_fast_cache_list_entry {
struct _zend_fast_cache_list_entry *next;
} zend_fast_cache_list_entry;
#define MAX_FAST_CACHE_TYPES 4
#define ZVAL_CACHE_LIST 0
#define HASHTABLE_CACHE_LIST 1
#if ZEND_ENABLE_FAST_CACHE
#include "zend_globals.h"
#include "zend_globals_macros.h"
#include "zend_alloc.h"
#if ZEND_DEBUG
# define RECORD_ZVAL_CACHE_HIT(fc_type) AG(fast_cache_stats)[fc_type][1]++;
# define RECORD_ZVAL_CACHE_MISS(fc_type) AG(fast_cache_stats)[fc_type][0]++;
#else
# define RECORD_ZVAL_CACHE_HIT(fc_type)
# define RECORD_ZVAL_CACHE_MISS(fc_type)
#endif
#define ZEND_FAST_ALLOC(p, type, fc_type) \
{ \
ALS_FETCH(); \
\
if (((p) = (type *) AG(fast_cache_list_head)[fc_type])) { \
AG(fast_cache_list_head)[fc_type] = ((zend_fast_cache_list_entry *) AG(fast_cache_list_head)[fc_type])->next; \
RECORD_ZVAL_CACHE_HIT(fc_type); \
} else { \
(p) = (type *) emalloc(sizeof(type)); \
RECORD_ZVAL_CACHE_MISS(fc_type); \
} \
}
#define ZEND_FAST_FREE(p, fc_type) \
{ \
ALS_FETCH(); \
\
((zend_fast_cache_list_entry *) (p))->next = AG(fast_cache_list_head)[fc_type]; \
AG(fast_cache_list_head)[fc_type] = (zend_fast_cache_list_entry *) (p); \
}
#define ZEND_FAST_ALLOC_REL(p, type, fc_type) \
ZEND_FAST_ALLOC(p, type, fc_type)
#define ZEND_FAST_FREE_REL(p, fc_type) \
ZEND_FAST_FREE(p, fc_type)
#else /* !ZEND_ENABLE_FAST_CACHE */
#define ZEND_FAST_ALLOC(p, type, fc_type) \
(p) = (type *) emalloc(sizeof(type))
#define ZEND_FAST_FREE(p, fc_type) \
efree(p)
#define ZEND_FAST_ALLOC_REL(p, type, fc_type) \
(p) = (type *) emalloc_rel(sizeof(type))
#define ZEND_FAST_FREE_REL(p, fc_type) \
efree_rel(p)
#endif /* ZEND_ENABLE_FAST_CACHE */
/* fast cache for zval's */
#define ALLOC_ZVAL(z) \
ZEND_FAST_ALLOC(z, zval, ZVAL_CACHE_LIST)
#define FREE_ZVAL(z) \
ZEND_FAST_FREE(z, ZVAL_CACHE_LIST)
#define ALLOC_ZVAL_REL(z) \
ZEND_FAST_ALLOC_REL(z, zval, ZVAL_CACHE_LIST)
#define FREE_ZVAL_REL(z) \
ZEND_FAST_FREE_REL(z, ZVAL_CACHE_LIST)
/* fast cache for HashTables */
#define ALLOC_HASHTABLE(ht) \
ZEND_FAST_ALLOC(ht, HashTable, HASHTABLE_CACHE_LIST)
#define FREE_HASHTABLE(ht) \
ZEND_FAST_FREE(ht, HASHTABLE_CACHE_LIST)
#define ALLOC_HASHTABLE_REL(ht) \
ZEND_FAST_ALLOC_REL(ht, HashTable, HASHTABLE_CACHE_LIST)
#define FREE_HASHTABLE_REL(ht) \
ZEND_FAST_FREE_REL(ht, HASHTABLE_CACHE_LIST)
#endif /* _ZEND_FAST_CACHE_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
+17
View File
@@ -0,0 +1,17 @@
/*
* If C9X_INLINE_SEMANTICS is already defined here,
* we assume the user does not want GCC inline semantics,
* but compiles this file always.
*/
#ifndef C9X_INLINE_SEMANTICS
#define C9X_INLINE_SEMANTICS
#include "zend.h"
#include "zend_execute.h"
#include "zend_operators.h"
#endif
+65 -79
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -21,12 +21,16 @@
#ifndef _T_GLOBALS_H
#define _T_GLOBALS_H
#include <setjmp.h>
#include "zend_globals_macros.h"
#include "zend_stack.h"
#include "zend_ptr_stack.h"
#include "zend_hash.h"
#include "zend_llist.h"
#include "zend_fast_cache.h"
/* Define ZTS if you want a thread-safe Zend */
/*#undef ZTS*/
@@ -41,86 +45,31 @@ class ZendFlexLexer;
BEGIN_EXTERN_C()
ZEND_API extern int compiler_globals_id;
ZEND_API extern int executor_globals_id;
extern int alloc_globals_id;
ZEND_API extern int alloc_globals_id;
END_EXTERN_C()
#endif
typedef struct _zend_compiler_globals zend_compiler_globals;
typedef struct _zend_executor_globals zend_executor_globals;
typedef struct _zend_alloc_globals zend_alloc_globals;
#define SYMTABLE_CACHE_SIZE 32
/* Compiler */
#ifdef ZTS
# define CLS_D zend_compiler_globals *compiler_globals
# define CLS_DC , CLS_D
# define CLS_C compiler_globals
# define CLS_CC , CLS_C
# define CG(v) (((zend_compiler_globals *) compiler_globals)->v)
# define CLS_FETCH() zend_compiler_globals *compiler_globals = (zend_compiler_globals *) ts_resource(compiler_globals_id)
# define YYPARSE_PARAM compiler_globals
# define YYLEX_PARAM compiler_globals
BEGIN_EXTERN_C()
int zendparse(void *compiler_globals);
END_EXTERN_C()
#else
# define CLS_D
# define CLS_DC
# define CLS_C
# define CLS_CC
# define CG(v) (compiler_globals.v)
# define CLS_FETCH()
extern ZEND_API zend_compiler_globals compiler_globals;
int zendparse();
#endif
/* Executor */
#ifdef ZTS
# define ELS_D zend_executor_globals *executor_globals
# define ELS_DC , ELS_D
# define ELS_C executor_globals
# define ELS_CC , ELS_C
# define EG(v) (executor_globals->v)
# define ELS_FETCH() zend_executor_globals *executor_globals = (zend_executor_globals *) ts_resource(executor_globals_id)
#else
# define ELS_D
# define ELS_DC
# define ELS_C
# define ELS_CC
# define EG(v) (executor_globals.v)
# define ELS_FETCH()
extern ZEND_API zend_executor_globals executor_globals;
#endif
/* Memory Manager */
#ifdef ZTS
# define ALS_D zend_alloc_globals *alloc_globals
# define ALS_DC , ALS_D
# define ALS_C alloc_globals
# define ALS_CC , ALS_C
# define AG(v) (((zend_alloc_globals *) alloc_globals)->v)
# define ALS_FETCH() zend_alloc_globals *alloc_globals = (zend_alloc_globals *) ts_resource(alloc_globals_id)
#else
# define ALS_D
# define ALS_DC
# define ALS_C
# define ALS_CC
# define AG(v) (alloc_globals.v)
# define ALS_FETCH()
#endif
#include "zend_compile.h"
#include "zend_execute.h"
/* excpt.h on Digital Unix 4.0 defines function_table */
#undef function_table
typedef struct _zend_declarables {
zval ticks;
} zend_declarables;
struct _zend_compiler_globals {
zend_stack bp_stack;
zend_stack switch_cond_stack;
zend_stack foreach_copy_stack;
zend_stack object_stack;
zend_stack declare_stack;
zend_class_entry class_entry, *active_class_entry;
@@ -133,6 +82,7 @@ struct _zend_compiler_globals {
char *compiled_filename;
int zend_lineno;
int comment_start_line;
char *heredoc;
int heredoc_len;
@@ -141,10 +91,16 @@ struct _zend_compiler_globals {
HashTable *function_table; /* function symbol table */
HashTable *class_table; /* class table */
HashTable used_files; /* files already included using 'use' */
zend_llist filenames_list;
zend_bool in_compilation;
zend_bool short_tags;
zend_bool asp_tags;
zend_bool allow_call_time_pass_reference;
zend_declarables declarables;
/* For extensions support */
zend_bool extended_info; /* generate extension information for debugger/profiler */
@@ -164,7 +120,7 @@ struct _zend_compiler_globals {
struct _zend_executor_globals {
zval *return_value;
zval **return_value_ptr_ptr;
zval uninitialized_zval;
zval *uninitialized_zval_ptr;
@@ -174,7 +130,9 @@ struct _zend_executor_globals {
zend_function_state *function_state_ptr;
zend_ptr_stack arg_types_stack;
zend_stack overloaded_objects_stack;
/* for global return() support */
zval *global_return_value_ptr;
zval global_return_value;
/* symbol table cache */
@@ -187,6 +145,8 @@ struct _zend_executor_globals {
HashTable *active_symbol_table;
HashTable symbol_table; /* main symbol table */
HashTable included_files; /* files already included */
jmp_buf bailout;
int error_reporting;
@@ -200,28 +160,55 @@ struct _zend_executor_globals {
long precision;
int ticks_count;
zend_bool in_execution;
/* for extended information support */
unsigned char no_extensions;
zend_bool no_extensions;
#ifdef ZEND_WIN32
zend_bool timed_out;
#endif
HashTable regular_list;
HashTable persistent_list;
zend_ptr_stack argument_stack;
int free_op1, free_op2;
int (*unary_op)(zval *result, zval *op1);
int (*binary_op)(zval *result, zval *op1, zval *op2);
void *reserved[4];
zval *garbage[4];
int garbage_ptr;
zval *user_error_handler;
zend_ptr_stack user_error_handlers;
/* timeout support */
int timeout_seconds;
int lambda_count;
void *reserved[ZEND_MAX_RESERVED_RESOURCES];
#if SUPPORT_INTERACTIVE
int interactive;
#endif
};
struct _zend_alloc_globals {
mem_header *head; /* standard list */
mem_header *phead; /* persistent list */
zend_mem_header *head; /* standard list */
zend_mem_header *phead; /* persistent list */
void *cache[MAX_CACHED_MEMORY][MAX_CACHED_ENTRIES];
unsigned char cache_count[MAX_CACHED_MEMORY];
unsigned int cache_count[MAX_CACHED_MEMORY];
void *fast_cache_list_head[MAX_FAST_CACHE_TYPES];
#if ZEND_DEBUG
/* for performance tuning */
int cache_stats[MAX_CACHED_MEMORY][2];
int fast_cache_stats[MAX_FAST_CACHE_TYPES][2];
#endif
#if MEMORY_LIMIT
unsigned int memory_limit;
unsigned int allocated_memory;
@@ -229,5 +216,4 @@ struct _zend_alloc_globals {
#endif
};
#endif /* _T_GLOBALS_H */
+89
View File
@@ -0,0 +1,89 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef _ZEND_GLOBALS_MACROS_H
#define _ZEND_GLOBALS_MACROS_H
typedef struct _zend_compiler_globals zend_compiler_globals;
typedef struct _zend_executor_globals zend_executor_globals;
typedef struct _zend_alloc_globals zend_alloc_globals;
/* Compiler */
#ifdef ZTS
# define CLS_D zend_compiler_globals *compiler_globals
# define CLS_DC , CLS_D
# define CLS_C compiler_globals
# define CLS_CC , CLS_C
# define CG(v) (((zend_compiler_globals *) compiler_globals)->v)
# define CLS_FETCH() zend_compiler_globals *compiler_globals = (zend_compiler_globals *) ts_resource(compiler_globals_id)
BEGIN_EXTERN_C()
int zendparse(void *compiler_globals);
END_EXTERN_C()
#else
# define CLS_D void
# define CLS_DC
# define CLS_C
# define CLS_CC
# define CG(v) (compiler_globals.v)
# define CLS_FETCH()
extern ZEND_API struct _zend_compiler_globals compiler_globals;
int zendparse(void);
#endif
/* Executor */
#ifdef ZTS
# define ELS_D zend_executor_globals *executor_globals
# define ELS_DC , ELS_D
# define ELS_C executor_globals
# define ELS_CC , ELS_C
# define EG(v) (executor_globals->v)
# define ELS_FETCH() zend_executor_globals *executor_globals = (zend_executor_globals *) ts_resource(executor_globals_id)
#else
# define ELS_D void
# define ELS_DC
# define ELS_C
# define ELS_CC
# define EG(v) (executor_globals.v)
# define ELS_FETCH()
extern ZEND_API zend_executor_globals executor_globals;
#endif
/* Memory Manager */
#ifdef ZTS
# define ALS_D zend_alloc_globals *alloc_globals
# define ALS_DC , ALS_D
# define ALS_C alloc_globals
# define ALS_CC , ALS_C
# define AG(v) (((zend_alloc_globals *) alloc_globals)->v)
# define ALS_FETCH() zend_alloc_globals *alloc_globals = (zend_alloc_globals *) ts_resource(alloc_globals_id)
#else
# define ALS_D void
# define ALS_DC
# define ALS_C
# define ALS_CC
# define AG(v) (alloc_globals.v)
# define ALS_FETCH()
extern ZEND_API zend_alloc_globals alloc_globals;
#endif
#endif /* _ZEND_GLOBALS_MACROS_H */
+516 -482
View File
File diff suppressed because it is too large. Load diff
+75 -39
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -29,44 +29,56 @@
#define HASH_UPDATE (1<<0)
#define HASH_ADD (1<<1)
#define HASH_NEXT_INSERT (1<<2)
#define HASH_ADD_PTR (1<<3)
#define HASH_DEL_KEY 0
#define HASH_DEL_INDEX 1
struct hashtable;
typedef int (*compare_func_t)(const void *, const void *);
typedef void (*sort_func_t)(void *, size_t, register size_t, compare_func_t);
typedef void (*dtor_func_t)(void *pDest);
typedef int (*apply_func_t)(void *pDest);
typedef int (*apply_func_arg_t)(void *pDest, void *argument);
typedef ulong (*hash_func_t)(char *arKey, uint nKeyLength);
typedef void (*copy_ctor_func_t)(void *pElement);
struct _hashtable;
typedef struct bucket {
ulong h; /* Used for numeric indexing */
uint nKeyLength;
void *pData;
void *pDataPtr;
char bIsPointer;
struct bucket *pListNext;
struct bucket *pListLast;
struct bucket *pNext;
struct bucket *pLast;
char arKey[1]; /* Must be last element */
} Bucket;
typedef struct hashtable {
typedef struct _hashtable {
uint nTableSize;
uint nHashSizeIndex;
uint nNumOfElements;
ulong nNextFreeElement;
ulong(*pHashFunction) (char *arKey, uint nKeyLength);
hash_func_t pHashFunction;
Bucket *pInternalPointer; /* Used for element traversal */
Bucket *pListHead;
Bucket *pListTail;
Bucket **arBuckets;
int (*pDestructor) (void *pData);
unsigned char persistent;
dtor_func_t pDestructor;
zend_bool persistent;
unsigned char nApplyCount;
#if ZEND_DEBUG
int inconsistent;
#endif
} HashTable;
typedef Bucket* HashPosition;
BEGIN_EXTERN_C()
/* startup/shutdown */
ZEND_API int zend_hash_init(HashTable *ht, uint nSize, ulong(*pHashFunction) (char *arKey, uint nKeyLength), int (*pDestructor) (void *pData), int persistent);
ZEND_API int zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, int persistent);
ZEND_API void zend_hash_destroy(HashTable *ht);
ZEND_API void zend_hash_clean(HashTable *ht);
@@ -77,34 +89,36 @@ ZEND_API int zend_hash_add_or_update(HashTable *ht, char *arKey, uint nKeyLength
zend_hash_add_or_update(ht,arKey,nKeyLength,pData,nDataSize,pDest,HASH_UPDATE)
#define zend_hash_add(ht,arKey,nKeyLength,pData,nDataSize,pDest) \
zend_hash_add_or_update(ht,arKey,nKeyLength,pData,nDataSize,pDest,HASH_ADD)
#define zend_hash_update_ptr(ht,arKey,nKeyLength,pData,nDataSize,pDest) \
zend_hash_add_or_update(ht,arKey,nKeyLength,pData,0,pDest,(HASH_UPDATE|HASH_ADD_PTR))
ZEND_API int zend_hash_quick_add_or_update(HashTable *ht, char *arKey, uint nKeyLength, ulong h, void *pData, uint nDataSize, void **pDest,int flag);
#define zend_hash_quick_update(ht,arKey,nKeyLength,h,pData,nDataSize,pDest) \
zend_hash_quick_add_or_update(ht,arKey,nKeyLength,h,pData,nDataSize,pDest,HASH_UPDATE)
#define zend_hash_quick_add(ht,arKey,nKeyLength,h,pData,nDataSize,pDest) \
zend_hash_quick_add_or_update(ht,arKey,nKeyLength,h,pData,nDataSize,pDest,HASH_ADD)
#define zend_hash_quick_update_ptr(ht,arKey,nKeyLength,h,pData,nDataSize,pDest) \
zend_hash_quick_add_or_update(ht,arKey,nKeyLength,h,pData,0,pDest,HASH_UPDATE|HASH_ADD_PTR)
ZEND_API int zend_hash_index_update_or_next_insert(HashTable *ht, ulong h, void *pData, uint nDataSize, void **pDest, int flag);
#define zend_hash_index_update(ht,h,pData,nDataSize,pDest) \
zend_hash_index_update_or_next_insert(ht,h,pData,nDataSize,pDest,HASH_UPDATE)
#define zend_hash_next_index_insert(ht,pData,nDataSize,pDest) \
zend_hash_index_update_or_next_insert(ht,0,pData,nDataSize,pDest,HASH_NEXT_INSERT)
#define zend_hash_next_index_insert_ptr(ht,pData,nDataSize,pDest) \
zend_hash_index_update_or_next_insert(ht,0,pData,nDataSize,pDest,HASH_NEXT_INSERT|HASH_ADD_PTR)
ZEND_API int zend_hash_pointer_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData);
typedef struct _zend_hash_key {
char *arKey;
uint nKeyLength;
ulong h;
} zend_hash_key;
typedef int (*apply_func_args_t)(void *pDest, int num_args, va_list args, zend_hash_key *hash_key);
#define ZEND_STD_HASH_APPLIER \
int (*)(void *element, int num_args, va_list args, zend_hash_key *hash_key)
ZEND_API void zend_hash_graceful_destroy(HashTable *ht);
ZEND_API void zend_hash_apply(HashTable *ht, apply_func_t apply_func);
ZEND_API void zend_hash_apply_with_argument(HashTable *ht, apply_func_arg_t apply_func, void *);
ZEND_API void zend_hash_apply_with_arguments(HashTable *ht, ZEND_STD_HASH_APPLIER, int, ...);
ZEND_API int zend_hash_pointer_index_update_or_next_insert(HashTable *ht, ulong h, void *pData, int flag);
#define zend_hash_pointer_index_update(ht,h,pData) \
zend_hash_pointer_index_update_or_next_insert(ht,h,pData,HASH_UPDATE)
#define zend_hash_next_index_pointer_insert(ht,pData) \
zend_hash_pointer_index_update_or_next_insert(ht,0,pData,HASH_NEXT_INSERT)
ZEND_API void zend_hash_apply(HashTable *ht,int (*destruct) (void *));
ZEND_API void zend_hash_apply_with_argument(HashTable *ht,int (*destruct) (void *, void *), void *);
@@ -125,31 +139,46 @@ ZEND_API int zend_hash_index_find(HashTable *ht, ulong h, void **pData);
/* Misc */
ZEND_API int zend_hash_exists(HashTable *ht, char *arKey, uint nKeyLength);
ZEND_API int zend_hash_index_exists(HashTable *ht, ulong h);
ZEND_API int zend_hash_is_pointer(HashTable *ht, char *arKey, uint nKeyLength);
ZEND_API int zend_hash_index_is_pointer(HashTable *ht, ulong h);
ZEND_API ulong zend_hash_next_free_element(HashTable *ht);
/* traversing */
ZEND_API void zend_hash_move_forward(HashTable *ht);
ZEND_API void zend_hash_move_backwards(HashTable *ht);
ZEND_API int zend_hash_get_current_key(HashTable *ht, char **str_index, ulong *num_index);
ZEND_API int zend_hash_get_current_key_type(HashTable *ht);
ZEND_API int zend_hash_get_current_data(HashTable *ht, void **pData);
ZEND_API void zend_hash_internal_pointer_reset(HashTable *ht);
ZEND_API void zend_hash_internal_pointer_end(HashTable *ht);
ZEND_API int zend_hash_move_forward_ex(HashTable *ht, HashPosition *pos);
ZEND_API int zend_hash_move_backwards_ex(HashTable *ht, HashPosition *pos);
ZEND_API int zend_hash_get_current_key_ex(HashTable *ht, char **str_index, ulong *str_length, ulong *num_index, HashPosition *pos);
ZEND_API int zend_hash_get_current_key_type_ex(HashTable *ht, HashPosition *pos);
ZEND_API int zend_hash_get_current_data_ex(HashTable *ht, void **pData, HashPosition *pos);
ZEND_API void zend_hash_internal_pointer_reset_ex(HashTable *ht, HashPosition *pos);
ZEND_API void zend_hash_internal_pointer_end_ex(HashTable *ht, HashPosition *pos);
#define zend_hash_move_forward(ht) \
zend_hash_move_forward_ex(ht, NULL)
#define zend_hash_move_backwards(ht) \
zend_hash_move_backwards_ex(ht, NULL)
#define zend_hash_get_current_key(ht, str_index, num_index) \
zend_hash_get_current_key_ex(ht, str_index, NULL, num_index, NULL)
#define zend_hash_get_current_key_type(ht) \
zend_hash_get_current_key_type_ex(ht, NULL)
#define zend_hash_get_current_data(ht, pData) \
zend_hash_get_current_data_ex(ht, pData, NULL)
#define zend_hash_internal_pointer_reset(ht) \
zend_hash_internal_pointer_reset_ex(ht, NULL)
#define zend_hash_internal_pointer_end(ht) \
zend_hash_internal_pointer_end_ex(ht, NULL)
/* Copying, merging and sorting */
ZEND_API void zend_hash_copy(HashTable *target, HashTable *source, void (*pCopyConstructor) (void *pData), void *tmp, uint size);
ZEND_API void zend_hash_merge(HashTable *target, HashTable *source, void (*pCopyConstructor) (void *pData), void *tmp, uint size, int overwrite);
ZEND_API int zend_hash_sort(HashTable *ht, int (*compar) (const void *, const void *), int renumber);
ZEND_API int zend_hash_minmax(HashTable *ht, int (*compar) (const void *, const void *), int flag, void **pData);
ZEND_API void zend_hash_copy(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size);
ZEND_API void zend_hash_merge(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size, int overwrite);
ZEND_API int zend_hash_sort(HashTable *ht, sort_func_t sort_func, compare_func_t compare_func, int renumber);
ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t compar, zend_bool ordered);
ZEND_API int zend_hash_minmax(HashTable *ht, int (*compar)(const void *, const void *), int flag, void **pData);
ZEND_API int zend_hash_num_elements(HashTable *ht);
ZEND_API int zend_hash_rehash(HashTable *ht);
ZEND_API ulong hashpjw(char *arKey, uint nKeyLength);
#if DEBUG
#if ZEND_DEBUG
/* debug */
void zend_hash_display_pListTail(HashTable *ht);
void zend_hash_display(HashTable *ht);
@@ -157,4 +186,11 @@ void zend_hash_display(HashTable *ht);
END_EXTERN_C()
#define ZEND_INIT_SYMTABLE(ht) \
ZEND_INIT_SYMTABLE_EX(ht, 2, 0)
#define ZEND_INIT_SYMTABLE_EX(ht, n, persistent) \
zend_hash_init(ht, n, NULL, ZVAL_PTR_DTOR, persistent)
#endif /* _HASH_ */
+23 -10
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -19,6 +19,7 @@
#include "zend.h"
#include "zend-parser.h"
#include "zend_compile.h"
#include "zend_highlight.h"
#include "zend_ptr_stack.h"
@@ -32,7 +33,7 @@ extern int zendleng;
#define zendleng zend_get_zendleng(CLS_C)
#endif
static void html_putc(char c)
ZEND_API void zend_html_putc(char c)
{
switch (c) {
case '\n':
@@ -60,12 +61,12 @@ static void html_putc(char c)
}
static void html_puts(char *s, uint len)
ZEND_API void zend_html_puts(char *s, uint len)
{
register char *ptr=s, *end=s+len;
while (ptr<end) {
html_putc(*ptr++);
zend_html_putc(*ptr++);
}
}
@@ -80,6 +81,7 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
int in_string=0;
CLS_FETCH();
zend_printf("<code>");
zend_printf("<font color=\"%s\">\n", last_color);
/* highlight stuff coming back from zendlex() */
token.type = 0;
@@ -92,6 +94,7 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
next_color = syntax_highlighter_ini->highlight_comment;
break;
case T_OPEN_TAG:
case T_OPEN_TAG_WITH_ECHO:
next_color = syntax_highlighter_ini->highlight_default;
break;
case T_CLOSE_TAG:
@@ -105,7 +108,7 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
in_string = !in_string;
break;
case T_WHITESPACE:
html_puts(zendtext, zendleng); /* no color needed */
zend_html_puts(zendtext, zendleng); /* no color needed */
token.type = 0;
continue;
break;
@@ -132,17 +135,18 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
}
}
switch (token_type) {
case T_DOLLAR_OPEN_CURLY_BRACES:
html_puts("{", 1);
case T_END_HEREDOC:
zend_html_puts(token.value.str.val, token.value.str.len);
break;
default:
html_puts(zendtext, zendleng);
zend_html_puts(zendtext, zendleng);
break;
}
if (token.type == IS_STRING) {
switch (token_type) {
case T_OPEN_TAG:
case T_OPEN_TAG_WITH_ECHO:
case T_CLOSE_TAG:
case T_WHITESPACE:
break;
@@ -150,6 +154,14 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
efree(token.value.str.val);
break;
}
} else if (token_type == T_END_HEREDOC) {
zend_bool has_semicolon=(strchr(token.value.str.val, ';')?1:0);
efree(token.value.str.val);
if (has_semicolon) {
/* the following semicolon was unput(), ignore it */
lex_scan(&token CLS_CC);
}
}
token.type = 0;
}
@@ -157,6 +169,7 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
zend_printf("</font>\n");
}
zend_printf("</font>\n");
zend_printf("</code>");
}
/*
+5 -3
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -42,6 +42,8 @@ BEGIN_EXTERN_C()
ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini);
int highlight_file(char *filename, zend_syntax_highlighter_ini *syntax_highlighter_ini);
int highlight_string(zval *str, zend_syntax_highlighter_ini *syntax_highlighter_ini);
ZEND_API void zend_html_putc(char c);
ZEND_API void zend_html_puts(char *s, uint len);
END_EXTERN_C()
extern zend_syntax_highlighter_ini syntax_highlighter_ini;
+4 -3
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -22,6 +22,7 @@
#include "zend.h"
#include "zend-parser.h"
#include "zend_compile.h"
#include "zend_indent.h"
+4 -4
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -21,6 +21,6 @@
#ifndef _ZEND_INDENT_H
#define _ZEND_INDENT_H
ZEND_API void zend_indent();
ZEND_API void zend_indent(void);
#endif /* _ZEND_INDENT_H */
+210 -38
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -18,18 +18,23 @@
*/
/* resource lists */
#include "zend.h"
#include "zend_list.h"
#include "zend_API.h"
#include "zend_globals.h"
ZEND_API int le_index_ptr;
static inline int zend_list_do_insert(HashTable *list,void *ptr, int type)
/* true global */
static HashTable list_destructors;
static inline int zend_list_do_insert(HashTable *list, void *ptr, int type, zend_bool valid)
{
int index;
list_entry le;
zend_rsrc_list_entry le;
index = zend_hash_next_free_element(list);
@@ -38,13 +43,14 @@ static inline int zend_list_do_insert(HashTable *list,void *ptr, int type)
le.ptr=ptr;
le.type=type;
le.refcount=1;
zend_hash_index_update(list, index, (void *) &le, sizeof(list_entry), NULL);
le.valid = valid;
zend_hash_index_update(list, index, (void *) &le, sizeof(zend_rsrc_list_entry), NULL);
return index;
}
static inline int zend_list_do_delete(HashTable *list,int id)
{
list_entry *le;
zend_rsrc_list_entry *le;
ELS_FETCH();
if (zend_hash_index_find(&EG(regular_list), id, (void **) &le)==SUCCESS) {
@@ -62,7 +68,7 @@ static inline int zend_list_do_delete(HashTable *list,int id)
static inline void *zend_list_do_find(HashTable *list,int id, int *type)
{
list_entry *le;
zend_rsrc_list_entry *le;
if (zend_hash_index_find(list, id, (void **) &le)==SUCCESS) {
*type = le->type;
@@ -78,7 +84,7 @@ ZEND_API int zend_list_insert(void *ptr, int type)
{
ELS_FETCH();
return zend_list_do_insert(&EG(regular_list), ptr, type);
return zend_list_do_insert(&EG(regular_list), ptr, type, 1);
}
@@ -86,13 +92,13 @@ ZEND_API int zend_plist_insert(void *ptr, int type)
{
ELS_FETCH();
return zend_list_do_insert(&EG(persistent_list), ptr, type);
return zend_list_do_insert(&EG(persistent_list), ptr, type, 1);
}
ZEND_API int zend_list_addref(int id)
{
list_entry *le;
zend_rsrc_list_entry *le;
ELS_FETCH();
if (zend_hash_index_find(&EG(regular_list), id, (void **) &le)==SUCCESS) {
@@ -121,6 +127,20 @@ ZEND_API int zend_plist_delete(int id)
}
ZEND_API int zend_list_convert_to_number(int id)
{
zend_rsrc_list_entry *le;
ELS_FETCH();
if (zend_hash_index_find(&EG(regular_list), id, (void **) &le)==SUCCESS
&& le->valid) {
return id;
}
return 0;
}
ZEND_API void *zend_list_find(int id, int *type)
{
ELS_FETCH();
@@ -137,67 +157,155 @@ ZEND_API void *zend_plist_find(int id, int *type)
}
int list_entry_destructor(void *ptr)
ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type)
{
list_entry *le = (list_entry *) ptr;
list_destructors_entry *ld;
int rsrc_id;
rsrc_id = zend_list_insert(rsrc_pointer, rsrc_type);
if (zend_hash_index_find(&list_destructors,le->type,(void **) &ld)==SUCCESS) {
if (ld->list_destructor) {
(ld->list_destructor)(le->ptr);
if (rsrc_result) {
rsrc_result->value.lval = rsrc_id;
rsrc_result->type = IS_RESOURCE;
}
return rsrc_id;
}
ZEND_API int zend_register_false_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type)
{
int rsrc_id;
ELS_FETCH();
rsrc_id = zend_list_do_insert(&EG(regular_list), rsrc_pointer, rsrc_type, 0);
if (rsrc_result) {
rsrc_result->value.lval = rsrc_id;
rsrc_result->type = IS_RESOURCE;
}
return rsrc_id;
}
ZEND_API void *zend_fetch_resource(zval **passed_id, int default_id, char *resource_type_name, int *found_resource_type, int num_resource_types, ...)
{
int id;
int actual_resource_type;
void *resource;
va_list resource_types;
int i;
if (default_id==-1) { /* use id */
if (!passed_id) {
if (resource_type_name) {
zend_error(E_WARNING, "No %s resource supplied", resource_type_name);
}
return NULL;
} else if ((*passed_id)->type != IS_RESOURCE) {
if (resource_type_name) {
zend_error(E_WARNING, "Supplied argument is not a valid %s resource", resource_type_name);
}
return NULL;
}
id = (*passed_id)->value.lval;
} else {
id = default_id;
}
resource = zend_list_find(id, &actual_resource_type);
if (!resource) {
if (resource_type_name) {
zend_error(E_WARNING, "%d is not a valid %s resource", id, resource_type_name);
}
return NULL;
}
va_start(resource_types, num_resource_types);
for (i=0; i<num_resource_types; i++) {
if (actual_resource_type == va_arg(resource_types, int)) {
va_end(resource_types);
if (found_resource_type) {
*found_resource_type = actual_resource_type;
}
return resource;
}
}
va_end(resource_types);
if (resource_type_name) {
zend_error(E_WARNING, "Supplied resource is not a valid %s resource", resource_type_name);
}
return NULL;
}
void list_entry_destructor(void *ptr)
{
zend_rsrc_list_entry *le = (zend_rsrc_list_entry *) ptr;
zend_rsrc_list_dtors_entry *ld;
if (zend_hash_index_find(&list_destructors, le->type,(void **) &ld)==SUCCESS) {
switch (ld->type) {
case ZEND_RESOURCE_LIST_TYPE_STD:
if (ld->list_dtor) {
(ld->list_dtor)(le->ptr);
}
break;
case ZEND_RESOURCE_LIST_TYPE_EX:
if (ld->list_dtor_ex) {
ld->list_dtor_ex(le);
}
break;
EMPTY_SWITCH_DEFAULT_CASE()
}
} else {
zend_error(E_WARNING,"Unknown list entry type in request shutdown (%d)",le->type);
}
return 1;
}
int plist_entry_destructor(void *ptr)
void plist_entry_destructor(void *ptr)
{
list_entry *le = (list_entry *) ptr;
list_destructors_entry *ld;
zend_rsrc_list_entry *le = (zend_rsrc_list_entry *) ptr;
zend_rsrc_list_dtors_entry *ld;
if (zend_hash_index_find(&list_destructors,le->type,(void **) &ld)==SUCCESS) {
if (ld->plist_destructor) {
(ld->plist_destructor)(le->ptr);
if (zend_hash_index_find(&list_destructors, le->type,(void **) &ld)==SUCCESS) {
if (ld->plist_dtor) {
(ld->plist_dtor)(le->ptr);
}
} else {
zend_error(E_WARNING,"Unknown persistent list entry type in module shutdown (%d)",le->type);
}
return 1;
}
int init_resource_list(ELS_D)
int zend_init_rsrc_list(ELS_D)
{
return zend_hash_init(&EG(regular_list), 0, NULL, list_entry_destructor, 0);
}
int init_resource_plist(ELS_D)
int zend_init_rsrc_plist(ELS_D)
{
return zend_hash_init(&EG(persistent_list), 0, NULL, plist_entry_destructor, 1);
}
void destroy_resource_list(void)
void zend_destroy_rsrc_list(ELS_D)
{
ELS_FETCH();
zend_hash_destroy(&EG(regular_list));
zend_hash_graceful_destroy(&EG(regular_list));
}
void destroy_resource_plist(void)
void zend_destroy_rsrc_plist(ELS_D)
{
ELS_FETCH();
zend_hash_destroy(&EG(persistent_list));
zend_hash_graceful_destroy(&EG(persistent_list));
}
static int clean_module_resource(list_entry *le, int *resource_id)
static int clean_module_resource(zend_rsrc_list_entry *le, int *resource_id)
{
if (le->type == *resource_id) {
return 1;
@@ -207,11 +315,12 @@ static int clean_module_resource(list_entry *le, int *resource_id)
}
int clean_module_resource_destructors(list_destructors_entry *ld, int *module_number)
static int zend_clean_module_rsrc_dtors_cb(zend_rsrc_list_dtors_entry *ld, int *module_number)
{
if (ld->module_number == *module_number) {
ELS_FETCH();
zend_hash_apply_with_argument(&EG(regular_list), (int (*)(void *,void *)) clean_module_resource, (void *) &(ld->resource_id));
zend_hash_apply_with_argument(&EG(persistent_list), (int (*)(void *,void *)) clean_module_resource, (void *) &(ld->resource_id));
return 1;
} else {
@@ -220,6 +329,69 @@ int clean_module_resource_destructors(list_destructors_entry *ld, int *module_nu
}
void zend_clean_module_rsrc_dtors(int module_number)
{
zend_hash_apply_with_argument(&list_destructors, (int (*)(void *,void *)) zend_clean_module_rsrc_dtors_cb, (void *) &module_number);
}
ZEND_API int zend_register_list_destructors(void (*ld)(void *), void (*pld)(void *), int module_number)
{
zend_rsrc_list_dtors_entry lde;
#if 0
printf("Registering destructors %d for module %d\n", list_destructors.nNextFreeElement, module_number);
#endif
lde.list_dtor=(void (*)(void *)) ld;
lde.plist_dtor=(void (*)(void *)) pld;
lde.list_dtor_ex = lde.plist_dtor_ex = NULL;
lde.module_number = module_number;
lde.resource_id = list_destructors.nNextFreeElement;
lde.type = ZEND_RESOURCE_LIST_TYPE_STD;
if (zend_hash_next_index_insert(&list_destructors, (void *) &lde, sizeof(zend_rsrc_list_dtors_entry), NULL)==FAILURE) {
return FAILURE;
}
return list_destructors.nNextFreeElement-1;
}
ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_func_t pld, int module_number)
{
zend_rsrc_list_dtors_entry lde;
#if 0
printf("Registering destructors %d for module %d\n", list_destructors.nNextFreeElement, module_number);
#endif
lde.list_dtor = NULL;
lde.plist_dtor = NULL;
lde.list_dtor_ex = ld;
lde.plist_dtor_ex = pld;
lde.module_number = module_number;
lde.resource_id = list_destructors.nNextFreeElement;
lde.type = ZEND_RESOURCE_LIST_TYPE_EX;
if (zend_hash_next_index_insert(&list_destructors,(void *) &lde, sizeof(zend_rsrc_list_dtors_entry),NULL)==FAILURE) {
return FAILURE;
}
return list_destructors.nNextFreeElement-1;
}
int zend_init_rsrc_list_dtors()
{
return zend_hash_init(&list_destructors, 50, NULL, NULL, 1);
}
void zend_destroy_rsrc_list_dtors()
{
zend_hash_destroy(&list_destructors);
}
/*
* Local variables:
* tab-width: 4
+55 -19
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -24,45 +24,81 @@
#include "zend_hash.h"
#include "zend_globals.h"
extern HashTable list_destructors;
typedef struct _list_entry {
#define ZEND_RESOURCE_LIST_TYPE_STD 1
#define ZEND_RESOURCE_LIST_TYPE_EX 2
typedef struct _zend_rsrc_list_entry {
void *ptr;
int type;
int refcount;
} list_entry;
zend_bool valid;
} zend_rsrc_list_entry;
typedef void (*rsrc_dtor_func_t)(zend_rsrc_list_entry *le);
typedef struct _zend_rsrc_list_dtors_entry {
/* old style destructors */
void (*list_dtor)(void *);
void (*plist_dtor)(void *);
/* new style destructors */
rsrc_dtor_func_t list_dtor_ex;
rsrc_dtor_func_t plist_dtor_ex;
typedef struct _list_destructors_entry {
void (*list_destructor)(void *);
void (*plist_destructor)(void *);
int module_number;
int resource_id;
} list_destructors_entry;
unsigned char type;
} zend_rsrc_list_dtors_entry;
#define register_list_destructors(ld,pld) _register_list_destructors((void (*)(void *))ld, (void (*)(void *))pld, module_number);
ZEND_API int _register_list_destructors(void (*ld)(void *), void (*pld)(void *), int module_number);
#define register_list_destructors(ld, pld) zend_register_list_destructors((void (*)(void *))ld, (void (*)(void *))pld, module_number);
ZEND_API int zend_register_list_destructors(void (*ld)(void *), void (*pld)(void *), int module_number);
ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_func_t pld, int module_number);
enum list_entry_type {
LE_DB=1000
};
int list_entry_destructor(void *ptr);
int plist_entry_destructor(void *ptr);
void list_entry_destructor(void *ptr);
void plist_entry_destructor(void *ptr);
int clean_module_resource_destructors(list_destructors_entry *ld, int *module_number);
int init_resource_list(ELS_D);
int init_resource_plist(ELS_D);
void destroy_resource_list(void);
void destroy_resource_plist(void);
void zend_clean_module_rsrc_dtors(int module_number);
int zend_init_rsrc_list(ELS_D);
int zend_init_rsrc_plist(ELS_D);
void zend_destroy_rsrc_list(ELS_D);
void zend_destroy_rsrc_plist(ELS_D);
int zend_init_rsrc_list_dtors();
void zend_destroy_rsrc_list_dtors();
ZEND_API int zend_list_insert(void *ptr, int type);
ZEND_API int zend_plist_insert(void *ptr, int type);
ZEND_API int zend_list_addref(int id);
ZEND_API int zend_list_delete(int id);
ZEND_API int zend_plist_delete(int id);
ZEND_API int zend_list_convert_to_number(int id);
ZEND_API void *zend_list_find(int id, int *type);
ZEND_API void *zend_plist_find(int id, int *type);
ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type);
ZEND_API void *zend_fetch_resource(zval **passed_id, int default_id, char *resource_type_name, int *found_resource_type, int num_resource_types, ...);
extern ZEND_API int le_index_ptr; /* list entry type for index pointers */
#define ZEND_VERIFY_RESOURCE(rsrc) \
if (!rsrc) { \
RETURN_NULL(); \
}
#define ZEND_FETCH_RESOURCE(rsrc, rsrc_type, passed_id, default_id, resource_type_name, resource_type) \
rsrc = (rsrc_type) zend_fetch_resource(passed_id, default_id, resource_type_name, NULL, 1, resource_type); \
ZEND_VERIFY_RESOURCE(rsrc);
#define ZEND_FETCH_RESOURCE2(rsrc, rsrc_type, passed_id, default_id, resource_type_name, resource_type1,resource_type2) \
rsrc = (rsrc_type) zend_fetch_resource(passed_id, default_id, resource_type_name, NULL, 2, resource_type1, resource_type2); \
ZEND_VERIFY_RESOURCE(rsrc);
#define ZEND_REGISTER_RESOURCE(rsrc_result, rsrc_pointer, rsrc_type) \
zend_register_resource(rsrc_result, rsrc_pointer, rsrc_type);
#endif
+83 -25
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -63,12 +63,12 @@ ZEND_API void zend_llist_prepend_element(zend_llist *l, void *element)
}
ZEND_API void zend_llist_del_element(zend_llist *l, void *element)
ZEND_API void zend_llist_del_element(zend_llist *l, void *element, int (*compare)(void *element1, void *element2))
{
zend_llist_element *current=l->head;
while (current) {
if (!memcmp(current->data, element, l->size)) {
if (compare(current->data, element)) {
if (current->prev) {
current->prev->next = current->next;
} else {
@@ -81,7 +81,7 @@ ZEND_API void zend_llist_del_element(zend_llist *l, void *element)
}
if (l->dtor) {
l->dtor(current->data);
efree(current);
pefree(current, l->persistent);
}
break;
}
@@ -121,7 +121,7 @@ ZEND_API void zend_llist_remove_tail(zend_llist *l)
l->tail->prev->next = NULL;
}
l->tail = l->tail->prev;
efree(old_tail);
pefree(old_tail, l->persistent);
}
}
@@ -148,6 +148,43 @@ ZEND_API void zend_llist_apply(zend_llist *l, void (*func)(void *data))
}
}
ZEND_API void zend_llist_sort(zend_llist *l, llist_compare_func_t comp_func)
{
int list_size=0, i;
zend_llist_element **elements;
zend_llist_element *element, **ptr;
for (element=l->head; element; element=element->next) {
list_size++;
}
if (list_size == 0) {
return;
}
elements = (zend_llist_element **) emalloc(list_size*sizeof(zend_llist_element *));
ptr = &elements[0];
for (element=l->head; element; element=element->next) {
*ptr++ = element;
}
qsort(elements, list_size, sizeof(zend_llist_element *), (int (*)(const void *, const void *)) comp_func);
l->head = elements[0];
elements[0]->prev = NULL;
for (i=1; i<list_size; i++) {
elements[i]->prev = elements[i-1];
elements[i-1]->next = elements[i];
}
elements[i-1]->next = NULL;
l->tail = elements[i-1];
efree(elements);
}
ZEND_API void zend_llist_apply_with_argument(zend_llist *l, void (*func)(void *data, void *arg), void *arg)
{
@@ -159,6 +196,19 @@ ZEND_API void zend_llist_apply_with_argument(zend_llist *l, void (*func)(void *d
}
ZEND_API void zend_llist_apply_with_arguments(zend_llist *l, llist_apply_with_args_func_t func, int num_args, ...)
{
zend_llist_element *element;
va_list args;
va_start(args, num_args);
for (element=l->head; element; element=element->next) {
func(element->data, num_args, args);
}
va_end(args);
}
ZEND_API int zend_llist_count(zend_llist *l)
{
zend_llist_element *element;
@@ -171,46 +221,54 @@ ZEND_API int zend_llist_count(zend_llist *l)
}
ZEND_API void *zend_llist_get_first(zend_llist *l)
ZEND_API void *zend_llist_get_first_ex(zend_llist *l, zend_llist_position *pos)
{
l->traverse_ptr = l->head;
if (l->traverse_ptr) {
return l->traverse_ptr->data;
zend_llist_position *current = pos ? pos : &l->traverse_ptr;
*current = l->head;
if (*current) {
return (*current)->data;
} else {
return NULL;
}
}
ZEND_API void *zend_llist_get_last(zend_llist *l)
ZEND_API void *zend_llist_get_last_ex(zend_llist *l, zend_llist_position *pos)
{
l->traverse_ptr = l->tail;
if (l->traverse_ptr) {
return l->traverse_ptr->data;
zend_llist_position *current = pos ? pos : &l->traverse_ptr;
*current = l->tail;
if (*current) {
return (*current)->data;
} else {
return NULL;
}
}
ZEND_API void *zend_llist_get_next(zend_llist *l)
ZEND_API void *zend_llist_get_next_ex(zend_llist *l, zend_llist_position *pos)
{
if (l->traverse_ptr) {
l->traverse_ptr = l->traverse_ptr->next;
if (l->traverse_ptr) {
return l->traverse_ptr->data;
zend_llist_position *current = pos ? pos : &l->traverse_ptr;
if (*current) {
*current = (*current)->next;
if (*current) {
return (*current)->data;
}
}
return NULL;
}
ZEND_API void *zend_llist_get_prev(zend_llist *l)
ZEND_API void *zend_llist_get_prev_ex(zend_llist *l, zend_llist_position *pos)
{
if (l->traverse_ptr) {
l->traverse_ptr = l->traverse_ptr->prev;
if (l->traverse_ptr) {
return l->traverse_ptr->data;
zend_llist_position *current = pos ? pos : &l->traverse_ptr;
if (*current) {
*current = (*current)->prev;
if (*current) {
return (*current)->data;
}
}
return NULL;
+25 -10
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -38,24 +38,39 @@ typedef struct _zend_llist {
zend_llist_element *traverse_ptr;
} zend_llist;
typedef int (*llist_compare_func_t)(const zend_llist_element *, const zend_llist_element *);
typedef void(*llist_apply_with_arg_func_t)(void *data, void *arg);
typedef void(*llist_apply_with_args_func_t)(void *data, int num_args, va_list args);
typedef void (*llist_apply_func_t)(void *);
typedef zend_llist_element* zend_llist_position;
BEGIN_EXTERN_C()
ZEND_API void zend_llist_init(zend_llist *l, size_t size, void (*dtor)(void *data), unsigned char persistent);
ZEND_API void zend_llist_add_element(zend_llist *l, void *element);
ZEND_API void zend_llist_prepend_element(zend_llist *l, void *element);
ZEND_API void zend_llist_del_element(zend_llist *l, void *element);
ZEND_API void zend_llist_del_element(zend_llist *l, void *element, int (*compare)(void *element1, void *element2));
ZEND_API void zend_llist_destroy(zend_llist *l);
ZEND_API void zend_llist_clean(zend_llist *l);
ZEND_API void zend_llist_remove_tail(zend_llist *l);
ZEND_API void zend_llist_copy(zend_llist *dst, zend_llist *src);
ZEND_API void zend_llist_apply(zend_llist *l, void (*func)(void *data));
ZEND_API void zend_llist_apply_with_argument(zend_llist *l, void (*func)(void *data, void *arg), void *arg);
ZEND_API void zend_llist_apply(zend_llist *l, llist_apply_func_t);
ZEND_API void zend_llist_apply_with_argument(zend_llist *l, llist_apply_with_arg_func_t, void *arg);
ZEND_API void zend_llist_apply_with_arguments(zend_llist *l, llist_apply_with_args_func_t func, int num_args, ...);
ZEND_API int zend_llist_count(zend_llist *l);
ZEND_API void zend_llist_sort(zend_llist *l, llist_compare_func_t comp_func);
/* traversal */
ZEND_API void *zend_llist_get_first(zend_llist *l);
ZEND_API void *zend_llist_get_last(zend_llist *l);
ZEND_API void *zend_llist_get_next(zend_llist *l);
ZEND_API void *zend_llist_get_prev(zend_llist *l);
ZEND_API void *zend_llist_get_first_ex(zend_llist *l, zend_llist_position *pos);
ZEND_API void *zend_llist_get_last_ex(zend_llist *l, zend_llist_position *pos);
ZEND_API void *zend_llist_get_next_ex(zend_llist *l, zend_llist_position *pos);
ZEND_API void *zend_llist_get_prev_ex(zend_llist *l, zend_llist_position *pos);
#define zend_llist_get_first(l) zend_llist_get_first_ex(l, NULL)
#define zend_llist_get_last(l) zend_llist_get_last_ex(l, NULL)
#define zend_llist_get_next(l) zend_llist_get_next_ex(l, NULL)
#define zend_llist_get_prev(l) zend_llist_get_prev_ex(l, NULL)
END_EXTERN_C()
#endif /* _ZEND_LLIST_H */
+36 -11
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -21,14 +21,33 @@
#ifndef _MODULES_H
#define _MODULES_H
#define INIT_FUNC_ARGS int type, int module_number
#define INIT_FUNC_ARGS_PASSTHRU type, module_number
#define INIT_FUNC_ARGS int type, int module_number ELS_DC
#define INIT_FUNC_ARGS_PASSTHRU type, module_number ELS_CC
#define SHUTDOWN_FUNC_ARGS int type, int module_number
#define SHUTDOWN_FUNC_ARGS_PASSTHRU type, module_number
#define ZEND_MODULE_INFO_FUNC_ARGS zend_module_entry *zend_module
#define ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU zend_module
#define GINIT_FUNC_ARGS void
#define GINIT_FUNC_ARGS_PASSTHRU
#define STANDARD_MODULE_PROPERTIES 0, 0, 0, NULL, 0
extern unsigned char first_arg_force_ref[];
extern unsigned char first_arg_allow_ref[];
extern unsigned char second_arg_force_ref[];
extern unsigned char second_arg_allow_ref[];
#include "zend.h"
#define ZEND_MODULE_API_NO 20000609
#ifdef ZTS
#define USING_ZTS 1
#else
#define USING_ZTS 0
#endif
#define STANDARD_MODULE_PROPERTIES_EX 0, 0, 0, NULL, 0, ZEND_DEBUG, USING_ZTS, ZEND_MODULE_API_NO
#define STANDARD_MODULE_PROPERTIES \
NULL, NULL, STANDARD_MODULE_PROPERTIES_EX
#define MODULE_PERSISTENT 1
#define MODULE_TEMPORARY 2
@@ -43,18 +62,24 @@ struct _zend_module_entry {
int (*request_startup_func)(INIT_FUNC_ARGS);
int (*request_shutdown_func)(SHUTDOWN_FUNC_ARGS);
void (*info_func)(ZEND_MODULE_INFO_FUNC_ARGS);
int request_started, module_started;
int (*global_startup_func)(void);
int (*global_shutdown_func)(void);
int globals_id;
int module_started;
unsigned char type;
void *handle;
int module_number;
unsigned char zend_debug;
unsigned char zts;
unsigned int zend_api;
};
extern HashTable module_registry;
extern void module_destructor(zend_module_entry *module);
extern int module_registry_cleanup(zend_module_entry *module);
extern int module_registry_request_startup(zend_module_entry *module);
void module_destructor(zend_module_entry *module);
int module_registry_cleanup(zend_module_entry *module);
int module_registry_request_startup(zend_module_entry *module);
#define ZEND_MODULE_DTOR (int (*)(void *)) module_destructor
#define ZEND_MODULE_DTOR (void (*)(void *)) module_destructor
#endif
+47 -34
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -23,8 +23,6 @@
#include "zend.h"
#include "zend_alloc.h"
#include "zend_compile.h"
#include "zend_variables.h"
#include "zend_operators.h"
#include "zend_extensions.h"
#include "zend_API.h"
@@ -32,11 +30,7 @@
static void zend_extension_op_array_ctor_handler(zend_extension *extension, zend_op_array *op_array)
{
if (extension->op_array_ctor) {
if (extension->resource_number>=0) {
extension->op_array_ctor(&op_array->reserved[extension->resource_number]);
} else {
extension->op_array_ctor(NULL);
}
extension->op_array_ctor(op_array);
}
}
@@ -44,11 +38,7 @@ static void zend_extension_op_array_ctor_handler(zend_extension *extension, zend
static void zend_extension_op_array_dtor_handler(zend_extension *extension, zend_op_array *op_array)
{
if (extension->op_array_dtor) {
if (extension->resource_number>=0) {
extension->op_array_dtor(&op_array->reserved[extension->resource_number]);
} else {
extension->op_array_dtor(NULL);
}
extension->op_array_dtor(op_array);
}
}
@@ -60,9 +50,9 @@ static void op_array_alloc_ops(zend_op_array *op_array)
void init_op_array(zend_op_array *op_array, int initial_ops_size)
void init_op_array(zend_op_array *op_array, int type, int initial_ops_size)
{
op_array->type = ZEND_USER_FUNCTION;
op_array->type = type;
#if SUPPORT_INTERACTIVE
{
ELS_FETCH();
@@ -78,7 +68,7 @@ void init_op_array(zend_op_array *op_array, int initial_ops_size)
}
#endif
op_array->refcount = (int *) emalloc(sizeof(int));
op_array->refcount = (zend_uint *) emalloc(sizeof(zend_uint));
*op_array->refcount = 1;
op_array->size = initial_ops_size;
op_array->last = 0;
@@ -99,11 +89,14 @@ void init_op_array(zend_op_array *op_array, int initial_ops_size)
op_array->uses_globals = 0;
op_array->return_reference = 0;
op_array->done_pass_two = 0;
zend_llist_apply_with_argument(&zend_extensions, (void (*)(void *, void *)) zend_extension_op_array_ctor_handler, op_array);
}
ZEND_API int destroy_zend_function(zend_function *function)
ZEND_API void destroy_zend_function(zend_function *function)
{
switch (function->type) {
case ZEND_USER_FUNCTION:
@@ -113,14 +106,13 @@ ZEND_API int destroy_zend_function(zend_function *function)
/* do nothing */
break;
}
return 1;
}
ZEND_API int destroy_zend_class(zend_class_entry *ce)
ZEND_API void destroy_zend_class(zend_class_entry *ce)
{
if (--(*ce->refcount)>0) {
return 1;
return;
}
switch (ce->type) {
case ZEND_USER_CLASS:
@@ -136,7 +128,6 @@ ZEND_API int destroy_zend_class(zend_class_entry *ce)
zend_hash_destroy(&ce->default_properties);
break;
}
return 1;
}
@@ -151,6 +142,11 @@ ZEND_API void destroy_op_array(zend_op_array *op_array)
zend_op *opline = op_array->opcodes;
zend_op *end = op_array->opcodes+op_array->last;
if (op_array->static_variables) {
zend_hash_destroy(op_array->static_variables);
FREE_HASHTABLE(op_array->static_variables);
}
if (--(*op_array->refcount)>0) {
return;
}
@@ -182,17 +178,26 @@ ZEND_API void destroy_op_array(zend_op_array *op_array)
if (op_array->brk_cont_array) {
efree(op_array->brk_cont_array);
}
if (op_array->static_variables) {
zend_hash_destroy(op_array->static_variables);
efree(op_array->static_variables);
if (op_array->done_pass_two) {
zend_llist_apply_with_argument(&zend_extensions, (void (*)(void *, void *)) zend_extension_op_array_dtor_handler, op_array);
}
zend_llist_apply_with_argument(&zend_extensions, (void (*)(void *, void *)) zend_extension_op_array_dtor_handler, op_array);
}
void init_op(zend_op *op CLS_DC)
{
memset(&op->result, 0, sizeof(znode));
op->lineno = CG(zend_lineno);
op->filename = zend_get_compiled_filename(CLS_C);
op->result.op_type = IS_UNUSED;
op->extended_value = 0;
memset(&op->op1, 0, sizeof(znode));
memset(&op->op2, 0, sizeof(znode));
}
zend_op *get_next_op(zend_op_array *op_array CLS_DC)
{
int next_op_num = op_array->last++;
zend_uint next_op_num = op_array->last++;
zend_op *next_op;
if (next_op_num >= op_array->size) {
@@ -211,9 +216,8 @@ zend_op *get_next_op(zend_op_array *op_array CLS_DC)
}
next_op = &(op_array->opcodes[next_op_num]);
next_op->lineno = CG(zend_lineno);
next_op->filename = zend_get_compiled_filename();
next_op->result.op_type = IS_UNUSED;
init_op(next_op CLS_CC);
return next_op;
}
@@ -288,20 +292,23 @@ int pass_two(zend_op_array *op_array)
if (CG(handle_op_arrays)) {
zend_llist_apply_with_argument(&zend_extensions, (void (*)(void *, void *)) zend_extension_op_array_handler, op_array);
}
op_array->done_pass_two = 1;
return 0;
}
void pass_include_eval(zend_op_array *op_array)
ZEND_API void pass_include_eval(zend_op_array *op_array)
{
zend_op *opline=op_array->opcodes, *end=opline+op_array->last;
while (opline<end) {
if (opline->op1.op_type==IS_CONST) {
opline->op1.u.constant.EA.is_ref = 1;
opline->op1.u.constant.is_ref = 1;
opline->op1.u.constant.refcount = 2; /* Make sure is_ref won't be reset */
}
if (opline->op2.op_type==IS_CONST) {
opline->op2.u.constant.EA.is_ref = 1;
opline->op2.u.constant.is_ref = 1;
opline->op2.u.constant.refcount = 2;
}
opline++;
}
@@ -367,6 +374,12 @@ ZEND_API void *get_binary_op(int opcode)
case ZEND_ASSIGN_CONCAT:
return (void *) concat_function;
break;
case ZEND_IS_IDENTICAL:
return (void *) is_identical_function;
break;
case ZEND_IS_NOT_IDENTICAL:
return (void *) is_not_identical_function;
break;
case ZEND_IS_EQUAL:
return (void *) is_equal_function;
break;
+553 -250
View File
File diff suppressed because it is too large. Load diff
+159 -7
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -21,6 +21,17 @@
#ifndef _OPERATORS_H
#define _OPERATORS_H
#include <errno.h>
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
#if WITH_BCMATH
#include "ext/bcmath/number.h"
#endif
#define MAX_LENGTH_OF_LONG 18
#define MAX_LENGTH_OF_DOUBLE 32
@@ -42,32 +53,173 @@ ZEND_API int shift_right_function(zval *result, zval *op1, zval *op2);
ZEND_API int concat_function(zval *result, zval *op1, zval *op2);
ZEND_API int is_equal_function(zval *result, zval *op1, zval *op2);
ZEND_API int is_identical_function(zval *result, zval *op1, zval *op2);
ZEND_API int is_not_identical_function(zval *result, zval *op1, zval *op2);
ZEND_API int is_not_equal_function(zval *result, zval *op1, zval *op2);
ZEND_API int is_smaller_function(zval *result, zval *op1, zval *op2);
ZEND_API int is_smaller_or_equal_function(zval *result, zval *op1, zval *op2);
ZEND_API inline int is_numeric_string(char *str, int length, long *lval, double *dval)
#if defined(C9X_INLINE_SEMANTICS)
{
long local_lval;
double local_dval;
char *end_ptr;
if (!length) {
return 0;
}
errno=0;
local_lval = strtol(str, &end_ptr, 10);
if (errno!=ERANGE && end_ptr == str+length) { /* integer string */
if (lval) {
*lval = local_lval;
}
return IS_LONG;
}
errno=0;
local_dval = strtod(str, &end_ptr);
if (errno!=ERANGE && end_ptr == str+length) { /* floating point string */
if (! zend_finite(local_dval)) {
/* "inf","nan" and maybe other weird ones */
return 0;
}
if (dval) {
*dval = local_dval;
}
#if WITH_BCMATH
if (length>16) {
register char *ptr=str, *end=str+length;
while(ptr<end) {
switch(*ptr++) {
case 'e':
case 'E':
/* scientific notation, not handled by the BC library */
return IS_DOUBLE;
break;
default:
break;
}
}
return FLAG_IS_BC;
} else {
return IS_DOUBLE;
}
#else
return IS_DOUBLE;
#endif
}
return 0;
}
#else
;
#endif
ZEND_API int increment_function(zval *op1);
ZEND_API int decrement_function(zval *op2);
BEGIN_EXTERN_C()
ZEND_API void convert_scalar_to_number(zval *op);
ZEND_API void convert_to_string(zval *op);
ZEND_API void _convert_to_string(zval *op ZEND_FILE_LINE_DC);
ZEND_API void convert_to_long(zval *op);
ZEND_API void convert_to_double(zval *op);
ZEND_API void convert_to_long_base(zval *op, int base);
ZEND_API void convert_to_null(zval *op);
ZEND_API void convert_to_boolean(zval *op);
ZEND_API void convert_to_array(zval *op);
ZEND_API void convert_to_object(zval *op);
ZEND_API int add_char_to_string(zval *result, zval *op1, zval *op2);
ZEND_API int add_string_to_string(zval *result, zval *op1, zval *op2);
ZEND_API void convert_to_double(zval *op);
#define convert_to_string(op) _convert_to_string((op) ZEND_FILE_LINE_CC)
ZEND_API double zend_string_to_double(const char *number, zend_uint length);
END_EXTERN_C()
ZEND_API int zval_is_true(zval *op);
ZEND_API int compare_function(zval *result, zval *op1, zval *op2);
ZEND_API int numeric_compare_function(zval *result, zval *op1, zval *op2);
ZEND_API int string_compare_function(zval *result, zval *op1, zval *op2);
ZEND_API void zend_str_tolower(char *str, unsigned int length);
ZEND_API int zend_binary_strcmp(zval *s1, zval *s2);
ZEND_API int zend_binary_strcasecmp(zval *s1, zval *s2);
ZEND_API int zend_binary_zval_strcmp(zval *s1, zval *s2);
ZEND_API int zend_binary_zval_strncmp(zval *s1, zval *s2, zval *s3);
ZEND_API int zend_binary_zval_strcasecmp(zval *s1, zval *s2);
ZEND_API int zend_binary_strcmp(char *s1, uint len1, char *s2, uint len2);
ZEND_API int zend_binary_strncmp(char *s1, uint len1, char *s2, uint len2, uint length);
ZEND_API int zend_binary_strcasecmp(char *s1, uint len1, char *s2, uint len2);
ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2);
ZEND_API void zend_compare_symbol_tables(zval *result, HashTable *ht1, HashTable *ht2);
ZEND_API void zend_compare_arrays(zval *result, zval *a1, zval *a2);
ZEND_API void zend_compare_objects(zval *result, zval *o1, zval *o2);
#define convert_to_ex_master(ppzv, lower_type, upper_type) \
if ((*ppzv)->type!=IS_##upper_type) { \
if (!(*ppzv)->is_ref) { \
SEPARATE_ZVAL(ppzv); \
} \
convert_to_##lower_type(*ppzv); \
}
#define convert_to_writable_ex_master(ppzv, lower_type, upper_type) \
if ((*ppzv)->type!=IS_##upper_type) { \
SEPARATE_ZVAL(ppzv); \
convert_to_##lower_type(*ppzv); \
}
#define convert_to_boolean_ex(ppzv) convert_to_ex_master(ppzv, boolean, BOOL)
#define convert_to_long_ex(ppzv) convert_to_ex_master(ppzv, long, LONG)
#define convert_to_double_ex(ppzv) convert_to_ex_master(ppzv, double, DOUBLE)
#define convert_to_string_ex(ppzv) convert_to_ex_master(ppzv, string, STRING)
#define convert_to_array_ex(ppzv) convert_to_ex_master(ppzv, array, ARRAY)
#define convert_to_object_ex(ppzv) convert_to_ex_master(ppzv, object, OBJECT)
#define convert_to_null_ex(ppzv) convert_to_ex_master(ppzv, null, NULL)
#define convert_to_writable_boolean_ex(ppzv) convert_to_writable_ex_master(ppzv, boolean, BOOL)
#define convert_to_writable_long_ex(ppzv) convert_to_writable_ex_master(ppzv, long, LONG)
#define convert_to_writable_double_ex(ppzv) convert_to_writable_ex_master(ppzv, double, DOUBLE)
#define convert_to_writable_string_ex(ppzv) convert_to_writable_ex_master(ppzv, string, STRING)
#define convert_to_writable_array_ex(ppzv) convert_to_writable_ex_master(ppzv, array, ARRAY)
#define convert_to_writable_object_ex(ppzv) convert_to_writable_ex_master(ppzv, object, OBJECT)
#define convert_to_writable_null_ex(ppzv) convert_to_writable_ex_master(ppzv, null, NULL)
#define convert_scalar_to_number_ex(ppzv) \
if ((*ppzv)->type!=IS_LONG && (*ppzv)->type!=IS_DOUBLE) { \
if (!(*ppzv)->is_ref) { \
SEPARATE_ZVAL(ppzv); \
} \
convert_scalar_to_number(*ppzv); \
}
#define Z_LVAL(zval) (zval).value.lval
#define Z_DVAL(zval) (zval).value.dval
#define Z_STRVAL(zval) (zval).value.str.val
#define Z_STRLEN(zval) (zval).value.str.len
#define Z_ARRVAL(zval) (zval).value.ht
#define Z_LVAL_P(zval_p) Z_LVAL(*zval_p)
#define Z_DVAL_P(zval_p) Z_DVAL(*zval_p)
#define Z_STRVAL_P(zval_p) Z_STRVAL(*zval_p)
#define Z_STRLEN_P(zval_p) Z_STRLEN(*zval_p)
#define Z_ARRVAL_P(zval_p) Z_ARRVAL(*zval_p)
#define Z_LVAL_PP(zval_pp) Z_LVAL(**zval_pp)
#define Z_DVAL_PP(zval_pp) Z_DVAL(**zval_pp)
#define Z_STRVAL_PP(zval_pp) Z_STRVAL(**zval_pp)
#define Z_STRLEN_PP(zval_pp) Z_STRLEN(**zval_pp)
#define Z_ARRVAL_PP(zval_pp) Z_ARRVAL(**zval_pp)
#define Z_TYPE(zval) (zval).type
#define Z_TYPE_P(zval_p) Z_TYPE(*zval_p)
#define Z_TYPE_PP(zval_pp) Z_TYPE(**zval_pp)
#endif
+57 -10
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -20,12 +20,14 @@
#include "zend.h"
#include "zend_ptr_stack.h"
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#endif
ZEND_API void zend_ptr_stack_init(zend_ptr_stack *stack)
{
stack->top_element = stack->elements = (void **) emalloc(sizeof(void *)*STACK_BLOCK_SIZE);
stack->max = STACK_BLOCK_SIZE;
stack->top_element = stack->elements = (void **) emalloc(sizeof(void *)*PTR_STACK_BLOCK_SIZE);
stack->max = PTR_STACK_BLOCK_SIZE;
stack->top = 0;
}
@@ -33,15 +35,49 @@ ZEND_API void zend_ptr_stack_init(zend_ptr_stack *stack)
ZEND_API inline void zend_ptr_stack_push(zend_ptr_stack *stack, void *ptr)
{
if (stack->top >= stack->max) { /* we need to allocate more memory */
short diff = stack->top_element-stack->elements;
stack->elements = (void **) erealloc(stack->elements, (sizeof(void *) * (stack->max *= 2 )));
stack->top_element = stack->elements+diff;
stack->top_element = stack->elements+stack->top;
}
stack->top++;
*(stack->top_element++) = ptr;
}
ZEND_API void zend_ptr_stack_n_push(zend_ptr_stack *stack, int count, ...)
{
va_list ptr;
void *elem;
if (stack->top+count > stack->max) { /* we need to allocate more memory */
stack->max *= 2;
stack->max += count;
stack->elements = (void **) erealloc(stack->elements, (sizeof(void *) * (stack->max)));
stack->top_element = stack->elements+stack->top;
}
va_start(ptr, count);
while (count>0) {
elem = va_arg(ptr, void *);
stack->top++;
*(stack->top_element++) = elem;
count--;
}
va_end(ptr);
}
ZEND_API void zend_ptr_stack_n_pop(zend_ptr_stack *stack, int count, ...)
{
va_list ptr;
void **elem;
va_start(ptr, count);
while (count>0) {
elem = va_arg(ptr, void **);
*elem = *(--stack->top_element);
stack->top--;
count--;
}
va_end(ptr);
}
ZEND_API inline void *zend_ptr_stack_pop(zend_ptr_stack *stack)
{
@@ -68,11 +104,22 @@ ZEND_API void zend_ptr_stack_apply(zend_ptr_stack *stack, void (*func)(void *))
}
ZEND_API void zend_ptr_stack_clean(zend_ptr_stack *stack, void (*func)(void *))
ZEND_API void zend_ptr_stack_clean(zend_ptr_stack *stack, void (*func)(void *), zend_bool free_elements)
{
zend_ptr_stack_apply(stack, func);
if (free_elements) {
int i = stack->top;
while (--i >= 0) {
efree(stack->elements[i]);
}
}
stack->top = 0;
stack->top_element = stack->elements;
}
ZEND_API int zend_ptr_stack_num_elements(zend_ptr_stack *stack)
{
return stack->top;
}
+9 -6
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -22,19 +22,22 @@
#define _ZEND_PTR_STACK_H
typedef struct _zend_ptr_stack {
short top, max;
int top, max;
void **elements;
void **top_element;
} zend_ptr_stack;
#define STACK_BLOCK_SIZE 64
#define PTR_STACK_BLOCK_SIZE 64
ZEND_API void zend_ptr_stack_init(zend_ptr_stack *stack);
ZEND_API void zend_ptr_stack_push(zend_ptr_stack *stack, void *ptr);
ZEND_API void zend_ptr_stack_n_push(zend_ptr_stack *stack, int count, ...);
ZEND_API void *zend_ptr_stack_pop(zend_ptr_stack *stack);
ZEND_API void zend_ptr_stack_n_pop(zend_ptr_stack *stack, int count, ...);
ZEND_API void zend_ptr_stack_destroy(zend_ptr_stack *stack);
ZEND_API void zend_ptr_stack_apply(zend_ptr_stack *stack, void (*func)(void *));
ZEND_API void zend_ptr_stack_clean(zend_ptr_stack *stack, void (*func)(void *));
ZEND_API void zend_ptr_stack_clean(zend_ptr_stack *stack, void (*func)(void *), zend_bool free_elements);
ZEND_API int zend_ptr_stack_num_elements(zend_ptr_stack *stack);
#endif /* _ZEND_PTR_STACK_H */
+6 -6
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -22,11 +22,11 @@
#include "zend.h"
#if HAVE_STDARG_H
#include <stdarg.h>
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#endif
#if BROKEN_SPRINTF
#if ZEND_BROKEN_SPRINTF
int zend_sprintf(char *buffer, const char *format, ...)
{
va_list args;
+49 -3
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -116,3 +116,49 @@ ZEND_API int zend_stack_count(zend_stack *stack)
{
return stack->top;
}
ZEND_API void zend_stack_apply(zend_stack *stack, int type, int (*apply_function)(void *element))
{
int i;
switch (type) {
case ZEND_STACK_APPLY_TOPDOWN:
for (i=stack->top-1; i>=0; i--) {
if (apply_function(stack->elements[i])) {
break;
}
}
break;
case ZEND_STACK_APPLY_BOTTOMUP:
for (i=0; i<stack->top; i++) {
if (apply_function(stack->elements[i])) {
break;
}
}
break;
}
}
ZEND_API void zend_stack_apply_with_argument(zend_stack *stack, int type, int (*apply_function)(void *element, void *arg), void *arg)
{
int i;
switch (type) {
case ZEND_STACK_APPLY_TOPDOWN:
for (i=stack->top-1; i>=0; i--) {
if (apply_function(stack->elements[i], arg)) {
break;
}
}
break;
case ZEND_STACK_APPLY_BOTTOMUP:
for (i=0; i<stack->top; i++) {
if (apply_function(stack->elements[i], arg)) {
break;
}
}
break;
}
}
+7 -3
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -38,6 +38,10 @@ ZEND_API int zend_stack_is_empty(zend_stack *stack);
ZEND_API int zend_stack_destroy(zend_stack *stack);
ZEND_API void **zend_stack_base(zend_stack *stack);
ZEND_API int zend_stack_count(zend_stack *stack);
ZEND_API void zend_stack_apply(zend_stack *stack, int type, int (*apply_function)(void *element));
ZEND_API void zend_stack_apply_with_argument(zend_stack *stack, int type, int (*apply_function)(void *element, void *arg), void *arg);
#define ZEND_STACK_APPLY_TOPDOWN 1
#define ZEND_STACK_APPLY_BOTTOMUP 2
#endif /* _ZEND_STACK_H */
+76
View File
@@ -0,0 +1,76 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
+----------------------------------------------------------------------+
*/
#include <stdlib.h>
#include "zend_static_allocator.h"
/* Not checking emalloc() and erealloc() return values as they are supposed to bailout */
inline static void block_init(Block *block, zend_uint block_size)
{
block->pos = block->bp = (char *) emalloc(block_size);
block->end = block->bp + block_size;
}
inline static char *block_allocate(Block *block, zend_uint size)
{
char *retval = block->pos;
if ((block->pos += size) >= block->end) {
return (char *)NULL;
}
return retval;
}
inline static void block_destroy(Block *block)
{
efree(block->bp);
}
void static_allocator_init(StaticAllocator *sa)
{
sa->Blocks = (Block *) emalloc(sizeof(Block));
block_init(sa->Blocks, ALLOCATOR_BLOCK_SIZE);
sa->num_blocks = 1;
sa->current_block = 0;
}
char *static_allocator_allocate(StaticAllocator *sa, zend_uint size)
{
char *retval;
retval = block_allocate(&sa->Blocks[sa->current_block], size);
if (retval) {
return retval;
}
sa->Blocks = (Block *) erealloc(sa->Blocks, ++sa->num_blocks);
sa->current_block++;
block_init(&sa->Blocks[sa->current_block], (size > ALLOCATOR_BLOCK_SIZE) ? size : ALLOCATOR_BLOCK_SIZE);
retval = block_allocate(&sa->Blocks[sa->current_block], size);
return retval;
}
void static_allocator_destroy(StaticAllocator *sa)
{
zend_uint i;
for (i=0; i<sa->num_blocks; i++) {
block_free(&sa->Blocks[i]);
}
efree(sa->Blocks);
}
+45
View File
@@ -0,0 +1,45 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef _STATIC_ALLOCATOR_H
#define _STATIC_ALLOCATOR_H
#define ALLOCATOR_BLOCK_SIZE 400000
/* Temporary */
typedef unsigned int zend_uint;
#define emalloc(s) malloc(s)
#define efree(p) free(p)
typedef struct _Block {
char *bp;
char *pos;
char *end;
} Block;
typedef struct _StaticAllocator {
Block *Blocks;
zend_uint num_blocks;
zend_uint current_block;
} StaticAllocator;
void static_allocator_init(StaticAllocator *sa);
char *static_allocator_allocate(StaticAllocator *sa, zend_uint size);
void static_allocator_destroy(StaticAllocator *sa);
#endif /* _STATIC_ALLOCATOR_H */
+66 -35
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -23,7 +23,6 @@
#include "zend_API.h"
#include "zend_globals.h"
#include "zend_constants.h"
#include "zend_variables.h"
#include "zend_list.h"
ZEND_API char *empty_string = ""; /* in order to save emalloc() and efree() time for
@@ -32,47 +31,49 @@ ZEND_API char *empty_string = ""; /* in order to save emalloc() and efree() time
* The macro STR_FREE() will not efree() it.
*/
ZEND_API char *undefined_variable_string = "\0";
/* this function MUST set the value for the variable to an empty string */
/* and empty strings must be evaluated as FALSE */
ZEND_API inline void var_reset(zval *var)
{
#if 0
var->type = IS_STRING;
var->value.str.val = empty_string;
var->value.str.len = 0;
#else
var->type = IS_BOOL;
var->value.lval = 0;
#endif
}
ZEND_API inline void var_uninit(zval *var)
{
var->type = IS_STRING;
var->value.str.val = undefined_variable_string;
var->value.str.len = 0;
var->type = IS_NULL;
}
ZEND_API int zval_dtor(zval *zvalue)
ZEND_API void _zval_dtor(zval *zvalue ZEND_FILE_LINE_DC)
{
if (zvalue->type==IS_LONG) {
return 1;
return;
}
switch(zvalue->type) {
case IS_STRING:
case IS_CONSTANT:
STR_FREE(zvalue->value.str.val);
STR_FREE_REL(zvalue->value.str.val);
break;
case IS_ARRAY: {
case IS_ARRAY:
case IS_CONSTANT_ARRAY: {
ELS_FETCH();
if (zvalue->value.ht && (zvalue->value.ht != &EG(symbol_table))) {
zend_hash_destroy(zvalue->value.ht);
efree(zvalue->value.ht);
FREE_HASHTABLE(zvalue->value.ht);
}
}
break;
case IS_OBJECT:
zend_hash_destroy(zvalue->value.obj.properties);
efree(zvalue->value.obj.properties);
FREE_HASHTABLE(zvalue->value.obj.properties);
break;
case IS_RESOURCE:
/* destroy resource */
@@ -81,23 +82,31 @@ ZEND_API int zval_dtor(zval *zvalue)
case IS_LONG:
case IS_DOUBLE:
case IS_BOOL:
case IS_NULL:
default:
return 1;
return;
break;
}
return 1;
}
void zval_add_ref(zval **p)
ZEND_API void zval_del_ref(zval **p)
{
(*p)->refcount--;
if ((*p)->refcount==0) {
zval_dtor(*p);
FREE_ZVAL(*p);
}
}
ZEND_API void zval_add_ref(zval **p)
{
(*p)->refcount++;
}
ZEND_API int zval_copy_ctor(zval *zvalue)
ZEND_API int _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
{
switch (zvalue->type) {
case IS_RESOURCE:
@@ -105,41 +114,42 @@ ZEND_API int zval_copy_ctor(zval *zvalue)
break;
case IS_BOOL:
case IS_LONG:
case IS_NULL:
break;
case IS_CONSTANT:
case IS_STRING:
if (zvalue->value.str.val) {
if (zvalue->value.str.len==0) {
if (zvalue->value.str.val==undefined_variable_string) {
zvalue->value.str.val = undefined_variable_string;
} else {
zvalue->value.str.val = empty_string;
}
zvalue->value.str.val = empty_string;
return SUCCESS;
}
}
zvalue->value.str.val = (char *) estrndup(zvalue->value.str.val, zvalue->value.str.len);
zvalue->value.str.val = (char *) estrndup_rel(zvalue->value.str.val, zvalue->value.str.len);
break;
case IS_ARRAY: {
case IS_ARRAY:
case IS_CONSTANT_ARRAY: {
zval *tmp;
HashTable *original_ht = zvalue->value.ht;
ELS_FETCH();
if (!zvalue->value.ht || zvalue->value.ht==&EG(symbol_table)) {
if (!zvalue->value.ht) {
var_reset(zvalue);
return FAILURE;
} else if (zvalue->value.ht==&EG(symbol_table)) {
return SUCCESS; /* do nothing */
}
zvalue->value.ht = (HashTable *) emalloc(sizeof(HashTable));
zend_hash_init(zvalue->value.ht, 0, NULL, PVAL_PTR_DTOR, 0);
zend_hash_copy(zvalue->value.ht, original_ht, (void (*)(void *)) zval_add_ref, (void *) &tmp, sizeof(zval *));
ALLOC_HASHTABLE_REL(zvalue->value.ht);
zend_hash_init(zvalue->value.ht, 0, NULL, ZVAL_PTR_DTOR, 0);
zend_hash_copy(zvalue->value.ht, original_ht, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
}
break;
case IS_OBJECT: {
zval *tmp;
HashTable *original_ht = zvalue->value.obj.properties;
zvalue->value.obj.properties = (HashTable *) emalloc(sizeof(HashTable));
zend_hash_init(zvalue->value.obj.properties, 0, NULL, PVAL_PTR_DTOR, 0);
zend_hash_copy(zvalue->value.obj.properties, original_ht, (void (*)(void *)) zval_add_ref, (void *) &tmp, sizeof(zval *));
ALLOC_HASHTABLE_REL(zvalue->value.obj.properties);
zend_hash_init(zvalue->value.obj.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
zend_hash_copy(zvalue->value.obj.properties, original_ht, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
}
break;
}
@@ -153,6 +163,27 @@ ZEND_API int zend_print_variable(zval *var)
}
#if ZEND_DEBUG
ZEND_API int _zval_copy_ctor_wrapper(zval *zvalue)
{
return zval_copy_ctor(zvalue);
}
ZEND_API void _zval_dtor_wrapper(zval *zvalue)
{
zval_dtor(zvalue);
}
ZEND_API void _zval_ptr_dtor_wrapper(zval **zval_ptr)
{
zval_ptr_dtor(zval_ptr);
}
#endif
/*
* Local variables:
* tab-width: 4
+29 -10
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -25,16 +25,35 @@
ZEND_API int zend_print_variable(zval *var);
BEGIN_EXTERN_C()
ZEND_API int zval_copy_ctor(zval *zvalue);
ZEND_API int zval_dtor(zval *zvalue);
ZEND_API int _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC);
ZEND_API void _zval_dtor(zval *zvalue ZEND_FILE_LINE_DC);
ZEND_API void _zval_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC);
#define zval_copy_ctor(zvalue) _zval_copy_ctor((zvalue) ZEND_FILE_LINE_CC)
#define zval_dtor(zvalue) _zval_dtor((zvalue) ZEND_FILE_LINE_CC)
#define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
#if ZEND_DEBUG
ZEND_API int _zval_copy_ctor_wrapper(zval *zvalue);
ZEND_API void _zval_dtor_wrapper(zval *zvalue);
ZEND_API void _zval_ptr_dtor_wrapper(zval **zval_ptr);
#define zval_copy_ctor_wrapper _zval_copy_ctor_wrapper
#define zval_dtor_wrapper _zval_dtor_wrapper
#define zval_ptr_dtor_wrapper _zval_ptr_dtor_wrapper
#else
#define zval_copy_ctor_wrapper _zval_copy_ctor
#define zval_dtor_wrapper _zval_dtor
#define zval_ptr_dtor_wrapper _zval_ptr_dtor
#endif
END_EXTERN_C()
ZEND_API int zval_ptr_dtor(zval **zval_ptr);
void zval_add_ref(zval **p);
#define PVAL_DESTRUCTOR (int (*)(void *)) zval_dtor
#define PVAL_PTR_DTOR (int (*)(void *)) zval_ptr_dtor
#define PVAL_COPY_CTOR (void (*)(void *)) zval_copy_ctor
ZEND_API void zval_add_ref(zval **p);
ZEND_API void zval_del_ref(zval **p);
#define ZVAL_DESTRUCTOR (void (*)(void *)) zval_dtor_wrapper
#define ZVAL_PTR_DTOR (void (*)(void *)) zval_ptr_dtor_wrapper
#define ZVAL_COPY_CTOR (void (*)(void *)) zval_copy_ctor_wrapper
ZEND_API void var_reset(zval *var);
ZEND_API void var_uninit(zval *var);
+1 -118
View File
@@ -1,118 +1 @@
/* This is the default configuration file to read -*- C -*- */
/* these are defined by automake */
#undef PACKAGE
#undef VERSION
#undef HAVE_STRUCT_FLOCK
#undef HAVE_TM_GMTOFF
#define CONFIGURATION_FILE_PATH "php3.ini"
#define USE_CONFIG_FILE 1
#undef HAVE_DMALLOC
/* Some global constants defined by conigure */
#undef PHP_BUILD_DATE
#undef PHP_OS
#undef PHP_UNAME
/* define uint by configure if it is missed (QNX and BSD derived) */
#undef uint
/* define ulong by configure if it is missed (most probably is) */
#undef ulong
/* type check for in_addr_t */
#undef in_addr_t
/* Define if you have dirent.h but opendir() resides in libc rather than in libdir */
/* This will cause HAVE_DIRENT_H defined twice sometimes, but it should be problem */
#undef HAVE_DIRENT_H
/* Define if you have the resolv library (-lresolv). */
#undef HAVE_LIBRESOLV
/* Define if you have the pam library (-lpam). */
#define HAVE_LIBPAM 0
/* Define if you have the bind library (-lbind). */
#define HAVE_LIBBIND 0
/* Define if you have Netscape LDAP instead of umich ldap or openldap*/
#define HAVE_NSLDAP 0
/* Define if you want safe mode enabled by default. */
#define PHP_SAFE_MODE 0
/* Set to the path to the dir containing safe mode executables */
#define PHP_SAFE_MODE_EXEC_DIR /usr/local/php/bin
/* Define if you want POST/GET/Cookie track variables by default */
#define PHP_TRACK_VARS 0
/* Undefine if you want stricter XML/SGML compliance by default */
/* (this disables "<?expression?>" by default) */
#define DEFAULT_SHORT_OPEN_TAG 1
/* Undefine if you do not want PHP by default to escape "'" */
/* in GET/POST/Cookie data */
#define MAGIC_QUOTES 1
/* Define both of these if you want the bundled REGEX library */
#define REGEX 0
#define HSREGEX 0
/* Define if you have and want to use libnsl */
#undef HAVE_LIBNSL
/* Define if you have and want to use libsocket */
#undef HAVE_LIBSOCKET
/* Define if you have the sendmail program available */
#define HAVE_SENDMAIL 0
/* Define if you are compiling PHP as an Apache module */
#define APACHE 0
/* Define if you are compiling PHP as an Apache module with mod_charset patch applied (aka Russian Apache)*/
#define USE_TRANSFER_TABLES 0
/* Define if you are compiling PHP as an fhttpd module */
#define FHTTPD 0
/* Define if your Apache creates an ap_config.h header file (only 1.3b6 and later) */
#define HAVE_AP_CONFIG_H 0
/* Define if your Apache has src/include/compat.h */
#define HAVE_OLD_COMPAT_H 0
/* Define if your Apache has src/include/ap_compat.h */
#define HAVE_AP_COMPAT_H 0
#ifndef DEBUG /* should be set to ZEND_DEBUG */
#define DEBUG 0
#endif
/* Define if you want to enable PHP RPC (experimental) */
#define PHP_RPC 0
/* Define if you want to prevent the CGI from working unless REDIRECT_STATUS is defined in the environment */
#define FORCE_CGI_REDIRECT 0
/* Define if you want to prevent the CGI from using path_info and path_translated */
#define DISCARD_PATH 0
/* Define if you want include() and other functions to be able to open
* http and ftp URLs as files.
*/
#define PHP3_URL_FOPEN 0
/* Define if you have broken header files like SunOS 4 */
#define MISSING_FCLOSE_DECL 0
/* Define if you have broken sprintf function like SunOS 4 */
#define BROKEN_SPRINTF 0
/* Define to compile PHP/Zend thread safe */
#undef ZTS
/* Leave this file alone */
+772 -56
View File
@@ -2,13 +2,454 @@ dnl $Id$
dnl
dnl This file contains local autoconf functions.
sinclude(dynlib.m4)
dnl PHP_EVAL_LIBLINE(LINE, SHARED-LIBADD)
dnl
dnl Use this macro, if you need to add libraries and or library search
dnl paths to the PHP build system which are only given in compiler
dnl notation.
dnl
AC_DEFUN(PHP_EVAL_LIBLINE,[
for ac_i in $1; do
case "$ac_i" in
-l*)
ac_ii=`echo $ac_i|cut -c 3-`
AC_ADD_LIBRARY($ac_ii,,$2)
;;
-L*)
ac_ii=`echo $ac_i|cut -c 3-`
AC_ADD_LIBPATH($ac_ii,$2)
;;
esac
done
])
dnl PHP_EVAL_INCLINE(LINE)
dnl
dnl Use this macro, if you need to add header search paths to the PHP
dnl build system which are only given in compiler notation.
dnl
AC_DEFUN(PHP_EVAL_INCLINE,[
for ac_i in $1; do
case "$ac_i" in
-I*)
ac_ii=`echo $ac_i|cut -c 3-`
AC_ADD_INCLUDE($ac_ii)
;;
esac
done
])
AC_DEFUN(PHP_READDIR_R_TYPE,[
dnl HAVE_READDIR_R is also defined by libmysql
AC_CHECK_FUNC(readdir_r,ac_cv_func_readdir_r=yes,ac_cv_func_readdir=no)
if test "$ac_cv_func_readdir_r" = "yes"; then
AC_CACHE_CHECK(for type of readdir_r, ac_cv_what_readdir_r,[
AC_TRY_RUN([
#define _REENTRANT
#include <sys/types.h>
#include <dirent.h>
main() {
DIR *dir;
struct dirent entry, *pentry;
dir = opendir("/");
if (!dir)
exit(1);
if (readdir_r(dir, &entry, &pentry) == 0)
exit(0);
exit(1);
}
],[
ac_cv_what_readdir_r=POSIX
],[
AC_TRY_CPP([
#define _REENTRANT
#include <sys/types.h>
#include <dirent.h>
int readdir_r(DIR *, struct dirent *);
],[
ac_cv_what_readdir_r=old-style
],[
ac_cv_what_readdir_r=none
])
],[
ac_cv_what_readdir_r=none
])
])
case "$ac_cv_what_readdir_r" in
POSIX)
AC_DEFINE(HAVE_POSIX_READDIR_R,1,[whether you have POSIX readdir_r]);;
old-style)
AC_DEFINE(HAVE_OLD_READDIR_R,1,[whether you have old-style readdir_r]);;
esac
fi
])
AC_DEFUN(PHP_SHLIB_SUFFIX_NAME,[
PHP_SUBST(SHLIB_SUFFIX_NAME)
SHLIB_SUFFIX_NAME=so
case "$host_alias" in
*hpux*)
SHLIB_SUFFIX_NAME=sl
;;
esac
])
AC_DEFUN(PHP_DEBUG_MACRO,[
DEBUG_LOG="$1"
cat >$1 <<X
CONFIGURE: $CONFIGURE_COMMAND
CC: $CC
CFLAGS: $CFLAGS
CPPFLAGS: $CPPFLAGS
CXX: $CXX
CXXFLAGS: $CXXFLAGS
INCLUDES: $INCLUDES
LDFLAGS: $LDFLAGS
LIBS: $LIBS
DLIBS: $DLIBS
SAPI: $PHP_SAPI
PHP_RPATHS: $PHP_RPATHS
uname -a: `uname -a`
X
cat >conftest.$ac_ext <<X
main()
{
exit(0);
}
X
(eval echo \"$ac_link\"; eval $ac_link && ./conftest) >>$1 2>&1
rm -fr conftest*
])
AC_DEFUN(PHP_MISSING_TIME_R_DECL,[
AC_MSG_CHECKING(for missing declarations of reentrant functions)
AC_TRY_COMPILE([#include <time.h>],[struct tm *(*func)() = localtime_r],[
:
],[
AC_DEFINE(MISSING_LOCALTIME_R_DECL,1,[Whether localtime_r is declared])
])
AC_TRY_COMPILE([#include <time.h>],[struct tm *(*func)() = gmtime_r],[
:
],[
AC_DEFINE(MISSING_GMTIME_R_DECL,1,[Whether gmtime_r is declared])
])
AC_TRY_COMPILE([#include <time.h>],[char *(*func)() = asctime_r],[
:
],[
AC_DEFINE(MISSING_ASCTIME_R_DECL,1,[Whether asctime_r is declared])
])
AC_TRY_COMPILE([#include <time.h>],[char *(*func)() = ctime_r],[
:
],[
AC_DEFINE(MISSING_CTIME_R_DECL,1,[Whether ctime_r is declared])
])
AC_TRY_COMPILE([#include <string.h>],[char *(*func)() = strtok_r],[
:
],[
AC_DEFINE(MISSING_STRTOK_R_DECL,1,[Whether strtok_r is declared])
])
AC_MSG_RESULT(done)
])
dnl
dnl PHP_LIBGCC_LIBPATH(gcc)
dnl Stores the location of libgcc in libgcc_libpath
dnl
AC_DEFUN(PHP_LIBGCC_LIBPATH,[
changequote({,})
libgcc_libpath="`$1 --print-libgcc-file-name|sed 's%/*[^/][^/]*$%%'`"
changequote([,])
])
AC_DEFUN(PHP_ARG_ANALYZE,[
case "[$]$1" in
shared,*)
ext_output="yes, shared"
ext_shared=yes
$1=`echo $ac_n "[$]$1$ac_c"|sed s/^shared,//`
;;
shared)
ext_output="yes, shared"
ext_shared=yes
$1=yes
;;
no)
ext_output="no"
ext_shared=no
;;
*)
ext_output="yes"
ext_shared=no
;;
esac
if test "$php_always_shared" = "yes"; then
ext_output="yes, shared"
ext_shared=yes
test "[$]$1" = "no" && $1=yes
fi
AC_MSG_RESULT($ext_output)
])
dnl
dnl PHP_ARG_WITH(arg-name, check message, help text[, default-val])
dnl Sets PHP_ARG_NAME either to the user value or to the default value.
dnl default-val defaults to no.
dnl
AC_DEFUN(PHP_ARG_WITH,[
PHP_REAL_ARG_WITH([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z-,A-Z_))
])
AC_DEFUN(PHP_REAL_ARG_WITH,[
AC_MSG_CHECKING($2)
AC_ARG_WITH($1,[$3],$5=[$]withval,$5=ifelse($4,,no,$4))
PHP_ARG_ANALYZE($5)
])
dnl
dnl PHP_ARG_ENABLE(arg-name, check message, help text[, default-val])
dnl Sets PHP_ARG_NAME either to the user value or to the default value.
dnl default-val defaults to no.
dnl
AC_DEFUN(PHP_ARG_ENABLE,[
PHP_REAL_ARG_ENABLE([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z-,A-Z_))
])
AC_DEFUN(PHP_REAL_ARG_ENABLE,[
AC_MSG_CHECKING($2)
AC_ARG_ENABLE($1,[$3],$5=[$]enableval,$5=ifelse($4,,no,$4))
PHP_ARG_ANALYZE($5)
])
AC_DEFUN(PHP_MODULE_PTR,[
EXTRA_MODULE_PTRS="$EXTRA_MODULE_PTRS $1,"
])
AC_DEFUN(PHP_CONFIG_NICE,[
rm -f $1
cat >$1<<EOF
#! /bin/sh
#
# Created by configure
EOF
for arg in [$]0 "[$]@"; do
echo "\"[$]arg\" \\" >> $1
done
echo '"[$]@"' >> $1
chmod +x $1
])
AC_DEFUN(PHP_TIME_R_TYPE,[
AC_CACHE_CHECK(for type of reentrant time-related functions, ac_cv_time_r_type,[
AC_TRY_RUN([
#include <time.h>
#include <stdlib.h>
main() {
char buf[27];
struct tm t;
time_t old = 0;
int r, s;
s = gmtime_r(&old, &t);
r = (int) asctime_r(&t, buf, 26);
if (r == s && s == 0) exit(0);
exit(1);
}
],[
ac_cv_time_r_type=hpux
],[
ac_cv_time_r_type=POSIX
],[
ac_cv_time_r_type=POSIX
])
])
if test "$ac_cv_time_r_type" = "hpux"; then
AC_DEFINE(PHP_HPUX_TIME_R,1,[Whether you have HP-UX 10.x])
fi
])
AC_DEFUN(PHP_SUBST,[
PHP_VAR_SUBST="$PHP_VAR_SUBST $1"
AC_SUBST($1)
])
AC_DEFUN(PHP_FAST_OUTPUT,[
PHP_FAST_OUTPUT_FILES="$PHP_FAST_OUTPUT_FILES $1"
])
AC_DEFUN(PHP_MKDIR_P_CHECK,[
AC_CACHE_CHECK(for working mkdir -p, ac_cv_mkdir_p,[
test -d conftestdir && rm -rf conftestdir
mkdir -p conftestdir/somedir >/dev/null 2>&1
if test -d conftestdir/somedir; then
ac_cv_mkdir_p=yes
else
ac_cv_mkdir_p=no
fi
rm -rf conftestdir
])
])
AC_DEFUN(PHP_GEN_CONFIG_VARS,[
PHP_MKDIR_P_CHECK
echo creating config_vars.mk
> config_vars.mk
for i in $PHP_VAR_SUBST; do
eval echo "$i = \$$i" >> config_vars.mk
done
])
AC_DEFUN(PHP_GEN_MAKEFILES,[
$SHELL $srcdir/build/fastgen.sh $srcdir $ac_cv_mkdir_p $PHP_FAST_OUTPUT_FILES
])
AC_DEFUN(PHP_TM_GMTOFF,[
AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_gmtoff;],
ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)])
if test "$ac_cv_struct_tm_gmtoff" = yes; then
AC_DEFINE(HAVE_TM_GMTOFF,1,[whether you have tm_gmtoff in struct tm])
fi
])
dnl PHP_CONFIGURE_PART(MESSAGE)
dnl Idea borrowed from mm
AC_DEFUN(PHP_CONFIGURE_PART,[
AC_MSG_RESULT()
AC_MSG_RESULT(${T_MD}$1${T_ME})
])
AC_DEFUN(PHP_PROG_SENDMAIL,[
AC_PATH_PROG(PROG_SENDMAIL, sendmail, /usr/lib/sendmail, $PATH:/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib)
if test -n "$PROG_SENDMAIL"; then
AC_DEFINE(HAVE_SENDMAIL,1,[whether you have sendmail])
fi
])
AC_DEFUN(PHP_RUNPATH_SWITCH,[
dnl check for -R, etc. switch
AC_MSG_CHECKING(if compiler supports -R)
AC_CACHE_VAL(php_cv_cc_dashr,[
SAVE_LIBS="${LIBS}"
LIBS="-R /usr/lib ${LIBS}"
AC_TRY_LINK([], [], php_cv_cc_dashr=yes, php_cv_cc_dashr=no)
LIBS="${SAVE_LIBS}"])
AC_MSG_RESULT($php_cv_cc_dashr)
if test $php_cv_cc_dashr = "yes"; then
ld_runpath_switch="-R"
else
AC_MSG_CHECKING([if compiler supports -Wl,-rpath,])
AC_CACHE_VAL(php_cv_cc_rpath,[
SAVE_LIBS="${LIBS}"
LIBS="-Wl,-rpath,/usr/lib ${LIBS}"
AC_TRY_LINK([], [], php_cv_cc_rpath=yes, php_cv_cc_rpath=no)
LIBS="${SAVE_LIBS}"])
AC_MSG_RESULT($php_cv_cc_rpath)
if test $php_cv_cc_rpath = "yes"; then
ld_runpath_switch="-Wl,-rpath,"
else
dnl something innocuous
ld_runpath_switch="-L"
fi
fi
])
AC_DEFUN(PHP_STRUCT_FLOCK,[
AC_CACHE_CHECK(for struct flock,ac_cv_struct_flock,
AC_TRY_COMPILE([
#include <unistd.h>
#include <fcntl.h>
],
[struct flock x;],
[
ac_cv_struct_flock=yes
],[
ac_cv_struct_flock=no
])
)
if test "$ac_cv_struct_flock" = "yes" ; then
AC_DEFINE(HAVE_STRUCT_FLOCK, 1,[whether you have struct flock])
fi
])
AC_DEFUN(PHP_SOCKLEN_T,[
AC_CACHE_CHECK(for socklen_t,ac_cv_socklen_t,
AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/socket.h>
],[
socklen_t x;
],[
ac_cv_socklen_t=yes
],[
ac_cv_socklen_t=no
]))
if test "$ac_cv_socklen_t" = "yes"; then
AC_DEFINE(HAVE_SOCKLEN_T, 1, [Whether you have socklen_t])
fi
])
dnl
dnl PHP_SET_SYM_FILE(path)
dnl
dnl set the path of the file which contains the symbol export list
dnl
AC_DEFUN(PHP_SET_SYM_FILE,
[
PHP_SYM_FILE="$1"
])
dnl
dnl PHP_BUILD_THREAD_SAFE
dnl
AC_DEFUN(PHP_BUILD_THREAD_SAFE,[
enable_experimental_zts=yes
if test "$pthreads_working" != "yes"; then
AC_MSG_ERROR(ZTS currently requires working POSIX threads. Your system does not support this.)
fi
])
dnl
dnl PHP_BUILD_SHARED
dnl
AC_DEFUN(PHP_BUILD_SHARED,[
php_build_target=shared
])
dnl
dnl PHP_BUILD_STATIC
dnl
AC_DEFUN(PHP_BUILD_STATIC,[
php_build_target=static
])
dnl
dnl PHP_BUILD_PROGRAM
dnl
AC_DEFUN(PHP_BUILD_PROGRAM,[
php_build_target=program
])
dnl
dnl AC_PHP_ONCE(namespace, variable, code)
dnl
dnl execute code, if variable is not set in namespace
dnl
AC_DEFUN(AC_PHP_ONCE,[
unique=`echo $ac_n "$2$ac_c" | tr -c -d a-zA-Z0-9`
changequote({,})
unique=`echo $2|sed 's/[^a-zA-Z0-9]/_/g'`
changequote([,])
cmd="echo $ac_n \"\$$1$unique$ac_c\""
if test -n "$unique" && test "`eval $cmd`" = "" ; then
eval "$1$unique=set"
@@ -25,26 +466,49 @@ AC_DEFUN(AC_EXPAND_PATH,[
if test -z "$1" || echo "$1" | grep '^/' >/dev/null ; then
$2="$1"
else
$2="`pwd`/$1"
changequote({,})
ep_dir="`echo $1|sed 's%/*[^/][^/]*$%%'`"
changequote([,])
ep_realdir="`(cd \"$ep_dir\" && pwd)`"
$2="$ep_realdir/`basename \"$1\"`"
fi
])
dnl
dnl AC_ADD_LIBPATH(path)
dnl AC_ADD_LIBPATH(path[, shared-libadd])
dnl
dnl add a library to linkpath/runpath
dnl
AC_DEFUN(AC_ADD_LIBPATH,[
AC_EXPAND_PATH($1, ai_p)
AC_PHP_ONCE(LIBPATH, $ai_p, [
EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
RAW_RPATHS="$RAW_RPATHS ${raw_runpath_switch}$ai_p"
if test -n "$APXS" ; then
RPATHS="$RPATHS ${apxs_runpath_switch}$ai_p'"
if test "$1" != "/usr/lib"; then
AC_EXPAND_PATH($1, ai_p)
if test "$ext_shared" = "yes" && test -n "$2"; then
$2="-R$1 -L$1 [$]$2"
else
RPATHS="$RPATHS ${ld_runpath_switch}$ai_p"
AC_PHP_ONCE(LIBPATH, $ai_p, [
test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
LDFLAGS="$LDFLAGS -L$ai_p"
PHP_RPATHS="$PHP_RPATHS $ai_p"
])
fi
])
fi
])
dnl
dnl AC_BUILD_RPATH()
dnl
dnl builds RPATH from PHP_RPATHS
dnl
AC_DEFUN(AC_BUILD_RPATH,[
if test "$PHP_RPATH" = "yes" && test -n "$PHP_RPATHS"; then
OLD_RPATHS="$PHP_RPATHS"
PHP_RPATHS=""
for i in $OLD_RPATHS; do
PHP_LDFLAGS="$PHP_LDFLAGS -L$i"
PHP_RPATHS="$PHP_RPATHS -R $i"
NATIVE_RPATHS="$NATIVE_RPATHS ${ld_runpath_switch}$i"
done
fi
])
dnl
@@ -53,33 +517,91 @@ dnl
dnl add a include path
dnl
AC_DEFUN(AC_ADD_INCLUDE,[
AC_EXPAND_PATH($1, ai_p)
AC_PHP_ONCE(INCLUDEPATH, $ai_p, [
INCLUDES="$INCLUDES -I$ai_p"
])
if test "$1" != "/usr/include"; then
AC_EXPAND_PATH($1, ai_p)
AC_PHP_ONCE(INCLUDEPATH, $ai_p, [
INCLUDES="$INCLUDES -I$ai_p"
])
fi
])
AC_DEFUN(PHP_X_ADD_LIBRARY,[
ifelse($2,,$3="-l$1 [$]$3", $3="[$]$3 -l$1")
])
dnl
dnl AC_ADD_LIBRARY(library)
dnl AC_ADD_LIBRARY(library[, append[, shared-libadd]])
dnl
dnl add a library to the link line
dnl
AC_DEFUN(AC_ADD_LIBRARY,[
case "$1" in
c|c_r|pthread*) ;;
*)
ifelse($3,,[
AC_PHP_ONCE(LIBRARY, $1, [
PHP_X_ADD_LIBRARY($1,$2,LIBS)
])
],[
if test "$ext_shared" = "yes"; then
PHP_X_ADD_LIBRARY($1,$2,$3)
else
AC_ADD_LIBRARY($1,$2)
fi
])
;;
esac
])
dnl
dnl AC_ADD_LIBRARY_DEFER(library[, append])
dnl
dnl add a library to the link line (deferred)
AC_DEFUN(AC_ADD_LIBRARY_DEFER,[
AC_PHP_ONCE(LIBRARY, $1, [
EXTRA_LIBS="$EXTRA_LIBS -l$1"
ifelse($#, 1, DLIBS="-l$1 $DLIBS", DLIBS="$DLIBS -l$1")
])
])
dnl
dnl AC_ADD_LIBRARY_WITH_PATH(library, path)
dnl AC_ADD_LIBRARY_WITH_PATH(library, path[, shared-libadd])
dnl
dnl add a library to the link line and path to linkpath/runpath
dnl add a library to the link line and path to linkpath/runpath.
dnl if shared-libadd is not empty and $ext_shared is yes,
dnl shared-libadd will be assigned the library information
dnl
AC_DEFUN(AC_ADD_LIBRARY_WITH_PATH,[
AC_ADD_LIBPATH($2)
ifelse($3,,[
if test -n "$2"; then
AC_ADD_LIBPATH($2)
fi
AC_ADD_LIBRARY($1)
],[
if test "$ext_shared" = "yes"; then
$3="-l$1 [$]$3"
if test -n "$2"; then
AC_ADD_LIBPATH($2,$3)
fi
else
AC_ADD_LIBRARY_WITH_PATH($1,$2)
fi
])
])
dnl
dnl AC_ADD_LIBRARY_DEFER_WITH_PATH(library, path)
dnl
dnl add a library to the link line (deferred)
dnl and path to linkpath/runpath (not deferred)
dnl
AC_DEFUN(AC_ADD_LIBRARY_DEFER_WITH_PATH,[
AC_ADD_LIBPATH($2)
AC_ADD_LIBRARY_DEFER($1)
])
AC_DEFUN(AM_SET_LIBTOOL_VARIABLE,[
LIBTOOL='$(SHELL) $(top_builddir)/libtool $1'
])
dnl
dnl Check for cc option
@@ -87,18 +609,44 @@ dnl
AC_DEFUN(AC_CHECK_CC_OPTION,[
echo "main(){return 0;}" > conftest.$ac_ext
opt="$1"
var=`echo $ac_n "$opt$ac_c"|tr -c a-zA-Z0-9 _`
changequote({,})
var=`echo $opt|sed 's/[^a-zA-Z0-9]/_/g'`
changequote([,])
AC_MSG_CHECKING([if compiler supports -$1 really])
ac_php_compile="${CC-cc} -$opt -c $CFLAGS $CPPFLAGS conftest.$ac_ext 2>&1"
if eval $ac_php_compile | egrep "$opt" > /dev/null 2>&1 ; then
ac_php_compile="${CC-cc} -$opt -o conftest $CFLAGS $CPPFLAGS conftest.$ac_ext 2>&1"
if eval $ac_php_compile 2>&1 | egrep "$opt" > /dev/null 2>&1 ; then
eval php_cc_$var=no
AC_MSG_RESULT(no)
else
eval php_cc_$var=yes
AC_MSG_RESULT(yes)
if eval ./conftest 2>/dev/null ; then
eval php_cc_$var=yes
AC_MSG_RESULT(yes)
else
eval php_cc_$var=no
AC_MSG_RESULT(no)
fi
fi
])
AC_DEFUN(PHP_REGEX,[
if test "$REGEX_TYPE" = "php"; then
REGEX_LIB=regex/libregex.la
REGEX_DIR=regex
AC_DEFINE(HSREGEX,1,[ ])
AC_DEFINE(REGEX,1,[ ])
PHP_FAST_OUTPUT(regex/Makefile)
elif test "$REGEX_TYPE" = "system"; then
AC_DEFINE(REGEX,0,[ ])
fi
AC_MSG_CHECKING(which regex library to use)
AC_MSG_RESULT($REGEX_TYPE)
PHP_SUBST(REGEX_DIR)
PHP_SUBST(REGEX_LIB)
PHP_SUBST(HSREGEX)
])
dnl
dnl See if we have broken header files like SunOS has.
@@ -106,10 +654,10 @@ dnl
AC_DEFUN(AC_MISSING_FCLOSE_DECL,[
AC_MSG_CHECKING([for fclose declaration])
AC_TRY_COMPILE([#include <stdio.h>],[int (*func)() = fclose],[
AC_DEFINE(MISSING_FCLOSE_DECL,0)
AC_DEFINE(MISSING_FCLOSE_DECL,0,[ ])
AC_MSG_RESULT(ok)
],[
AC_DEFINE(MISSING_FCLOSE_DECL,1)
AC_DEFINE(MISSING_FCLOSE_DECL,1,[ ])
AC_MSG_RESULT(missing)
])
])
@@ -118,43 +666,211 @@ dnl
dnl Check for broken sprintf()
dnl
AC_DEFUN(AC_BROKEN_SPRINTF,[
AC_MSG_CHECKING([for broken sprintf])
AC_TRY_RUN([main() { char buf[20]; exit (sprintf(buf,"testing 123")!=11); }],[
AC_DEFINE(BROKEN_SPRINTF,0)
AC_MSG_RESULT(ok)
],[
AC_DEFINE(BROKEN_SPRINTF,1)
AC_MSG_RESULT(broken)
],[
AC_DEFINE(BROKEN_SPRINTF,0)
AC_MSG_RESULT(cannot check, guessing ok)
AC_CACHE_CHECK(whether sprintf is broken, ac_cv_broken_sprintf,[
AC_TRY_RUN([main() {char buf[20];exit(sprintf(buf,"testing 123")!=11); }],[
ac_cv_broken_sprintf=no
],[
ac_cv_broken_sprintf=yes
],[
ac_cv_broken_sprintf=no
])
])
if test "$ac_cv_broken_sprintf" = "yes"; then
AC_DEFINE(PHP_BROKEN_SPRINTF, 1, [ ])
else
AC_DEFINE(PHP_BROKEN_SPRINTF, 0, [ ])
fi
])
dnl
dnl Stuff to do when setting up a new extension.
dnl XXX have to change the hardcoding of ".a" when we want to be able
dnl to make dynamic libraries as well.
dnl PHP_EXTENSION(extname [, shared])
dnl
dnl Includes an extension in the build.
dnl
dnl "extname" is the name of the ext/ subdir where the extension resides
dnl "shared" can be set to "shared" or "yes" to build the extension as
dnl a dynamically loadable library.
dnl
AC_DEFUN(PHP_EXTENSION,[
EXT_SUBDIRS="$EXT_SUBDIRS $1"
if test "$2" != "shared" -a "$2" != "yes"; then
_extlib="libphpext_$1.a"
EXT_LIBS="$EXT_LIBS $1/$_extlib"
EXTINFO_DEPS="$EXTINFO_DEPS ../ext/$1/extinfo.c.stub"
EXT_STATIC="$EXT_STATIC $1"
if test -d "$abs_srcdir/ext/$1"; then
dnl ---------------------------------------------- Internal Module
ext_builddir="ext/$1"
ext_srcdir="$abs_srcdir/ext/$1"
else
EXT_SHARED="$EXT_SHARED $1"
dnl ---------------------------------------------- External Module
ext_builddir="."
ext_srcdir="$abs_srcdir"
fi
if test "$2" != "shared" && test "$2" != "yes"; then
dnl ---------------------------------------------- Static module
LIB_BUILD($ext_builddir)
EXT_LTLIBS="$EXT_LTLIBS $ext_builddir/lib$1.la"
EXT_STATIC="$EXT_STATIC $1"
else
dnl ---------------------------------------------- Shared module
LIB_BUILD($ext_builddir,yes)
AC_DEFINE_UNQUOTED([COMPILE_DL_]translit($1,a-z-,A-Z_), 1, Whether to build $1 as dynamic module)
fi
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.
dnl
dnl Must be run after all --with-NN options that let the user
dnl choose dynamic extensions, and after the gcc test.
dnl
AC_DEFUN(PHP_SOLARIS_PIC_WEIRDNESS,[
AC_MSG_CHECKING(whether -fPIC is required)
if test "$EXT_SHARED" != ""; then
os=`uname -sr 2>/dev/null`
case "$os" in
"SunOS 5.6"|"SunOS 5.7")
case "$CC" in
gcc*|egcs*) CFLAGS="$CFLAGS -fPIC";;
*) CFLAGS="$CFLAGS -fpic";;
esac
AC_MSG_RESULT(yes);;
*)
AC_MSG_RESULT(no);;
esac
else
AC_MSG_RESULT(no)
fi
])
dnl
dnl Checks whether $withval is "shared" or starts with "shared,XXX"
dnl and sets $shared to "yes" or "no", and removes "shared,?" stuff
dnl from $withval.
dnl
AC_DEFUN(PHP_WITH_SHARED,[
case $withval in
shared)
shared=yes
withval=yes
;;
shared,*)
shared=yes
withval=`echo $withval | sed -e 's/^shared,//'`
;;
*)
shared=no
;;
esac
if test -n "$php_always_shared"; then
shared=yes
fi
])
dnl The problem is that the default compilation flags in Solaris 2.6 won't
dnl let programs access large files; you need to tell the compiler that
dnl you actually want your programs to work on large files. For more
dnl details about this brain damage please see:
dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
dnl Written by Paul Eggert <eggert@twinsun.com>.
AC_DEFUN(AC_SYS_LFS,
[dnl
# If available, prefer support for large files unless the user specified
# one of the CPPFLAGS, LDFLAGS, or LIBS variables.
AC_MSG_CHECKING(whether large file support needs explicit enabling)
ac_getconfs=''
ac_result=yes
ac_set=''
ac_shellvars='CPPFLAGS LDFLAGS LIBS'
for ac_shellvar in $ac_shellvars; do
case $ac_shellvar in
CPPFLAGS) ac_lfsvar=LFS_CFLAGS ;;
*) ac_lfsvar=LFS_$ac_shellvar ;;
esac
eval test '"${'$ac_shellvar'+set}"' = set && ac_set=$ac_shellvar
(getconf $ac_lfsvar) >/dev/null 2>&1 || { ac_result=no; break; }
ac_getconf=`getconf $ac_lfsvar`
ac_getconfs=$ac_getconfs$ac_getconf
eval ac_test_$ac_shellvar=\$ac_getconf
done
case "$ac_result$ac_getconfs" in
yes) ac_result=no ;;
esac
case "$ac_result$ac_set" in
yes?*) ac_result="yes, but $ac_set is already set, so use its settings"
esac
AC_MSG_RESULT($ac_result)
case $ac_result in
yes)
for ac_shellvar in $ac_shellvars; do
eval $ac_shellvar=\$ac_test_$ac_shellvar
done ;;
esac
])
AC_DEFUN(AC_SOCKADDR_SA_LEN,[
AC_CACHE_CHECK([for field sa_len in struct sockaddr],ac_cv_sockaddr_sa_len,[
AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/socket.h>],
[struct sockaddr s; s.sa_len;],
[ac_cv_sockaddr_sa_len=yes
AC_DEFINE(HAVE_SOCKADDR_SA_LEN,1,[ ])],
[ac_cv_sockaddr_sa_len=no])
])
])
dnl ## PHP_AC_OUTPUT(file)
dnl ## adds "file" to the list of files generated by AC_OUTPUT
dnl ## This macro can be used several times.
AC_DEFUN(PHP_OUTPUT,[
PHP_OUTPUT_FILES="$PHP_OUTPUT_FILES $1"
])
AC_DEFUN(PHP_DECLARED_TIMEZONE,[
AC_CACHE_CHECK(for declared timezone, ac_cv_declared_timezone,[
AC_TRY_COMPILE([
#include <sys/types.h>
#include <time.h>
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
],[
time_t foo = (time_t) timezone;
],[
ac_cv_declared_timezone=yes
],[
ac_cv_declared_timezone=no
])])
if test "$ac_cv_declared_timezone" = "yes"; then
AC_DEFINE(HAVE_DECLARED_TIMEZONE, 1, [Whether system headers declare timezone])
fi
])
AC_DEFUN(PHP_EBCDIC,[
AC_CACHE_CHECK([whether system uses EBCDIC],ac_cv_ebcdic,[
AC_TRY_RUN( [
int main(void) {
return (unsigned char)'A' != (unsigned char)0xC1;
}
],[
ac_cv_ebcdic="yes"
],[
ac_cv_ebcdic="no"
],[
ac_cv_ebcdic="no"
])])
if test "$ac_cv_ebcdic" = "yes"; then
AC_DEFINE(CHARSET_EBCDIC,1, [Define if system uses EBCDIC])
fi
dnl EXT_INCLUDE_CODE="\#include \"ext/$1/php3_$1.h\"\\n$EXT_INCLUDE_CODE"
dnl EXT_MODULE_PTRS="phpext_$1_ptr, $EXT_MODULE_PTRS"
dnl "
])
AC_SUBST(EXT_SUBDIRS)
AC_SUBST(EXT_STATIC)
AC_SUBST(EXT_SHARED)
AC_SUBST(EXT_LIBS)
AC_SUBST(EXTINFO_DEPS)
dnl AC_SUBST(EXT_INCLUDE_CODE)
dnl AC_SUBST(EXT_MODULES_PTRS)
+1 -1
View File
@@ -64,7 +64,7 @@ php3_write()
php4_write()
{
pval *newval = (pval *) emalloc(sizeof(pval));
pval *newval = ALLOC_ZVAL();
newval->refcount=1;
newval->is_ref=0;
+14 -16
View File
@@ -23,10 +23,11 @@
| If you did not, or have any questions about PHP licensing, please |
| contact core@php.net. |
+----------------------------------------------------------------------+
| Authors: Stig Sæther Bakken <ssb@guardian.no> |
| Authors: Stig Sæther Bakken <ssb@fast.no> |
+----------------------------------------------------------------------+
*/
#define CONFIGURE_COMMAND "@CONFIGURE_COMMAND@"
#define PHP_ADA_INCLUDE ""
#define PHP_ADA_LFLAGS ""
#define PHP_ADA_LIBS ""
@@ -38,7 +39,7 @@
#define PHP_BINNAME "@BINNAME@"
#define PHP_CFLAGS "@CFLAGS@"
#define PHP_DBASE_LIB ""
#define PHP_DEBUG "@DEBUG_CFLAGS@"
#define PHP_BUILD_DEBUG "@DEBUG_CFLAGS@"
#define PHP_GDBM_INCLUDE ""
#define PHP_HSREGEX ""
#define PHP_IBASE_INCLUDE ""
@@ -57,13 +58,16 @@
#define PHP_MYSQL_INCLUDE ""
#define PHP_MYSQL_LFLAGS ""
#define PHP_MYSQL_LIBS ""
#define PHP_ORACLE_HOME ""
#define PHP_ORACLE_INCLUDE ""
#define PHP_ORACLE_LFLAGS ""
#define PHP_ORACLE_LIBS ""
#define PHP_ORACLE_SHLIBS ""
#define PHP_ORACLE_STLIBS ""
#define PHP_ORACLE_VERSION ""
#define PHP_ODBC_TYPE "@ODBC_TYPE@"
#define PHP_ODBC_INCLUDE "@ODBC_INCLUDE@"
#define PHP_ODBC_LFLAGS "@ODBC_LFLAGS@"
#define PHP_ODBC_LIBS "@ODBC_LIBS@"
#define PHP_OCI8_SHARED_LIBADD "@OCI8_SHARED_LIBADD@"
#define PHP_OCI8_DIR "@OCI8_DIR@"
#define PHP_OCI8_VERSION "@OCI8_VERSION@"
#define PHP_ORACLE_SHARED_LIBADD "@ORACLE_SHARED_LIBADD@"
#define PHP_ORACLE_DIR "@ORACLE_DIR@"
#define PHP_ORACLE_VERSION "@ORACLE_VERSION@"
#define PHP_PGSQL_INCLUDE ""
#define PHP_PGSQL_LFLAGS ""
#define PHP_PGSQL_LIBS ""
@@ -83,10 +87,4 @@
#define PHP_LDAP_LIBS ""
#define PHP_VELOCIS_INCLUDE ""
#define PHP_VELOCIS_LIBS ""
#define ODBC_TYPE ""
#define ODBC_INCDIR ""
#define ODBC_INCLUDE ""
#define ODBC_LIBDIR ""
#define ODBC_LFLAGS ""
#define ODBC_LIBS ""
#define PHP_EXTENSION_DIR "@EXTENSION_DIR@"
+77
View File
@@ -0,0 +1,77 @@
# Copyright (c) 1999, 2000 Sascha Schumann. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY SASCHA SCHUMANN ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
##############################################################################
# $Id$
#
# Makefile to generate build tools
#
SUBDIRS = Zend TSRM
STAMP = buildmk.stamp
ALWAYS = generated_lists
all: $(STAMP) $(ALWAYS)
@$(MAKE) AMFLAGS=$(AMFLAGS) -s -f build/build2.mk
generated_lists:
@echo makefile_am_files = Zend/Makefile.am \
TSRM/Makefile.am > $@
@echo config_h_files = Zend/acconfig.h TSRM/acconfig.h >> $@
@echo config_m4_files = Zend/Zend.m4 TSRM/tsrm.m4 \
Zend/acinclude.m4 ext/*/config.m4 sapi/*/config.m4 >> $@
$(STAMP): build/buildcheck.sh
@build/buildcheck.sh && touch $(STAMP)
snapshot:
distname='$(DISTNAME)'; \
if test -z "$$distname"; then \
distname='php4-snapshot'; \
fi; \
myname=`basename \`pwd\`` ; \
cd .. && cp -rp $$myname $$distname; \
cd $$distname; \
rm -f $(SUBDIRS) 2>/dev/null || true; \
for i in $(SUBDIRS); do \
test -d $$i || (test -d ../$$i && cp -rp ../$$i $$i); \
done; \
find . -type l -exec rm {} \; ; \
$(MAKE) AMFLAGS=--copy -f build/build.mk; \
cd ..; \
tar cf $$distname.tar $$distname; \
rm -rf $$distname $$distname.tar.*; \
bzip2 -9 $$distname.tar; \
md5sum $$distname.tar.bz2; \
sync; sleep 2; \
md5sum $$distname.tar.bz2; \
bzip2 -t $$distname.tar.bz2
cvsclean:
@for i in `find . -name .cvsignore`; do \
(cd `dirname $$i` 2>/dev/null && rm -rf `cat .cvsignore` *.o *.a || true); \
done
@rm -f $(SUBDIRS) 2>/dev/null || true
.PHONY: $(ALWAYS) snapshot cvsclean
+82
View File
@@ -0,0 +1,82 @@
# Copyright (c) 1999, 2000 Sascha Schumann. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY SASCHA SCHUMANN ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
##############################################################################
# $Id$
include generated_lists
TOUCH_FILES = mkinstalldirs install-sh missing
LT_TARGETS = ltconfig ltmain.sh config.guess config.sub
makefile_in_files = $(makefile_am_files:.am=.in)
makefile_files = $(makefile_am_files:e.am=e)
config_h_in = php_config.h.in
acconfig_h_SOURCES = acconfig.h.in $(config_h_files)
targets = $(TOUCH_FILES) $(makefile_in_files) configure $(config_h_in)
all: Zend/Makefile.am TSRM/Makefile.am $(targets)
Zend/Makefile.am:
test -d Zend || (test -d ../Zend && ln -s ../Zend Zend)
TSRM/Makefile.am:
test -d TSRM || (test -d ../TSRM && ln -s ../TSRM TSRM)
acconfig.h: $(acconfig_h_SOURCES)
@echo rebuilding $@
cat $(acconfig_h_SOURCES) > $@
$(makefile_in_files): $(makefile_am_files) aclocal.m4 configure.in $(config_m4_files)
@echo rebuilding Makefile templates
@for i in $(LT_TARGETS); do \
if test -f "$$i"; then \
mv $$i $$i.bak; \
cp $$i.bak $$i; \
fi; \
done
@test -f want_dependencies || flag=-i; \
automake -a $$flag $(AMFLAGS) $(makefile_files) \
|| true >&2
@for i in $(LT_TARGETS); do mv $$i.bak $$i; done
aclocal.m4: configure.in acinclude.m4 dynlib.m4
aclocal
$(config_h_in): configure acconfig.h
# explicitly remove target since autoheader does not seem to work
# correctly otherwise (timestamps are not updated)
@echo rebuilding $@
@rm -f $@
@autoheader 2>&1 | (grep -v 'warning: AC_TRY_RUN called without default to allow cross compiling'||true)
$(TOUCH_FILES):
touch $(TOUCH_FILES)
configure: aclocal.m4 configure.in $(config_m4_files)
@echo rebuilding $@
@autoconf 2>&1 | (grep -v 'warning: AC_TRY_RUN called without default to allow cross compiling'||true)
+69
View File
@@ -0,0 +1,69 @@
#! /bin/sh
echo "buildconf: checking installation..."
# autoconf 2.13 or newer
ac_version=`autoconf --version 2>/dev/null|head -1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
if test -z "$ac_version"; then
echo "buildconf: autoconf not found."
echo " You need autoconf version 2.13 or newer installed"
echo " to build PHP from CVS."
exit 1
fi
IFS=.; set $ac_version; IFS=' '
if test "$1" = "2" -a "$2" -lt "13" || test "$1" -lt "2"; then
echo "buildconf: autoconf version $ac_version found."
echo " You need autoconf version 2.13 or newer installed"
echo " to build PHP from CVS."
exit 1
else
echo "buildconf: autoconf version $ac_version (ok)"
fi
# automake 1.4 or newer
am_version=`automake --version 2>/dev/null|head -1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
if test "$am_version" = ""; then
echo "buildconf: automake not found."
echo " You need automake version 1.4 or newer installed"
echo " to build PHP from CVS."
exit 1
fi
IFS=.; set $am_version; IFS=' '
if test "$1" = "1" -a "$2" -lt "4" || test "$1" -lt "1"; then
echo "buildconf: automake version $am_version found."
echo " You need automake version 1.4 or newer installed"
echo " to build PHP from CVS."
exit 1
else
echo "buildconf: automake version $am_version (ok)"
fi
# libtool 1.3.3 or newer
lt_pversion=`libtool --version 2>/dev/null|sed -e 's/^[^0-9]*//' -e 's/[- ].*//'`
if test "$lt_pversion" = ""; then
echo "buildconf: libtool not found."
echo " You need libtool version 1.3 or newer installed"
echo " to build PHP from CVS."
exit 1
fi
lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'`
IFS=.; set $lt_version; IFS=' '
if test "$1" -gt "1" || test "$2" -gt "3" || test "$2" = "3" && (test "$3" = "c" || test "$3" -ge "3")
then
echo "buildconf: libtool version $lt_pversion (ok)"
else
echo "buildconf: libtool version $lt_pversion found."
echo " You need libtool version 1.3.3 or newer installed"
echo " to build PHP from CVS."
exit 1
fi
am_prefix=`which automake | sed -e 's#/[^/]*/[^/]*$##'`
lt_prefix=`which libtool | sed -e 's#/[^/]*/[^/]*$##'`
if test "$am_prefix" != "$lt_prefix"; then
echo "WARNING: automake and libtool are installed in different"
echo " directories. This may cause aclocal to fail."
echo " continuing anyway"
fi
exit 0
+5
View File
@@ -0,0 +1,5 @@
all: all-recursive
include $(builddir)/libs.mk
include $(top_srcdir)/build/rules.mk
+58
View File
@@ -0,0 +1,58 @@
#! /bin/sh
#
# Copyright (c) 1999, 2000 Sascha Schumann. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY SASCHA SCHUMANN ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
##############################################################################
# $Id: fastgen.sh,v 1.7 2000-06-11 10:33:39 sas Exp $
#
srcdir=$1
shift
mkdir_p=$1
shift
top_srcdir=`(cd $srcdir; pwd)`
top_builddir=`pwd`
if test "$mkdir_p" = "yes"; then
mkdir_p="mkdir -p"
else
mkdir_p="$top_srcdir/helpers/mkdir.sh"
fi
for makefile in $@; do
echo "creating $makefile"
dir=`echo $makefile|sed 's%/*[^/][^/]*$%%'`
$mkdir_p "$dir/"
cat - $top_srcdir/$makefile.in <<EOF >$makefile
top_srcdir = $top_srcdir
top_builddir = $top_builddir
srcdir = $top_srcdir/$dir
builddir = $top_builddir/$dir
VPATH = $top_srcdir/$dir
EOF
test -z "$dir" || touch $dir/.deps
done
+30
View File
@@ -0,0 +1,30 @@
# Copyright (c) 1999, 2000 Sascha Schumann. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY SASCHA SCHUMANN ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
##############################################################################
# $Id$
#
LTLIBRARY_OBJECTS = $(LTLIBRARY_SOURCES:.c=.lo)
$(LTLIBRARY_NAME): $(LTLIBRARY_OBJECTS) $(LTLIBRARY_DEPENDENCIES)
$(LINK) $(LTLIBRARY_LDFLAGS) $(LTLIBRARY_OBJECTS) $(LTLIBRARY_LIBADD)
Loaded 100 of 1021 files, more files were not shown because too many files have changed in this diff. Show more