Compare commits

..
Author SHA1 Message Date
SVN Migration c688aa97f3 This commit was manufactured by cvs2svn to create tag 'php_4_0b3'. 1999-11-19 15:06:58 +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
Danny Heijl f110b97975 New ini-stuff incorporated. Porting to PHP4 and ZTS hopefully complete. 1999-07-23 09:34:14 +00:00
Sascha Schumann c927593c6d ChangeLog 1999-07-23 00:04:24 +00:00
Zeev Suraski d3e8858413 Please add in any changes/bug fixes you've made - we need to keep a details ChangeLog... 1999-07-22 23:54:54 +00:00
Zeev Suraski 5bae591f88 New constants 1999-07-22 22:17:49 +00:00
Zeev Suraski de1acfe33a Time to remove the PHP 3.0 ChangeLog 1999-07-22 21:49:53 +00:00
Sascha Schumann 3ccb07f34b add the HPUX ANSI detection from php3 1999-07-22 21:11:09 +00:00
Stig Bakken 84656f113e add checks for autoconf, automake and whether libzend/TSRM is around 1999-07-22 20:21:07 +00:00
Stig S. Bakken f5bfd16b0b identify ourselves 1999-07-22 20:20:11 +00:00
Sascha Schumann c640f3d8c8 Implement additional heuristic for session id search. Now looks into
REQUEST_URI as well.
1999-07-22 17:55:13 +00:00
Stig Bakken 7ae27b5bcd temporary hack-fix 1999-07-22 15:55:13 +00:00
Andrey Hristov 64dae03eea -Ported all remaining date() options
-Made array_walk() work somewhat, but it's not
 possible to change array values from inside the
 walk function yet
1999-07-22 15:15:41 +00:00
Andrey Hristov a5a07063d2 *** empty log message *** 1999-07-22 14:22:32 +00:00
Danny Heijl 925d48dae6 Blobs now working too. 1999-07-22 09:58:02 +00:00
Danny Heijl dc7cffcd43 Blobs don't work, hash problems. 1999-07-22 07:31:27 +00:00
Stig Bakken d9f52fe0a7 First cut at standard way of making dynamically loadable extensions on UNIX.
Examples on how to test:

 ./configure --with-xml              static
 ./configure --with-xml=/opt         static
 ./configure --with-xml=shared       shared
 ./configure --with-xml=shared,/opt  shared

The difference between these two is that when the extension is shared, it
is not merged into libphpext.a.  The shared extension is currently always
built.  I can't find a way to do just one or the other with automake/libtool,
if someone has a clever idea, please come forward. :-)

"make install" installs the .so (as well as a lot of other cruft) in
$prefix/lib/php.
1999-07-21 21:56:25 +00:00
Zeev Suraski 57323801f8 Fixed the Apache cookie problem (untested) 1999-07-21 20:31:07 +00:00
Andrey Hristov e6fadabf43 Fix for bug #1806 1999-07-21 19:55:24 +00:00
Andrey Hristov 56402ec375 *** empty log message *** 1999-07-21 19:47:40 +00:00
Danny Heijl f857a77e2f Informix extension now works but php_ini stuff still needs rewriting. 1999-07-21 18:23:13 +00:00
Sascha Schumann 9a910ed353 sync with 1.133 1999-07-21 16:12:13 +00:00
Sascha Schumann 7ac7537776 since we all seem to use different tabwidths, reformat this with :set tw=4 1999-07-21 15:47:41 +00:00
Sascha Schumann 0de0ad6348 update 1999-07-21 15:42:18 +00:00
Sascha Schumann f78caff762 merge in change from php3 1999-07-21 15:39:28 +00:00
Sascha Schumann b33d0fd7e7 initial import of DBA 1999-07-21 15:12:32 +00:00
Sascha Schumann 3843821d11 the ; is superflicious 1999-07-21 15:12:22 +00:00
Andrey Hristov adbf932744 *** empty log message *** 1999-07-21 15:10:04 +00:00
Stig Bakken f9b0f60098 that's better 1999-07-21 14:49:17 +00:00
Stig Bakken 57f0f15b9f Debian fixes 1999-07-21 14:43:12 +00:00
Stig Bakken 968d6d9f8d change version number to 4.0b2-dev 1999-07-21 14:42:22 +00:00
Stig Bakken 2ab934bfc2 fix to reiterate that one should _always_ use braces around if/else/for/while 1999-07-21 14:27:05 +00:00
Andrey Hristov 8c63ef0605 It really does work. 1999-07-21 14:19:49 +00:00
Stig S. Bakken 4c285ecdf5 ignore more files 1999-07-21 13:31:52 +00:00
Danny Heijl 575d8541db Started php4/ZTS port of Informix driver. 1999-07-21 12:48:35 +00:00
Sascha Schumann 58bb4adae1 use the same version as in php3 1999-07-21 09:31:48 +00:00
Sascha Schumann 63f7648fdc use reverse lookup array, submitted by bfranklin@dct.com, #1755 1999-07-21 09:02:05 +00:00
Sascha Schumann a7e3a952e7 fix for #1748 1999-07-21 08:55:20 +00:00
Sascha Schumann dbe9e99213 disable broken sprintf test 1999-07-21 08:37:59 +00:00
Sascha Schumann 76cf93994c defaults to empty string 1999-07-21 08:26:51 +00:00
Andrey Hristov 6b82192bf7 Added locale support. 1999-07-20 20:57:04 +00:00
Mike Gerdts 72f675be50 exec() can now properly handle lines longer than (EXEC_INPUT_BUF-2) bytes.
Lines being returned via the array that that contain only "\n" now are
trimmed down to "" to be consistent with exec's whitespace trimming
behavior for all other lines.
1999-07-20 20:19:58 +00:00
Andrey Hristov 3ff606a934 Added 'n' option to date(). 1999-07-20 19:11:32 +00:00
Andi Gutmans acb9cae36d - Include alloca.h when need and available. 1999-07-20 18:26:56 +00:00
Andrey Hristov 2d1b6f0801 Added headers_sent() function 1999-07-20 18:03:27 +00:00
Andrey Hristov f8fdee1c66 Fix for bug #1750. 1999-07-20 16:59:30 +00:00
Sascha Schumann 07e30106b9 get rid of --with-shared-apache
it's currently broken and redundant (use APXS instead)
1999-07-20 16:54:05 +00:00
Andi Gutmans bf8c6dbd99 - Get rid of C++ comments 1999-07-20 13:01:30 +00:00
James Gingerich e0e331967f Remove a bunch of old junk. 1999-07-20 01:15:34 +00:00
Egon Schmid ea28db8625 The last forgotten prototypes I know. 1999-07-19 20:37:17 +00:00
Andrey Hristov 40de81a5d9 Updated status 1999-07-19 20:27:49 +00:00
Andrey Hristov a04521b4f2 Don't forget .cvsignore 1999-07-19 20:24:21 +00:00
Andrey Hristov ced8e51328 Ported WDDX module. 1999-07-19 20:24:03 +00:00
Egon Schmid b64eaf737b It's in PHP 3 and 4. 1999-07-19 20:09:05 +00:00
Zeev Suraski 8d1de13aef 0.91 update 1999-07-19 20:02:12 +00:00
Andi Gutmans e78fc33c35 * Fix Zend version
* Fix a method call bug
1999-07-19 19:58:44 +00:00
Egon Schmid 5fdd45695b Test, will document this soon. 1999-07-19 19:10:13 +00:00
Andrey Hristov 2bc33cbba1 Updating cvsignore 1999-07-19 18:59:05 +00:00
Andrey Hristov 851ee7b598 Moving dlist stuff into core. 1999-07-19 18:58:44 +00:00
Zeev Suraski c1853b5628 *** empty log message *** 1999-07-19 18:37:42 +00:00
Zeev Suraski e19abb96dd *** empty log message *** 1999-07-19 17:58:51 +00:00
Andi Gutmans 8a9d0fa9eb License update 1999-07-19 17:52:38 +00:00
Andi Gutmans 353a2d38d8 Make error codes PHP 3.0 compatible 1999-07-19 16:17:40 +00:00
Andi Gutmans a064237fc0 Fix Win32 compilation 1999-07-19 16:08:43 +00:00
Andrey Hristov d1b1e3513f Kill compiler warnings. 1999-07-19 15:07:17 +00:00
Danny Heijl 951f65f6ed license change 1999-07-19 14:24:09 +00:00
Sascha Schumann afb16a5818 update 1999-07-19 14:07:10 +00:00
Andrey Hristov 18579a5f64 More credits. 1999-07-19 13:35:13 +00:00
Andi Gutmans e3daad2d67 - Should fix the memory leak when returning from the main scope. 1999-07-18 17:33:51 +00:00
Sascha Schumann 99a2aa0f80 allow access to std{in,out,err} by using the php domain 1999-07-18 15:53:50 +00:00
Sascha Schumann 3b7d588f40 more to do 1999-07-18 01:20:38 +00:00
Sascha Schumann e5cfc70f7d add session config to php.ini and adapt the naming scheme for it 1999-07-18 01:00:42 +00:00
Andrey Hristov 715dc6b23a Update credits a bit.
"Overall Work" line should probably be extended.
1999-07-17 20:38:14 +00:00
Andrey Hristov 3335c8ea0d -Kill compile warnings in apache.c
-Make preg_grep() work with copies of array entries
1999-07-17 20:03:10 +00:00
Andrey Hristov 4518351648 Proto change 1999-07-17 19:23:32 +00:00
Zeev Suraski 5a3e983fa4 *** empty log message *** 1999-07-17 19:22:27 +00:00
Zeev Suraski 614b4b781e I was sure I committed these already. Weird 1999-07-17 19:17:42 +00:00
Zeev Suraski fbe571a43a One more necessary .dsp update 1999-07-17 17:35:44 +00:00
Zeev Suraski cbcf7c66bc *** empty log message *** 1999-07-17 17:33:42 +00:00
Zeev Suraski bc29ceef1b * Turn on debug by default
* Remove CREDITS file, point to web page instead
1999-07-17 16:43:11 +00:00
Zeev Suraski 101e1f4c0f Debug on by default 1999-07-17 13:24:53 +00:00
Zeev Suraski dd14884877 Update DSPs 1999-07-17 13:05:43 +00:00
Sascha Schumann fc268e1c7e void some warnings 1999-07-17 12:56:38 +00:00
Sascha Schumann 3736b9b7ce use optional copy 1999-07-17 12:28:17 +00:00
Sascha Schumann 8a7784d462 make copy optional 1999-07-17 12:27:54 +00:00
Zeev Suraski 7af3ce63a6 Oki doki 1999-07-17 11:59:37 +00:00
Zeev Suraski 9bb36e9cfe Some work on makedist 1999-07-17 11:22:17 +00:00
Zeev Suraski a6dc6b88d2 Handle BCMath
Add a license pointer
1999-07-17 10:59:22 +00:00
Zeev Suraski 3b142d5a3d We'll have to live without these files somehow. 1999-07-17 10:34:01 +00:00
Zeev Suraski 51aa31b671 Dummies 1999-07-17 10:15:42 +00:00
Zeev Suraski 35b3b03fe4 We need to disable bcmath by default 1999-07-17 10:14:04 +00:00
Zeev Suraski af58c35f5c Remove MEMORY_LIMIT from PHP, it's a Zend issue... 1999-07-17 00:05:09 +00:00
Zeev Suraski 8a15917de1 Get the Sybase modules uptodate 1999-07-16 22:00:53 +00:00
Zeev Suraski a316ff791c *** empty log message *** 1999-07-16 21:53:17 +00:00
Andrey Hristov 459ed2b1ad A little change in how array_splice/array_slice handle length parameter.
Makes it compatible with Perl.
1999-07-16 20:47:20 +00:00
Andrey Hristov 7201cdac96 Updated the functionality of array_splice. 1999-07-16 20:08:06 +00:00
Sascha Schumann 538e1cd230 the regex check relies on a previously set APXS variable,
so it needs to be after the apxs check
1999-07-16 19:28:33 +00:00
Sascha Schumann bd07cce770 merge fix 1999-07-16 19:07:13 +00:00
Sascha Schumann 36cf6cf22a unnecessary, breaks the build 1999-07-16 18:23:38 +00:00
Sascha Schumann 68b0f0b418 This is so ugly, I hate myself for committing it 1999-07-16 18:05:24 +00:00
Zeev Suraski 1671424a5f Get the LDAP module uptodate 1999-07-16 18:01:55 +00:00
Sascha Schumann 064a4ea88a avoid nameclash 1999-07-16 18:00:06 +00:00
Sascha Schumann e20424e45f fix detection 1999-07-16 17:44:11 +00:00
Zeev Suraski a6a09f7e98 *** empty log message *** 1999-07-16 17:27:42 +00:00
Zeev Suraski 916f2f2927 *** empty log message *** 1999-07-16 17:26:16 +00:00
Zeev Suraski 58a6d48014 Get postgresql module uptodate 1999-07-16 17:19:11 +00:00
Zeev Suraski dc09865f4a Oops #2 1999-07-16 17:16:31 +00:00
Zeev Suraski f17bbb9014 Oops 1999-07-16 17:10:02 +00:00
Zeev Suraski 4e6c2b468c * Get the mSQL module up to date 1999-07-16 17:06:48 +00:00
Zeev Suraski 2c91f1d91b Minor fix 1999-07-16 16:50:49 +00:00
Zeev Suraski d66fad5fcd Ignore T_PHP_TRACK_VARS in the parser (handled in the scanner) 1999-07-16 16:42:49 +00:00
Zeev Suraski e7e2af5d78 Fix TS version 1999-07-16 16:09:01 +00:00
Zeev Suraski b5b1117760 License update 1999-07-16 14:58:16 +00:00
Zeev Suraski c5724cbd14 License update 1999-07-16 13:13:16 +00:00
Sascha Schumann 42736999bc define sid to "", if we are in cookie mode 1999-07-15 21:14:46 +00:00
Andi Gutmans 91d7ba7610 Change true/false back to 1/"" 1999-07-15 20:38:00 +00:00
Andi Gutmans da648c0fb1 Fix a lock issue 1999-07-15 19:59:18 +00:00
Sascha Schumann 2a39219142 we don't need php_sid 1999-07-15 19:51:13 +00:00
Sascha Schumann 30c131c8ae that should be included 1st 1999-07-15 19:43:26 +00:00
Sascha Schumann 4ea29a808d define SID appropiately 1999-07-15 19:37:35 +00:00
Andi Gutmans f5ffc630aa *** empty log message *** 1999-07-15 19:34:26 +00:00
Sascha Schumann 68de8a2842 that should be included 1st 1999-07-15 19:31:39 +00:00
Andi Gutmans 527a7429bc *** empty log message *** 1999-07-15 19:31:29 +00:00
Andi Gutmans eaebc48e5e More 3->4 changes 1999-07-15 19:28:49 +00:00
Andi Gutmans 1db7f1a910 * PHP 3.0 -> 4.0 changes
* Add php_admin Apache directives
1999-07-15 19:26:25 +00:00
Andi Gutmans 2a43afd2ce Sooner than you think, Sascha :) 1999-07-15 18:33:41 +00:00
Andi Gutmans 5fc8562b5d *** empty log message *** 1999-07-15 17:49:55 +00:00
Andrey Hristov 582f6d032e Added .cvsignore 1999-07-15 14:55:01 +00:00
Rasmus Lerdorf 895cab2838 A useless check 1999-07-15 12:42:46 +00:00
Sascha Schumann 138dd94c8d disable zend_handle_sigsegv 1999-07-15 12:17:34 +00:00
Zeev Suraski b7fe07d8dc php3.ini -> php.ini 1999-07-14 23:34:30 +00:00
Zeev Suraski e883283590 * Update logos
* Move from PreAlpha 1 to Beta 1.
1999-07-14 23:33:00 +00:00
Rasmus Lerdorf 75f62dc415 How did this ever work without this #define ? 1999-07-14 21:49:35 +00:00
Andi Gutmans 762158aa65 Fix thread unsafe constants startup 1999-07-14 19:49:19 +00:00
Rasmus Lerdorf 2beb929311 Remove some useless stuff 1999-07-14 19:21:43 +00:00
Rasmus Lerdorf 0fa438a22a Fix imap build problem 1999-07-14 19:16:59 +00:00
Rasmus Lerdorf 549dfc78e2 Small grammar fix 1999-07-14 17:09:09 +00:00
Andi Gutmans db2594ff13 *** empty log message *** 1999-07-14 16:06:11 +00:00
Andi Gutmans 3e6bce59b3 - Add a bitwise flag to phpinfo()
- Import a draft of the new PHP license
1999-07-14 16:02:10 +00:00
Andi Gutmans fec59d3b4d - License update
- Fix multithreaded constants startup
1999-07-14 16:00:47 +00:00
Rasmus Lerdorf d22cbad17d Fix logic here - the error message was bogus when it couldn't find the
imap lib
1999-07-14 15:22:02 +00:00
Rasmus Lerdorf ce6faf02f6 Woops, this was in the wrong place 1999-07-14 15:15:42 +00:00
Zeev Suraski 05e4d7bb33 change php4_value and php4_flag to php_value and php_flag 1999-07-14 10:26:43 +00:00
Andi Gutmans 078c3ce198 - Fix for boolean convert to number 1999-07-14 09:10:14 +00:00
Thies C. Arntzen f03ad4c7d6 *** empty log message *** 1999-07-13 13:22:15 +00:00
Sascha Schumann 8f29babc8e add some which are always substituted 1999-07-12 20:21:14 +00:00
Rasmus Lerdorf fa7605f289 Tested imap, and had a look at ldap. ldap should be working, but my
ldap server is currently in a box.
1999-07-12 20:20:56 +00:00
Rasmus Lerdorf 2b2b3147de Finish porting aspell - tested and works ok now 1999-07-12 19:18:07 +00:00
Andi Gutmans 4dc22e32b6 - Fixed a purify warning 1999-07-12 18:07:01 +00:00
Sascha Schumann fa764cb027 update 1999-07-12 17:21:49 +00:00
Andrey Hristov be66f224b0 *** empty log message *** 1999-07-12 17:16:14 +00:00
Andrey Hristov c37ceccb54 *** empty log message *** 1999-07-12 17:07:34 +00:00
Andi Gutmans fdce4ae1da *** empty log message *** 1999-07-12 17:04:55 +00:00
Sascha Schumann 81b5402a16 test commit (new format inspired by FreeBSD cvs-all) 1999-07-12 14:19:27 +00:00
Thies C. Arntzen f40a16bac9 destructors should return 1, shouldn't they? 1999-07-12 13:56:29 +00:00
Thies C. Arntzen 9b85ba490e par with 3.0 1999-07-12 13:26:56 +00:00
Thies C. Arntzen d4fb7d9e37 fixed mem-problem 1999-07-12 11:49:32 +00:00
Thies C. Arntzen 5a288ffdc8 small php4 fixes 1999-07-12 10:36:19 +00:00
Sascha Schumann a80609c773 typo 1999-07-11 10:52:14 +00:00
Sascha Schumann f0febf044f merge in some autoconf stuff 1999-07-11 10:51:41 +00:00
Zeev Suraski 3b037ebbe9 Oh, that dumb bug. 1999-07-10 22:50:44 +00:00
Andi Gutmans 44947bf563 Ok, so we do have to lock in there 1999-07-10 18:46:20 +00:00
Andi Gutmans fb7a4b6486 Fix assignments of reference variables 1999-07-10 16:56:56 +00:00
Zeev Suraski dc933fc50b Woops, fix. 1999-07-10 12:44:56 +00:00
Zeev Suraski 909590ba7b Put the garbage in the garbage bin 1999-07-10 11:47:16 +00:00
Zeev Suraski cccd2445ee Get rid of AiCount completely 1999-07-10 11:45:23 +00:00
Zeev Suraski 82563bde60 Final tweaks 1999-07-10 10:55:55 +00:00
Zeev Suraski 03d33b2f88 More locking work 1999-07-10 09:29:02 +00:00
Zeev Suraski 6fcf8aa12c *** empty log message *** 1999-07-09 21:00:24 +00:00
Zeev Suraski 0fadd053fa More stuff 1999-07-09 20:57:29 +00:00
Zeev Suraski c43c235427 Don't touch refcount and EA directly 1999-07-09 20:45:55 +00:00
Zeev Suraski 2a6da7814c Step 4:
Move to a 7-bit counter (not fully implemented yet)
1999-07-09 20:43:59 +00:00
Zeev Suraski 6ec1acbe32 Phase 3:
Use a single bit to mark IS_REF variables
1999-07-09 18:19:48 +00:00
Zeev Suraski 5f62c347c7 Step 2:
Rename is_ref to EA
1999-07-09 17:44:41 +00:00
Zeev Suraski 3a9cb0220c Step 1 in nuking the garbage collector:
- Change the hash destructor to return int
1999-07-09 17:36:12 +00:00
Zeev Suraski 81d901b14d Step 1 in nuking the garbage collector:
- Change the hash destructor to return int
- Don't kill the bucket on hash_destroy if the destructor returns 0
1999-07-09 17:24:47 +00:00
Rasmus Lerdorf db1e0bc820 Add Aspell module 1999-07-09 14:56:33 +00:00
Zeev Suraski cdce334c56 *** empty log message *** 1999-07-09 11:19:38 +00:00
Zeev Suraski cc26d0e609 Send a SIGSEGV instead of exiting, to trigger a core dump 1999-07-09 11:10:19 +00:00
Zeev Suraski 6abe9c34d9 * Support recoverable failure from erealloc()
* Fix the shutdown code on an unrecoverable erealloc() failure
1999-07-09 11:03:56 +00:00
Zeev Suraski 81f5522210 Fix the mess in SIGSEGV handling, hopefully 1999-07-09 07:35:13 +00:00
Andrey Hristov 743935ca8e More cleanup. 1999-07-08 21:56:19 +00:00
Andrey Hristov cef4df1fee Reduce clutter a bit. 1999-07-08 21:42:29 +00:00
Zeev Suraski cb2a2ea9d3 *** empty log message *** 1999-07-08 19:18:42 +00:00
Zeev Suraski 1a33277e3d Avoid sending NULL argument to printf 1999-07-08 17:15:43 +00:00
Zeev Suraski d894cf44d8 Support definition of classes that are derived from classes that are defined in runtime 1999-07-08 16:55:27 +00:00
Thies C. Arntzen ff9407b56b on par with latest php3 1999-07-08 14:12:07 +00:00
Andrey Hristov e88d121be1 Fix a memory leak by not allowing session_start() to be called more than once. 1999-07-07 21:50:33 +00:00
Sascha Schumann fdc1b9262d enable it, until we find a better way 1999-07-06 21:02:07 +00:00
Sascha Schumann da155aae1c add sendmail 1999-07-06 20:29:16 +00:00
Zeev Suraski 5baaa716dc Support PCRE under Win32 1999-07-06 19:49:48 +00:00
Zeev Suraski 8ee9fd5768 avoid two copies of pcre.c in the repository 1999-07-06 19:24:13 +00:00
Sascha Schumann 52308cd368 make Solaris gcc happy 1999-07-05 17:05:38 +00:00
Andrey Hristov 7aa981f5b7 Correct option caching 1999-07-05 15:25:51 +00:00
Sascha Schumann f6164dbf3a use void * instead of long for 64-bit test 1999-07-05 10:51:11 +00:00
Thies C. Arntzen 0e3f5a69f7 ups 1999-07-05 09:33:47 +00:00
Thies C. Arntzen 8788f30c12 fixed mem-leak 1999-07-05 08:49:13 +00:00
Thies C. Arntzen ad0076ee53 ported IPTC fro php3 1999-07-05 07:42:07 +00:00
Thies C. Arntzen e9cb3539ad added RESOURCE-returning 1999-07-05 07:03:44 +00:00
Thies C. Arntzen cab8290b8e up to php3 version
returns resources now!
1999-07-05 06:29:04 +00:00
Thies C. Arntzen eb5c6da5a4 added RETVAL_RESOURCE and RETURN_RESOURCE 1999-07-05 06:26:29 +00:00
Zeev Suraski d189972737 Make convert_to_string() regard false as "" instead of "0" 1999-07-04 23:50:58 +00:00
Thies C. Arntzen 745c5efc37 updated to latest php3 1999-07-04 13:30:13 +00:00
Zeev Suraski dbb24c2e0e *** empty log message *** 1999-07-03 23:43:02 +00:00
Zeev Suraski 6132bc3111 Support x-httpd-php-source 1999-07-03 23:15:10 +00:00
Sascha Schumann 377d7d599d *** empty log message *** 1999-07-03 22:05:56 +00:00
Sascha Schumann 6dd7254b39 remove cvsignore files as well 1999-07-03 19:46:32 +00:00
Sascha Schumann c2b8a4667b don't wipe files for distributions 1999-07-03 19:37:55 +00:00
Sascha Schumann 012e1abb4f 'make dist' builds an easy distributable tarball 1999-07-03 19:35:08 +00:00
Sascha Schumann c56116029d add missing include 1999-07-03 19:08:03 +00:00
Sascha Schumann d6169276dd checking for ints won't work, since they are 32 bit on both platforms 1999-07-03 18:46:10 +00:00
Sascha Schumann 9fbbc53008 ignore this 1999-07-03 18:31:58 +00:00
Sascha Schumann daca96353e would be logical to enable display source mode 1999-07-03 18:13:43 +00:00
Zeev Suraski baa75917c8 Support isset()/empty() for string offsets 1999-07-03 18:03:02 +00:00
Sascha Schumann a010baa18d ar t is a little bit noisy on Rhapsody 1999-07-03 17:44:20 +00:00
Zeev Suraski 063051d6ac Fix a crash 1999-07-03 16:05:58 +00:00
Sascha Schumann 22ba66b7f6 almost no config.m4 substitutes these anymore. 1999-07-03 15:42:28 +00:00
Sascha Schumann 6f3b0f799b work around the Apache problem that it pollutes the namespace 1999-07-03 03:34:47 +00:00
Sascha Schumann 7bbd454143 add usual rhapsody hack 1999-07-03 02:45:46 +00:00
Sascha Schumann e0fff74d41 missing DL_HANDLE broke build 1999-07-03 02:44:11 +00:00
Sascha Schumann e08182156e there must be a better way 1999-07-03 02:36:56 +00:00
Sascha Schumann 8b51ad8157 typo 1999-07-03 02:34:09 +00:00
Sascha Schumann 081da5006e let's start OS X hacking 1999-07-03 01:28:31 +00:00
Sascha Schumann 2f92fc0326 .. 1999-07-02 23:56:02 +00:00
Sascha Schumann 73b9beff19 ... 1999-07-02 23:55:45 +00:00
Sascha Schumann eef062572a . 1999-07-02 23:51:01 +00:00
Sascha Schumann aa485e9161 test commit 1999-07-02 23:32:55 +00:00
Sascha Schumann 72aa9e2e2b test commit 1999-07-02 23:31:25 +00:00
Sascha Schumann 2a44f45cbe workaround for 64-bit platforms 1999-07-02 21:12:03 +00:00
Thies C. Arntzen 45386d8af4 added some refcount stuff 1999-07-02 15:45:52 +00:00
Thies C. Arntzen d00b516f84 losses memory like hell, but seems to work!
3 things (this is a bad hack as of now!):
- xml.c uses _php3_strtoupper
  is #include "../standard/php3_string.h" the right way to get the prototype?

- i've copied php3i_long_pval/php3i_string_pval from the php3 tree into
  xml.c (this is defnetly WRONG, but where do i find those?)

- as php3tls_pval_destructor is not available in zend, i've
  #define php3tls_pval_destructor(a) pval_destructor(a) which is maybe not what we want!
1999-07-02 15:31:02 +00:00
Sascha Schumann c42305c54e fix from php3 1999-07-02 14:37:36 +00:00
Zeev Suraski 9ece796086 define zend_bool 1999-07-02 14:10:57 +00:00
Sascha Schumann 900850497d suppress No such file or directory 1999-07-02 13:59:51 +00:00
Sascha Schumann 03e16899bc someone please try whether the autoconf stuff works
for sybase and sybase-ct - I've neither one.
1999-07-01 15:48:57 +00:00
Sascha Schumann 2d185cc7e2 maybe fix, following Joey's description 1999-07-01 15:42:29 +00:00
Sascha Schumann 973f679df0 --with-zlib should work now 1999-07-01 15:39:58 +00:00
Thies C. Arntzen fe4efa91c3 changed boolean behaviour:
var_dump(
1999-07-01 09:26:05 +00:00
Sascha Schumann 2e690ac4b5 some additional consts 1999-07-01 05:47:06 +00:00
Sascha Schumann 2397e5d419 vpath thingie 1999-07-01 05:45:58 +00:00
Sascha Schumann 1f02914005 implement a simple API in the case someone wants to define his/her own serialization stuff 1999-07-01 05:45:48 +00:00
Zeev Suraski 49d98c5a3f Make require accept any parameter 1999-06-30 17:17:39 +00:00
Zeev Suraski 258d427647 No need for a PSLS_FETCH() if PSLS_D/PSLS_DC are supplied as function arguments 1999-06-29 22:08:07 +00:00
Andrey Hristov 3e5f7a806f *** empty log message *** 1999-06-29 15:40:11 +00:00
Andrey Hristov 88ed2002da Added session expiration. 1999-06-29 15:39:59 +00:00
Thies C. Arntzen d5fc465a67 synced with 3.0.11
ora_bind works!
1999-06-29 15:16:38 +00:00
Zeev Suraski 6a2b28ba51 No need for that either... 1999-06-28 21:42:29 +00:00
Rasmus Lerdorf 335078b4fd Don't break the tree 1999-06-28 18:59:44 +00:00
Andrey Hristov a6aacfd2b6 Added session_is_registered(varname) function. 1999-06-28 15:46:56 +00:00
Andrey Hristov 17f725d21a Ported MYSQL_NUM, MYSQL_ASSOC, and MYSQL_BOTH additions from php3. 1999-06-28 15:08:28 +00:00
Andrey Hristov 26a7fe78f2 oops 1999-06-28 13:46:58 +00:00
Andrey Hristov db400222ff *** empty log message *** 1999-06-28 13:39:52 +00:00
Sascha Schumann 650986c8d1 work around that solaris bug 1999-06-28 13:37:59 +00:00
Sascha Schumann bd031b0422 ugly and working 1999-06-28 03:01:48 +00:00
Sascha Schumann 30e80d1a8c BSD derived tests want -h for symlink test 1999-06-28 02:57:08 +00:00
Sascha Schumann 8ba3889572 port 1999-06-27 21:46:34 +00:00
Sascha Schumann e205a6749d more porting 1999-06-27 21:45:06 +00:00
Sascha Schumann d819da4897 port Rasmus' APXS changes for AIX 1999-06-27 21:36:00 +00:00
Sascha Schumann fa7cba7d5d port over from php3 1999-06-27 21:23:17 +00:00
Sascha Schumann adde17749b lex optimizations 1999-06-27 21:18:43 +00:00
Sascha Schumann 3b36670df1 add dbase_replace_record 1999-06-27 21:15:12 +00:00
Sascha Schumann aa4e00b33c port over autoconf fixes from php3 1999-06-27 21:14:00 +00:00
Zeev Suraski d1169e735e Win32/general patches 1999-06-26 23:21:18 +00:00
Zeev Suraski d4f24f19ad * Get rid of another request_info element (filename)
* CGI through Apache should work now
1999-06-26 19:14:26 +00:00
Zeev Suraski 320541430b *** empty log message *** 1999-06-26 18:01:21 +00:00
Zeev Suraski 36416f1109 Protect against NULL arguments in filename 1999-06-26 12:27:49 +00:00
Zeev Suraski 98b6ddda90 * Make the memory leak reporting code much better with repeats
* Remove useless variables
1999-06-26 11:48:22 +00:00
Sascha Schumann 6ec7163796 add dmalloc 1999-06-26 00:34:36 +00:00
Sascha Schumann f3ef2ff1d0 - APXS link thingie
- functions/ game obsolete. Should make compiling faster on slow machines (hi Kristian :-)
1999-06-25 23:40:26 +00:00
Andrey Hristov d41af4b7eb *** empty log message *** 1999-06-23 15:04:21 +00:00
Thies C. Arntzen 18962f1993 gettype now reports "boolean" correct 1999-06-22 21:37:43 +00:00
Zeev Suraski c471c77c58 Fix Thies's bug report 1999-06-22 20:24:51 +00:00
Andrey Hristov df86725019 Making function accessible. 1999-06-22 19:37:26 +00:00
Andrey Hristov 226f75e0f3 Making the function accessible. 1999-06-22 19:36:52 +00:00
Zeev Suraski acddd0f13c Fix compile-time definition of track_vars default 1999-06-22 19:07:01 +00:00
Zeev Suraski 3eac45ea80 * Fix concatenation of arrays (it was PHP 3.0 style, copying zval's instead
of zval *, and it wasn't using reference counting)
* Fix a memory leak in static array()'s with textual indices
1999-06-22 19:05:40 +00:00
Andrey Hristov 31c8ec4c80 Made preg_split() consistent with split().
Added a new /e modifier for preg_replace
Kill a warning in pcrelib.
1999-06-22 14:56:32 +00:00
Thies C. Arntzen 5fa6882567 urlencode and decode return an empty-string if the input-string is empty (matches php3 behaviour "more" closly)
Please read my previous mail and comment!
1999-06-22 13:35:28 +00:00
Stig Bakken 8139b776e9 cosmetics 1999-06-22 11:04:35 +00:00
Danny Heijl bc50e68a1b Bad html in ifx_htmltbl_result(). 1999-06-22 07:14:55 +00:00
Stig Bakken 7f8e11d6d3 fix some potential buffer overflows 1999-06-22 01:59:30 +00:00
Andrey Hristov 2b8c85bd0b Backing out changes. 1999-06-21 23:07:46 +00:00
Thies C. Arntzen 8052667684 fixed implode "again" - 1999-06-21 15:57:20 +00:00
Sascha Schumann af56b0f936 whoops, kill debugging message 1999-06-20 18:54:08 +00:00
Sascha Schumann 43a466a076 Introduce AC_ADD_* macros
The use of AC_EXPAND_PATH makes it possible to continue
to use relative paths when configuring PHP.
(e.g. --with-apache=../apache-1.3.x works again)
1999-06-20 18:52:46 +00:00
Sascha Schumann 2b97cb1f88 avoid error message 1999-06-20 17:15:29 +00:00
Sascha Schumann c3151f742b use standard autoconf variables 1999-06-20 17:04:30 +00:00
Zeev Suraski 943a911485 *** empty log message *** 1999-06-19 22:56:34 +00:00
Zeev Suraski d035af4af1 *** empty log message *** 1999-06-19 20:42:15 +00:00
Zeev Suraski 138d601ab1 Add a standard get_ini_entry() to interface between Zend and the outside world 1999-06-19 20:22:56 +00:00
Zeev Suraski bb190f8565 Implement new get_ini_entry() for Zend 1999-06-19 19:23:24 +00:00
Zeev Suraski 8def18813f *** empty log message *** 1999-06-19 14:07:48 +00:00
Zeev Suraski 57882d58e1 Use php.ini instead of php3.ini 1999-06-19 13:18:48 +00:00
Zeev Suraski 63a845f2f6 *** empty log message *** 1999-06-19 13:13:28 +00:00
Zeev Suraski f88464ee6d Win32/ZTS compiles again 1999-06-19 13:04:55 +00:00
Andrey Hristov cd74a455dd for struct sockaddr 1999-06-18 15:54:14 +00:00
Stig Bakken 62fc2f5f7f update php3 sync info 1999-06-18 14:45:48 +00:00
Stig Bakken d92c591514 optimize php3_fopen_url_wrapper() a bit (fewer recv() and send() calls) 1999-06-18 14:22:59 +00:00
Stig Bakken 467523bac5 Apply Sascha's fsock fixes to php4. 1999-06-18 13:42:21 +00:00
Stig Bakken 2ca5404046 make CGI version work again 1999-06-18 13:02:34 +00:00
Sascha Schumann 5d62d88ece typo 1999-06-17 15:45:26 +00:00
Andrey Hristov 14463b1ba8 Need to check if it exists first. 1999-06-17 15:17:17 +00:00
Zeev Suraski a22d6b980e Win32 patches (does not compile still) 1999-06-17 03:45:20 +00:00
Stig Bakken 27f1799b68 MIME headers may be 512 characters long. 1999-06-16 18:43:59 +00:00
Stig Bakken 117a2fba07 * fixed some #if/#ifdef issues
* hand-patched in php3 changes from 3.0.6 to HEAD in these files:
   fopen-wrappers.[ch] ext/standard/file.[ch] ext/standard/fsock.[ch]
   ext/standard/php3_string.h ext/standard/string.c
* added some new file/socket macros for more readable code:
   FP_FGETS(buf,len,sock,fp,issock)
   FP_FREAD(buf,len,sock,fp,issock)
   FP_FEOF(sock,fp,issock)
   FP_FGETC(sock,fp,issock)
1999-06-16 17:06:53 +00:00
Stig S. Bakken 5d4579a1f4 added INIT_FUNC_ARGS_PASSTHRU and SHUTDOWN_FUNC_ARGS_PASSTHRU 1999-06-16 11:03:57 +00:00
Stig S. Bakken 80f1ce5eed * added zend_binary_strcasecmp() 1999-06-15 22:32:51 +00:00
Stig Bakken 8eec7a022f reversing another patch that slipped 1999-06-15 21:56:11 +00:00
Stig Bakken 8c4411b5da * reverse fsock/string import patches 1999-06-15 21:51:00 +00:00
Zeev Suraski f86fb810a0 Change four spaces back to tabs (Why the hell did you change the tabs to four spaces?!) 1999-06-15 19:05:01 +00:00
Stig Bakken 336392ea6c * now using php4.ini instead of php3.ini
* re-imported fopen-wrappers, fsock and string code from php3
  NB!  I have not tested all of the imported functions yet.
1999-06-15 17:06:22 +00:00
Stig Bakken 7719f86292 fix some .cvsignore files 1999-06-15 17:00:39 +00:00
Rasmus Lerdorf bdbdaa4369 gmmktime() fix 1999-06-15 12:31:29 +00:00
Andrey Hristov 215a88ade1 Need to test for directory. 1999-06-14 15:05:55 +00:00
Stig Bakken a916379c21 make symlinks if they are not present already 1999-06-14 13:59:18 +00:00
Zeev Suraski 96bfbc7904 First attempt at moving the old RFC1867 support to the right place 1999-06-12 17:50:39 +00:00
Zeev Suraski c50cd2df99 We can't quite go with expr there (shift/reduce conflict), go with scalar. 1999-06-12 07:43:36 +00:00
Zeev Suraski 4bf413e358 require() improvement as per Andi's suggestion 1999-06-12 06:59:54 +00:00
Sascha Schumann be14ccadf1 it's obj.properties, not ht 1999-06-11 19:29:10 +00:00
Andrey Hristov 8c43c5f708 Fix up var.c a bit. 1999-06-11 15:54:06 +00:00
Zeev Suraski 0d560de1b7 Make the concatenation operator use make_printable as well 1999-06-11 15:37:43 +00:00
Zeev Suraski 9f106c61ec Don't take failing on an include file so badly 1999-06-11 14:51:44 +00:00
Zeev Suraski d6595d628c Support <?= 1999-06-11 13:56:04 +00:00
Zeev Suraski d47d83511a E_ERROR -> E_COMPILE_ERROR in the compiler 1999-06-11 13:40:18 +00:00
Zeev Suraski 54d210427a Two fixes:
* The error generated by a failed class inheritence wasn't  properly
  displaying the file in which he error occured.
* Inheritence didn't work if the parent class had uppercase letters in it.
1999-06-11 13:37:29 +00:00
Rasmus Lerdorf f8bac0f8ad Same Fix here 1999-06-11 12:48:22 +00:00
Stig Bakken 6b16188db0 append DEBUG_CFLAGS to CFLAGS 1999-06-11 12:22:53 +00:00
Zeev Suraski 4b062fdfec Print out include_path in include/require failures 1999-06-11 11:59:35 +00:00
Zeev Suraski 963a004481 * Use to_string() instead of __print()
* Support boolean casts ((bool) and (boolean))
1999-06-11 11:17:43 +00:00
Zeev Suraski 99fd17df63 Change __print into to_string() 1999-06-11 11:02:38 +00:00
Zeev Suraski da9faa2c3a * Make the output handling of variables much, much cooler.
Uses zend_make_printable_zval() instead of convert_to_string() now:

$foo = true;
print "\$foo is $foo";
will now print
$foo is true
(instead of "$foo is 1", earlier).

Also, with objects, it automatically tries to call __print() and use it as a printing
function.

For example:

class foo {
  function __print() { return "Foo Object"; }
};

$foo = new foo;
print $foo;

will print "Foo Object".
1999-06-11 10:44:26 +00:00
Zeev Suraski 1798a0183a * Fix a buglet in the session module
* Make some renames in the session module - avoid having a function called 'delete'
  so that we don't piss any C++ compilers.  Also rename the {startup,shutdown}_globals
  to {startup,shutdown}_session_globals, so that they're a bit less general names,
  and made them static.
* Remove uselss variables
1999-06-11 09:23:00 +00:00
Zeev Suraski c1f75b6fda Now THAT's an annoying bug. 1999-06-10 23:03:35 +00:00
Sascha Schumann 83de88e90c make serialize work
unserialize does not work yet
1999-06-10 15:34:20 +00:00
Andrey Hristov 2bb01b6f81 Fixing serialize a bit. 1999-06-10 15:13:26 +00:00
Andrey Hristov 3b1843bc9f Added preg_grep() function. 1999-06-10 14:41:38 +00:00
Frank M. Kromann f6ad4b09c1 Sync. with php3. Only add Date: and From: if not supplied by user 1999-06-10 09:10:07 +00:00
Andrey Hristov f7072fbf87 Make array_shift/array_pop work better. 1999-06-09 22:03:15 +00:00
Zeev Suraski 2fb5e56123 Fix 1999-06-09 21:40:52 +00:00
Zeev Suraski 95c9e3014a * Fix cases where you assign an array element to the parent array (the array was
being erased before the assignment, so the element was being smashed).
1999-06-09 21:39:12 +00:00
Andrey Hristov b331ead5bf A fix for a fix. 1999-06-09 21:21:27 +00:00
Andrey Hristov 3d45dd58b8 Fixed a bug in preg_split.
Fixed a bug in array_shift/array_pop.
1999-06-09 21:13:05 +00:00
Zeev Suraski b484f40c31 * Fix foreach() that receives a non array argument
* Clean up some C++ comments
1999-06-09 21:02:59 +00:00
Thies C. Arntzen a3464b7c11 oci8 to 3.0.9
implode works!
1999-06-09 19:47:06 +00:00
Andi Gutmans 7ed4923441 - Fix the static array() initializing 1999-06-09 19:26:54 +00:00
Andrey Hristov 835b0d8823 *** empty log message *** 1999-06-09 15:39:56 +00:00
Andrey Hristov 2a64925a67 Fixed a bug in preg_replace. 1999-06-09 15:02:57 +00:00
Thies C. Arntzen e5da9fc10a up to 3.0.9 1999-06-09 10:40:08 +00:00
Danny Heijl f3d179ff99 resync informix driver with php 3.09 version 1999-06-09 07:44:52 +00:00
Zeev Suraski 230846f6dd Replace error messages 1999-06-08 19:37:40 +00:00
Andi Gutmans 04b2c1d422 * Fix a by-name call/method call bug
* Clean and optimize the whole function call process
1999-06-08 18:33:31 +00:00
Zeev Suraski fd4650b540 Add zend_hash_get_current_key_type() 1999-06-07 22:49:33 +00:00
Sascha Schumann 4b023c157a better scaling for large servers using many session ids 1999-06-07 19:51:54 +00:00
Andrey Hristov bc1e4a5a10 Don't set is_ref in _phpi_splice()
More checking in array_merge()
Added keys() and values() array functions.
1999-06-07 18:52:20 +00:00
Sascha Schumann d8a9548cb2 - some cleanups
- add gc logic
- add session_destroy()
1999-06-07 16:43:24 +00:00
Zeev Suraski b886985d63 Fix an ereg_replace() crash bug 1999-06-07 15:01:25 +00:00
Zeev Suraski 34b3dc9b47 - Fix PSLS issues
- Add a standard info function for the session module (use them!)
- Replace PATH_MAX with MAXPATHLEN (that's our platform indepedent constant)
1999-06-06 19:53:59 +00:00
Sascha Schumann 82806ea254 one C too much 1999-06-06 19:26:31 +00:00
Sascha Schumann e9b28fe29c avoid unnecessary PSLS_FETCH() in internal functions 1999-06-06 19:25:39 +00:00
Andi Gutmans f5dbfbae84 -Init tsrm on minit 1999-06-06 18:56:11 +00:00
Andi Gutmans ed97964fbe - Use PS() everywhere. 1999-06-06 18:39:48 +00:00
Andi Gutmans c329da5d25 - Make sessions compile on win32 but it still doesn't link. 1999-06-06 18:36:42 +00:00
Andi Gutmans c5fd7244dd - Add some *_FETCH()'s. Still some work to be done so that it'll compile on win32. 1999-06-06 18:22:17 +00:00
Andi Gutmans 5b0ae2dff3 Work around a compiler bug - mark variables that are sent to functions that aren't yet
defined as FETCH_W (because they might end up being sent by reference)
1999-06-06 17:35:42 +00:00
Sascha Schumann 605756de7f - s/encoded/encode/
- new TODO entry
1999-06-06 15:18:51 +00:00
Andi Gutmans d5dc2cd22c - Remove the is_ref =1 from the push() function. 1999-06-06 15:00:49 +00:00
Sascha Schumann a821a185e4 add some protos 1999-06-06 14:19:55 +00:00
Sascha Schumann 2f79ba1abf add some thoughts 1999-06-06 14:02:13 +00:00
Sascha Schumann 19a2a02f8e - auto startup when calling register
- auto startup using a configuration option
1999-06-05 22:24:59 +00:00
Sascha Schumann f830cf7d15 moving start code into its own function 1999-06-05 22:15:49 +00:00
Andrey Hristov f8f8defb42 Added array_merge() function. 1999-06-05 21:19:25 +00:00
Sascha Schumann 2db1d61718 SAPI does not want line endings 1999-06-05 20:51:29 +00:00
Andrey Hristov 421414df03 Added push(), pop(), shift(), unshift(), splice(), and slice() array functions.
The first 5 work like their Perl counterparts. slice() returns a chunk of the array
specified by offset and length arguments.

Backport to PHP3 and docs will be coming soon.
1999-06-05 20:43:36 +00:00
Zeev Suraski ed06a70f7f * Centralized shutdown
* Change shutdown order again
1999-06-05 20:00:00 +00:00
Sascha Schumann a1b42e3f5e first import of session module 1999-06-05 19:52:58 +00:00
Zeev Suraski 89f139d3b0 Call the request_shutdown on modules before destroying symbol tables, so that
the session module can be implemented
1999-06-05 19:10:40 +00:00
Zeev Suraski bbce669cea Move shutdown order into Zend 1999-06-05 19:00:56 +00:00
Zeev Suraski 8b2fe60467 - Fixed Karl's bug report. It's not really a thorough fix, we really need to rethink the INIT_FCALL/DO_FCALL issue.
- Fixed numerous AiCount problems
1999-06-05 18:47:36 +00:00
Zeev Suraski e49aafcf57 I got the order wrong earlier :I 1999-06-05 17:47:16 +00:00
Zeev Suraski e586468a4e Not sure that's the right fix, but at least it fixes the symptom 1999-06-05 13:56:18 +00:00
Sascha Schumann 92f986787b add some .cvsignores 1999-06-05 10:48:05 +00:00
Andrey Hristov dbfeaabb16 Added preg_quote() function. 1999-06-04 13:56:23 +00:00
Andrey Hristov c7a606c4a3 *** empty log message *** 1999-06-04 13:37:44 +00:00
Zeev Suraski 1b4b5c4a88 New $GLOBALS init 1999-06-04 13:09:24 +00:00
Zeev Suraski 1ecca4b8e8 Fix UNIX MySQL build 1999-06-04 12:51:41 +00:00
Zeev Suraski cf757f7c89 Fix that GLOBALS leak. We were explicitly adding GLOBALS to the main symbol table,
but there's no reason to do it (INIT_GLOBALS takes care of it if necessary.)
1999-06-04 12:22:19 +00:00
Zeev Suraski b6315d1c9b Remove old workspaces 1999-06-04 12:13:18 +00:00
Zeev Suraski 9108abc287 Minor updates (mostly __declspec() stuff) 1999-06-04 11:44:02 +00:00
Zeev Suraski 3cad348509 * Add a new workspace for dynamic PHP extensions.
* Add a few functions to PHP's API.
* Get the MySQL extension up-to-date and thread safe.
* Add a project for building the MySQL extension under Win32.
1999-06-04 10:45:54 +00:00
Thies C. Arntzen a3a60dd4e7 added is_ref=0 and refcount=1 to SET_VAR_* macros 1999-06-04 09:04:05 +00:00
Zeev Suraski 66a48f2131 T_BAD_CHARACTER is actually a string. 1999-06-03 23:59:33 +00:00
Andi Gutmans 1225d0307b - We weren't counting newlines in heredocs. The only place which is still questionable
is when there's a \ followed by a newline but it seems we have a parse error in this
case anyways.
- Fixed the alloca() macros so that the alloca() #define in win32 mode won't clash
with the real win32 alloca().
1999-06-03 21:06:03 +00:00
Andrey Hristov 0f99eeb29f function dir doesn't exist anymore 1999-06-01 21:01:02 +00:00
Andrey Hristov aea7498779 *** empty log message *** 1999-06-01 20:31:39 +00:00
Andi Gutmans c4b7426ec1 - Make execute() use less stack in thread-safe win32 due to Microsoft's shitty 256kb stack. 1999-06-01 18:47:53 +00:00
Sascha Schumann d57ffd3646 avoid touching libraries which have not changed 1999-06-01 17:53:15 +00:00
Andi Gutmans 250d803c31 - Fix for exec to use API 1999-06-01 16:41:56 +00:00
Zeev Suraski 4ea6d477ec thread-safety fix 1999-05-31 19:58:20 +00:00
Zeev Suraski 63f2cc9fe9 *** empty log message *** 1999-05-31 18:39:29 +00:00
Andi Gutmans 52ec64359c Fixes 1999-05-31 18:33:12 +00:00
Andi Gutmans f153896de5 *** empty log message *** 1999-05-31 17:41:41 +00:00
Zeev Suraski 5f12a05aa3 *** empty log message *** 1999-05-31 17:40:15 +00:00
Andrey Hristov aba3ea97cd preg_match_all() now returns the number of global matches. 1999-05-30 14:48:39 +00:00
Sascha Schumann 88029643d0 * fix some casts
* introduce unary_op_type - cleaner than casting data voids to function ptrs
1999-05-30 13:28:56 +00:00
Sascha Schumann 31da7331fe kill some warnings 1999-05-30 12:00:06 +00:00
Sascha Schumann 577340bb9f zend_hash_merge was changed 1999-05-30 11:57:28 +00:00
Zeev Suraski cf4a2c3bfc That got fucked up when we went back to using uninitialized_zval 1999-05-29 23:37:26 +00:00
Sascha Schumann b5dd397459 another VPATH related change 1999-05-29 23:20:55 +00:00
Zeev Suraski f78d4f1a56 Fix a bug 1999-05-29 22:26:28 +00:00
Andrey Hristov a88b37788e Updated preg_split(). 1999-05-29 20:45:00 +00:00
Andrey Hristov 70dc46892a Fix preg_match_all to do proper matching with \b. 1999-05-29 20:04:05 +00:00
Andrey Hristov 9c970e1910 Fixed PCRE so that global matching with patterns with \b works. 1999-05-29 19:38:50 +00:00
Zeev Suraski e058cccfc1 * Changed the way INI entries work in Apache to allow .conf entries to work right too.
* vpath fixes for standard Apache build
1999-05-29 19:06:22 +00:00
Zeev Suraski bcc1337d8c Support overwrite mode in zend_hash_merge() 1999-05-29 18:59:58 +00:00
Zeev Suraski 274f3aa727 Fix 1999-05-29 18:28:46 +00:00
Sascha Schumann 33507acca5 - clean is not called from automake. use CLEANFILES instead
- allow VPATH compilation
1999-05-29 18:13:14 +00:00
Sascha Schumann 03d2a11e27 more VPATH work 1999-05-29 18:11:49 +00:00
Sascha Schumann 6ebb2c80e0 kill warning 1999-05-29 16:20:55 +00:00
Sascha Schumann 941bdd57a3 - fix APXS VPATH build
- libzend/TSRM build in their own directories
- ext/Makefile was generated twice

****NOTE******

If you use any kind of VPATH, you need to do a "make distclean" in your
libzend/TSRM directory, before running configure again.
1999-05-29 16:15:21 +00:00
Zeev Suraski e9c646e7dd avoid crashing with php4 directives in .conf files (they still don't work) 1999-05-29 16:03:49 +00:00
Zeev Suraski 873763473f fixes 1999-05-29 15:10:06 +00:00
Sascha Schumann 52463124be getopt.h conflicted with system include file 1999-05-29 13:53:59 +00:00
Sascha Schumann b219d491b9 . 1999-05-29 12:15:04 +00:00
Zeev Suraski b7ee45e13c Correct fix 1999-05-29 12:00:32 +00:00
Zeev Suraski 7068d4a201 *** empty log message *** 1999-05-29 11:02:37 +00:00
Zeev Suraski 24a21ca2e1 Fix a leak 1999-05-29 11:01:50 +00:00
Zeev Suraski c1dc4efc3b no need for those 1999-05-28 22:42:17 +00:00
Zeev Suraski 0eb1498fa8 * Get Apache module to compile again with the regex stuff.
* Get Apache to propertly work with POST, and some SAPI fixes
1999-05-28 22:41:48 +00:00
Sascha Schumann dfce358a5b that seems to fix it 1999-05-28 21:41:17 +00:00
Sascha Schumann 7401ef12fb Either I'm playing the EG(symbol_table) game wrong or var.c leaks memory
when unserializing arrays/objects. Still testing
1999-05-28 21:27:19 +00:00
Andrey Hristov 3fe94e5b37 -Modified PCRE library slightly to do what needs to be done
-Updated preg_replace() code to handle stuff properly
-Removed ability to specify external PCRE library source to link against
(since our bundled version is patched now)
1999-05-28 20:54:52 +00:00
Sascha Schumann 62a9f2137c I think that is the preferred way as of now 1999-05-28 18:51:51 +00:00
Zeev Suraski cd789db6f2 *** empty log message *** 1999-05-28 13:28:50 +00:00
Zeev Suraski 741b816136 * Support getThis() for internal functions.
* Fix 'new object or die' and AiCount issue thoroughly (earlier fix didn't
  work with the optimizer).
* Add new macros for standardized definition of classes.
* Only report AiCount problems if shutdown was not silent.
1999-05-28 12:06:59 +00:00
Zeev Suraski 7a167cd0c1 * Use new Zend macros for standardized definition of classes.
* Reverse bogus shutdown order.
* Use the new object/class support of Zend to make the dir functions work again.
1999-05-28 11:09:39 +00:00
Rasmus Lerdorf f1f4e6f478 Some innocent cleanups 1999-05-28 03:54:15 +00:00
Andrey Hristov a5138d2724 We don't need those there. 1999-05-27 14:02:29 +00:00
Andrey Hristov e10e4dbe10 Really fix the configuration now so that it's possible to compile both
against the bundled PCRE library and the one external to the source tree.
Crossing my fingers while Zeev compiles this. :)
1999-05-27 13:59:39 +00:00
Stig Bakken 96434e4899 self-contained extensions please :-) 1999-05-27 08:53:21 +00:00
Zeev Suraski 83cdc9476d Generate Visual Studio compatible error messages when compiling under Win32 1999-05-27 03:14:57 +00:00
Zeev Suraski 3b5972ed4a Fix the AiCount issue with objects 1999-05-27 03:11:08 +00:00
Zeev Suraski 1f985ede74 Moved all #define's for SET_ and RETURN_ to zend_API.h 1999-05-27 01:44:17 +00:00
Sascha Schumann 5d0a7599a9 - fix CGI build (at least) 1999-05-27 01:34:18 +00:00
Sascha Schumann 16ec4608ac add rfc1867.c 1999-05-27 01:20:52 +00:00
Zeev Suraski 36947fc45a Fix pcre build 1999-05-27 01:19:00 +00:00
Zeev Suraski 064a16c7b2 Moved all SET_ and RETURN_ macros to Zend
Fixed all RETVAL_ macros
1999-05-27 00:45:31 +00:00
Andrey Hristov 66f850e5b7 -Added PCRE library source
-Updated configuration process
1999-05-26 21:47:57 +00:00
Andrey Hristov d73c638526 Added preg_split. Same syntax as regular split(). 1999-05-26 18:59:04 +00:00
Andrey Hristov ff29e85724 Fixing a couple of long standing bugs. 1999-05-26 18:45:53 +00:00
Andrey Hristov 0062ae6218 A few changes here.
First of all, as per extensive discussion on the list, the functions are now
prefixed with "preg" instead of "pcre".

Secondly, global matching is now possible using preg_match_all.  Please, give
suggestions on a better name if this one doesn't sit well with you.  Possible
names are preg_global_match and preg_gmatch.

preg_match_all takes 4 arguments: a regex pattern, a subject string,
the array for capturing subpatterns, and a parameter that tells how the results
in the subpatterns array are arranged.

Basically, preg_match_all will go through the subject string and try to capture
all the matches that it finds, not just the first one like preg_match.

4th parameter can be PREG_PATTERN_ORDER (default) or PREG_SET_ORDER.

Example:
preg_match_all("|</?([^>]+)>|", "<div align=left>a test</div>", $out, PREG_PATTERN_ORDER);

This returns results so that $out[0] is an array of full pattern matches, $out[1] is an array
of first captured subpattern matches, and so on.

$out[0] -> ("<div align=left>", "</div>")
$out[1] -> ("div align=left", "div")

Example:
preg_match_all("|</?([^>]+)>|", "<div align=left>a test</div>", $out, PREG_SET_ORDER);

This returns results so that $out[0] is an array of first full pattern match and subpatterns,
$out[1] is an array of second full pattern match and subpatterns.

$out[0] -> ("<div align=left>", "div align=left")
$out[1] -> ("</div>", "div")

If anyone has a better name for these PREG_ constants and also which one should be the default,
I'd like to hear it.
1999-05-26 15:22:02 +00:00
Zeev Suraski 033858e13d Avoid crashing if an error occurs before we open the first file. 1999-05-25 22:55:13 +00:00
Zeev Suraski cf58b7ef16 Add container for file-upload. It's not quite implemented yet. 1999-05-25 22:28:24 +00:00
Andrey Hristov 6155d91e7a Just a little sanity check. 1999-05-25 21:47:58 +00:00
Zeev Suraski 4f545f9c6b Allow unregistering content types as well. 1999-05-25 21:19:46 +00:00
Zeev Suraski 72f6e823f9 * Add generic POST content-type support. Only application/x-www-form-urlencoded
supported at this time, but the framework allows for any other types, including
  runtime addition of types.
1999-05-25 21:14:54 +00:00
Zeev Suraski 7b98592282 include regex in Win32 build 1999-05-24 18:02:42 +00:00
Zeev Suraski e115fdc6d6 The last fix was wrong 1999-05-24 16:48:01 +00:00
Zeev Suraski cbcd462d46 Another operators fix 1999-05-24 16:43:47 +00:00
Zeev Suraski 97107dc440 boolean comparison didn't work with smaller-than and greater-than, something that
fucked up berber's site a bit.  fixed.
1999-05-23 22:07:04 +00:00
Zeev Suraski 0eb500cef5 Thou shalt use the API, and thou shalt be safe 1999-05-23 20:32:19 +00:00
Andrey Hristov 57b22c8b64 Some comments. 1999-05-22 19:46:27 +00:00
Sascha Schumann 3165710b77 - add -lregex
- change module name to php4
1999-05-22 19:41:28 +00:00
Andrey Hristov 912f17d278 Added ability to pass array parameters to pcre_replace. 1999-05-22 19:14:57 +00:00
Zeev Suraski ee7032f069 Sigh, another leak bites the dust. FREE_OP missing in case of a SEND_VAR. 1999-05-22 18:02:30 +00:00
Zeev Suraski 84bb91d762 I'm on a roll. Fix a nasty yet stupid AiCount bug 1999-05-22 17:30:09 +00:00
Zeev Suraski 05f6cf54f0 Warn about AiCount not zeroing out 1999-05-22 16:48:23 +00:00
Sascha Schumann 7b58930456 add a $(srcdir) 1999-05-22 16:13:10 +00:00
Sascha Schumann 13c3c4012e fix compile issues in LDAP/XML exts 1999-05-22 16:12:09 +00:00
Zeev Suraski 1250c43a39 * Add struct name to all typedef's so that they can be debugged with MSVC
* Fix an AiCount bug - list(...) = $var was using $var multiple times, and thus
causing AiCount to be decreased multiple times even though it was increased only
once for $var.  Mark all FETCH_DIM's so that they won't decrease AiCount, and only
decrease AiCount on the last FETCH_DIM.
* Fix a stupid bug - forgot to pass CLS_C to some compiler function.  For some reason
MSVC doesn't report these :I
1999-05-22 16:10:51 +00:00
Sascha Schumann 1652802641 fix APXS compile 1999-05-22 15:48:29 +00:00
Zeev Suraski d62a739cca More fixes. Should hopefully work well now. 1999-05-22 12:19:57 +00:00
Zeev Suraski 9df57a2263 php_ini fixes 1999-05-22 11:34:21 +00:00
Zeev Suraski 080105f79f Give more information and save log lines in memory leak reports 1999-05-22 11:20:56 +00:00
Zeev Suraski 9b4d71205b * Minor fixes
* Better handling for multiple repeated memory leaks (libzend updated)
1999-05-22 10:56:36 +00:00
Zeev Suraski a08e3925b1 Time to rename the child 1999-05-22 09:24:21 +00:00
Zeev Suraski 87ba08d1d0 Avoid leaking fd's in case of failures 1999-05-22 02:13:01 +00:00
Zeev Suraski 58a0ae7b35 Small fix 1999-05-22 01:15:25 +00:00
Zeev Suraski ac94c83867 more fixes 1999-05-22 01:07:50 +00:00
Zeev Suraski 9e862c11ec Fix a memory leak 1999-05-21 23:51:19 +00:00
Zeev Suraski d56ae4f670 That wasn't supposed to slip in 1999-05-21 23:48:24 +00:00
Zeev Suraski be8b9778e0 This should be centralized... 1999-05-21 23:25:46 +00:00
Zeev Suraski 9dc0842e58 * Properly handle failed file opens in C++
* Properly handle failed require()'s within libzend
1999-05-21 20:20:32 +00:00
Sascha Schumann 00cb03bd49 add support for mhash 0.5.0
see http://sasweb.de/mhash/
1999-05-21 20:09:23 +00:00
Andrey Hristov e3a70c1f04 -Added regex cache
-Made module thread-safe
1999-05-21 19:27:44 +00:00
Zeev Suraski c57c0e9cd5 * Fix error handling startup on the thread-safe CGI version
* A failed require() is a compile-time error, consider it as one
1999-05-21 19:22:17 +00:00
Zeev Suraski f33c22c055 * Fix the comments issue. yymore() worked like a charm.
* Change all flex states to be prefixed with ST_
1999-05-21 17:31:49 +00:00
Andrey Hristov be9dc58cfe Get rid of debug printf's. 1999-05-21 13:29:05 +00:00
Andrey Hristov 17bbbf2963 Initial check-in of PCRE (Perl Compatible Regular Expressions) extension.
PCRE library can be found at ftp://ftp.cus.cam.ac.uk/pub/software/programs/pcre/

config.m4 will be updated to be more robust later on.

perl_match() takes a regular expression, the source string, and the array
for subpattern matches.

perl_replace() takes a regular expression, the search string, and the replacement
string.

Regular expression is specified using delimiters and options.  Example:

perl_match("/<[a-z]*>/i", $text, $tags);

More stuff is coming soon.
1999-05-21 13:17:23 +00:00
Sascha Schumann b57dc27595 - run ext sources through conv_proto
- add necessary phpext_*_ptr
1999-05-21 10:06:25 +00:00
Sascha Schumann 4fe8fe715e merge in some PHP3 stuff 1999-05-21 08:37:48 +00:00
Sascha Schumann 6f06b11679 incorporate YP/NIS support 1999-05-21 08:29:51 +00:00
Sascha Schumann fb407676a2 - fix compile issues for various packages (dbase, sysv*, zlib)
- some cleanup in mhash/mcrypt
1999-05-21 08:20:13 +00:00
Sascha Schumann 0fe7fe30b5 - add phpext_pgsql_ptr
- semaphore update for glibc-2.1 systems
1999-05-21 08:04:38 +00:00
Sascha Schumann 672e38da93 Add default path for binary mysql distributions 1999-05-21 07:52:12 +00:00
Sascha Schumann 286fef1ce4 remove debug messages 1999-05-21 07:04:48 +00:00
Zeev Suraski 9cb2cf1393 Optimize allocations into uninitialized_zval assignments 1999-05-20 20:00:59 +00:00
Zeev Suraski 59a539f6ad Use OutputDebugString() or fprintf(stderr,) for memory leaks 1999-05-20 19:06:28 +00:00
Sascha Schumann 27fc61c4dc Apply the fix for feof() 1999-05-20 13:56:19 +00:00
Andi Gutmans 3facf7cb7c - Updates we did today 1999-05-20 13:04:59 +00:00
Andi Gutmans 7eef22472c - Small fixes 1999-05-20 12:06:45 +00:00
Andi Gutmans d79292d52b - Fix a small problem with class decelerations. 1999-05-20 09:08:29 +00:00
Andi Gutmans 0bc950bcd5 -Open curly braces fix? 1999-05-20 09:02:03 +00:00
Sascha Schumann db6ce2f2a9 add mhash support 1999-05-16 12:01:25 +00:00
Sascha Schumann 4e08c66771 kill another 64-bit issue.
this affected at least md5 which produced wrong values on 64-bit platforms
1999-05-16 11:55:34 +00:00
Sascha Schumann a37a5e5c4a char * => unsigned char * 1999-05-16 11:32:51 +00:00
Sascha Schumann 39691bed9e conv_proto *.[ch] 1999-05-16 11:19:26 +00:00
Sascha Schumann 5a4c63db53 this script automatically converts the ugly void php3_... prototypes
to PHP_FUNCTION(...) prototypes. Also kills some unnecessary extern
declarations in front of function prototypes.
1999-05-16 11:14:52 +00:00
Sascha Schumann ed8a7dff62 add fast bin2hex string function 1999-05-16 11:12:23 +00:00
Sascha Schumann d886b84ef4 kill some compiler warnings 1999-05-16 11:10:41 +00:00
Zeev Suraski b0bfa458b5 * Fix all hash checks that checked Bucket.arKey for NULL, when it was changed
to char[1], these checks should have been changed to Bucket.nKeyLength==0
* Support runtime declaration of functions.  I ended up changing the grammar
  to catch top level functions vs. nested functions.  The reason is simple -
  if we don't have functions properly declared at compile-time, function calls
  cannot be resolved at compile time, and have to be resolved at runtime, which
  ends up being much much slower (without the optimizer, that is).
  It's no biggy though, the grammar change isn't that bad.
1999-05-15 15:47:24 +00:00
Zeev Suraski d2c16bf5bd *** empty log message *** 1999-05-15 14:56:23 +00:00
Zeev Suraski b9fb0b8e4d If a require() dies, we must bail out (since it corrupts an existing op_array 1999-05-14 20:16:22 +00:00
Zeev Suraski 53f98a66cf Fix a bug 1999-05-14 19:04:37 +00:00
Stig S. Bakken 695b4f4d5e don't install Zend on the system 1999-05-14 18:42:06 +00:00
Zeev Suraski 1fb61df8a5 * Include all of the standard modules in internal_functions.c.in. Stig - is that
the way you intended it to be?  How does the basic_functions module get in there?
* Fix to get MySQL objects working, even though I'll probably make a dedicated
  MySQL object in the future.
1999-05-14 18:25:16 +00:00
Zeev Suraski 67296f0704 Add \012 and \xff missing support to constant quoted string 1999-05-14 11:29:34 +00:00
Zeev Suraski df0906f7c0 Release fix 1999-05-13 16:48:49 +00:00
Zeev Suraski 5eaed486e1 * HTTP-auth bugfix
* Patch the regex thread safe code to compile in thread safe mode
1999-05-13 15:54:49 +00:00
Zeev Suraski 0b873a7899 *** empty log message *** 1999-05-12 23:05:17 +00:00
Zeev Suraski 52ac2e67c1 Enable Apache HTTP Auth 1999-05-12 22:49:23 +00:00
Zeev Suraski 49b01a4b3d Support HTTP Auth under ISAPI. Now, these short pieces of code took *A LOT* of
research :(
1999-05-12 21:35:16 +00:00
Stig S. Bakken cefca57c9c install libzend.a and header files on "make install" 1999-05-12 20:12:15 +00:00
Stig S. Bakken 97ea66a045 add --enable-thread-safety option 1999-05-12 20:11:42 +00:00
Zeev Suraski 853d6c6206 Added prepend to llist 1999-05-12 18:06:14 +00:00
Andrey Hristov 89a56a139b It's been there long enough. 1999-05-12 17:29:51 +00:00
Thies C. Arntzen 6c2c3a9587 compiles 1999-05-12 16:12:22 +00:00
Thies C. Arntzen d470b4cfe0 added _php3_hash_next_index_pointer_insert 1999-05-12 16:11:35 +00:00
Sascha Schumann a4d20864a6 - regex cache (needs some work)
- str_replace changes from php3
1999-05-12 15:40:15 +00:00
Thies C. Arntzen 3031862b24 up-to-date with 3.0.8 1999-05-12 14:28:01 +00:00
Thies C. Arntzen dc8d4f89c7 move oci8 from oracle to it's own ext-directory - configure stuff needs more work - but it configures and compiles 1999-05-12 14:21:38 +00:00
Thies C. Arntzen f04567b09e builds and configures again 1999-05-12 13:44:09 +00:00
Rasmus Lerdorf fbeeb8f29c substr() fix 1999-05-12 12:53:45 +00:00
Rasmus Lerdorf 43d93b6533 substr() fix for PHP4 as well 1999-05-12 12:43:03 +00:00
Zeev Suraski 6bc6dacf5c Fixes:
* Avoid closing stdin (I could have sworn I've committed that already)
* unclean_shutdown patches
1999-05-11 21:39:48 +00:00
Zeev Suraski e22cce0dda Easier Win32 debug code 1999-05-11 21:38:39 +00:00
Zeev Suraski 0997fcdc2b Fix 1999-05-11 21:27:44 +00:00
Zeev Suraski ceeb9b38ba * Finally commit that -q patch
* Refine SAPI built in header support
* Use DllMain() in ISAPI to clean after threads and initialize tsrm/sapi as soon as possible.
1999-05-11 20:38:16 +00:00
Andrey Hristov 702829709c Added compact() function. 1999-05-11 19:31:37 +00:00
Zeev Suraski 9fd708a313 Handle the Location: header centrally for all SAPI modules. 1999-05-11 18:36:35 +00:00
Zeev Suraski 473d1d7cf1 * Fix a bug that occured in case of parse errors. We need to restore the lexical state
even if the compilation failed.
1999-05-11 17:50:37 +00:00
Zeev Suraski ba88c0c47c * Move unclean_shutdown from PHP to Zend.
* The Master/Local headers in the phpinfo() table were reversed.
* Fix a gpc bug
1999-05-11 16:52:58 +00:00
Zeev Suraski 24dff20afa Support POST in Apache 1999-05-11 12:52:17 +00:00
Zeev Suraski dc5ed5a3fb beatify Apache's info func 1999-05-11 00:43:46 +00:00
Zeev Suraski 3e98dc5edc Memory leak fix 1999-05-11 00:09:22 +00:00
Zeev Suraski 0b77132507 * Get Apache to work. POST doesn't work yet.
* There are now -I directives for the absolute path of php4, php4/libzend and the builddir for
  the Apache module, so we can #include any php/Zend header.
* Rename config.h to php_config.h
1999-05-11 00:01:47 +00:00
Andrey Hristov 957616cd2d Minor updates. 1999-05-10 21:14:43 +00:00
Andrey Hristov d7ed9c1455 Added in_array() function. 1999-05-10 21:10:48 +00:00
Zeev Suraski 74a9ed7b3f Weed out all BoundsChecker-found bugs (including a serious file descriptor leak
in the C++ scanner)
1999-05-10 20:46:42 +00:00
Andrey Hristov ea0f19850e A couple of fixes. 1999-05-10 20:41:42 +00:00
Zeev Suraski 928e322038 Weed out all BoundsChecker-found bugs 1999-05-10 19:48:23 +00:00
Zeev Suraski 8f48b83df4 Only read POST info if the request method is POST. 1999-05-09 20:58:26 +00:00
Andi Gutmans 4079f914bd * Make read_post() read input by chunks instead of returning a single string.
This will allow us to efficiently support file upload through SAPI in the future.
* Fixes
1999-05-09 18:40:59 +00:00
Zeev Suraski 14a8e9b6c3 Change argument name 1999-05-09 14:56:38 +00:00
Zeev Suraski 60fcac8f2a A few other minor fixes 1999-05-09 13:57:09 +00:00
Zeev Suraski 5ba4b3311d Several minor fixes 1999-05-09 13:55:15 +00:00
Zeev Suraski bfbe86187e Almost forgot to commit those 1999-05-09 12:24:21 +00:00
Zeev Suraski bc415d5a88 * Finalizing the PHP version of SAPI. Support POST and cookies among other things.
* Fully implement ISAPI support - POST and cookies among other things.
* Almost completely rewrote phpinfo().  Allow modules to easily display their
  information in phpinfo() without modifying phpinfo() itself (prototype for
  the module info function was changed, thus the large amount of updated module
  files).
* Initial extended SAPI support for Apache, completely untested.
* CGI now uses SAPI fully as well.
1999-05-09 08:48:05 +00:00
Sascha Schumann 91cf2e59c4 get rid of the binary character, execute sed only once 1999-05-08 22:00:02 +00:00
Sascha Schumann 17a36c37d1 this is faster than parsing the file line by line 1999-05-08 21:44:12 +00:00
Andrey Hristov a0b94fccbb -Added extract() function
-Added function_exists() function
1999-05-08 21:18:06 +00:00
Andrey Hristov cd901e8586 -fixed configure.in.in to use genif.sh instead of genif.pl
-fixed genif.sh
-updated php3_mysql.h to have phpext_mysql_ptr
1999-05-08 18:16:30 +00:00
Zeev Suraski ae6f852cb6 Oh yeah, wrong license 1999-05-06 22:31:46 +00:00
Zeev Suraski ade1117ebd * Get output buffering to work again
* Warn about adding header information after headers are sent
* Several fixes
1999-05-06 21:58:49 +00:00
Sascha Schumann 324593224d calloc et al need stdlib.h according to ANSI-C 1999-05-06 21:13:26 +00:00
Sascha Schumann 2c42111694 add compat #define 1999-05-06 20:54:56 +00:00
Sascha Schumann a793fea1f7 Do we really want to depend on Perl? Shell scripts are handy and run on
virtually every Unix box whereas Perl does not. I don't think Perl should
be required when actually configuring PHP4. Open to comments...
1999-05-06 20:52:19 +00:00
Zeev Suraski c5d8c389a5 Ok, I tested it now. It works very nicely! 1999-05-06 19:13:13 +00:00
Zeev Suraski 465c94ce18 * Optimize _php3_parse_gpc_data() and clean it up, plus fix a couple of Zend related memory leaks in it 1999-05-06 18:09:50 +00:00
Zeev Suraski 842b5ee941 vpath fix
Apache compatability fix
1999-05-05 21:47:04 +00:00
Zeev Suraski 6f1c611868 Fixes 1999-05-05 21:29:26 +00:00
Zeev Suraski 54fa0e5d16 fix 1999-05-05 21:11:27 +00:00
Zeev Suraski aee864e9d8 Get CGI to work with the new headers code.
Now Apache is the only interface that doesn't use it.
1999-05-05 21:05:44 +00:00
Zeev Suraski 2740382c2c ISAPI WORKS! 1999-05-05 19:53:15 +00:00
Andi Gutmans c8b2bf0a1d llist improvements 1999-05-05 19:24:46 +00:00
Andi Gutmans 537cc54acd Added initial headers support in SAPI
*untested*
It definitely broke the thread-safe CGI, it may have broken other stuff as well.
1999-05-05 18:25:20 +00:00
Zeev Suraski 9e67cded5e Get Win32 to compile again 1999-05-04 20:27:30 +00:00
Zeev Suraski 95af652d2b An initial default builtin modules file for Win32 1999-05-04 03:43:49 +00:00
Zeev Suraski 18742324b3 ZTS fixes
Stig - --enable-thread-safety belongs in libzend, since libzend doesn't #include config.h, whereas
PHP does #include zend_config.h
1999-05-04 03:42:19 +00:00
Zeev Suraski 1401cd52fc vpath patches (cool job Stig!) 1999-05-03 19:59:55 +00:00
Stig Bakken 9a66ffbaee * added --enable-thread-safety switch
* now generating internal_functions.c
1999-05-03 11:11:23 +00:00
Zeev Suraski 9a4031ad64 Get apache uptodate 1999-05-02 20:04:18 +00:00
Zeev Suraski a5ab6b9638 Move path_info to the SAPI structure 1999-05-02 19:54:02 +00:00
Zeev Suraski 7071131f81 Get rid of request_info.path_translated 1999-05-02 19:31:56 +00:00
Zeev Suraski bc004fb062 Apache compile fix 1999-05-02 19:16:21 +00:00
Andi Gutmans fcaf734f94 - Don't support interactive mode when thread safe. 1999-05-02 19:07:46 +00:00
Zeev Suraski e6257bc388 UNIX CGI build fix 1999-05-02 19:01:45 +00:00
Andi Gutmans 5dbe924660 - Make ISAPI hook in as an extension too.
- Some work on moving stuff to SAPI.
1999-05-02 18:07:41 +00:00
Sascha Schumann 7e0ee50ed4 func name changes, remove arbitrary limit 1999-05-01 14:41:46 +00:00
Sascha Schumann 8baa86ed51 mcrypt 2.1.18 support, better autoconf checking 1999-05-01 11:14:22 +00:00
Zeev Suraski 064f75fd1b Several operator fixes. Should fix the MySQL problem. 1999-05-01 01:04:13 +00:00
Andi Gutmans 5dd7f27f0b - Free refcount when destroying the last class reference. 1999-04-30 23:32:03 +00:00
Andi Gutmans 202135bfac - Missed one place 1999-04-30 21:44:27 +00:00
Andi Gutmans 0e1f8ed58e - First try at fixing $a->foo[] syntax. 1999-04-30 20:27:36 +00:00
Thies C. Arntzen 75bc4593ff forward port of current oracle.c + fixes to make it actually work;-)!!! 1999-04-30 18:59:15 +00:00
Thies C. Arntzen 23917484ad oracle links again (at least on linux!!!) 1999-04-30 18:02:09 +00:00
Andi Gutmans 91371c4340 - Move back to yyless(). I haven't tested it yet because it's taking too long
to compile and I have to disconnect
1999-04-30 17:35:38 +00:00
Zeev Suraski 9dd66bc2ae Fix Boris's problem (in my never ending struggle to show I never mean what I say
when I say something's not gonna happen :)
1999-04-30 17:29:18 +00:00
Zeev Suraski bc3686c14a * Fix a problem with constant quoted strings, that was causing Thies's problem
* Remove a development-time printf
1999-04-30 10:46:48 +00:00
Andi Gutmans 95e2e023fb - No reason to handle newlines here. 1999-04-29 20:58:29 +00:00
Zeev Suraski d90ea1a136 Make the C++ scanner support interactive input 1999-04-28 23:18:57 +00:00
Zeev Suraski e22a1a08a5 Get the MySQL module to use the new INI mechanism feature 1999-04-28 21:37:54 +00:00
Zeev Suraski d843632629 Remove redundant code 1999-04-28 21:29:31 +00:00
Zeev Suraski a877f6d380 Additional generalization of the INI mechanism. Avoid needing specialized
message handlers in 99% of the cases.
1999-04-28 21:14:47 +00:00
Zeev Suraski 66476011dd A step towards generalizing the INI mechanism even more 1999-04-28 20:26:33 +00:00
Zeev Suraski 1aaf98e54b get rid of some stupid warnings 1999-04-28 20:18:25 +00:00
Andi Gutmans cef5243b64 - export patch 1999-04-28 18:35:42 +00:00
Andi Gutmans a74b342612 - Small startup fix. 1999-04-28 17:38:24 +00:00
Andi Gutmans 8423f8f1d3 dsp update 1999-04-28 16:13:09 +00:00
Rasmus Lerdorf 92905543f1 Add fgetcsv() here as well 1999-04-27 13:06:58 +00:00
Zeev Suraski 2493f68018 * Fix debugger+interactive mode bug
* Recognize whether an extension is with debug information or not
1999-04-27 11:00:59 +00:00
Zeev Suraski 1245356128 * Get rid of the memory leak messages in case of fatal errors or exit()
* .dsp fixes
* Minor fixes
1999-04-27 10:00:54 +00:00
Zeev Suraski 9b56453566 * Small startup fix
* Fix min() and max()
1999-04-26 20:20:12 +00:00
Zeev Suraski 7375ca5588 Temporary fix for CGI compilation under UNIX 1999-04-26 19:48:10 +00:00
Zeev Suraski 48de4ce0dd Somehow the rules for the configuration parser/scanners disappeared 1999-04-26 19:02:59 +00:00
Andrey Hristov b9d3a80709 Fixing a few thing to make AC_CHECK_CC_OPTION work. 1999-04-26 18:06:04 +00:00
Zeev Suraski 3cd0af11ee * Get the Apache module to compile again
* Get rid of php3_rqst, use SG(server_context) instead (there's still Apache-specific code,
  but it nuked a global)
1999-04-26 17:26:37 +00:00
Zeev Suraski 0f195a79cd fix 1999-04-26 15:16:06 +00:00
Zeev Suraski c55a67657f Match the CVS name 1999-04-26 14:11:20 +00:00
Zeev Suraski 7c4a08381e Various thread safety fixes and DLL updates 1999-04-26 14:10:42 +00:00
Zeev Suraski 7942eaf381 * Plenty of thread safety and Win32 work.
* Changed PHP4 to compile as a DLL, both ISAPI and the the CGI run with the same DLL.
* Switched to using the DLL runtime library under Win32.  PHP will NOT work if
  compiled against the static library!
* Removed yesterday's php4libts project (with php4dllts, it's obsolete).

This *does* affect thread-unsafe Windows as well - the thread unsafe CGI is also
dependant on the thread-unsafe DLL.
1999-04-26 14:00:49 +00:00
Andi Gutmans 050cb7cfe3 -Add .dsp file 1999-04-26 03:04:29 +00:00
Andi Gutmans df6134bc42 -More commits 1999-04-26 03:03:39 +00:00
Andi Gutmans 9c51acdc17 -More 1999-04-26 03:03:36 +00:00
Rasmus Lerdorf 5c09d8e616 Make GD config fail if it doesn't find the gd files 1999-04-25 23:29:52 +00:00
Sascha Schumann 1e54412bdc PHP3 compat stuff 1999-04-25 22:22:13 +00:00
Rasmus Lerdorf 8ffbed7d7e Ok, apxs build works nicely now 1999-04-25 22:16:44 +00:00
Sascha Schumann c62ffa7e01 oops, the 0th byte should be set, too 1999-04-25 21:50:24 +00:00
Sascha Schumann 77baa4ebb4 final change (?), add get_algorithms_name 1999-04-25 21:49:01 +00:00
Sascha Schumann 12a76342ed make code more compact 1999-04-25 21:32:52 +00:00
Sascha Schumann 5ed41f31af remove some redundant code 1999-04-25 21:24:07 +00:00
Sascha Schumann 5883d6c221 that was a silly one 1999-04-25 21:13:21 +00:00
Sascha Schumann 22d720e00c add OFB mode, the final one 1999-04-25 21:11:29 +00:00
Sascha Schumann a1a41504c7 add mcrypt_create_iv() 1999-04-25 21:09:07 +00:00
Zeev Suraski 23a1d3fb91 Win32 isn't a good os to commit uppercase files with... 1999-04-25 21:04:17 +00:00
Sascha Schumann 6b890309ef cleanup, add new stream mode, allow IV for CBC mode 1999-04-25 20:44:52 +00:00
Sascha Schumann 7d1ee82d79 add get_(key|block)_size 1999-04-25 20:32:15 +00:00
Andi Gutmans 10710c046d Ah, these too 1999-04-25 19:36:57 +00:00
Andi Gutmans 4ebb4060f9 * Fix a couple of thread safety issues
* Add initial ISAPI support.  Very very experimental.
* In the thread safe version, generate php4 as a library so that we can link it with both
php.exe and the ISAPI dll.  We should probably consider doing that under all circumstances,
under UNIX as well.

The thread-unsafe version *should* be unharmed.
1999-04-25 19:35:44 +00:00
Sascha Schumann 1db171deb8 add CBC 1999-04-25 17:04:56 +00:00
Sascha Schumann 11fc109ca6 add mcrypt module 1999-04-25 16:50:40 +00:00
Rasmus Lerdorf c4442ed7c5 Ok, this beast compiles via --with-apxs
Not sure if it actually works yet though.  I have a feeling there are
some -fpic flags missing in the libzend build.  Will test later on
today.
1999-04-25 14:10:23 +00:00
Sascha Schumann ac9c0d03e0 -f tests for plain files only. We need a way to find out whether we could do any damage to existing files. If we cannot write to them, we probably cannot do harmful things hopefully. 1999-04-25 14:08:41 +00:00
Thies C. Arntzen 9cace18e10 serialize & unserialize working (with mem-leak) 1999-04-25 12:41:18 +00:00
Rasmus Lerdorf 0704064cdf Argh! That typo took me over an hour to find. Grr.. 1999-04-25 04:03:36 +00:00
Andrey Hristov ef7a4db341 test -e fails in sh. Used test -f instead. 1999-04-25 00:55:01 +00:00
Sascha Schumann 6955cacb21 unreliable check whether cc option can be used really 1999-04-24 23:36:25 +00:00
Zeev Suraski 5974d84bc6 Fixes 1999-04-24 23:22:09 +00:00
Sascha Schumann a156a47187 security check and disclaimer for generated files 1999-04-24 22:16:06 +00:00
Rasmus Lerdorf 2d78e4779e Oops, would be a good idea to edit the .in file instead of acconfig.h 1999-04-24 21:55:44 +00:00
Rasmus Lerdorf ecc1dce8f5 libbind check 1999-04-24 21:52:53 +00:00
Sascha Schumann d558f56ba0 add function checks 1999-04-24 21:39:33 +00:00
Andrey Hristov 4aeb630539 Change cmp'risons to be cross-shell compatible. 1999-04-24 21:21:35 +00:00
Sascha Schumann 3b195581db bugfix port 1999-04-24 20:48:12 +00:00
Sascha Schumann bec518a62d port from PHP3 1999-04-24 20:43:58 +00:00
Sascha Schumann 8036c5fbf1 include some header files explicitly 1999-04-24 20:26:31 +00:00
Zeev Suraski c09e7de63a Use relative paths 1999-04-24 19:10:02 +00:00
Thies C. Arntzen d0d3316128 forward-port of php3-CVS version
my 1st zend-array stuff (ocifetchinto) is WORKING!!
1999-04-24 18:54:02 +00:00
Thies C. Arntzen 992e6a429d made var_dump zend-aware....
<?
$ar = array("hallo" => "tubu");

var_dump($ar);
?>
works again!!!

zeev, andi -> please review what i've done!!!

(no i can start "debugging" other stuff, as i often use var_dump)
1999-04-24 18:39:41 +00:00
Zeev Suraski 208e81696f Another small fix 1999-04-24 17:16:39 +00:00
Zeev Suraski 1ab3e00bc0 Add my API letters to the CVS 1999-04-24 16:57:46 +00:00
Zeev Suraski f6971f17a9 dsp update 1999-04-24 16:52:40 +00:00
Zeev Suraski 125275b084 Small fixes 1999-04-24 16:51:15 +00:00
Zeev Suraski 6ecc81c097 We'd have to find a different way of allowing timeouts in Win32 1999-04-24 16:17:04 +00:00
Zeev Suraski e06a1ed265 Thread safety fixes 1999-04-24 16:16:11 +00:00
Stig S. Bakken 3b516557f2 set up automake 1999-04-24 16:14:18 +00:00
Zeev Suraski 8dd4a63366 Remove redundant includes 1999-04-24 09:26:09 +00:00
Zeev Suraski cd07879f2d g++ compile fix 1999-04-24 09:08:03 +00:00
Zeev Suraski 1e9ce9528d *** empty log message *** 1999-04-24 09:01:30 +00:00
Zeev Suraski 5a5806e02a Cleanups, remove old ts code 1999-04-24 00:12:55 +00:00
Zeev Suraski 0818d96c97 A lot of cleanups... Removed old thread-safe code and other redundant code and files 1999-04-24 00:12:00 +00:00
Zeev Suraski 05d24c6022 Remove redundant code 1999-04-23 22:45:01 +00:00
Zeev Suraski 09946676d2 Thread-safe header_is_being_sent 1999-04-23 20:20:30 +00:00
Zeev Suraski 6f7c0edee3 Remove tls.[ch] 1999-04-23 20:06:01 +00:00
Zeev Suraski f53afa6edd cleanups 1999-04-23 19:50:29 +00:00
Zeev Suraski b2c5ef42d3 Arithmetics bug fix 1999-04-23 13:25:33 +00:00
Zeev Suraski bce60f0fe6 * MySQL fix (thanks Stig)
* Remove reundant includes from bcmath
1999-04-23 12:38:45 +00:00
Stig Bakken 94cde33459 use only EXTRA_LIBS 1999-04-23 12:11:37 +00:00
Zeev Suraski 43c9b540d7 Minor MySQL thread safety issues 1999-04-23 11:12:41 +00:00
Zeev Suraski 5be8dd9712 License 1999-04-23 11:00:02 +00:00
Zeev Suraski f9cdc88471 Testing unified diffs 1999-04-23 10:26:49 +00:00
Zeev Suraski a458b4f6bd Support eval() and highlight_string() in the C++ scanner 1999-04-23 10:21:00 +00:00
Andi Gutmans 01575b9d9d - Use yyless() instead of unput() where possible. I'll erase the commented
out code in a day or so.
1999-04-23 06:14:06 +00:00
Rasmus Lerdorf 7440bc50da Ok, finally.. These now work nicely on a RH-5.2 box:
--with-mysql --with-ldap --with-imap --with-zlib --with-snmp
1999-04-23 04:54:31 +00:00
Rasmus Lerdorf 806dfc2a76 Make zlib compile 1999-04-23 04:12:13 +00:00
Zeev Suraski 8a2f6371fe *** empty log message *** 1999-04-23 03:36:17 +00:00
Zeev Suraski 1aa2c5c0b4 Ok, call me crazy, because I probably am.
Thread safe version now uses a C++ scanner object.  Works fully.
1999-04-23 03:32:33 +00:00
Rasmus Lerdorf cad2318a54 Module work 1999-04-23 03:28:47 +00:00
Zeev Suraski 551fe7780b Make token names uniform, they all begin with T_ now. 1999-04-22 23:08:42 +00:00
Zeev Suraski 327fc20243 vpath fix 1999-04-22 22:28:17 +00:00
Rasmus Lerdorf af3f73f7a3 This is generated 1999-04-22 04:42:58 +00:00
Rasmus Lerdorf 77cdb5f483 Bring imap build rules up to date. We still have a problem here though.
In this new build structure we are adding libraries to $LIBS as we add
modules instead of doing an AC_SUBST into the Makefile.  One reason for
doing the subst in php3 was to get around the libraries that could not
be included in $LIBS because doing so would mess up the various configure
tests.  For example, you can't do a -limap as part of the various simple
configure compile programs because -limap requires a bunch of callback
symbols to be present.
1999-04-22 04:21:08 +00:00
Andi Gutmans 916692f4ad - Update the regular VC project file. 1999-04-22 03:58:37 +00:00
Stig Bakken e109756121 db was not linked in 1999-04-22 03:03:35 +00:00
Stig Bakken 09d047f8b1 db was not linked in 1999-04-22 03:01:32 +00:00
Stig Bakken 2c0ad3ee25 last bunch of extensions moving to ext/
fhttpd module taken out of functions, functions is ready to go.
The only extensions I have tested are gd+freetype and odbc(solid).
Please try compiling in your favourite extensions and let me know how it
works.
1999-04-22 02:48:28 +00:00
Stig Bakken 2a78f92804 moved imap and ldap 1999-04-22 00:45:14 +00:00
Stig Bakken ff37732997 moved fdf, hyperwave, informix and some smaller files 1999-04-22 00:25:57 +00:00
Stig Bakken f582bec9db moved db 1999-04-21 23:37:47 +00:00
Stig Bakken f9f82960d9 moved bcmath 1999-04-21 23:28:00 +00:00
Stig Bakken a297b95c9d moved apache, com and hyperwave into ext/ 1999-04-21 23:11:20 +00:00
Stig Bakken f67a9bdc52 moved dav, msql and oracle to ext/ 1999-04-21 22:49:16 +00:00
Stig Bakken 96660d9a8c moved filepro to ext 1999-04-21 22:11:15 +00:00
Stig Bakken 71c71a4732 moved filepro to ext 1999-04-21 22:05:45 +00:00
Stig Bakken 7d013383e9 mysql should work again now, can someone with mysql installed test it? 1999-04-21 21:34:57 +00:00
Stig Bakken 5d75ccdcff gd compile fix 1999-04-21 21:27:18 +00:00
Stig Bakken 3789ac7ea0 moving mysql to ext/ 1999-04-21 21:26:10 +00:00
Stig Bakken f9d169c812 create .cvsignore only once :-) 1999-04-21 21:13:40 +00:00
Stig Bakken 3a3e18728c create .cvsignore as well 1999-04-21 20:39:22 +00:00
Stig S. Bakken d9144155f5 state which aclocal.m4 and configure files are created 1999-04-21 20:33:33 +00:00
Stig Bakken 72c2d04d72 state which aclocal.m4 and configure files are created 1999-04-21 20:32:56 +00:00
Stig Bakken 8335a61d74 merge the object files in a temporary directory 1999-04-21 20:30:47 +00:00
Stig S. Bakken 1ee30e61fc zend-parser.o and zend-scanner.o were included twice in libzend.a 1999-04-21 20:30:37 +00:00
Zeev Suraski 942f409292 * Change the thread safe project to create a C++ scanner.
* Add in a slightly modified skeleton file (only a couple of #if's for #include's
that we dont have in Windows)

It does NOT compile or work yet :)
1999-04-21 20:13:02 +00:00
Zeev Suraski 1573412776 Thread safe project update 1999-04-21 19:40:16 +00:00
Stig Bakken 23280d0a75 added PHP_API_VERSION, simply set it to 19990421 for now 1999-04-21 19:39:21 +00:00
Zeev Suraski 937270f319 Fix 1999-04-21 19:10:54 +00:00
Zeev Suraski 7d34d425be Minor fixes 1999-04-21 19:10:18 +00:00
Zeev Suraski 751709a469 * Rename php_compat.[ch] to flock_compat.[ch] and move it to ext/standard
* Fix Win32 compilation
1999-04-21 19:01:38 +00:00
Sascha Schumann 065636be85 forgot that one 1999-04-21 18:10:39 +00:00
Sascha Schumann 08c6298af9 cleanup, flock() support 1999-04-21 18:10:18 +00:00
Sascha Schumann f06cb4deb6 crypt constants 1999-04-21 17:57:40 +00:00
Sascha Schumann 2873f446f2 cleanup 1999-04-21 17:48:11 +00:00
Zeev Suraski 7aad231327 Thread safety patch. It works now with just-in-time resource initialization! 1999-04-21 17:28:54 +00:00
Zeev Suraski a9f9ae7920 Thread safety patch. It works now with 'just in time' resource initialization! 1999-04-21 17:26:37 +00:00
Sascha Schumann 48e350a94d incorporate gettext support 1999-04-21 17:26:16 +00:00
Sascha Schumann dcc16af80c port some fixes, add compat routines 1999-04-21 17:11:01 +00:00
Sascha Schumann a6e4ef3e31 str_replace fix 1999-04-21 16:31:27 +00:00
Stig Bakken 9b3c1ca2c3 make config.h.stub as well 1999-04-21 16:23:47 +00:00
Stig Bakken 43ed903949 remove old libtool and automake stuff that was borrowed using 3.0 1999-04-21 15:52:42 +00:00
Zeev Suraski 52fcaa443b Thread-safe project 1999-04-21 15:35:57 +00:00
Zeev Suraski 763ed6a4fb Update thread-safe projects 1999-04-21 15:34:31 +00:00
Sascha Schumann 4908dbdf36 config.h.in is a generated file and should be ignored by CVS 1999-04-21 15:16:30 +00:00
Stig Bakken f8fe0ad29c move automake back to before autoconf 1999-04-21 14:07:07 +00:00
Stig S. Bakken a9d3d0832a move automake back to before autoconf 1999-04-21 14:06:58 +00:00
Stig Bakken 02f9dc6460 autoheader must be called after autoconf, automake after autoheader 1999-04-21 13:47:05 +00:00
Stig S. Bakken 9003b9a261 autoheader must be called after autoconf, automake after autoheader 1999-04-21 13:45:46 +00:00
Stig S. Bakken bb74a94fa5 think before one commits 1999-04-21 13:26:27 +00:00
Stig S. Bakken f68609b50f doh. cvs appears to ignore .in files by default 1999-04-21 13:24:39 +00:00
Sascha Schumann 8489ea5414 generates basic skeleton for new extension 1999-04-21 10:24:41 +00:00
Zeev Suraski c5af324ec3 More thread safety work 1999-04-21 04:02:11 +00:00
Zeev Suraski 7a87fcbbda Thread safety patch. We're still not quite there but it compiles again, and
more logic has been implemented.
1999-04-21 03:49:09 +00:00
Zeev Suraski 37fe04b887 Thread Safe Resource Manager 1999-04-20 23:58:02 +00:00
Stig Bakken b84ce5a06a added ext/*/config.h.stub files
removed config.h.in (generated)
1999-04-20 01:23:32 +00:00
Stig S. Bakken 9e4c7bd56c Makefile.in and aclocal.m4 are generated
added buildconf script
1999-04-20 01:12:53 +00:00
Stig Bakken 54468d2e75 odbc compiles and runs on UNIX again (tested with Solid 2.3) 1999-04-20 01:03:12 +00:00
Zeev Suraski b7c30c1bdf Return a success value from the startup function, so we can unload immediately
if it fails.
1999-04-19 21:39:18 +00:00
Stig Bakken 84e9ea1726 convert libzend to automake 1999-04-19 20:11:50 +00:00
Stig S. Bakken b227e385cc convert to automake 1999-04-19 20:10:26 +00:00
Andi Gutmans 5033ee7d69 Rearrange the .dsp for the new ODBC layout 1999-04-19 18:57:29 +00:00
Andi Gutmans 9deab4118d Add a couple of ZEND_API's 1999-04-19 18:57:14 +00:00
Stig Bakken a2d8219e2c ignore acconfig.h 1999-04-19 17:36:25 +00:00
Stig Bakken edf17b2a8f include the right header files 1999-04-19 17:24:25 +00:00
Stig Bakken 7d9c4da459 generate acconfig.h from acconfig.h.in and ext/*/config.h.stub 1999-04-19 17:19:37 +00:00
Andi Gutmans dd03a7a2f3 Support =unset as arguments 1999-04-19 16:28:05 +00:00
Stig Bakken 7dee737fb4 moved odbc into ext/ 1999-04-19 15:04:11 +00:00
Stig Bakken aac5a43123 keep old files if they are not modified 1999-04-19 13:58:54 +00:00
Stig Bakken 269877fdf3 moved dbase into ext/ 1999-04-19 13:58:31 +00:00
Stig Bakken 6094128afe moved dbase into ext/ along with the bundled library
dbase programs are no longer included
1999-04-19 13:56:50 +00:00
Stig S. Bakken b515f34dd1 removed -lnsl and -lsocket checks from zend 1999-04-19 13:51:13 +00:00
Stig Bakken 3912318923 run automake and run autoconf in libzend 1999-04-19 08:07:20 +00:00
Zeev Suraski 1390eadc14 Ah, so that file is generated too 1999-04-18 20:59:54 +00:00
Zeev Suraski 1ae9891e7e AiCount needs to be decreased here 1999-04-18 19:55:42 +00:00
Zeev Suraski cc5e008b72 * Added buildconf, runs all the scripts necessary to build configure (Stig - if there's any way
to detect whether we need to run 'automake --add-missing', please add it...)
* Make vpath work again
* Minor UNIX bugfixes
1999-04-18 18:06:54 +00:00
Zeev Suraski 5e8c322859 Make Win32 happy with the recent changes. 1999-04-18 15:58:27 +00:00
Zeev Suraski f432c05c3f Forgot to add these - Win32 registry support 1999-04-18 15:54:18 +00:00
Zeev Suraski 342c6e0b23 Whatnot:
* updated alloc_persist to use critical sections
* changed extension shutdown to two-phase
* updated dependencies
* PR support (don't remember if there was any really)
1999-04-18 15:11:52 +00:00
Zeev Suraski 2e8fb4e329 Win32 registry support 1999-04-18 15:09:46 +00:00
Andi Gutmans 593e603e4b - Make gettype() behave like it used to where it returned "object" for
objects.
1999-04-17 07:02:58 +00:00
Stig Bakken 1e2474b18c Apache module compiles again 1999-04-17 02:01:20 +00:00
Stig Bakken f4f53c850a this file is now generated 1999-04-17 01:54:27 +00:00
Stig Bakken 4f7b0a0ccd make sure the images on the phpinfo() page point to PHP-enabled pages 1999-04-17 01:52:58 +00:00
Stig Bakken af88aa5474 ignore configure.in 1999-04-17 00:43:47 +00:00
Stig Bakken 74fb12efd5 this file is now generated 1999-04-17 00:43:21 +00:00
Stig Bakken 257de2bade First commit of re-structuring phase one. We have started using automake in
sub-directories and started to move extension code into ext/<name>.  For now,
I have moved the "standard" extension (which is quite a mix of everything
right now) and the GD extension into their own subdirs in ext/.
The configure script now also runs configure in the libzend directory
automatically and makes sure php4 and libzend use the same config.cache file.
To avoid running configure in libzend, use the --no-recursion option.
"make" in php4 also builds libzend now.
The Apache module doesn't compile right now, but a fix for that is
coming up.
1999-04-17 00:37:12 +00:00
Stig Bakken 2127ede122 updated GD from php3 repository, using it as a test extension for the new
directory structure
1999-04-16 12:15:38 +00:00
Andi Gutmans 8cf2d74b76 - Make the memory leak message print PHP4. 1999-04-16 08:12:51 +00:00
Andi Gutmans b32b2831d8 - one more place which seems to have needed fixing. I don't have time to look
more into it. I hope we don't have anymore places which need fixing.
1999-04-15 17:43:16 +00:00
Andi Gutmans 3d631c4ca0 - Should fix the pass by reference problem. This happened because we moved
start from arg 1 now and not arg 0. There might be more places which need fixing
 like in the executor but the bug seems OK now.
1999-04-15 17:41:21 +00:00
Zeev Suraski fa76f0c903 Compile fix 1999-04-14 21:03:25 +00:00
Andi Gutmans 39f9487ee1 -Tiny patches 1999-04-14 19:53:33 +00:00
Zeev Suraski 76ceb9ad44 Better detection 1999-04-13 22:09:59 +00:00
Zeev Suraski 7c2155c1ad Move Ai stuff before get_zval_*(), like Andi suggested. Fixes Sascha's huge
memory leak
1999-04-13 20:50:31 +00:00
Andi Gutmans e1e2226b92 - Fix various memory leaks. 1999-04-13 19:28:03 +00:00
Andi Gutmans d86ed8207c Refcount bugfix 1999-04-13 17:49:14 +00:00
Andi Gutmans 3fcc6511f6 * Optimize argument_stack top lookup
* Fix a nasty bug in zend_ptr_stack_clean()
1999-04-13 17:03:10 +00:00
Zeev Suraski 533f135987 Remove unnecessary stack 1999-04-12 21:50:49 +00:00
Zeev Suraski ad9b13eb9e off by one 1999-04-12 21:06:29 +00:00
Zeev Suraski 1dff49ec83 Minor optimization 1999-04-12 20:49:02 +00:00
Zeev Suraski 3ca6d6113a Make functions that don't take arguments somewhat happier:) 1999-04-12 19:44:47 +00:00
Zeev Suraski 714f450a00 This should take care of "this" for user-defined functions. It wasn't yet working
for built-in functions anyway, this one is coming soon.
1999-04-12 19:40:48 +00:00
Zeev Suraski 0666083907 NULL's should remain NULLs (at least in strings) 1999-04-12 19:40:33 +00:00
Zeev Suraski 15be5f0b4a Destroy the resource list after destroying the symbol table, otherwise the
auto-destructor for resources are run when the resource list is no longer valid
1999-04-12 18:40:18 +00:00
Zeev Suraski 39a7f4c306 This patch is a go. Not fully optimized yet, but working properly.
Prepatch tagged as BEFORE_STACK_PATCH.
1999-04-12 18:29:09 +00:00
721 changed files with 165011 additions and 18237 deletions

No files matched your search

-11
View File
@@ -1,11 +0,0 @@
If you think you've found a bug in PHP3, you can report it on the bug
reporting page at:
http://www.php.net/
Current Known Bugs:
* split() function doesn't return regex errors nicely
* Preprocessed scripts don't work with require() and define()
* unset() doesn't actually erase the variables it just marks them as uninitialized
* Some parts in the language core prevent more than 256 arguments in function
calls from being possible
-624
View File
@@ -1,624 +0,0 @@
Noticeable Changes between PHP/FI 2.0 and PHP 3.0
=================================================
This file was designed to be viewed with a tab size of 4 characters.
This file is divided into 4 sections:
1. Downwards incompatible language changes. This section includes all of
the changes in the core language which may require people to modify
their scripts before using them with PHP 3.0. It does NOT list
changes made in the behavior of specific functions.
2. New language features. This section includes all of the new additions
to the core language, that may be used to enhance scripts designed for
PHP 3.0. Likewise, it does not include a listing of new functions.
3. Structural changes not directly effecting the end user. The core
of PHP 3.0 is a complete rewrite. As such, many issues effecting
PHP/FI 2.0 were addressed and vastly improved in this version,
resulting in a much more stable and efficient implementation. This
section lists these changes in design.
4. Other changes that don't fit in any of the above categories.
Please remember that PHP 3.0's core is a complete rewrite, and thus,
there may be other undocumented incompatibilities we haven't thought
of ourselves. If you think you've found a incompatibility (or a new
feature) which is not listed here, please mail us at
php-dev@php.iquest.net.
- Zeev
------------------------------------------------------------------------------
Downwards incompatible language changes
=======================================
[1] The close-PHP tag has changed from > to ?>
This means that instead of writing:
<?echo $title;>
You should write:
<?echo $title;?>
PHP3 also includes support for a longer-form start tag that is
XML-compliant:
<?php echo $title;?>
The ability to use the short start tag ('<?') can be turned on and
off using the short_tags() function. Whether it is enabled or not by
default is a compile-time option (normally set to enabled by default).
[2] Semicolons in if/elseif/else must be replaced with colons.
For example, the equivalent of:
if (expr);
statements
...
elseif (expr);
statements
...
else;
statements
endif;
in PHP 3.0 would be:
if (expr):
statements
...
elseif (expr):
statements
...
else:
statements
endif;
Note that the endif is followed by a semicolon and not a colon even in
PHP 3.0, which marks the end of the entire IF sentence.
Also note that the implementation of the colon-mode and curly-braces
mode in PHP 3.0 is identical, one isn't buggier than the other (note
that I'm not saying they're not buggy, though :)
[3] Semicolons in while loops must also be replaced with colons.
For example, the equivalent of:
while (expr);
statements
...
endwhile;
in PHP 3.0 would be:
while (expr):
statements
...
endwhile;
Note that the endwhile is followed by a semicolon and not a colon even
in PHP 3.0, which marks the end of the WHILE sentence. As with the IF
statement, the implementation of the colon-mode and curly-braces mode
in PHP 3.0 is identical, one isn't buggier than the other.
Also note that failing to change the semicolon to a colon can result in
scripts that get stuck in the while loop because the loop-condition never
changes.
[4] $foo[0] is no longer identical to $foo.
In PHP/FI 2.0, a side-effect of the implementation caused $foo[0] to be
identical to $foo. This is not the case in PHP 3.0.
[5] Expressions determine their types differently.
The way expressions are evaluated has changed radically in PHP 3.0.
Expressions are no longer given the type of the left argument, but are
assigned types taking both types into account, and regardless of which
is on the left side and which is on the right side. On simple scripts
that should probably not effect you, but if you've relied on this fact
(even without realizing you do) it may change the way your scripts work.
Consider the next example:
$a[0]=5;
$a[1]=7;
$key = key($a);
while ("" != $key) {
echo "$key\n";
next($a);
}
In PHP/FI 2.0, this would display both of $a's indices. In PHP 3.0, it
wouldn't display anything. The reason is that in PHP/FI 2.0, because the
left argument's type was string, a string comparison was made, and indeed
"" does not equal "0", and the loop went through. In PHP 3.0, when a
string is compared with an integer, an integer comparison is made (the
string is converted to an integer). This results in comparing atoi("")
which is 0, and $key which is also 0, and since 0==0, the loop doesn't
go through even once. The fix for this is simple, by replacing the
while statement with:
while ("" != stringval($key)) {
This would first convert the integer 0 to a string "0", and then
compare "" and "0", which are not equal, and the loop would go through
as expected. As mentioned later, casting operators are supported in
PHP 3.0 for a quicker and more readable way of changing variables'
types. For example, you could use:
while ("" != (string)$key) {
[6] The structure of error messages has changed.
Although the error messages are usually more accurate, you won't be shown
the actual line of text and actual place in which the error occured.
You'll be supplied with the line number in which the error has occured,
though.
[7] The format string argument to echo is no longer supported.
Use printf(format,arg1,arg2,arg3,...) instead (unlimited arguments).
[8] The use of read-mode $array[] is no longer supported.
That is, you cannot traverse an array by having a loop that does $data =
$array[]. Use current() and next() instead. Also, $array1[] = $array2
does not append the values of $array2 to $array1, but appends $array2
as the last entry of $array1 (see the multidimensional array support).
[9] Apache versions older than 1.2 are not supported anymore.
The apache module requires apache 1.2 or later (1.3-beta is supported).
[10] Indirect references inside quoted strings
PHP2-style indirect reference inside quoted strings is no longer
supported. That is, if $foo="bar", and $bar="abc", in PHP2,
"$$foo" would print out "abc". In PHP3, this would print
"$bar" (the contents of $foo is replaced with "bar").
To use indirect reference in PHP3 inside quoted strings, you should use
the new notation: "${$foo}". The standard $$foo notation will work
outside of the quoted string.
[11]
Some functions have changed names, are missing, or have been deprecated
by other functions
As a whole new rewrite, written by many more people and supporting many
more APIs than it's predecessor, there's a good chance some of the functions
you're used to from PHP/FI 2 aren't available in release 3, or have changed
names. Many functions that do exist behave a bit differently, mainly
because they return different values for errors (false) but also for other
reasons. We can't list all of these functions here, simply because drawing
a full comparison between the function sets of the two versions is way too
much work. If a converted PHP/FI 2 script doesn't work for you, nothing
can replace the good old human eye going over the code, doublechecking
with the online manual that each function still does what you expected it
to do.
[12] Other incompatibilities.
It's not too unlikely that other documented behavior of PHP2 has changed
in this release. If you think you've found an example, please mail
us at php-dev@php.iquest.net. Even if you've found an undocumented
feature of PHP2 that stopped working in PHP3, we'd like to know about it
(although it's more than likely that it will not be supported).
------------------------------------------------------------------------------
New Language Features
=====================
[1] Expressions
PHP 3.0 includes a rich implementation of expressions, much more advanced
than this of 2.0. Just about any complex C-like or perl-like expression
would work. Support was added for assignment operators (+=, -=, *= etc),
pre and post increment/decerement (e.g. $i++, ++$i) and the questionmark
operator ( (expr?expr:expr) ). Every assignment is now an expression
with a value, which means stuff like $a = $b = $c = $d = 0; would work.
It is difficult to describe the power of expressions within a few lines
of text, but if you're familiar with them, you probably get the picture.
[2] for loops are now supported.
for loops were fairly difficult to implement (in fact, we didn't find
any parallel interpreter that supports for loops anywhere (no, perl is
not an interpreter)). The bottom line is that for loops work, and are
around 5% slower than comparable while loops (that may vary), but often
they're much nicer.
The syntax is identical to the one of C:
for (expr; expr; expr) statement;
or
for (expr; expr; expr) { statements ... }
The first expression is executed the first time the loop is encountered,
the loop is run as long as the second expression is evaluated as TRUE,
and after each iteration, the 3rd expression is evaluated.
Colon-mode FOR loops are also supported:
for (expr; expr; expr):
statements
...
endfor;
[3] do..while(expr) loops are now supported.
Like with its C parallel, the statements inside a do..while loop are
run once the first time the loop is encountered, and then as long as
the expression evaluates as true.
For example:
do {
statements;
} while ($i++ < $max);
[4] break and continue statements are now supported inside loops.
You can break out of loops, or continue to the next iteration of the
loop using these statements. A special feature of PHP is the ability
to specify an expression argument to break or continue, which specifies
how many loops you want to break out from or continue to. For example:
for ($i=0; $i<10; $i++) {
for ($j=0; $j<10; $j++) {
if ($j>5)
break;
if ($i>5)
break 2;
}
}
The first break statement would end the inner loop every time $j is
greater than 5. The second break statement would end both the inner
and outer loop when $i is greater than 5.
Note: For this matter, switch statements are considered as loops. So
if you write "break 2;" inside a switch statement, you would be asking
to break out of the switch, and the innermost loop in which is nested.
[5] Switched to C-style declaration of functions.
Here's a pretty useless function which makes a good example:
function concat($str1,$str2)
{
return $str1.$str2;
}
NOTE: The old style function definition is still supported, to
allow easier upgrading from PHP/FI 2.0 scripts. Simply
change 'function' to 'old_function' for these functions.
[6] OOP support
Classes and inheritance are supported to a limited extent in PHP 3.0.
Here's how to declare a simple class:
class simple_class {
var $property1,$property2;
var $property3=5;
function display() {
printf("p1=%d, p2=%d, p3=%d\n",
$this->property1,
$this->property2,
$this->property3);
}
function init($p1,$p2) {
$this->property1 = $p1;
$this->property2 = $p2;
}
};
Here's how to create an object of that class:
$obj = new simple_class;
At this point, $obj is an object with 2 uninitialized variables, 1
initialized variable, and 2 member functions. No protection is made on
the internals of the object, and using its properties is simple:
$obj->property1 = 7;
would assign 7 to $property1 inside $obj. Calling member functions is
also simple:
$obj->display()
would run the display() member function of $obj. Note that the
implementation of display() uses the special variable $this, which is
replaced with the object the function is called on.
Inheritance is pretty simple too:
class complex_class extends simple_class {
var $property4="test";
function display() {
printf("p1=%d, p2=%d, p3=%d, p4=%d\n",
$this->property1,
$this->property2,
$this->property3,
$this->property4);
}
}
Basically, the class complex_class inherits everything from its parent,
simple_class, except properties or member functions which override the
ones in the parent. In this example, since we supply an alternative
display() function, it would be used with complex_class objects instead
of the display() function that was declared in simple_class. On the other
hand, since we don't supply an alternative init() function, complex_class
objects would have the same init() function as simple_class objects do.
As with expressions, it's impossible to teach OOP in a few lines, and
personally I'm unclear as to how useful this would be in day to day
scripting. If you like this, play with this until you figure it out :)
Objects can reside in arrays, and can contain arrays. However,
a limitation of the current implementation doesn't allow an object
to contain an array of objects (actually, this is allowed, but
there's no way to address the properties of such an object directly,
but only indirectly). For example, assuming $a[3] is an object,
$a[3]->b[2] is an object as well, you can't address the properties
of $a[3]->b[2] (i.e. you can't write $a[3]->b[2]->foo = "bar", for
instance).
[7] Function pointers are now supported.
A simple illustrative example:
$func_ptr = "time";
$current_time = $func_ptr();
is identical to
$current_time = time();
[8] Indirect references are much more powerful.
For example, one can use the dollar operator an infinite amount of times:
$a = "b";
$b = "c";
$c = "d";
$d = "e";
$e = "Testing\n";
echo $$$$$a;
Would display $e's content, which is "Testing\n".
In addition, one can use complex expressions to generate variable names
using a perl-like notation:
$i="123";
${"test".$i} = 5;
would assign 5 to $test123.
[9] A string concatenation operator was added, '+' no longer concatenates strings.
A perl-like string concatenation operator was added, the '.' operator.
It converts both of its arguments to strings, and concatenates them.
For example:
$result = "abcd".5;
assigns "abcd5" to result. Note that under PHP 3.0, the '+' operator
no longer performs concatenation if its arguments are strings. Use
the '.' operator instead.
[10] Supports passing function arguments by references instead of by value.
Support for passing function arguments by reference instead of by value
has been added. This doesn't result in having to change the function
implementations in any way, but, when calling the function, you can
decide on whether the variable you supply would actually be changed by
the function, or a copy of it.
Example:
function inc($arg)
{
$arg++;
}
$i=0;
inc($i); # here $i in the outer scope wouldn't change, and remain 0
inc(&$i); # here $i is passed by reference, and would change to 1
[11] Support for multidimensional arrays.
(Or as Andi calls them, 'hyperdimensional variables'.)
The easiest way to define this support of PHP 3.0 is inductive -
arrays can contain any type of variables, including other arrays.
A simple example:
$a[0]=5;
$a[1]["testing"]=17;
$b["foo"]=$a;
Ok, so it may be not so simple. Play with it, it's pretty powerful.
[12] Array initialization is now supported.
For example, let's say you want to initialize a lookup table to convert
number to month names:
$months = array("January", "February", "March",
"April", "May", "June", "July", "August",
"September", "October", "November", "December");
would assign $months[0] to be January, $months[1] to be February, etc.
Alternately, you may want the count to start at '1' instead of 0.
You can do so easily:
$months = array(1=>"January", "February", "March",
"April", "May", "June", "July", "August",
"September", "October", "November", "December");
Also, you can specify an index for every entry, not just the first one:
$first_names = array("Doe"=>"John", "Gates"=>"William",
"Clinton"=>"Bill" });
would assign $first_names["Doe"]="John", etc.
[13] Perl style lists now supported.
Multiple values from arrays may now be assigned into several
variables using one assignment. For example:
$str = "johndoe:x:555:555:Doe, John:/home/johndoe:/bin/tcsh";
list($username,$passwd,$uid,$gid,$realname,$homedir,$shell) =
explode(":",$str);
Would assign 'johndoe' into $username, 'x' into $passwd, etc.
[14] Colons are supported in 'case' and 'default' statements.
For example:
switch($value) {
case 'A':
statement;
break;
case 'B':
statement;
break;
case 'C':
statement;
/* fall-through */
default:
statement;
}
Semicolons are still supported, but when writing new scripts, they
should be phased out in favour of colons.
------------------------------------------------------------------------------
Non Language Related New Features
=================================
[1] Persistent resource lists.
In plain english this means that there's now an easy way of writing the
SQL drivers so that they don't open and close the SQL link every time,
but instead open it the first time it's required, and then use it on
every later hit. As of PHP 3.0a1, only the MySQL, mSQL and PostgresSQL
drivers have been changed (rewritten) to take advantage of this option.
To use it, use mysql_pconnect() instead of mysql_connect() (or the
equivalents for the two other databases).
[2] Configuration file.
PHP now has its own configuration file, and many compile-time options
of PHP2 are now configurable at runtime.
[3] Syntax Highlighting.
A syntax highlighter has been built into PHP 3.0, which means PHP 3.0 can
display your code, syntax highlighted, instead of executing it.
There are currently two ways to use the syntax highlighter. One is to
use the show_source() statement. This statement is identical to the
include() statement, except instead of executing the file, it displays
its source syntax highlighted.
The second way is possible only when running as an apache module, and is
to define a special extension for PHP 3.0 source files (e.g. .php3s)
and instruct apache to automatically syntax highlight them.
[4] Loadable modules.
This would have a huge impact on the Windows version, and would probably
be used in the UNIX environment as well. One can now add PHP internal
functions in runtime by loading a dynamic module. This is known to work
under Solaris, Linux and Win32 at this time, but would be ported to any
other capable platform if an incompatability is found.
------------------------------------------------------------------------------
Other Interesting Issues
========================
[1] Improved performance.
The performance of PHP 3.0 is much better than the one of PHP/FI 2.0.
Memory consumption has been dramatically reduced in many cases, due
to the use of an internal memory manager, instead of apache's pools.
Speedwise, PHP 3.0 is somewhere between 2 and 3 times faster than
PHP/FI 2.0.
[2] More reliable parser.
After PHP 3.0 is well tested, it'll be pretty safe to say that it's
more reliable than PHP/FI 2.0 is. While PHP/FI 2.0 performed well on
simple, and fairly complex scripts, a fundamental design difference
from PHP 3.0 makes it more prone to errors. In PHP 3.0, obscure parser
problems are much less likely.
[3] Improved C API.
If you're a C coder, adding functionality to PHP was never easier.
A pretty well documented API is available (apidoc.txt), and you no longer
have to touch the parser or scanner code when adding your function.
Also, it's more complicated to 'go wrong' when implementing a PHP3
function than it was in PHP2 (no stack to maintain) - but of course,
you can mess up here too :)
[4] Name change.
PHP/FI 2.0 was renamed to PHP 3.0, and the meaning has changed from
'Personal Home Pages / Forms Interpreter' to 'PHP: Hypertext Preprocessor'.
'Personal' home pages was an understatement for PHP/FI 2.0, and is
definitely an understatement for PHP 3.0.
-339
View File
@@ -1,339 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
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 the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
+2 -175
View File
@@ -1,176 +1,3 @@
PHP Version 3.0 Development Team
For the list of people who've put work into PHP 4.0, please see
http://www.php.net/version4/credits.php
------------------------------------------------------------------------------
Core Developers
===============
Rasmus Lerdorf (rasmus@lerdorf.on.ca)
* Original language definition and implementation
* CGI loader and many internal functions
* Apache module support
* SNMP module
* Original mSQL, MySQL and Sybase modules
* Oracle module work
Andi Gutmans (andi@php.net) and Zeev Suraski (zeev@php.net)
* New language definition and implementation
* Internal functions API design
* General hash table implementation for symbol tables, arrays and objects
* Memory manager
* Token cache manager
* A lot of internal functions (including hebrev :) and migration from PHP 2.0
* Syntax highlighting mode
* Configuration file parser
* New persistent/multilink MySQL, PosgresSQL, Sybase and mSQL modules
* Win32 COM support
Stig Bakken (ssb@guardian.no)
* Oracle support
* configure/install script work
* sprintf reimplementation
* XML support
* SGML documentation framework
Shane Caraveo (shane@caraveo.com)
* Porting to Visual C++
* Generalization to support different server APIs
* Work on ISAPI and NSAPI APIs
Jim Winstead (jimw@php.net)
* Lots of PHP2 -> PHP3 porting
* dBase support
* URL parsing functions
* Makefile work
* Regex rewrite
* Win32 work
------------------------------------------------------------------------------
Major Contributors
==================
* Jouni Ahto (jah@cultnet.fi)
Postgres, Informix
* Alex Belits (abelits@phobos.illtel.denver.co.us)
fhttpd support
* Bjørn Borud (borud@guardian.no)
soundex code and lots of enthusiasm
* Christian Cartus (chc@idgruppe.de)
Informix Universal Server support
* John Ellson (ellson@lucent.com)
Freetype support
* Dean Gaudet (dgaudet@arctic.org)
Apache module debugging + helpful hints along the way
* Mitch Golden (mgolden@interport.net)
Oracle testing and bug fixes
* Danny Heijl (Danny.Heijl@cevi.be)
Informix SE support
* Mark Henderson (mark@togglemedia.com)
Various odds and ends
* Jaakko Hyvätti (jaakko@hyvatti.iki.fi)
Prototype cop, regular expression code fixes, CGI security issues
* Amitay Isaacs (amitay@w-o-i.com)
LDAP
* Andreas Karajannis (Andreas.Karajannis@gmd.de)
Adabas D, ODBC, Oracle
* Igor Kovalenko (owl@infomarket.ru)
QNX support issues
* Richard Lynch (lynch@lscorp.com)
Documentation
* Tom May (tom@go2net.com)
Sybase-CT work
* Muhammad A Muquit (MA_Muquit@fccc.ed)
Original Sybase module
* Mark Musone (musone@edgeglobal.com)
IMAP
* Jeroen van der Most (jvdmost@digiface.nl)
Solid
* Chad Robinson (chadr@brttech.com)
Documentation, FilePro
* Lachlan Roche (lr@www.wwi.com.au)
MD5
* Stefan Roehrich (sr@linux.de)
zlib
* Nikolay P. Romanyuk (mag@redcom.ru)
Velocis support
* Brian Schaffner (brian@tool.net)
ODBC support, PHP3 API testing
* Egon Schmid (eschmid@delos.lf.net)
Documentation
* (sopwith@redhat.com)
Solid
* Colin Viebrock (cmv@privateworld.com)
Website graphic design and layout, PHP logo
* Eric Warnke (ericw@albany.edu)
LDAP
* Lars Torben Wilson (torben@netmill.com)
Documentation
* Uwe Steinmann (Uwe.Steinmann@fernuni-hagen.de)
Hyperwave, PDF, Acrobat FDF Toolkit
------------------------------------------------------------------------------
Beta Testers
------------
* Niklas Saers (berenmls@saers.com)
FreeBSD/x86
* Chuck Hagenbuch <chuck@osmos.ml.org>
Linux/x86 glibc2, MySQL, mod_ssl
* Sascha Schumann (sas@schell.de)
FreeBSD/x86, PostgreSQL, IMAP, gdttf
* Jim Jagielski (jim@jagunet.com)
A/UX, FreeBSD/x86
* Jouni Ahto (jah@cultnet.fi)
Debian Linux 2.0
------------------------------------------------------------------------------
Andi Gutmans and Zeev Suraski would like to thank Professor Michael Rodeh for
his positive input during the initial development of the interpreter.
+9337 -839
View File
File diff suppressed because it is too large. Load diff
-54
View File
@@ -1,54 +0,0 @@
The core of PHP 3.0 is considered to be stable at this time. However, some of
the modules that are bundled with it are still undergoing development, or
contain known bugs. The purpose of this file is to document the status of
each module (extension). Patches to unstable modules will be available through
the CVS, and through periodic maintenance releases.
Stability scale:
Rock solid - We believe it's safe to base a production site on it.
Stable - It should be safe to base a production site on it.
Isn't rated as rock-solid because it contained problems
in the not-so-far past, or doesn't have enough users
to test it to know it's rock solid.
Beta - This module probably contains bugs, sometimes even known
bugs. You can give it a try and there's a good chance
it'll work fine, but it might not be a good idea to base
a production site on it.
Alpha - This module is in initial development steps. Don't trust
it, play with it at your own risk.
Deprecated - This module is only available for downwards compatability,
and will not be supported in any way. The code quality
is usually around the Beta status.
The standard disclaimers apply, that is, if a rock-solid module blows up on
you and ruins your site, nobody in the PHP development team is responsible.
We'll probably try to help, though.
Extension Name Status Comments
-----------------------------------------------------------------------------
DBM Rock Solid That relies on a working DBM library.
The flatfile support is probably not
as stable.
MySQL Rock Solid
mSQL Rock Solid
Sybase DB Stable
Sybase CT Stable
BC Math Rock Solid Arbitary precision math library
Postgres SQL Stable Postgres 6.2 and earlier is stable,
but problems were reported with 6.3
Debugger Beta
Unified ODBC Beta
Solid Deprecated Replaced by Unified ODBC
iODBC Deprecated Replaced by Unified ODBC
Adabas Deprecated Replaced by Unified ODBC
LDAP Stable Lightweight Directory Access Protocol.
dBase
FilePro
Oracle Beta Not tested thoroughly enough.
IMAP Beta Bundled in the dl/ directory
SNMP Stable Very solid, but also very limited.
Only supports GET and WALK requests.
Raima Velocis Beta If use with Unified ODBC, replaced
by Unified ODBC
Raima Velocis Alpha If use without Unified ODBC
+67 -38
View File
@@ -1,50 +1,53 @@
Installation Instructions for PHP3
----------------------------------
Installation Instructions for PHP 4.0
-------------------------------------
For the impatient here is a quick set of steps that will build PHP3
as an Apache module for Apache 1.3.0 with MySQL support. A more verbose
Note! As of 4.0b3, PHP will require GNU make.
For the impatient here is a quick set of steps that will build PHP as
an Apache module for Apache 1.3.x with MySQL support. A more verbose
explanation follows.
QUICK INSTALL
gunzip apache_1.3.x.tar.gz
tar xvf apache_1.3.x.tar
gunzip php-3.0.x.tar.gz
tar xvf php-3.0.x.tar
cd apache_1.3.x
./configure --prefix=/www
cd ../php-3.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/php3/libphp3.a
(The above line is correct! Yes, we know libphp3.a does not exist at this
$ 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
(you should now have an httpd binary which you can copy to your Apache bin dir)
cd ../php-3.0.x
cp php3.ini-dist /usr/local/lib/php3.ini
You can edit /usr/local/lib/php3.ini file to set PHP options.
cd ../php-4.0.x
cp php.ini-dist /usr/local/lib/php.ini
You can edit /usr/local/lib/php.ini file to set PHP options.
Edit your httpd.conf or srm.conf file and add:
AddType application/x-httpd-php3 .php3
AddType application/x-httpd-php .php
VERBOSE INSTALL
Installing PHP3 can be done in four simple steps:
Installing PHP can be done in four simple steps:
1. Unpack your distribution file.
You will have downloaded a file named something like php3xn.tar.gz.
Unzip this file with a command like: gunzip php3xn.tar.gz
You will have downloaded a file named something like php4xn.tar.gz.
Unzip this file with a command like: gunzip php4xn.tar.gz
Next you have to untar it with: tar -xvf php3xn.tar
Next you have to untar it with: tar -xvf php4xn.tar
This will create a php-3.0.x directory. cd into this new directory.
This will create a php-4.0.x directory. cd into this new directory.
2. Configure PHP3.
2. Configure PHP.
You now have to choose the options you would like. There are quite
a few of them. To see a list, type: ./configure --help
@@ -81,7 +84,7 @@ Installing PHP3 can be done in four simple steps:
3. Compile and install the files. Simply type: make install
For the Apache module version this will copy the appropriate files
to the src/modules/php3 directory in your Apache distribution if
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
these files will be copied directly to the main src directory.
@@ -90,7 +93,7 @@ Installing PHP3 can be done in four simple steps:
cd apache_1.3.x
./configure --prefix=/<path>/apache \
--activate-module=src/modules/php3/libphp3.a
--activate-module=src/modules/php4/libphp4.a
make
make install
@@ -103,29 +106,29 @@ Installing PHP3 can be done in four simple steps:
For Apache 1.3.x add:
AddModule modules/php3/libphp3.a
AddModule modules/php4/libphp4.a
For Apache 1.3.x don't do anything else. Just add this line and then
run "./Configure" followed by "make".
For Apache 1.2.x add:
Module php3_module mod_php3.o
Module php4_module mod_php4.o
For Apache 1.2.x you will also have to look in the libphp3.module file,
For Apache 1.2.x you will also have to look in the libphp4.module file,
which was copied to the src directory. The EXTRA_LIBS line in the Apache
Configuration file needs to be set to use the same libs as specified on
the LIBS line in libphp3.module. You also need to make sure to add
the LIBS line in libphp4.module. You also need to make sure to add
"-L." to the beginning of the EXTRA_LIBS line.
So, as an example, your EXTRA_LIBS line might look like:
EXTRA_LIBS=-L. -lphp3 -lgdbm -ldb -L/usr/local/mysql/lib -lmysqlclient
EXTRA_LIBS=-L. -lphp4 -lgdbm -ldb -L/usr/local/mysql/lib -lmysqlclient
NOTE: You should not enclose the EXTRA_LIBS line in double-quotes, as it
is in the libphp3.module file.
is in the libphp4.module file.
Also, look at the RULE_WANTHSREGEX setting in the libphp3.module file
Also, look at the RULE_WANTHSREGEX setting in the libphp4.module file
and set the WANTHSREGEX directive accordingly in your Configuration file.
This last step applies to versions of Apache prior to 1.3b3.
@@ -144,16 +147,42 @@ Installing PHP3 can be done in four simple steps:
a backup of your previous one first. Then edit your conf/srm.conf file
and add the line:
AddType application/x-httpd-php3 .php3
AddType application/x-httpd-php .php
There is also an interesting feature which can be quite instructive and
helpful while debugging. That is the option of having colour syntax
highlighting. To enable this, add the following line:
AddType application/x-httpd-php3-source .phps
AddType application/x-httpd-php-source .phps
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.
USING PHP3 AND PHP4 AS CONCURRENT APACHE MODULES
Recent operating systems provide the ability to perform versioning and
scoping. This features make it possible to let PHP3 and PHP4 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 PHP3 and PHP4 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
+57 -51
View File
@@ -1,64 +1,70 @@
--------------------------------------------------------------------
Copyright (c) 1998 The PHP Development Team. All rights reserved.
--------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
--------------------------------------------------------------------
The PHP License, version 2.01
Copyright (c) 1999 The PHP Group. All rights reserved.
--------------------------------------------------------------------
1. Commercial redistribution of larger works derived from, or
works which bundle PHP, requires written permission from the
PHP Development Team. You may charge a fee for the physical
act of transferring a copy, and must make it clear that the
fee being charged is for the distribution, and not for the
software itself. You may, at your option, offer warranty
protection in exchange for a fee.
Redistribution and use in source and binary forms, with or without
modification, is permitted provided that the following conditions
are met:
2. Redistributions of source code must retain the above copyright
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
3. Redistributions in binary form must reproduce the above
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.
4. All advertising materials mentioning features or use of this
software must display the following acknowledgment:
"This product includes software written by the PHP Development
Team"
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.
5. The name "PHP" must not be used to endorse or promote products
derived from this software without prior written permission
from the PHP Development Team. 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.
6. Redistributions of any form whatsoever must retain the following
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 software written by the PHP Development
Team".
THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
ANY EXPRESSED 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 PHP
DEVELOPMENT TEAM OR ITS 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.
"This product includes PHP, freely available from
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.
This software consists of voluntary contributions made by many
individuals on behalf of the PHP Development Team.
The PHP Development Team can be contacted via Email at core@php.net.
For more information on the PHP Development Team and the PHP
project, please see <http://www.php.net>.
THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP
DEVELOPMENT TEAM OR ITS 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.
--------------------------------------------------------------------
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 group@php.net.
For more information on the PHP Group and the PHP project,
please see <http://www.php.net>.
+97
View File
@@ -0,0 +1,97 @@
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: dba
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
STATUS: Maintained
--------------------------------------------------------------------------------
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: 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: session
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: snmp
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
STATUS: Odd Fixes
--------------------------------------------------------------------------------
EXTENSION: wddx
PRIMARY MAINTAINER: Andrei Zmievski <andrei@ispi.net>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: xml
PRIMARY MAINTAINER: Thies C. Arntzen <thies@digicol.de>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: zlib
PRIMARY MAINTAINER: Stefan Roehrich <sr@linux.de>
STATUS: Maintained
--------------------------------------------------------------------------------
+20
View File
@@ -0,0 +1,20 @@
Module Status
------ ------
MySQL Working
COM Working
WDDX Working
PCRE Working
DBA Working
mcrypt Working
mhash Working
dbase Working
aspell Working
imap Working
ldap Working
oci8 Working (but no blob-support yet)
oracle Working
iptc Working
informix Working
zlib Working
sysvshm Working
odbc Working (except for persistent connections)
+41
View File
@@ -0,0 +1,41 @@
AUTOMAKE_OPTIONS = foreign
ZEND_DIR = $(srcdir)/libzend
SUBDIRS = libzend ext sapi $(TSRM_DIR) $(REGEX_DIR)
BUILDLDFLAGS = $(EXTRA_LDFLAGS) $(LDFLAGS)
phptemp_LTLIBRARIES = libphp4.la
libphp4_la_SOURCES = \
main.c internal_functions.c snprintf.c php3_sprintf.c \
configuration-parser.y configuration-scanner.l request_info.c \
safe_mode.c fopen-wrappers.c php3_realpath.c alloca.c \
php_ini.c SAPI.c rfc1867.c dlist.c php_content_types.c strlcpy.c \
strlcat.c mergesort.c
libphp4_la_DEPENDENCIES = \
libzend/libzend.la \
sapi/$(PHP_SAPI)/libphpsapi_$(PHP_SAPI).la \
$(REGEX_LIB) \
$(EXT_LTLIBS) \
$(TSRM_LIB)
libphp4_la_LIBADD = $(libphp4_la_DEPENDENCIES) $(EXTRA_LIBS)
libphp4_la_LDFLAGS = $(BUILDLDFLAGS) $(PHP_RPATHS)
configuration-parser.h configuration-parser.c: configuration-parser.y
$(YACC) -p cfg -v -d $< -o configuration-parser.c
configuration-scanner.c: configuration-scanner.l
$(LEX) -Pcfg -o$@ -i $<
EXTRA_PROGRAMS = php
noinst_PROGRAMS = $(PHP_PROGRAM)
php_SOURCES = stub.c
php_LDADD = libphp4.la
php_LDFLAGS = -export-dynamic
install-data-local:
$(INSTALL_IT)
-889
View File
@@ -1,889 +0,0 @@
# +----------------------------------------------------------------------+
# | PHP HTML Embedded Scripting Language Version 3.0 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997,1998 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$
#
prefix = @prefix@
exec_prefix = @exec_prefix@
srcdir = @srcdir@
VPATH = @srcdir@
bindir = @bindir@
ZEND_DIR = $(srcdir)/libzend
CC = @CC@
AR = ar rc
BINNAME = @BINNAME@
INSTALL_IT = @INSTALL_IT@
INCLUDE = -I$(srcdir) -I. -I$(ZEND_DIR) @GDBM_INCLUDE@ @ORACLE_INCLUDE@ @APACHE_INCLUDE@ @FHTTPD_INCLUDE@ @ADA_INCLUDE@ @IODBC_INCLUDE@ @SYBASE_INCLUDE@ @SYBASE_CT_INCLUDE@ @MYSQL_INCLUDE@ @MSQL_INCLUDE@ @SOLID_INCLUDE@ @EMPRESS_INCLUDE@ @OPENLINK_INCLUDE@ @PGSQL_INCLUDE@ @LDAP_INCLUDE@ @VELOCIS_INCLUDE@ @CODBC_INCLUDE@ @GD_INCLUDE@ @IMAP_INCLUDE@ @ZLIB_INCLUDE@ @PDFLIB_INCLUDE@ @FDFLIB_INCLUDE@ @IFX_INCLUDE@ @SNMP_INCLUDE@ @IBASE_INCLUDE@
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 = @LDFLAGS@ $(LDFLAGS_SHLIB) $(LDFLAGS_SHLIB_EXPORT) -L$(ZEND_DIR)
REGCFLAGS = $(CFLAGS)
RANLIB = @RANLIB@
YACC = @YACC@
MAINT = @MAINT@
APXS = @APXS@
APXS_LDFLAGS = @APXS_LDFLAGS@
WARNING_LEVEL = @WARNING_LEVEL@
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
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
FUNCTIONS_SOURCE = functions/adabasd.c functions/apache.c functions/fhttpd.c \
functions/basic_functions.c \
functions/crypt.c functions/datetime.c functions/db.c \
functions/dbase.c functions/dir.c \
functions/dl.c functions/dns.c functions/exec.c functions/file.c \
functions/filepro.c functions/filestat.c \
functions/formatted_print.c functions/fsock.c functions/gd.c \
functions/head.c functions/html.c functions/image.c functions/imap.c\
functions/link.c functions/mail.c functions/math.c functions/iptc.c \
functions/md5.c functions/microtime.c functions/mime.c \
functions/msql.c functions/mysql.c \
functions/oracle.c functions/oci8.c functions/pack.c \
functions/pageinfo.c functions/pgsql.c \
functions/post.c functions/rand.c functions/reg.c \
functions/solid.c functions/soundex.c \
functions/string.c functions/syslog.c functions/type.c \
functions/uniqid.c functions/sybase.c \
functions/sybase-ct.c functions/url.c functions/base64.c \
functions/info.c @BCMATH_SRC@ functions/xml.c \
functions/unified_odbc.c functions/ldap.c functions/browscap.c \
functions/velocis.c functions/gdttf.c functions/gdcache.c \
functions/zlib.c functions/COM.c functions/ifx.c \
functions/pdf.c functions/hw.c functions/hg_comm.c functions/dlist.c \
functions/fdf.c \
functions/snmp.c functions/var.c functions/interbase.c \
functions/quot_print.c functions/cyr_convert.c \
functions/sysvsem.c functions/sysvshm.c functions/dav.c
FUNCTIONS = $(FUNCTIONS_SOURCE:.c=.o)
LIBS = $(PHPLIBS) @SYBASE_CT_LFLAGS@ @SYBASE_CT_LIBS@ @FHTTPD_LIB@ @DBASE_LIB@ @REGEX_LIB@ @DBM_LIB@ @ORACLE_LFLAGS@ @ORACLE_LIBS@ @IODBC_LFLAGS@ @IODBC_LIBS@ @SYBASE_LFLAGS@ @SYBASE_LIBS@ @SYBASE_CT_LFLAGS@ @SYBASE_CT_LIBS@ @MYSQL_LFLAGS@ @MYSQL_LIBS@ @MSQL_LFLAGS@ @MSQL_LIBS@ @ADA_LFLAGS@ @ADA_LIBS@ @SOLID_LIBS@ @EMPRESS_LIBS@ @OPENLINK_LFLAGS@ @OPENLINK_LIBS@ @PGSQL_LFLAGS@ @PGSQL_LIBS@ @LDAP_LFLAGS@ @LDAP_LIBS@ @VELOCIS_LIBS@ @CODBC_LFLAGS@ @CODBC_LIBS@ @IMAP_LIBS@ @GD_LIBS@ @ZLIB_LIBS@ @PDFLIB_LIBS@ @FDFLIB_LIBS@ @IFX_LFLAGS@ @IFX_LIBS@ @SNMP_LFLAGS@ @SNMP_LIBS@ @IBASE_LFLAGS@ @IBASE_LIBS@ @XML_LIBS@ @LIBS@
all: $(BINNAME)
php: $(OBJS) $(FUNCTIONS) @REGEX_LIB@ @FHTTPD_LIB@ @DBASE_LIB@ $(ZEND_DIR)/libzend.a
$(CC) $(CFLAGS) -o $(BINNAME) $(LDFLAGS) $(OBJS) $(FUNCTIONS) $(LIBS)
libphp3.a: $(OBJS) $(FUNCTIONS) @DBASE_LIB@
$(AR) $(BINNAME) $(OBJS) $(FUNCTIONS) @DBASE_LIB@
$(RANLIB) $(BINNAME)
libmodphp3.a: $(OBJS) $(FUNCTIONS) @DBASE_LIB@
$(AR) $(BINNAME) $(OBJS) $(FUNCTIONS) @DBASE_LIB@
$(RANLIB) $(BINNAME)
libmodphp3-so.a: $(OBJS) $(FUNCTIONS) @DBASE_LIB@
$(AR) libmodphp3-so.a $(OBJS) $(FUNCTIONS) @DBASE_LIB@
$(RANLIB) libmodphp3-so.a
libphp3.so: mod_php3.c libmodphp3-so.a
$(APXS) -c -o libphp3.so $(APXS_LDFLAGS) mod_php3.c libmodphp3-so.a
docs:
cd doc; $(MAKE)
regex/libregex.a:
(cd regex; $(MAKE) lib)
dbase/libdbf.a:
(cd dbase; $(MAKE))
functions/ifx.c: functions/ifx.ec
(if test @INFORMIXDIR@; then esql -e @IFX_ESQL_FLAGS@ functions/ifx.ec; mv ifx.c functions; else touch functions/ifx.c; fi)
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:
$(CC) $(CFLAGS) -w$(WARNING_LEVEL) -c configuration-scanner.c
configuration-scanner.c: $(srcdir)/configuration-scanner.l
flex -Pcfg -oconfiguration-scanner.c -i $(srcdir)/configuration-scanner.l
clean:
-rm -f libphp3.a libmodphp3.a php *.o
-rm -f $(FUNCTIONS) functions/ifx.c
-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*
(cd dbase; $(MAKE) clean)
distclean: clean
-rm -f *-parser.[ch] *-scanner.c *.output
-rm -f config.status config.cache config.log
-rm -f Makefile Makefile.depend config.h build-defs.h
-rm -f libphp3.module stamp-h
-rm -f regex/*.o regex/*.a regex/*.ih
-rm -f dbase/*.o dbase/*.a
-rm -f doc/checkdoc doc/funcparse doc/version.ent
-rm -f do-conf test/test.log extra/gd/bdf2gdfont
-rm -f doc/Makefile regex/Makefile dbase/Makefile
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 config.h: stamp-h
stamp-h: 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
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: $(BINNAME)
$(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 functions/*.c functions/*.h
rm -f *~ functions/*~
.c.o:
$(CC) $(CFLAGS) -c $< -o $@
@bn=`echo $@ | sed -e 's#functions/##'`; test -f $@ || \
(test "$@" != "$$bn" && test -f "$$bn" && mv $$bn $@)
functions/number.o: functions/number.c
$(CC) $(CFLAGS) -w$(WARNING_LEVEL) -c $< -o $@
@bn=`echo $@ | sed -e 's#functions/##'`; test -f $@ || \
(test "$@" != "$$bn" && test -f "$$bn" && mv $$bn $@)
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
main.o: main.c php.h php_version.h libzend/zend.h libzend/config.h \
libzend/config.unix.h libzend/zend_errors.h libzend/zend_alloc.h \
libzend/zend_hash.h libzend/zend_llist.h libzend/zend_API.h \
libzend/modules.h libzend/zend_list.h config.h request_info.h \
php3_compat.h libzend/zend_stack.h safe_mode.h \
fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h build-defs.h \
php_ini.h php_globals.h main.h libzend/zend_globals.h \
libzend/zend_ptr_stack.h libzend/zend_compile.h libzend/zend-parser.h \
libzend/zend_execute.h control_structures.h \
functions/basic_functions.h libzend/zend_highlight.h functions/info.h \
functions/head.h functions/post.h functions/type.h snprintf.h \
libzend/zend_indent.h logos.h
internal_functions.o: internal_functions.c php.h php_version.h \
libzend/zend.h libzend/config.h libzend/config.unix.h \
libzend/zend_errors.h libzend/zend_alloc.h libzend/zend_hash.h \
libzend/zend_llist.h libzend/zend_API.h libzend/modules.h \
libzend/zend_list.h config.h request_info.h php3_compat.h \
libzend/zend_stack.h safe_mode.h fopen-wrappers.h \
output.h libzend/zend_operators.h libzend/zend_variables.h \
libzend/zend_constants.h internal_functions_registry.h \
libzend/zend_compile.h libzend/zend-parser.h libzend/zend_globals.h \
libzend/zend_ptr_stack.h libzend/zend_execute.h functions/php3_ifx.h \
functions/php3_ldap.h functions/php3_mysql.h functions/php3_bcmath.h \
functions/php3_msql.h functions/basic_functions.h \
libzend/zend_highlight.h functions/phpmath.h functions/php3_string.h \
functions/php3_oci8.h functions/oracle.h functions/base64.h \
functions/php3_dir.h functions/dns.h functions/php3_pgsql.h \
functions/php3_velocis.h functions/php3_sybase.h \
functions/php3_sybase-ct.h functions/reg.h functions/php3_mail.h \
functions/imap.h functions/md5.h functions/global.h \
functions/php3_gd.h functions/html.h functions/dl.h functions/head.h \
functions/post.h functions/exec.h functions/php3_solid.h \
functions/adabasd.h functions/file.h functions/dbase.h functions/hw.h \
functions/filepro.h functions/db.h functions/php3_syslog.h \
functions/php3_filestat.h functions/php3_browscap.h functions/pack.h \
functions/php3_unified_odbc.h dl/snmp/php3_snmp.h \
functions/php3_zlib.h functions/php3_COM.h functions/php3_interbase.h \
functions/php3_xml.h functions/php3_pdf.h functions/php3_fdf.h \
functions/php3_sysvsem.h functions/php3_sysvshm.h \
functions/php3_dav.h
snprintf.o: snprintf.c config.h
php3_sprintf.o: php3_sprintf.c config.h
configuration-parser.o: configuration-parser.c php.h php_version.h \
libzend/zend.h libzend/config.h libzend/config.unix.h \
libzend/zend_errors.h libzend/zend_alloc.h libzend/zend_hash.h \
libzend/zend_llist.h libzend/zend_API.h libzend/modules.h \
libzend/zend_list.h config.h request_info.h php3_compat.h \
libzend/zend_stack.h safe_mode.h fopen-wrappers.h \
output.h libzend/zend_operators.h libzend/zend_variables.h \
libzend/zend_constants.h php_globals.h php_ini.h functions/dl.h \
functions/file.h functions/php3_browscap.h libzend/zend_extensions.h \
libzend/zend_compile.h libzend/zend-parser.h libzend/zend_globals.h \
libzend/zend_ptr_stack.h libzend/zend_execute.h
configuration-scanner.o: configuration-scanner.c php.h php_version.h \
libzend/zend.h libzend/config.h libzend/config.unix.h \
libzend/zend_errors.h libzend/zend_alloc.h libzend/zend_hash.h \
libzend/zend_llist.h libzend/zend_API.h libzend/modules.h \
libzend/zend_list.h config.h request_info.h php3_compat.h \
libzend/zend_stack.h safe_mode.h fopen-wrappers.h \
output.h libzend/zend_operators.h libzend/zend_variables.h \
libzend/zend_constants.h configuration-parser.h
request_info.o: request_info.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h
safe_mode.o: safe_mode.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h \
functions/pageinfo.h
fopen-wrappers.o: fopen-wrappers.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h php_globals.h \
php3_realpath.h functions/head.h functions/url.h functions/base64.h \
functions/fsock.h functions/php3_string.h libzend/zend_compile.h \
libzend/zend-parser.h libzend/zend_globals.h libzend/zend_ptr_stack.h \
libzend/zend_execute.h
php3_realpath.o: php3_realpath.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h
alloca.o: alloca.c
output.o: output.c php.h php_version.h libzend/zend.h libzend/config.h \
libzend/config.unix.h libzend/zend_errors.h libzend/zend_alloc.h \
libzend/zend_hash.h libzend/zend_llist.h libzend/zend_API.h \
libzend/modules.h libzend/zend_list.h config.h request_info.h \
php3_compat.h libzend/zend_stack.h safe_mode.h \
fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h functions/head.h
php_ini.o: php_ini.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h php_ini.h \
php_globals.h
functions/adabasd.o: functions/adabasd.c config.h build-defs.h php.h \
php_version.h libzend/zend.h libzend/config.h libzend/config.unix.h \
libzend/zend_errors.h libzend/zend_alloc.h libzend/zend_hash.h \
libzend/zend_llist.h libzend/zend_API.h libzend/modules.h \
libzend/zend_list.h request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h \
libzend/zend_operators.h libzend/zend_variables.h \
libzend/zend_constants.h functions/php3_string.h functions/head.h \
functions/adabasd.h
functions/apache.o: functions/apache.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h functions/head.h \
php_globals.h php_ini.h mod_php3.h
functions/fhttpd.o: functions/fhttpd.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h
functions/basic_functions.o: functions/basic_functions.c php.h php_version.h \
libzend/zend.h libzend/config.h libzend/config.unix.h \
libzend/zend_errors.h libzend/zend_alloc.h libzend/zend_hash.h \
libzend/zend_llist.h libzend/zend_API.h libzend/modules.h \
libzend/zend_list.h config.h request_info.h php3_compat.h \
libzend/zend_stack.h safe_mode.h fopen-wrappers.h \
output.h libzend/zend_operators.h libzend/zend_variables.h \
libzend/zend_constants.h php_ini.h internal_functions_registry.h \
functions/basic_functions.h libzend/zend_highlight.h \
functions/phpmath.h functions/php3_string.h functions/dns.h \
functions/md5.h functions/global.h functions/html.h functions/post.h \
functions/exec.h functions/info.h functions/url.h \
functions/datetime.h functions/fsock.h functions/image.h \
functions/php3_link.h functions/php3_filestat.h functions/microtime.h \
functions/pageinfo.h functions/uniqid.h functions/base64.h \
functions/php3_mail.h functions/php3_var.h functions/php3_iptc.h \
functions/quot_print.h functions/cyr_convert.h libzend/zend_globals.h \
libzend/zend_ptr_stack.h libzend/zend_compile.h libzend/zend-parser.h \
libzend/zend_execute.h php_globals.h
functions/crypt.o: functions/crypt.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h \
functions/php3_string.h
functions/datetime.o: functions/datetime.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h \
functions/datetime.h snprintf.h php_globals.h
functions/db.o: functions/db.c
functions/dbase.o: functions/dbase.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h php_globals.h
functions/dir.o: functions/dir.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h \
functions/php3_dir.h
functions/dl.o: functions/dl.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h functions/dl.h \
php_globals.h
functions/dns.o: functions/dns.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h functions/dns.h
functions/exec.o: functions/exec.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h \
functions/php3_string.h functions/head.h functions/exec.h \
php_globals.h
functions/file.o: functions/file.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h functions/head.h \
functions/php3_string.h functions/file.h snprintf.h functions/fsock.h \
php_globals.h
functions/filepro.o: functions/filepro.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h php_globals.h \
functions/filepro.h
functions/filestat.o: functions/filestat.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h php_globals.h \
functions/php3_filestat.h
functions/formatted_print.o: functions/formatted_print.c php.h php_version.h \
libzend/zend.h libzend/config.h libzend/config.unix.h \
libzend/zend_errors.h libzend/zend_alloc.h libzend/zend_hash.h \
libzend/zend_llist.h libzend/zend_API.h libzend/modules.h \
libzend/zend_list.h config.h request_info.h php3_compat.h \
libzend/zend_stack.h safe_mode.h fopen-wrappers.h \
output.h libzend/zend_operators.h libzend/zend_variables.h \
libzend/zend_constants.h functions/head.h functions/php3_string.h \
libzend/zend_execute.h libzend/zend_compile.h libzend/zend-parser.h \
libzend/zend_globals.h libzend/zend_ptr_stack.h
functions/fsock.o: functions/fsock.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h functions/base64.h \
functions/file.h functions/post.h functions/url.h functions/fsock.h \
build-defs.h
functions/gd.o: functions/gd.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h functions/head.h \
functions/php3_gd.h
functions/head.o: functions/head.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h functions/reg.h \
functions/php3_string.h functions/pageinfo.h main.h \
libzend/zend_globals.h libzend/zend_ptr_stack.h \
libzend/zend_compile.h libzend/zend-parser.h libzend/zend_execute.h \
functions/datetime.h functions/head.h functions/post.h php_globals.h \
functions/url.h
functions/html.o: functions/html.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h functions/reg.h \
functions/html.h
functions/image.o: functions/image.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h functions/image.h
functions/imap.o: functions/imap.c config.h php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h
functions/link.o: functions/link.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h \
functions/php3_filestat.h php_globals.h functions/php3_link.h
functions/mail.o: functions/mail.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h build-defs.h \
functions/php3_mail.h php_ini.h
functions/math.o: functions/math.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h functions/phpmath.h \
snprintf.h
functions/iptc.o: functions/iptc.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h \
functions/php3_iptc.h
functions/md5.o: functions/md5.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h functions/md5.h \
functions/global.h
functions/microtime.o: functions/microtime.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h \
functions/microtime.h snprintf.h
functions/mime.o: functions/mime.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h functions/type.h \
functions/post.h functions/mime.h libzend/zend_globals.h \
libzend/zend_ptr_stack.h libzend/zend_compile.h libzend/zend-parser.h \
libzend/zend_execute.h php_globals.h
functions/msql.o: functions/msql.c config.h php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h \
functions/php3_msql.h functions/reg.h functions/php3_string.h \
php_globals.h
functions/mysql.o: functions/mysql.c config.h build-defs.h php.h php_version.h \
libzend/zend.h libzend/config.h libzend/config.unix.h \
libzend/zend_errors.h libzend/zend_alloc.h libzend/zend_hash.h \
libzend/zend_llist.h libzend/zend_API.h libzend/modules.h \
libzend/zend_list.h request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h \
libzend/zend_operators.h libzend/zend_variables.h \
libzend/zend_constants.h php_globals.h functions/php3_string.h \
functions/php3_mysql.h php_ini.h
functions/oracle.o: functions/oracle.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h functions/oracle.h
functions/oci8.o: functions/oci8.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h \
functions/php3_oci8.h
functions/pack.o: functions/pack.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h functions/head.h \
functions/php3_string.h functions/pack.h snprintf.h functions/fsock.h
functions/pageinfo.o: functions/pageinfo.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h \
functions/pageinfo.h
functions/pgsql.o: functions/pgsql.c config.h php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h \
functions/php3_pgsql.h functions/php3_string.h php_globals.h
functions/post.o: functions/post.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h functions/mime.h \
functions/type.h functions/php3_string.h functions/post.h \
functions/url.h php_globals.h libzend/zend_globals.h \
libzend/zend_ptr_stack.h libzend/zend_compile.h libzend/zend-parser.h \
libzend/zend_execute.h
functions/rand.o: functions/rand.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h functions/phpmath.h
functions/reg.o: functions/reg.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h \
functions/php3_string.h functions/reg.h
functions/solid.o: functions/solid.c config.h build-defs.h php.h php_version.h \
libzend/zend.h libzend/config.h libzend/config.unix.h \
libzend/zend_errors.h libzend/zend_alloc.h libzend/zend_hash.h \
libzend/zend_llist.h libzend/zend_API.h libzend/modules.h \
libzend/zend_list.h request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h \
libzend/zend_operators.h libzend/zend_variables.h \
libzend/zend_constants.h functions/php3_solid.h
functions/soundex.o: functions/soundex.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h \
functions/php3_string.h
functions/string.o: functions/string.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h functions/reg.h \
functions/post.h functions/php3_string.h libzend/zend_execute.h \
libzend/zend_compile.h libzend/zend-parser.h libzend/zend_globals.h \
libzend/zend_ptr_stack.h php_globals.h
functions/syslog.o: functions/syslog.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h php_ini.h \
libzend/zend_globals.h libzend/zend_ptr_stack.h \
libzend/zend_compile.h libzend/zend-parser.h libzend/zend_execute.h \
functions/php3_syslog.h
functions/type.o: functions/type.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h functions/type.h
functions/uniqid.o: functions/uniqid.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h functions/uniqid.h
functions/sybase.o: functions/sybase.c config.h php.h php_version.h \
libzend/zend.h libzend/config.h libzend/config.unix.h \
libzend/zend_errors.h libzend/zend_alloc.h libzend/zend_hash.h \
libzend/zend_llist.h libzend/zend_API.h libzend/modules.h \
libzend/zend_list.h request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h \
libzend/zend_operators.h libzend/zend_variables.h \
libzend/zend_constants.h functions/php3_sybase.h \
functions/php3_string.h php_globals.h
functions/sybase-ct.o: functions/sybase-ct.c config.h php.h php_version.h \
libzend/zend.h libzend/config.h libzend/config.unix.h \
libzend/zend_errors.h libzend/zend_alloc.h libzend/zend_hash.h \
libzend/zend_llist.h libzend/zend_API.h libzend/modules.h \
libzend/zend_list.h request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h \
libzend/zend_operators.h libzend/zend_variables.h \
libzend/zend_constants.h functions/php3_sybase-ct.h \
functions/php3_string.h php_globals.h
functions/url.o: functions/url.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h functions/url.h
functions/base64.o: functions/base64.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h functions/base64.h
functions/info.o: functions/info.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h php_ini.h \
php_globals.h functions/head.h functions/info.h build-defs.h \
libzend/zend_globals.h libzend/zend_ptr_stack.h \
libzend/zend_compile.h libzend/zend-parser.h libzend/zend_execute.h
functions/bcmath.o: functions/bcmath.c config.h build-defs.h php.h php_version.h \
libzend/zend.h libzend/config.h libzend/config.unix.h \
libzend/zend_errors.h libzend/zend_alloc.h libzend/zend_hash.h \
libzend/zend_llist.h libzend/zend_API.h libzend/modules.h \
libzend/zend_list.h request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h \
libzend/zend_operators.h libzend/zend_variables.h \
libzend/zend_constants.h functions/number.h functions/php3_bcmath.h
functions/number.o: functions/number.c functions/number.h php.h php_version.h \
libzend/zend.h libzend/config.h libzend/config.unix.h \
libzend/zend_errors.h libzend/zend_alloc.h libzend/zend_hash.h \
libzend/zend_llist.h libzend/zend_API.h libzend/modules.h \
libzend/zend_list.h config.h request_info.h php3_compat.h \
libzend/zend_stack.h safe_mode.h fopen-wrappers.h \
output.h libzend/zend_operators.h libzend/zend_variables.h \
libzend/zend_constants.h
functions/xml.o: functions/xml.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h \
functions/php3_xml.h
functions/unified_odbc.o: functions/unified_odbc.c config.h build-defs.h php.h \
php_version.h libzend/zend.h libzend/config.h libzend/config.unix.h \
libzend/zend_errors.h libzend/zend_alloc.h libzend/zend_hash.h \
libzend/zend_llist.h libzend/zend_API.h libzend/modules.h \
libzend/zend_list.h request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h \
libzend/zend_operators.h libzend/zend_variables.h \
libzend/zend_constants.h dl/phpdl.h functions/php3_string.h \
functions/php3_unified_odbc.h functions/head.h snprintf.h
functions/ldap.o: functions/ldap.c config.h php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h
functions/browscap.o: functions/browscap.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h \
functions/php3_browscap.h php_ini.h libzend/zend_globals.h \
libzend/zend_ptr_stack.h libzend/zend_compile.h libzend/zend-parser.h \
libzend/zend_execute.h
functions/velocis.o: functions/velocis.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h \
functions/php3_velocis.h
functions/gdttf.o: functions/gdttf.c config.h
functions/gdcache.o: functions/gdcache.c config.h
functions/zlib.o: functions/zlib.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h functions/head.h \
functions/php3_string.h functions/php3_zlib.h snprintf.h
functions/COM.o: functions/COM.c
functions/pdf.o: functions/pdf.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h functions/head.h \
functions/php3_pdf.h
functions/hw.o: functions/hw.c config.h php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h functions/head.h
functions/hg_comm.o: functions/hg_comm.c config.h
functions/dlist.o: functions/dlist.c config.h
functions/fdf.o: functions/fdf.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h functions/head.h \
functions/php3_fdf.h
functions/snmp.o: functions/snmp.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h \
functions/php3_snmp.h
functions/var.o: functions/var.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h functions/reg.h \
functions/post.h functions/php3_string.h functions/php3_var.h
functions/interbase.o: functions/interbase.c config.h php.h php_version.h \
libzend/zend.h libzend/config.h libzend/config.unix.h \
libzend/zend_errors.h libzend/zend_alloc.h libzend/zend_hash.h \
libzend/zend_llist.h libzend/zend_API.h libzend/modules.h \
libzend/zend_list.h request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h \
libzend/zend_operators.h libzend/zend_variables.h \
libzend/zend_constants.h functions/php3_interbase.h
functions/quot_print.o: functions/quot_print.c php.h php_version.h \
libzend/zend.h libzend/config.h libzend/config.unix.h \
libzend/zend_errors.h libzend/zend_alloc.h libzend/zend_hash.h \
libzend/zend_llist.h libzend/zend_API.h libzend/modules.h \
libzend/zend_list.h config.h request_info.h php3_compat.h \
libzend/zend_stack.h safe_mode.h fopen-wrappers.h \
output.h libzend/zend_operators.h libzend/zend_variables.h \
libzend/zend_constants.h functions/quot_print.h
functions/cyr_convert.o: functions/cyr_convert.c php.h php_version.h \
libzend/zend.h libzend/config.h libzend/config.unix.h \
libzend/zend_errors.h libzend/zend_alloc.h libzend/zend_hash.h \
libzend/zend_llist.h libzend/zend_API.h libzend/modules.h \
libzend/zend_list.h config.h request_info.h php3_compat.h \
libzend/zend_stack.h safe_mode.h fopen-wrappers.h \
output.h libzend/zend_operators.h libzend/zend_variables.h \
libzend/zend_constants.h functions/cyr_convert.h
functions/sysvsem.o: functions/sysvsem.c config.h
functions/sysvshm.o: functions/sysvshm.c config.h
functions/dav.o: functions/dav.c php.h php_version.h libzend/zend.h \
libzend/config.h libzend/config.unix.h libzend/zend_errors.h \
libzend/zend_alloc.h libzend/zend_hash.h libzend/zend_llist.h \
libzend/zend_API.h libzend/modules.h libzend/zend_list.h config.h \
request_info.h php3_compat.h libzend/zend_stack.h \
safe_mode.h fopen-wrappers.h output.h libzend/zend_operators.h \
libzend/zend_variables.h libzend/zend_constants.h \
functions/php3_dav.h
# Local Variables:
# tab-width: 4
# End:
+302
View File
@@ -0,0 +1,302 @@
PHP 4.0 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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)
- Fix 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 library)
- 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 library)
- 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 library)
- 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 PHP3 to PHP4 (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 library)
- Fixed backwards incompatibility with ereg() (Thies)
- Updated Zend garbage collection with a much more thorough method.
(Andi, Zend library)
- Added the ability to use variable references in the array() construct.
For example, array("foo" => &$foo). (Andi, Zend library)
- 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)
- Add support for the Easysoft ODBC-ODCB Bridge (martin@easysoft.com)
- Fix 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 library)
- Fixed sem_get() on AIX (Sascha)
- Fixed fopen() to work with URL's in Win32 (Andi & Zeev)
- Fixed include_path for Win32 (Andi, Zend library)
- Fixed bug in ISAPI header sending function (Charles)
- Fixed memory leak when using undefined values (Andi & Zeev, Zend library)
- 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 library)
- 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 library)
- 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 library)
- Fixed backwards incompatibility with the "new" operator (Andi, Zend library)
- 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 library)
- Fixed a problem in inheritance from classes that are defined in include()d
files (Zeev, Zend library)
- 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 library)
- Fixed a crash problem in switch statements that had a string offset
as a conditional (Andi & Zeev, Zend library)
- 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 library)
- 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
+17
View File
@@ -0,0 +1,17 @@
How to install PHP with the BCMath arbitrary precision math library?
--------------------------------------------------------------------
Due to license restrictions, the BC math library can no longer be distributed
along with PHP. The BC math library is distributed under the restrictive
GNU Public License, and PHP is no longer distributed under that license, but
under a less restrictive license, the PHP License.
If you want to enable BC math support (recommended), all you have to do is
simply download http://www.php.net/extra/number4.tar.gz, and untar it on the
top level php4 directory.
A typical way of doing this would be (assuming that you have lynx):
cd ~/php4
lynx -dump -source http://www.php.net/extra/number4.tar.gz | gzip -d | tar xvf -
The PHP Group
+102
View File
@@ -0,0 +1,102 @@
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.
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
-59
View File
@@ -1,59 +0,0 @@
Windows 95/NT Specific Notes on Compilation
Windows compilation has only been tested with Microsoft Visual C++
Version 5 Standard Edition. The PHP executable has only had limited
testing under Windows 95. SAFE MODE and any User or Group functionality
has not been ported/tested.
-----------------------------------------------------------------------
Compiling PHP with MSVC5
There are three msvc workspaces provided with this distribution. The one
most people will use is php3.dsw. This contains project files for two
versions on PHP, one with mySQL compiled internaly, and one without (both
have ODBC internaly compiled). It also contains all the modules.
The next workspace is php3extras.dsw. This project contains the converter
and a program called phpwatch, which is a simple program to watch debugger
output under windows. The 'socket' program is also available from the php
site, which is a better alternative to phpwatch.
The third workspace is php3sapi.dsw. These projects are experimental and
will probably not compile most of the time. It contains preliminary work
on the server api's for windows.
-----------------------------------------------------------------------
Base Configuration and Configuration Issues
*The base configuration for the windows php version contains odbc
support. Support for other database modules will be provided as external dll files.
*ODBC can be used to connect to many of the databases previously
supported by php (though they can still be compiled in if you have
the libraries!)
-----------------------------------------------------------------------
Makefiles
Be sure to edit any windows makefile and change the include directories
to be appropriate for your system.
-----------------------------------------------------------------------
CGI Version
The makefile for the cgi version of php is located in the win32
subdirectory of the php source tree. This make file is specificaly
for Visual C++ V5.
-----------------------------------------------------------------------
ISAPI/NSAPI/WSAPI/Apache Versions
These versions are not yet working. They are located in the php3sapi.dsw
workspace.
-----------------------------------------------------------------------
Other Libraries
See the php faq at php.net for information on where to obtain the various
libraries needed to compile some modules.
+6 -99
View File
@@ -1,100 +1,7 @@
$Id$
Things to do or at least think about doing in the future. Name in
parenthesis means that person has taken on this project.
+----
| * -- to be done
| ? -- to be done sometime if possible
| P -- in progress (name should appear in parentheses after task)
| D -- delayed until later date (specify in parentheses after task)
| U -- done, untested
| V -- done
+----
Configuration Issues
--------------------
* properly detect dbm routines when they're in libc
* add the appropriate #define magic for memmove and friends (see
GNU autoconf info pages for details)
* make it possible to disable support for some extensions (gd, dbm)
* make it possible to build selected extensions so they are
dynamically-loadable
Core Language Issues
--------------------
* go through PHP2's php.h and see how each special #define might be
applied/supported in PHP3
* move Treatdata() to language-scanner.lex where hash_environment()
is called including a decision about priority of variables and moving
Treatdata() to use hash_add() instead of hash_update() for insertions
to the symbol table.
* go through FIXME and XXX lines (egrep 'FIXME|XXX' *.[ch])
* make lexer and parser thread-safe
* verify that binary strings are handled correctly
V don't evaluate truth expressions more than once
V make unset() work on arrays (tricky)
Core Functions
--------------
* go through all file functions and make sure they are opened in binary
mode in win32 if needed (ie copy)
* go through all functions and look at PHP_SAFE_MODE issues
* have a look at return codes of fsockopen() function - we should
probably RETURN_FALSE and then set an error code somewhere (Rasmus)
* go through FIXME and XXX lines (egrep 'FIXME|XXX' functions/*.[ch])
* add user-level flock() implementation to let people lock and unlock files
* add "'" modifier to sprintf to group thousands by comma
* Add an improved eval() that doesn't "leak"
? sorting of objects with a user-defined comparison function (like Perl)
(this shouldn't be expected before 3.1, if at all).
Extensions
----------
* add version strings for all extensions
* Oracle persistent connections
U gd support for windows
* Illustra support (APIS)
? CQL++ support (http://www.cql.com/)
? GNU SQL support (does anybody actually use this?)
? DB2 support (http://www.sleepycat.com/)
? Shore support (http://www.cs.wisc.edu/shore/)
? PGP Interface (use PGPlib?)
? more Perl-like regex handling?
Server Support
--------------
P ISAPI (Shane)
* process cookies
* blocking functions
* make sure it's Microsoft-clean so it can be used with other ISAPI
implementations
* WSAPI
* NSAPI
* process cookies
* check POST method handling code
* use Netscape memory allocation inside emalloc() and company
* FastCGI support - see http://fastcgi.idle.com/
Win32 Specific
--------------
* implement some kind of syslog->file log support for win95.
* change all file open/read/write functions from c library to win32
api file functions. The win32 api functions handle both disk files
and network files. This will allow include and require to use http
or ftp files as the unix version does, and do away with my
workaround to support this. (3.1?)
* implement symlinks via windows shell links (shortcuts). This will
work only at the script level and is not a c language level port.
Testing
-------
* truss/strace a typical PHP request and see if there are some system
calls that could be optimized out
* verify that regression tests exist for all core functions
Miscellaneous
-------------
* remove hard-coded compilation options
? locale issues - funny things happen in PHP2 when the locale is set to
use , instead of . as the decimal seperator. ie. 1.5+1.5 = 1
? SSI->PHP3 conversion script
? SQL-based access logging (start with examples/log-*.php3)
ext/standard
------------
* strpad() (Andrei)
* advanced sort (Andrei)
+1 -29
View File
@@ -1,4 +1,5 @@
This is the ChangeLog from PHP3 as of Apr 12 1999.
Entries should be removed from this file, if you transfer changes
@@ -10,28 +11,12 @@ over to PHP4.
- added Oracle-OCI8 persistent connections
- fixed OCIDefineByName crash.
- fixed some NULL-column related problems in OCI8-module.
- avoid stripping double slashes when fopen'ing files (Sascha)
- sql_regcase() change: only apply to alphabetic characters (Sascha)
- add snmprealwalk() (Sascha Schumann)
- fix serious bug in strftime() (Sascha Schumann)
- fix bug in ucwords() (Sascha Schumann)
- optimized fgets() and fread()
- memory leak in operators.c fixed
- socket leak fixed (Sascha Schumann)
- Fixed the XML bug that caused garbage behind attributes
- Some Informix driver improvements.
- PUT method support (mlemos@acm.org)
- Add ldap_mod_add(), ldap_mod_del() and ldap_mod_replace() (Gerritt Thomson)
- Fix parameter count problem in odbc_setoption()
- Replace broken str_replace(). The fix in 3.0.7 was bogus (Sascha Schumann)
- Really fix implode() this time. The fix in 3.0.7 was bogus
- Added more option to the date() function: (Colin Viebrock)
'g' - hour, 12-hour format, no leading zeros
'G' - hour, 24-hour format, no leading zeros
'n' - month, numeric, no leading zeros
- Make fgetss() slightly smarter
- Add strip_tags() which uses the fgetss state-machine but acts on a string
- Add CRYPT_SALT_LENGTH constant
March 1 1999, Version 3.0.7
- Added pdf_put_image and pdf_execute_image
@@ -50,18 +35,10 @@ March 1 1999, Version 3.0.7
variables.
- Clean up apxs build
- Add INSTALL.REDHAT file to walk RedHat users through the install
- Added YP/NIS module from Stephanie Wehner
- 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
- Add flock() function
- 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
@@ -79,7 +56,6 @@ March 1 1999, Version 3.0.7
- 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
- Make sure XML element attributes have the right character encoding
- hw_insertdocument() returns object id now
- Add pdf_open() warning in configure and documentation
- Add diskfreespace() function
@@ -94,10 +70,6 @@ March 1 1999, Version 3.0.7
- 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
- Add gettimeofday() function
- Add getrusage() function
+4
View File
@@ -0,0 +1,4 @@
## process this file with automake to produce Makefile.am
AUTOMAKE_OPTIONS=foreign
noinst_LTLIBRARIES=libtsrm.la
libtsrm_la_SOURCES = TSRM.c
+434
View File
@@ -0,0 +1,434 @@
/*
+----------------------------------------------------------------------+
| Thread Safe Resource Manager |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include "TSRM.h"
#include <stdio.h>
#include <stdlib.h>
#if HAVE_STDARG_H
#include <stdarg.h>
#endif
typedef struct _tsrm_tls_entry tsrm_tls_entry;
struct _tsrm_tls_entry {
void **storage;
int count;
THREAD_T thread_id;
tsrm_tls_entry *next;
};
typedef struct {
size_t size;
void (*ctor)(void *resource);
void (*dtor)(void *resource);
} tsrm_resource_type;
/* The memory manager table */
static tsrm_tls_entry **tsrm_tls_table;
static int tsrm_tls_table_size;
static ts_rsrc_id id_count;
/* The resource sizes table */
static tsrm_resource_type *resource_types_table;
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_API int tsrm_startup(int expected_threads, int expected_resources, int debug_status)
{
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) {
return 0;
}
id_count=0;
resource_types_table_size = expected_resources;
resource_types_table = (tsrm_resource_type *) calloc(resource_types_table_size, sizeof(tsrm_resource_type));
if (!resource_types_table) {
free(tsrm_tls_table);
return 0;
}
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);
return 1;
}
/* Shutdown TSRM (call once for the entire process) */
TSRM_API void tsrm_shutdown()
{
int i;
if (tsrm_tls_table) {
for (i=0; i<tsrm_tls_table_size; i++) {
tsrm_tls_entry *p = tsrm_tls_table[i], *next_p;
while (p) {
int j;
next_p = p->next;
for (j=0; j<id_count; j++) {
free(p->storage[j]);
}
free(p->storage);
free(p);
p = next_p;
}
}
free(tsrm_tls_table);
}
if (resource_types_table) {
free(resource_types_table);
}
tsrm_mutex_free(tsmm_mutex);
tsrm_debug("Shutdown TSRM\n");
}
/* allocates a new thread-safe-resource id */
TSRM_API ts_rsrc_id ts_allocate_id(size_t size, void (*ctor)(void *resource), void (*dtor)(void *resource))
{
ts_rsrc_id new_id;
int i;
tsrm_debug("Obtaining a new resource id, %d bytes\n", size);
tsrm_mutex_lock(tsmm_mutex);
/* obtain a resource id */
new_id = id_count++;
tsrm_debug("Obtained resource id %d\n", new_id);
/* store the new resource type in the resource sizes table */
if (resource_types_table_size < id_count) {
resource_types_table = (tsrm_resource_type *) realloc(resource_types_table, sizeof(tsrm_resource_type)*id_count);
if (!resource_types_table) {
return -1;
}
resource_types_table_size = id_count;
}
resource_types_table[new_id].size = size;
resource_types_table[new_id].ctor = ctor;
resource_types_table[new_id].dtor = dtor;
/* enlarge the arrays for the already active threads */
for (i=0; i<tsrm_tls_table_size; i++) {
tsrm_tls_entry *p = tsrm_tls_table[i];
while (p) {
if (p->count < id_count) {
int j;
p->storage = (void *) realloc(p->storage, sizeof(void *)*id_count);
for (j=p->count; j<id_count; j++) {
p->storage[j] = (void *) malloc(resource_types_table[j].size);
if (resource_types_table[j].ctor) {
resource_types_table[j].ctor(p->storage[j]);
}
}
p->count = id_count;
}
p = p->next;
}
}
tsrm_mutex_unlock(tsmm_mutex);
tsrm_debug("Successfully allocated new resource id %d\n", new_id);
return new_id;
}
static void allocate_new_resource(tsrm_tls_entry **thread_resources_ptr, THREAD_T thread_id)
{
int i;
(*thread_resources_ptr) = (tsrm_tls_entry *) malloc(sizeof(tsrm_tls_entry));
(*thread_resources_ptr)->storage = (void **) malloc(sizeof(void *)*id_count);
(*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)
{
THREAD_T thread_id = tsrm_thread_id();
int hash_value;
tsrm_tls_entry *thread_resources;
void *resource;
tsrm_debug("Fetching resource id %d for thread %ld\n", id, (long) thread_id);
tsrm_mutex_lock(tsmm_mutex);
hash_value = THREAD_HASH_OF(thread_id, tsrm_tls_table_size);
thread_resources = tsrm_tls_table[hash_value];
if (!thread_resources) {
allocate_new_resource(&tsrm_tls_table[hash_value], thread_id);
return ts_resource(id);
/* thread_resources = tsrm_tls_table[hash_value]; */
} else {
do {
if (thread_resources->thread_id == thread_id) {
break;
}
if (thread_resources->next) {
thread_resources = thread_resources->next;
} else {
allocate_new_resource(&thread_resources->next, thread_id);
return ts_resource(id);
/*
* thread_resources = thread_resources->next;
* break;
*/
}
} while (thread_resources);
}
resource = thread_resources->storage[id];
tsrm_mutex_unlock(tsmm_mutex);
tsrm_debug("Successfully fetched resource id %d for thread id %ld - %x\n", id, (long) thread_id, (long) resource);
return resource;
}
/* frees all resources allocated for the current thread */
void ts_free_thread()
{
THREAD_T thread_id = tsrm_thread_id();
int hash_value;
tsrm_tls_entry *thread_resources;
tsrm_tls_entry *last=NULL;
tsrm_mutex_lock(tsmm_mutex);
hash_value = THREAD_HASH_OF(thread_id, tsrm_tls_table_size);
thread_resources = tsrm_tls_table[hash_value];
while (thread_resources) {
if (thread_resources->thread_id == thread_id) {
int i;
for (i=0; i<thread_resources->count; i++) {
if (resource_types_table[i].dtor) {
resource_types_table[i].dtor(thread_resources->storage[i]);
}
free(thread_resources->storage[i]);
}
free(thread_resources->storage);
if (last) {
last->next = thread_resources->next;
} else {
tsrm_tls_table[hash_value]=NULL;
}
free(thread_resources);
break;
}
if (thread_resources->next) {
last = thread_resources;
}
thread_resources = thread_resources->next;
}
tsrm_mutex_unlock(tsmm_mutex);
}
/* deallocates all occurrences of a given id */
void ts_free_id(ts_rsrc_id id)
{
}
/*
* Utility Functions
*/
/* Obtain the current thread id */
TSRM_API THREAD_T tsrm_thread_id(void)
{
#ifdef WIN32
return GetCurrentThreadId();
#elif defined(PTHREADS)
return pthread_self();
#elif defined(NSAPI)
return systhread_current();
#elif defined(PI3WEB)
return PIThread_getCurrent();
#endif
}
/* Allocate a mutex */
TSRM_API MUTEX_T tsrm_mutex_alloc( void )
{
MUTEX_T mutexp;
#ifdef WIN32
mutexp = CreateMutex(NULL,FALSE,NULL);
#elif defined(PTHREADS)
mutexp = (pthread_mutex_t *)malloc(sizeof(pthread_mutex_t));
pthread_mutex_init(mutexp,NULL);
#elif defined(NSAPI)
mutexp = crit_init();
#elif defined(PI3WEB)
mutexp = PIPlatform_allocLocalMutex();
#endif
#ifdef THR_DEBUG
printf("Mutex created thread: %d\n",mythreadid());
#endif
return( mutexp );
}
/* Free a mutex */
TSRM_API void tsrm_mutex_free( MUTEX_T mutexp )
{
if (mutexp) {
#ifdef WIN32
CloseHandle(mutexp);
#elif defined(PTHREADS)
free(mutexp);
#elif defined(NSAPI)
crit_terminate(mutexp);
#elif defined(PI3WEB)
PISync_delete(mutexp)
#endif
}
#ifdef THR_DEBUG
printf("Mutex freed thread: %d\n",mythreadid());
#endif
}
/* Lock a mutex */
TSRM_API int tsrm_mutex_lock( MUTEX_T mutexp )
{
#if 0
tsrm_debug("Mutex locked thread: %ld\n",tsrm_thread_id());
#endif
#ifdef WIN32
return WaitForSingleObject(mutexp,1000);
#elif defined(PTHREADS)
return pthread_mutex_lock(mutexp);
#elif defined(NSAPI)
return crit_enter(mutexp);
#elif defined(PI3WEB)
return PISync_lock(mutexp);
#endif
}
/* Unlock a mutex */
TSRM_API int tsrm_mutex_unlock( MUTEX_T mutexp )
{
#if 0
tsrm_debug("Mutex unlocked thread: %ld\n",tsrm_thread_id());
#endif
#ifdef WIN32
return ReleaseMutex(mutexp);
#elif defined(PTHREADS)
return pthread_mutex_unlock(mutexp);
#elif defined(NSAPI)
return crit_exit(mutexp);
#elif defined(PI3WEB)
return PISync_unlock(mutexp);
#endif
}
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
*/
static int tsrm_debug(const char *format, ...)
{
if (tsrm_debug_status) {
va_list args;
int size;
va_start(args, format);
size = vprintf(format, args);
va_end(args);
return size;
} else {
return 0;
}
}
void tsrm_debug_set(int status)
{
tsrm_debug_status = status;
}
+100
View File
@@ -0,0 +1,100 @@
# Microsoft Developer Studio Project File - Name="TSRM" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=TSRM - 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 "TSRM.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 "TSRM.mak" CFG="TSRM - Win32 Debug_TS"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "TSRM - Win32 Debug_TS" (based on "Win32 (x86) Static Library")
!MESSAGE "TSRM - Win32 Release_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)" == "TSRM - Win32 Debug_TS"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "TSRM___Win32_Debug_TS"
# PROP BASE Intermediate_Dir "TSRM___Win32_Debug_TS"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug_TS"
# 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 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)" == "TSRM - Win32 Release_TS"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "TSRM___Win32_Release_TS"
# PROP BASE Intermediate_Dir "TSRM___Win32_Release_TS"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 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" /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 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 "TSRM - Win32 Debug_TS"
# Name "TSRM - Win32 Release_TS"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\TSRM.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\TSRM.h
# End Source File
# End Group
# End Target
# End Project
+104
View File
@@ -0,0 +1,104 @@
/*
+----------------------------------------------------------------------+
| Thread Safe Resource Manager |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef _TSRM_H
#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(PTHREADS)
# include <pthread.h>
#endif
typedef int ts_rsrc_id;
#if WIN32||WINNT
# ifdef TSRM_EXPORTS
# define TSRM_API __declspec(dllexport)
# else
# define TSRM_API __declspec(dllimport)
# endif
#else
# define TSRM_API
#endif
/* Define THREAD_T and MUTEX_T */
#if defined(WIN32)
# define THREAD_T DWORD
# define MUTEX_T void *
#elif defined(PTHREADS)
# define THREAD_T pthread_t
# define MUTEX_T pthread_mutex_t *
#elif defined(NSAPI)
# define THREAD_T SYS_THREAD
# define MUTEX_T CRITICAL
#elif defined(PI3WEB)
# define THREAD_T PIThread *
# define MUTEX_T PISync *
#endif
typedef void (*ts_allocate_ctor)(void *);
#define THREAD_HASH_OF(thr,ts) (unsigned long)thr%(unsigned long)ts
#ifdef __cplusplus
extern "C" {
#endif
/* startup/shutdown */
TSRM_API int tsrm_startup(int expected_threads, int expected_resources, int debug_status);
TSRM_API void tsrm_shutdown();
/* allocates a new thread-safe-resource id */
TSRM_API ts_rsrc_id ts_allocate_id(size_t size, ts_allocate_ctor ctor, void (*dtor)(void *resource));
/* fetches the requested resource for the current thread */
TSRM_API void *ts_resource(ts_rsrc_id id);
/* frees all resources allocated for the current thread */
TSRM_API void ts_free_thread();
/* deallocates all occurrences of a given id */
TSRM_API void ts_free_id(ts_rsrc_id id);
/* Debug support */
TSRM_API void tsrm_debug_set(int status);
/* utility functions */
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 */
+1
View File
@@ -0,0 +1 @@
#undef PTHREADS
+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
Executable
+33
View File
@@ -0,0 +1,33 @@
#!/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
echo "buildconf: keeping ${1}aclocal.m4"
mv aclocal.m4.old aclocal.m4
else
echo "buildconf: created or modified ${1}aclocal.m4"
fi
autoheader
automake --add-missing --include-deps $automake_flags
mv configure configure.old 2>/dev/null
autoconf
if cmp configure.old configure > /dev/null 2>&1; then
echo "buildconf: keeping ${1}configure"
mv configure.old configure
else
echo "buildconf: created or modified ${1}configure"
fi
+33
View File
@@ -0,0 +1,33 @@
dnl $Id$
dnl
dnl Minimalistic configure.in for TSRM.
dnl
AC_INIT(TSRM.c)
AM_INIT_AUTOMAKE(TSRM, 1.0)
AM_CONFIG_HEADER(tsrm_config.h)
AC_PROG_CC
AM_PROG_CC_STDC
AC_PROG_CC_C_O
AC_PROG_RANLIB
AM_PROG_LIBTOOL
if test "$enable_debug" != "yes"; then
AM_SET_LIBTOOL_VARIABLE([--silent])
fi
AC_CHECK_LIB(c_r, pthread_kill)
AC_CHECK_LIB(pthread, pthread_kill)
AC_CHECK_FUNCS(pthread_kill)
if test "$ac_cv_func_pthread_kill" != "yes"; then
AC_MSG_ERROR(You need pthreads to build TSRM.)
fi
AC_DEFINE(PTHREADS)
AC_CHECK_HEADERS(stdarg.h)
AC_OUTPUT(Makefile)
-17
View File
@@ -1,17 +0,0 @@
- Persistant per-process scripting
Apache 1.3 has added things that makes this much easier than before.
The module structure now contains a child_init hook and a child_exit
hook where you can register functions to be called when an httpd
process starts up and when one shuts down (due to MaxRequestsPerChild
or a Kill). The only real trick now is to come up with some sort of
syntax for specifying what to do from the child_init call and the
child_exit call.
One idea is to be able to add a <PHP>...</PHP> block to the Apache
httpd.conf file which would somehow define a series of PHP statements
to be executed from the child_* calls. One for startup and another
block for shutdown. These blocks would work with the per-process
memory pool, so any variables initialized here would have a lifespan
equal to that of the httpd process. Basically request-spanning
global variables.
-55
View File
@@ -1,55 +0,0 @@
V Do yystype_ptr and hash pointers the right way - use the hash
pointer and the bucket pointer, instead of a pointer to the data.
Allows for a real unset() among other things.
V Improve performance of simple variable lookups
* Improve string performance by using smarter memory allocation methods
- Improve preprocessor (handle require() efficiently), possibly handle
automatic preprocessing for sites based on timestamp
V Use a reference count mechanism to prevent unnecessary duplication of data.
* Write and stabilize a complete persistent data API. Feature wishlist:
- memory manager using shared memory
- process-global symbol table
- make api inter-thread capable for win32 and some far off future where unix
version will be multithreaded
V Handle out of memory (inside emalloc()?)
* Try to figure out a way to declare *real* global variables
* Improve the reading of configuration variables into php3_ini (generalize)
Make it possible to implement config_get("configuration_variable") and
config_set("configuration_variable","value") that'll work with *php3_ini*,
not the configuration hash!
* Bundle some nice classes (like Bjørn's graphing class)
* Bundle some database abstraction classes
* Distribute binaries
* Clean up API and modules to make .so modules portable across CGI and server
binaries
* dbm cleanup (don't arbitrarily pick, and support multiple concurrent formats)
* start system defines so that we can move away from the standard c lib on
windows to the win32 lib. (file functions primarily)
* COM implementation so php can be used as an asp language (cant find any docs
on how this is done though)
* Clean up the file structure so the top-level directory isn't such a mess.
* Bring the module concept to maturity: use libtool and make it
possible to decide at compile time whether you want to compile a
module statically or dynamically. Remove the distinction between
the stuff currently in dl/ and functions/.
* a way of letting each module specify its options, so ini file options and
Apache directives can be set up from the same specification.
V Make it possible to declare smarter user functions: (done in 3.0)
- Optional parameters
- Parameters that are forced/prefered by reference
* Make object parsing more general, and allow nested arrays/objects with
unlimited levels.
V Make it possible to copy references of variables.
* data tainting (like perl -T)
* multi-dimensional array support in GET/POST/COOKIE handling code
* Persistent functions and classes
* odbc_fetch_assoc
* Add env handling to gpc_order
* Populate track_vars regardless of gpc_order
* a real exec() function
* Support passing arguments to functions by name (e.g. foo(arg1 => "bar", arg2 => "foobar"))
* Add an optional setting to destroy persistent resources if a PHP script terminates
abnormally
V COM automation support for Win32
? Add a setting for making function names case sensitive
* stat() files before feeding them to flex - it doesn't handle special files very well
+186
View File
@@ -0,0 +1,186 @@
// $Header$
// FlexLexer.h -- define interfaces for lexical analyzer classes generated
// by flex
// Copyright (c) 1993 The Regents of the University of California.
// All rights reserved.
//
// This code is derived from software contributed to Berkeley by
// Kent Williams and Tom Epperly.
//
// Redistribution and use in source and binary forms with or without
// modification are permitted provided that: (1) source distributions retain
// this entire copyright notice and comment, and (2) distributions including
// binaries display the following acknowledgement: ``This product includes
// software developed by the University of California, Berkeley and its
// contributors'' in the documentation or other materials provided with the
// distribution and in all advertising materials mentioning features or use
// of this software. Neither the name of the University nor the names of
// its contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
// THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
// WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
// This file defines FlexLexer, an abstract class which specifies the
// external interface provided to flex C++ lexer objects, and yyFlexLexer,
// which defines a particular lexer class.
//
// If you want to create multiple lexer classes, you use the -P flag
// to rename each yyFlexLexer to some other xxFlexLexer. You then
// include <FlexLexer.h> in your other sources once per lexer class:
//
// #undef yyFlexLexer
// #define yyFlexLexer xxFlexLexer
// #include <FlexLexer.h>
//
// #undef yyFlexLexer
// #define yyFlexLexer zzFlexLexer
// #include <FlexLexer.h>
// ...
#ifndef __FLEX_LEXER_H
// Never included before - need to define base class.
#define __FLEX_LEXER_H
#include <iostream.h>
extern "C++" {
struct yy_buffer_state;
typedef int yy_state_type;
class FlexLexer {
public:
virtual ~FlexLexer() { }
const char* YYText() { return yytext; }
int YYLeng() { return yyleng; }
virtual void
yy_switch_to_buffer( struct yy_buffer_state* new_buffer ) = 0;
virtual struct yy_buffer_state*
yy_create_buffer( istream* s, int size ) = 0;
virtual void yy_delete_buffer( struct yy_buffer_state* b ) = 0;
virtual void yyrestart( istream* s ) = 0;
virtual int yylex() = 0;
// Call yylex with new input/output sources.
int yylex( istream* new_in, ostream* new_out = 0 )
{
switch_streams( new_in, new_out );
return yylex();
}
// Switch to new input/output streams. A nil stream pointer
// indicates "keep the current one".
virtual void switch_streams( istream* new_in = 0,
ostream* new_out = 0 ) = 0;
int lineno() const { return yylineno; }
int debug() const { return yy_flex_debug; }
void set_debug( int flag ) { yy_flex_debug = flag; }
protected:
char* yytext;
int yyleng;
int yylineno; // only maintained if you use %option yylineno
int yy_flex_debug; // only has effect with -d or "%option debug"
};
}
#endif
#if defined(yyFlexLexer) || ! defined(yyFlexLexerOnce)
// Either this is the first time through (yyFlexLexerOnce not defined),
// or this is a repeated include to define a different flavor of
// yyFlexLexer, as discussed in the flex man page.
#define yyFlexLexerOnce
class yyFlexLexer : public FlexLexer {
public:
// arg_yyin and arg_yyout default to the cin and cout, but we
// only make that assignment when initializing in yylex().
yyFlexLexer( istream* arg_yyin = 0, ostream* arg_yyout = 0 );
virtual ~yyFlexLexer();
void yy_switch_to_buffer( struct yy_buffer_state* new_buffer );
struct yy_buffer_state* yy_create_buffer( istream* s, int size );
void yy_delete_buffer( struct yy_buffer_state* b );
void yyrestart( istream* s );
virtual int yylex();
virtual void switch_streams( istream* new_in, ostream* new_out );
protected:
virtual int LexerInput( char* buf, int max_size );
virtual void LexerOutput( const char* buf, int size );
virtual void LexerError( const char* msg );
void yyunput( int c, char* buf_ptr );
int yyinput();
void yy_load_buffer_state();
void yy_init_buffer( struct yy_buffer_state* b, istream* s );
void yy_flush_buffer( struct yy_buffer_state* b );
int yy_start_stack_ptr;
int yy_start_stack_depth;
int* yy_start_stack;
void yy_push_state( int new_state );
void yy_pop_state();
int yy_top_state();
yy_state_type yy_get_previous_state();
yy_state_type yy_try_NUL_trans( yy_state_type current_state );
int yy_get_next_buffer();
istream* yyin; // input source for default LexerInput
ostream* yyout; // output sink for default LexerOutput
struct yy_buffer_state* yy_current_buffer;
// yy_hold_char holds the character lost when yytext is formed.
char yy_hold_char;
// Number of characters read into yy_ch_buf.
int yy_n_chars;
// Points to current character in buffer.
char* yy_c_buf_p;
int yy_init; // whether we need to initialize
int yy_start; // start state number
// Flag which is used to allow yywrap()'s to do buffer switches
// instead of setting up a fresh yyin. A bit of a hack ...
int yy_did_buffer_switch_on_eof;
// The following are not always needed, but may be depending
// on use of certain flex features (like REJECT or yymore()).
yy_state_type yy_last_accepting_state;
char* yy_last_accepting_cpos;
yy_state_type* yy_state_buf;
yy_state_type* yy_state_ptr;
char* yy_full_match;
int* yy_full_state;
int yy_full_lp;
int yy_lp;
int yy_looking_for_trail_begin;
int yy_more_flag;
int yy_more_len;
int yy_more_offset;
int yy_prev_more_offset;
};
#endif
+109 -30
View File
@@ -1,37 +1,116 @@
Zend Temporary License
======================
---------------------------------------------------------------------------
The Zend License, version 0.91
Copyright (C) 1999 Andi Gutmans & Zeev Suraski
---------------------------------------------------------------------------
This is a temporary license, that is in effect until the final Zend license
is available.
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 final license will include the ability to distribute Zend freely,
as a part of PHP (in both compiled and source code formats). It may
(and probably will) allow to redistribute Zend under other circumstances
as well, but at the very least, it'll be freely distributed as a part
of PHP.
For more information about Zend please visit http://www.zend.com/
For license related questions please mail license@zend.com
* The source code in the Zend engine is the property of Andi Gutmans and
Zeev Suraski. Parts of this code are based on source code taken from
PHP 3.0, which may include several patches and enhancements that weren't
made by us (Andi&Zeev). If you're the author of such a patch and you're
not willing to give up ownership over your patch to us, please contact
us as soon as possible, so we can remove it. We're doing this so that
we'd be eligible to sell the Zend engine for uses other than PHP, most
notably - as an embedded part of possible commercial products that we'd
have.
===========================================================================
* Patches submitted to the Zend CVS automatically fall under this license,
and by submitting them you're implicitly giving up your ownership over
this patch to us.
THE Q PUBLIC LICENSE
version 1.0
* Until further notice, Zend is in a status of a closed beta test. That means
that only people that were explicitly given the right to access the Zend
CVS repository are allowed to use it. If you're reading this file and you
weren't explicitly given the right to access the Zend CVS repository from
either Andi Gutmans or Zeev Suraski - you're not supposed to have it - please
erase the Zend files from your system. When the closed beta period finishes,
the Zend CVS tree will be open for the public (in read-only mode, of course).
Copyright (C) 1999 Troll Tech AS, Norway.
Everyone is permitted to copy and
distribute this license document.
The intent of this license is to establish freedom to share and change the
software regulated by this license under the open source model.
This license applies to any software containing a notice placed by the
copyright holder saying that it may be distributed under the terms of
the Q Public License version 1.0. Such software is herein referred to as
the Software. This license covers modification and distribution of the
Software, use of third-party application programs based on the Software,
and development of free software which uses the Software.
Granted Rights
1. You are granted the non-exclusive rights set forth in this license
provided you agree to and comply with any and all conditions in this
license. Whole or partial distribution of the Software, or software
items that link with the Software, in any form signifies acceptance of
this license.
2. You may copy and distribute the Software in unmodified form provided
that the entire package, including - but not restricted to - copyright,
trademark notices and disclaimers, as released by the initial developer
of the Software, is distributed.
3. You may make modifications to the Software and distribute your
modifications, in a form that is separate from the Software, such as
patches. The following restrictions apply to modifications:
a. Modifications must not alter or remove any copyright notices in
the Software.
b. When modifications to the Software are released under this
license, a non-exclusive royalty-free right is granted to the
initial developer of the Software to distribute your modification
in future versions of the Software provided such versions remain
available under these terms in addition to any other license(s) of
the initial developer.
4. You may distribute machine-executable forms of the Software or
machine-executable forms of modified versions of the Software, provided
that you meet these restrictions:
a. You must include this license document in the distribution.
b. You must ensure that all recipients of the machine-executable forms
are also able to receive the complete machine-readable source code
to the distributed Software, including all modifications, without
any charge beyond the costs of data transfer, and place prominent
notices in the distribution explaining this.
c. You must ensure that all modifications included in the
machine-executable forms are available under the terms of this
license.
5. You may use the original or modified versions of the Software to
compile, link and run application programs legally developed by you
or by others.
6. You may develop application programs, reusable components and other
software items that link with the original or modified versions of the
Software. These items, when distributed, are subject to the following
requirements:
a. You must ensure that all recipients of machine-executable forms of
these items are also able to receive and use the complete
machine-readable source code to the items without any charge
beyond the costs of data transfer.
b. You must explicitly license all recipients of your items to use
and re-distribute original and modified versions of the items in
both machine-executable and source code forms. The recipients must
be able to do so without any charges whatsoever, and they must be
able to re-distribute to anyone they choose.
Any questions regarding Zend or this license should be addressed via Email to
zend@zend.com.
c. If the items are not available to the general public, and the
initial developer of the Software requests a copy of the items,
then you must supply one.
Limitations of Liability
In no event shall the initial developers or copyright holders be liable
for any damages whatsoever, including - but not restricted to - lost
revenue or profits or other direct, indirect, special, incidental or
consequential damages, even if they have been advised of the possibility
of such damages, except to the extent invariable law, if any, provides
otherwise.
No Warranty
The Software and this license document are provided AS IS with NO WARRANTY
OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE.
===========================================================================
+38
View File
@@ -0,0 +1,38 @@
## Process this file with automake to produce Makefile.in -*- makefile -*-
#CLEANFILES = zend-parser.c zend-parser.h zend-scanner.c zend-parser.output
ZEND_SCANNER = @ZEND_SCANNER@
AUTOMAKE_OPTIONS=foreign
EXTRA_LTLIBRARIES=libzend_cc.la libzend_c.la
noinst_LTLIBRARIES=$(ZEND_SCANNER) libzend.la
libzend_cc_la_SOURCES=zend-scanner-cc.cc
libzend_c_la_SOURCES=zend-scanner.c
libzend_la_SOURCES=\
zend-parser.y \
zend_alloc.c zend_compile.c zend_constants.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_builtin_functions.c
libzend_la_LIBADD = $(ZEND_SCANNER)
libzend_la_LDFLAGS = @EXTRA_LIBS@
# automake isn't too clever about "non-standard" use of lex and yacc
zend-scanner.l: zend-parser.h
zend-scanner.c: zend-scanner.l
$(LEX) -Pzend -o$@ -i $(srcdir)/zend-scanner.l
zend-scanner-cc.cc: 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
$(YACC) -p zend -v -d $(srcdir)/zend-parser.y -o zend-parser.c
-145
View File
@@ -1,145 +0,0 @@
CC = @CC@
AR = ar rc
LIBNAME = libzend.a
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@ $(PROF_CFLAGS)
LDFLAGS = @LDFLAGS@ $(LDFLAGS_SHLIB) $(LDFLAGS_SHLIB_EXPORT)
RANLIB = @RANLIB@
YACC = @YACC@
SOURCE = zend_alloc.c zend_compile.c zend_constants.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-parser.c zend-scanner.c zend.c zend_API.c zend_extensions.c \
zend_hash.c zend_list.c zend_indent.c
OBJS = zend_alloc.o zend_compile.o zend_constants.o zend_execute.o zend_execute_API.o \
zend_highlight.o zend_llist.o zend_opcode.o zend_operators.o zend_ptr_stack.o \
zend_stack.o zend_variables.o zend-parser.o zend-scanner.o zend.o zend_API.o zend_extensions.o \
zend_hash.o zend_list.o zend_indent.o
LIBS = @LIBS@
all: $(LIBNAME)
libzend.a: $(OBJS)
-rm -f libzend.a
$(AR) libzend.a $(OBJS)
$(RANLIB) libzend.a
zend-parser.h zend-parser.c: zend-parser.y
bison -p zend -v -d zend-parser.y -o zend-parser.c
zend-scanner.o:
$(CC) $(CFLAGS) -w -c zend-scanner.c
zend-scanner.c: zend-scanner.l
flex -Pzend -ozend-scanner.c -i zend-scanner.l
clean:
-rm -f libzend.a *.o
distclean: clean
-rm -f *-scanner.c *-parser.[ch] *.output
-rm -f config.status config.cache config.log
-rm -f Makefile Makefile.depend config.h
.c.o:
@rm -f $@
$(CC) $(CFLAGS) -c $< -o $@
@bn=`echo $@ | sed -e 's#functions/##'`; test -f $@ || \
(test "$@" != "$$bn" && test -f "$$bn" && mv $$bn $@)
parser-scanner: zend-parser.c zend-parser.h zend-scanner.c
depend: parser-scanner
$(CC) $(CFLAGS) -MM $(SOURCE) | perl -pe 's|regex/regex.h||;' > Makefile.depend
zend_alloc.o: zend_alloc.c zend.h config.h config.unix.h zend_errors.h \
zend_alloc.h zend_hash.h zend_llist.h zend_globals.h zend_stack.h \
zend_ptr_stack.h zend_compile.h zend-parser.h zend_execute.h
zend_compile.o: zend_compile.c zend.h config.h config.unix.h \
zend_errors.h zend_alloc.h zend_hash.h zend_llist.h zend_compile.h \
zend-parser.h zend_globals.h zend_stack.h zend_ptr_stack.h \
zend_execute.h zend_API.h modules.h zend_list.h zend_variables.h \
zend_operators.h
zend_constants.o: zend_constants.c zend.h config.h config.unix.h \
zend_errors.h zend_alloc.h zend_hash.h zend_llist.h zend_constants.h \
zend_variables.h zend_operators.h zend_globals.h zend_stack.h \
zend_ptr_stack.h zend_compile.h zend-parser.h zend_execute.h
zend_execute.o: zend_execute.c zend.h config.h config.unix.h \
zend_errors.h zend_alloc.h zend_hash.h zend_llist.h zend_compile.h \
zend-parser.h zend_globals.h zend_stack.h zend_ptr_stack.h \
zend_execute.h zend_API.h modules.h zend_list.h zend_variables.h \
zend_operators.h zend_constants.h zend_extensions.h
zend_execute_API.o: zend_execute_API.c zend.h config.h config.unix.h \
zend_errors.h zend_alloc.h zend_hash.h zend_llist.h zend_compile.h \
zend-parser.h zend_globals.h zend_stack.h zend_ptr_stack.h \
zend_execute.h zend_API.h modules.h zend_list.h zend_variables.h \
zend_operators.h zend_constants.h zend_extensions.h
zend_highlight.o: zend_highlight.c zend.h config.h config.unix.h \
zend_errors.h zend_alloc.h zend_hash.h zend_llist.h zend_compile.h \
zend-parser.h zend_globals.h zend_stack.h zend_ptr_stack.h \
zend_execute.h zend_highlight.h
zend_llist.o: zend_llist.c zend.h config.h config.unix.h zend_errors.h \
zend_alloc.h zend_hash.h zend_llist.h
zend_opcode.o: zend_opcode.c zend.h config.h config.unix.h \
zend_errors.h zend_alloc.h zend_hash.h zend_llist.h zend_compile.h \
zend-parser.h zend_globals.h zend_stack.h zend_ptr_stack.h \
zend_execute.h zend_variables.h zend_operators.h zend_extensions.h \
zend_API.h modules.h zend_list.h
zend_operators.o: zend_operators.c zend.h config.h config.unix.h \
zend_errors.h zend_alloc.h zend_hash.h zend_llist.h zend_operators.h \
zend_variables.h zend_globals.h zend_stack.h zend_ptr_stack.h \
zend_compile.h zend-parser.h zend_execute.h
zend_ptr_stack.o: zend_ptr_stack.c zend.h config.h config.unix.h \
zend_errors.h zend_alloc.h zend_hash.h zend_llist.h zend_ptr_stack.h
zend_stack.o: zend_stack.c zend.h config.h config.unix.h zend_errors.h \
zend_alloc.h zend_hash.h zend_llist.h zend_stack.h
zend_variables.o: zend_variables.c zend.h config.h config.unix.h \
zend_errors.h zend_alloc.h zend_hash.h zend_llist.h zend_API.h \
modules.h zend_list.h zend_globals.h zend_stack.h zend_ptr_stack.h \
zend_compile.h zend-parser.h zend_execute.h zend_constants.h \
zend_variables.h
zend-parser.o: zend-parser.c zend_compile.h zend.h config.h \
config.unix.h zend_errors.h zend_alloc.h zend_hash.h zend_llist.h \
zend-parser.h zend_globals.h zend_stack.h zend_ptr_stack.h \
zend_execute.h zend_list.h zend_API.h modules.h zend_variables.h \
zend_operators.h
zend-scanner.o: zend-scanner.c zend.h config.h config.unix.h \
zend_errors.h zend_alloc.h zend_hash.h zend_llist.h zend_compile.h \
zend-parser.h zend_globals.h zend_stack.h zend_ptr_stack.h \
zend_execute.h zend-scanner.h zend_highlight.h zend_constants.h \
zend_variables.h zend_operators.h
zend.o: zend.c zend.h config.h config.unix.h zend_errors.h \
zend_alloc.h zend_hash.h zend_llist.h zend_operators.h \
zend_variables.h zend_extensions.h zend_compile.h zend-parser.h \
zend_globals.h zend_stack.h zend_ptr_stack.h zend_execute.h modules.h \
zend_constants.h zend_list.h
zend_API.o: zend_API.c zend.h config.h config.unix.h zend_errors.h \
zend_alloc.h zend_hash.h zend_llist.h zend_variables.h zend_execute.h \
zend_compile.h zend-parser.h zend_globals.h zend_stack.h \
zend_ptr_stack.h zend_API.h modules.h zend_list.h zend_constants.h \
zend_operators.h
zend_extensions.o: zend_extensions.c zend_extensions.h zend_compile.h \
zend.h config.h config.unix.h zend_errors.h zend_alloc.h zend_hash.h \
zend_llist.h zend-parser.h zend_globals.h zend_stack.h \
zend_ptr_stack.h zend_execute.h
zend_hash.o: zend_hash.c zend.h config.h config.unix.h zend_errors.h \
zend_alloc.h zend_hash.h zend_llist.h
zend_list.o: zend_list.c zend.h config.h config.unix.h zend_errors.h \
zend_alloc.h zend_hash.h zend_llist.h zend_list.h zend_API.h \
modules.h zend_globals.h zend_stack.h zend_ptr_stack.h zend_compile.h \
zend-parser.h zend_execute.h
zend_indent.o: zend_indent.c zend.h config.h config.unix.h \
zend_errors.h zend_alloc.h zend_hash.h zend_llist.h zend_compile.h \
zend-parser.h zend_globals.h zend_stack.h zend_ptr_stack.h \
zend_execute.h zend_indent.h
# Local Variables:
# tab-width: 4
# End:
+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"\
+58 -216
View File
@@ -1,247 +1,89 @@
#undef HAVE_CLASS_ISTDIOSTREAM
#define ZEND_API
@TOP@
/* This is the default configuration file to read */
#define USE_CONFIG_FILE 1
/* 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
/* Solaris YP check */
#undef SOLARIS_YP
/* Netscape LDAP SDK check */
#undef HAVE_NSLDAP
/* ImageMagick check */
#undef HAVE_LIBMAGICK
/* 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
/* Define if you have the gd library (-lgd). */
#define HAVE_LIBGD 0
/* Define if you have the GNU gettext library (-lintl). */
#define HAVE_LIBINTL 0
/* Define if you have the zlib library */
#define HAVE_ZLIB 0
/* Define if you have the gd version 1.3 library (-lgd). */
#define HAVE_LIBGD13 0
/* Undefine if you want stricter XML/SGML compliance by default */
/* (this disables "<?expression?>" by default) */
#define DEFAULT_SHORT_OPEN_TAG 1
/* Define if you want the logging to go to ndbm/gdbm/flatfile */
#define LOG_DBM 0
#define LOG_DBM_DIR "."
/* Define if you want the logging to go to a mysql database */
#define LOG_MYSQL 0
/* Define if you want the logging to go to a mysql database */
#define LOG_MSQL 0
/* Define these if you are using an SQL database for logging */
#define LOG_SQL_HOST ""
#define LOG_SQL_DB ""
/* Define if you an ndbm compatible library (-ldbm). */
#define NDBM 0
/* Define if you have the gdbm library (-lgdbm). */
#define GDBM 0
#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 want Solid database support */
#define HAVE_SOLID 0
/* Define if you want to use the supplied dbase library */
#define DBASE 0
/* Define if you want Hyperwave support */
#define HYPERWAVE 0
/* Define if you have the crypt() function */
#define HAVE_CRYPT 1
/* Define if you have the Oracle database client libraries */
#define HAVE_ORACLE 0
/* Define if you have the Oracle version 8 database client libraries */
#define HAVE_OCI8 0
/* Define if you want to use the iODBC database driver */
#define HAVE_IODBC 0
/* Define if you want to use the OpenLink ODBC database driver */
#define HAVE_OPENLINK 0
/* Define if you have the AdabasD client libraries */
#define HAVE_ADABAS 0
/* Define if you want the LDAP directory interface */
#define HAVE_LDAP 0
/* Define if you want the Cybercash MCK support */
#define HAVE_MCK 0
/* Define if you want the SNMP interface */
#define HAVE_SNMP 0
/* Define if you want the IMAP directory interface */
#define HAVE_IMAP 0
/* Define if you want the ASPELL interface */
#define HAVE_ASPELL 0
/* Define if you want to use a custom ODBC database driver */
#define HAVE_CODBC 0
/* Define to use the unified ODBC interface */
#define HAVE_UODBC 0
/* Define if you have libdl (used for dynamic linking) */
#define HAVE_LIBDL 0
/* Define if you have libdnet_stub (used for Sybase support) */
#define HAVE_LIBDNET_STUB 0
/* Define if you have and want to use libcrypt */
#define HAVE_LIBCRYPT 0
/* Define if you have and want to use libnsl */
#define HAVE_LIBNSL 0
/* Define if you have and want to use libsocket */
#define HAVE_LIBSOCKET 0
/* Define if you have and want to use libpam */
#define HAVE_LIBPAM 0
/* Define if you have the sendmail program available */
#define HAVE_SENDMAIL 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 HAVE_EMPRESS
#define HAVE_EMPRESS 0
#endif
#define HAVE_SYBASE 0
#define HAVE_SYBASE_CT 0
#ifndef HAVE_MYSQL
#define HAVE_MYSQL 0
#endif
#ifndef HAVE_MSQL
#define HAVE_MSQL 0
#endif
#ifndef HAVE_PGSQL
#define HAVE_PGSQL 0
#endif
#ifndef HAVE_VELOCIS
#define HAVE_VELOCIS 0
#endif
#ifndef HAVE_IFX
#define HAVE_IFX 0
#endif
#ifndef HAVE_IFX_IUS
#define HAVE_IFX_IUS 0
#endif
#ifndef IFX_VERSION
#define IFX_VERSION 0
#endif
#ifndef HAVE_IBASE
#define HAVE_IBASE 0
#endif
#ifndef HAVE_PQCMDTUPLES
#define HAVE_PQCMDTUPLES 0
#endif
#undef ZEND_DEBUG
/* Define if your system has the gettimeofday() call */
#define HAVE_GETTIMEOFDAY 0
/* Define if your system has the getrusage() call */
#define HAVE_GETRUSAGE 0
/* Define if your system has the putenv() library call */
#define HAVE_PUTENV 0
/* Define if you want to enable bc style precision math support */
#define WITH_BCMATH 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 to enable memory limit support */
#define MEMORY_LIMIT 0
/* Define if you want System V semaphore support.
*/
#define HAVE_SYSVSEM 0
/* Define if you have union semun.
*/
#define HAVE_SEMUN 0
/* Define if you want System V shared memory support. */
#define HAVE_SYSVSHM 0
/* Define if you want to enable displaying source support. */
#define HAVE_DISPLAY_SOURCE 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 if you have the expat (XML Parser Toolkit) library */
#define HAVE_LIBEXPAT 0
/* Define to compile Zend thread safe */
#undef ZTS
/* Define if you have the pdflib library */
#define HAVE_PDFLIB 0
#undef HAVE_LIBDL
/* Define if you have the fdftk library */
#define HAVE_FDFLIB 0
@BOTTOM@
/* Define to compile with mod_dav support */
#define HAVE_MOD_DAV 0
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#endif
/* Define to enable yp/nis support */
#define HAVE_YP 0
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_STRING_H
# include <string.h>
#else
# include <strings.h>
#endif
/* Define if you have stdiostream.h */
#undef HAVE_STDIOSTREAM_H
#ifdef HAVE_DLFCN_H
# include <dlfcn.h>
#endif
#if defined(HAVE_LIBDL) && defined(RTLD_NOW)
# 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 ZEND_BROKEN_SPRINTF
int zend_sprintf(char *buffer, const char *format, ...);
#else
# define zend_sprintf sprintf
#endif
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
+25
View File
@@ -0,0 +1,25 @@
dnl $Id$
dnl
dnl This file contains local autoconf functions.
dnl
dnl Check for broken sprintf()
dnl
AC_DEFUN(AC_ZEND_BROKEN_SPRINTF,[
AC_MSG_CHECKING([for broken sprintf])
AC_TRY_RUN([main() { char buf[20]; exit (sprintf(buf,"testing 123")!=11); }],[
AC_DEFINE(ZEND_BROKEN_SPRINTF,0)
AC_MSG_RESULT(ok)
],[
AC_DEFINE(ZEND_BROKEN_SPRINTF,1)
AC_MSG_RESULT(broken)
],[
AC_DEFINE(ZEND_BROKEN_SPRINTF,0)
AC_MSG_RESULT(cannot check, guessing ok)
])
])
AC_DEFUN(AM_SET_LIBTOOL_VARIABLE,[
LIBTOOL='$(SHELL) $(top_builddir)/libtool $1'
])
-52
View File
@@ -1,52 +0,0 @@
dnl $Id$
dnl
dnl This file contains local autoconf functions.
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)
])
])
# another one stolen from automake temporarily
#
# Check to make sure that the build environment is sane.
#
AC_DEFUN(AM_SANITY_CHECK,
[AC_MSG_CHECKING([whether build environment is sane])
# Just in case
sleep 1
echo timestamp > conftestfile
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
if test "$@" = "X"; then
# -L didn't work.
set X `ls -t $srcdir/configure conftestfile`
fi
test "[$]2" = conftestfile
)
then
# Ok.
:
else
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
rm -f conftest*
AC_MSG_RESULT(yes)])
+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
Executable
+33
View File
@@ -0,0 +1,33 @@
#!/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
echo "buildconf: keeping ${1}aclocal.m4"
mv aclocal.m4.old aclocal.m4
else
echo "buildconf: created or modified ${1}aclocal.m4"
fi
autoheader
automake --add-missing --include-deps $automake_flags
mv configure configure.old 2>/dev/null
autoconf
if cmp configure.old configure > /dev/null 2>&1; then
echo "buildconf: keeping ${1}configure"
mv configure.old configure
else
echo "buildconf: created or modified ${1}configure"
fi
-274
View File
@@ -1,274 +0,0 @@
/* config.h.in. Generated automatically from configure.in by autoheader. */
/* Define if using alloca.c. */
#undef C_ALLOCA
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
This function is required for alloca.c support on those systems. */
#undef CRAY_STACKSEG_END
/* Define if you have alloca, as a function or macro. */
#undef HAVE_ALLOCA
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
#undef HAVE_ALLOCA_H
/* Define if you don't have vprintf but do have _doprnt. */
#undef HAVE_DOPRNT
/* Define if utime(file, NULL) sets file's timestamp to the present. */
#undef HAVE_UTIME_NULL
/* Define if you have the vprintf function. */
#undef HAVE_VPRINTF
/* Define if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O
/* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef size_t
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown
*/
#undef STACK_DIRECTION
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
/* 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
/* Define if you have the resolv library (-lresolv). */
#define HAVE_LIBRESOLV 0
/* Define if you have libdl (used for dynamic linking) */
#define HAVE_LIBDL 0
/* Define if you have and want to use libnsl */
#define HAVE_LIBNSL 0
/* Define if you have and want to use libsocket */
#define HAVE_LIBSOCKET 0
#undef ZEND_DEBUG
/* 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
/* Define if you have the crypt function. */
#undef HAVE_CRYPT
/* Define if you have the cuserid function. */
#undef HAVE_CUSERID
/* Define if you have the flock function. */
#undef HAVE_FLOCK
/* Define if you have the gcvt function. */
#undef HAVE_GCVT
/* Define if you have the getlogin function. */
#undef HAVE_GETLOGIN
/* Define if you have the getopt function. */
#undef HAVE_GETOPT
/* Define if you have the gettimeofday function. */
#undef HAVE_GETTIMEOFDAY
/* Define if you have the inet_aton function. */
#undef HAVE_INET_ATON
/* Define if you have the link function. */
#undef HAVE_LINK
/* Define if you have the lockf function. */
#undef HAVE_LOCKF
/* Define if you have the lrand48 function. */
#undef HAVE_LRAND48
/* Define if you have the memcpy function. */
#undef HAVE_MEMCPY
/* Define if you have the memmove function. */
#undef HAVE_MEMMOVE
/* Define if you have the putenv function. */
#undef HAVE_PUTENV
/* Define if you have the random function. */
#undef HAVE_RANDOM
/* Define if you have the regcomp function. */
#undef HAVE_REGCOMP
/* Define if you have the rint function. */
#undef HAVE_RINT
/* Define if you have the setitimer function. */
#undef HAVE_SETITIMER
/* Define if you have the setlocale function. */
#undef HAVE_SETLOCALE
/* Define if you have the setsockopt function. */
#undef HAVE_SETSOCKOPT
/* Define if you have the setvbuf function. */
#undef HAVE_SETVBUF
/* Define if you have the snprintf function. */
#undef HAVE_SNPRINTF
/* Define if you have the srand48 function. */
#undef HAVE_SRAND48
/* Define if you have the srandom function. */
#undef HAVE_SRANDOM
/* Define if you have the statfs function. */
#undef HAVE_STATFS
/* Define if you have the statvfs function. */
#undef HAVE_STATVFS
/* Define if you have the strcasecmp function. */
#undef HAVE_STRCASECMP
/* Define if you have the strdup function. */
#undef HAVE_STRDUP
/* Define if you have the strerror function. */
#undef HAVE_STRERROR
/* Define if you have the strftime function. */
#undef HAVE_STRFTIME
/* Define if you have the strstr function. */
#undef HAVE_STRSTR
/* Define if you have the symlink function. */
#undef HAVE_SYMLINK
/* Define if you have the tempnam function. */
#undef HAVE_TEMPNAM
/* Define if you have the tzset function. */
#undef HAVE_TZSET
/* Define if you have the unsetenv function. */
#undef HAVE_UNSETENV
/* Define if you have the usleep function. */
#undef HAVE_USLEEP
/* Define if you have the utime function. */
#undef HAVE_UTIME
/* Define if you have the vsnprintf function. */
#undef HAVE_VSNPRINTF
/* Define if you have the <crypt.h> header file. */
#undef HAVE_CRYPT_H
/* Define if you have the <db.h> header file. */
#undef HAVE_DB_H
/* Define if you have the <dirent.h> header file. */
#undef HAVE_DIRENT_H
/* Define if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define if you have the <grp.h> header file. */
#undef HAVE_GRP_H
/* Define if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
/* Define if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define if you have the <ndbm.h> header file. */
#undef HAVE_NDBM_H
/* Define if you have the <ndir.h> header file. */
#undef HAVE_NDIR_H
/* Define if you have the <netinet/in.h> header file. */
#undef HAVE_NETINET_IN_H
/* Define if you have the <pwd.h> header file. */
#undef HAVE_PWD_H
/* Define if you have the <signal.h> header file. */
#undef HAVE_SIGNAL_H
/* Define if you have the <stdarg.h> header file. */
#undef HAVE_STDARG_H
/* Define if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define if you have the <sys/dir.h> header file. */
#undef HAVE_SYS_DIR_H
/* Define if you have the <sys/file.h> header file. */
#undef HAVE_SYS_FILE_H
/* Define if you have the <sys/ndir.h> header file. */
#undef HAVE_SYS_NDIR_H
/* Define if you have the <sys/resource.h> header file. */
#undef HAVE_SYS_RESOURCE_H
/* Define if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H
/* Define if you have the <sys/statfs.h> header file. */
#undef HAVE_SYS_STATFS_H
/* Define if you have the <sys/statvfs.h> header file. */
#undef HAVE_SYS_STATVFS_H
/* Define if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
/* Define if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define if you have the <sys/varargs.h> header file. */
#undef HAVE_SYS_VARARGS_H
/* Define if you have the <sys/wait.h> header file. */
#undef HAVE_SYS_WAIT_H
/* Define if you have the <syslog.h> header file. */
#undef HAVE_SYSLOG_H
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define if you have the <unix.h> header file. */
#undef HAVE_UNIX_H
/* Define if you have the m library (-lm). */
#undef HAVE_LIBM
/* Define if you have the resolv library (-lresolv). */
#undef HAVE_LIBRESOLV
-39
View File
@@ -1,39 +0,0 @@
#ifndef _CONFIG_UNIX_H
#define _CONFIG_UNIX_H
#define ZEND_API
#include <stdlib.h>
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#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 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 */
-41
View File
@@ -1,41 +0,0 @@
#ifndef _ZEND_CONFIG_W32_H
#define _ZEND_CONFIG_W32_H
#include <string.h>
#include <windows.h>
typedef unsigned long ulong;
typedef unsigned int uint;
#define HAVE_ALLOCA 1
#include <malloc.h>
#define HAVE_DIRENT_H 0
#ifdef inline
#undef inline
#endif
#define ZEND_DEBUG 1
#define zend_sprintf sprintf
/* Visual C++ doesn't really work with inline for C */
#define inline
#define DL_LOAD(libname) LoadLibrary(libname)
#define DL_FETCH_SYMBOL GetProcAddress
#define DL_UNLOAD FreeLibrary
#define DL_HANDLE HMODULE
#define ZEND_EXTENSIONS_SUPPORT 1
#ifdef COMPILE_LIBZEND
# define ZEND_API __declspec(dllexport)
#else
# define ZEND_API __declspec(dllimport)
#endif
#endif /* _ZEND_CONFIG_W32_H */
+107 -91
View File
@@ -2,9 +2,11 @@ dnl $Id$
dnl Process this file with autoconf to produce a configure script.
AC_INIT(zend.c)
AC_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(zend, 0.80A)
AM_CONFIG_HEADER(zend_config.h)
AM_SANITY_CHECK
AM_MAINTAINER_MODE
ZEND_VERSION=$VERSION
dnl We want this one before the checks, so the checks can modify CFLAGS.
test -z "$CFLAGS" && auto_cflags=1
@@ -12,19 +14,34 @@ 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'd want to regenerate the PHP 3.0 parsers.)
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'd want to regenerate the PHP 3.0 parsers (found $1.$2).)
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
if test "$enable_thread_safety" = "yes" ; then
AC_PROG_CXX
fi
AC_PROG_CC_C_O
AC_PATH_PROG(PERL_PATH, perl)
AM_PROG_LEX
AM_PROG_LIBTOOL
if test "$enable_debug" != "yes"; then
AM_SET_LIBTOOL_VARIABLE([--silent])
fi
AM_PROG_CC_STDC
AC_C_INLINE
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
dnl Ugly hack to get around a problem with gcc on AIX.
if test "$CC" = "gcc" -a "$ac_cv_prog_cc_g" = "yes" -a \
@@ -32,35 +49,6 @@ if test "$CC" = "gcc" -a "$ac_cv_prog_cc_g" = "yes" -a \
CFLAGS=`echo $CFLAGS | sed -e 's/-g//'`
fi
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"
apxs_runpath_switch="-Wl,-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,"
apxs_runpath_switch="-Wl,'-rpath "
else
dnl something innocuous
ld_runpath_switch="-L"
apxs_runpath_switch="-L'"
fi
fi
dnl
dnl Check for /usr/pkg/{lib,include} which is where NetBSD puts binary
dnl and source packages. This should be harmless on other OSs.
@@ -70,20 +58,6 @@ if test -d /usr/pkg/include -a -d /usr/pkg/lib ; then
LDFLAGS="$LDFLAGS -L/usr/pkg/lib"
fi
AC_CHECK_LIB(nsl, gethostname, [
LIBS="-lnsl $LIBS"
AC_DEFINE(HAVE_LIBNSL) ], [])
AC_CHECK_LIB(c, socket, [:], [
AC_CHECK_LIB(socket, socket, [
LIBS="-lsocket $LIBS"
AC_DEFINE(HAVE_LIBSOCKET) ], []) ])
AC_CHECK_LIB(c, gethostbyaddr, [:], [
AC_CHECK_LIB(nsl, gethostbyaddr, [
LIBS="-lnsl $LIBS"
AC_DEFINE(HAVE_LIBNSL) ], []) ])
AC_CHECK_LIB(c, dlopen, [
# fake it
AC_DEFINE(HAVE_LIBDL) ], [
@@ -91,43 +65,22 @@ AC_CHECK_LIB(c, 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 The res_search may be in libsocket as well, and if it is
dnl make sure to check for dn_skipname in libresolv, or if res_search
dnl is in neither of these libs, still check for dn_skipname in libresolv
AC_CHECK_LIB(socket, res_search, [
AC_CHECK_LIB(resolv, dn_skipname)
AC_CHECK_LIB(resolv, __dn_skipname)
LIBS="$LIBS -lsocket"
AC_DEFINE(HAVE_LIBSOCKET)
], [
AC_CHECK_LIB(resolv, res_search, [
LIBS="$LIBS -lresolv"
AC_DEFINE(HAVE_LIBRESOLV)
], [
AC_CHECK_LIB(resolv, dn_skipname)
AC_CHECK_LIB(resolv, __dn_skipname)
])
])
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)
AC_CHECK_HEADERS(limits.h malloc.h string.h unistd.h stdarg.h sys/types.h signal.h unix.h dlfcn.h)
if test "$enable_thread_safety" = "yes" ; then
dnl C++ specific header files
AC_LANG_CPLUSPLUS
AC_CHECK_HEADER(stdiostream.h, [ AC_DEFINE(HAVE_STDIOSTREAM_H) ])
AC_LANG_C
fi
dnl Checks for types
AC_TYPE_SIZE_T
AC_TYPE_SIGNAL
dnl This is required for QNX and may be some BSD derived systems
AC_CHECK_TYPE( uint, unsigned int )
@@ -135,15 +88,14 @@ AC_CHECK_TYPE( ulong, unsigned long )
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)
AC_FUNC_UTIME_NULL
AC_FUNC_MEMCMP
AC_FUNC_ALLOCA
AC_BROKEN_SPRINTF
AC_REPLACE_FUNCS(getopt)
AC_CHECK_FUNCS(memcpy strdup getpid kill strtod strtol)
AC_ZEND_BROKEN_SPRINTF
AC_MSG_CHECKING(whether to include debugging symbols)
AC_ARG_ENABLE(debug,
[ --enable-debug Compile with debugging symbols],
[ --disable-debug Compile without debugging symbols],
[
if test "$enableval" = "yes"; then
AC_MSG_RESULT(yes)
@@ -158,12 +110,29 @@ AC_ARG_ENABLE(debug,
DEBUG_CFLAGS=""
fi
],[
AC_MSG_RESULT(no)
AC_DEFINE(ZEND_DEBUG,0)
DEBUG_CFLAGS=""
AC_MSG_RESULT(yes)
AC_DEFINE(ZEND_DEBUG,1)
DEBUG_CFLAGS="-g"
])
AC_SUBST(DEBUG_CFLAGS)
CFLAGS="$CFLAGS $DEBUG_CFLAGS"
RESULT=yes
AC_MSG_CHECKING(whether to enable inline)
AC_ARG_ENABLE(inline,
[ --disable-inline Disable the inline specifier],
[
if test "$enableval" = "no"; then
RESULT=no
fi
])
AC_MSG_RESULT($RESULT)
if test "$RESULT" = "yes"; then
AC_C_INLINE
else
AC_DEFINE(inline, [])
fi
AC_MSG_CHECKING(whether to enable a memory limit)
AC_ARG_ENABLE(memory-limit,
@@ -182,12 +151,59 @@ AC_ARG_ENABLE(memory-limit,
])
AC_SUBST(CFLAGS_SHLIB)
AC_SUBST(LDFLAGS_SHLIB)
AC_SUBST(LDFLAGS_SHLIB_EXPORT)
ZEND_SCANNER_TYPE=c
dnl Sigh. This will probably break automake's automatic dependencies..
AC_MSG_CHECKING(whether to build Zend thread-safe)
AC_ARG_ENABLE(thread-safety,
[ --enable-thread-safety Whether to build Zend thread-safe.],[
if test "$enableval" = "yes"; then
AC_DEFINE(ZTS)
ZEND_SCANNER_TYPE=cc
CPPFLAGS="$CPPFLAGS -I../TSRM"
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
],[
AC_MSG_RESULT(no)
])
AC_SUBST(TSRM_DIR)
AC_SUBST(TSRM_LIB)
ZEND_SCANNER="libzend_${ZEND_SCANNER_TYPE}.la"
AC_SUBST(ZEND_SCANNER)
AC_OUTPUT(Makefile, [], [])
if test "$enable_thread_safety" = "yes" ; then
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_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_MSG_CHECKING(for 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_DEFINE(HAVE_CLASS_ISTDIOSTREAM, 1)
AC_MSG_RESULT(yes)
],[
AC_MSG_RESULT(no)
])
AC_LANG_RESTORE
fi
EXTRA_LIBS="$LIBS"
LIBS=""
AC_SUBST(EXTRA_LIBS)
AC_OUTPUT(Makefile)
# Local Variables:
# tab-width: 4
+1541
View File
File diff suppressed because it is too large. Load diff
+34 -15
View File
@@ -31,19 +31,18 @@ RSC=rc.exe
!IF "$(CFG)" == "libzend - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 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 /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "COMPILE_LIBZEND" /YX /FD /c
# ADD BASE RSC /l 0x40d /d "NDEBUG"
# ADD RSC /l 0x40d /d "NDEBUG"
# 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
@@ -54,19 +53,17 @@ LIB32=link.exe -lib
!ELSEIF "$(CFG)" == "libzend - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# 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 /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "COMPILE_LIBZEND" /FR /YX /FD /GZ /c
# ADD BASE RSC /l 0x40d /d "_DEBUG"
# ADD RSC /l 0x40d /d "_DEBUG"
# 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
@@ -105,6 +102,10 @@ 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
@@ -173,7 +174,7 @@ SOURCE=.\zend_variables.c
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\config.w32.h
SOURCE=.\FlexLexer.h
# End Source File
# Begin Source File
@@ -201,10 +202,18 @@ 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
@@ -274,7 +283,8 @@ 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
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)
@@ -290,7 +300,8 @@ 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
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)
@@ -312,6 +323,14 @@ 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
+377
View File
@@ -0,0 +1,377 @@
# 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_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_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_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)" == "libzendts - 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)" == "libzendts - 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
!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 -+ -B -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
+274 -241
View File
@@ -5,10 +5,13 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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> |
@@ -40,106 +43,122 @@
%pure_parser
%expect 4
%left INCLUDE EVAL
%left T_INCLUDE T_EVAL
%left ','
%left LOGICAL_OR
%left LOGICAL_XOR
%left LOGICAL_AND
%right ZEND_PRINT
%left '=' PLUS_EQUAL MINUS_EQUAL MUL_EQUAL DIV_EQUAL CONCAT_EQUAL MOD_EQUAL AND_EQUAL OR_EQUAL XOR_EQUAL SHIFT_LEFT_EQUAL SHIFT_RIGHT_EQUAL
%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 '?' ':'
%left BOOLEAN_OR
%left BOOLEAN_AND
%left T_BOOLEAN_OR
%left T_BOOLEAN_AND
%left '|'
%left '^'
%left '&'
%nonassoc IS_EQUAL IS_NOT_EQUAL
%nonassoc '<' IS_SMALLER_OR_EQUAL '>' IS_GREATER_OR_EQUAL
%left SHIFT_LEFT SHIFT_RIGHT
%nonassoc T_IS_EQUAL T_IS_NOT_EQUAL T_IS_IDENTICAL
%nonassoc '<' T_IS_SMALLER_OR_EQUAL '>' T_IS_GREATER_OR_EQUAL
%left T_SL T_SR
%left '+' '-' '.'
%left '*' '/' '%'
%right '!' '~' INCREMENT DECREMENT INT_CAST DOUBLE_CAST STRING_CAST ARRAY_CAST OBJECT_CAST '@'
%right '!' '~' T_INC T_DEC T_INT_CAST T_DOUBLE_CAST T_STRING_CAST T_ARRAY_CAST T_OBJECT_CAST T_BOOL_CAST '@'
%right '['
%nonassoc NEW
%nonassoc T_NEW
%token T_EXIT
%token IF
%left ELSEIF
%left ELSE
%left ENDIF
%token LNUMBER
%token DNUMBER
%token STRING
%token VARIABLE
%token NUM_STRING
%token INLINE_HTML
%token CHARACTER
%token BAD_CHARACTER
%token ENCAPSED_AND_WHITESPACE
%token CONSTANT_ENCAPSED_STRING
%token ZEND_ECHO
%token DO
%token WHILE
%token ENDWHILE
%token FOR
%token ENDFOR
%token ZEND_FOREACH
%token T_IF
%left T_ELSEIF
%left T_ELSE
%left T_ENDIF
%token T_LNUMBER
%token T_DNUMBER
%token T_STRING
%token T_STRING_VARNAME
%token T_VARIABLE
%token T_NUM_STRING
%token T_INLINE_HTML
%token T_CHARACTER
%token T_BAD_CHARACTER
%token T_ENCAPSED_AND_WHITESPACE
%token T_CONSTANT_ENCAPSED_STRING
%token T_ECHO
%token T_DO
%token T_WHILE
%token T_ENDWHILE
%token T_FOR
%token T_ENDFOR
%token T_FOREACH
%token T_ENDFOREACH
%token ZEND_AS
%token SWITCH
%token ENDSWITCH
%token CASE
%token DEFAULT
%token BREAK
%token CONTINUE
%token CONTINUED_WHILE
%token CONTINUED_DOWHILE
%token CONTINUED_FOR
%token OLD_FUNCTION
%token FUNCTION
%token ZEND_CONST
%token RETURN
%token REQUIRE
%token ZEND_GLOBAL
%token ZEND_STATIC
%token ZEND_UNSET
%token T_AS
%token T_SWITCH
%token T_ENDSWITCH
%token T_CASE
%token T_DEFAULT
%token T_BREAK
%token T_CONTINUE
%token T_OLD_FUNCTION
%token T_FUNCTION
%token T_CONST
%token T_RETURN
%token T_REQUIRE
%token T_GLOBAL
%token T_STATIC
%token T_VAR
%token T_UNSET
%token T_ISSET
%token T_EMPTY
%token CLASS
%token EXTENDS
%token ZEND_OBJECT_OPERATOR
%token ZEND_DOUBLE_ARROW
%token ZEND_LIST
%token ZEND_ARRAY
%token VAR
%token ZEND_LINE
%token ZEND_FILE
%token ZEND_COMMENT
%token ZEND_ML_COMMENT
%token PHP_OPEN_TAG
%token PHP_OPEN_TAG_WITH_ECHO
%token PHP_CLOSE_TAG
%token T_CLASS
%token T_EXTENDS
%token T_OBJECT_OPERATOR
%token T_DOUBLE_ARROW
%token T_LIST
%token T_ARRAY
%token T_LINE
%token T_FILE
%token T_COMMENT
%token T_ML_COMMENT
%token T_OPEN_TAG
%token T_OPEN_TAG_WITH_ECHO
%token T_CLOSE_TAG
%token T_WHITESPACE
%token ZEND_HEREDOC
%token DOLLAR_OPEN_CURLY_BRACES
%token T_HEREDOC
%token T_DOLLAR_OPEN_CURLY_BRACES
%token T_CURLY_OPEN
%token T_PAAMAYIM_NEKUDOTAYIM
%token T_PHP_TRACK_VARS
%% /* Rules */
statement_list:
statement_list { do_extended_info(CLS_C); } statement { HANDLE_INTERACTIVE(); }
top_statement_list:
top_statement_list { do_extended_info(CLS_C); } top_statement { ELS_FETCH(); HANDLE_INTERACTIVE(); }
| /* empty */
;
top_statement:
statement
| declaration_statement { do_early_binding(CLS_C); }
;
inner_statement_list:
inner_statement_list { do_extended_info(CLS_C); } inner_statement { ELS_FETCH(); HANDLE_INTERACTIVE(); }
| /* empty */
;
inner_statement:
statement
| declaration_statement
;
statement:
'{' statement_list '}'
| 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); }
| IF '(' expr ')' ':' { do_if_cond(&$3, &$4 CLS_CC); } statement_list { do_if_after_statement(&$4, 1 CLS_CC); } new_elseif_list new_else_single ENDIF ';' { do_if_end(CLS_C); }
| 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); }
| DO { $1.u.opline_num = get_next_op_number(CG(active_op_array)); do_do_while_begin(CLS_C); } statement WHILE '(' expr ')' ';' { do_do_while_end(&$1, &$6 CLS_CC); }
| FOR
'{' 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_FOR
'('
for_expr
';' { do_free(&$3 CLS_CC); $4.u.opline_num = get_next_op_number(CG(active_op_array)); }
@@ -148,62 +167,65 @@ statement:
for_expr
')' { do_free(&$9 CLS_CC); do_for_before_statement(&$4, &$7 CLS_CC); }
for_statement { do_for_end(&$7 CLS_CC); }
| SWITCH '(' expr ')' { do_switch_cond(&$3 CLS_CC); } switch_case_list { do_switch_end(&$6 CLS_CC); }
| BREAK ';' { do_brk_cont(ZEND_BRK, NULL CLS_CC); }
| BREAK expr ';' { do_brk_cont(ZEND_BRK, &$2 CLS_CC); }
| CONTINUE ';' { do_brk_cont(ZEND_CONT, NULL CLS_CC); }
| CONTINUE expr ';' { do_brk_cont(ZEND_CONT, &$2 CLS_CC); }
| FUNCTION { $1.u.opline_num = CG(zend_lineno); } STRING { do_begin_function_declaration(&$1, &$3, 0 CLS_CC); }
'(' parameter_list ')' '{' statement_list '}' { do_end_function_declaration(&$1 CLS_CC); }
| OLD_FUNCTION { $1.u.opline_num = CG(zend_lineno); } STRING { do_begin_function_declaration(&$1, &$3, 0 CLS_CC); }
parameter_list '(' statement_list ')' ';' { do_end_function_declaration(&$1 CLS_CC); }
| RETURN ';' { do_return(NULL CLS_CC); }
| RETURN expr ';' { do_return(&$2 CLS_CC); }
| ZEND_GLOBAL global_var_list
| ZEND_STATIC static_var_list
| CLASS STRING { do_begin_class_declaration(&$2, NULL CLS_CC); } '{' class_statement_list '}' { do_end_class_declaration(CLS_C); }
| CLASS STRING EXTENDS STRING { do_begin_class_declaration(&$2, &$4 CLS_CC); } '{' class_statement_list '}' { do_end_class_declaration(CLS_C); }
| ZEND_ECHO echo_expr_list ';'
| INLINE_HTML { do_echo(&$1 CLS_CC); }
| T_SWITCH '(' expr ')' { do_switch_cond(&$3 CLS_CC); } switch_case_list { do_switch_end(&$6 CLS_CC); }
| T_BREAK ';' { do_brk_cont(ZEND_BRK, NULL CLS_CC); }
| 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_ECHO echo_expr_list ';'
| T_INLINE_HTML { do_echo(&$1 CLS_CC); }
| expr ';' { do_free(&$1 CLS_CC); }
| REQUIRE CONSTANT_ENCAPSED_STRING ';' { require_filename($2.u.constant.value.str.val CLS_CC); zval_dtor(&$2.u.constant); }
| REQUIRE '(' CONSTANT_ENCAPSED_STRING ')' ';' { require_filename($3.u.constant.value.str.val CLS_CC); zval_dtor(&$3.u.constant); }
| ZEND_UNSET '(' r_cvar ')' ';' { do_unset(&$3 CLS_CC); }
| ZEND_FOREACH '(' expr ZEND_AS { do_foreach_begin(&$1, &$3, &$2, &$4); } w_cvar foreach_optional_arg ')' { do_foreach_cont(&$6, &$7, &$4 CLS_CC); } foreach_statement { do_foreach_end(&$1, &$2 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_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); }
| ';' /* empty statement */
;
declaration_statement:
T_FUNCTION { $1.u.opline_num = CG(zend_lineno); } T_STRING { do_begin_function_declaration(&$1, &$3, 0 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); }
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); }
;
foreach_optional_arg:
/* empty */ { $$.op_type = IS_UNUSED; }
| ZEND_DOUBLE_ARROW w_cvar { $$ = $2; }
| T_DOUBLE_ARROW w_cvar { $$ = $2; }
;
for_statement:
statement
| ':' statement_list ENDFOR ';'
| ':' inner_statement_list T_ENDFOR ';'
;
foreach_statement:
statement
| ':' statement_list T_ENDFOREACH ';'
| ':' inner_statement_list T_ENDFOREACH ';'
;
switch_case_list:
'{' case_list '}' { $$ = $2; }
| '{' ';' case_list '}' { $$ = $3; }
| ':' case_list ENDSWITCH ';' { $$ = $2; }
| ':' ';' case_list ENDSWITCH ';' { $$ = $3; }
| ':' case_list T_ENDSWITCH ';' { $$ = $2; }
| ':' ';' case_list T_ENDSWITCH ';' { $$ = $3; }
;
case_list:
/* empty */ { $$.u.opline_num = -1; }
| case_list CASE expr case_separator { do_case_before_statement(&$1, &$2, &$3 CLS_CC); } statement_list { do_case_after_statement(&$$, &$2 CLS_CC); }
| case_list DEFAULT case_separator { do_default_before_statement(&$1, &$2 CLS_CC); } statement_list { do_case_after_statement(&$$, &$2 CLS_CC); }
| 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); }
;
@@ -215,32 +237,32 @@ case_separator:
while_statement:
statement
| ':' statement_list ENDWHILE ';'
| ':' inner_statement_list T_ENDWHILE ';'
;
elseif_list:
/* empty */
| elseif_list ELSEIF '(' expr ')' { do_if_cond(&$4, &$5 CLS_CC); } statement { do_if_after_statement(&$5, 0 CLS_CC); }
| elseif_list T_ELSEIF '(' expr ')' { do_if_cond(&$4, &$5 CLS_CC); } statement { do_if_after_statement(&$5, 0 CLS_CC); }
;
new_elseif_list:
/* empty */
| new_elseif_list ELSEIF '(' expr ')' ':' { do_if_cond(&$4, &$5 CLS_CC); } statement_list { do_if_after_statement(&$5, 0 CLS_CC); }
| new_elseif_list T_ELSEIF '(' expr ')' ':' { do_if_cond(&$4, &$5 CLS_CC); } inner_statement_list { do_if_after_statement(&$5, 0 CLS_CC); }
;
else_single:
/* empty */
| ELSE statement
| T_ELSE statement
;
new_else_single:
/* empty */
| ELSE ':' statement_list
| T_ELSE ':' inner_statement_list
;
@@ -253,27 +275,29 @@ parameter_list:
non_empty_parameter_list:
VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$1, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=0; $$.u.constant.type=IS_LONG; $$.u.constant.refcount=1; $$.u.constant.is_ref=0; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
| '&' VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$2, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=0; $$.u.constant.type=IS_LONG; $$.u.constant.refcount=1; $$.u.constant.is_ref=0; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_FORCE CLS_CC); }
| ZEND_CONST VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$2, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=0; $$.u.constant.type=IS_LONG; $$.u.constant.refcount=1; $$.u.constant.is_ref=0; do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
| VARIABLE '=' static_scalar { znode tmp; fetch_simple_variable(&tmp, &$1, 0 CLS_CC); $$.op_type = IS_CONST; $$.u.constant.value.lval=0; $$.u.constant.type=IS_LONG; $$.u.constant.refcount=1; $$.u.constant.is_ref=0; do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, &$3, BYREF_NONE CLS_CC); }
| non_empty_parameter_list ',' 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 ',' '&' 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 ',' ZEND_CONST 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 ',' 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); }
T_VARIABLE { 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, &tmp, &$$, NULL, BYREF_NONE CLS_CC); }
| '&' 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); }
;
function_call_parameter_list:
non_empty_function_call_parameter_list
| /* empty */
non_empty_function_call_parameter_list { $$ = $1; }
| /* empty */ { $$.u.constant.value.lval = 0; }
;
non_empty_function_call_parameter_list:
expr_without_variable { $$.u.constant.value.lval = 0; do_pass_param(&$1, ZEND_SEND_VAL, $$.u.constant.value.lval CLS_CC); }
| cvar { $$.u.constant.value.lval = 0; do_pass_param(&$1, ZEND_SEND_VAR, $$.u.constant.value.lval CLS_CC); }
| '&' w_cvar { $$.u.constant.value.lval = 0; do_pass_param(&$2, ZEND_SEND_REF, $$.u.constant.value.lval CLS_CC); }
expr_without_variable { $$.u.constant.value.lval = 1; do_pass_param(&$1, ZEND_SEND_VAL, $$.u.constant.value.lval CLS_CC); }
| cvar { $$.u.constant.value.lval = 1; do_pass_param(&$1, ZEND_SEND_VAR, $$.u.constant.value.lval CLS_CC); }
| '&' w_cvar { $$.u.constant.value.lval = 1; do_pass_param(&$2, ZEND_SEND_REF, $$.u.constant.value.lval CLS_CC); }
| non_empty_function_call_parameter_list ',' expr_without_variable { $$.u.constant.value.lval=$1.u.constant.value.lval+1; do_pass_param(&$3, ZEND_SEND_VAL, $$.u.constant.value.lval CLS_CC); }
| non_empty_function_call_parameter_list ',' cvar { $$.u.constant.value.lval=$1.u.constant.value.lval+1; do_pass_param(&$3, ZEND_SEND_VAR, $$.u.constant.value.lval CLS_CC); }
| non_empty_function_call_parameter_list ',' '&' w_cvar { $$.u.constant.value.lval=$1.u.constant.value.lval+1; do_pass_param(&$4, ZEND_SEND_REF, $$.u.constant.value.lval CLS_CC); }
@@ -286,17 +310,17 @@ global_var_list:
global_var:
VARIABLE { $$ = $1; }
T_VARIABLE { $$ = $1; }
| '$' r_cvar { $$ = $2; }
| '$' '{' expr '}' { $$ = $3; }
;
static_var_list:
static_var_list ',' VARIABLE { do_fetch_global_or_static_variable(&$3, NULL, ZEND_FETCH_STATIC CLS_CC); }
| static_var_list ',' VARIABLE '=' static_scalar { do_fetch_global_or_static_variable(&$3, &$5, ZEND_FETCH_STATIC CLS_CC); }
| VARIABLE { do_fetch_global_or_static_variable(&$1, NULL, ZEND_FETCH_STATIC CLS_CC); }
| VARIABLE '=' static_scalar { do_fetch_global_or_static_variable(&$1, &$3, ZEND_FETCH_STATIC CLS_CC); }
static_var_list ',' T_VARIABLE { do_fetch_global_or_static_variable(&$3, NULL, ZEND_FETCH_STATIC CLS_CC); }
| static_var_list ',' T_VARIABLE '=' static_scalar { do_fetch_global_or_static_variable(&$3, &$5, ZEND_FETCH_STATIC CLS_CC); }
| T_VARIABLE { do_fetch_global_or_static_variable(&$1, NULL, ZEND_FETCH_STATIC CLS_CC); }
| T_VARIABLE '=' static_scalar { do_fetch_global_or_static_variable(&$1, &$3, ZEND_FETCH_STATIC CLS_CC); }
;
@@ -308,25 +332,24 @@ class_statement_list:
class_statement:
VAR class_variable_decleration ';'
| FUNCTION { $1.u.opline_num = CG(zend_lineno); } STRING { do_begin_function_declaration(&$1, &$3, 1 CLS_CC); } '('
parameter_list ')' '{' statement_list '}' { do_end_function_declaration(&$1 CLS_CC); }
| OLD_FUNCTION { $1.u.opline_num = CG(zend_lineno); } STRING { do_begin_function_declaration(&$1, &$3, 1 CLS_CC); }
parameter_list '(' statement_list ')' ';' { do_end_function_declaration(&$1 CLS_CC); }
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); } '('
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); }
parameter_list '(' inner_statement_list ')' ';' { do_end_function_declaration(&$1 CLS_CC); }
;
class_variable_decleration:
class_variable_decleration ',' VARIABLE { do_declare_property(&$3, NULL CLS_CC); }
| class_variable_decleration ',' VARIABLE '=' static_scalar { do_declare_property(&$3, &$5 CLS_CC); }
| VARIABLE { do_declare_property(&$1, NULL CLS_CC); }
| VARIABLE '=' static_scalar { do_declare_property(&$1, &$3 CLS_CC); }
class_variable_decleration ',' T_VARIABLE { do_declare_property(&$3, NULL CLS_CC); }
| class_variable_decleration ',' T_VARIABLE '=' static_scalar { do_declare_property(&$3, &$5 CLS_CC); }
| T_VARIABLE { do_declare_property(&$1, NULL CLS_CC); }
| 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); }
;
@@ -334,36 +357,40 @@ echo_expr_list:
for_expr:
/* empty */ { $$.op_type = IS_CONST; $$.u.constant.type = IS_BOOL; $$.u.constant.value.lval = 1; }
| for_expr ',' expr { $$ = $3; }
| 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:
ZEND_LIST '(' { do_list_init(); } 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 '=' 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 CLS_CC); do_extended_fcall_end(CLS_C); $$ = $2;}
| rw_cvar PLUS_EQUAL expr { do_binary_assign_op(ZEND_ASSIGN_ADD, &$$, &$1, &$3 CLS_CC); }
| rw_cvar MINUS_EQUAL expr { do_binary_assign_op(ZEND_ASSIGN_SUB, &$$, &$1, &$3 CLS_CC); }
| rw_cvar MUL_EQUAL expr { do_binary_assign_op(ZEND_ASSIGN_MUL, &$$, &$1, &$3 CLS_CC); }
| rw_cvar DIV_EQUAL expr { do_binary_assign_op(ZEND_ASSIGN_DIV, &$$, &$1, &$3 CLS_CC); }
| rw_cvar CONCAT_EQUAL expr { do_binary_assign_op(ZEND_ASSIGN_CONCAT, &$$, &$1, &$3 CLS_CC); }
| rw_cvar MOD_EQUAL expr { do_binary_assign_op(ZEND_ASSIGN_MOD, &$$, &$1, &$3 CLS_CC); }
| rw_cvar AND_EQUAL expr { do_binary_assign_op(ZEND_ASSIGN_BW_AND, &$$, &$1, &$3 CLS_CC); }
| rw_cvar OR_EQUAL expr { do_binary_assign_op(ZEND_ASSIGN_BW_OR, &$$, &$1, &$3 CLS_CC); }
| rw_cvar XOR_EQUAL expr { do_binary_assign_op(ZEND_ASSIGN_BW_XOR, &$$, &$1, &$3 CLS_CC); }
| rw_cvar SHIFT_LEFT_EQUAL expr { do_binary_assign_op(ZEND_ASSIGN_SL, &$$, &$1, &$3 CLS_CC); }
| rw_cvar SHIFT_RIGHT_EQUAL expr { do_binary_assign_op(ZEND_ASSIGN_SR, &$$, &$1, &$3 CLS_CC); }
| rw_cvar INCREMENT { do_post_incdec(&$$, &$1, ZEND_POST_INC CLS_CC); }
| INCREMENT rw_cvar { do_pre_incdec(&$$, &$2, ZEND_PRE_INC CLS_CC); }
| rw_cvar DECREMENT { do_post_incdec(&$$, &$1, ZEND_POST_DEC CLS_CC); }
| DECREMENT rw_cvar { do_pre_incdec(&$$, &$2, ZEND_PRE_DEC CLS_CC); }
| expr BOOLEAN_OR { do_boolean_or_begin(&$1, &$2 CLS_CC); } expr { do_boolean_or_end(&$$, &$1, &$4, &$2 CLS_CC); }
| expr BOOLEAN_AND { do_boolean_and_begin(&$1, &$2 CLS_CC); } expr { do_boolean_and_end(&$$, &$1, &$4, &$2 CLS_CC); }
| expr LOGICAL_OR { do_boolean_or_begin(&$1, &$2 CLS_CC); } expr { do_boolean_or_end(&$$, &$1, &$4, &$2 CLS_CC); }
| expr LOGICAL_AND { do_boolean_and_begin(&$1, &$2 CLS_CC); } expr { do_boolean_and_end(&$$, &$1, &$4, &$2 CLS_CC); }
| expr LOGICAL_XOR expr { do_binary_op(ZEND_BOOL_XOR, &$$, &$1, &$3 CLS_CC); }
T_LIST '(' { do_list_init(CLS_C); } assignment_list ')' '=' expr { do_list_end(&$$, &$7 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); }
| 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 XT_OR_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); }
| T_DEC rw_cvar { do_pre_incdec(&$$, &$2, ZEND_PRE_DEC CLS_CC); }
| expr T_BOOLEAN_OR { do_boolean_or_begin(&$1, &$2 CLS_CC); } expr { do_boolean_or_end(&$$, &$1, &$4, &$2 CLS_CC); }
| expr T_BOOLEAN_AND { do_boolean_and_begin(&$1, &$2 CLS_CC); } expr { do_boolean_and_end(&$$, &$1, &$4, &$2 CLS_CC); }
| expr T_LOGICAL_OR { do_boolean_or_begin(&$1, &$2 CLS_CC); } expr { do_boolean_or_end(&$$, &$1, &$4, &$2 CLS_CC); }
| expr T_LOGICAL_AND { do_boolean_and_begin(&$1, &$2 CLS_CC); } expr { do_boolean_and_end(&$$, &$1, &$4, &$2 CLS_CC); }
| expr T_LOGICAL_XOR expr { do_binary_op(ZEND_BOOL_XOR, &$$, &$1, &$3 CLS_CC); }
| expr '|' expr { do_binary_op(ZEND_BW_OR, &$$, &$1, &$3 CLS_CC); }
| expr '&' expr { do_binary_op(ZEND_BW_AND, &$$, &$1, &$3 CLS_CC); }
| expr '^' expr { do_binary_op(ZEND_BW_XOR, &$$, &$1, &$3 CLS_CC); }
@@ -373,43 +400,45 @@ expr_without_variable:
| expr '*' expr { do_binary_op(ZEND_MUL,&$$,&$1,&$3 CLS_CC); }
| expr '/' expr { do_binary_op(ZEND_DIV,&$$,&$1,&$3 CLS_CC); }
| expr '%' expr { do_binary_op(ZEND_MOD,&$$,&$1,&$3 CLS_CC); }
| expr SHIFT_LEFT expr { do_binary_op(ZEND_SL, &$$, &$1, &$3 CLS_CC); }
| expr SHIFT_RIGHT expr { do_binary_op(ZEND_SR, &$$, &$1, &$3 CLS_CC); }
| '+' expr { $1.u.constant.value.lval=0; $1.u.constant.type=IS_LONG; $1.op_type = IS_CONST; $1.u.constant.refcount=1; do_binary_op(ZEND_ADD, &$$, &$1, &$2 CLS_CC); }
| '-' expr { $1.u.constant.value.lval=0; $1.u.constant.type=IS_LONG; $1.op_type = IS_CONST; $1.u.constant.refcount=1; do_binary_op(ZEND_SUB, &$$, &$1, &$2 CLS_CC); }
| expr T_SL expr { do_binary_op(ZEND_SL, &$$, &$1, &$3 CLS_CC); }
| expr T_SR expr { do_binary_op(ZEND_SR, &$$, &$1, &$3 CLS_CC); }
| '+' 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_ADD, &$$, &$1, &$2 CLS_CC); }
| '-' 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 IS_EQUAL expr { do_binary_op(ZEND_IS_EQUAL, &$$, &$1, &$3 CLS_CC); }
| expr IS_NOT_EQUAL expr { do_binary_op(ZEND_IS_NOT_EQUAL, &$$, &$1, &$3 CLS_CC); }
| expr T_IS_IDENTICAL expr { do_binary_op(ZEND_IS_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); }
| expr IS_SMALLER_OR_EQUAL expr { do_binary_op(ZEND_IS_SMALLER_OR_EQUAL, &$$, &$1, &$3 CLS_CC); }
| expr T_IS_SMALLER_OR_EQUAL expr { do_binary_op(ZEND_IS_SMALLER_OR_EQUAL, &$$, &$1, &$3 CLS_CC); }
| expr '>' expr { do_binary_op(ZEND_IS_SMALLER, &$$, &$3, &$1 CLS_CC); }
| expr IS_GREATER_OR_EQUAL expr { do_binary_op(ZEND_IS_SMALLER_OR_EQUAL, &$$, &$3, &$1 CLS_CC); }
| expr T_IS_GREATER_OR_EQUAL expr { do_binary_op(ZEND_IS_SMALLER_OR_EQUAL, &$$, &$3, &$1 CLS_CC); }
| '(' expr ')' { $$ = $2; }
| 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); }
| STRING '(' { do_extended_fcall_begin(CLS_C); do_begin_function_call(&$1 CLS_CC); }
| 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, &$$, 0 CLS_CC); do_extended_fcall_end(CLS_C); }
')' { 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, &$$, 0 CLS_CC); do_extended_fcall_end(CLS_C);}
| STRING T_PAAMAYIM_NEKUDOTAYIM STRING '(' { do_extended_fcall_begin(CLS_C); do_begin_class_member_function_call(&$1, &$3 CLS_CC); }
')' { 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, &$$, 1 CLS_CC); do_extended_fcall_end(CLS_C);}
')' { do_end_function_call(&$3, &$$, &$6, 1, 1 CLS_CC); do_extended_fcall_end(CLS_C);}
| internal_functions_in_yacc { $$ = $1; }
| INT_CAST expr { do_cast(&$$, &$2, IS_LONG CLS_CC); }
| DOUBLE_CAST expr { do_cast(&$$, &$2, IS_DOUBLE CLS_CC); }
| STRING_CAST expr { do_cast(&$$, &$2, IS_STRING CLS_CC); }
| ARRAY_CAST expr { do_cast(&$$, &$2, IS_ARRAY CLS_CC); }
| OBJECT_CAST expr { do_cast(&$$, &$2, IS_OBJECT CLS_CC); }
| T_INT_CAST expr { do_cast(&$$, &$2, IS_LONG CLS_CC); }
| T_DOUBLE_CAST expr { do_cast(&$$, &$2, IS_DOUBLE CLS_CC); }
| T_STRING_CAST expr { do_cast(&$$, &$2, IS_STRING CLS_CC); }
| 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_EXIT exit_expr { do_exit(&$$, &$2 CLS_CC); }
| '@' { do_begin_silence(&$1 CLS_CC); } expr { do_end_silence(&$1 CLS_CC); $$ = $3; }
| scalar { $$ = $1; }
| ZEND_ARRAY '(' array_pair_list ')' { $$ = $3; }
| T_ARRAY '(' array_pair_list ')' { $$ = $3; }
| '`' encaps_list '`' { do_shell_exec(&$$, &$2 CLS_CC); }
| ZEND_PRINT expr { do_print(&$$, &$2 CLS_CC); }
| T_PRINT expr { do_print(&$$, &$2 CLS_CC); }
;
@@ -421,56 +450,57 @@ exit_expr:
ctor_arguments:
/* empty */
| '(' function_call_parameter_list ')'
/* empty */ { $$.u.constant.value.lval=0; }
| '(' function_call_parameter_list ')' { $$ = $2; }
;
class_name:
STRING { $$ = $1; }
T_STRING { $$ = $1; }
| r_cvar { $$ = $1; }
;
common_scalar:
LNUMBER { $$=$1; }
| DNUMBER { $$=$1; }
| CONSTANT_ENCAPSED_STRING { $$ = $1; }
| ZEND_LINE { $$ = $1; }
| ZEND_FILE { $$ = $1; }
T_LNUMBER { $$=$1; }
| T_DNUMBER { $$=$1; }
| T_CONSTANT_ENCAPSED_STRING { $$ = $1; }
| T_LINE { $$ = $1; }
| T_FILE { $$ = $1; }
;
static_scalar: /* compile-time evaluated scalars */
common_scalar { $$ = $1; }
| STRING { do_fetch_constant(&$$, &$1, ZEND_CT CLS_CC); }
| 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; }
| ZEND_ARRAY '(' static_array_pair_list ')' { $$ = $3; }
| T_ARRAY '(' static_array_pair_list ')' { $$ = $3; }
;
scalar:
STRING { do_fetch_constant(&$$, &$1, ZEND_RT CLS_CC); }
T_STRING { do_fetch_constant(&$$, &$1, ZEND_RT CLS_CC); }
| T_STRING_VARNAME { $$ = $1; }
| common_scalar { $$ = $1; }
| '"' encaps_list '"' { $$ = $2; }
| '\'' encaps_list '\'' { $$ = $2; }
| ZEND_HEREDOC encaps_list ZEND_HEREDOC { $$ = $2; do_end_heredoc(CLS_C); }
| T_HEREDOC encaps_list T_HEREDOC { $$ = $2; do_end_heredoc(CLS_C); }
;
static_array_pair_list:
/* empty */ { $$.op_type = IS_CONST; $$.u.constant.refcount=1; $$.u.constant.is_ref=0; array_init(&$$.u.constant); }
/* 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:
non_empty_static_array_pair_list ',' static_scalar ZEND_DOUBLE_ARROW static_scalar { do_add_static_array_element(&$$, &$3, &$5); }
| non_empty_static_array_pair_list ',' static_scalar { do_add_static_array_element(&$$, &$3, NULL); }
| static_scalar ZEND_DOUBLE_ARROW static_scalar { $$.op_type = IS_CONST; $$.u.constant.refcount=1; $$.u.constant.is_ref=0; array_init(&$$.u.constant); do_add_static_array_element(&$$, &$1, &$3); }
| static_scalar { $$.op_type = IS_CONST; $$.u.constant.refcount=1; $$.u.constant.is_ref=0; array_init(&$$.u.constant); do_add_static_array_element(&$$, &$1, NULL); }
non_empty_static_array_pair_list ',' static_scalar T_DOUBLE_ARROW static_scalar { do_add_static_array_element(&$$, &$3, &$5); }
| non_empty_static_array_pair_list ',' static_scalar { do_add_static_array_element(&$$, NULL, &$3); }
| static_scalar T_DOUBLE_ARROW static_scalar { $$.op_type = IS_CONST; INIT_PZVAL(&$$.u.constant); array_init(&$$.u.constant); do_add_static_array_element(&$$, &$1, &$3); }
| static_scalar { $$.op_type = IS_CONST; INIT_PZVAL(&$$.u.constant); array_init(&$$.u.constant); do_add_static_array_element(&$$, NULL, &$1); }
;
expr:
@@ -481,23 +511,23 @@ expr:
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; }
;
cvar:
cvar_without_objects { $$ = $1; }
| cvar_without_objects ZEND_OBJECT_OPERATOR { do_push_object(&$1 CLS_CC); } ref_list { $$ = $4; }
| cvar_without_objects T_OBJECT_OPERATOR { do_push_object(&$1 CLS_CC); } ref_list { $$ = $4; }
;
@@ -509,19 +539,19 @@ cvar_without_objects:
reference_variable:
dim_list ']' { $$ = $1; }
| compound_variable { do_fetch_globals(&$1); do_begin_variable_parse(CLS_C); fetch_simple_variable(&$$, &$1, 1 CLS_CC); }
| compound_variable { do_fetch_globals(&$1 CLS_CC); do_begin_variable_parse(CLS_C); fetch_simple_variable(&$$, &$1, 1 CLS_CC); }
;
compound_variable:
VARIABLE { $$ = $1; }
T_VARIABLE { $$ = $1; }
| '$' '{' expr '}' { $$ = $3; }
;
dim_list:
dim_list ']' '[' dim_offset { fetch_array_dim(&$$, &$1, &$4 CLS_CC); }
| compound_variable { do_fetch_globals(&$1); do_begin_variable_parse(CLS_C); } '[' dim_offset { fetch_array_begin(&$$, &$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); }
;
@@ -533,7 +563,7 @@ dim_offset:
ref_list:
object_property { $$ = $1; }
| ref_list ZEND_OBJECT_OPERATOR { do_push_object(&$1 CLS_CC); } object_property { $$ = $4; }
| ref_list T_OBJECT_OPERATOR { do_push_object(&$1 CLS_CC); } object_property { $$ = $4; }
;
object_property:
@@ -542,15 +572,15 @@ object_property:
;
scalar_object_property:
STRING { $$ = $1; }
T_STRING { $$ = $1; }
| '{' expr '}' { $$ = $2; }
| cvar_without_objects { do_end_variable_parse(BP_VAR_R CLS_CC); $$ = $1; }
| cvar_without_objects { do_end_variable_parse(BP_VAR_R, 0 CLS_CC); $$ = $1; }
;
object_dim_list:
object_dim_list ']' '[' expr { fetch_array_dim(&$$, &$1, &$4 CLS_CC); }
| STRING { znode tmp_znode, res; do_pop_object(&tmp_znode CLS_CC); do_fetch_property(&res, &tmp_znode, &$1 CLS_CC); $1 = res; } '[' expr { fetch_array_dim(&$$, &$1, &$4 CLS_CC); }
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); }
;
@@ -567,64 +597,67 @@ assignment_list:
assignment_list_element:
w_cvar { do_add_list_element(&$1 CLS_CC); }
| ZEND_LIST '(' { do_new_list_begin(CLS_C); } assignment_list ')' { do_new_list_end(CLS_C); }
| 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); }
/* empty */ { do_init_array(&$$, NULL, NULL, 0 CLS_CC); }
| non_empty_array_pair_list { $$ = $1; }
;
non_empty_array_pair_list:
non_empty_array_pair_list ',' expr ZEND_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 ZEND_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 STRING { do_add_string(&$$, &$1, &$2 CLS_CC); }
| encaps_list NUM_STRING { do_add_string(&$$, &$1, &$2 CLS_CC); }
| encaps_list ENCAPSED_AND_WHITESPACE { do_add_string(&$$, &$1, &$2 CLS_CC); }
| encaps_list CHARACTER { do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list BAD_CHARACTER { do_add_char(&$$, &$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 ZEND_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); }
| /* empty */ { do_init_string(&$$); }
| 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); }
| /* empty */ { do_init_string(&$$ CLS_CC); }
;
encaps_var:
VARIABLE { do_fetch_globals(&$1); do_begin_variable_parse(CLS_C); fetch_simple_variable(&$$, &$1, 1 CLS_CC); }
| VARIABLE '[' encaps_var_offset ']' { do_fetch_globals(&$1); do_begin_variable_parse(CLS_C); fetch_array_begin(&$$, &$1, &$3 CLS_CC); }
| VARIABLE ZEND_OBJECT_OPERATOR STRING { do_begin_variable_parse(CLS_C); fetch_simple_variable(&$2, &$1, 1 CLS_CC); do_fetch_property(&$$, &$2, &$3 CLS_CC); }
| DOLLAR_OPEN_CURLY_BRACES expr '}' { do_begin_variable_parse(CLS_C); fetch_simple_variable(&$$, &$2, 1 CLS_CC); }
| DOLLAR_OPEN_CURLY_BRACES STRING '[' expr ']' '}' { do_begin_variable_parse(CLS_C); fetch_array_begin(&$$, &$2, &$4 CLS_CC); }
T_VARIABLE { do_fetch_globals(&$1 CLS_CC); do_begin_variable_parse(CLS_C); fetch_simple_variable(&$$, &$1, 1 CLS_CC); }
| T_VARIABLE '[' { do_begin_variable_parse(CLS_C); } encaps_var_offset ']' { do_fetch_globals(&$1 CLS_CC); fetch_array_begin(&$$, &$1, &$4 CLS_CC); }
| T_VARIABLE T_OBJECT_OPERATOR T_STRING { do_begin_variable_parse(CLS_C); fetch_simple_variable(&$2, &$1, 1 CLS_CC); do_fetch_property(&$$, &$2, &$3 CLS_CC); }
| T_DOLLAR_OPEN_CURLY_BRACES expr '}' { do_begin_variable_parse(CLS_C); fetch_simple_variable(&$$, &$2, 1 CLS_CC); }
| T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '[' expr ']' '}' { do_begin_variable_parse(CLS_C); fetch_array_begin(&$$, &$2, &$4 CLS_CC); }
| T_CURLY_OPEN cvar '}' { $$ = $2; }
;
encaps_var_offset:
STRING { $$ = $1; }
| NUM_STRING { $$ = $1; }
| { do_begin_variable_parse(CLS_C); } VARIABLE { fetch_simple_variable(&$$, &$2, 1 CLS_CC); }
T_STRING { $$ = $1; }
| T_NUM_STRING { $$ = $1; }
| T_VARIABLE { fetch_simple_variable(&$$, &$1, 1 CLS_CC); }
;
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); }
| INCLUDE expr { do_include_or_eval(ZEND_INCLUDE, &$$, &$2 CLS_CC); }
| EVAL '(' expr ')' { do_include_or_eval(ZEND_EVAL, &$$, &$3 CLS_CC); }
| T_INCLUDE expr { do_include_or_eval(ZEND_INCLUDE, &$$, &$2 CLS_CC); }
| T_EVAL '(' expr ')' { do_include_or_eval(ZEND_EVAL, &$$, &$3 CLS_CC); }
;
+28 -5
View File
@@ -4,20 +4,37 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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 _LANGUAGE_SCANNER_H
#define _LANGUAGE_SCANNER_H
typedef struct {
#ifdef ZTS
class ZendFlexLexer : public yyFlexLexer
{
public:
virtual ~ZendFlexLexer();
int lex_scan(zval *zendlval CLS_DC);
void BeginState(int state);
};
#endif /* ZTS */
#ifndef ZTS
typedef struct _zend_lex_state {
YY_BUFFER_STATE buffer_state;
int state;
uint return_offset;
@@ -25,5 +42,11 @@ typedef struct {
FILE *in;
char *filename;
} zend_lex_state;
#else
typedef struct _zend_lex_state {
ZendFlexLexer *ZFL;
istream *input_file;
} zend_lex_state;
#endif
#endif
+640 -339
View File
File diff suppressed because it is too large. Load diff
+235 -56
View File
@@ -4,10 +4,13 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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> |
@@ -22,16 +25,38 @@
#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
# define GLOBAL_CLASS_TABLE global_class_table
# define GLOBAL_CONSTANTS_TABLE global_constants_table
#else
# define GLOBAL_FUNCTION_TABLE CG(function_table)
# define GLOBAL_CLASS_TABLE CG(class_table)
# define GLOBAL_CONSTANTS_TABLE CG(zend_constants)
#endif
/* true multithread-shared globals */
zend_class_entry standard_class;
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 void (*zend_message_dispatcher)(long message, void *data);
ZEND_API FILE *(*zend_fopen)(const char *filename);
ZEND_API void (*zend_block_interruptions)();
ZEND_API void (*zend_unblock_interruptions)();
ZEND_API int (*zend_get_ini_entry)(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;
HashTable *global_function_table;
HashTable *global_class_table;
HashTable *global_constants_table;
#endif
zend_utility_values zend_uv;
@@ -64,6 +89,7 @@ static void print_hash(HashTable *ht, int indent)
switch (zend_hash_get_current_key(ht, &string_key, &num_key)) {
case HASH_KEY_IS_STRING:
ZEND_PUTS(string_key);
efree(string_key);
break;
case HASH_KEY_IS_LONG:
zend_printf("%ld",num_key);
@@ -81,38 +107,83 @@ static void print_hash(HashTable *ht, int indent)
ZEND_PUTS(")\n");
}
ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_copy)
{
if (expr->type==IS_STRING) {
*use_copy = 0;
return;
}
switch (expr->type) {
case IS_BOOL:
#if 1
if (expr->value.lval) {
expr_copy->value.str.len = 1;
expr_copy->value.str.val = estrndup("1", 1);
} else {
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);
expr_copy->value.str.len = sprintf(expr_copy->value.str.val, "Resource id #%ld", expr->value.lval);
break;
case IS_ARRAY:
expr_copy->value.str.len = sizeof("Array")-1;
expr_copy->value.str.val = estrndup("Array", expr_copy->value.str.len);
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;
if (call_user_function(NULL, expr, &function_name, expr_copy, 0, NULL)==FAILURE) {
expr_copy->value.str.len = sizeof("Object")-1;
expr_copy->value.str.val = estrndup("Object", expr_copy->value.str.len);
}
efree(function_name.value.str.val);
}
break;
default:
*expr_copy = *expr;
zval_copy_ctor(expr_copy);
convert_to_string(expr_copy);
break;
}
expr_copy->type = IS_STRING;
*use_copy = 1;
}
ZEND_API int zend_print_zval(zval *expr, int indent)
{
zval expr_copy;
int destroy=0;
int use_copy;
if (expr->type != IS_STRING) {
if (expr->type == IS_BOOL) {
if (expr->value.lval) {
expr_copy.value.str.val = estrndup("true",4);
expr_copy.value.str.len = 4;
} else {
expr_copy.value.str.val = estrndup("false",5);
expr_copy.value.str.len = 5;
}
expr_copy.type = IS_STRING;
} else if (expr->type == IS_RESOURCE) {
expr_copy.value.str.val = (char *) emalloc(sizeof("Resource id #")-1 + MAX_LENGTH_OF_LONG);
expr_copy.value.str.len = sprintf(expr_copy.value.str.val, "Resource id #%ld", expr->value.lval);
expr_copy.type = IS_STRING;
} else {
expr_copy = *expr;
zval_copy_ctor(&expr_copy);
convert_to_string(&expr_copy);
}
zend_make_printable_zval(expr, &expr_copy, &use_copy);
if (use_copy) {
expr = &expr_copy;
destroy=1;
}
if (expr->value.str.len==0) { /* optimize away empty strings */
if (use_copy) {
zval_dtor(expr);
}
return 0;
}
ZEND_WRITE(expr->value.str.val,expr->value.str.len);
if (destroy) {
if (use_copy) {
zval_dtor(expr);
}
return expr->value.str.len;
@@ -145,22 +216,85 @@ static FILE *zend_fopen_wrapper(const char *filename)
static void register_standard_class()
{
standard_class.type = ZEND_INTERNAL_CLASS;
standard_class.name_length = sizeof("stdClass") - 1;
standard_class.name = zend_strndup("stdClass", standard_class.name_length);
standard_class.parent = NULL;
zend_hash_init(&standard_class.default_properties, 0, NULL, PVAL_PTR_DTOR, 1);
zend_hash_init(&standard_class.function_table, 0, NULL, (void (*)(void *)) destroy_zend_function, 1);
standard_class.handle_function_call = NULL;
standard_class.handle_property_get = NULL;
standard_class.handle_property_set = NULL;
zend_hash_add(CG(class_table), "stdClass", sizeof("stdClass"), &standard_class, sizeof(zend_class_entry), NULL);
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.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);
}
#ifdef ZTS
static void compiler_globals_ctor(zend_compiler_globals *compiler_globals)
{
zend_function tmp_func;
zend_class_entry tmp_class;
compiler_globals->function_table = (HashTable *) malloc(sizeof(HashTable));
zend_hash_init(compiler_globals->function_table, 100, NULL, ZEND_FUNCTION_DTOR, 1);
zend_hash_copy(compiler_globals->function_table, global_function_table, NULL, &tmp_func, sizeof(zend_function));
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));
}
static void compiler_globals_dtor(zend_compiler_globals *compiler_globals)
{
if (compiler_globals->function_table != global_function_table) {
zend_hash_destroy(compiler_globals->function_table);
free(compiler_globals->function_table);
}
if (compiler_globals->class_table != global_class_table) {
zend_hash_destroy(compiler_globals->class_table);
free(compiler_globals->class_table);
}
}
static void executor_globals_ctor(zend_executor_globals *executor_globals)
{
if (global_constants_table) {
zend_startup_constants(ELS_C);
zend_copy_constants(executor_globals->zend_constants, global_constants_table);
}
init_resource_plist(ELS_C);
}
static void executor_globals_dtor(zend_executor_globals *executor_globals)
{
zend_shutdown_constants(ELS_C);
destroy_resource_plist();
}
static void alloc_globals_ctor(zend_alloc_globals *alloc_globals)
{
start_memory_manager(ALS_C);
}
#endif
int zend_startup(zend_utility_functions *utility_functions, char **extensions)
{
start_memory_manager();
#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);
#else
start_memory_manager(ALS_C);
#endif
/* Set up utility functions and values */
zend_error = utility_functions->error_function;
@@ -173,6 +307,8 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions)
zend_message_dispatcher = 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_compile_files = compile_files;
zend_execute = execute;
@@ -182,33 +318,56 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions)
zend_version_info = strdup(ZEND_CORE_VERSION_INFO);
zend_version_info_length = sizeof(ZEND_CORE_VERSION_INFO)-1;
/* Prepare data structures */
zend_startup_constants();
CG(function_table) = (HashTable *) malloc(sizeof(HashTable));
CG(class_table) = (HashTable *) malloc(sizeof(HashTable));
zend_hash_init(CG(function_table), 100, NULL, (void (*)(void *)) destroy_zend_function, 1);
zend_hash_init(CG(class_table), 10, NULL, (void (*)(void *)) destroy_zend_class, 1);
GLOBAL_FUNCTION_TABLE = (HashTable *) malloc(sizeof(HashTable));
GLOBAL_CLASS_TABLE = (HashTable *) malloc(sizeof(HashTable));
zend_hash_init(GLOBAL_FUNCTION_TABLE, 100, NULL, ZEND_FUNCTION_DTOR, 1);
zend_hash_init(GLOBAL_CLASS_TABLE, 10, NULL, ZEND_CLASS_DTOR, 1);
register_standard_class();
zend_hash_init(&module_registry, 50, NULL, (void (*)(void *)) module_destructor, 1);
init_resource_plist();
zend_hash_init(&module_registry, 50, NULL, ZEND_MODULE_DTOR, 1);
zend_hash_init(&list_destructors, 50, NULL, NULL, 1);
#ifdef ZTS
global_constants_table = NULL;
compiler_globals_id = ts_allocate_id(sizeof(zend_compiler_globals), (void (*)(void *)) compiler_globals_ctor, (void (*)(void *)) compiler_globals_dtor);
executor_globals_id = ts_allocate_id(sizeof(zend_executor_globals), (void (*)(void *)) executor_globals_ctor, (void (*)(void *)) executor_globals_dtor);
compiler_globals = ts_resource(compiler_globals_id);
executor_globals = ts_resource(executor_globals_id);
compiler_globals_dtor(compiler_globals);
compiler_globals->function_table = GLOBAL_FUNCTION_TABLE;
compiler_globals->class_table = GLOBAL_CLASS_TABLE;
zend_startup_constants(executor_globals);
GLOBAL_CONSTANTS_TABLE = EG(zend_constants);
#else
zend_startup_constants();
#endif
zend_register_standard_constants(ELS_C);
#ifndef ZTS
init_resource_plist(ELS_C);
#endif
zend_startup_builtin_functions();
return SUCCESS;
}
void zend_shutdown()
{
#ifndef ZTS
destroy_resource_plist();
#endif
zend_hash_destroy(&list_destructors);
zend_hash_destroy(&module_registry);
zend_hash_destroy(CG(function_table));
free(CG(function_table));
zend_hash_destroy(CG(class_table));
free(CG(class_table));
zend_llist_destroy(&zend_extensions);
zend_hash_destroy(GLOBAL_FUNCTION_TABLE);
free(GLOBAL_FUNCTION_TABLE);
zend_hash_destroy(GLOBAL_CLASS_TABLE);
free(GLOBAL_CLASS_TABLE);
zend_shutdown_extensions();
free(zend_version_info);
zend_shutdown_constants();
#ifndef ZTS
zend_shutdown_constants(ELS_C);
#endif
}
@@ -225,12 +384,16 @@ void zenderror(char *error)
}
BEGIN_EXTERN_C()
ZEND_API void zend_bailout()
{
CLS_FETCH();
ELS_FETCH();
CG(unclean_shutdown) = 1;
longjmp(EG(bailout), FAILURE);
}
END_EXTERN_C()
void zend_append_version_info(zend_extension *extension)
@@ -259,3 +422,19 @@ ZEND_API char *get_zend_version()
{
return zend_version_info;
}
void zend_activate(CLS_D ELS_DC)
{
init_compiler(CLS_C ELS_CC);
init_executor(CLS_C ELS_CC);
startup_scanner(CLS_C);
}
void zend_deactivate(CLS_D ELS_DC)
{
zend_hash_apply(&module_registry, (int (*)(void *)) module_registry_cleanup);
shutdown_scanner(CLS_C);
shutdown_executor(ELS_C);
shutdown_compiler(CLS_C);
}
+122 -29
View File
@@ -4,20 +4,32 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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_H
#define _ZEND_H
#define ZEND_VERSION "0.80A"
#define ZEND_VERSION "0.90"
#ifdef __cplusplus
#define BEGIN_EXTERN_C() extern "C" {
#define END_EXTERN_C() }
#else
#define BEGIN_EXTERN_C()
#define END_EXTERN_C()
#endif
#include <stdio.h>
@@ -25,29 +37,67 @@
* general definitions
*/
#if WINNT||WIN32
#include "config.w32.h"
#if (defined(WINNT) && WINNT) || (defined(WIN32) && WIN32)
# include "zend_config.w32.h"
#else
#include "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
#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 */
#include "zend_errors.h"
#include "zend_alloc.h"
typedef unsigned char zend_bool;
#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 HashTable *ht, zval *return_value, HashTable *list, HashTable *plist
#define INTERNAL_FUNCTION_PARAM_PASSTHRU ht, return_value, list, plist
#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
/*
* zval
@@ -55,7 +105,7 @@
typedef struct _zval_struct zval;
typedef struct _zend_class_entry zend_class_entry;
typedef union {
typedef union _zvalue_value {
long lval; /* long value */
double dval; /* double value */
struct {
@@ -81,35 +131,39 @@ struct _zval_struct {
typedef struct {
typedef struct _zend_function_entry {
char *fname;
void (*handler)(INTERNAL_FUNCTION_PARAMETERS);
unsigned char *func_arg_types;
} function_entry;
} zend_function_entry;
typedef struct {
typedef struct _zend_property_reference {
int type; /* read, write or r/w */
zval **object;
zval *object;
zend_llist elements_list;
} zend_property_reference;
typedef struct {
typedef struct _zend_overloaded_element {
int type; /* array offset or object proprety */
zval element;
} zend_overloaded_element;
/* excpt.h on Digital Unix 4.0 defines function_table */
#undef function_table
struct _zend_class_entry {
char type;
char *name;
uint name_length;
struct _zend_class_entry *parent;
int *refcount;
HashTable function_table;
HashTable default_properties;
zend_function_entry *builtin_functions;
/* handlers */
void (*handle_function_call)(INTERNAL_FUNCTION_PARAMETERS, zend_property_reference *property_reference);
@@ -119,7 +173,7 @@ struct _zend_class_entry {
typedef struct {
typedef struct _zend_utility_functions {
void (*error_function)(int type, const char *format, ...);
int (*printf_function)(const char *format, ...);
int (*write_function)(const char *str, uint str_length);
@@ -127,10 +181,11 @@ typedef struct {
void (*message_handler)(long message, void *data);
void (*block_interruptions)();
void (*unblock_interruptions)();
int (*get_ini_entry)(char *name, uint name_length, zval *contents);
} zend_utility_functions;
typedef struct {
typedef struct _zend_utility_values {
unsigned char short_tags;
unsigned char asp_tags;
} zend_utility_values;
@@ -155,10 +210,14 @@ typedef struct {
int zend_startup(zend_utility_functions *utility_functions, char **extensions);
void zend_shutdown();
void zend_set_utility_values(zend_utility_values *utility_values);
BEGIN_EXTERN_C()
ZEND_API void zend_bailout();
END_EXTERN_C()
ZEND_API char *get_zend_version();
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 void zend_print_zval_r(zval *expr, int indent);
@@ -166,25 +225,28 @@ 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_REL(ptr) if (ptr && ptr!=empty_string && ptr!=undefined_variable_string) { efree_rel(ptr); }
/* 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_message_dispatcher)(long message, void *data);
extern void (*zend_block_interruptions)();
extern void (*zend_unblock_interruptions)();
extern ZEND_API FILE *(*zend_fopen)(const char *filename);
extern ZEND_API void (*zend_block_interruptions)();
extern ZEND_API void (*zend_unblock_interruptions)();
extern ZEND_API 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()
void zenderror(char *error);
extern zend_class_entry standard_class;
extern ZEND_API zend_class_entry zend_standard_class_def;
extern zend_utility_values zend_uv;
#define ZEND_UV(name) (zend_uv.name)
@@ -194,13 +256,44 @@ extern zend_utility_values zend_uv;
#define HANDLE_UNBLOCK_INTERRUPTIONS() if (zend_unblock_interruptions) { zend_unblock_interruptions(); }
/* 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 INIT_PZVAL(z) \
(z)->refcount = 1; \
(z)->is_ref = 0;
#define MAKE_STD_ZVAL(zv) \
zv = (zval *) emalloc(sizeof(zval)); \
INIT_PZVAL(zv);
#define SEPARATE_ZVAL(ppzv) \
{ \
zval *orig_ptr = *(ppzv); \
\
if (orig_ptr->refcount>1) { \
orig_ptr->refcount--; \
*(ppzv) = (zval *) emalloc(sizeof(zval)); \
**(ppzv) = *orig_ptr; \
zval_copy_ctor(*(ppzv)); \
(*(ppzv))->refcount=1; \
(*(ppzv))->is_ref = 0; \
} \
}
#define ZEND_MAX_RESERVED_RESOURCES 1
#endif /* _ZEND_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
+294 -148
View File
@@ -4,16 +4,20 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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_variables.h"
#include "zend_execute.h"
@@ -22,8 +26,8 @@
#include "zend_constants.h"
#include "zend_operators.h"
#if HAVE_STDARG_H
#include <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 */
@@ -31,89 +35,149 @@ static int module_count=0;
HashTable list_destructors, module_registry;
/* this function doesn't check for too many parameters */
int getParameters(HashTable *ht, int param_count,...)
ZEND_API int getParameters(int ht, int param_count,...)
{
void **p;
int arg_count;
va_list ptr;
zval **param, **tmp = NULL, *param_ptr;
int i;
zval **param, *param_ptr;
ELS_FETCH();
ALS_FETCH();
va_start(ptr, param_count);
p = EG(argument_stack).top_element-1;
arg_count = (ulong) *p;
for (i = 0; i < param_count; i++) {
param = va_arg(ptr, zval **);
if (zend_hash_index_find(ht, i, (void **) &tmp) == FAILURE) {
va_end(ptr);
return FAILURE;
}
param_ptr = *tmp;
if (!param_ptr->is_ref && param_ptr->refcount>1) {
zval *new_tmp;
new_tmp = (zval *) emalloc(sizeof(zval));
*new_tmp = *param_ptr;
zval_copy_ctor(new_tmp);
new_tmp->refcount = 1;
new_tmp->is_ref = 0;
param_ptr = new_tmp;
zend_hash_index_update(ht, i, &param_ptr, sizeof(zval *), NULL);
}
*param = param_ptr;
}
va_end(ptr);
return SUCCESS;
}
int getParametersArray(HashTable *ht, int param_count, zval **argument_array)
{
int i;
zval **tmp = NULL, *param_ptr;
for (i = 0; i < param_count; i++) {
if (zend_hash_index_find(ht, i, (void **) &tmp) == FAILURE) {
return FAILURE;
}
param_ptr = *tmp;
if (!param_ptr->is_ref && param_ptr->refcount>1) {
zval *new_tmp;
new_tmp = (zval *) emalloc(sizeof(zval));
*new_tmp = *param_ptr;
zval_copy_ctor(new_tmp);
new_tmp->refcount = 1;
new_tmp->is_ref = 0;
param_ptr = new_tmp;
zend_hash_index_update(ht, i, &param_ptr, sizeof(zval *), NULL);
}
argument_array[i] = param_ptr;
}
return SUCCESS;
}
int getThis(zval **this)
{
/* NEEDS TO BE IMPLEMENTED FOR ZEND */
/*
zval *data;
if (zend_hash_find(GLOBAL(function_state.calling_symbol_table), "this", sizeof("this"), (void **)&data) == FAILURE) {
if (param_count>arg_count) {
return FAILURE;
}
*this = data;
*/
va_start(ptr, param_count);
while (param_count>0) {
param = va_arg(ptr, zval **);
param_ptr = *(p-param_count);
if (!PZVAL_IS_REF(param_ptr) && param_ptr->refcount>1) {
zval *new_tmp;
new_tmp = (zval *) emalloc(sizeof(zval));
*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;
}
*param = param_ptr;
param_count--;
}
va_end(ptr);
return SUCCESS;
}
int ParameterPassedByReference(HashTable *ht, uint n)
{
zval **tmp;
if (zend_hash_index_find(ht, n-1, (void **) &tmp) == FAILURE) {
return 0;
ZEND_API int getParametersArray(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;
arg_count = (ulong) *p;
if (param_count>arg_count) {
return FAILURE;
}
return (*tmp)->is_ref;
while (param_count>0) {
param_ptr = *(p-param_count);
if (!PZVAL_IS_REF(param_ptr) && param_ptr->refcount>1) {
zval *new_tmp;
new_tmp = (zval *) emalloc(sizeof(zval));
*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;
}
*(argument_array++) = param_ptr;
param_count--;
}
return SUCCESS;
}
/* Zend-optimized Extended functions */
/* this function doesn't check for too many parameters */
ZEND_API int getParametersEx(int param_count,...)
{
void **p;
int arg_count;
va_list ptr;
zval ***param;
ELS_FETCH();
p = EG(argument_stack).top_element-1;
arg_count = (ulong) *p;
if (param_count>arg_count) {
return FAILURE;
}
va_start(ptr, param_count);
while (param_count>0) {
param = va_arg(ptr, zval ***);
*param = (zval **) p-(param_count--);
}
va_end(ptr);
return SUCCESS;
}
ZEND_API int getParametersArrayEx(int param_count, zval ***argument_array)
{
void **p;
int arg_count;
ELS_FETCH();
p = EG(argument_stack).top_element-1;
arg_count = (ulong) *p;
if (param_count>arg_count) {
return FAILURE;
}
while (param_count>0) {
*(argument_array++) = (zval **) p-(param_count--);
}
return SUCCESS;
}
ZEND_API int ParameterPassedByReference(int ht, uint n)
{
void **p;
ulong arg_count;
zval *arg;
ELS_FETCH();
p = EG(argument_stack).elements+EG(argument_stack).top-1;
arg_count = (ulong) *p;
if (n>arg_count) {
return FAILURE;
}
arg = (zval *) *(p-arg_count+n-1);
return PZVAL_IS_REF(arg);
}
@@ -158,7 +222,14 @@ ZEND_API inline int object_init_ex(zval *arg, zend_class_entry *class_type)
ZEND_API inline int object_init(zval *arg)
{
return object_init_ex(arg, &standard_class);
return object_init_ex(arg, &zend_standard_class_def);
}
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;
}
@@ -168,8 +239,29 @@ ZEND_API inline int add_assoc_long(zval *arg, char *key, long n)
tmp->type = IS_LONG;
tmp->value.lval = n;
tmp->refcount=1;
tmp->is_ref=0;
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 = (zval *) emalloc(sizeof(zval));
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 = (zval *) emalloc(sizeof(zval));
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);
}
@@ -180,8 +272,7 @@ ZEND_API inline int add_assoc_double(zval *arg, char *key, double d)
tmp->type = IS_DOUBLE;
tmp->value.dval = d;
tmp->refcount=1;
tmp->is_ref=0;
INIT_PZVAL(tmp);
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
@@ -197,8 +288,7 @@ ZEND_API inline int add_assoc_string(zval *arg, char *key, char *str, int duplic
} else {
tmp->value.str.val = str;
}
tmp->refcount=1;
tmp->is_ref=0;
INIT_PZVAL(tmp);
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
@@ -214,27 +304,40 @@ ZEND_API inline int add_assoc_stringl(zval *arg, char *key, char *str, uint leng
} else {
tmp->value.str.val = str;
}
tmp->refcount=1;
tmp->is_ref=0;
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_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));
tmp->type = IS_LONG;
tmp->value.lval = n;
tmp->refcount=1;
tmp->is_ref=0;
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 = (zval *) emalloc(sizeof(zval));
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 = (zval *) emalloc(sizeof(zval));
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);
}
@@ -245,8 +348,7 @@ ZEND_API inline int add_index_double(zval *arg, uint index, double d)
tmp->type = IS_DOUBLE;
tmp->value.dval = d;
tmp->refcount=1;
tmp->is_ref=0;
INIT_PZVAL(tmp);
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),NULL);
}
@@ -262,9 +364,8 @@ ZEND_API inline int add_index_string(zval *arg, uint index, char *str, int dupli
} else {
tmp->value.str.val = str;
}
tmp->refcount=1;
tmp->is_ref=0;
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),NULL);
INIT_PZVAL(tmp);
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *), NULL);
}
@@ -279,8 +380,7 @@ ZEND_API inline int add_index_stringl(zval *arg, uint index, char *str, uint len
} else {
tmp->value.str.val = str;
}
tmp->refcount=1;
tmp->is_ref=0;
INIT_PZVAL(tmp);
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),NULL);
}
@@ -291,8 +391,29 @@ ZEND_API inline int add_next_index_long(zval *arg, long n)
tmp->type = IS_LONG;
tmp->value.lval = n;
tmp->refcount=1;
tmp->is_ref=0;
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 = (zval *) emalloc(sizeof(zval));
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 = (zval *) emalloc(sizeof(zval));
tmp->type = IS_RESOURCE;
tmp->value.lval = r;
INIT_PZVAL(tmp);
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *), NULL);
}
@@ -303,8 +424,7 @@ ZEND_API inline int add_next_index_double(zval *arg, double d)
tmp->type = IS_DOUBLE;
tmp->value.dval = d;
tmp->refcount=1;
tmp->is_ref=0;
INIT_PZVAL(tmp);
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *), NULL);
}
@@ -320,8 +440,7 @@ ZEND_API inline int add_next_index_string(zval *arg, char *str, int duplicate)
} else {
tmp->value.str.val = str;
}
tmp->refcount=1;
tmp->is_ref=0;
INIT_PZVAL(tmp);
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *),NULL);
}
@@ -337,8 +456,7 @@ ZEND_API inline int add_next_index_stringl(zval *arg, char *str, uint length, in
} else {
tmp->value.str.val = str;
}
tmp->refcount=1;
tmp->is_ref=0;
INIT_PZVAL(tmp);
return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *),NULL);
}
@@ -354,8 +472,7 @@ ZEND_API inline int add_get_assoc_string(zval *arg, char *key, char *str, void *
} else {
tmp->value.str.val = str;
}
tmp->refcount=1;
tmp->is_ref=0;
INIT_PZVAL(tmp);
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), dest);
}
@@ -371,8 +488,7 @@ ZEND_API inline int add_get_assoc_stringl(zval *arg, char *key, char *str, uint
} else {
tmp->value.str.val = str;
}
tmp->refcount=1;
tmp->is_ref=0;
INIT_PZVAL(tmp);
return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), dest);
}
@@ -382,9 +498,8 @@ ZEND_API inline int add_get_index_long(zval *arg, uint index, long l, void **des
zval *tmp = (zval *) emalloc(sizeof(zval));
tmp->type = IS_LONG;
tmp->value.lval= l;
tmp->refcount=1;
tmp->is_ref=0;
tmp->value.lval = l;
INIT_PZVAL(tmp);
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),dest);
}
@@ -395,8 +510,7 @@ ZEND_API inline int add_get_index_double(zval *arg, uint index, double d, void *
tmp->type = IS_DOUBLE;
tmp->value.dval= d;
tmp->refcount=1;
tmp->is_ref=0;
INIT_PZVAL(tmp);
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),dest);
}
@@ -412,8 +526,7 @@ ZEND_API inline int add_get_index_string(zval *arg, uint index, char *str, void
} else {
tmp->value.str.val = str;
}
tmp->refcount=1;
tmp->is_ref=0;
INIT_PZVAL(tmp);
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),dest);
}
@@ -429,8 +542,7 @@ ZEND_API inline int add_get_index_stringl(zval *arg, uint index, char *str, uint
} else {
tmp->value.str.val = str;
}
tmp->refcount=1;
tmp->is_ref=0;
INIT_PZVAL(tmp);
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),dest);
}
@@ -441,8 +553,17 @@ ZEND_API inline int add_property_long(zval *arg, char *key, long n)
tmp->type = IS_LONG;
tmp->value.lval = n;
tmp->refcount=1;
tmp->is_ref=0;
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 = (zval *) emalloc(sizeof(zval));
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);
}
@@ -453,8 +574,7 @@ ZEND_API inline int add_property_double(zval *arg, char *key, double d)
tmp->type = IS_DOUBLE;
tmp->value.dval = d;
tmp->refcount=1;
tmp->is_ref=0;
INIT_PZVAL(tmp);
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
@@ -470,8 +590,7 @@ ZEND_API inline int add_property_string(zval *arg, char *key, char *str, int dup
} else {
tmp->value.str.val = str;
}
tmp->refcount=1;
tmp->is_ref=0;
INIT_PZVAL(tmp);
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
@@ -487,8 +606,7 @@ ZEND_API inline int add_property_stringl(zval *arg, char *key, char *str, uint l
} else {
tmp->value.str.val = str;
}
tmp->refcount=1;
tmp->is_ref=0;
INIT_PZVAL(tmp);
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
@@ -504,7 +622,7 @@ int zend_startup_module(zend_module_entry *module)
}
}
module->type = MODULE_PERSISTENT;
register_module(module);
zend_register_module(module);
}
return SUCCESS;
}
@@ -531,13 +649,17 @@ ZEND_API int _register_list_destructors(void (*list_destructor)(void *), void (*
/* registers all functions in *library_functions in the function hash */
int register_functions(function_entry *functions)
int zend_register_functions(zend_function_entry *functions, HashTable *function_table)
{
function_entry *ptr = functions;
zend_function_entry *ptr = functions;
zend_internal_function internal_function;
int count=0,unload=0;
HashTable *target_function_table = function_table;
CLS_FETCH();
if (!target_function_table) {
target_function_table = CG(function_table);
}
internal_function.type = ZEND_INTERNAL_FUNCTION;
while (ptr->fname) {
@@ -546,10 +668,10 @@ int register_functions(function_entry *functions)
internal_function.function_name = ptr->fname;
if (!internal_function.handler) {
zend_error(E_CORE_WARNING,"Null function defined as active function");
unregister_functions(functions,count);
zend_unregister_functions(functions, count, target_function_table);
return FAILURE;
}
if (zend_hash_add(CG(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, &internal_function, sizeof(zend_internal_function), NULL) == FAILURE) {
unload=1;
break;
}
@@ -558,12 +680,12 @@ int register_functions(function_entry *functions)
}
if (unload) { /* before unloading, display all remaining bad function in the module */
while (ptr->fname) {
if (zend_hash_exists(CG(function_table), ptr->fname, strlen(ptr->fname)+1)) {
zend_error(E_CORE_WARNING,"Module load failed - duplicate function name - %s",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);
}
ptr++;
}
unregister_functions(functions,count);
zend_unregister_functions(functions, count, target_function_table);
return FAILURE;
}
return SUCCESS;
@@ -572,32 +694,36 @@ int register_functions(function_entry *functions)
/* count=-1 means erase all functions, otherwise,
* erase the first count functions
*/
void unregister_functions(function_entry *functions,int count)
void zend_unregister_functions(zend_function_entry *functions, int count, HashTable *function_table)
{
function_entry *ptr = functions;
zend_function_entry *ptr = functions;
int i=0;
HashTable *target_function_table = function_table;
CLS_FETCH();
if (!target_function_table) {
target_function_table = CG(function_table);
}
while (ptr->fname) {
if (count!=-1 && i>=count) {
break;
}
#if 0
zend_printf("Unregistering %s()\n",ptr->fname);
zend_printf("Unregistering %s()\n", ptr->fname);
#endif
zend_hash_del(CG(function_table),ptr->fname,strlen(ptr->fname)+1);
zend_hash_del(target_function_table, ptr->fname, strlen(ptr->fname)+1);
ptr++;
i++;
}
}
int register_module(zend_module_entry *module)
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 (register_functions(module->functions)==FAILURE) {
if (module->functions && zend_register_functions(module->functions, NULL)==FAILURE) {
zend_error(E_CORE_WARNING,"%s: Unable to register functions, unable to load",module->name);
return FAILURE;
}
@@ -627,7 +753,9 @@ void module_destructor(zend_module_entry *module)
module->module_shutdown_func(module->type, module->module_number);
}
module->module_started=0;
unregister_functions(module->functions,-1);
if (module->functions) {
zend_unregister_functions(module->functions, -1, NULL);
}
#if HAVE_LIBDL
if (module->handle) {
@@ -682,7 +810,7 @@ int zend_next_free_module(void)
}
zend_class_entry *register_internal_class(zend_class_entry *class_entry)
ZEND_API zend_class_entry *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);
@@ -692,10 +820,28 @@ zend_class_entry *register_internal_class(zend_class_entry *class_entry)
class_entry->type = ZEND_INTERNAL_CLASS;
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);
zend_hash_init(&class_entry->function_table, 0, NULL, (void (*)(void *)) destroy_zend_function, 1);
zend_hash_init(&class_entry->function_table, 0, NULL, ZEND_FUNCTION_DTOR, 1);
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;
}
ZEND_API zend_module_entry *zend_get_module(int module_number)
{
zend_module_entry *module;
if (zend_hash_index_find(&module_registry, module_number, (void **) &module)==SUCCESS) {
return module;
} else {
return NULL;
}
}
+210 -18
View File
@@ -4,16 +4,20 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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_API_H
#define _ZEND_API_H
@@ -21,28 +25,64 @@
#include "zend_list.h"
#define ZEND_NAMED_FUNCTION(name) void name(INTERNAL_FUNCTION_PARAMETERS)
#define ZEND_FUNCTION(name) ZEND_NAMED_FUNCTION(zend_if_##name)
#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) \
{ \
class_container.name = strdup(class_name); \
class_container.name_length = sizeof(class_name)-1; \
class_container.builtin_functions = functions; \
class_container.handle_function_call = NULL; \
class_container.handle_property_get = NULL; \
class_container.handle_property_set = NULL; \
}
#define INIT_OVERLOADED_CLASS_ENTRY(class_container, class_name, functions, handle_fcall, handle_propget, handle_propset) \
{ \
class_container.name = strdup(class_name); \
class_container.name_length = sizeof(class_name)-1; \
class_container.builtin_functions = functions; \
class_container.handle_function_call = handle_fcall; \
class_container.handle_property_get = handle_propget; \
class_container.handle_property_set = handle_propset; \
}
int zend_next_free_module(void);
int getParameters(HashTable *ht, int param_count,...);
int getParametersArray(HashTable *ht, int param_count, zval **argument_array);
int getThis(zval **this);
int ParameterPassedByReference(HashTable *ht, uint n);
int register_functions(function_entry *functions);
void unregister_functions(function_entry *functions, int count);
int register_module(zend_module_entry *module_entry);
zend_class_entry *register_internal_class(zend_class_entry *class_entry);
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 ParameterPassedByReference(int ht, uint n);
int zend_register_functions(zend_function_entry *functions, HashTable *function_table);
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_module_entry *zend_get_module(int module_number);
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->nNextFreeElement)
#define ARG_COUNT(ht) (ht)
#define BYREF_NONE 0
#define BYREF_FORCE 1
#define BYREF_ALLOW 2
#define BYREF_FORCE_REST 3
#if !MSVC5
#if !(WIN32||WINNT)
#define DLEXPORT
#endif
@@ -51,37 +91,189 @@ int zend_startup_module(zend_module_entry *module);
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);
/* no longer supported */
ZEND_API int add_assoc_function(zval *arg, char *key,void (*function_ptr)(INTERNAL_FUNCTION_PARAMETERS));
ZEND_API int add_assoc_long(zval *arg, char *key, long n);
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_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_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_ex(HashTable *function_table, zval *object, zval *function_name, zval *retval, int param_count, zval **params[], int no_separation);
ZEND_API int add_property_long(zval *arg, char *key, long l);
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);
#define add_method(arg,key,method) add_assoc_function((arg),(key),(method))
#define RETVAL_RESOURCE(l) { \
return_value->type = IS_RESOURCE;\
return_value->value.lval = l; \
}
#define RETVAL_LONG(l) { \
return_value->type = IS_LONG; \
return_value->value.lval = l; \
}
#define RETVAL_DOUBLE(d) { \
return_value->type = IS_DOUBLE; \
return_value->value.dval = d; \
}
#define RETVAL_STRING(s,duplicate) { \
char *__s=(s); \
return_value->value.str.len = strlen(__s); \
return_value->value.str.val = (duplicate?estrndup(__s,return_value->value.str.len):__s); \
return_value->type = IS_STRING; \
}
#define RETVAL_STRINGL(s,l,duplicate) { \
char *__s=(s); int __l=l; \
return_value->value.str.len = __l; \
return_value->value.str.val = (duplicate?estrndup(__s,__l):__s); \
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; }
#define RETURN_RESOURCE(l) { \
return_value->type = IS_RESOURCE;\
return_value->value.lval = l; \
return; \
}
#define RETURN_LONG(l) { \
return_value->type = IS_LONG; \
return_value->value.lval = l; \
return; \
}
#define RETURN_DOUBLE(d) { \
return_value->type = IS_DOUBLE; \
return_value->value.dval = d; \
return; \
}
#define RETURN_STRING(s,duplicate) { \
char *__s=(s); \
return_value->value.str.len = strlen(__s); \
return_value->value.str.val = (duplicate?estrndup(__s,return_value->value.str.len):__s); \
return_value->type = IS_STRING; \
return; \
}
#define RETURN_STRINGL(s,l,duplicate) { \
char *__s=(s); int __l=l; \
return_value->value.str.len = __l; \
return_value->value.str.val = (duplicate?estrndup(__s,__l):__s); \
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; \
ZEND_SET_GLOBAL_VAR(n, var); \
} \
}
#define SET_VAR_STRINGL(n,v,l) { \
{ \
zval *var = (zval *) emalloc(sizeof(zval)); \
\
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; \
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; \
ZEND_SET_GLOBAL_VAR(n, var); \
} \
}
#define ZEND_SET_SYMBOL(symtable, name, var) \
{ \
char *_name = (name); \
\
ZEND_SET_SYMBOL_WITH_LENGTH(symtable, _name, strlen(_name)+1, var); \
}
#define ZEND_SET_SYMBOL_WITH_LENGTH(symtable, name, name_length, var) \
{ \
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; \
\
zval_dtor(*orig_var); \
**orig_var = *(var); \
efree(var); \
} else { \
INIT_PZVAL((var)); \
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) \
ZEND_SET_SYMBOL_WITH_LENGTH(&EG(symbol_table), name, name_length, var)
#define HASH_OF(p) ((p)->type==IS_ARRAY ? (p)->value.ht : (((p)->type==IS_OBJECT ? (p)->value.obj.properties : NULL)))
#endif /* _ZEND_API_H */
/*
+145 -104
View File
@@ -4,21 +4,31 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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 <stdlib.h>
#include "zend.h"
#include "zend_alloc.h"
#include "zend_globals.h"
#ifdef HAVE_SIGNAL_H
# include <signal.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifndef ZTS
static zend_alloc_globals alloc_globals;
@@ -36,7 +46,7 @@ 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) _CHECK_MEMORY_LIMIT(s ZEND_FILE_LINE_RELAY_CC)
# else
#define CHECK_MEMORY_LIMIT(s) _CHECK_MEMORY_LIMIT(s,NULL,0)
# endif
@@ -86,24 +96,23 @@ static zend_alloc_globals alloc_globals;
p->pLast = (mem_header *) NULL;
/* used by ISAPI and NSAPI */
#if ZEND_DEBUG
ZEND_API void *_emalloc(size_t size, char *filename, uint lineno)
#else
ZEND_API void *_emalloc(size_t size)
#endif
ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
mem_header *p;
ALS_FETCH();
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->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;
#endif
HANDLE_UNBLOCK_INTERRUPTIONS();
p->persistent = 0;
@@ -114,8 +123,12 @@ ZEND_API void *_emalloc(size_t size)
}
if (!p) {
fprintf(stderr,"FATAL: emalloc(): Unable to allocate %d bytes\n", size);
fprintf(stderr,"FATAL: emalloc(): Unable to allocate %ld bytes\n", (long) size);
#if ZEND_DEBUG && defined(HAVE_KILL) && defined(HAVE_GETPID)
kill(getpid(), SIGSEGV);
#else
exit(1);
#endif
HANDLE_UNBLOCK_INTERRUPTIONS();
return (void *)p;
}
@@ -123,9 +136,12 @@ ZEND_API void *_emalloc(size_t size)
ADD_POINTER_TO_LIST(p);
p->size = size;
#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;
#endif
#if MEMORY_LIMIT
@@ -136,16 +152,15 @@ ZEND_API void *_emalloc(size_t size)
}
#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);
ALS_FETCH();
#if ZEND_DEBUG
_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);
#endif
@@ -169,21 +184,13 @@ 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;
@@ -194,36 +201,35 @@ ZEND_API void *_ecalloc(size_t nmemb, size_t size)
}
#if ZEND_DEBUG
ZEND_API void *_erealloc(void *ptr, size_t size, char *filename, uint lineno)
#else
ZEND_API void *_erealloc(void *ptr, size_t size)
#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;
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);
}
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);
if (!p) {
fprintf(stderr,"FATAL: erealloc(): Unable to allocate %d bytes\n", size);
HANDLE_UNBLOCK_INTERRUPTIONS();
zend_bailout();
if (!allow_failure) {
fprintf(stderr,"FATAL: erealloc(): Unable to allocate %ld bytes\n", (long) size);
#if ZEND_DEBUG && HAVE_KILL && HAVE_GETPID
kill(getpid(), SIGSEGV);
#else
exit(1);
#endif
}
ADD_POINTER_TO_LIST(orig);
HANDLE_UNBLOCK_INTERRUPTIONS();
return (void *)NULL;
}
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;
#endif
@@ -237,22 +243,14 @@ ZEND_API void *_erealloc(void *ptr, size_t size)
}
#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;
@@ -263,20 +261,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;
@@ -317,7 +307,7 @@ 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)
{
AG(phead) = AG(head) = NULL;
@@ -334,17 +324,37 @@ ZEND_API void start_memory_manager(void)
ZEND_API void shutdown_memory_manager(int silent, int clean_cache)
{
mem_header *p, *t;
#if ZEND_DEBUG
int had_leaks=0;
#endif
ALS_FETCH();
p=AG(head);
t=AG(head);
while (t) {
if (!t->cached || clean_cache) {
#if ZEND_DEBUG
if (!t->cached) {
/* does not use zend_error() *intentionally* */
if (!t->cached && !t->reported) {
mem_header *iterator;
int total_leak=0, total_leak_count=0;
had_leaks=1;
if (!silent) {
zend_message_dispatcher(ZMSG_MEMORY_LEAK_DETECTED, t);
}
t->reported = 1;
for (iterator=t->pNext; iterator; iterator=iterator->pNext) {
if (!iterator->cached
&& iterator->filename==t->filename
&& iterator->lineno==t->lineno) {
total_leak += iterator->size;
total_leak_count++;
iterator->reported = 1;
}
}
if (!silent && total_leak_count>0) {
zend_message_dispatcher(ZMSG_MEMORY_LEAK_REPEATED, (void *) (long) (total_leak_count));
}
}
#endif
p = t->pNext;
@@ -359,7 +369,24 @@ 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)
void zend_debug_alloc_output(char *format, ...)
{
char output_buf[256];
va_list args;
va_start(args, format);
vsprintf(output_buf, format, args);
va_end(args);
#if WIN32||WINNT
OutputDebugString(output_buf);
#else
fprintf(stderr, output_buf);
#endif
}
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);
int no_cache_notice=0;
@@ -375,42 +402,46 @@ ZEND_API int _mem_block_check(void *ptr, int silent, char *filename, int lineno)
no_cache_notice=1;
}
if (!silent) {
fprintf(stderr,"---------------------------------------\n");
fprintf(stderr,"Block 0x%0.8lX status at %s:%d:\n", (long) p, filename, lineno);
fprintf(stderr,"%10s\t","Beginning: ");
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" 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: ");
}
switch (p->magic) {
case MEM_BLOCK_START_MAGIC:
if (!silent) {
fprintf(stderr, "OK (allocated on %s:%d, %d bytes)\n", p->filename, p->lineno, p->size);
zend_debug_alloc_output("OK (allocated on %s:%d, %d bytes)\n", p->filename, p->lineno, p->size);
}
break; /* ok */
case MEM_BLOCK_FREED_MAGIC:
if (!silent) {
fprintf(stderr,"Freed\n");
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:
if (!silent) {
if (!no_cache_notice) {
fprintf(stderr,"Cached (allocated on %s:%d, %d bytes)\n", p->filename, p->lineno, p->size);
zend_debug_alloc_output("Cached (allocated on %s:%d, %d bytes)\n", p->filename, p->lineno, p->size);
had_problems=1;
}
} 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;
default:
if (!silent) {
fprintf(stderr,"Overrun (magic=0x%0.8lX, expected=0x%0.8lX)\n", p->magic, MEM_BLOCK_START_MAGIC);
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;
@@ -426,7 +457,7 @@ ZEND_API int _mem_block_check(void *ptr, int silent, char *filename, int lineno)
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;
@@ -437,63 +468,72 @@ ZEND_API int _mem_block_check(void *ptr, int silent, char *filename, int lineno)
}
}
fprintf(stderr,"%10s\t", "End:");
fprintf(stderr,"Overflown (magic=0x%0.8lX instead of 0x%0.8lX)\n",
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);
fprintf(stderr,"%10s\t","");
zend_debug_alloc_output("%10s\t","");
if (overflows>=sizeof(long)) {
fprintf(stderr, "At least %d bytes overflown\n", sizeof(long));
zend_debug_alloc_output("At least %d bytes overflown\n", sizeof(long));
} else {
fprintf(stderr, "%d byte(s) overflown\n", overflows);
zend_debug_alloc_output("%d byte(s) overflown\n", overflows);
}
} else if (!silent) {
fprintf(stderr,"%10s\t", "End:");
zend_debug_alloc_output("%10s\t", "End:");
if (valid_beginning) {
fprintf(stderr,"OK\n");
zend_debug_alloc_output("OK\n");
} else {
fprintf(stderr,"Unknown\n");
zend_debug_alloc_output("Unknown\n");
}
}
if (had_problems) {
int foo = 5;
foo+=1;
}
if (!silent) {
fprintf(stderr,"---------------------------------------\n");
zend_debug_alloc_output("---------------------------------------\n");
}
return ((!had_problems) ? 1 : 0);
}
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 = AG(head);
mem_header *p;
int errors=0;
ALS_FETCH();
fprintf(stderr,"------------------------------------------------\n");
fprintf(stderr,"Full Memory Check at %s:%d\n", filename, lineno);
p = AG(head);
zend_debug_alloc_output("------------------------------------------------\n");
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(mem_header) + PLATFORM_PADDING), (silent?2:3) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC)) {
errors++;
}
p = p->pNext;
}
fprintf(stderr,"End of full memory check %s:%d (%d errors)\n", filename, lineno, errors);
fprintf(stderr,"------------------------------------------------\n");
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 void _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);
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();
/* remove the block from the non persistent list */
REMOVE_POINTER_FROM_LIST(p);
@@ -501,6 +541,7 @@ ZEND_API void _persist_alloc(void *ptr)
/* add the block to the persistent list */
ADD_POINTER_TO_LIST(p);
HANDLE_UNBLOCK_INTERRUPTIONS();
}
+52 -42
View File
@@ -4,21 +4,27 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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 _ALLOC_H
#define _ALLOC_H
#include <stdio.h>
#include "zend_globals_macros.h"
#define MEM_BLOCK_START_MAGIC 0x7312F8DCL
#define MEM_BLOCK_END_MAGIC 0x2A8FCC84L
#define MEM_BLOCK_FREED_MAGIC 0x99954317L
@@ -29,6 +35,9 @@ typedef struct _mem_header {
long magic;
char *filename;
uint lineno;
int reported;
char *orig_filename;
uint orig_lineno;
#endif
struct _mem_header *pNext;
struct _mem_header *pLast;
@@ -37,7 +46,7 @@ typedef struct _mem_header {
unsigned int cached:1;
} mem_header;
typedef union {
typedef union _align_test {
void *ptr;
double dbl;
long lng;
@@ -51,42 +60,42 @@ typedef union {
ZEND_API char *zend_strndup(const char *s, unsigned int length);
#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,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),__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);
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))
#define estrdup(s) _estrdup((s))
#define estrndup(s,length) _estrndup((s),(length))
#define persist_alloc(p) _persist_alloc((p))
#endif
BEGIN_EXTERN_C()
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 void _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)))
#define perealloc(ptr,size,persistent) ((persistent)?realloc((ptr),(size)):erealloc((ptr),(size)))
#define perealloc_recoverable(ptr,size,persistent) ((persistent)?realloc((ptr),(size)):erealloc_recoverable((ptr),(size)))
#define pestrdup(s,persistent) ((persistent)?strdup(s):estrdup(s))
#define safe_estrdup(ptr) ((ptr)?(estrdup(ptr)):(empty_string))
@@ -94,21 +103,22 @@ 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);
#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)
#endif
END_EXTERN_C()
#endif
/*
+423
View File
@@ -0,0 +1,423 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 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. |
| 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_operators.h"
#include "zend_variables.h"
#include "zend_constants.h"
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(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(leak);
extern unsigned char first_arg_force_ref[];
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(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(leak, NULL)
{ NULL, NULL, NULL }
};
int zend_startup_builtin_functions()
{
return zend_register_functions(builtin_functions, NULL);
}
ZEND_FUNCTION(zend_version)
{
RETURN_STRINGL(ZEND_VERSION, sizeof(ZEND_VERSION)-1, 1);
}
ZEND_FUNCTION(func_num_args)
{
void **p;
int arg_count;
ELS_FETCH();
p = EG(argument_stack).top_element-1;
arg_count = (ulong) *p; /* this is the amount of arguments passed to func_num_args(); */
p = EG(argument_stack).top_element-1-arg_count-1;
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;
ELS_FETCH();
if (ARG_COUNT(ht)!=1 || getParametersEx(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;
arg_count = (ulong) *p; /* this is the amount of arguments passed to func_num_args(); */
p = EG(argument_stack).top_element-1-arg_count-1;
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(): Only %d arguments passed to function (argument %d requested)", arg_count, 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;
ELS_FETCH();
p = EG(argument_stack).top_element-1;
arg_count = (ulong) *p; /* this is the amount of arguments passed to func_num_args(); */
p = EG(argument_stack).top_element-1-arg_count-1;
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;
element = (zval *) emalloc(sizeof(zval));
*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 (ARG_COUNT(ht) != 1 || getParametersEx(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 (ARG_COUNT(ht) != 2 || getParametersEx(2, &s1, &s2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(s1);
convert_to_string_ex(s2);
RETURN_LONG(zend_binary_strcmp(*s1,*s2));
}
/* }}} */
/* {{{ proto int strcasecmp(string str1, string str2)
Binary safe case-insensitive string comparison */
ZEND_FUNCTION(strcasecmp)
{
zval **s1, **s2;
if (ARG_COUNT(ht)!=2 || getParametersEx(2, &s1, &s2) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(s1);
convert_to_string_ex(s2);
RETURN_LONG(zend_binary_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 (ARG_COUNT(ht) != 1 || getParametersEx(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) {
tmp = (zval *)emalloc(sizeof(zval));
*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_ptr(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;
ELS_FETCH();
old_error_reporting = EG(error_reporting);
switch (ARG_COUNT(ht)) {
case 0:
break;
case 1:
if (getParametersEx(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;
ELS_FETCH();
switch(ARG_COUNT(ht)) {
case 2:
if (getParametersEx(2, &var, &val)==FAILURE) {
RETURN_FALSE;
}
case_sensitive = CONST_CS;
break;
case 3:
if (getParametersEx(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:
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 | ~CONST_PERSISTENT; /* 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 (ARG_COUNT(ht)!=1 || getParametersEx(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 (ARG_COUNT(ht)!=1 || getParametersEx(1, &arg)==FAILURE) {
RETURN_FALSE;
}
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 (ARG_COUNT(ht)!=1 || getParametersEx(1, &arg)==FAILURE) {
RETURN_FALSE;
}
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 method_exists(object object, string method)
Checks if the class method exists ...
*/
ZEND_FUNCTION(method_exists)
{
zval **arg1, **arg2;
if (ARG_COUNT(ht)!=2 || getParametersEx(2, &arg1, &arg2)==FAILURE) {
RETURN_FALSE;
}
if ((*arg1)->type != IS_OBJECT) {
RETURN_FALSE;
}
convert_to_string_ex(arg2);
if(zend_hash_exists(&(*arg1)->value.obj.ce->function_table, (*arg2)->value.str.val, (*arg2)->value.str.len+1)) {
RETURN_TRUE;
} else {
RETURN_FALSE;
}
}
/* }}} */
ZEND_FUNCTION(leak)
{
int leakbytes=3;
zval **leak;
if (ARG_COUNT(ht)>=1) {
if (getParametersEx(1, &leak)==SUCCESS) {
convert_to_long_ex(leak);
leakbytes = (*leak)->value.lval;
}
}
emalloc(leakbytes);
}
+26
View File
@@ -0,0 +1,26 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 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. |
| 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();
#endif /* _ZEND_BUILTIN_FUNCTIONS_H */
+471 -158
View File
File diff suppressed because it is too large. Load diff
+236 -130
View File
@@ -4,26 +4,40 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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 _COMPILE_H
#define _COMPILE_H
#include "zend.h"
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#endif
#include "zend_llist.h"
#define YYSTYPE znode
#include "zend-parser.h"
#define DEBUG_ZEND 0
#define SUPPORT_INTERACTIVE 1
#ifndef ZTS
# define SUPPORT_INTERACTIVE 1
#else
# define SUPPORT_INTERACTIVE 0
#endif
#define FREE_PNODE(znode) zval_dtor(&znode->u.constant);
#define FREE_OP(op, should_free) if (should_free) zval_dtor(&Ts[(op)->u.var].tmp_var);
@@ -41,13 +55,14 @@
typedef struct _zend_op_array zend_op_array;
typedef struct {
typedef struct _znode {
int op_type;
union {
zval constant;
int var;
int opline_num;
int fetch_type;
zend_op_array *op_array;
struct {
int var; /* dummy */
@@ -62,12 +77,13 @@ typedef struct _zend_op {
znode result;
znode op1;
znode op2;
ulong extended_value;
char *filename;
uint lineno;
} zend_op;
typedef struct {
typedef struct _zend_brk_cont_element {
int cont;
int brk;
int parent;
@@ -78,6 +94,7 @@ struct _zend_op_array {
int type; /* MUST be the first element of this struct! */
unsigned char *arg_types; /* MUST be the second element of this struct! */
char *function_name; /* MUST be the third element of this struct! */
int *refcount;
@@ -86,12 +103,11 @@ struct _zend_op_array {
int T;
char *function_name;
zend_brk_cont_element *brk_cont_array;
int last_brk_cont;
int current_brk_cont;
unsigned char initialized_globals;
unsigned char uses_globals;
/* static variables support */
HashTable *static_variables;
@@ -102,25 +118,26 @@ struct _zend_op_array {
int backpatch_count;
#endif
void *reserved[4];
void *reserved[ZEND_MAX_RESERVED_RESOURCES];
};
typedef struct {
typedef struct _zend_internal_function {
int type; /* MUST be the first element of this struct! */
unsigned char *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 union {
typedef union _zend_function {
int type; /* MUST be the first element of this struct! */
struct {
int type; /* never used */
unsigned char *arg_types;
char *function_name;
} common;
zend_op_array op_array;
@@ -128,28 +145,28 @@ typedef union {
} zend_function;
typedef struct {
typedef struct _zend_function_state {
HashTable *function_symbol_table;
zend_function *function;
void *reserved[4];
void *reserved[ZEND_MAX_RESERVED_RESOURCES];
} zend_function_state;
typedef struct {
typedef struct _zend_switch_entry {
znode cond;
int default_case;
int control_var;
} zend_switch_entry;
typedef struct {
typedef struct _list_llist_element {
znode var;
zend_llist dimensions;
znode value;
} list_llist_element;
typedef struct {
typedef struct _zend_file_handle {
int type;
char *filename;
union {
@@ -175,17 +192,26 @@ typedef struct {
void init_compiler(CLS_D ELS_DC);
void shutdown_compiler(CLS_D);
extern zend_op_array *(*zend_compile_files)(int mark_as_ref CLS_DC, int file_count, ...);
BEGIN_EXTERN_C()
extern ZEND_API zend_op_array *(*zend_compile_files)(int mark_as_ref CLS_DC, int file_count, ...);
void zend_activate(CLS_D ELS_DC);
void zend_deactivate(CLS_D ELS_DC);
int lex_scan(zval *zendlval CLS_DC);
void reset_scanner(CLS_D);
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();
#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);
@@ -194,15 +220,17 @@ 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);
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 do_print(znode *result, znode *arg CLS_DC);
void do_echo(znode *arg CLS_DC);
ZEND_API void *get_unary_op(int opcode);
typedef int (*unary_op_type)(zval *, zval *);
ZEND_API unary_op_type get_unary_op(int opcode);
ZEND_API void *get_binary_op(int opcode);
void do_while_cond(znode *expr, znode *close_bracket_token CLS_DC);
@@ -223,11 +251,11 @@ 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);
void do_init_string(znode *result);
void do_init_string(znode *result CLS_DC);
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);
@@ -235,11 +263,13 @@ 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_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, int is_method CLS_DC);
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 CLS_DC);
ZEND_API int do_bind_function_or_class(zend_op *opline, HashTable *function_table, HashTable *class_table, int compile_time);
void do_early_binding(CLS_D);
void do_pass_param(znode *param, int op, int offset CLS_DC);
@@ -268,16 +298,16 @@ 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 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_add_static_array_element(znode *result, znode *expr, znode *offset);
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_end(znode *result, znode *expr CLS_DC);
void do_add_list_element(znode *element CLS_DC);
@@ -309,29 +339,40 @@ void do_extended_info(CLS_D);
void do_extended_fcall_begin(CLS_D);
void do_extended_fcall_end(CLS_D);
/* helper functions in zend-scanner.l */
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 *compile_string(zval *source_string CLS_DC);
ZEND_API zend_op_array *compile_filename(zval *filename CLS_DC);
inline int open_file_for_scanning(zend_file_handle *file_handle CLS_DC);
#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 zend_op_array *compile_string(zval *source_string CLS_DC);
ZEND_API zend_op_array *compile_filename(zval *filename CLS_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 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 int destroy_zend_function(zend_function *function);
ZEND_API int 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
void destroy_zend_function(zend_function *function);
void destroy_zend_class(zend_class_entry *ce);
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_brk_cont_element *get_next_brk_cont_element(zend_op_array *op_array);
@@ -354,111 +395,116 @@ 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_EQUAL 16
#define ZEND_IS_NOT_EQUAL 17
#define ZEND_IS_SMALLER 18
#define ZEND_IS_SMALLER_OR_EQUAL 19
#define ZEND_CAST 20
#define ZEND_QM_ASSIGN 21
#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 22
#define ZEND_ASSIGN_SUB 23
#define ZEND_ASSIGN_MUL 24
#define ZEND_ASSIGN_DIV 25
#define ZEND_ASSIGN_MOD 26
#define ZEND_ASSIGN_SL 27
#define ZEND_ASSIGN_SR 28
#define ZEND_ASSIGN_CONCAT 29
#define ZEND_ASSIGN_BW_OR 30
#define ZEND_ASSIGN_BW_AND 31
#define ZEND_ASSIGN_BW_XOR 32
#define ZEND_PRE_INC 32
#define ZEND_PRE_DEC 33
#define ZEND_POST_INC 34
#define ZEND_POST_DEC 35
#define ZEND_PRE_INC 33
#define ZEND_PRE_DEC 34
#define ZEND_POST_INC 35
#define ZEND_POST_DEC 36
#define ZEND_ASSIGN 36
#define ZEND_ASSIGN_REF 37
#define ZEND_ASSIGN 37
#define ZEND_ASSIGN_REF 38
#define ZEND_ECHO_OP 38
#define ZEND_PRINT_OP 39
#define ZEND_ECHO 39
#define ZEND_PRINT 40
#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_JMP 41
#define ZEND_JMPZ 42
#define ZEND_JMPNZ 43
#define ZEND_JMPZNZ 44
#define ZEND_JMPZ_EX 45
#define ZEND_JMPNZ_EX 46
#define ZEND_CASE 47
#define ZEND_SWITCH_FREE 48
#define ZEND_BRK 49
#define ZEND_CONT 50
#define ZEND_BOOL 51
#define ZEND_INIT_STRING 50
#define ZEND_ADD_CHAR 51
#define ZEND_ADD_STRING 52
#define ZEND_ADD_VAR 53
#define ZEND_INIT_STRING 52
#define ZEND_ADD_CHAR 53
#define ZEND_ADD_STRING 54
#define ZEND_ADD_VAR 55
#define ZEND_BEGIN_SILENCE 54
#define ZEND_END_SILENCE 55
#define ZEND_BEGIN_SILENCE 56
#define ZEND_END_SILENCE 57
#define ZEND_INIT_FCALL 56
#define ZEND_INIT_FCALL_BY_NAME 57
#define ZEND_DO_FCALL 58
#define ZEND_RETURN 59
#define ZEND_INIT_FCALL_BY_NAME 58
#define ZEND_DO_FCALL 59
#define ZEND_DO_FCALL_BY_NAME 60
#define ZEND_RETURN 61
#define ZEND_RECV 60
#define ZEND_RECV_INIT 61
#define ZEND_RECV 62
#define ZEND_RECV_INIT 63
#define ZEND_SEND_VAL 62
#define ZEND_SEND_VAR 63
#define ZEND_SEND_REF 64
#define ZEND_SEND_VAL 64
#define ZEND_SEND_VAR 65
#define ZEND_SEND_REF 66
#define ZEND_NEW 65
#define ZEND_JMP_NO_CTOR 66
#define ZEND_FREE 67
#define ZEND_NEW 67
#define ZEND_JMP_NO_CTOR 68
#define ZEND_FREE 69
#define ZEND_INIT_ARRAY 68
#define ZEND_ADD_ARRAY_ELEMENT 69
#define ZEND_INIT_ARRAY 70
#define ZEND_ADD_ARRAY_ELEMENT 71
#define ZEND_INCLUDE_OR_EVAL 70
#define ZEND_INCLUDE_OR_EVAL 72
#define ZEND_UNSET_VAR 71
#define ZEND_UNSET_DIM_OBJ 72
#define ZEND_ISSET_ISEMPTY 73
#define ZEND_UNSET_VAR 73
#define ZEND_UNSET_DIM_OBJ 74
#define ZEND_ISSET_ISEMPTY 75
#define ZEND_FE_RESET 74
#define ZEND_FE_FETCH 75
#define ZEND_FE_RESET 76
#define ZEND_FE_FETCH 77
#define ZEND_EXIT 76
#define ZEND_EXIT 78
/* the following 12 opcodes are 4 groups of 3 opcodes each, and must
/* the following 15 opcodes are 5 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 79
#define ZEND_FETCH_DIM_R 80
#define ZEND_FETCH_OBJ_R 81
#define ZEND_FETCH_W 82
#define ZEND_FETCH_DIM_W 83
#define ZEND_FETCH_OBJ_W 84
#define ZEND_FETCH_RW 85
#define ZEND_FETCH_DIM_RW 86
#define ZEND_FETCH_OBJ_RW 87
#define ZEND_FETCH_IS 88
#define ZEND_FETCH_DIM_IS 89
#define ZEND_FETCH_OBJ_IS 90
#define ZEND_FETCH_FUNC_ARG 91
#define ZEND_FETCH_DIM_FUNC_ARG 92
#define ZEND_FETCH_OBJ_FUNC_ARG 93
#define ZEND_FETCH_DIM_TMP_VAR 89
#define ZEND_FETCH_CONSTANT 90
#define ZEND_FETCH_DIM_TMP_VAR 94
#define ZEND_FETCH_CONSTANT 95
#define ZEND_INIT_GLOBALS 91
#define ZEND_DECLARE_FUNCTION_OR_CLASS 96
#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 97
#define ZEND_EXT_FCALL_BEGIN 98
#define ZEND_EXT_FCALL_END 99
#define ZEND_EXT_NOP 100
/* end of block */
@@ -471,16 +517,18 @@ 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 ZEND_INTERNAL_FUNCTION 1
#define ZEND_USER_FUNCTION 2
#define ZEND_OVERLOADED_FUNCTION 3
#define ZEND_EVAL_CODE 4
#define ZEND_INTERNAL_CLASS 1
#define ZEND_USER_CLASS 2
@@ -500,4 +548,62 @@ int zendlex(znode *zendlval CLS_DC);
#define ZEND_HANDLE_FP 2
#define ZEND_HANDLE_ISTREAM 3
#define ZEND_DECLARE_CLASS 1
#define ZEND_DECLARE_FUNCTION 2
#define ZEND_DECLARE_INHERITED_CLASS 3
#define ZEND_FETCH_STANDARD 0
#define ZEND_FETCH_ADD_LOCK 1
#define ZEND_MEMBER_FUNC_CALL 1<<0
#define ZEND_CTOR_CALL 1<<1
#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_IS_REF(z) ((z)->is_ref)
#define PZVAL_LOCK(z) ((z)->refcount++)
#define PZVAL_UNLOCK(z) { ((z)->refcount--); \
if (!(z)->refcount) { \
EG(garbage)[EG(garbage_ptr)++] = (z); \
if (EG(garbage_ptr) == 4) { \
zval_dtor(EG(garbage)[0]); \
efree(EG(garbage)[0]); \
zval_dtor(EG(garbage)[1]); \
efree(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); }
/* 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 \
) \
) \
)
#endif /* _COMPILE_H */
+67
View File
@@ -0,0 +1,67 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 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. |
| 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_CONFIG_W32_H
#define _ZEND_CONFIG_W32_H
#include <string.h>
#include <windows.h>
typedef unsigned long ulong;
typedef unsigned int uint;
#define HAVE_ALLOCA 1
#define HAVE_LIMITS_H 1
#include <malloc.h>
#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
#ifdef inline
#undef inline
#endif
#define zend_sprintf sprintf
/* Visual C++ doesn't really work with inline for C */
#define inline
#define DL_LOAD(libname) LoadLibrary(libname)
#define DL_FETCH_SYMBOL GetProcAddress
#define DL_UNLOAD FreeLibrary
#define DL_HANDLE HMODULE
#define ZEND_EXTENSIONS_SUPPORT 1
#ifdef LIBZEND_EXPORTS
# define ZEND_API __declspec(dllexport)
#else
# define ZEND_API __declspec(dllimport)
#endif
#endif /* _ZEND_CONFIG_W32_H */
+61 -29
View File
@@ -4,10 +4,13 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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> |
@@ -22,12 +25,28 @@
#include "zend_globals.h"
void free_zend_constant(zend_constant *c)
int 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);
}
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));
}
@@ -53,11 +72,13 @@ static int clean_module_constant(zend_constant *c, int *module_number)
void clean_module_constants(int module_number)
{
ELS_FETCH();
zend_hash_apply_with_argument(EG(zend_constants), (int (*)(void *,void *)) clean_module_constant, (void *) &module_number);
}
int zend_startup_constants(void)
int zend_startup_constants(ELS_D)
{
#if WIN32|WINNT
DWORD dwBuild=0;
@@ -66,11 +87,22 @@ int zend_startup_constants(void)
DWORD dwWindowsMinorVersion = (DWORD)(HIBYTE(LOWORD(dwVersion)));
#endif
EG(zend_constants) = (HashTable *) malloc(sizeof(HashTable));
/* ZEND_FIX: Move to PHP */
if (zend_hash_init(EG(zend_constants), 20, NULL, ZEND_CONSTANT_DTOR, 1)==FAILURE) {
return FAILURE;
}
return SUCCESS;
}
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
/* Get build numbers for Windows NT or Win95 */
if (dwVersion < 0x80000000){
php3_os="WINNT";
} else {
@@ -82,12 +114,6 @@ int zend_startup_constants(void)
#endif
EG(zend_constants) = (HashTable *) malloc(sizeof(HashTable));
if (zend_hash_init(EG(zend_constants), 20, NULL, (void(*)(void *)) free_zend_constant, 1)==FAILURE) {
return FAILURE;
}
#if 0
/* This should go back to PHP */
REGISTER_MAIN_STRINGL_CONSTANT("PHP_VERSION", PHP_VERSION, sizeof(PHP_VERSION)-1, CONST_PERSISTENT | CONST_CS);
@@ -95,8 +121,13 @@ int zend_startup_constants(void)
#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_NOTICE", E_NOTICE, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_PARSE", E_PARSE, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_NOTICE", E_NOTICE, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_CORE_ERROR", E_CORE_ERROR, CONST_PERSISTENT | CONST_CS);
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_ALL", E_ALL, CONST_PERSISTENT | CONST_CS);
/* true/false constants */
@@ -111,20 +142,18 @@ int zend_startup_constants(void)
c.name_len = 5;
c.value.value.lval = 1;
c.value.type = IS_BOOL;
zend_register_constant(&c);
zend_register_constant(&c ELS_CC);
c.name = zend_strndup("FALSE",5);
c.name_len = 6;
c.value.value.lval = 0;
c.value.type = IS_BOOL;
zend_register_constant(&c);
zend_register_constant(&c ELS_CC);
}
return SUCCESS;
}
int zend_shutdown_constants(void)
int zend_shutdown_constants(ELS_D)
{
zend_hash_destroy(EG(zend_constants));
free(EG(zend_constants));
@@ -134,11 +163,13 @@ int zend_shutdown_constants(void)
void clean_non_persistent_constants(void)
{
ELS_FETCH();
zend_hash_apply(EG(zend_constants), (int (*)(void *)) clean_non_persistent_constant);
}
ZEND_API void zend_register_long_constant(char *name, uint name_len, long lval, int flags, int module_number)
ZEND_API void zend_register_long_constant(char *name, uint name_len, long lval, int flags, int module_number ELS_DC)
{
zend_constant c;
@@ -148,11 +179,11 @@ ZEND_API void zend_register_long_constant(char *name, uint name_len, long lval,
c.name = zend_strndup(name,name_len);
c.name_len = name_len;
c.module_number = module_number;
zend_register_constant(&c);
zend_register_constant(&c ELS_CC);
}
ZEND_API void zend_register_double_constant(char *name, uint name_len, double dval, int flags, int module_number)
ZEND_API void zend_register_double_constant(char *name, uint name_len, double dval, int flags, int module_number ELS_DC)
{
zend_constant c;
@@ -162,11 +193,11 @@ ZEND_API void zend_register_double_constant(char *name, uint name_len, double dv
c.name = zend_strndup(name,name_len);
c.name_len = name_len;
c.module_number = module_number;
zend_register_constant(&c);
zend_register_constant(&c ELS_CC);
}
ZEND_API void zend_register_stringl_constant(char *name, uint name_len, char *strval, uint strlen, int flags, int module_number)
ZEND_API void zend_register_stringl_constant(char *name, uint name_len, char *strval, uint strlen, int flags, int module_number ELS_DC)
{
zend_constant c;
@@ -177,13 +208,13 @@ ZEND_API void zend_register_stringl_constant(char *name, uint name_len, char *st
c.name = zend_strndup(name,name_len);
c.name_len = name_len;
c.module_number = module_number;
zend_register_constant(&c);
zend_register_constant(&c ELS_CC);
}
ZEND_API void zend_register_string_constant(char *name, uint name_len, char *strval, int flags, int module_number)
ZEND_API void zend_register_string_constant(char *name, uint name_len, char *strval, int flags, int module_number ELS_DC)
{
zend_register_stringl_constant(name, name_len, strval, strlen(strval), flags, module_number);
zend_register_stringl_constant(name, name_len, strval, strlen(strval), flags, module_number ELS_CC);
}
@@ -192,6 +223,7 @@ ZEND_API int zend_get_constant(char *name, uint name_len, zval *result)
zend_constant *c;
char *lookup_name = estrndup(name,name_len);
int retval;
ELS_FETCH();
zend_str_tolower(lookup_name, name_len);
@@ -212,7 +244,7 @@ ZEND_API int zend_get_constant(char *name, uint name_len, zval *result)
}
ZEND_API void zend_register_constant(zend_constant *c)
ZEND_API void zend_register_constant(zend_constant *c ELS_DC)
{
char *lowercase_name = zend_strndup(c->name, c->name_len);
+31 -21
View File
@@ -4,23 +4,29 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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 _CONSTANTS_H
#define _CONSTANTS_H
#include "zend_globals.h"
#define CONST_CS 0x1 /* Case Sensitive */
#define CONST_PERSISTENT 0x2
typedef struct {
typedef struct _zend_constant {
zval value;
int flags;
char *name;
@@ -28,26 +34,30 @@ typedef struct {
int module_number;
} zend_constant;
#define REGISTER_LONG_CONSTANT(name,lval,flags) zend_register_long_constant((name),sizeof(name),(lval),(flags),module_number)
#define REGISTER_DOUBLE_CONSTANT(name,dval,flags) zend_register_double_constant((name),sizeof(name),(dval),(flags),module_number)
#define REGISTER_STRING_CONSTANT(name,str,flags) zend_register_string_constant((name),sizeof(name),(str),(flags),module_number)
#define REGISTER_STRINGL_CONSTANT(name,str,len,flags) zend_register_stringl_constant((name),sizeof(name),(str),(len),(flags),module_number)
#define REGISTER_LONG_CONSTANT(name,lval,flags) zend_register_long_constant((name),sizeof(name),(lval),(flags),module_number ELS_CC)
#define REGISTER_DOUBLE_CONSTANT(name,dval,flags) zend_register_double_constant((name),sizeof(name),(dval),(flags),module_number ELS_CC)
#define REGISTER_STRING_CONSTANT(name,str,flags) zend_register_string_constant((name),sizeof(name),(str),(flags),module_number ELS_CC)
#define REGISTER_STRINGL_CONSTANT(name,str,len,flags) zend_register_stringl_constant((name),sizeof(name),(str),(len),(flags),module_number ELS_CC)
#define REGISTER_MAIN_LONG_CONSTANT(name,lval,flags) zend_register_long_constant((name),sizeof(name),(lval),(flags),0)
#define REGISTER_MAIN_DOUBLE_CONSTANT(name,dval,flags) zend_register_double_constant((name),sizeof(name),(dval),(flags),0)
#define REGISTER_MAIN_STRING_CONSTANT(name,str,flags) zend_register_string_constant((name),sizeof(name),(str),(flags),0)
#define REGISTER_MAIN_STRINGL_CONSTANT(name,str,len,flags) zend_register_stringl_constant((name),sizeof(name),(str),(len),(flags),0)
#define REGISTER_MAIN_LONG_CONSTANT(name,lval,flags) zend_register_long_constant((name),sizeof(name),(lval),(flags),0 ELS_CC)
#define REGISTER_MAIN_DOUBLE_CONSTANT(name,dval,flags) zend_register_double_constant((name),sizeof(name),(dval),(flags),0 ELS_CC)
#define REGISTER_MAIN_STRING_CONSTANT(name,str,flags) zend_register_string_constant((name),sizeof(name),(str),(flags),0 ELS_CC)
#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);
void free_zend_constant(zend_constant *c);
int zend_startup_constants(void);
int zend_shutdown_constants(void);
int 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);
ZEND_API int zend_get_constant(char *name, uint name_len, zval *result);
ZEND_API void zend_register_long_constant(char *name, uint name_len, long lval, int flags, int module_number);
ZEND_API void zend_register_double_constant(char *name, uint name_len, double dval, int flags, int module_number);
ZEND_API void zend_register_string_constant(char *name, uint name_len, char *strval, int flags, int module_number);
ZEND_API void zend_register_stringl_constant(char *name, uint name_len, char *strval, uint strlen, int flags, int module_number);
ZEND_API void zend_register_constant(zend_constant *c);
ZEND_API void zend_register_long_constant(char *name, uint name_len, long lval, int flags, int module_number ELS_DC);
ZEND_API void zend_register_double_constant(char *name, uint name_len, double dval, int flags, int module_number ELS_DC);
ZEND_API void zend_register_string_constant(char *name, uint name_len, char *strval, int flags, int module_number ELS_DC);
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);
#define ZEND_CONSTANT_DTOR (int (*)(void *)) free_zend_constant
#endif
+17 -13
View File
@@ -4,30 +4,34 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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_ERRORS_H
#define _ZEND_ERRORS_H
#define E_CORE_ERROR (1<<0L)
#define E_CORE_WARNING (1<<1L)
#define E_COMPILE_ERROR (1<<2L)
#define E_COMPILE_WARNING (1<<3L)
#define E_PARSE (1<<4L)
#define E_ERROR (1<<5L)
#define E_WARNING (1<<6L)
#define E_NOTICE (1<<7L)
#define E_ERROR (1<<0L)
#define E_WARNING (1<<1L)
#define E_PARSE (1<<2L)
#define E_NOTICE (1<<3L)
#define E_CORE_ERROR (1<<4L)
#define E_CORE_WARNING (1<<5L)
#define E_COMPILE_ERROR (1<<6L)
#define E_COMPILE_WARNING (1<<7L)
#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_CORE (E_CORE_ERROR | E_CORE_WARNING)
#endif /* _ZEND_ERRORS_H */
+600 -382
View File
File diff suppressed because it is too large. Load diff
+18 -7
View File
@@ -4,27 +4,34 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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 _EXECUTE_H
#define _EXECUTE_H
#include "zend_compile.h"
#include "zend_hash.h"
typedef union {
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;
@@ -45,6 +52,10 @@ 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);
/* 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);
#if SUPPORT_INTERACTIVE
void execute_new_code(CLS_D);
#endif
+171 -71
View File
@@ -4,16 +4,20 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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 <stdio.h>
#include <signal.h>
@@ -31,21 +35,32 @@
ZEND_API void (*zend_execute)(zend_op_array *op_array ELS_DC);
#if ZEND_DEBUG
static void (*original_sigsegv_handler)(int);
static void zend_handle_sigsegv(int dummy)
{
fflush(stdout);
signal(SIGSEGV, original_sigsegv_handler);
/*
printf("SIGSEGV caught on opcode %d on opline %d of %s() at %s:%d\n\n",
active_opline->opcode,
active_opline-EG(active_op_array)->opcodes,
get_active_function_name(),
zend_get_executed_filename(),
zend_get_executed_lineno());
original_sigsegv_handler(dummy);
*/
fflush(stderr);
if (original_sigsegv_handler==zend_handle_sigsegv) {
signal(SIGSEGV, original_sigsegv_handler);
} else {
signal(SIGSEGV, SIG_DFL);
}
{
ELS_FETCH();
fprintf(stderr, "SIGSEGV caught on opcode %d on opline %d of %s() at %s:%d\n\n",
active_opline->opcode,
active_opline-EG(active_op_array)->opcodes,
get_active_function_name(),
zend_get_executed_filename(ELS_C),
zend_get_executed_lineno(ELS_C));
}
if (original_sigsegv_handler!=zend_handle_sigsegv) {
original_sigsegv_handler(dummy);
}
}
#endif
static void zend_extension_activator(zend_extension *extension)
@@ -74,11 +89,16 @@ void init_executor(CLS_D ELS_DC)
EG(error_zval).refcount = 1;
EG(error_zval).is_ref=0;
EG(error_zval_ptr)=&EG(error_zval);
zend_ptr_stack_init(&EG(function_symbol_table_stack));
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
original_sigsegv_handler = signal(SIGSEGV, zend_handle_sigsegv);
#endif
#endif
EG(return_value) = &EG(global_return_value);
var_reset(EG(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;
@@ -86,31 +106,21 @@ void init_executor(CLS_D ELS_DC)
EG(function_table) = CG(function_table);
EG(class_table) = CG(class_table);
EG(AiCount) = 0;
zend_ptr_stack_init(&EG(garbage));
zend_ptr_stack_init(&EG(argument_stack));
EG(main_op_array) = NULL;
zend_hash_init(&EG(symbol_table), 50, NULL, PVAL_PTR_DTOR, 0);
EG(active_symbol_table) = &EG(symbol_table);
zend_llist_apply(&zend_extensions, (void (*)(void *)) zend_extension_activator);
/* $GLOBALS array */
{
zval *globals = (zval *) emalloc(sizeof(zval));
globals->value.ht = &EG(symbol_table);
globals->type = IS_ARRAY;
globals->refcount = 1;
globals->is_ref = 0;
zend_hash_update(&EG(symbol_table), "GLOBALS", sizeof("GLOBALS"), &globals, sizeof(zval *), NULL);
}
EG(opline_ptr) = NULL;
EG(garbage_ptr) = 0;
}
void shutdown_executor(ELS_D)
{
zend_ptr_stack_destroy(&EG(function_symbol_table_stack));
zval_dtor(&EG(global_return_value));
zend_ptr_stack_destroy(&EG(arg_types_stack));
zend_stack_destroy(&EG(overloaded_objects_stack));
@@ -120,20 +130,31 @@ void shutdown_executor(ELS_D)
EG(symtable_cache_ptr)--;
}
zend_llist_apply(&zend_extensions, (void (*)(void *)) zend_extension_deactivator);
zend_ptr_stack_destroy(&EG(garbage));
zend_hash_destroy(&EG(symbol_table));
destroy_resource_list(); /* must be destroyed after the main symbol table is destroyed */
zend_ptr_stack_destroy(&EG(argument_stack));
if (EG(main_op_array)) {
destroy_op_array(EG(main_op_array));
efree(EG(main_op_array));
}
clean_non_persistent_constants();
#if ZEND_DEBUG
signal(SIGSEGV, original_sigsegv_handler);
#endif
while (EG(garbage_ptr)--) {
zval_dtor(EG(garbage)[EG(garbage_ptr)]);
efree(EG(garbage)[EG(garbage_ptr)]);
}
}
ZEND_API char *get_active_function_name(ELS_D)
ZEND_API char *get_active_function_name()
{
ELS_FETCH();
switch(EG(function_state_ptr)->function->type) {
case ZEND_USER_FUNCTION: {
char *function_name = ((zend_op_array *) EG(function_state_ptr)->function)->function_name;
@@ -156,13 +177,21 @@ ZEND_API char *get_active_function_name(ELS_D)
ZEND_API char *zend_get_executed_filename(ELS_D)
{
return active_opline->filename;
if (EG(opline_ptr)) {
return active_opline->filename;
} else {
return "[no active file]";
}
}
ZEND_API uint zend_get_executed_lineno(ELS_D)
{
return active_opline->lineno;
if (EG(opline_ptr)) {
return active_opline->lineno;
} else {
return 0;
}
}
@@ -176,7 +205,7 @@ ZEND_API inline void safe_free_zval_ptr(zval *p)
}
ZEND_API void zval_ptr_dtor(zval **zval_ptr)
ZEND_API int _zval_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC)
{
#if DEBUG_ZEND>=2
printf("Reducing refcount for %x (%x): %d->%d\n", *zval_ptr, zval_ptr, (*zval_ptr)->refcount, (*zval_ptr)->refcount-1);
@@ -186,6 +215,7 @@ ZEND_API void zval_ptr_dtor(zval **zval_ptr)
zval_dtor(*zval_ptr);
safe_free_zval_ptr(*zval_ptr);
}
return 1;
}
@@ -234,6 +264,7 @@ ZEND_API void zval_update_constant(zval *p)
{
if (p->type == IS_CONSTANT) {
zval c;
int 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'",
@@ -244,12 +275,28 @@ ZEND_API void zval_update_constant(zval *p)
STR_FREE(p->value.str.val);
*p = c;
}
p->refcount = 1;
p->is_ref = 0;
INIT_PZVAL(p);
p->refcount = refcount;
}
}
int call_user_function(HashTable *function_table, zval *object, zval *function_name, zval *retval, int param_count, zval *params[])
{
zval ***params_array = (zval ***) emalloc(sizeof(zval **)*param_count);
int i;
int ex_retval;
for (i=0; i<param_count; i++) {
params_array[i] = &params[i];
}
ex_retval = call_user_function_ex(function_table, object, function_name, retval, param_count, params_array, 1);
efree(params_array);
return ex_retval;
}
int call_user_function_ex(HashTable *function_table, zval *object, zval *function_name, zval *retval, int param_count, zval **params[], int no_separation)
{
int i;
zval *original_return_value;
@@ -266,61 +313,79 @@ int call_user_function(HashTable *function_table, zval *object, zval *function_n
return FAILURE;
}
function_table = &object->value.obj.ce->function_table;
/* unimplemented */
}
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) {
zend_error(E_ERROR, "Unknown function: %s()\n", function_name->value.str.val);
return FAILURE;
}
zend_ptr_stack_push(&EG(function_symbol_table_stack), function_state.function_symbol_table);
function_state.function_symbol_table = (HashTable *) emalloc(sizeof(HashTable));
zend_hash_init(function_state.function_symbol_table, 0, NULL, PVAL_PTR_DTOR, 0);
for (i=0; i<param_count; i++) {
zval *param;
param = (zval *) emalloc(sizeof(zval));
*param = *(params[i]);
param->refcount=1;
param->is_ref=0;
zval_copy_ctor(param);
zend_hash_next_index_insert_ptr(function_state.function_symbol_table, param, sizeof(zval *), NULL);
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;
}
new_zval = (zval *) emalloc(sizeof(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 {
param = (zval *) emalloc(sizeof(zval));
*param = **(params[i]);
INIT_PZVAL(param);
}
zend_ptr_stack_push(&EG(argument_stack), param);
}
if (object) {
zval *dummy = (zval *) emalloc(sizeof(zval)), **this_ptr;
zend_ptr_stack_push(&EG(argument_stack), (void *) (long) param_count);
var_uninit(dummy);
dummy->refcount=1;
dummy->is_ref=0;
zend_hash_update_ptr(function_state.function_symbol_table, "this", sizeof("this"), dummy, sizeof(zval *), (void **) &this_ptr);
zend_assign_to_variable_reference(NULL, this_ptr, &object, NULL ELS_CC);
}
calling_symbol_table = EG(active_symbol_table);
EG(active_symbol_table) = function_state.function_symbol_table;
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 (object) {
zval *dummy = (zval *) emalloc(sizeof(zval)), **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);
zend_assign_to_variable_reference(NULL, this_ptr, &object, NULL ELS_CC);
}
original_return_value = EG(return_value);
original_op_array = EG(active_op_array);
EG(return_value) = retval;
EG(active_op_array) = (zend_op_array *) function_state.function;
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));
EG(active_symbol_table) = calling_symbol_table;
EG(active_op_array) = original_op_array;
EG(return_value)=original_return_value;
EG(opline_ptr) = original_opline_ptr;
} else {
((zend_internal_function *) function_state.function)->handler(EG(active_symbol_table), retval, &EG(regular_list), &EG(persistent_list));
((zend_internal_function *) function_state.function)->handler(param_count, retval, &EG(regular_list), &EG(persistent_list), object);
}
zend_hash_destroy(EG(active_symbol_table));
efree(EG(active_symbol_table));
EG(active_symbol_table) = calling_symbol_table;
zend_ptr_stack_clear_multiple(ELS_C);
EG(function_state_ptr) = original_function_state_ptr;
function_state.function_symbol_table = zend_ptr_stack_pop(&EG(function_symbol_table_stack));
return SUCCESS;
}
@@ -394,14 +459,15 @@ ZEND_API inline void zend_assign_to_variable_reference(znode *result, zval **var
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!=value_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);
efree(variable_ptr);
}
if (!value_ptr->is_ref) {
if (!PZVAL_IS_REF(value_ptr)) {
/* break it away */
value_ptr->refcount--;
if (value_ptr->refcount>0) {
@@ -410,8 +476,8 @@ ZEND_API inline void zend_assign_to_variable_reference(znode *result, zval **var
value_ptr = *value_ptr_ptr;
zendi_zval_copy_ctor(*value_ptr);
}
value_ptr->refcount=1;
value_ptr->is_ref=1;
value_ptr->refcount = 1;
value_ptr->is_ref = 1;
}
*variable_ptr_ptr = value_ptr;
@@ -421,7 +487,9 @@ ZEND_API inline void zend_assign_to_variable_reference(znode *result, zval **var
}
if (result && (result->op_type != IS_UNUSED)) {
Ts[result->u.var].var = variable_ptr_ptr;
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);
}
}
@@ -432,8 +500,9 @@ void execute_new_code(CLS_D)
ELS_FETCH();
if (!EG(interactive)
|| CG(active_op_array)->backpatch_count>0) {
|| CG(active_op_array)->backpatch_count>0
|| CG(active_op_array)->function_name
|| CG(active_op_array)->type!=ZEND_USER_FUNCTION) {
return;
}
CG(active_op_array)->start_op_number = CG(active_op_array)->last_executed_op_number;
@@ -443,3 +512,34 @@ void execute_new_code(CLS_D)
CG(active_op_array)->start_op_number = CG(active_op_array)->last_executed_op_number;
}
#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 **p = EG(argument_stack).top_element-1;
int delete_count = (ulong) *p;
EG(argument_stack).top -= (delete_count+1);
while (--delete_count>=0) {
zval_ptr_dtor((zval **) --p);
}
EG(argument_stack).top_element = p;
}
ZEND_API int zend_ptr_stack_get_arg(int requested_arg, void **data ELS_DC)
{
void **p = EG(argument_stack).top_element-1;
int arg_count = (ulong) *p;
if (requested_arg>arg_count) {
return FAILURE;
}
*data = (p-arg_count+requested_arg-1);
return SUCCESS;
}
+50 -16
View File
@@ -4,16 +4,20 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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_extensions.h"
ZEND_API zend_llist zend_extensions;
@@ -45,68 +49,98 @@ int zend_load_extension(char *path)
handle = DL_LOAD(path);
if (!handle) {
zend_printf("Failed loading %s\n", path);
#if !(WIN32||WINNT)
fprintf(stderr, "Failed loading %s: %s\n", path, dlerror());
#else
fprintf(stderr, "Failed loading %s\n", path);
#endif
return FAILURE;
}
extension_version_info = (zend_extension_version_info *) DL_FETCH_SYMBOL(handle, "extension_version_info");
new_extension = (zend_extension *) DL_FETCH_SYMBOL(handle, "zend_extension_entry");
if (!extension_version_info || !new_extension) {
zend_printf("%s doesn't appear to be a valid Zend extension\n", path);
fprintf(stderr, "%s doesn't appear to be a valid Zend extension\n", path);
return FAILURE;
}
if (extension_version_info->zend_extension_api_no > ZEND_EXTENSION_API_NO) {
zend_printf("%s requires Zend version %s or later\n"
fprintf(stderr, "%s requires Zend version %s or later\n"
"Current version %s, API version %d\n",
new_extension->name,
extension_version_info->required_zend_version,
ZEND_VERSION,
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. */
zend_printf("%s is outdated (API version %d, current version %d)\n"
fprintf(stderr, "%s is outdated (API version %d, current version %d)\n"
"Contact %s at %s for a later version of this module.\n",
new_extension->name,
extension_version_info->zend_extension_api_no,
ZEND_EXTENSION_API_NO,
new_extension->author,
new_extension->URL);
DL_UNLOAD(handle);
return FAILURE;
} else if (ZTS_V!=extension_version_info->thread_safe) {
zend_printf("Cannot load %s - it %s thread safe, whereas Zend %s\n",
fprintf(stderr, "Cannot load %s - it %s thread safe, whereas Zend %s\n",
new_extension->name,
(extension_version_info->thread_safe?"is":"isn't"),
(ZTS_V?"is":"isn't"));
DL_UNLOAD(handle);
return FAILURE;
} 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?"does":"does not"));
DL_UNLOAD(handle);
return FAILURE;
}
if (new_extension->startup) {
new_extension->startup(new_extension);
if (new_extension->startup(new_extension)!=SUCCESS) {
DL_UNLOAD(handle);
return FAILURE;
}
}
extension = *new_extension;
extension.handle = handle;
zend_llist_add_element(&zend_extensions, &extension);
/*zend_printf("Loaded %s, version %s\n", extension.name, extension.version);*/
/*fprintf(stderr, "Loaded %s, version %s\n", extension.name, extension.version);*/
zend_append_version_info(&extension);
return SUCCESS;
#else
zend_printf("Extensions are not supported on this platform.\n");
return FAILURE
fprintf(stderr, "Extensions are not supported on this platform.\n");
return FAILURE;
#endif
}
static void zend_extension_shutdown(zend_extension *extension)
{
#if ZEND_EXTENSIONS_SUPPORT
if (extension->shutdown) {
extension->shutdown(extension);
}
#endif
}
void zend_shutdown_extensions()
{
zend_llist_apply(&zend_extensions, (void (*)(void *)) zend_extension_shutdown);
zend_llist_destroy(&zend_extensions);
}
void zend_extension_dtor(zend_extension *extension)
{
#if ZEND_EXTENSIONS_SUPPORT
if (extension->shutdown) {
extension->shutdown(extension);
}
DL_UNLOAD(extension->handle);
#endif
}
+14 -8
View File
@@ -4,27 +4,32 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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_EXTENSIONS_H
#define _ZEND_EXTENSIONS_H
#include "zend_compile.h"
#define ZEND_EXTENSION_API_NO 2
#define ZEND_EXTENSION_API_NO 19990619
typedef struct {
typedef struct _zend_extension_version_info {
int zend_extension_api_no;
char *required_zend_version;
unsigned char thread_safe;
unsigned char debug;
} zend_extension_version_info;
@@ -37,7 +42,7 @@ struct _zend_extension {
char *URL;
char *copyright;
void (*startup)(zend_extension *extension);
int (*startup)(zend_extension *extension);
void (*shutdown)(zend_extension *extension);
void (*activate)();
void (*deactivate)();
@@ -75,7 +80,7 @@ ZEND_API int zend_get_resource_handle();
#define ZEND_EXTENSION() \
ZEND_EXT_API zend_extension_version_info extension_version_info = { ZEND_EXTENSION_API_NO, "0.80A", ZTS_V }
ZEND_EXT_API zend_extension_version_info extension_version_info = { ZEND_EXTENSION_API_NO, "0.90", ZTS_V, ZEND_DEBUG }
#define STANDARD_ZEND_EXTENSION_PROPERTIES NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -1
@@ -86,5 +91,6 @@ void zend_extension_dtor(zend_extension *extension);
int zend_load_extension(char *path);
int zend_load_extensions(char **extension_paths);
void zend_append_version_info(zend_extension *extension);
void zend_shutdown_extensions();
#endif /* _ZEND_EXTENSIONS_H */
+55 -84
View File
@@ -4,108 +4,64 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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_H
#define _ZEND_GLOBALS_H
#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"
#undef ZTS
/* Define ZTS if you want a thread-safe Zend */
/*#undef ZTS*/
#ifdef ZTS
#include "SAPI.h"
#include "../TSRM/TSRM.h"
extern int compiler_globals_id;
extern int executor_globals_id;
#ifdef __cplusplus
class ZendFlexLexer;
#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;
BEGIN_EXTERN_C()
ZEND_API extern int compiler_globals_id;
ZEND_API extern int executor_globals_id;
extern int alloc_globals_id;
END_EXTERN_C()
#endif
#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 = ts_resource(compiler_globals_id)
# define YYPARSE_PARAM compiler_globals
# define YYLEX_PARAM compiler_globals
int zendparse(void *compiler_globals);
#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 = 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 = 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
struct _zend_compiler_globals {
zend_stack bp_stack;
zend_stack switch_cond_stack;
zend_stack foreach_copy_stack;
zend_stack object_stack;
zend_class_entry class_entry, *active_class_entry;
@@ -129,12 +85,23 @@ struct _zend_compiler_globals {
zend_llist filenames_list;
unsigned char short_tags;
unsigned char asp_tags;
zend_bool short_tags;
zend_bool asp_tags;
/* For extensions support */
unsigned char extended_info; /* generate extension information for debugger/profiler */
unsigned char handle_op_arrays; /* run op_arrays through op_array handlers */
zend_bool extended_info; /* generate extension information for debugger/profiler */
zend_bool handle_op_arrays; /* run op_arrays through op_array handlers */
zend_bool unclean_shutdown;
zend_llist open_files;
#ifdef ZTS
#ifdef __cplusplus
ZendFlexLexer *ZFL;
#else
void *ZFL;
#endif
#endif
};
@@ -148,7 +115,6 @@ struct _zend_executor_globals {
zval *error_zval_ptr;
zend_function_state *function_state_ptr;
zend_ptr_stack function_symbol_table_stack;
zend_ptr_stack arg_types_stack;
zend_stack overloaded_objects_stack;
zval global_return_value;
@@ -176,16 +142,21 @@ struct _zend_executor_globals {
long precision;
unsigned int AiCount;
zend_ptr_stack garbage;
/* for extended information support */
unsigned char no_extensions;
zend_bool no_extensions;
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);
zval *garbage[4];
int garbage_ptr;
void *reserved[ZEND_MAX_RESERVED_RESOURCES];
#if SUPPORT_INTERACTIVE
int interactive;
#endif
@@ -207,4 +178,4 @@ struct _zend_alloc_globals {
};
#endif /* _ZEND_GLOBALS_H */
#endif /* _T_GLOBALS_H */
+90
View File
@@ -0,0 +1,90 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 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. |
| 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)
# 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 struct _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
#endif /* _ZEND_GLOBALS_MACROS_H */
+83 -22
View File
@@ -4,22 +4,31 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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 <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include "zend.h"
#include <stdio.h>
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#endif
#ifdef HAVE_LIMITS_H
# include <limits.h>
#endif
#define HANDLE_NUMERIC(key,length,func) { \
register char *tmp=key; \
@@ -51,7 +60,6 @@ static uint PrimeNumbers[] =
{5, 11, 19, 53, 107, 223, 463, 983, 1979, 3907, 7963, 16229, 32531, 65407, 130987, 262237, 524521, 1048793, 2097397, 4194103, 8388857, 16777447, 33554201, 67108961, 134217487, 268435697, 536870683, 1073741621, 2147483399};
static int if_full_do_resize(HashTable *ht);
static int zend_hash_rehash(HashTable *ht);
static uint nNumPrimeNumbers = sizeof(PrimeNumbers) / sizeof(ulong);
@@ -71,7 +79,7 @@ ZEND_API ulong hashpjw(char *arKey, uint nKeyLength)
}
ZEND_API int zend_hash_init(HashTable *ht, uint nSize, ulong(*pHashFunction) (char *arKey, uint nKeyLength), void (*pDestructor) (void *pData),int persistent)
ZEND_API int zend_hash_init(HashTable *ht, uint nSize, ulong(*pHashFunction) (char *arKey, uint nKeyLength), int (*pDestructor) (void *pData),int persistent)
{
uint i;
@@ -631,7 +639,7 @@ static int if_full_do_resize(HashTable *ht)
if ((ht->nNumOfElements > ht->nTableSize) && (ht->nHashSizeIndex < nNumPrimeNumbers - 1)) { /* Let's double the table
size */
t = (Bucket **) perealloc(ht->arBuckets, PrimeNumbers[ht->nHashSizeIndex + 1] * sizeof(Bucket *),ht->persistent);
t = (Bucket **) perealloc_recoverable(ht->arBuckets, PrimeNumbers[ht->nHashSizeIndex + 1] * sizeof(Bucket *),ht->persistent);
if (t) {
HANDLE_BLOCK_INTERRUPTIONS();
ht->arBuckets = t;
@@ -646,7 +654,7 @@ static int if_full_do_resize(HashTable *ht)
return SUCCESS;
}
static int zend_hash_rehash(HashTable *ht)
ZEND_API int zend_hash_rehash(HashTable *ht)
{
Bucket *p;
uint nIndex;
@@ -720,6 +728,7 @@ ZEND_API int zend_hash_del_key_or_index(HashTable *ht, char *arKey, uint nKeyLen
ZEND_API void zend_hash_destroy(HashTable *ht)
{
Bucket *p, *q;
int delete_bucket;
p = ht->pListHead;
while (p != NULL) {
@@ -727,13 +736,19 @@ ZEND_API void zend_hash_destroy(HashTable *ht)
p = p->pListNext;
if (!q->bIsPointer) {
if (ht->pDestructor) {
ht->pDestructor(q->pData);
delete_bucket = ht->pDestructor(q->pData);
} else {
delete_bucket = 1;
}
if (!q->pDataPtr && q->pData) {
if (!q->pDataPtr && q->pData && delete_bucket) {
pefree(q->pData,ht->persistent);
}
} else {
delete_bucket = 1;
}
if (delete_bucket) {
pefree(q,ht->persistent);
}
pefree(q,ht->persistent);
}
pefree(ht->arBuckets,ht->persistent);
}
@@ -779,7 +794,7 @@ ZEND_API void zend_hash_apply(HashTable *ht,int (*destruct) (void *))
q = p;
p = p->pListNext;
if (destruct(q->pData)) {
if (q->arKey == NULL) {
if (q->nKeyLength==0) {
zend_hash_index_del(ht, q->h);
} else {
zend_hash_del(ht,q->arKey,q->nKeyLength);
@@ -798,7 +813,7 @@ ZEND_API void zend_hash_apply_with_argument(HashTable *ht,int (*destruct) (void
q = p;
p = p->pListNext;
if (destruct(q->pData, argument)) {
if (q->arKey == NULL) {
if (q->nKeyLength == 0) {
zend_hash_index_del(ht, q->h);
} else {
zend_hash_del(ht,q->arKey,q->nKeyLength);
@@ -808,6 +823,35 @@ ZEND_API void zend_hash_apply_with_argument(HashTable *ht,int (*destruct) (void
}
ZEND_API void zend_hash_apply_with_arguments(HashTable *ht,int (*destruct)(void *, int, va_list, zend_hash_key *), int num_args, ...)
{
Bucket *p, *q;
va_list args;
zend_hash_key hash_key;
va_start(args, num_args);
p = ht->pListHead;
while (p != NULL) {
q = p;
p = p->pListNext;
hash_key.arKey = q->arKey;
hash_key.nKeyLength = q->nKeyLength;
hash_key.h = q->h;
if (destruct(q->pData, num_args, args, &hash_key)) {
if (q->nKeyLength == 0) {
zend_hash_index_del(ht, q->h);
} else {
zend_hash_del(ht,q->arKey,q->nKeyLength);
}
}
}
va_end(args);
}
ZEND_API void zend_hash_copy(HashTable *target, HashTable *source, void (*pCopyConstructor) (void *pData), void *tmp, uint size)
{
Bucket *p;
@@ -829,20 +873,21 @@ ZEND_API void zend_hash_copy(HashTable *target, HashTable *source, void (*pCopyC
}
ZEND_API void zend_hash_merge(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)
{
Bucket *p;
void *t;
int mode = (overwrite?HASH_UPDATE:HASH_ADD);
p = source->pListHead;
while (p) {
memcpy(tmp, p->pData, size);
if (p->arKey) {
if (zend_hash_add(target, p->arKey, p->nKeyLength, tmp, size, &t)==SUCCESS && pCopyConstructor) {
if (p->nKeyLength>0) {
if (zend_hash_add_or_update(target, p->arKey, p->nKeyLength, tmp, size, &t, mode)==SUCCESS && pCopyConstructor) {
pCopyConstructor(t);
}
} else {
if (!zend_hash_index_exists(target, p->h) && zend_hash_index_update(target, p->h, tmp, size, &t)==SUCCESS && pCopyConstructor) {
if ((mode==HASH_UPDATE || !zend_hash_index_exists(target, p->h)) && zend_hash_index_update(target, p->h, tmp, size, &t)==SUCCESS && pCopyConstructor) {
pCopyConstructor(t);
}
}
@@ -1024,6 +1069,21 @@ ZEND_API int zend_hash_get_current_key(HashTable *ht, char **str_index, ulong *n
}
ZEND_API int zend_hash_get_current_key_type(HashTable *ht)
{
Bucket *p = ht->pInternalPointer;
if (p) {
if (p->nKeyLength) {
return HASH_KEY_IS_STRING;
} else {
return HASH_KEY_IS_LONG;
}
}
return HASH_KEY_NON_EXISTANT;
}
ZEND_API int zend_hash_get_current_data(HashTable *ht, void **pData)
{
Bucket *p = ht->pInternalPointer;
@@ -1037,7 +1097,8 @@ ZEND_API int zend_hash_get_current_data(HashTable *ht, void **pData)
}
ZEND_API int zend_hash_sort(HashTable *ht, int (*compar) (const void *, const void *), int renumber)
ZEND_API int zend_hash_sort(HashTable *ht, sort_func_t sort_func,
compare_func_t compar, int renumber)
{
Bucket **arTmp;
Bucket *p;
@@ -1058,7 +1119,7 @@ ZEND_API int zend_hash_sort(HashTable *ht, int (*compar) (const void *, const vo
i++;
}
qsort((void *) arTmp, i, sizeof(Bucket *), compar);
(*sort_func)((void *) arTmp, i, sizeof(Bucket *), compar);
HANDLE_BLOCK_INTERRUPTIONS();
ht->pListHead = arTmp[0];
+34 -11
View File
@@ -4,17 +4,19 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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 _HASH_
#define _HASH_
@@ -56,13 +58,17 @@ typedef struct hashtable {
Bucket *pListHead;
Bucket *pListTail;
Bucket **arBuckets;
void (*pDestructor) (void *pData);
int (*pDestructor) (void *pData);
unsigned char persistent;
} HashTable;
typedef int (*compare_func_t) (const void *, const void *);
typedef void (*sort_func_t) (void *, size_t, register size_t, compare_func_t);
BEGIN_EXTERN_C()
/* startup/shutdown */
ZEND_API int zend_hash_init(HashTable *ht, uint nSize, ulong(*pHashFunction) (char *arKey, uint nKeyLength), void (*pDestructor) (void *pData), int persistent);
ZEND_API int zend_hash_init(HashTable *ht, uint nSize, ulong(*pHashFunction) (char *arKey, uint nKeyLength), int (*pDestructor) (void *pData), int persistent);
ZEND_API void zend_hash_destroy(HashTable *ht);
ZEND_API void zend_hash_clean(HashTable *ht);
@@ -94,13 +100,26 @@ ZEND_API int zend_hash_index_update_or_next_insert(HashTable *ht, ulong h, void
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;
#define ZEND_STD_HASH_APPLIER \
int (*)(void *element, int num_args, va_list args, zend_hash_key *hash_key)
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 *);
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 *);
ZEND_API void zend_hash_apply_with_arguments(HashTable *ht, ZEND_STD_HASH_APPLIER, int, ...);
@@ -129,18 +148,20 @@ ZEND_API ulong zend_hash_next_free_element(HashTable *ht);
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);
/* 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);
ZEND_API int zend_hash_sort(HashTable *ht, int (*compar) (const void *, const void *), int renumber);
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, sort_func_t sort_func, compare_func_t compare_func, int renumber);
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);
@@ -150,4 +171,6 @@ void zend_hash_display_pListTail(HashTable *ht);
void zend_hash_display(HashTable *ht);
#endif
END_EXTERN_C()
#endif /* _HASH_ */
+27 -20
View File
@@ -4,25 +4,33 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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_compile.h"
#include "zend_highlight.h"
#include "zend_ptr_stack.h"
#include "zend_globals.h"
#ifndef ZTS
extern char *zendtext;
extern int zendleng;
#else
#define zendtext ((char *) zend_get_zendtext(CLS_C))
#define zendleng zend_get_zendleng(CLS_C)
#endif
static void html_putc(char c)
{
@@ -63,8 +71,7 @@ static void html_puts(char *s, uint len)
void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini)
ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini)
{
zval token;
int token_type;
@@ -78,19 +85,19 @@ void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini)
token.type = 0;
while ((token_type=lex_scan(&token CLS_CC))) {
switch (token_type) {
case INLINE_HTML:
case T_INLINE_HTML:
next_color = syntax_highlighter_ini->highlight_html;
break;
case ZEND_COMMENT:
case T_COMMENT:
next_color = syntax_highlighter_ini->highlight_comment;
break;
case PHP_OPEN_TAG:
case T_OPEN_TAG:
next_color = syntax_highlighter_ini->highlight_default;
break;
case PHP_CLOSE_TAG:
case T_CLOSE_TAG:
next_color = syntax_highlighter_ini->highlight_default;
break;
case CONSTANT_ENCAPSED_STRING:
case T_CONSTANT_ENCAPSED_STRING:
next_color = syntax_highlighter_ini->highlight_string;
break;
case '"':
@@ -125,7 +132,7 @@ void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini)
}
}
switch (token_type) {
case DOLLAR_OPEN_CURLY_BRACES:
case T_DOLLAR_OPEN_CURLY_BRACES:
html_puts("{", 1);
break;
default:
@@ -135,13 +142,13 @@ void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini)
if (token.type == IS_STRING) {
switch (token_type) {
case PHP_OPEN_TAG:
case PHP_CLOSE_TAG:
case T_WHITESPACE:
break;
default:
efree(token.value.str.val);
break;
case T_OPEN_TAG:
case T_CLOSE_TAG:
case T_WHITESPACE:
break;
default:
efree(token.value.str.val);
break;
}
}
token.type = 0;
+12 -6
View File
@@ -4,16 +4,20 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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 _HIGHLIGHT_H
#define _HIGHLIGHT_H
@@ -25,7 +29,7 @@
#define HL_KEYWORD_COLOR "#007700" /* green */
typedef struct {
typedef struct _zend_syntax_highlighter_ini {
char *highlight_html;
char *highlight_comment;
char *highlight_default;
@@ -33,10 +37,12 @@ typedef struct {
char *highlight_keyword;
} zend_syntax_highlighter_ini;
void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini);
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);
END_EXTERN_C()
extern zend_syntax_highlighter_ini syntax_highlighter_ini;
+19 -9
View File
@@ -4,16 +4,20 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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> |
+----------------------------------------------------------------------+
*/
/* This indenter doesn't really work, it's here for no particular reason. */
@@ -21,8 +25,14 @@
#include "zend_compile.h"
#include "zend_indent.h"
#ifndef ZTS
extern char *zendtext;
extern int zendleng;
#else
#define zendtext ((char *) zend_get_zendtext(CLS_C))
#define zendleng zend_get_zendleng(CLS_C)
#endif
static void handle_whitespace(int *emit_whitespace)
{
@@ -32,7 +42,7 @@ static void handle_whitespace(int *emit_whitespace)
for (c=0; c<128; c++) {
if (emit_whitespace[c]>0) {
for (i=0; i<emit_whitespace[c]; i++) {
zend_write(&c, 1);
zend_write((char *) &c, 1);
}
}
}
@@ -40,7 +50,7 @@ static void handle_whitespace(int *emit_whitespace)
}
void zend_indent()
ZEND_API void zend_indent()
{
zval token;
int token_type;
@@ -56,7 +66,7 @@ void zend_indent()
token.type = 0;
while ((token_type=lex_scan(&token CLS_CC))) {
switch (token_type) {
case INLINE_HTML:
case T_INLINE_HTML:
zend_write(zendtext, zendleng);
break;
case T_WHITESPACE: {
@@ -127,8 +137,8 @@ dflt_printout:
}
if (token.type == IS_STRING) {
switch (token_type) {
case PHP_OPEN_TAG:
case PHP_CLOSE_TAG:
case T_OPEN_TAG:
case T_CLOSE_TAG:
case T_WHITESPACE:
break;
default:
+9 -5
View File
@@ -4,19 +4,23 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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_INDENT_H
#define _ZEND_INDENT_H
void zend_indent();
ZEND_API void zend_indent();
#endif /* _ZEND_INDENT_H */
+100 -43
View File
@@ -4,36 +4,28 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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> |
+----------------------------------------------------------------------+
*/
/* resource lists */
#include "zend.h"
#include "zend_list.h"
#include "zend_API.h"
#include "zend_globals.h"
#if 0
#if HAVE_DIRENT_H
#include <dirent.h>
#endif
#if MSVC5
#if !(APACHE)
#define NEEDRDH 1
#endif
#include "win32/readdir.h"
#endif
#endif
int le_index_ptr;
ZEND_API int le_index_ptr;
static inline int zend_list_do_insert(HashTable *list,void *ptr, int type)
{
@@ -57,7 +49,7 @@ static inline int zend_list_do_delete(HashTable *list,int id)
ELS_FETCH();
if (zend_hash_index_find(&EG(regular_list), id, (void **) &le)==SUCCESS) {
// printf("del(%d): %d->%d\n", id, le->refcount, le->refcount-1);
/* printf("del(%d): %d->%d\n", id, le->refcount, le->refcount-1); */
if (--le->refcount<=0) {
return zend_hash_index_del(&EG(regular_list), id);
} else {
@@ -83,7 +75,7 @@ static inline void *zend_list_do_find(HashTable *list,int id, int *type)
}
int zend_list_insert(void *ptr, int type)
ZEND_API int zend_list_insert(void *ptr, int type)
{
ELS_FETCH();
@@ -91,7 +83,7 @@ int zend_list_insert(void *ptr, int type)
}
int zend_plist_insert(void *ptr, int type)
ZEND_API int zend_plist_insert(void *ptr, int type)
{
ELS_FETCH();
@@ -99,21 +91,13 @@ int zend_plist_insert(void *ptr, int type)
}
int zend_list_delete(int id)
{
ELS_FETCH();
return zend_list_do_delete(&EG(regular_list), id);
}
int zend_list_addref(int id)
ZEND_API int zend_list_addref(int id)
{
list_entry *le;
ELS_FETCH();
if (zend_hash_index_find(&EG(regular_list), id, (void **) &le)==SUCCESS) {
// printf("add(%d): %d->%d\n", id, le->refcount, le->refcount+1);
/* printf("add(%d): %d->%d\n", id, le->refcount, le->refcount+1); */
le->refcount++;
return SUCCESS;
} else {
@@ -121,7 +105,16 @@ int zend_list_addref(int id)
}
}
int zend_plist_delete(int id)
ZEND_API int zend_list_delete(int id)
{
ELS_FETCH();
return zend_list_do_delete(&EG(regular_list), id);
}
ZEND_API int zend_plist_delete(int id)
{
ELS_FETCH();
@@ -129,7 +122,7 @@ int zend_plist_delete(int id)
}
void *zend_list_find(int id, int *type)
ZEND_API void *zend_list_find(int id, int *type)
{
ELS_FETCH();
@@ -137,7 +130,7 @@ void *zend_list_find(int id, int *type)
}
void *zend_plist_find(int id, int *type)
ZEND_API void *zend_plist_find(int id, int *type)
{
ELS_FETCH();
@@ -145,7 +138,73 @@ void *zend_plist_find(int id, int *type)
}
void list_entry_destructor(void *ptr)
ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type)
{
int rsrc_id;
rsrc_id = zend_list_insert(rsrc_pointer, rsrc_type);
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;
}
int list_entry_destructor(void *ptr)
{
list_entry *le = (list_entry *) ptr;
list_destructors_entry *ld;
@@ -157,10 +216,11 @@ void list_entry_destructor(void *ptr)
} else {
zend_error(E_WARNING,"Unknown list entry type in request shutdown (%d)",le->type);
}
return 1;
}
void plist_entry_destructor(void *ptr)
int plist_entry_destructor(void *ptr)
{
list_entry *le = (list_entry *) ptr;
list_destructors_entry *ld;
@@ -172,21 +232,18 @@ void plist_entry_destructor(void *ptr)
} else {
zend_error(E_WARNING,"Unknown persistent list entry type in module shutdown (%d)",le->type);
}
return 1;
}
int init_resource_list(void)
int init_resource_list(ELS_D)
{
ELS_FETCH();
return zend_hash_init(&EG(regular_list), 0, NULL, list_entry_destructor, 0);
}
int init_resource_plist(void)
int init_resource_plist(ELS_D)
{
ELS_FETCH();
return zend_hash_init(&EG(persistent_list), 0, NULL, plist_entry_destructor, 1);
}
+43 -17
View File
@@ -4,30 +4,35 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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 _LIST_H
#define _LIST_H
#include "zend_hash.h"
#include "zend_globals.h"
extern HashTable list_destructors;
typedef struct {
typedef struct _list_entry {
void *ptr;
int type;
int refcount;
} list_entry;
typedef struct {
typedef struct _list_destructors_entry {
void (*list_destructor)(void *);
void (*plist_destructor)(void *);
int module_number;
@@ -41,21 +46,42 @@ enum list_entry_type {
LE_DB=1000
};
void list_entry_destructor(void *ptr);
void plist_entry_destructor(void *ptr);
int list_entry_destructor(void *ptr);
int plist_entry_destructor(void *ptr);
int clean_module_resource_destructors(list_destructors_entry *ld, int *module_number);
int init_resource_list(void);
int init_resource_plist(void);
int init_resource_list(ELS_D);
int init_resource_plist(ELS_D);
void destroy_resource_list(void);
void destroy_resource_plist(void);
int zend_list_insert(void *ptr, int type);
int zend_plist_insert(void *ptr, int type);
int zend_list_addref(int id);
int zend_list_delete(int id);
int zend_plist_delete(int id);
void *zend_list_find(int id, int *type);
void *zend_plist_find(int id, int *type);
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 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_FALSE; \
}
#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
+34 -6
View File
@@ -4,16 +4,20 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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_llist.h"
@@ -43,12 +47,28 @@ 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_llist_element *tmp = pemalloc(sizeof(zend_llist_element)+l->size-1, l->persistent);
tmp->next = l->head;
tmp->prev = NULL;
if (l->head) {
l->head->prev = tmp;
} else {
l->tail = tmp;
}
l->head = tmp;
memcpy(tmp->data, element, l->size);
}
ZEND_API void zend_llist_del_element(zend_llist *l, void *element)
{
zend_llist_element *current=l->head;
while (current) {
if (current->data == element) {
if (!memcmp(current->data, element, l->size)) {
if (current->prev) {
current->prev->next = current->next;
} else {
@@ -73,7 +93,7 @@ ZEND_API void zend_llist_del_element(zend_llist *l, void *element)
ZEND_API void zend_llist_destroy(zend_llist *l)
{
zend_llist_element *current=l->head, *next;
while (current) {
next = current->next;
if (l->dtor) {
@@ -84,6 +104,14 @@ ZEND_API void zend_llist_destroy(zend_llist *l)
}
}
ZEND_API void zend_llist_clean(zend_llist *l)
{
zend_llist_destroy(l);
l->head = l->tail = NULL;
}
ZEND_API void zend_llist_remove_tail(zend_llist *l)
{
zend_llist_element *old_tail;
+13 -5
View File
@@ -4,16 +4,20 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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_LLIST_H
#define _ZEND_LLIST_H
@@ -25,7 +29,7 @@ typedef struct _zend_llist_element {
char data[1]; /* Needs to always be last in the struct */
} zend_llist_element;
typedef struct {
typedef struct _zend_llist {
zend_llist_element *head;
zend_llist_element *tail;
size_t size;
@@ -34,10 +38,13 @@ typedef struct {
zend_llist_element *traverse_ptr;
} zend_llist;
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_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));
@@ -49,5 +56,6 @@ 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);
END_EXTERN_C()
#endif /* _ZEND_LLIST_H */
+27 -13
View File
@@ -4,47 +4,61 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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 _MODULES_H
#define _MODULES_H
#define INIT_FUNC_ARGS int type, int module_number
#define INIT_FUNC_ARGS_PASSTHRU type, module_number
#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 STANDARD_MODULE_PROPERTIES 0, 0, 0, NULL, 0
#define STANDARD_MODULE_PROPERTIES_EX 0, 0, 0, NULL, 0
#define STANDARD_MODULE_PROPERTIES \
NULL, NULL, STANDARD_MODULE_PROPERTIES_EX
#define MODULE_PERSISTENT 1
#define MODULE_TEMPORARY 2
typedef struct {
typedef struct _zend_module_entry zend_module_entry;
struct _zend_module_entry {
char *name;
function_entry *functions;
zend_function_entry *functions;
int (*module_startup_func)(INIT_FUNC_ARGS);
int (*module_shutdown_func)(SHUTDOWN_FUNC_ARGS);
int (*request_startup_func)(INIT_FUNC_ARGS);
int (*request_shutdown_func)(SHUTDOWN_FUNC_ARGS);
void (*info_func)(void);
int request_started,module_started;
void (*info_func)(ZEND_MODULE_INFO_FUNC_ARGS);
int (*global_startup_func)(void);
int (*global_shutdown_func)(void);
int request_started, module_started;
unsigned char type;
void *handle;
int module_number;
} zend_module_entry;
};
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
#endif
+63 -26
View File
@@ -4,16 +4,20 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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 <stdio.h>
#include "zend.h"
@@ -24,6 +28,7 @@
#include "zend_extensions.h"
#include "zend_API.h"
static void zend_extension_op_array_ctor_handler(zend_extension *extension, zend_op_array *op_array)
{
if (extension->op_array_ctor) {
@@ -59,15 +64,17 @@ void init_op_array(zend_op_array *op_array, int initial_ops_size)
{
op_array->type = ZEND_USER_FUNCTION;
#if SUPPORT_INTERACTIVE
CLS_FETCH();
{
ELS_FETCH();
op_array->start_op_number = op_array->end_op_number = op_array->last_executed_op_number = 0;
op_array->backpatch_count = 0;
if (EG(interactive)) {
/* We must avoid a realloc() on the op_array in interactive mode, since pointers to constants
* will become invalid
*/
initial_ops_size = 8192;
op_array->start_op_number = op_array->end_op_number = op_array->last_executed_op_number = 0;
op_array->backpatch_count = 0;
if (EG(interactive)) {
/* We must avoid a realloc() on the op_array in interactive mode, since pointers to constants
* will become invalid
*/
initial_ops_size = 8192;
}
}
#endif
@@ -90,13 +97,13 @@ void init_op_array(zend_op_array *op_array, int initial_ops_size)
op_array->static_variables = NULL;
op_array->initialized_globals = 0;
op_array->uses_globals = 0;
zend_llist_apply_with_argument(&zend_extensions, (void (*)(void *, void *)) zend_extension_op_array_ctor_handler, op_array);
}
void destroy_zend_function(zend_function *function)
ZEND_API int destroy_zend_function(zend_function *function)
{
switch (function->type) {
case ZEND_USER_FUNCTION:
@@ -106,22 +113,36 @@ void destroy_zend_function(zend_function *function)
/* do nothing */
break;
}
return 1;
}
void destroy_zend_class(zend_class_entry *ce)
ZEND_API int destroy_zend_class(zend_class_entry *ce)
{
if (--(*ce->refcount)>0) {
return 1;
}
switch (ce->type) {
case ZEND_USER_CLASS:
efree(ce->name);
efree(ce->refcount);
zend_hash_destroy(&ce->function_table);
zend_hash_destroy(&ce->default_properties);
break;
case ZEND_INTERNAL_CLASS:
free(ce->name);
free(ce->refcount);
zend_hash_destroy(&ce->function_table);
zend_hash_destroy(&ce->default_properties);
break;
}
return 1;
}
void zend_class_add_ref(zend_class_entry *ce)
{
(*ce->refcount)++;
}
@@ -169,6 +190,20 @@ ZEND_API void destroy_op_array(zend_op_array *op_array)
}
void init_op(zend_op *op CLS_DC)
{
op->lineno = CG(zend_lineno);
op->filename = zend_get_compiled_filename();
op->result.op_type = IS_UNUSED;
op->extended_value = 0;
op->op1.u.EA.var = 0;
op->op1.u.EA.type = 0;
op->op2.u.EA.var = 0;
op->op2.u.EA.type = 0;
op->result.u.EA.var = 0;
op->result.u.EA.type = 0;
}
zend_op *get_next_op(zend_op_array *op_array CLS_DC)
{
int next_op_num = op_array->last++;
@@ -190,9 +225,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;
}
@@ -214,7 +248,7 @@ zend_brk_cont_element *get_next_brk_cont_element(zend_op_array *op_array)
}
static void zend_update_extended_info(zend_op_array *op_array)
static void zend_update_extended_info(zend_op_array *op_array CLS_DC)
{
zend_op *opline = op_array->opcodes, *end=opline+op_array->last;
@@ -234,7 +268,7 @@ static void zend_update_extended_info(zend_op_array *op_array)
}
opline++;
}
opline = get_next_op(op_array);
opline = get_next_op(op_array CLS_CC);
opline->opcode = ZEND_EXT_STMT;
opline->op1.op_type = IS_UNUSED;
opline->op2.op_type = IS_UNUSED;
@@ -258,11 +292,11 @@ int pass_two(zend_op_array *op_array)
{
CLS_FETCH();
if (op_array->type != ZEND_USER_FUNCTION) {
if (op_array->type!=ZEND_USER_FUNCTION && op_array->type!=ZEND_EVAL_CODE) {
return 0;
}
if (CG(extended_info)) {
zend_update_extended_info(op_array);
zend_update_extended_info(op_array CLS_CC);
}
if (CG(handle_op_arrays)) {
zend_llist_apply_with_argument(&zend_extensions, (void (*)(void *, void *)) zend_extension_op_array_handler, op_array);
@@ -295,17 +329,17 @@ int print_class(zend_class_entry *class_entry)
return 0;
}
ZEND_API void *get_unary_op(int opcode)
ZEND_API unary_op_type get_unary_op(int opcode)
{
switch(opcode) {
case ZEND_BW_NOT:
return (void *) bitwise_not_function;
return (unary_op_type) bitwise_not_function;
break;
case ZEND_BOOL_NOT:
return (void *) boolean_not_function;
return (unary_op_type) boolean_not_function;
break;
default:
return (void *) NULL;
return (unary_op_type) NULL;
break;
}
}
@@ -346,6 +380,9 @@ 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_EQUAL:
return (void *) is_equal_function;
break;
+247 -181
View File
@@ -4,16 +4,20 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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 <stdio.h>
#include <errno.h>
#include <stdlib.h>
@@ -24,13 +28,12 @@
#include "zend_operators.h"
#include "zend_variables.h"
#include "zend_globals.h"
#include "zend_list.h"
#if WITH_BCMATH
#include "functions/number.h"
#endif
static inline int is_numeric_string(char *str, int length, long *lval, double *dval);
ZEND_API void convert_scalar_to_number(zval *op)
{
char *strval;
@@ -41,6 +44,9 @@ ZEND_API void convert_scalar_to_number(zval *op)
case IS_DOUBLE:
case IS_LONG:
break;
case IS_BOOL:
op->type = IS_LONG;
break;
#if WITH_BCMATH
case IS_BC:
op->type = IS_DOUBLE; /* may have lost significant digits */
@@ -52,124 +58,101 @@ ZEND_API void convert_scalar_to_number(zval *op)
break;
}
STR_FREE(strval);
} else if (op->type == IS_BOOL || op->type==IS_RESOURCE) {
} else if (op->type==IS_BOOL || op->type==IS_RESOURCE) {
op->type = IS_LONG;
}
}
#define zendi_convert_scalar_to_number(op, holder) \
if ((op)->type == IS_STRING) { \
switch (((holder).type=is_numeric_string((op)->value.str.val, (op)->value.str.len, &(holder).value.lval, &(holder).value.dval))) { \
case IS_DOUBLE: \
case IS_LONG: \
break; \
case IS_BC: \
(holder).type = IS_DOUBLE; /* may have lost significant digits */ \
break; \
default: \
(holder).value.lval = strtol((op)->value.str.val, NULL, 10); \
(holder).type = IS_LONG; \
break; \
} \
(op) = &(holder); \
#define zendi_convert_scalar_to_number(op, holder, result) \
if (op==result) { \
convert_scalar_to_number(op); \
} else if ((op)->type == IS_STRING) { \
switch (((holder).type=is_numeric_string((op)->value.str.val, (op)->value.str.len, &(holder).value.lval, &(holder).value.dval))) { \
case IS_DOUBLE: \
case IS_LONG: \
break; \
case IS_BC: \
(holder).type = IS_DOUBLE; /* may have lost significant digits */ \
break; \
default: \
(holder).value.lval = strtol((op)->value.str.val, NULL, 10); \
(holder).type = IS_LONG; \
break; \
} \
(op) = &(holder); \
} else if ((op)->type==IS_BOOL || (op)->type==IS_RESOURCE) { \
(holder).value.lval = (op)->value.lval; \
(holder).type = IS_LONG; \
(op) = &(holder); \
}
#define zendi_convert_to_long(op, holder) \
if ((op)->type != IS_LONG) { \
switch ((op)->type) { \
case IS_BOOL: \
case IS_RESOURCE: \
break; \
case IS_DOUBLE: \
(holder).value.lval = (long) (op)->value.dval; \
break; \
case IS_STRING: \
(holder).value.lval = strtol((op)->value.str.val, NULL, 10); \
break; \
case IS_ARRAY: \
case IS_OBJECT: \
(holder).value.lval = (zend_hash_num_elements((op)->value.ht)?1:0); \
break; \
default: \
zend_error(E_WARNING, "Cannot convert to ordinal value"); \
(holder).value.lval = 0; \
break; \
} \
(holder).type = IS_LONG; \
(op) = &(holder); \
#define zendi_convert_to_long(op, holder, result) \
if (op==result) { \
convert_to_long(op); \
} else if ((op)->type==IS_BOOL || (op)->type==IS_RESOURCE) { \
(holder).value.lval = (op)->value.lval; \
(holder).type = IS_LONG; \
(op) = &(holder); \
} else if ((op)->type != IS_LONG) { \
switch ((op)->type) { \
case IS_DOUBLE: \
(holder).value.lval = (long) (op)->value.dval; \
break; \
case IS_STRING: \
(holder).value.lval = strtol((op)->value.str.val, NULL, 10); \
break; \
case IS_ARRAY: \
(holder).value.lval = (zend_hash_num_elements((op)->value.ht)?1:0); \
break; \
case IS_OBJECT: \
(holder).value.lval = (zend_hash_num_elements((op)->value.obj.properties)?1:0); \
break; \
default: \
zend_error(E_WARNING, "Cannot convert to ordinal value"); \
(holder).value.lval = 0; \
break; \
} \
(holder).type = IS_LONG; \
(op) = &(holder); \
}
#define zendi_convert_to_boolean(op, holder) \
if ((op)->type != IS_BOOL) { \
switch ((op)->type) { \
case IS_LONG: \
case IS_RESOURCE: \
(holder).value.lval = ((op)->value.lval ? 1 : 0); \
break; \
case IS_DOUBLE: \
(holder).value.lval = ((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')) { \
(holder).value.lval = 0; \
} else { \
(holder).value.lval = 1; \
} \
break; \
case IS_ARRAY: \
case IS_OBJECT: \
(holder).value.lval = (zend_hash_num_elements((op)->value.ht)?1:0); \
break; \
default: \
(holder).value.lval = 0; \
break; \
} \
(holder).type = IS_BOOL; \
(op) = &(holder); \
} \
static inline void zendi_convert_to_string(zval **op_ptr, zval *holder)
{
zval *op = *op_ptr;
ELS_FETCH();
if (op->type != IS_STRING) {
switch (op->type) {
case IS_BOOL:
holder->value.str.val = (op->value.lval?estrndup("1",1):estrndup("0",1));
holder->value.str.len = 1;
break;
case IS_RESOURCE:
case IS_LONG:
holder->value.str.val = (char *) emalloc(MAX_LENGTH_OF_LONG + 1);
holder->value.str.len = zend_sprintf(holder->value.str.val, "%ld", op->value.lval); /* SAFE */
break;
case IS_DOUBLE: {
holder->value.str.val = (char *) emalloc(MAX_LENGTH_OF_DOUBLE + EG(precision) + 1);
holder->value.str.len = zend_sprintf(holder->value.str.val, "%.*G", (int) EG(precision), op->value.dval); /* SAFE */
/* %G already handles removing trailing zeros from the fractional part, yay */
break;
}
case IS_ARRAY:
holder->value.str.val = estrndup("Array",sizeof("Array")-1);
holder->value.str.len = sizeof("Array")-1;
break;
case IS_OBJECT:
holder->value.str.val = estrndup("Object",sizeof("Object")-1);
holder->value.str.len = sizeof("Object")-1;
break;
default:
var_reset(holder);
break;
}
holder->type = IS_STRING;
*op_ptr = holder;
#define zendi_convert_to_boolean(op, holder, result) \
if (op==result) { \
convert_to_boolean(op); \
} else if ((op)->type != IS_BOOL) { \
switch ((op)->type) { \
case IS_RESOURCE: \
case IS_LONG: \
(holder).value.lval = ((op)->value.lval ? 1 : 0); \
break; \
case IS_DOUBLE: \
(holder).value.lval = ((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')) { \
(holder).value.lval = 0; \
} else { \
(holder).value.lval = 1; \
} \
break; \
case IS_ARRAY: \
(holder).value.lval = (zend_hash_num_elements((op)->value.ht)?1:0); \
break; \
case IS_OBJECT: \
(holder).value.lval = (zend_hash_num_elements((op)->value.obj.properties)?1:0); \
break; \
default: \
(holder).value.lval = 0; \
break; \
} \
(holder).type = IS_BOOL; \
(op) = &(holder); \
}
}
ZEND_API void convert_to_long(zval *op)
{
@@ -183,37 +166,32 @@ ZEND_API void convert_to_long_base(zval *op, int base)
long tmp;
switch (op->type) {
case IS_BOOL:
case IS_RESOURCE:
case IS_BOOL:
case IS_LONG:
return;
break;
case IS_DOUBLE:
op->value.lval = (long) op->value.dval;
op->type = IS_LONG;
break;
case IS_STRING:
strval = op->value.str.val;
op->value.lval = strtol(strval, NULL, base);
op->type = IS_LONG;
STR_FREE(strval);
break;
case IS_ARRAY:
tmp = (zend_hash_num_elements(op->value.ht)?1:0);
zval_dtor(op);
op->value.lval = tmp;
op->type = IS_LONG;
break;
case IS_OBJECT:
tmp = (zend_hash_num_elements(op->value.obj.properties)?1:0);
zval_dtor(op);
op->value.lval = tmp;
op->type = IS_LONG;
break;
default:
zend_error(E_WARNING, "Cannot convert to ordinal value");
zval_dtor(op);
op->value.lval = 0;
op->type = IS_LONG;
break;
}
@@ -227,8 +205,8 @@ ZEND_API void convert_to_double(zval *op)
double tmp;
switch (op->type) {
case IS_BOOL:
case IS_RESOURCE:
case IS_BOOL:
case IS_LONG:
op->value.dval = (double) op->value.lval;
op->type = IS_DOUBLE;
@@ -243,12 +221,17 @@ ZEND_API void convert_to_double(zval *op)
STR_FREE(strval);
break;
case IS_ARRAY:
case IS_OBJECT:
tmp = (zend_hash_num_elements(op->value.ht)?1:0);
zval_dtor(op);
op->value.dval = tmp;
op->type = IS_DOUBLE;
break;
case IS_OBJECT:
tmp = (zend_hash_num_elements(op->value.obj.properties)?1:0);
zval_dtor(op);
op->value.dval = tmp;
op->type = IS_DOUBLE;
break;
default:
zend_error(E_WARNING, "Cannot convert to real value (type=%d)", op->type);
zval_dtor(op);
@@ -267,8 +250,8 @@ ZEND_API void convert_to_boolean(zval *op)
switch (op->type) {
case IS_BOOL:
break;
case IS_LONG:
case IS_RESOURCE:
case IS_LONG:
op->value.lval = (op->value.lval ? 1 : 0);
break;
case IS_DOUBLE:
@@ -286,11 +269,15 @@ ZEND_API void convert_to_boolean(zval *op)
STR_FREE(strval);
break;
case IS_ARRAY:
case IS_OBJECT:
tmp = (zend_hash_num_elements(op->value.ht)?1:0);
zval_dtor(op);
op->value.lval = tmp;
break;
case IS_OBJECT:
tmp = (zend_hash_num_elements(op->value.obj.properties)?1:0);
zval_dtor(op);
op->value.lval = tmp;
break;
default:
zval_dtor(op);
op->value.lval = 0;
@@ -310,8 +297,13 @@ ZEND_API void convert_to_string(zval *op)
case IS_STRING:
break;
case IS_BOOL:
op->value.str.val = (op->value.lval?estrndup("1",1):estrndup("0",0));
op->value.str.len = 1;
if (op->value.lval) {
op->value.str.val = estrndup("1", 1);
op->value.str.len = 1;
} else {
op->value.str.val = empty_string;
op->value.str.len = 0;
}
break;
case IS_LONG:
lval = op->value.lval;
@@ -350,8 +342,7 @@ static void convert_scalar_to_array(zval *op, int type)
zval *entry = (zval *) emalloc(sizeof(zval));
*entry = *op;
entry->refcount = 1;
entry->is_ref = 0;
INIT_PZVAL(entry);
switch (type) {
case IS_ARRAY:
@@ -364,7 +355,7 @@ static void convert_scalar_to_array(zval *op, int type)
op->value.obj.properties = (HashTable *) emalloc(sizeof(HashTable));
zend_hash_init(op->value.obj.properties, 0, NULL, PVAL_PTR_DTOR, 0);
zend_hash_update(op->value.obj.properties, "scalar", sizeof("scalar"), (void *) &entry, sizeof(zval *), NULL);
op->value.obj.ce = &standard_class;
op->value.obj.ce = &zend_standard_class_def;
op->type = IS_OBJECT;
break;
}
@@ -395,7 +386,7 @@ ZEND_API void convert_to_object(zval *op)
case IS_ARRAY:
op->type = IS_OBJECT;
op->value.obj.properties = op->value.ht;
op->value.obj.ce = &standard_class;
op->value.obj.ce = &zend_standard_class_def;
return;
break;
case IS_OBJECT:
@@ -413,15 +404,23 @@ ZEND_API int add_function(zval *result, zval *op1, zval *op2)
zval op1_copy, op2_copy;
if (op1->type == IS_ARRAY && op2->type == IS_ARRAY) {
zval tmp;
zend_hash_merge(op1->value.ht,op2->value.ht,(void (*)(void *pData)) zval_copy_ctor, (void *) &tmp, sizeof(zval));
*result = *op1;
zval_dtor(op2);
zval *tmp;
if ((result == op1) && (result == op2)) {
/* $a += $a */
return SUCCESS;
}
if (result != op1) {
/* $a += $b */
*result = *op1;
zval_copy_ctor(result);
}
zend_hash_merge(result->value.ht, op2->value.ht, (void (*)(void *pData)) zval_add_ref, (void *) &tmp, sizeof(zval *), 0);
return SUCCESS;
}
zendi_convert_scalar_to_number(op1, op1_copy);
zendi_convert_scalar_to_number(op2, op2_copy);
zendi_convert_scalar_to_number(op1, op1_copy, result);
zendi_convert_scalar_to_number(op2, op2_copy, result);
if (op1->type == IS_LONG && op2->type == IS_LONG) {
double dval = (double) op1->value.lval + (double) op2->value.lval;
@@ -437,10 +436,10 @@ ZEND_API int add_function(zval *result, zval *op1, zval *op2)
}
if ((op1->type == IS_DOUBLE && op2->type == IS_LONG)
|| (op1->type == IS_LONG && op2->type == IS_DOUBLE)) {
result->type = IS_DOUBLE;
result->value.dval = (op1->type == IS_LONG ?
(((double) op1->value.lval) + op2->value.dval) :
(op1->value.dval + ((double) op2->value.lval)));
result->type = IS_DOUBLE;
return SUCCESS;
}
if (op1->type == IS_DOUBLE && op2->type == IS_DOUBLE) {
@@ -457,8 +456,8 @@ ZEND_API int sub_function(zval *result, zval *op1, zval *op2)
{
zval op1_copy, op2_copy;
zendi_convert_scalar_to_number(op1, op1_copy);
zendi_convert_scalar_to_number(op2, op2_copy);
zendi_convert_scalar_to_number(op1, op1_copy, result);
zendi_convert_scalar_to_number(op2, op2_copy, result);
if (op1->type == IS_LONG && op2->type == IS_LONG) {
double dval = (double) op1->value.lval - (double) op2->value.lval;
@@ -474,10 +473,10 @@ ZEND_API int sub_function(zval *result, zval *op1, zval *op2)
}
if ((op1->type == IS_DOUBLE && op2->type == IS_LONG)
|| (op1->type == IS_LONG && op2->type == IS_DOUBLE)) {
result->type = IS_DOUBLE;
result->value.dval = (op1->type == IS_LONG ?
(((double) op1->value.lval) - op2->value.dval) :
(op1->value.dval - ((double) op2->value.lval)));
result->type = IS_DOUBLE;
return SUCCESS;
}
if (op1->type == IS_DOUBLE && op2->type == IS_DOUBLE) {
@@ -494,8 +493,8 @@ ZEND_API int mul_function(zval *result, zval *op1, zval *op2)
{
zval op1_copy, op2_copy;
zendi_convert_scalar_to_number(op1, op1_copy);
zendi_convert_scalar_to_number(op2, op2_copy);
zendi_convert_scalar_to_number(op1, op1_copy, result);
zendi_convert_scalar_to_number(op2, op2_copy, result);
if (op1->type == IS_LONG && op2->type == IS_LONG) {
double dval = (double) op1->value.lval * (double) op2->value.lval;
@@ -511,10 +510,10 @@ ZEND_API int mul_function(zval *result, zval *op1, zval *op2)
}
if ((op1->type == IS_DOUBLE && op2->type == IS_LONG)
|| (op1->type == IS_LONG && op2->type == IS_DOUBLE)) {
result->type = IS_DOUBLE;
result->value.dval = (op1->type == IS_LONG ?
(((double) op1->value.lval) * op2->value.dval) :
(op1->value.dval * ((double) op2->value.lval)));
result->type = IS_DOUBLE;
return SUCCESS;
}
if (op1->type == IS_DOUBLE && op2->type == IS_DOUBLE) {
@@ -530,8 +529,8 @@ ZEND_API int div_function(zval *result, zval *op1, zval *op2)
{
zval op1_copy, op2_copy;
zendi_convert_scalar_to_number(op1, op1_copy);
zendi_convert_scalar_to_number(op2, op2_copy);
zendi_convert_scalar_to_number(op1, op1_copy, result);
zendi_convert_scalar_to_number(op2, op2_copy, result);
if ((op2->type == IS_LONG && op2->value.lval == 0) || (op2->type == IS_DOUBLE && op2->value.dval == 0.0)) {
zend_error(E_WARNING, "Division by zero");
@@ -550,10 +549,10 @@ ZEND_API int div_function(zval *result, zval *op1, zval *op2)
}
if ((op1->type == IS_DOUBLE && op2->type == IS_LONG)
|| (op1->type == IS_LONG && op2->type == IS_DOUBLE)) {
result->type = IS_DOUBLE;
result->value.dval = (op1->type == IS_LONG ?
(((double) op1->value.lval) / op2->value.dval) :
(op1->value.dval / ((double) op2->value.lval)));
result->type = IS_DOUBLE;
return SUCCESS;
}
if (op1->type == IS_DOUBLE && op2->type == IS_DOUBLE) {
@@ -570,8 +569,8 @@ ZEND_API int mod_function(zval *result, zval *op1, zval *op2)
{
zval op1_copy, op2_copy;
zendi_convert_to_long(op1, op1_copy);
zendi_convert_to_long(op2, op2_copy);
zendi_convert_to_long(op1, op1_copy, result);
zendi_convert_to_long(op2, op2_copy, result);
if (op2->value.lval == 0) {
var_reset(result);
@@ -590,12 +589,12 @@ ZEND_API int boolean_or_function(zval *result, zval *op1, zval *op2)
result->type = IS_BOOL;
zendi_convert_to_boolean(op1, op1_copy);
zendi_convert_to_boolean(op1, op1_copy, result);
if (op1->value.lval) {
result->value.lval = 1;
return SUCCESS;
}
zendi_convert_to_boolean(op2, op2_copy);
zendi_convert_to_boolean(op2, op2_copy, result);
if (op2->value.lval) {
result->value.lval = 1;
return SUCCESS;
@@ -611,12 +610,12 @@ ZEND_API int boolean_and_function(zval *result, zval *op1, zval *op2)
result->type = IS_BOOL;
zendi_convert_to_boolean(op1, op1_copy);
zendi_convert_to_boolean(op1, op1_copy, result);
if (!op1->value.lval) {
result->value.lval = 0;
return SUCCESS;
}
zendi_convert_to_boolean(op2, op2_copy);
zendi_convert_to_boolean(op2, op2_copy, result);
if (!op2->value.lval) {
result->value.lval = 0;
return SUCCESS;
@@ -632,8 +631,8 @@ ZEND_API int boolean_xor_function(zval *result, zval *op1, zval *op2)
result->type = IS_BOOL;
zendi_convert_to_boolean(op1, op1_copy);
zendi_convert_to_boolean(op2, op2_copy);
zendi_convert_to_boolean(op1, op1_copy, result);
zendi_convert_to_boolean(op2, op2_copy, result);
result->value.lval = op1->value.lval ^ op2->value.lval;
return SUCCESS;
}
@@ -643,7 +642,7 @@ ZEND_API int boolean_not_function(zval *result, zval *op1)
{
zval op1_copy;
zendi_convert_to_boolean(op1, op1_copy);
zendi_convert_to_boolean(op1, op1_copy, result);
result->type = IS_BOOL;
result->value.lval = !op1->value.lval;
@@ -705,8 +704,8 @@ ZEND_API int bitwise_or_function(zval *result, zval *op1, zval *op2)
}
return SUCCESS;
}
zendi_convert_to_long(op1, op1_copy);
zendi_convert_to_long(op2, op2_copy);
zendi_convert_to_long(op1, op1_copy, result);
zendi_convert_to_long(op2, op2_copy, result);
result->type = IS_LONG;
result->value.lval = op1->value.lval | op2->value.lval;
@@ -739,8 +738,8 @@ ZEND_API int bitwise_and_function(zval *result, zval *op1, zval *op2)
}
zendi_convert_to_long(op1, op1_copy);
zendi_convert_to_long(op2, op2_copy);
zendi_convert_to_long(op1, op1_copy, result);
zendi_convert_to_long(op2, op2_copy, result);
result->type = IS_LONG;
result->value.lval = op1->value.lval & op2->value.lval;
@@ -772,8 +771,8 @@ ZEND_API int bitwise_xor_function(zval *result, zval *op1, zval *op2)
return SUCCESS;
}
zendi_convert_to_long(op1, op1_copy);
zendi_convert_to_long(op2, op2_copy);
zendi_convert_to_long(op1, op1_copy, result);
zendi_convert_to_long(op2, op2_copy, result);
result->type = IS_LONG;
result->value.lval = op1->value.lval ^ op2->value.lval;
@@ -785,8 +784,8 @@ ZEND_API int shift_left_function(zval *result, zval *op1, zval *op2)
{
zval op1_copy, op2_copy;
zendi_convert_to_long(op1, op1_copy);
zendi_convert_to_long(op2, op2_copy);
zendi_convert_to_long(op1, op1_copy, result);
zendi_convert_to_long(op2, op2_copy, result);
result->value.lval = op1->value.lval << op2->value.lval;
result->type = IS_LONG;
return SUCCESS;
@@ -797,8 +796,8 @@ ZEND_API int shift_right_function(zval *result, zval *op1, zval *op2)
{
zval op1_copy, op2_copy;
zendi_convert_to_long(op1, op1_copy);
zendi_convert_to_long(op2, op2_copy);
zendi_convert_to_long(op1, op1_copy, result);
zendi_convert_to_long(op2, op2_copy, result);
result->value.lval = op1->value.lval >> op2->value.lval;
result->type = IS_LONG;
return SUCCESS;
@@ -834,11 +833,18 @@ ZEND_API int add_string_to_string(zval *result, zval *op1, zval *op2)
ZEND_API int concat_function(zval *result, zval *op1, zval *op2)
{
zval op1_copy, op2_copy;
zval *orig_op1=op1, *orig_op2=op2;
zendi_convert_to_string(&op1, &op1_copy);
zendi_convert_to_string(&op2, &op2_copy);
int use_copy1, use_copy2;
zend_make_printable_zval(op1, &op1_copy, &use_copy1);
zend_make_printable_zval(op2, &op2_copy, &use_copy2);
if (use_copy1) {
op1 = &op1_copy;
}
if (use_copy2) {
op2 = &op2_copy;
}
if (result==op1) { /* special case, perform operations on result */
uint res_len = op1->value.str.len + op2->value.str.len;
@@ -859,10 +865,10 @@ ZEND_API int concat_function(zval *result, zval *op1, zval *op2)
result->value.str.val[result->value.str.len] = 0;
result->type = IS_STRING;
}
if (orig_op1 != op1) {
if (use_copy1) {
zval_dtor(op1);
}
if (orig_op2 != op2) {
if (use_copy2) {
zval_dtor(op2);
}
return SUCCESS;
@@ -874,19 +880,19 @@ ZEND_API int compare_function(zval *result, zval *op1, zval *op2)
zval op1_copy, op2_copy;
if (op1->type == IS_STRING && op2->type == IS_STRING) {
zendi_smart_strcmp(result,op1,op2);
zendi_smart_strcmp(result, op1, op2);
return SUCCESS;
}
if (op1->type == IS_BOOL || op2->type == IS_BOOL) {
convert_to_boolean(op1);
convert_to_boolean(op2);
zendi_convert_to_boolean(op1, op1_copy, result);
zendi_convert_to_boolean(op2, op2_copy, result);
result->type = IS_LONG;
result->value.lval = (op1->value.lval!=op2->value.lval);
result->value.lval = op1->value.lval - op2->value.lval;
return SUCCESS;
}
zendi_convert_scalar_to_number(op1, op1_copy);
zendi_convert_scalar_to_number(op2, op2_copy);
zendi_convert_scalar_to_number(op1, op1_copy, result);
zendi_convert_scalar_to_number(op2, op2_copy, result);
if (op1->type == IS_LONG && op2->type == IS_LONG) {
result->type = IS_LONG;
@@ -895,8 +901,8 @@ ZEND_API int compare_function(zval *result, zval *op1, zval *op2)
}
if ((op1->type == IS_DOUBLE || op1->type == IS_LONG)
&& (op2->type == IS_DOUBLE || op2->type == IS_LONG)) {
result->type = IS_DOUBLE;
result->value.dval = (op1->type == IS_LONG ? (double) op1->value.lval : op1->value.dval) - (op2->type == IS_LONG ? (double) op2->value.lval : op2->value.dval);
result->type = IS_DOUBLE;
return SUCCESS;
}
if ((op1->type==IS_ARRAY || op1->type==IS_OBJECT)
@@ -908,6 +914,42 @@ ZEND_API int compare_function(zval *result, zval *op1, zval *op2)
}
ZEND_API int is_identical_function(zval *result, zval *op1, zval *op2)
{
result->type = IS_BOOL;
if (op1->type != op2->type) {
result->value.lval = 0;
return SUCCESS;
}
switch (op1->type) {
case IS_BOOL:
case IS_LONG:
case IS_RESOURCE:
result->value.lval = (op1->value.lval == op2->value.lval);
return SUCCESS;
break;
case IS_DOUBLE:
result->value.lval = (op1->value.dval == op2->value.dval);
return SUCCESS;
break;
case IS_STRING:
if ((op1->value.str.len == op2->value.str.len)
&& (!memcmp(op1->value.str.val, op2->value.str.val, op1->value.str.len))) {
result->value.lval = 1;
} else {
result->value.lval = 0;
}
return SUCCESS;
break;
case IS_ARRAY:
case IS_OBJECT:
zend_error(E_WARNING,"Cannot compare arrays or objects");
break;
}
var_reset(result);
return FAILURE;
}
ZEND_API int is_equal_function(zval *result, zval *op1, zval *op2)
{
if (compare_function(result, op1, op2) == FAILURE) {
@@ -940,7 +982,6 @@ 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)
{
//printf("Comparing %d and %d\n", op1->value.lval, op2->value.lval);
if (compare_function(result, op1, op2) == FAILURE) {
return FAILURE;
}
@@ -1111,6 +1152,7 @@ ZEND_API int decrement_function(zval *op1)
op1->type = IS_LONG;
break;
} else if (is_numeric_string(op1->value.str.val, op1->value.str.len, &lval, NULL)==IS_LONG) { /* long */
STR_FREE(op1->value.str.val);
op1->value.lval = lval-1;
op1->type = IS_LONG;
break;
@@ -1155,6 +1197,30 @@ ZEND_API int zend_binary_strcmp(zval *s1, zval *s2)
}
ZEND_API int zend_binary_strcasecmp(zval *s1, zval *s2)
{
const unsigned char *p1 = (const unsigned char *)s1->value.str.val;
const unsigned char *p2 = (const unsigned char *)s2->value.str.val;
unsigned char c1 = 0, c2 = 0;
int len1, len2;
len1 = s1->value.str.len;
len2 = s2->value.str.len;
if (len1 != len2 || !len1) {
return len1 - len2;
}
while (len1--) {
c1 = tolower(*p1++);
c2 = tolower(*p2++);
if (c1 != c2) {
break;
}
}
return c1 - c2;
}
ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2)
{
int ret1,ret2;
@@ -1205,7 +1271,7 @@ ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2)
*/
#if 1
static inline int is_numeric_string(char *str, int length, long *lval, double *dval)
ZEND_API inline int is_numeric_string(char *str, int length, long *lval, double *dval)
{
long local_lval;
double local_dval;
+69 -4
View File
@@ -4,16 +4,20 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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 _OPERATORS_H
#define _OPERATORS_H
@@ -38,13 +42,16 @@ 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_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);
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_long(zval *op);
@@ -55,12 +62,70 @@ 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);
END_EXTERN_C()
ZEND_API int zval_is_true(zval *op);
ZEND_API int 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 void zendi_smart_strcmp(zval *result, zval *s1, zval *s2);
#define convert_to_long_ex(ppzv) \
if ((*ppzv)->type!=IS_LONG) { \
if (!(*ppzv)->is_ref) { \
SEPARATE_ZVAL(ppzv); \
} \
convert_to_long(*ppzv); \
}
#define convert_to_double_ex(ppzv) \
if ((*ppzv)->type!=IS_DOUBLE) { \
if (!(*ppzv)->is_ref) { \
SEPARATE_ZVAL(ppzv); \
} \
convert_to_double(*ppzv); \
}
#define convert_to_string_ex(ppzv) \
if ((*ppzv)->type!=IS_STRING) { \
if (!(*ppzv)->is_ref) { \
SEPARATE_ZVAL(ppzv); \
} \
convert_to_string(*ppzv); \
}
#define convert_to_array_ex(ppzv) \
if ((*ppzv)->type!=IS_ARRAY) { \
if (!(*ppzv)->is_ref) { \
SEPARATE_ZVAL(ppzv); \
} \
convert_to_array(*ppzv); \
}
#define convert_to_object_ex(ppzv) \
if ((*ppzv)->type!=IS_OBJECT) { \
if (!(*ppzv)->is_ref) { \
SEPARATE_ZVAL(ppzv); \
} \
convert_to_object(*ppzv); \
}
#define convert_to_boolean_ex(ppzv) \
if ((*ppzv)->type!=IS_BOOL) { \
if (!(*ppzv)->is_ref) { \
SEPARATE_ZVAL(ppzv); \
} \
convert_to_boolean(*ppzv); \
}
#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); \
}
#endif
+53 -10
View File
@@ -4,24 +4,30 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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_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;
}
@@ -29,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 inline 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 inline 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,4 +108,7 @@ ZEND_API void zend_ptr_stack_clean(zend_ptr_stack *stack, void (*func)(void *))
{
zend_ptr_stack_apply(stack, func);
stack->top = 0;
stack->top_element = stack->elements;
}
+11 -6
View File
@@ -4,10 +4,13 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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> |
@@ -18,18 +21,20 @@
#ifndef _ZEND_PTR_STACK_H
#define _ZEND_PTR_STACK_H
typedef struct {
typedef struct _zend_ptr_stack {
short 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 *));
+12 -6
View File
@@ -4,24 +4,29 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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 <stdio.h>
#include "zend.h"
#if HAVE_STDARG_H
#include <stdarg.h>
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#endif
#if BROKEN_SPRINTF
int zend_sprintf(char *buffer, const char *format, ...)
{
va_list args;
@@ -32,3 +37,4 @@ int zend_sprintf(char *buffer, const char *format, ...)
return strlen(buffer);
}
#endif
+54 -4
View File
@@ -4,16 +4,20 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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_stack.h"
@@ -112,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 (*apply_function)(void *element), int type)
{
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 (*apply_function)(void *element, void *arg), int type, 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;
}
}
+13 -5
View File
@@ -4,20 +4,24 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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_STACK_H
#define _ZEND_STACK_H
typedef struct {
typedef struct _zend_stack {
int top, max;
void **elements;
} zend_stack;
@@ -34,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 (*apply_function)(void *element), int type);
ZEND_API void zend_stack_apply_with_argument(zend_stack *stack, int (*apply_function)(void *element, void *arg), int type, void *arg);
#define ZEND_STACK_APPLY_TOPDOWN 1
#define ZEND_STACK_APPLY_BOTTOMUP 2
#endif /* _ZEND_STACK_H */
+56 -31
View File
@@ -4,16 +4,20 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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 <stdio.h>
#include "zend.h"
#include "zend_API.h"
@@ -47,39 +51,28 @@ ZEND_API inline void var_uninit(zval *var)
}
ZEND_API void zval_dtor(zval *zvalue)
ZEND_API int _zval_dtor(zval *zvalue ZEND_FILE_LINE_DC)
{
if (zvalue->type==IS_LONG) {
return;
return 1;
}
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: {
ELS_FETCH();
if (zvalue->value.ht && (zvalue->value.ht != &EG(symbol_table))) {
if (EG(AiCount)==0) {
zend_hash_destroy(zvalue->value.ht);
efree(zvalue->value.ht);
} else {
zend_ptr_stack_push(&EG(garbage), zvalue->value.ht);
}
zend_hash_destroy(zvalue->value.ht);
efree_rel(zvalue->value.ht);
}
}
break;
case IS_OBJECT: {
ELS_FETCH();
if (EG(AiCount)==0) {
zend_hash_destroy(zvalue->value.obj.properties);
efree(zvalue->value.obj.properties);
} else {
zend_ptr_stack_push(&EG(garbage), zvalue->value.obj.properties);
}
}
case IS_OBJECT:
zend_hash_destroy(zvalue->value.obj.properties);
efree_rel(zvalue->value.obj.properties);
break;
case IS_RESOURCE:
/* destroy resource */
@@ -89,21 +82,30 @@ ZEND_API void zval_dtor(zval *zvalue)
case IS_DOUBLE:
case IS_BOOL:
default:
return;
return 1;
break;
}
return 1;
}
void zval_del_ref(zval **p)
{
(*p)->refcount--;
if ((*p)->refcount==0) {
zval_dtor(*p);
efree(*p);
}
}
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:
@@ -123,18 +125,20 @@ ZEND_API int zval_copy_ctor(zval *zvalue)
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: {
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));
zvalue->value.ht = (HashTable *) emalloc_rel(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 *));
}
@@ -143,7 +147,7 @@ ZEND_API int zval_copy_ctor(zval *zvalue)
zval *tmp;
HashTable *original_ht = zvalue->value.obj.properties;
zvalue->value.obj.properties = (HashTable *) emalloc(sizeof(HashTable));
zvalue->value.obj.properties = (HashTable *) emalloc_rel(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 *));
}
@@ -159,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 int _zval_dtor_wrapper(zval *zvalue)
{
return zval_dtor(zvalue);
}
ZEND_API int _zval_ptr_dtor_wrapper(zval **zval_ptr)
{
return zval_ptr_dtor(zval_ptr);
}
#endif
/*
* Local variables:
* tab-width: 4
+37 -11
View File
@@ -4,30 +4,56 @@
+----------------------------------------------------------------------+
| Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
+----------------------------------------------------------------------+
| This source file is subject to the Zend license, that is bundled |
| with this package in the file LICENSE. If you did not receive a |
| copy of the Zend license, please mail us at zend@zend.com so we can |
| send you a copy immediately. |
| This source file is subject to version 0.91 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. |
| 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 _VARIABLES_H
#define _VARIABLES_H
ZEND_API int zend_print_variable(zval *var);
ZEND_API int zval_copy_ctor(zval *zvalue);
ZEND_API void zval_dtor(zval *zvalue);
ZEND_API void zval_ptr_dtor(zval **zval_ptr);
void zval_add_ref(zval **p);
BEGIN_EXTERN_C()
ZEND_API int _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC);
ZEND_API int _zval_dtor(zval *zvalue ZEND_FILE_LINE_DC);
ZEND_API int _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)
#define PVAL_DESTRUCTOR (void (*)(void *)) zval_dtor
#define PVAL_PTR_DTOR (void (*)(void *)) zval_ptr_dtor
#define PVAL_COPY_CTOR (void (*)(void *)) zval_copy_ctor
#if ZEND_DEBUG
ZEND_API int _zval_copy_ctor_wrapper(zval *zvalue);
ZEND_API int _zval_dtor_wrapper(zval *zvalue);
ZEND_API int _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()
void zval_add_ref(zval **p);
void zval_del_ref(zval **p);
#define PVAL_DESTRUCTOR (int (*)(void *)) zval_dtor_wrapper
#define PVAL_PTR_DTOR (int (*)(void *)) zval_ptr_dtor_wrapper
#define PVAL_COPY_CTOR (void (*)(void *)) zval_copy_ctor_wrapper
ZEND_API void var_reset(zval *var);
ZEND_API void var_uninit(zval *var);
-261
View File
@@ -1,261 +0,0 @@
/* This is the default configuration file to read */
#define CONFIGURATION_FILE_PATH "php3.ini"
#define USE_CONFIG_FILE 1
/* 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
/* crypt capability checks */
#undef PHP3_STD_DES_CRYPT
#undef PHP3_EXT_DES_CRYPT
#undef PHP3_MD5_CRYPT
#undef PHP3_BLOWFISH_CRYPT
/* 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 the resolv library (-lresolv). */
#define HAVE_LIBRESOLV 0
/* Define if you have the gd library (-lgd). */
#define HAVE_LIBGD 0
/* Define if you have the zlib library */
#define HAVE_ZLIB 0
/* Define if you have the gd version 1.3 library (-lgd). */
#define HAVE_LIBGD13 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 if you want the logging to go to ndbm/gdbm/flatfile */
#define LOG_DBM 0
#define LOG_DBM_DIR "."
/* Define if you want the logging to go to a mysql database */
#define LOG_MYSQL 0
/* Define if you want the logging to go to a mysql database */
#define LOG_MSQL 0
/* Define these if you are using an SQL database for logging */
#define LOG_SQL_HOST ""
#define LOG_SQL_DB ""
/* Define if you an ndbm compatible library (-ldbm). */
#define NDBM 0
/* Define if you have the gdbm library (-lgdbm). */
#define GDBM 0
/* Define both of these if you want the bundled REGEX library */
#define REGEX 0
#define HSREGEX 0
/* Define if you want Solid database support */
#define HAVE_SOLID 0
/* Define if you want to use the supplied dbase library */
#define DBASE 0
/* Define if you want Hyperwave support */
#define HYPERWAVE 0
/* Define if you have the crypt() function */
#define HAVE_CRYPT 1
/* Define if you have the Oracle database client libraries */
#define HAVE_ORACLE 0
/* Define if you have the Oracle version 8 database client libraries */
#define HAVE_OCI8 0
/* Define if you want to use the iODBC database driver */
#define HAVE_IODBC 0
/* Define if you want to use the OpenLink ODBC database driver */
#define HAVE_OPENLINK 0
/* Define if you have the AdabasD client libraries */
#define HAVE_ADABAS 0
/* Define if you want the LDAP directory interface */
#define HAVE_LDAP 0
/* Define if you want the SNMP interface */
#define HAVE_SNMP 0
/* Define if you want the IMAP directory interface */
#define HAVE_IMAP 0
/* Define if you want to use a custom ODBC database driver */
#define HAVE_CODBC 0
/* Define to use the unified ODBC interface */
#define HAVE_UODBC 0
/* Define if you have libdl (used for dynamic linking) */
#define HAVE_LIBDL 0
/* Define if you have libdnet_stub (used for Sybase support) */
#define HAVE_LIBDNET_STUB 0
/* Define if you have and want to use libcrypt */
#define HAVE_LIBCRYPT 0
/* Define if you have and want to use libnsl */
#define HAVE_LIBNSL 0
/* Define if you have and want to use libsocket */
#define HAVE_LIBSOCKET 0
/* 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 HAVE_EMPRESS
#define HAVE_EMPRESS 0
#endif
#define HAVE_SYBASE 0
#define HAVE_SYBASE_CT 0
#ifndef HAVE_MYSQL
#define HAVE_MYSQL 0
#endif
#ifndef HAVE_MSQL
#define HAVE_MSQL 0
#endif
#ifndef HAVE_PGSQL
#define HAVE_PGSQL 0
#endif
#ifndef HAVE_VELOCIS
#define HAVE_VELOCIS 0
#endif
#ifndef HAVE_IFX
#define HAVE_IFX 0
#endif
#ifndef HAVE_IFX_IUS
#define HAVE_IFX_IUS 0
#endif
#ifndef IFX_VERSION
#define IFX_VERSION 0
#endif
#ifndef HAVE_IBASE
#define HAVE_IBASE 0
#endif
#ifndef HAVE_PQCMDTUPLES
#define HAVE_PQCMDTUPLES 0
#endif
#define MSQL1 0
#define HAVE_FILEPRO 0
#define HAVE_SOLID 0
#define DEBUG 0
/* Define if your system has the gettimeofday() call */
#define HAVE_GETTIMEOFDAY 0
/* Define if your system has the putenv() library call */
#define HAVE_PUTENV 0
/* Define if you want to enable PHP RPC (experimental) */
#define PHP_RPC 0
/* Define if you want to enable bc style precision math support */
#define WITH_BCMATH 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 to enable memory limit support */
#define MEMORY_LIMIT 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 want System V semaphore support.
*/
#define HAVE_SYSVSEM 0
/* Define if you have union semun.
*/
#define HAVE_SEMUN 0
/* Define if you want System V shared memory support.
*/
#define HAVE_SYSVSHM 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 if you have the expat (XML Parser Toolkit) library */
#define HAVE_LIBEXPAT 0
/* Define if you have the pdflib library */
#define HAVE_PDFLIB 0
/* Define if you have the fdftk library */
#define HAVE_FDFLIB 0
/* Define to compile with mod_dav support */
#define HAVE_MOD_DAV 0
+126
View File
@@ -0,0 +1,126 @@
/* This is the default configuration file to read -*- C -*- */
/* these are defined by automake */
#undef PACKAGE
#undef VERSION
#undef HAVE_AOLSERVER
#undef HAVE_STRUCT_FLOCK
#undef HAVE_TM_GMTOFF
#define CONFIGURATION_FILE_PATH "php.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
/* Define when compiling with Zeus support */
#undef WITH_ZEUS
/* Define if struct sockaddr contains the field sa_len */
#undef HAVE_SOCKADDR_SA_LEN
+337
View File
@@ -0,0 +1,337 @@
dnl $Id$
dnl
dnl This file contains local autoconf functions.
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`
cmd="echo $ac_n \"\$$1$unique$ac_c\""
if test -n "$unique" && test "`eval $cmd`" = "" ; then
eval "$1$unique=set"
$3
fi
])
dnl
dnl AC_EXPAND_PATH(path, variable)
dnl
dnl expands path to an absolute path and assigns it to variable
dnl
AC_DEFUN(AC_EXPAND_PATH,[
if test -z "$1" || echo "$1" | grep '^/' >/dev/null ; then
$2="$1"
else
ep_dir="`dirname \"$1\"`"
ep_realdir="`(cd \"$ep_dir\" && pwd)`"
$2="$ep_realdir/`basename \"$1\"`"
fi
])
dnl
dnl AC_ADD_LIBPATH(path)
dnl
dnl add a library to linkpath/runpath
dnl
AC_DEFUN(AC_ADD_LIBPATH,[
if test "$1" != "/usr/lib"; then
AC_EXPAND_PATH($1, ai_p)
AC_PHP_ONCE(LIBPATH, $ai_p, [
EXTRA_LIBS="$EXTRA_LIBS -L$ai_p"
PHP_RPATHS="$PHP_RPATHS $ai_p"
])
fi
])
dnl
dnl AC_BUILD_RPATH()
dnl
dnl builds RPATH from PHP_RPATHS
dnl
AC_DEFUN(AC_BUILD_RPATH,[
if test "$enable_rpath" = "yes" && test -n "$PHP_RPATHS"; then
OLD_RPATHS="$PHP_RPATHS"
PHP_RPATHS=""
for i in $OLD_RPATHS; do
PHP_RPATHS="$PHP_RPATHS -R $i"
NATIVE_RPATHS="$NATIVE_RPATHS ${ld_runpath_switch}$i"
done
fi
])
dnl
dnl AC_ADD_INCLUDE(path)
dnl
dnl add a include path
dnl
AC_DEFUN(AC_ADD_INCLUDE,[
if test "$1" != "/usr/include"; then
AC_EXPAND_PATH($1, ai_p)
AC_PHP_ONCE(INCLUDEPATH, $ai_p, [
INCLUDES="$INCLUDES -I$ai_p"
])
fi
])
dnl
dnl AC_ADD_LIBRARY(library)
dnl
dnl add a library to the link line
dnl
AC_DEFUN(AC_ADD_LIBRARY,[
AC_PHP_ONCE(LIBRARY, $1, [
EXTRA_LIBS="$EXTRA_LIBS -l$1"
])
])
dnl
dnl AC_ADD_LIBRARY_WITH_PATH(library, path)
dnl
dnl add a library to the link line and path to linkpath/runpath
dnl
AC_DEFUN(AC_ADD_LIBRARY_WITH_PATH,[
AC_ADD_LIBPATH($2)
AC_ADD_LIBRARY($1)
])
AC_DEFUN(AM_SET_LIBTOOL_VARIABLE,[
LIBTOOL='$(SHELL) $(top_builddir)/libtool $1'
])
dnl
dnl Check for cc option
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 _`
AC_MSG_CHECKING([if compiler supports -$1 really])
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
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)
AC_DEFINE(REGEX,1)
elif test "$REGEX_TYPE" = "system"; then
AC_DEFINE(REGEX,0)
elif test "$REGEX_TYPE" = "apache"; then
AC_DEFINE(REGEX,2)
fi
AC_MSG_CHECKING(which regex library to use)
AC_MSG_RESULT($REGEX_TYPE)
AC_SUBST(REGEX_DIR)
AC_SUBST(REGEX_LIB)
AC_SUBST(HSREGEX)
])
dnl
dnl See if we have broken header files like SunOS has.
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_MSG_RESULT(ok)
],[
AC_DEFINE(MISSING_FCLOSE_DECL,1)
AC_MSG_RESULT(missing)
])
])
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)
])
])
dnl
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,[
if test -d "$cwd/$srcdir/ext/$1" ; then
EXT_SUBDIRS="$EXT_SUBDIRS $1"
if test "$2" != "shared" -a "$2" != "yes"; then
_extlib="libphpext_$1.a"
EXT_LTLIBS="$EXT_LTLIBS ext/$1/libphpext_$1.la"
EXT_LIBS="$EXT_LIBS $1/$_extlib"
EXT_STATIC="$EXT_STATIC $1"
else
EXT_SHARED="$EXT_SHARED $1"
fi
PHP_OUTPUT(ext/$1/Makefile)
fi
])
AC_SUBST(EXT_SUBDIRS)
AC_SUBST(EXT_STATIC)
AC_SUBST(EXT_SHARED)
AC_SUBST(EXT_LIBS)
AC_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
])
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)],
[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"
])
Vendored
-417
View File
@@ -1,417 +0,0 @@
dnl $Id$
dnl
dnl This file contains local autoconf functions.
AC_DEFUN(AC_ORACLE_VERSION,[
AC_MSG_CHECKING([Oracle version])
if test -f "$ORACLEINST_TOP/orainst/unix.rgs"
then
ORACLE_VERSION=`grep '"ocommon"' $ORACLEINST_TOP/orainst/unix.rgs | sed 's/[ ][ ]*/:/g' | cut -d: -f 6 | cut -c 2-4`
test -z "$ORACLE_VERSION" && ORACLE_VERSION=7.3
else
ORACLE_VERSION=8.0
fi
AC_MSG_RESULT($ORACLE_VERSION)
])
dnl
dnl Test mSQL version by checking if msql.h has "IDX_TYPE" defined.
dnl
AC_DEFUN(AC_MSQL_VERSION,[
AC_MSG_CHECKING([mSQL version])
ac_php_oldcflags=$CFLAGS
CFLAGS="$MSQL_INCLUDE $CFLAGS";
AC_TRY_COMPILE([#include <sys/types.h>
#include "msql.h"],[int i = IDX_TYPE],[
AC_DEFINE(MSQL1,0)
MSQL_VERSION="2.0 or newer"
],[
AC_DEFINE(MSQL1,1)
MSQL_VERSION="1.0"
])
CFLAGS=$ac_php_oldcflags
AC_MSG_RESULT($MSQL_VERSION)
])
dnl
dnl Figure out which library file to link with for the Solid support.
dnl
AC_DEFUN(AC_FIND_SOLID_LIBS,[
AC_MSG_CHECKING([Solid library file])
ac_solid_uname_s=`uname -s 2>/dev/null`
case $ac_solid_uname_s in
AIX) ac_solid_os=a3x;;
HP-UX) ac_solid_os=h9x;;
IRIX) ac_solid_os=irx;;
Linux) ac_solid_os=lux;;
SunOS) ac_solid_os=ssx;; # should we deal with SunOS 4?
FreeBSD) ac_solid_os=fbx;;
# "uname -s" on SCO makes no sense.
esac
SOLID_LIBS=`echo $1/scl${ac_solid_os}*.so | cut -d' ' -f1`
if test ! -f $SOLID_LIBS; then
SOLID_LIBS=`echo $1/scl${ac_solid_os}*.a | cut -d' ' -f1`
fi
if test ! -f $SOLID_LIBS; then
SOLID_LIBS=`echo $1/scl2x${ac_solid_os}*.a | cut -d' ' -f1`
fi
if test ! -f $SOLID_LIBS; then
SOLID_LIBS=`echo $1/scl2x${ac_solid_os}*.a | cut -d' ' -f1`
fi
if test ! -f $SOLID_LIBS; then
SOLID_LIBS=`echo $1/bcl${ac_solid_os}*.so | cut -d' ' -f1`
fi
if test ! -f $SOLID_LIBS; then
SOLID_LIBS=`echo $1/bcl${ac_solid_os}*.a | cut -d' ' -f1`
fi
AC_MSG_RESULT(`echo $SOLID_LIBS | sed -e 's!.*/!!'`)
])
dnl
dnl Figure out which library file to link with for the Empress support.
dnl
AC_DEFUN(AC_FIND_EMPRESS_LIBS,[
AC_MSG_CHECKING([Empress library file])
EMPRESS_LIBS=`echo $1/empodbc.so | cut -d' ' -f1`
if test ! -f $EMPRESS_LIBS; then
EMPRESS_LIBS=`echo $1/empodbc.a | cut -d' ' -f1`
fi
AC_MSG_RESULT(`echo $EMPRESS_LIBS | sed -e 's!.*/!!'`)
])
dnl
dnl See if we have broken header files like SunOS has.
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_MSG_RESULT(ok)
],[
AC_DEFINE(MISSING_FCLOSE_DECL,1)
AC_MSG_RESULT(missing)
])
])
# Checks for libraries.
# Prefer gdbm, Berkeley DB and ndbm/dbm, in that order
AC_DEFUN(AC_PREFERRED_DB_LIB,[
AC_CHECK_LIB(gdbm, gdbm_open,[AC_DEFINE(GDBM) DBM_TYPE=gdbm; DBM_LIB=-lgdbm],
[AC_CHECK_LIB(db, dbm_open,[AC_DEFINE(NDBM) DBM_TYPE=ndbm; DBM_LIB=-ldb],
[AC_CHECK_LIB(c, dbm_open,[AC_DEFINE(NDBM) DBM_TYPE=ndbm; DBM_LIB=],
[AC_CHECK_LIB(dbm, dbm_open,[AC_DEFINE(NDBM) DBM_TYPE=ndbm; DBM_LIB=-ldbm],
[DBM_TYPE=""])])])])
AC_MSG_CHECKING([preferred dbm library])
if test "a$DBM_TYPE" = a; then
AC_MSG_RESULT(none found)
AC_MSG_WARN(No dbm library found - using built-in flatfile support)
else
AC_MSG_RESULT($DBM_TYPE chosen)
fi
AC_SUBST(DBM_LIB)
AC_SUBST(DBM_TYPE)
])
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)
])
])
dnl
dnl Check for crypt() capabilities
dnl
AC_DEFUN(AC_CRYPT_CAP,[
AC_MSG_CHECKING([for standard DES crypt])
AC_TRY_RUN([
main() {
#if HAVE_CRYPT
exit (strcmp((char *)crypt("rasmuslerdorf","rl"),"rl.3StKT.4T8M"));
#else
exit(0);
#endif
}],[
AC_DEFINE(PHP3_STD_DES_CRYPT,1)
AC_MSG_RESULT(yes)
],[
AC_DEFINE(PHP3_STD_DES_CRYPT,0)
AC_MSG_RESULT(no)
],[
AC_DEFINE(PHP3_STD_DES_CRYPT,1)
AC_MSG_RESULT(cannot check, guessing yes)
])
AC_MSG_CHECKING([for extended DES crypt])
AC_TRY_RUN([
main() {
#if HAVE_CRYPT
exit (strcmp((char *)crypt("rasmuslerdorf","_J9..rasm"),"_J9..rasmBYk8r9AiWNc"));
#else
exit(0);
#endif
}],[
AC_DEFINE(PHP3_EXT_DES_CRYPT,1)
AC_MSG_RESULT(yes)
],[
AC_DEFINE(PHP3_EXT_DES_CRYPT,0)
AC_MSG_RESULT(no)
],[
AC_DEFINE(PHP3_EXT_DES_CRYPT,0)
AC_MSG_RESULT(cannot check, guessing no)
])
AC_MSG_CHECKING([for MD5 crypt])
AC_TRY_RUN([
main() {
#if HAVE_CRYPT
char salt[15], answer[40];
salt[0]='$'; salt[1]='1'; salt[2]='$';
salt[3]='r'; salt[4]='a'; salt[5]='s';
salt[6]='m'; salt[7]='u'; salt[8]='s';
salt[9]='l'; salt[10]='e'; salt[11]='$';
salt[12]='\0';
strcpy(answer,salt);
strcat(answer,"rISCgZzpwk3UhDidwXvin0");
exit (strcmp((char *)crypt("rasmuslerdorf",salt),answer));
#else
exit(0);
#endif
}],[
AC_DEFINE(PHP3_MD5_CRYPT,1)
AC_MSG_RESULT(yes)
],[
AC_DEFINE(PHP3_MD5_CRYPT,0)
AC_MSG_RESULT(no)
],[
AC_DEFINE(PHP3_MD5_CRYPT,0)
AC_MSG_RESULT(cannot check, guessing no)
])
AC_MSG_CHECKING([for Blowfish crypt])
AC_TRY_RUN([
main() {
#if HAVE_CRYPT
char salt[25], answer[70];
salt[0]='$'; salt[1]='2'; salt[2]='a'; salt[3]='$'; salt[4]='0'; salt[5]='7'; salt[6]='$'; salt[7]='\0';
strcat(salt,"rasmuslerd");
strcpy(answer,salt);
strcpy(&answer[16],"O............gl95GkTKn53Of.H4YchXl5PwvvW.5ri");
exit (strcmp((char *)crypt("rasmuslerdorf",salt),answer));
#else
exit(0);
#endif
}],[
AC_DEFINE(PHP3_BLOWFISH_CRYPT,1)
AC_MSG_RESULT(yes)
],[
AC_DEFINE(PHP3_BLOWFISH_CRYPT,0)
AC_MSG_RESULT(no)
],[
AC_DEFINE(PHP3_BLOWFISH_CRYPT,0)
AC_MSG_RESULT(cannot check, guessing no)
])
])
## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
## Copyright (C) 1996, 1997 Free Software Foundation, Inc.
## Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## 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 the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
##
## As a special exception to the GNU General Public License, if you
## distribute this file as part of a program that contains a
## configuration script generated by Autoconf, you may include it under
## the same distribution terms that you use for the rest of that program.
# serial 9 AM_PROG_LIBTOOL
AC_DEFUN(AM_PROG_LIBTOOL,
[AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_PROG_RANLIB])
AC_REQUIRE([AM_PROG_LD])
AC_REQUIRE([AC_PROG_LN_S])
# Always use our own libtool.
LIBTOOL='$(top_builddir)/libtool'
AC_SUBST(LIBTOOL)
dnl Allow the --disable-shared flag to stop us from building shared libs.
AC_ARG_ENABLE(shared,
[ --enable-shared build shared libraries [default=yes]],
test "$enableval" = no && libtool_shared=" --disable-shared",
libtool_shared=)
dnl Allow the --disable-static flag to stop us from building static libs.
AC_ARG_ENABLE(static,
[ --enable-static build static libraries [default=yes]],
test "$enableval" = no && libtool_static=" --disable-static",
libtool_static=)
libtool_flags="$libtool_shared$libtool_static"
test "$silent" = yes && libtool_flags="$libtool_flags --silent"
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
[case "$host" in
*-*-irix6*)
for f in '-32' '-64' '-cckr' '-n32' '-mips1' '-mips2' '-mips3' '-mips4'; do
if echo " $CC $CFLAGS " | egrep -e "[ ]$f[ ]" > /dev/null; then
LD="${LD-ld} $f"
fi
done
;;
*-*-sco3.2v5*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
CFLAGS="$CFLAGS -belf"
;;
esac]
# Actually configure libtool. ac_aux_dir is where install-sh is found.
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
LD="$LD" RANLIB="$RANLIB" LN_S="$LN_S" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
|| AC_MSG_ERROR([libtool configure failed])
])
# AM_PROG_LD - find the path to the GNU or non-GNU linker
AC_DEFUN(AM_PROG_LD,
[AC_ARG_WITH(gnu-ld,
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
if test "$with_gnu_ld" = yes; then
AC_MSG_CHECKING([for GNU ld])
else
AC_MSG_CHECKING([for non-GNU ld])
fi
AC_CACHE_VAL(ac_cv_path_LD,
[case "$LD" in
/*)
ac_cv_path_LD="$LD" # Let the user override the test with a path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/ld"; then
ac_cv_path_LD="$ac_dir/ld"
# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some GNU ld's only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU ld|with BFD)' > /dev/null; then
test "$with_gnu_ld" = yes && break
else
test "$with_gnu_ld" != yes && break
fi
fi
done
IFS="$ac_save_ifs"
;;
esac])
LD="$ac_cv_path_LD"
if test -n "$LD"; then
AC_MSG_RESULT($LD)
else
AC_MSG_RESULT(no)
fi
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
AC_SUBST(LD)
AM_PROG_LD_GNU
])
AC_DEFUN(AM_PROG_LD_GNU,
[AC_CACHE_CHECK([whether we are using GNU ld], ac_cv_prog_gnu_ld,
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
if $LD -v 2>&1 </dev/null | egrep '(GNU ld|with BFD)' > /dev/null; then
ac_cv_prog_gnu_ld=yes
else
ac_cv_prog_gnu_ld=no
fi])
])
# the following 'borrwed' from automake until we switch over
# Add --enable-maintainer-mode option to configure.
# From Jim Meyering
# serial 1
AC_DEFUN(AM_MAINTAINER_MODE,
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
dnl maintainer-mode is disabled by default
AC_ARG_ENABLE(maintainer-mode,
[ --enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer],
USE_MAINTAINER_MODE=$enableval,
USE_MAINTAINER_MODE=no)
AC_MSG_RESULT($USE_MAINTAINER_MODE)
if test $USE_MAINTAINER_MODE = yes; then
MAINT=
else
MAINT='#M#'
fi
AC_SUBST(MAINT)dnl
]
)
# another one stolen from automake temporarily
#
# Check to make sure that the build environment is sane.
#
AC_DEFUN(AM_SANITY_CHECK,
[AC_MSG_CHECKING([whether build environment is sane])
# Just in case
sleep 1
echo timestamp > conftestfile
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
if test "$@" = "X"; then
# -L didn't work.
set X `ls -t $srcdir/configure conftestfile`
fi
test "[$]2" = conftestfile
)
then
# Ok.
:
else
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
rm -f conftest*
AC_MSG_RESULT(yes)])
+13 -13
View File
@@ -1,38 +1,38 @@
##
## Apache 1.3 Makefile template for PHP3 Module
## [src/modules/php3/Makefile.tmpl]
## Apache 1.3 Makefile template for PHP 4.0 Module
## [src/modules/php4/Makefile.tmpl]
##
# the parametrized target
LIB=libphp3.$(LIBEXT)
LIB=libphp4.$(LIBEXT)
# objects for building the static library
OBJS=mod_php3.o
OBJS_LIB=libmodphp3.a
OBJS=mod_php4.o
OBJS_LIB=libmodphp4.a
# objects for building the shared object library
SHLIB_OBJS=mod_php3.so-o
SHLIB_OBJS_LIB=libmodphp3-so.a
SHLIB_OBJS=mod_php4.so-o
SHLIB_OBJS_LIB=libmodphp4-so.a
# the general targets
all: lib
lib: $(LIB)
# build the static library by merging the object files
libphp3.a: $(OBJS) $(OBJS_LIB)
libphp4.a: $(OBJS) $(OBJS_LIB)
cp $(OBJS_LIB) $@
ar r $@ $(OBJS)
$(RANLIB) $@
# ugly hack to support older Apache-1.3 betas that don't set $LIBEXT
libphp3.: $(OBJS) $(OBJS_LIB)
libphp4.: $(OBJS) $(OBJS_LIB)
cp $(OBJS_LIB) $@
ar r $@ $(OBJS)
$(RANLIB) $@
cp libphp3. libphp3.a
cp libphp4. libphp4.a
# build the shared object library by linking the object files
libphp3.so: $(SHLIB_OBJS) $(SHLIB_OBJS_LIB)
libphp4.so: $(SHLIB_OBJS) $(SHLIB_OBJS_LIB)
rm -f $@
$(LD_SHLIB) $(LDFLAGS_SHLIB) -o $@ $(SHLIB_OBJS) $(SHLIB_OBJS_LIB) $(LIBS)
@@ -69,9 +69,9 @@ depend:
$(OBJS): Makefile
# DO NOT REMOVE
mod_php3.o: mod_php3.c $(INCDIR)/httpd.h $(INCDIR)/conf.h \
mod_php4.o: mod_php4.c $(INCDIR)/httpd.h $(INCDIR)/conf.h \
$(INCDIR)/alloc.h $(INCDIR)/buff.h \
$(INCDIR)/http_config.h \
$(INCDIR)/http_core.h $(INCDIR)/http_main.h \
$(INCDIR)/http_protocol.h $(INCDIR)/http_request.h \
$(INCDIR)/http_log.h $(INCDIR)/util_script.h mod_php3.h
$(INCDIR)/http_log.h $(INCDIR)/util_script.h mod_php4.h
+276
View File
@@ -0,0 +1,276 @@
Following is a merge of two letters I sent to php4beta@lists.php.net,
describing the changes in API between PHP 3.0 and PHP 4.0 (Zend).
This file is by no means thorough documentation of the PHP API,
and is intended for developers who are familiar with the PHP 3.0 API,
and want to port their code to PHP 4.0, or take advantage of its new
features. For highlights about the PHP 3.0 API, consult apidoc.txt.
Zeev
--------------------------------------------------------------------------
I'm going to try to list the important changes in API and programming
techniques that are involved in developing modules for PHP4/Zend, as
opposed to PHP3. Listing the whole PHP4 API is way beyond my scope here,
it's mostly a 'diff' from the apidoc.txt, which you're all pretty familiar
with.
An important note that I neglected to mention yesterday - the php4 tree is
based on the php 3.0.5 tree, plus all 3.0.6 patches hand-patched into it.
Notably, it does NOT include any 3.0.7 patches. All of those have to be
reapplied, with extreme care - modules should be safe to patch (mostly),
but anything that touches the core or main.c will almost definitely require
changes in order to work properly.
[1] Symbol Tables
One of the major changes in Zend involves changing the way symbols tables
work. Zend enforces reference counting on all values and resources. This
required changes in the semantics of the hash tables that implement symbol
tables. Instead of storing pval in the hashes, we now store pval *. All
of the API functions in Zend were changed in a way that this change is
completely transparent. However, if you've used 'low level' hash functions
to access or update elements in symbol tables, your code will require
changes. Following are two simple examples, one demonstrates the
difference between PHP3 and Zend when reading a symbol's value, and the
other demonstrates the difference when writing a value.
php3_read()
{
pval *foo;
_php3_hash_find(ht, "foo", sizeof("foo"), &foo);
/* foo->type is the type and foo->value is the value */
}
php4_read()
{
pval **foo;
_php3_hash_find(ht, "foo", sizeof("foo"), &foo);
/* (*foo)->type is the type and (*foo)->value is the value */
}
---
php3_write()
{
pval newval;
newval.type = ...;
newval.value = ...;
_php3_hash_update(ht, "bar", sizeof("bar"), &newval, sizeof(pval), NULL);
}
php4_write()
{
pval *newval = (pval *) emalloc(sizeof(pval));
newval->refcount=1;
newval->is_ref=0;
newval->type = ...;
newval->value = ...;
_php3_hash_update(ht, "bar", sizeof("bar"), &newval, sizeof(pval *), NULL);
}
[2] Resources
One of the 'cute' things about the reference counting support is that it
completely eliminates the problem of resource leaking. A simple loop that
included '$result = mysql_query(...)' in PHP leaked unless the user
remembered to run mysql_free($result) at the end of the loop body, and
nobody really did. In order to take advantage of the automatic resource
deallocation upon destruction, there's virtually one small change you need
to conduct. Change the result type of a resource that you want to destroy
itself as soon as its no longer referenced (just about any resource I can
think of) as IS_RESOURCE, instead of as IS_LONG. The rest is magic.
A special treatment is required for SQL modules that follow MySQL's
approach for having the link handle as an optional argument. Modules that
follow the MySQL module model, store the last opened link in a global
variable, that they use in case the user neglects to explicitly specify a
link handle. Due to the way referenec counting works, this global
reference is just like any other reference, and must increase that SQL link
resource's reference count (otherwise, it will be closed prematurely).
Simply, when you set the default link to a certain link, increase that
link's reference count by calling zend_list_addref().
As always, the MySQL module is the one used to demonstrate 'new
technology'. You can look around it and look for IS_RESOURCE, as well as
zend_list_addref(), to see a clear example of how the new API should be used.
[3] Thread safety issues
I'm not going to say that Zend was designed with thread safety in mind, but
from some point, we've decided upon several guidelines that would make the
move to thread safety much, much easier. Generally, we've followed the PHP
3.1 approach of moving global variables to a structure, and encapsulating
all global variable references within macros. There are three main
differences:
1. We grouped related globals in a single structure, instead of grouping
all globals in one structure.
2. We've used much, much shorter macro names to increase the readability
of the source code.
3. Regardless of whether we're compiling in thread safe mode or not, all
global variables are *always* stored in a structure. For example, you
would never have a global variable 'foo', instead, it'll be a property of a
global structure, for example, compiler_globals.foo. That makes
development much, much easier, since your code will simply not compile
unless you remember to put the necessary macro around foo.
To write code that'll be thread safe in the future (when we release our
thread safe memory manager and work on integrating it), you can take a look
at zend_globals.h. Essentially, two sets of macros are defined, one for
thread safe mode, and one for thread unsafe mode. All global references
are encapsulated within ???G(varname), where ??? is the appropriate prefix
for your structure (for example, so far we have CG(), EG() and AG(), which
stand for the compiler, executor and memory allocator, respectively).
When compiling with thread safety enabled, each function that makes use of
a ???G() macro, must obtain the pointer to its copy of the structure. It
can do so in one of two forms:
1. It can receive it as an argument.
2. It can fetch it.
Obviously, the first method is preferable since it's much quicker.
However, it's not always possible to send the structure all the way to a
particular function, or it may simply bloat the code too much in some
cases. Functions that receive the globals as an argument, should look like
this:
rettype functioname(???LS_D) <-- a function with no arguments
rettype functioname(type arg1, ..., type argn ???LS_DC) <-- a funciton with
arguments
Calls to such functions should look like this:
functionname(???LS_C) <-- a function with no arguments
functionname(arg1, ..., argn ???LS_CC) <-- a function with arguments
LS stands for 'Local Storage', _C stands for Call and _CC stands for Call
Comma, _D stands for Declaration and _DC stands for Declaration Comma.
Note that there's NO comma between the last argument and ???LS_DC or ???LS_CC.
In general, every module that makes use of globals should use this approach
if it plans to be thread safe.
[4] Generalized INI support
The code comes to solve several issues:
a. The ugly long block of code in main.c that reads values from the
cfg_hash into php3_ini.
b. Get rid of php3_ini. The performance penalty of copying it around all
the time in the Apache module probably wasn't too high, but
psychologically, it annoyed me :)
c. Get rid of the ugly code in mod_php4.c, that also reads values from
Apache directives and puts them into the php3_ini structure.
d. Generalize all the code so that you only have to add an entry in one
single place and get it automatically supported in php3.ini, Apache, Win32
registry, runtime function ini_get() and ini_alter() and any future method
we might have.
e. Allow users to easily override *ANY* php3.ini value, except for ones
they're not supposed to, of course.
I'm happy to say that I think I pretty much reached all goals. php_ini.c
implements a mechanism that lets you add your INI entry in a single place,
with a default value in case there's no php3.ini value. What you get by
using this mechanism:
1. Automatic initialization from php3.ini if available, or from the
default value if not.
2. Automatic support in ini_alter(). That means a user can change the
value for this INI entry at runtime, without you having to add in a single
line of code, and definitely no additional function (for example, in PHP3,
we had to add in special dedicated functions, like
set_magic_quotes_runtime() or the likes - no need for that anymore).
3. Automatic support in Apache .conf files.
4. No need for a global php3_ini-like variable that'll store all that
info. You can directly access each INI entry by name, in runtime. 'Sure,
that's not revolutionary, it's just slow' is probably what some of you
think - which is true, but, you can also register a callback function that
is called each time your INI entry is changed, if you wish to store it in a
cached location for intensive use.
5. Ability to access the current active value for a given INI entry, and
the 'master' value.
Of course, (2) and (3) are only applicable in some cases. Some entries
shouldn't be overriden by users in runtime or through Apache .conf files -
you can, of course, mark them as such.
So, enough hype, how does it work.
Essentially:
static PHP_INI_MH(OnChangeBar); /* declare a message handler for a change
in "bar" */
PHP_INI_BEGIN()
PHP_INI_ENTRY("foo", "1", PHP_INI_ALL, NULL, NULL)
PHP_INI_ENTRY("bar", "bah", PHP_INI_SYSTEM, OnChangeBar, NULL)
PHP_INI_END()
static PHP_INI_MH(OnChangeBar)
{
a_global_var_for_bar = new_value;
return SUCCESS;
}
int whatever_minit(INIT_FUNC_ARGS)
{
...
REGISTER_INI_ENTRIES();
...
}
int whatever_mshutdown(SHUTDOWN_FUNC_ARGS)
{
...
UNREGISTER_INI_ENTRIES();
...
}
and that's it. Here's what it does. As you can probably guess, this code
registers two INI entries - "foo" and "bar". They're given defaults "1"
and "bah" respectively - note that all defaults are always given as
strings. That doesn't reduce your ability to use integer values, simply
specify them as strings. "foo" is marked so that it can be changed by
anyone at any time (PHP_INI_ALL), whereas "foo" is marked so it can be
changed only at startup in the php3.ini only, presumably, by the system
administrator (PHP_INI_SYSTEM).
When "foo" changes, no function is called. Access to it is done using the
macros INI_INT("foo"), INI_FLT("foo") or INI_STR("foo"), which return a
long, double or char * respectively (strings that are returned aren't
duplicated - if they're manipulated, you must duplicate them first). You
can also access the original value (the 'master' value, in case one of them
was overriden by a user) using another pair of macros:
INI_ORIG_INT("foo"), INI_ORIG_FLT("foo") and INI_ORIG_STR("foo").
When "bar" changes, a special message handler is called, OnBarChange().
Always declare those message handlers using PHP_INI_MH(), as they might
change in the future. Message handlers are called as soon as an ini entry
initializes or changes, and allow you to cache a certain INI value in a
quick C structure. In this example, whenever "bar" changes, the new value
is stored in a_global_var_for_bar, which is a global char * pointer,
quickly accessible from other functions. Things get a bit more complicated
when you want to implement a thread-safe module, but it's doable as well.
Message handlers may return SUCCESS to acknowledge the new value, or
FAILURE to reject it. That enables you to reject invalid values for some
INI entries if you want. Finally, you can have a pointer passed to your
message handler - that's the fifth argument to PHP_INI_ENTRY(). It is
passed as mh_arg to the message handler.
Remember that for certain values, there's really no reason to mess with a
callback function. A perfect example for this are the syntax highlight
colors, which no longer have a dedicated global C slot that stores them,
but instead, are fetched from the php_ini hash on demand.
"As always", for a perfect working example of this mechanism, consult
functions/mysql.c. This module uses the new INI entry mechanism, and was
also converted to be thread safe in general, and in its php_ini support in
particular. Converting your modules to look like this for thread safety
isn't a bad idea (not necessarily now, but in the long run).
+3 -3
View File
@@ -19,7 +19,7 @@ Table of Contents
All functions look like this:
void php3_foo(INTERNAL_FUNCTION_PARAMETERS) {
PHP_FUNCTION(foo) {
}
@@ -471,13 +471,13 @@ handy when a server supports multiple virtual hosts.
The steps required to add a new directive:
1. Add directive to php3_ini_structure struct in mod_php3.h.
1. Add directive to php3_ini_structure struct in mod_php4.h.
2. In main.c, edit the php3_module_startup function and add the
appropriate cfg_get_string() or cfg_get_long() call.
3. Add the directive, restrictions and a comment to the php3_commands
structure in mod_php3.c. Note the restrictions part. RSRC_CONF are
structure in mod_php4.c. Note the restrictions part. RSRC_CONF are
directives that can only be present in the actual Apache .conf files.
Any OR_OPTIONS directives can be present anywhere, include normal
.htaccess files.
-705
View File
@@ -1,705 +0,0 @@
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
#line 3 "bison.simple"
/* Skeleton output parser for bison,
Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
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 the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
This special exception was added by the Free Software Foundation
in version 1.24 of Bison. */
#ifndef alloca
#ifdef __GNUC__
#define alloca __builtin_alloca
#else /* not GNU C. */
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
#include <alloca.h>
#else /* not sparc */
#if defined (MSDOS) && !defined (__TURBOC__)
#include <malloc.h>
#else /* not MSDOS, or __TURBOC__ */
#if defined(_AIX)
#include <malloc.h>
#pragma alloca
#else /* not MSDOS, __TURBOC__, or _AIX */
#ifdef __hpux
#ifdef __cplusplus
extern "C" {
void *alloca (unsigned int);
};
#else /* not __cplusplus */
void *alloca ();
#endif /* not __cplusplus */
#endif /* __hpux */
#endif /* not _AIX */
#endif /* not MSDOS, or __TURBOC__ */
#endif /* not sparc. */
#endif /* not GNU C. */
#endif /* alloca not defined. */
/* This is the parser code that is written into each bison parser
when the %semantic_parser declaration is not specified in the grammar.
It was written by Richard Stallman by simplifying the hairy parser
used when %semantic_parser is specified. */
/* Note: there must be only one dollar sign in this file.
It is replaced by the list of actions, each action
as one case of the switch. */
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
#define YYEMPTY -2
#define YYEOF 0
#define YYACCEPT return(0)
#define YYABORT return(1)
#define YYERROR goto yyerrlab1
/* Like YYERROR except do call yyerror.
This remains here temporarily to ease the
transition to the new meaning of YYERROR, for GCC.
Once GCC version 2 has supplanted version 1, this can go. */
#define YYFAIL goto yyerrlab
#define YYRECOVERING() (!!yyerrstatus)
#define YYBACKUP(token, value) \
do \
if (yychar == YYEMPTY && yylen == 1) \
{ yychar = (token), yylval = (value); \
yychar1 = YYTRANSLATE (yychar); \
YYPOPSTACK; \
goto yybackup; \
} \
else \
{ yyerror ("syntax error: cannot back up"); YYERROR; } \
while (0)
#define YYTERROR 1
#define YYERRCODE 256
#ifndef YYPURE
#define YYLEX yylex()
#endif
#ifdef YYPURE
#ifdef YYLSP_NEEDED
#ifdef YYLEX_PARAM
#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
#else
#define YYLEX yylex(&yylval, &yylloc)
#endif
#else /* not YYLSP_NEEDED */
#ifdef YYLEX_PARAM
#define YYLEX yylex(&yylval, YYLEX_PARAM)
#else
#ifdef PHP3_THREAD_SAFE /* PHP 3 Specific useage */
#define YYLEX yylex(&yylval,php3_globals,php_gbl)
#else
#define YYLEX yylex(&yylval)
#endif /* not using tls */
#endif
#endif /* not YYLSP_NEEDED */
#endif
/* If nonreentrant, generate the variables here */
#ifndef YYPURE
int yychar; /* the lookahead symbol */
YYSTYPE yylval; /* the semantic value of the */
/* lookahead symbol */
#ifdef YYLSP_NEEDED
YYLTYPE yylloc; /* location data for the lookahead */
/* symbol */
#endif
int yynerrs; /* number of parse errors so far */
#endif /* not YYPURE */
#if YYDEBUG != 0
int yydebug; /* nonzero means print parse trace */
/* Since this is uninitialized, it does not stop multiple parsers
from coexisting. */
#endif
/* YYINITDEPTH indicates the initial size of the parser's stacks */
#ifndef YYINITDEPTH
#define YYINITDEPTH 200
#endif
/* YYMAXDEPTH is the maximum size the stacks can grow to
(effective only if the built-in stack extension method is used). */
#if YYMAXDEPTH == 0
#undef YYMAXDEPTH
#endif
#ifndef YYMAXDEPTH
#define YYMAXDEPTH 10000
#endif
/* Prevent warning if -Wstrict-prototypes. */
#ifdef __GNUC__
/* int yyparse (void); */
#endif
#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
#else /* not GNU C or C++ */
#ifndef __cplusplus
/* This is the most reliable way to avoid incompatibilities
in available built-in functions on various systems. */
static void
__yy_memcpy (to, from, count)
char *to;
char *from;
int count;
{
register char *f = from;
register char *t = to;
register int i = count;
while (i-- > 0)
*t++ = *f++;
}
#else /* __cplusplus */
/* This is the most reliable way to avoid incompatibilities
in available built-in functions on various systems. */
static void
__yy_memcpy (char *to, char *from, int count)
{
register char *f = from;
register char *t = to;
register int i = count;
while (i-- > 0)
*t++ = *f++;
}
#endif
#endif
#line 196 "bison.simple"
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *.
It should actually point to an object.
Grammar actions can access the variable by casting it
to the proper pointer type. */
#ifdef YYPARSE_PARAM
#ifdef __cplusplus
#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
#define YYPARSE_PARAM_DECL
#else /* not __cplusplus */
#define YYPARSE_PARAM_ARG YYPARSE_PARAM
#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
#endif /* not __cplusplus */
#else /* not YYPARSE_PARAM */
#define YYPARSE_PARAM_ARG
#define YYPARSE_PARAM_DECL
#endif /* not YYPARSE_PARAM */
#ifndef TLS_VARS
#define TLS_VARS
#endif
#ifndef YY_TLS_VARS
#define YY_TLS_VARS
#endif
int
yyparse(YYPARSE_PARAM_ARG)
YYPARSE_PARAM_DECL
{
register int yystate;
register int yyn;
register short *yyssp;
register YYSTYPE *yyvsp;
int yyerrstatus; /* number of tokens to shift before error messages enabled */
int yychar1 = 0; /* lookahead token as an internal (translated) token number */
short yyssa[YYINITDEPTH]; /* the state stack */
YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
short *yyss = yyssa; /* refer to the stacks thru separate pointers */
YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
#ifdef YYLSP_NEEDED
YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
YYLTYPE *yyls = yylsa;
YYLTYPE *yylsp;
#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
#else
#define YYPOPSTACK (yyvsp--, yyssp--)
#endif
int yystacksize = YYINITDEPTH;
#ifdef YYPURE
int yychar;
YYSTYPE yylval;
int yynerrs;
#ifdef YYLSP_NEEDED
YYLTYPE yylloc;
#endif
#endif
YYSTYPE yyval; /* the variable used to return */
/* semantic values from the action */
/* routines */
int yylen;
YY_TLS_VARS;
TLS_VARS;
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Starting parse\n");
#endif
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
yyssp = yyss - 1;
yyvsp = yyvs;
#ifdef YYLSP_NEEDED
yylsp = yyls;
#endif
/* Push a new state, which is found in yystate . */
/* In all cases, when you get here, the value and location stacks
have just been pushed. so pushing a state here evens the stacks. */
yynewstate:
*++yyssp = yystate;
if (yyssp >= yyss + yystacksize - 1)
{
/* Give user a chance to reallocate the stack */
/* Use copies of these so that the &'s don't force the real ones into memory. */
YYSTYPE *yyvs1 = yyvs;
short *yyss1 = yyss;
#ifdef YYLSP_NEEDED
YYLTYPE *yyls1 = yyls;
#endif
/* Get the current used size of the three stacks, in elements. */
int size = yyssp - yyss + 1;
#ifdef yyoverflow
/* Each stack pointer address is followed by the size of
the data in use in that stack, in bytes. */
#ifdef YYLSP_NEEDED
/* This used to be a conditional around just the two extra args,
but that might be undefined if yyoverflow is a macro. */
yyoverflow("parser stack overflow",
&yyss1, size * sizeof (*yyssp),
&yyvs1, size * sizeof (*yyvsp),
&yyls1, size * sizeof (*yylsp),
&yystacksize);
#else
yyoverflow("parser stack overflow",
&yyss1, size * sizeof (*yyssp),
&yyvs1, size * sizeof (*yyvsp),
&yystacksize);
#endif
yyss = yyss1; yyvs = yyvs1;
#ifdef YYLSP_NEEDED
yyls = yyls1;
#endif
#else /* no yyoverflow */
/* Extend the stack our own way. */
if (yystacksize >= YYMAXDEPTH)
{
yyerror("parser stack overflow");
return 2;
}
yystacksize *= 2;
if (yystacksize > YYMAXDEPTH)
yystacksize = YYMAXDEPTH;
yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
__yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp));
yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
__yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp));
#ifdef YYLSP_NEEDED
yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
__yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp));
#endif
#endif /* no yyoverflow */
yyssp = yyss + size - 1;
yyvsp = yyvs + size - 1;
#ifdef YYLSP_NEEDED
yylsp = yyls + size - 1;
#endif
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Stack size increased to %d\n", yystacksize);
#endif
if (yyssp >= yyss + yystacksize - 1)
YYABORT;
}
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Entering state %d\n", yystate);
#endif
goto yybackup;
yybackup:
/* Do appropriate processing given the current state. */
/* Read a lookahead token if we need one and don't already have one. */
/* yyresume: */
/* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
if (yyn == YYFLAG)
goto yydefault;
/* Not known => get a lookahead token if don't already have one. */
/* yychar is either YYEMPTY or YYEOF
or a valid token in external form. */
if (yychar == YYEMPTY)
{
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Reading a token: ");
#endif
yychar = YYLEX;
}
/* Convert token to internal form (in yychar1) for indexing tables with */
if (yychar <= 0) /* This means end of input. */
{
yychar1 = 0;
yychar = YYEOF; /* Don't call YYLEX any more */
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Now at end of input.\n");
#endif
}
else
{
yychar1 = YYTRANSLATE(yychar);
#if YYDEBUG != 0
if (yydebug)
{
fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
/* Give the individual parser a way to print the precise meaning
of a token, for further debugging info. */
#ifdef YYPRINT
YYPRINT (stderr, yychar, yylval);
#endif
fprintf (stderr, ")\n");
}
#endif
}
yyn += yychar1;
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
goto yydefault;
yyn = yytable[yyn];
/* yyn is what to do for this token type in this state.
Negative => reduce, -yyn is rule number.
Positive => shift, yyn is new state.
New state is final state => don't bother to shift,
just return success.
0, or most negative number => error. */
if (yyn < 0)
{
if (yyn == YYFLAG)
goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
else if (yyn == 0)
goto yyerrlab;
if (yyn == YYFINAL)
YYACCEPT;
/* Shift the lookahead token. */
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
#endif
/* Discard the token being shifted unless it is eof. */
if (yychar != YYEOF)
yychar = YYEMPTY;
*++yyvsp = yylval;
#ifdef YYLSP_NEEDED
*++yylsp = yylloc;
#endif
/* count tokens shifted since error; after three, turn off error status. */
if (yyerrstatus) yyerrstatus--;
yystate = yyn;
goto yynewstate;
/* Do the default action for the current state. */
yydefault:
yyn = yydefact[yystate];
if (yyn == 0)
goto yyerrlab;
/* Do a reduction. yyn is the number of a rule to reduce with. */
yyreduce:
yylen = yyr2[yyn];
if (yylen > 0)
yyval = yyvsp[1-yylen]; /* implement default value of the action */
#if YYDEBUG != 0
if (yydebug)
{
int i;
fprintf (stderr, "Reducing via rule %d (line %d), ",
yyn, yyrline[yyn]);
/* Print the symbols being reduced, and their result. */
for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
fprintf (stderr, "%s ", yytname[yyrhs[i]]);
fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
}
#endif
$ /* the action file gets copied in in place of this dollarsign */
#line 498 "bison.simple"
yyvsp -= yylen;
yyssp -= yylen;
#ifdef YYLSP_NEEDED
yylsp -= yylen;
#endif
#if YYDEBUG != 0
if (yydebug)
{
short *ssp1 = yyss - 1;
fprintf (stderr, "state stack now");
while (ssp1 != yyssp)
fprintf (stderr, " %d", *++ssp1);
fprintf (stderr, "\n");
}
#endif
*++yyvsp = yyval;
#ifdef YYLSP_NEEDED
yylsp++;
if (yylen == 0)
{
yylsp->first_line = yylloc.first_line;
yylsp->first_column = yylloc.first_column;
yylsp->last_line = (yylsp-1)->last_line;
yylsp->last_column = (yylsp-1)->last_column;
yylsp->text = 0;
}
else
{
yylsp->last_line = (yylsp+yylen-1)->last_line;
yylsp->last_column = (yylsp+yylen-1)->last_column;
}
#endif
/* Now "shift" the result of the reduction.
Determine what state that goes to,
based on the state we popped back to
and the rule number reduced by. */
yyn = yyr1[yyn];
yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
yystate = yytable[yystate];
else
yystate = yydefgoto[yyn - YYNTBASE];
goto yynewstate;
yyerrlab: /* here on detecting error */
if (! yyerrstatus)
/* If not already recovering from an error, report this error. */
{
++yynerrs;
#ifdef YYERROR_VERBOSE
yyn = yypact[yystate];
if (yyn > YYFLAG && yyn < YYLAST)
{
int size = 0;
char *msg;
int x, count;
count = 0;
/* Start X at -yyn if nec to avoid negative indexes in yycheck. */
for (x = (yyn < 0 ? -yyn : 0);
x < (sizeof(yytname) / sizeof(char *)); x++)
if (yycheck[x + yyn] == x)
size += strlen(yytname[x]) + 15, count++;
msg = (char *) malloc(size + 15);
if (msg != 0)
{
strcpy(msg, "parse error");
if (count < 5)
{
count = 0;
for (x = (yyn < 0 ? -yyn : 0);
x < (sizeof(yytname) / sizeof(char *)); x++)
if (yycheck[x + yyn] == x)
{
strcat(msg, count == 0 ? ", expecting `" : " or `");
strcat(msg, yytname[x]);
strcat(msg, "'");
count++;
}
}
yyerror(msg);
free(msg);
}
else
yyerror ("parse error; also virtual memory exceeded");
}
else
#endif /* YYERROR_VERBOSE */
yyerror("parse error");
}
goto yyerrlab1;
yyerrlab1: /* here on error raised explicitly by an action */
if (yyerrstatus == 3)
{
/* if just tried and failed to reuse lookahead token after an error, discard it. */
/* return failure if at end of input */
if (yychar == YYEOF)
YYABORT;
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
#endif
yychar = YYEMPTY;
}
/* Else will try to reuse lookahead token
after shifting the error token. */
yyerrstatus = 3; /* Each real token shifted decrements this */
goto yyerrhandle;
yyerrdefault: /* current state does not do anything special for the error token. */
#if 0
/* This is wrong; only states that explicitly want error tokens
should shift them. */
yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
if (yyn) goto yydefault;
#endif
yyerrpop: /* pop the current state because it cannot handle the error token */
if (yyssp == yyss) YYABORT;
yyvsp--;
yystate = *--yyssp;
#ifdef YYLSP_NEEDED
yylsp--;
#endif
#if YYDEBUG != 0
if (yydebug)
{
short *ssp1 = yyss - 1;
fprintf (stderr, "Error: state stack now");
while (ssp1 != yyssp)
fprintf (stderr, " %d", *++ssp1);
fprintf (stderr, "\n");
}
#endif
yyerrhandle:
yyn = yypact[yystate];
if (yyn == YYFLAG)
goto yyerrdefault;
yyn += YYTERROR;
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
goto yyerrdefault;
yyn = yytable[yyn];
if (yyn < 0)
{
if (yyn == YYFLAG)
goto yyerrpop;
yyn = -yyn;
goto yyreduce;
}
else if (yyn == 0)
goto yyerrpop;
if (yyn == YYFINAL)
YYACCEPT;
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Shifting error token, ");
#endif
*++yyvsp = yylval;
#ifdef YYLSP_NEEDED
*++yylsp = yylloc;
#endif
yystate = yyn;
goto yynewstate;
}
+57 -52
View File
@@ -27,59 +27,64 @@
+----------------------------------------------------------------------+
*/
#define PHP_ADA_INCLUDE "@ADA_INCLUDE@"
#define PHP_ADA_LFLAGS "@ADA_LFLAGS@"
#define PHP_ADA_LIBS "@ADA_LIBS@"
#define PHP_APACHE_INCLUDE "@APACHE_INCLUDE@"
#define PHP_APACHE_TARGET "@APACHE_TARGET@"
#define PHP_FHTTPD_INCLUDE "@FHTTPD_INCLUDE@"
#define PHP_FHTTPD_LIB "@FHTTPD_LIB@"
#define PHP_FHTTPD_TARGET "@FHTTPD_TARGET@"
#define PHP_ADA_INCLUDE ""
#define PHP_ADA_LFLAGS ""
#define PHP_ADA_LIBS ""
#define PHP_APACHE_INCLUDE ""
#define PHP_APACHE_TARGET ""
#define PHP_FHTTPD_INCLUDE ""
#define PHP_FHTTPD_LIB ""
#define PHP_FHTTPD_TARGET ""
#define PHP_BINNAME "@BINNAME@"
#define PHP_CFLAGS "@CFLAGS@"
#define PHP_DBASE_LIB "@DBASE_LIB@"
#define PHP_DEBUG "@PHP_DEBUG@"
#define PHP_GDBM_INCLUDE "@GDBM_INCLUDE@"
#define PHP_HSREGEX "@HSREGEX@"
#define PHP_IBASE_INCLUDE "@IBASE_INCLUDE@"
#define PHP_IBASE_LFLAGS "@IBASE_LFLAGS@"
#define PHP_IBASE_LIBS "@IBASE_LIBS@"
#define PHP_IFX_INCLUDE "@IFX_INCLUDE@"
#define PHP_IFX_LFLAGS "@IFX_LFLAGS@"
#define PHP_IFX_LIBS "@IFX_LIBS@"
#define PHP_DBASE_LIB ""
#define PHP_DEBUG "@DEBUG_CFLAGS@"
#define PHP_GDBM_INCLUDE ""
#define PHP_HSREGEX ""
#define PHP_IBASE_INCLUDE ""
#define PHP_IBASE_LFLAGS ""
#define PHP_IBASE_LIBS ""
#define PHP_IFX_INCLUDE ""
#define PHP_IFX_LFLAGS ""
#define PHP_IFX_LIBS ""
#define PHP_INSTALL_IT "@INSTALL_IT@"
#define PHP_IODBC_INCLUDE "@IODBC_INCLUDE@"
#define PHP_IODBC_LFLAGS "@IODBC_LFLAGS@"
#define PHP_IODBC_LIBS "@IODBC_LIBS@"
#define PHP_MSQL_INCLUDE "@MSQL_INCLUDE@"
#define PHP_MSQL_LFLAGS "@MSQL_LFLAGS@"
#define PHP_MSQL_LIBS "@MSQL_LIBS@"
#define PHP_MYSQL_INCLUDE "@MYSQL_INCLUDE@"
#define PHP_MYSQL_LFLAGS "@MYSQL_LFLAGS@"
#define PHP_MYSQL_LIBS "@MYSQL_LIBS@"
#define PHP_ORACLE_HOME "@ORACLE_HOME@"
#define PHP_ORACLE_INCLUDE "@ORACLE_INCLUDE@"
#define PHP_ORACLE_LFLAGS "@ORACLE_LFLAGS@"
#define PHP_ORACLE_LIBS "@ORACLE_LIBS@"
#define PHP_ORACLE_SHLIBS "@ORACLE_SHLIBS@"
#define PHP_ORACLE_STLIBS "@ORACLE_STLIBS@"
#define PHP_ORACLE_VERSION "@ORACLE_VERSION@"
#define PHP_PGSQL_INCLUDE "@PGSQL_INCLUDE@"
#define PHP_PGSQL_LFLAGS "@PGSQL_LFLAGS@"
#define PHP_PGSQL_LIBS "@PGSQL_LIBS@"
#define PHP_IODBC_INCLUDE ""
#define PHP_IODBC_LFLAGS ""
#define PHP_IODBC_LIBS ""
#define PHP_MSQL_INCLUDE ""
#define PHP_MSQL_LFLAGS ""
#define PHP_MSQL_LIBS ""
#define PHP_MYSQL_INCLUDE ""
#define PHP_MYSQL_LFLAGS ""
#define PHP_MYSQL_LIBS ""
#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_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_PGSQL_INCLUDE ""
#define PHP_PGSQL_LFLAGS ""
#define PHP_PGSQL_LIBS ""
#define PHP_PROG_SENDMAIL "@PROG_SENDMAIL@"
#define PHP_REGEX_LIB "@REGEX_LIB@"
#define PHP_SOLID_INCLUDE "@SOLID_INCLUDE@"
#define PHP_SOLID_LIBS "@SOLID_LIBS@"
#define PHP_EMPRESS_INCLUDE "@EMPRESS_INCLUDE@"
#define PHP_EMPRESS_LIBS "@EMPRESS_LIBS@"
#define PHP_SYBASE_INCLUDE "@SYBASE_INCLUDE@"
#define PHP_SYBASE_LFLAGS "@SYBASE_LFLAGS@"
#define PHP_SYBASE_LIBS "@SYBASE_LIBS@"
#define PHP_DBM_TYPE "@DBM_TYPE@"
#define PHP_DBM_LIB "@DBM_LIB@"
#define PHP_LDAP_LFLAGS "@LDAP_LFLAGS@"
#define PHP_LDAP_INCLUDE "@LDAP_INCLUDE@"
#define PHP_LDAP_LIBS "@LDAP_LIBS@"
#define PHP_VELOCIS_INCLUDE "@VELOCIS_INCLUDE@"
#define PHP_VELOCIS_LIBS "@VELOCIS_LIBS@"
#define PHP_REGEX_LIB ""
#define PHP_SOLID_INCLUDE ""
#define PHP_SOLID_LIBS ""
#define PHP_EMPRESS_INCLUDE ""
#define PHP_EMPRESS_LIBS ""
#define PHP_SYBASE_INCLUDE ""
#define PHP_SYBASE_LFLAGS ""
#define PHP_SYBASE_LIBS ""
#define PHP_DBM_TYPE ""
#define PHP_DBM_LIB ""
#define PHP_LDAP_LFLAGS ""
#define PHP_LDAP_INCLUDE ""
#define PHP_LDAP_LIBS ""
#define PHP_VELOCIS_INCLUDE ""
#define PHP_VELOCIS_LIBS ""
Loaded 100 of 721 files, more files were not shown because too many files have changed in this diff. Show more