Compare commits

...
Author SHA1 Message Date
SVN Migration dc4f9cda69 This commit was manufactured by cvs2svn to create tag
'PRE_FILE_COMPILE_API_CHANGE'.
2000-08-06 18:14:47 +00:00
Sascha Schumann a8a1bbe921 Including utime.h once is enough. 2000-08-06 18:14:46 +00:00
Egon Schmid d9cd56ea76 Description from the ChangeLog. Thies, is it correct? 2000-08-06 17:56:56 +00:00
Stanislav Malyshev d9ab6333ea Add utime include 2000-08-06 17:53:04 +00:00
Stanislav Malyshev 62043b9a7c Add Joey Smith's sendmail_port patch 2000-08-06 17:49:41 +00:00
Sascha Schumann 23ebf6e916 Include <utime.h> in php_virtual_cwd.h. 2000-08-06 17:42:54 +00:00
Stanislav Malyshev 57c54a093b Replace min() - not everyone has it 2000-08-06 16:34:37 +00:00
Stanislav Malyshev 10f300094b fix stupid bug 2000-08-06 16:32:22 +00:00
Andi Gutmans c756ae2d9f Virtualize realpath, chmod, chown and utime
This should fix #5935 and #5904
@- Virtualize realpath, chmod, chown and utime (Stas)
2000-08-06 16:22:07 +00:00
Egon Schmid 868e3b1db8 Changed some protos. 2000-08-06 14:36:10 +00:00
Hartmut Holzgraefe 4e5946adf7 removed a BAD IDEA (tm) that filtered out backslashes 2000-08-06 11:32:32 +00:00
Rasmus Lerdorf da1b7847b3 Support content-encoding headers in file upload mime parts
@- Support content-encoding headers in file upload MIME parts
@  (Ragnar Kjørstad)
2000-08-06 06:40:28 +00:00
Rasmus Lerdorf a8f0c5a316 decouple this check just in case we hit a weird system that has one
and not the other.  And we specifically check for this, so we should
use the information.
2000-08-06 04:55:17 +00:00
Rasmus Lerdorf 640501ab19 Remove mysql dll 2000-08-06 02:06:43 +00:00
18cbccdd7c ChangeLog update 2000-08-06 01:09:09 +00:00
be9b8f0613 NEWS update 2000-08-06 01:09:06 +00:00
Andi Gutmans 50ddf9e3d5 - Use some more SEPARATE_ZVAL macros instead of replicated code. 2000-08-05 13:54:07 +00:00
Danny Heijl d140a799f7 - Fix INT8 returning garbage because ifx_int8toasc does not null_terminate
the returned string. (danny)
2000-08-05 13:14:44 +00:00
Stanislav Malyshev db0872123b Fix crash on broken setups (#5979) 2000-08-05 11:28:32 +00:00
Stanislav Malyshev 8b9ecac2dc Fix memory leak 2000-08-05 11:06:00 +00:00
Thies C. Arntzen 53defde3e2 @- Fixed warning when shutting down OCINLogon() connections. (Thies) 2000-08-05 10:45:55 +00:00
Stanislav Malyshev 682c58c26f Open session files in binary mode (fix #5953)
@- Fixed \n in session variables bug on Win32 (Stas)
2000-08-05 10:25:00 +00:00
Thies C. Arntzen 34dfe582ff @- OCIError() would sometimes not report failed connections. (Thies) 2000-08-05 10:07:39 +00:00
Hénot David 282288efe4 Fix for a bug with persistent connections. 2000-08-05 03:22:16 +00:00
b3df7086d7 ChangeLog update 2000-08-05 01:09:13 +00:00
Hartmut Holzgraefe b04a02660e changed default sendmail flags from '-t' to '-t -i' (bugid#5374) 2000-08-04 22:42:11 +00:00
Sam Ruby 73db4d5cca Fix for bug 5911 - ANSI C violation: lvalues are not assignable 2000-08-04 18:55:49 +00:00
Sam Ruby 3da910ae24 Restore the ability to clean compile in non-multithreaded environments 2000-08-04 18:39:47 +00:00
Thies C. Arntzen 7b388964ee fixed ZTS compile 2000-08-04 18:14:38 +00:00
foobar 5356c100ee - This should fix bug #5964
# Could someone please check this out..it works as intented for me at least.
# But I don't have any Windoze machines available to test this there.
2000-08-04 17:18:54 +00:00
Rasmus Lerdorf 9021105c89 Fix typo 2000-08-04 16:48:42 +00:00
Hartmut Holzgraefe b19fb9b6bd #ooops 2000-08-04 15:23:19 +00:00
Egon Schmid 48ef7e52a2 Sorry only the *_replaceparameters are wrong. 2000-08-04 11:57:21 +00:00
Egon Schmid 90b4600fe8 Wrong parameters found by Martin Buchholz @ six.de. 2000-08-04 11:50:16 +00:00
Hartmut Holzgraefe 920f6fd1fc ooops - theese new parameters are optional 2000-08-04 09:24:36 +00:00
Hartmut Holzgraefe 6a93f284bc added new second parameter to osrt functions in the protos 2000-08-04 09:19:38 +00:00
Hartmut Holzgraefe 562e83bc6d no longer needed 2000-08-04 09:03:54 +00:00
Hartmut Holzgraefe aadc551965 do not rewrite absolute urls
(should be more clever and identify itself though)
2000-08-04 09:03:20 +00:00
Andi Gutmans fcdc025d11 - Beautify code. Try and use more macros for splitting instead of
- replicating the code everywhere.
2000-08-04 08:11:54 +00:00
Joey Smith de486f7897 Geez, you'd think English wasn' tmy native tongue. 2000-08-04 04:49:45 +00:00
Joey Smith 62557742bd Outdated URL, link to the master site instead. 2000-08-04 04:49:13 +00:00
Rasmus Lerdorf 9f2cd78e67 Small portability fix 2000-08-04 02:23:28 +00:00
c7d84acbcd ChangeLog update 2000-08-04 01:09:12 +00:00
Hartmut Holzgraefe 9cd387439e evaluate sendmail exit status, fixes unix side of bug #5630 2000-08-03 19:26:19 +00:00
Stanislav Malyshev fda23fc253 Fix fclose prototype (#5930) 2000-08-03 16:37:35 +00:00
Stanislav Malyshev 688268727e If we can't find a protocol in URL wrapper, try it as a filename (fix #5931) 2000-08-03 15:09:27 +00:00
Hartmut Holzgraefe 74ca22e9ca will now work again on 1-character urls, spaces before and after '='
and urls containing '#' scrolling info
# argh, this file's not even a week old and already needs
# a heavy cleanup rewrite, but at least it gets all my test cases right
2000-08-03 11:42:39 +00:00
c438f0abc9 ChangeLog update 2000-08-03 01:09:18 +00:00
a31dd36ab9 NEWS update 2000-08-03 01:09:15 +00:00
Rasmus Lerdorf ff0a08f508 Leave this initialization in 2000-08-02 22:53:55 +00:00
Rasmus Lerdorf 76a2d2538c Heads up! I have moved the headers_only and response_code checks out of
SAPI and down into the individual SAPI modules.  I have made the
appropriate changes in all the SAPI modules, but please verify these.
The reason for this change is that Apache sometimes will feed PHP
a request_method of GET but have r->header_only set to true.  This happens
in an ErrorDocument redirect.  In this same scenario we want to preserve
the status code as well instead of just overwriting it with a 200 and
losing this information.  For now the other sapi modules act exactly as
before since they probably do not make this distinction, and they may
not even have a valid response code this early in the request.
@ Fix HEAD request bug on an Apache ErrorDocument redirect and preserve
@ the status code across the redirect as well.  (Rasmus)
2000-08-02 22:48:45 +00:00
Rasmus Lerdorf f896b9a354 Fix library ordering here so static builds will work 2000-08-02 19:49:04 +00:00
Andi Gutmans 5ae343b752 - Remove commented code 2000-08-02 17:51:42 +00:00
foobar a4a0e18ec4 - Added two new functions: ldap_t61_to_8859() and ldap_8859_to_t61().
These functions are available only when using openldap which is compiled
  with STR_TRANSLATION and LDAP_CHARSET_8859 defined in ldap_cdefs.h (Jani)
2000-08-02 13:11:46 +00:00
5343536429 ChangeLog update 2000-08-02 01:09:19 +00:00
3977f6380f NEWS update 2000-08-02 01:09:16 +00:00
Rasmus Lerdorf b8f6e9dd03 Add Olympus-specific tags to read_exif_data()
@ Add Olympus-specific tags to read_exif_data() (Rasmus)
2000-08-01 22:05:15 +00:00
Hartmut Holzgraefe 4c9709ff0d typo fix 2000-08-01 20:21:35 +00:00
Sascha Schumann cbc4b24a7a Enable building PHP against kerberized IMAP libraries 2000-08-01 15:24:56 +00:00
Hartmut Holzgraefe f194a3a25d protect datetime() against all zero inputs ... 2000-08-01 11:16:20 +00:00
foobar ab13d02d53 @- Fixed bug in imap_fetchheader() where using FT_PREFETCHTEXT didn't return
@  the body. Bug #4447. (Jani)
2000-08-01 09:11:46 +00:00
Hartmut Holzgraefe b59e98b87c "undefined function" error message will now suggest similar named
functions as jikes compiler for java does (typo protection)
2000-08-01 07:57:19 +00:00
Hartmut Holzgraefe ea5ab044bf trans-sid rewrite, is now state-aware (fix for bug #3411 and friends) 2000-08-01 07:45:14 +00:00
Stanislav Malyshev e109aa30d6 When output is empty, exec should return "", not "\0" (#5775)
@- Fixed exec() returning "\0" when output is empty
2000-08-01 07:22:59 +00:00
7173a63d46 ChangeLog update 2000-08-01 01:09:15 +00:00
Zeev Suraski c5c973d16f - Get rid of whitespace. 2000-08-01 00:41:35 +00:00
Rasmus Lerdorf 89107a221b Missed a symbol 2000-07-31 15:07:58 +00:00
Sascha Schumann 04182c1361 Add note about software requirements 2000-07-31 13:44:06 +00:00
0f9eee7662 ChangeLog update 2000-07-31 01:09:08 +00:00
c30d5a8d27 NEWS update 2000-07-31 01:09:05 +00:00
Hartmut Holzgraefe 0df7721842 fix for bug #5672 2000-07-30 21:55:27 +00:00
Stig Bakken def1424b12 @Added XML_Parser class in PEAR (Stig)
@Added "make test" target in pear/ and added some regression tests (Stig)
Also fixed a bug in the PEAR class that was discovered when testing :-)
2000-07-30 17:41:31 +00:00
foobar 9789895f30 #Damn. It still crashes in some situations. So this was bogus. =( 2000-07-30 15:48:09 +00:00
Stanislav Malyshev a790966b15 Fix file upload types array handling (#5836) 2000-07-30 11:22:18 +00:00
Rasmus Lerdorf 75bb019760 Fix bug in strip_tags function as per bug #5857
@ Fix bug in strip_tags function as per bug #5857 (Rasmus)
2000-07-30 05:04:06 +00:00
Sam Ruby 4ca1c611b3 Refactor in support of subclassing 2000-07-30 04:50:31 +00:00
a234329535 ChangeLog update 2000-07-30 01:09:10 +00:00
0ca80059c8 NEWS update 2000-07-30 01:09:07 +00:00
Rasmus Lerdorf 677df784c1 This url symbol was a bit too generic. Change it to php_url instead.
It was clashing with a similar typedef in the UdmSearch integration I am
working on.
2000-07-29 22:32:21 +00:00
foobar 5fdc09fb36 @- Fixed bug in imap_compose_mail() which caused crashes. (Jani)
# This one was only partly ported from php3. As some user pointed it out,
# it was working in 3.0.x. But this needs further hacking. Some error
# handlers, at least. Fixes bugs #3337 and #5084.
2000-07-29 18:45:06 +00:00
Thies C. Arntzen 51fc3dede2 @- Fix reading of IPTC via GetImageInfo() for certain JPEG files. (Thies) 2000-07-29 15:29:35 +00:00
Rasmus Lerdorf 56326195a4 Add a couple of notes to the INSTALL file to hopefully cut down on a
couple of frequently asked questions.
2000-07-29 15:02:23 +00:00
Zeev Suraski 52ff887db5 Made ob_start() and friends reentrant. It's now possible to implement this
long-requested functionality, now that output buffering is re-entrant:

function eval_ret($code)
{
	ob_start();
	eval($code);
	$retval = ob_get_contents();
	ob_end_clean();
	return $retval;
}
2000-07-29 14:46:09 +00:00
Zeev Suraski d8a4278ab4 - Update .dsp's
- Make non ZTS Win32 build again
2000-07-29 10:48:57 +00:00
Zeev Suraski 735a0d148e Fix filename issues 2000-07-29 10:44:13 +00:00
Jouni Ahto 3d1b363967 Fix #5817 and really, really check what gets passed further... 2000-07-29 06:07:26 +00:00
Jouni Ahto ecb7b4d271 Removed an extra tab, it caused problems for Digital Unix' poor native make... 2000-07-29 04:45:38 +00:00
Jouni Ahto d88fe953ae This should fix #5826. 2000-07-29 04:24:11 +00:00
foobar 90c1689cf0 Just cleaning up. 2000-07-29 03:59:05 +00:00
6496e39b53 ChangeLog update 2000-07-29 01:09:15 +00:00
7f41a6c77c NEWS update 2000-07-29 01:09:07 +00:00
foobar 7c84d6a082 Fixes bug which caused crash, if result_entry wasn't valid. 2000-07-28 22:39:22 +00:00
foobar 9f25b9c1f7 # Oops..where did those creep in? =( 2000-07-28 21:48:16 +00:00
foobar 40b89f34fb @- Made ldap_add(), ldap_modify(), ldap_mod_add(), ldap_mod_replace()
@  binary-safe. Original patch: Terrence Miao <terrence_miao@email.com> (Jani)
#Thanks go to Terrence for making a patch correcting this bug in php3.0.12...
#A patch, which somehow wasn't included at all in it?-) I wonder why..?
2000-07-28 21:31:02 +00:00
Stig Bakken 4575fe5a7c * PEAR now stands for "PHP Extension and Application Repository" 2000-07-28 21:05:00 +00:00
Chuck Hagenbuch 44a46d2a75 Moving the Socket class to Net/Socket.php, and basing it on code that Stig
wrote, with a few extra utility functions from my old class.

Stig, I mucked with the constructor a bit since it didn't quite make sense
exactly as it was - does it still do what was intended?

Also, are the emacs folding things (// {{{ functionname() ...) a PEAR
standard? How do they fit with the javadoc?
2000-07-28 15:27:18 +00:00
Hartmut Holzgraefe 1a7f851985 added '-l' option to command line / CGI version for 'syntax check only'
plus a little cleanup and rearranging in command line option parsing

@ CGI aka. command line version has now an option '-l' for syntax check
@   without execution (Hartmut)
2000-07-28 15:21:20 +00:00
Hartmut Holzgraefe a525d022ce should fix bug #5729
# I'm unable to test, as I still haven't got working Windows
# Please check that it compiles.
2000-07-28 12:21:44 +00:00
Stanislav Malyshev 2c95b113bd Make define return false and issue E_NOTICE when trying to redefine constant
@- Make define return false and issue E_NOTICE when trying to redefine constant (Stas)
2000-07-28 09:44:46 +00:00
5c2c547d9e ChangeLog update 2000-07-28 01:09:11 +00:00
53738cf408 NEWS update 2000-07-28 01:09:08 +00:00
foobar c8b8281e22 @- Fixed bug in ldap_get_values_len() which makes it NULL-safe. (Jani)
@  Bug-report and fix submitted by Michel Alexeline <alexel@dr15.cnrs.fr>
# Plus I added missing ldap_value_free_len().
2000-07-28 00:09:33 +00:00
Sam Ruby ed2b68a9c3 Fix bug 5619 - explain how to add to the classpath on Win32 machines.
Reported by: "Carl S. in 't Veld" <cveld@bigfoot.com>
2000-07-27 18:57:23 +00:00
Rasmus Lerdorf 3bca4e220d Make ext_skel create a Makefile.in set up to handle shared extension
support automatically
@ Make ext_skel create a Makefile.in set up to handle shared extension
@ support automatically (Rasmus)
2000-07-27 17:56:02 +00:00
James L. Pine 96a35a3eea added DB/oci8.php to PEAR_FILES 2000-07-27 17:18:26 +00:00
Jon Parise 021ad113ef Reworded some of the php_error messages for grammar and clarity.
(For example, settled on "cannot" instead of "can't" in all case)
2000-07-27 16:43:38 +00:00
Andi Gutmans 290525fdcd Always store full filename as compiled file name 2000-07-27 15:36:54 +00:00
Stanislav Malyshev 29585f985e Add news of recent fixes 2000-07-27 14:34:40 +00:00
Stanislav Malyshev ba8d49dce7 Fix realpath not to die on non-existing files (bug #5790)
Thanks to china@thewrittenword.com
2000-07-27 13:48:50 +00:00
Chuck Hagenbuch 5ec120366c Add a Socket class. If this should be somewhere other than top-level, just
let me know - none of the existing subdirectories made sense to me, and I
didn't want to add a new one just for this.
2000-07-27 13:47:45 +00:00
Stanislav Malyshev f24c8c6f4b Fix safe mode handling by touch 2000-07-27 13:47:03 +00:00
Stanislav Malyshev 9aa854dc6e Fix memory leak in touch when safety check fails 2000-07-27 13:28:21 +00:00
7afdb75437 ChangeLog update 2000-07-27 01:09:24 +00:00
fde20cea27 NEWS update 2000-07-27 01:09:16 +00:00
Kristian Köhntopp cd2929aead Access to global variable safe_mode fixed. 2000-07-26 21:38:21 +00:00
Vlad Krupin 3d3d238021 Changed syntax of pspell_new() (one more parameter - mode)
pspell_new() parameters that are empty ("") are now ignored

Removed pspell_mode() and pspell_runtogether() - their
functionality moved to pspell_new() because the ability
to dynamically change those settings is not in ISPELL, and
is likely do disappear from ASPELL, according to ASPELL
author.

Created a new constant - PSPELL_RUN_TOGETHER for pspell_new()

fixed a bug in pspell_new() that caused non-English dictionaries
to be ignored

removed a bogus line from pspell_new() that could result in
a memory leak
2000-07-26 21:32:29 +00:00
Kristian Köhntopp 102156298a Added seteuid and setegid functions on request by max@valkyrie.sscf.ucsb.edu.
Also fixed the function detection for the HAVE_ functions.
2000-07-26 21:25:01 +00:00
Vlad Krupin f1f91467fa Removed pspell_mode() and pspell_runtogether() 2000-07-26 21:24:17 +00:00
Rasmus Lerdorf b480b8dace Fix symbol clash which caused a DSO problem on OpenBSD
@ Fix symbol clash which caused a DSO problem on OpenBSD (Rob Black and
@ anil@recoil.org)
2000-07-26 20:39:59 +00:00
Zeev Suraski a30cde3de5 Fix a possible issue with runtime inheritence under fairly rare circumstance
and optimize a tiny bit
2000-07-26 18:23:30 +00:00
Sascha Schumann 08f7586031 Get rid of unnecessary preprocessor constructs. 2000-07-26 16:42:04 +00:00
Sascha Schumann 30472a1cc1 Use the lcg as another entropy source for seeding the PRNG when creating
a salt for crypt().
2000-07-26 16:35:32 +00:00
Sascha Schumann 2c42094494 Clean up the mess WRT rebuilding a limited set of files.
Earlier changes were based upon a wrong assumption (that CONFIG_FILES
could be relied upon).
2000-07-26 14:53:54 +00:00
Egon Schmid e4b7e9e916 Protos fixed. 2000-07-26 11:43:01 +00:00
Joey Smith 017a843f0a OK, got ahead of myself. Go back to where we started this morning. 2000-07-26 11:33:56 +00:00
Stanislav Malyshev 1373a16280 Add strncasecmp function
@ Added strncasecmp function (Andi)
2000-07-26 11:32:15 +00:00
Egon Schmid 9bb4011d06 Proto fixed. 2000-07-26 11:28:14 +00:00
Stanislav Malyshev 79527dd539 Make proper object initialization 2000-07-26 11:21:03 +00:00
Joey Smith 4e3f7a44da OK, the fastgen stuff should be working OK, and normal configure should, too.
There is an annoying warning being generated due to null 1st arg to AC_OUTPUT,
but I don't know what to do a/b that.
2000-07-26 11:04:07 +00:00
foobar 123d745249 @- Added new function: ldap_compare(). (Jani)
# Documentation is coming right after this.
2000-07-26 11:01:44 +00:00
Joey Smith 69a075136f Make configure work again.
CONFIG_FILES is broken again, tho. (I think).
Will work with Stig to try and figure this out.
2000-07-26 10:43:40 +00:00
Stig Bakken c63410f6be Multiple DB::connect or DB::factory calls using the same backend
should work now.
2000-07-26 09:57:06 +00:00
David Croft 718b7308c3 tidy up news 2000-07-26 08:23:04 +00:00
foobar cc077fd8d0 Just a little beutifuing. 2000-07-26 07:37:25 +00:00
Sterling Hughes 56b7b7a8a9 * EXTENSIONS -- update status on CURL & SWF
* NEWS --
  1.  Change wording for the ibase and sybase DB announcement.
  2.  Remove second pfpro announcement, if pfpro is being released with 4.0.2
  entries about new features before 4.0.2 shouldn't be in there.
  3.  Joey, that entry just doesn't seem incredibly relevant to the NEWS file,
  I'll backport it if you want (or add a new entry).
* ext/standard/info.c -- Add a CREDIT_LINE() for CURL.
2000-07-26 05:41:38 +00:00
Sterling Hughes 2aff369398 Add CURLOPT_TRANSFERTEXT option to curl_setopt(). 2000-07-26 05:25:37 +00:00
Jon Parise aab966a491 MAINTAINERS has become EXTENSIONS 2000-07-26 02:10:18 +00:00
f98a741404 ChangeLog update 2000-07-26 01:09:08 +00:00
e1615b1882 NEWS update 2000-07-26 01:09:05 +00:00
Sascha Schumann 79186d4fe9 Read from /dev/u?random until the buffer is filled.
Submitted by: Derick Rethans <d.rethans@jdimedia.nl>
2000-07-25 22:17:20 +00:00
Kristian Köhntopp 19687ea1ed Trivial change to add access to CURL version information for
user programs in order to have them react appropriately.
2000-07-25 22:15:26 +00:00
Vlad Krupin b3305dab64 added several functions for manipulating wordlists:
pspell_store_replacement()
 pspell_add_to_personal()
 pspell_add_to_session()
 pspell_clear_session()
2000-07-25 22:09:52 +00:00
Vlad Krupin 29ab69a767 - added several functions for manipulating wordlists - pspell_store_replacement(), pspell_add_to_personal(), pspell_add_to_session(), pspell_clear_session().
- fixed a few confusing typos in comments
2000-07-25 22:06:38 +00:00
Joey Smith 7d132e6578 There is still something wrong with Sybase DB-Lib,
but CT-Lib works great.
2000-07-25 20:35:50 +00:00
Stanislav Malyshev a9606d1d4e Make browscap parameter names lowercase
Fix . handling in browscap names
2000-07-25 18:50:50 +00:00
Stanislav Malyshev 104b4f38df Fix more bugs in browscap
# now it shoudl work, but leaks like hell, so don't use it yet
2000-07-25 18:50:02 +00:00
foobar e5f6dcb9c2 @- Fixed a bug in ldap_get_entries() and ldap_get_attributes. (Jani)
Fixes bugs #5433 and #5603.
2000-07-25 15:34:28 +00:00
Stig Bakken bf470dfe6c Finally fixed so config.status can regenerate single files without
doing the whole fastgen and warning message whoopla again.  Whee!
2000-07-25 11:25:05 +00:00
Stig Bakken abe372481d forgot to commit this one last night 2000-07-25 10:57:57 +00:00
Stanislav Malyshev 85eb0bb29d Report configuration path that is really used, not that is compiled in
# it does matter when using -c option
2000-07-25 10:54:07 +00:00
David Croft aa4f8afc17 Merged MAINTAINERS and MODULES_STATUS into EXTENSIONS, added version
field, added the missing extensions, added comments, filled in some
maintainers.

# Please help fill in the unknowns in here, particularly in status.
2000-07-25 10:50:06 +00:00
Hartmut Holzgraefe 772c4026bb htmlspecialchars and htmlentities will now
encode single quotes to &#39;
(due to feature request in BUG ID#5254)
2000-07-25 10:18:06 +00:00
Stanislav Malyshev 005d4c4deb Default section name should be uppercase, I guess 2000-07-25 08:09:00 +00:00
David Croft 1c2db161bf # removed stupid dollar Id dollar in changelog 2000-07-25 06:56:04 +00:00
ea49b191aa ChangeLog update 2000-07-25 01:09:11 +00:00
c045d7a581 NEWS update 2000-07-25 01:09:08 +00:00
Stig Bakken e0b531d5f4 * the beginning of a regression testing framework? 2000-07-25 00:55:37 +00:00
Sterling Hughes c9167fa9df remove comments for consistency. 2000-07-25 00:29:52 +00:00
Sterling Hughes f338d8af5f . 2000-07-25 00:29:07 +00:00
Stig Bakken fbc947f43f * generate pear scripts properly with configure 2000-07-24 23:55:34 +00:00
Stig Bakken 576b6e9236 * PEAR.php is now generated by configure 2000-07-24 23:54:26 +00:00
Sterling Hughes cb44d1b30a 1. Move from experimental -> production
2.  Thread safety
3.  Set some initial options
4.  Redo the placement of some functions and options.
2000-07-24 20:00:00 +00:00
Joey Smith 9d6d8bf1fa @- Fix #4591. Register the appname as PHP 4.0, not 3.0
@  Credit to andrew@digitalpulp.com. (Joey)

sybase.globals was still using PHP 3.0 as the appname.
2000-07-24 19:12:32 +00:00
Dan Kalowsky f6d891674d Patched to work for Solid/Linux libc5 and glibc2 without the need for renaming the lib files, thanks to Kevin Way... fixed typo from GLIHC to GLIBC 2000-07-24 18:01:42 +00:00
John Donagher e9427bc078 # Added example entries for the pfpro extension to the php.ini templates 2000-07-24 17:58:38 +00:00
John Donagher d805076ac2 # Added code to pfpro.c and php_pfpro.h to parse defaults out of php.ini
@- For the pfpro extension: defaulthost, defaultport, defaulttimeout, and
@  all of the default proxy settings can now be defined in php.ini
2000-07-24 17:57:05 +00:00
Dan Kalowsky ebe6dbbbae Patched to work for Solid/Linux libc5 and glibc2 without the need for renaming the lib files, thanks to Kevin Way 2000-07-24 14:21:18 +00:00
Stig Bakken 9f7874ccc5 added TODO file for PEAR 2000-07-24 13:32:50 +00:00
David Croft 21b2a241db updated MODULES_STATUS file. Perhaps this should be renamed EXTENSIONS_STATUS? 2000-07-24 10:52:07 +00:00
David Croft 96eada8f80 licence versions -> 2.02 in pear files 2000-07-24 10:31:43 +00:00
Stig Bakken e0924de112 @Ported DB to new error reporting scheme 2000-07-24 08:24:14 +00:00
Stig Bakken 0f0f1cebcb * new class: PEAR - can be used as a base class for others.
* PEAR_Error moved into PEAR.php to reduce the number of files that are
  always included
* cleaned up the PEAR_Error API a bit and changed the two classes using it
* added PEAR_Installer - an administration class for installing packages
  and maintaining a "class/file cache"
2000-07-24 08:05:51 +00:00
David Croft 0836e10a15 various version 2.0 and 2.01 licenses -> 2.02 2000-07-24 05:41:02 +00:00
Sam Ruby 54790b5e63 Correct the value of request_uri 2000-07-24 05:29:20 +00:00
David Croft c3fb9680ec corrections to NEWS file 2000-07-24 02:01:05 +00:00
David Croft 83513d9580 Changed lots of PHP 3 licence headers to PHP 4, mainly in .h files.
Added a few RCS $Id$ tags.

# Note: I have avoided changing any .h files if the corresponding .c file
# had not already been changed as I am not sure if there are any legal
# issues here. So some extensions still have PHP 3 headers.
2000-07-24 01:40:02 +00:00
c402d89f94 ChangeLog update 2000-07-24 01:09:08 +00:00
3af341356b NEWS update 2000-07-24 01:09:05 +00:00
foobar 428eb46f78 It's better not touch those ldap->ld_* when they aren't given as parameters.
(Now using -1 the parameters not wanted can be omitted)
# Plus some source-polishing.
2000-07-23 21:32:02 +00:00
Sterling Hughes bf6e7e8034 Remove $file and $line. 2000-07-23 17:10:06 +00:00
Thies C. Arntzen 9752d1a089 (getimagesize) fix FORCE_REF. 2000-07-23 16:49:42 +00:00
Stanislav Malyshev 7c296bd9cc Add another check for broken browscap object
# I do not know how it could get broken, but just in case...
2000-07-23 11:32:18 +00:00
Stanislav Malyshev b410eaf6d4 Make browscap not to lowercase its arguments
# Why it is doing it? Parent matching doesn't work with lowercase
# If there was any reason to it, please tell
2000-07-23 11:27:48 +00:00
Stanislav Malyshev a172147a91 Try to fix some get_browser crashes and clean it up
# Probably needs more work, just what I could see immediately
2000-07-23 11:11:35 +00:00
Joey Smith a44137974b Setting "compatibility" parameter requires having a PDF structure that
has NOT had PDF_open_*() called on it, according to the documentation.

There is not currently any way to obtain such from user-land in PHP.
@ Catch users trying to set "compatibility" parameter, which is not
@ supported from user-land.
#
# Not sure this is the best way to do this...
# Uwe, could you please double check this?
2000-07-23 08:31:13 +00:00
Joey Smith 4caea0bb7a BROKEN_SPRINTF should be PHP_BROKEN_SPRINTF 2000-07-23 08:25:27 +00:00
Sterling Hughes 8aadb68db1 @ Fixed dbase_add_record. (Sterling)
Fixed dbase_add_record
2000-07-23 03:45:24 +00:00
e67fa9823d ChangeLog update 2000-07-23 01:10:11 +00:00
51bbc2b4a8 NEWS update 2000-07-23 01:10:07 +00:00
Sam Ruby f4e94a5030 Complete the work mapping arrays and hashtables 2000-07-22 20:36:11 +00:00
Sam Ruby 668af98d75 Fix regression in passing strings as parameters 2000-07-22 18:09:28 +00:00
Sterling Hughes d69d04cf75 fix bug 5322. 2000-07-22 17:47:30 +00:00
Sam Ruby 3f4c7c8359 Allow java.lang.Hashtables to be passed into PHP as arrays. 2000-07-22 17:32:32 +00:00
Sam Ruby 7893c72965 Verify that a classname is actually passed on a new Java() call. 2000-07-22 16:13:20 +00:00
Sam Ruby 3e4a4f2376 Respect the object type the user specified (i.e., never automatically
convert the result of "new Java()" to a primitive type)
2000-07-22 13:43:46 +00:00
Sam Ruby 313ca6b5e8 Don't assume that Java byte arrays are null terminated. 2000-07-22 12:40:49 +00:00
David Croft a5a9a4928b # zeev is god 2000-07-22 04:23:41 +00:00
David Croft 89153d9c05 fixed socket_set blocking in windows
(bug 3845)
2000-07-22 01:53:16 +00:00
David Croft 8dd1fdb1a0 wordwrap function from Chris Russel <russel@yorku.ca>
differences from his patch:
 - wordwrap width and wrap-string now optional parameters
   (default to 75 and "\n" respectively)
 - wordwrap_byte is now just an automatic special case of wordwrap
 - Zend API compliant

@- Added new function "wordwrap" to wordwrap long strings from Chris
@  Russel <russel@yorku.ca> (David Croft)
2000-07-22 01:12:24 +00:00
e007639f2a ChangeLog update 2000-07-22 01:09:07 +00:00
1ca6008767 NEWS update 2000-07-22 01:09:04 +00:00
foobar 01d5aec3aa Forgot those constants. 2000-07-22 00:34:22 +00:00
Sam Ruby eb8a55893d Pass PHP arrays to Java as hash tables; minor cleanup 2000-07-21 22:08:50 +00:00
Joey Smith be6c3d8b62 INI stuff labelled sybase.* should be sybct.*.
Thanks to dean.bennett@home.com.
2000-07-21 19:58:38 +00:00
foobar 549aec4500 @- Added four additional arguments: attrsonly, sizelimit, timelimit, deref which
@  were missing in ldap_search(), ldap_list() and ldap_read() functions (Jani)
@- Fixed a bug in ldap_search/list/read() which prevented returning the partial
@  results when 'Sizelimit exceeded' error occurred. (Jani Taskinen)

# And nuked some compile time warnings. Took a while to get this commit message
# written..I hope I got it right. =)
2000-07-21 19:00:21 +00:00
Sterling Hughes f66de59603 New naming sequence for PEAR_Error
- PEAR_ERROR -> PEAR_Error
  - $CLASSNAME -> $classname

New naming sequence for Exceptions
  - ExceptionFileFind -> FileFindException.
2000-07-21 18:34:37 +00:00
Rasmus Lerdorf 9ea35f0d28 Fix this address 2000-07-21 16:39:18 +00:00
Zeev Suraski 206b83f009 Fix Win32 build 2000-07-21 15:54:10 +00:00
Hartmut Holzgraefe d4936d8fcf column size for date in imap_headers increased (see bug id #5699) 2000-07-21 15:50:37 +00:00
Andrei Zmievski fbced1b9cc (php_addslashes) Fixed stop condition - it should only take into account
the length of the string, not the characters.
2000-07-21 15:29:59 +00:00
Sterling Hughes 4773b98ac6 Add PEAR_ERROR class for returning exception objects.
#  This is the basic idea that Ulf proposed, its obviously
#  going to be subject to modifications.
2000-07-21 06:47:18 +00:00
Ken Coar f869e47eae Undo numerical format regression introduced by the fix of the
zero-precison %s formatting.
2000-07-21 03:21:56 +00:00
97863bb153 ChangeLog update 2000-07-21 01:09:07 +00:00
86a36cbd59 NEWS update 2000-07-21 01:09:04 +00:00
Hartmut Holzgraefe 5390b6a291 fix for bug #5707 2000-07-20 23:08:26 +00:00
Sterling Hughes 0690bca499 fix 5705
.
2000-07-20 17:15:25 +00:00
Andrei Zmievski 9de5b9e04a # There you go, Wico.
Fix bug $5676.
@- Fixed preg_replace() to automatically escape quotes in matched
@  strings when using /e modifier. (Andrei)
2000-07-20 15:27:16 +00:00
Sterling Hughes 8a6f3f80f2 Fix dbase_create() for real. 2000-07-20 02:48:44 +00:00
4638a90a3a ChangeLog update 2000-07-20 01:09:09 +00:00
c7801827e5 NEWS update 2000-07-20 01:09:06 +00:00
David Croft 4e526516e2 automatically initialise library at first use if necessary
automatically cleanup library at request end if user hasn't done so
libpfpro library version shown on phpinfo()
2000-07-19 18:55:12 +00:00
David Croft 89874a4b0d # remove leading _ from #define 2000-07-19 18:51:55 +00:00
Rasmus Lerdorf 30c81ea5c5 Itanium patch from Steve Robb <steve@eu.c2.net>
@ Itanium patch (Steve Robb)
2000-07-19 16:19:40 +00:00
5643850ca4 ChangeLog update 2000-07-19 01:09:08 +00:00
7453e3c898 NEWS update 2000-07-19 01:09:05 +00:00
Sascha Schumann 0216ab891b typo 2000-07-18 22:38:22 +00:00
Sascha Schumann 6da67bf234 Fix building ingres_ii as a shared module 2000-07-18 22:34:42 +00:00
Zeev Suraski 327e33972b Shutup a gcc warning 2000-07-18 20:40:23 +00:00
Zeev Suraski 58e1dd2ee8 Forgot to link this function... 2000-07-18 20:32:39 +00:00
Zeev Suraski a650dd8a19 This is probably the oldest bug in PHP :)
Luckily it's unlikely we're ever actually bitten by this bug.
2000-07-18 20:08:06 +00:00
Andrei Zmievski 7edad11a74 Fixed compilation errors. 2000-07-18 19:13:14 +00:00
Andreas Karajannis 9d8b0f805b Added myself 2000-07-18 18:16:56 +00:00
Andrei Zmievski feb22cdf5d Don't touch ChangeLog, please. It's automagically generated from commit
messages.
2000-07-18 16:37:58 +00:00
Ken Coar 0ca493768b Bring forward the zero-precision (%.0s) string formatting fix
from PHP3.  (After being nagged by Thies. :-)  Whee!  My first
	PHP4 commit..
2000-07-18 16:34:30 +00:00
Stig Bakken 7bb67a6200 @Set default include_path so PEAR files can be reached (Stig) 2000-07-18 11:02:28 +00:00
Sterling Hughes bb5987fe74 Patch STDOUT support. 2000-07-18 05:52:03 +00:00
84d4f5cad4 ChangeLog update 2000-07-18 01:09:09 +00:00
42df8a7401 NEWS update 2000-07-18 01:09:06 +00:00
Hénot David 63a31786b6 Added new function ii_autocommit() 2000-07-17 23:57:36 +00:00
Hénot David 00d67abd30 Made ingres_ii module compile with its new name 2000-07-17 23:21:42 +00:00
Stig Bakken 8b824d99fa @Added "pear" executable, requires CGI version installed (Stig) 2000-07-17 22:52:08 +00:00
Egon Schmid 41d3f4dbbf Fixed some protos. Only one line for the description. 2000-07-17 21:50:35 +00:00
Hénot David 15ff1d211b Added extension ii for Ingres II native support.
@- Added extension ii for Ingres II native support. See README in ext/ii
@  directory. (David H)
2000-07-17 21:29:30 +00:00
Zeev Suraski 896d64be10 Build fixes 2000-07-17 21:13:44 +00:00
Zeev Suraski 1237a33c79 - Made Interbase compile under Win32, cleaned warnings
@- Added Win32 project for the Interbase module (Zeev)
2000-07-17 20:51:47 +00:00
Ben Mansell e2d25ad5c6 Minor adjustments to compile-advice 2000-07-17 17:18:02 +00:00
Uwe Steinmann eb3bc5aba6 - Cannot see any good reason why the test script in the dir of
the extension, though it is in tests as well
2000-07-17 15:44:24 +00:00
Andrei Zmievski 8f96ea6b20 *** empty log message *** 2000-07-17 13:37:26 +00:00
Stanislav Malyshev 7b9d2e33bf Fix crash in stripcslashes("") (#5628) 2000-07-17 10:22:30 +00:00
f8c07fff2d ChangeLog update 2000-07-17 01:13:01 +00:00
Andi Gutmans 4066a197be - Beautify Zeev's patch a bit. 2000-07-16 22:33:42 +00:00
Zeev Suraski 90ca5c4747 Update news 2000-07-16 20:08:26 +00:00
Sterling Hughes 6787071417 Add CURL support (http://curl.haxx.se).
# Currently pretty experimental, and labeled so, it
# only really works with the CGI version.  I wanted
# to get the sources in CVS, so I could give a
# reference point for some issues, and get more
# extensive testing...
#
# Does anyone know how long it is going to be till
# the next minor release?
2000-07-16 19:37:33 +00:00
Rasmus Lerdorf 246999a51f Tiny wording fix 2000-07-16 18:51:00 +00:00
Zeev Suraski 808f8ed306 Implement parent::foo() 2000-07-16 16:40:21 +00:00
7761580504 ChangeLog update 2000-07-16 01:09:08 +00:00
bb871497b7 NEWS update 2000-07-16 01:09:05 +00:00
Egon Schmid 7a0d047a68 Some cosmetic changes. 2000-07-15 16:09:18 +00:00
Zeev Suraski b4266edb07 Add more extended_info calls 2000-07-15 15:41:20 +00:00
Thies C. Arntzen cef6cc1ec0 fixed uninitilized var in ZTS mode. 2000-07-15 14:54:04 +00:00
Egon Schmid 23b56e3c64 Some cosmetic changes. 2000-07-15 14:35:41 +00:00
Thies C. Arntzen 31dae9e367 @- You can now call Ora_Error() without prameters to get the reason
@  for a failed connection attempt. (Kirill Maximov)
2000-07-15 14:15:10 +00:00
Egon Schmid 9194a0fb12 Some cosmetic changes. 2000-07-15 13:00:41 +00:00
David Croft 6d2d3e7f60 #.cvsignore file for ext/pfpro 2000-07-15 05:24:22 +00:00
David Croft 09c9d44399 merged changes from Signio module by John Donagher <john@webmeta.com> 2000-07-15 05:08:22 +00:00
David Croft 9ee9eaab3a test file for pfpro 2000-07-15 03:07:49 +00:00
Rasmus Lerdorf c1877a3a30 . 2000-07-15 01:54:59 +00:00
David Croft 467917cbde @- New extension "pfpro" for interface with Signio Payflow Pro (David Croft)
New extension pfpro to interface with Signio Payflow Pro library for
credit card processing etc
2000-07-15 01:13:40 +00:00
5bd82b6a04 ChangeLog update 2000-07-15 01:09:07 +00:00
3fad10919f NEWS update 2000-07-15 01:09:04 +00:00
Rasmus Lerdorf 3c10e038e2 Add IMG_GIF, IMG_JPG, IMG_JPEG, IMG_PNG and IMG_WBMP constants for
imagetypes() function
@ Add IMG_GIF, IMG_JPG, IMG_JPEG, IMG_PNG and IMG_WBMP constants for
@ imagetypes() function (Rasmus)
2000-07-14 22:07:57 +00:00
Rasmus Lerdorf 2f960d70b9 Add ImageTypes() function which returns a bitfield with the supported
image formats.  1=gif, 2=jpeg, 4=png and 8=wbmp
@ Add ImageTypes() function which returns a bitfield with the supported
@ image formats.  1=gif, 2=jpeg, 4=png and 8=wbmp (Rasmus)
2000-07-14 21:51:31 +00:00
Zeev Suraski 55d313db99 Improve register_resource_ex() infrastructure 2000-07-14 20:00:24 +00:00
Zeev Suraski 2dbc46b7b1 Hopefully this will stop the php_mysql.dll questions that haunt us... 2000-07-14 19:42:59 +00:00
Rasmus Lerdorf e3fd1edc49 Make it possible to specify an empty string as a thousands-seperator
in number_format()
@ Make it possible to specify an empty string as a thousands-seperator
@ in number_format()
2000-07-14 18:46:13 +00:00
Egon Schmid 0bba8eeae1 Protos fixed. 2000-07-14 18:42:35 +00:00
Rasmus Lerdorf c78d180231 Shared module support for LDAP extension
@ Shared module support for LDAP extension (Troels Arvin)
2000-07-14 13:13:25 +00:00
Mike Waychison 99b85d1919 (imap_mail) Fixed a sizing of the arg parameter array. Was causing
Seg-Faults if rpath was specified.
@  Fixed a bug with imap_mail where apache would segfault if the rpath
@  parameter was specified.
#  ouch.
2000-07-14 08:12:53 +00:00
23f1e503c1 ChangeLog update 2000-07-14 01:09:09 +00:00
85cb7a2986 NEWS update 2000-07-14 01:09:06 +00:00
Rasmus Lerdorf 1d0ae2cde4 Use dashes and short day name in cookies since some browsers seem picky
about this
@ Use dashes and short day name in cookies since some browsers seem picky
@ about this (Rasmus)
2000-07-14 01:08:59 +00:00
Egon Schmid 411280eb9d The description for protos need no period. 2000-07-13 20:55:22 +00:00
Vlad Krupin 9936548993 - Making pspell compile as a shared module
- fix a couple typos
@ Making pspell compile as a shared module
2000-07-13 20:39:14 +00:00
Egon Schmid d041052428 Fixed protos. 2000-07-13 19:09:32 +00:00
Egon Schmid 28f38ea4fe Fixed protos. 2000-07-13 18:44:57 +00:00
Egon Schmid 7ad2213278 Forgotten to change. 2000-07-13 18:27:10 +00:00
Egon Schmid 86dfb4c292 Corrected some protos. 2000-07-13 18:21:40 +00:00
Zeev Suraski aa8d04a87c Fix disable_functions feature 2000-07-13 17:52:00 +00:00
Zeev Suraski 155cac35d8 *** empty log message *** 2000-07-13 17:29:59 +00:00
Stanislav Malyshev 4c6ffdb1c2 make -c in stand-alone mode work again.
Setting ini_path after php_module_startup doesn't do much good -
since php_module_startup reads .ini.
# This fix is very ugly. Everyone is welcome to make better fix
# that won't report errors twice and won't scan argument 3 times
2000-07-13 09:17:39 +00:00
adc4d1e5c8 ChangeLog update 2000-07-13 01:09:07 +00:00
Thies C. Arntzen 7f4909d9f5 fix ZTS startup without filename (thanx purify!) 2000-07-12 16:37:46 +00:00
Uwe Steinmann 2d66c98f28 - The pdfclock example using cpdf 2000-07-12 12:50:58 +00:00
Thies C. Arntzen 372f71eb1a unset active_symbol_table on zend-shutdown. 2000-07-12 12:00:17 +00:00
Thies C. Arntzen 88113794fd (php_error) only set php_errormsg if we (still) have an active_symbol_table. 2000-07-12 11:59:09 +00:00
Andi Gutmans e1df83e8e0 - By mistake recommited bad entry 2000-07-12 03:57:26 +00:00
Andi Gutmans f47760cbb6 - Add some Zend Engine changes to the NEWS file 2000-07-12 03:55:28 +00:00
699d59ea28 ChangeLog update 2000-07-12 01:09:08 +00:00
789897eb66 NEWS update 2000-07-12 01:09:05 +00:00
Andi Gutmans b0fd857c69 - Oops I was only thinking about VIRTUAL_DIR and forogt about the rest of
- TSRM which Zeev implemented  on his own.
2000-07-11 19:17:19 +00:00
Andi Gutmans 744a823fd2 - Commit new license for TSRM. 2000-07-11 19:15:51 +00:00
Danny Heijl 641b0aa2d3 - typo 2000-07-11 17:53:02 +00:00
Danny Heijl ec6861733b - Work-around for ESQL/C bug with BLOBs and NULL values (Danny). 2000-07-11 17:47:16 +00:00
Sam Ruby 4ef7cb0700 Fix for problem noted by Jay Greenspan on TurboLinux machines 2000-07-11 17:33:14 +00:00
Andrei Zmievski c9c425d625 Updated comments. 2000-07-11 16:51:04 +00:00
Andrei Zmievski 3ac0ae9dff @- Improved array_multisort() to be able to specify sort type as well sort
@  order. Incidentally, it can be used to sort multi-dimensional arrays
@  as well. (Andrei)
2000-07-11 16:48:03 +00:00
Zeev Suraski 3513866627 Another persistent hash - disable apply protection 2000-07-11 14:47:34 +00:00
Zeev Suraski 168ccfc133 Disable the hash_apply() protection on hashes that persist across requests - it's unsafe
because we may be aborted at any point
@- Fixed a possible data corruption in case of a huge amount of aborted requests (Zeev)
2000-07-11 14:29:38 +00:00
Zeev Suraski 1263932a0d Disable the hash_apply() protection on hashes that persist across requests - it's unsafe
because we may be aborted at any point
2000-07-11 14:27:31 +00:00
Stanislav Malyshev 148317f979 Fix a bug in passing second parameter of RECV_INIT with is_ref set 2000-07-11 13:23:48 +00:00
Andrei Zmievski 45c024c7dc Thies, finish your news entries next time. :) 2000-07-11 13:19:24 +00:00
Sascha Schumann b74e079ce7 The official product name is PostgreSQL, so s/PostgresSQL/PostgreSQL/ 2000-07-11 12:38:06 +00:00
Sascha Schumann c917e170f6 Always use the current DIR_DELIMITER to create the session file path 2000-07-11 12:29:19 +00:00
Thies C. Arntzen 3afe39e21f fix warning in VC6 2000-07-11 11:52:48 +00:00
Andi Gutmans f4e2a900d6 - Oops. Too early in the morning 2000-07-11 04:15:35 +00:00
Andi Gutmans f5401b43b5 - Don't need extern for functions 2000-07-11 04:11:15 +00:00
Andi Gutmans e95220e722 - Include iostream.h in C++. 2000-07-11 04:07:18 +00:00
be8d4ef329 ChangeLog update 2000-07-11 01:09:12 +00:00
87efadc76c NEWS update 2000-07-11 01:09:09 +00:00
Vlad Krupin ece6962f06 - PS_* constants changed to PSPELL_*
- zval is used instead of pval
(as Andrei Zmievski suggested)

Modified Files:
 	ext/pspell/pspell.c
2000-07-10 23:18:27 +00:00
Vlad Krupin a58ca45b2e Initial release. Includes:
- Functionality of aspell
- 3 modes of spellchecking (fast, normal, bad_spellers)
- support for run-together words
2000-07-10 21:29:19 +00:00
Egon Schmid 96675e9d58 Changed the descriptions. 2000-07-10 20:00:02 +00:00
Egon Schmid 6efcc50176 Changed some protos and the authors email address. 2000-07-10 19:46:29 +00:00
Danny Heijl 42693bb820 - Fix the case of NULL BYTE and TEXT columns. (Danny).
ESQL/C (sometimes ?) does not set the indicator variable,
  but the locator->loc_indicator instead.
2000-07-10 19:08:27 +00:00
Andrei Zmievski ac8e3b67d0 php.ini install docs from David Croft <david@infotrek.co.uk> 2000-07-10 17:35:18 +00:00
Jouni Ahto 51692417e8 - Oops, missed two GLOBAL()'s. 2000-07-10 14:52:17 +00:00
Jouni Ahto 4ecbeb8810 - Another attempt to sync with PHP3 and handle multiple recipients.
- Change all \'s to \r\n.
- It's now PHP 4.0 WIN32 -mailer.

# I'm unable to test, I haven't got Windows. Please check that it compiles.
2000-07-10 14:49:20 +00:00
Sascha Schumann 4f71062551 Lift the add-once limit for libraries, because there are valid reasons
against it. When dealing with static libraries, the link order is
important and it might be necessary to add a library multiple times to
satisfy mutual symbol requirements.
2000-07-10 10:26:13 +00:00
Sascha Schumann e8101d4f7b Unify use of my email address 2000-07-10 10:09:15 +00:00
Sascha Schumann 06382f01fd Fix prototype of apache_child_exit_handler and remove popen-related
preprocessor directives/macros.
2000-07-10 09:20:35 +00:00
Sascha Schumann 1722999310 Substitute CXX_PHP_COMPILE. Compiling C++ source files works now. 2000-07-10 09:10:40 +00:00
Sascha Schumann dad6ac414e Make the cxx suffix easily adjustable 2000-07-10 08:45:07 +00:00
Sascha Schumann eb0cbbd2d9 Also output the name of the save_handler when reporting a failed write
attempt.
2000-07-10 08:35:03 +00:00
Thies C. Arntzen 4f1a593ac8 masquarading as sascha;-) 2000-07-10 08:01:45 +00:00
Thies C. Arntzen 1cee6c5b78 @- Fixed closing 2000-07-10 07:57:01 +00:00
bab31955c2 ChangeLog update 2000-07-10 01:09:05 +00:00
Sascha Schumann e51571595c Add support for building C++ sources.
In your extension's config.m4, you need to use the m4 macro

    PHP_REQUIRE_CXX

This shall be called only, if your extension is enabled.

C++ source files shall not be put into the LTLIBRARY_SOURCES macro.
Instead, the filename of the object shall be put into
LTLIBRARY_OBJECTS_X. I.e. if your extension foo consists of foo.cxx, use

    LTLIBRARY_OBJECTS_X = foo.lo
2000-07-09 20:39:18 +00:00
Andi Gutmans c1ed6ef9cc - Fix memory leak. 2000-07-09 20:21:20 +00:00
Egon Schmid 1231a3e473 Fixed other protos. 2000-07-09 19:33:19 +00:00
Andi Gutmans 40b31d7487 - Need to seperate if the hash isn't a reference 2000-07-09 17:12:37 +00:00
Egon Schmid d7b554ee11 Fixed a proto. 2000-07-09 14:26:50 +00:00
Egon Schmid 11b749e047 Corrected a mispelled word. 2000-07-09 14:14:51 +00:00
Sascha Schumann fb8de6eec1 . 2000-07-09 13:41:12 +00:00
Sascha Schumann 2cfa840eb5 Restore INI entries after the request shutdown of modules.
This fixes the problems users of the session module encountered when
using a save handler other than files.
2000-07-09 13:20:27 +00:00
Andreas Karajannis 59604815e1 Fixed module / global shutdown for apache.
GSHUTDOWN functions are now executed and MSHUTDOWN functions are executed on child process exit
2000-07-09 12:51:01 +00:00
Stanislav Malyshev ad271a2b33 Fix stupid bug. 2000-07-09 10:31:47 +00:00
Jouni Ahto af343ca8a1 - Left debugging accidentally on... 2000-07-09 10:30:52 +00:00
Jouni Ahto ccb216ce49 (ibase_blob_import) It's good to have link handle available, if you want to
use it...
(_php_ibase_exec)   On error situations, only xsqlda was freed, not its
                    contents.
2000-07-09 10:27:41 +00:00
Jouni Ahto a63013bfbf - I must be getting demented. Forgot to add and register list destructor
function when creating new list entry type. Several other modifications
  too related to this. Blobs still not working.
2000-07-09 07:30:15 +00:00
Sam Ruby 629bc67086 Reentrancy fixes 2000-07-09 04:16:31 +00:00
Sam Ruby 5c13954eed Fix for JDK1.2.2/Tomcat3.2
(can't find beanInfo for interfaces which extend other interfaces)
2000-07-09 04:09:47 +00:00
423d9f3868 ChangeLog update 2000-07-09 01:09:08 +00:00
f3f5820c46 NEWS update 2000-07-09 01:09:05 +00:00
Egon Schmid ee513d6ed5 Eliminated a typo. 2000-07-08 22:55:40 +00:00
Andrei Zmievski 885e40db05 @- Updated str_pad() to be able to pad on left/right/both sides. (Andrei) 2000-07-08 20:38:23 +00:00
Egon Schmid 2bd5ad3131 Uncomplete proto. 2000-07-08 19:31:16 +00:00
Andi Gutmans 1cce5ed178 - Add zend_ulong 2000-07-08 15:49:39 +00:00
Egon Schmid 81f59f0949 Aren't there some function names conflicts? 2000-07-08 15:13:31 +00:00
Sam Ruby ee36612cef Add experimental APIs to get and clear the last exception 2000-07-08 10:35:50 +00:00
Chris Vandomelen fd3d84ee52 * php4/ext/sockets.c, php4/ext/php_sockets.h:
Numerous changes. Many prototypes changed to be more like the
	appropriate *NIX counterparts. Many new prototypes defining many
	more advanced socket routines. Better AF_UNIX socket support.
	bind() now recognizes the socket type and acts appropriately,
	instead of needing the AF_* for the socket passed in.
# Something I'd like to write yet is proper signal() support. Unfortunately,
# the last time I tried, doing anything with the signal except ignoring it
# caused PHP to segfault. And to have decent socket support.. at least, from
# my experience, having signals is a good thing. Only problem.. to implement
# it, some changes would have to be made to the parser - since that is where
# the problems lie on handling asynchronous signals.
2000-07-08 01:50:34 +00:00
68b639b4f5 ChangeLog update 2000-07-08 01:09:03 +00:00
Jouni Ahto 1df6557b49 - Restore testing for Unicode charmap to what it was, it was working(?), this
shouldn't have any effect on other charmaps.
- Remove bogus message about not finding any Unicode mapping table.
2000-07-07 14:00:50 +00:00
Jouni Ahto 99c6e63e66 - Move away from encoding transaction number into link_id and use properly
resources instead for both.
- Some cleaning.
2000-07-07 12:06:05 +00:00
Stanislav Malyshev be59613ddf Remove C++ commennts. 2000-07-07 09:50:50 +00:00
Stanislav Malyshev 4d41c8ba49 Fix fgets re-allocation (add +1 to accomondate ending \0). 2000-07-07 09:06:47 +00:00
Stanislav Malyshev 6ace712438 Fix add_assoc_string functions.
add_assoc_string(l) last parameter is "duplicate", not string length.
2000-07-07 08:47:11 +00:00
ed0fe0e764 ChangeLog update 2000-07-07 01:09:08 +00:00
1e32fddb44 NEWS update 2000-07-07 01:09:05 +00:00
Andi Gutmans 4eba5f1d39 - Remove code which has never been used (neither in PHP 3) 2000-07-06 23:31:19 +00:00
Andi Gutmans 80121ead56 - Make is_method_call() static and remove a couple of old lines 2000-07-06 23:28:05 +00:00
Andi Gutmans 58d1e0a2cc - Yet another fix... 2000-07-06 23:00:46 +00:00
Andi Gutmans db8734c82f - One more... 2000-07-06 22:38:01 +00:00
Andi Gutmans af5d38214b - One more fix for the latest patch 2000-07-06 22:29:06 +00:00
Andi Gutmans 2787a746f4 - One dumb bug in my latest patch 2000-07-06 22:21:24 +00:00
Andi Gutmans 5f893e68ff - Complex fix for solving a problem with objects & method calls.
- Previous version is tagged PRE_METHOD_CALL_SEPERATE_FIX_PATCH.
- I need to check this fix on a server so if it doesn't work I will revert
- it.
2000-07-06 22:08:22 +00:00
Andrei Zmievski 4aef5ef830 WDDX now implements __sleep()/__wakeup() functionality. 2000-07-06 21:00:18 +00:00
Andrei Zmievski 08011e1701 preg_replace() can be non-greedy now. 2000-07-06 19:32:22 +00:00
Stanislav Malyshev 905fb8ef82 Fix #5432: should register all variables. Thanks jeroen@darius.demon.nl. 2000-07-06 17:40:18 +00:00
Andi Gutmans 45ca7ec17d - Fix problem with newlines not being recognized under certain conditions 2000-07-06 16:19:36 +00:00
Uwe Steinmann 5bb19f7a9c - still an error in my last patch (thanks Andi) 2000-07-06 14:56:52 +00:00
Andi Gutmans 3247b9a207 - Use #ifdef PHP_WIN32 to detect Windows 2000-07-06 14:47:02 +00:00
Thies C. Arntzen 2b70aaf12d @- Fixed crash in gzopen(). (Thies)
# hmm - this should be rethought as one should be able to do
# gzopen("http://..")
2000-07-06 11:25:24 +00:00
Stig Bakken 81ded022e0 Applied DBMaker patch by Jeffrey Lin <clin@lion.syscom.com.tw> 2000-07-06 08:38:12 +00:00
Stig Bakken 6fd156b481 Applied multiple character set support diff by Rob Goodwin
@Multiple character set support in gdttf.c (Rob Goodwin)
2000-07-06 08:13:33 +00:00
Uwe Steinmann e4eb807516 - last commit indroduced a new compile warning, should be fixed now 2000-07-06 05:36:54 +00:00
Uwe Steinmann e1d9d149ab - fixed compile problems on win32 (thanks to Gabriel Weisz <gweisz@l-speed.com>) 2000-07-06 05:30:06 +00:00
dc7441c2fd ChangeLog update 2000-07-06 01:09:14 +00:00
7f62f74b85 NEWS update 2000-07-06 01:09:08 +00:00
Jouni Ahto 344955d020 - Still one misssing zend_list_addref() and small fix in pg_close.
Fixes #5349 (but not the way reporter wants...).

# There's something in the way database_connect/close functions behave when
# implemented the way as in mysql module that I find a bit strange... because
# of that extra zend_list_addref() there to prevent default link disappearing
# if it's not assigned to variable, when it is, I guess its' reference count
# is at this point 2, I can do: open a db link and assign it to a variable,
# close the link and still use it afterwards.
2000-07-05 22:17:30 +00:00
Jouni Ahto bcb7639fb3 - Test pg_encoding_to_char instead (it's existence in libpq means that
PostgreSQL was compiled with multibyte support and client encoding
  functions do something meaningful). Fixes #5417.
2000-07-05 21:28:16 +00:00
Zeev Suraski 37de6635b4 That's no bug, it's quite fine the way it is (if id is
set to -1, it's ignored, and the passed_id argument is used).

If you're experiencing trouble with mysql_close(), please give me a
reproducing script.  If there's a bug, it's not as simple as that.
2000-07-05 20:41:06 +00:00
Uwe Steinmann 46a9e6c23f - Discoverd possible bug. Could somebody have a look. 2000-07-05 19:48:24 +00:00
Uwe Steinmann f6347145ff - Link is now of type RESOURCE and not LONG 2000-07-05 19:47:43 +00:00
Danny Heijl 9f4c3eac9d - Increase allowed number of columns from 256 to 384. 2000-07-05 19:37:45 +00:00
Egon Schmid 80f13900f7 Fixed some protos. 2000-07-05 18:33:32 +00:00
Rasmus Lerdorf f2348a4826 When using HTTP auth from PHP, fill in the %u custom log field so the
authenticated used id will get logged in the Apache access_log
@- When using HTTP auth from PHP, fill in the %u custom log field so the
@  authenticated used id will get logged in the Apache access_log (Rasmus)
2000-07-05 18:02:42 +00:00
Andrei Zmievski 057264d6ed Fix attribution on NEWS. 2000-07-05 15:18:26 +00:00
Uwe Steinmann 055c523702 - Support for pdflib 3.01 2000-07-05 14:30:51 +00:00
Sascha Schumann e805a607cf Fix typo. A shutdown function is of course called, when the server
exits.
2000-07-05 11:27:24 +00:00
Uwe Steinmann 8a2788a5c8 - Note about FDF working again 2000-07-05 08:59:19 +00:00
Uwe Steinmann 68f35d5539 - fixed handling of fdf data (application/vnd.fdf) 2000-07-05 08:57:37 +00:00
Jouni Ahto ec62b2d1cd - First try at getting interbase to compile and work in ZTS-mode. Compiles. 2000-07-05 04:21:00 +00:00
Sascha Schumann 277b0e15b8 (PHP session_destroy) return the error condition from storage handler's
session_destroy method.

Submitted by: juhl@eisenstein.dk
2000-07-05 01:26:22 +00:00
94d7e1fa5b ChangeLog update 2000-07-05 01:09:08 +00:00
b784f02c0b NEWS update 2000-07-05 01:09:05 +00:00
Egon Schmid cd3973612b Not every argument type is mixed. 2000-07-04 20:31:54 +00:00
Egon Schmid f2457db5f3 Missed a two liner. 2000-07-04 19:41:31 +00:00
Mike Waychison 4604031b84 (PHP date) Added new 'O' format modifier for printing out the GMT Offset in
the same manner as emails have in their Date: header.  The format
           is similar to [+-]HHMM of offset.
@- Added new 'O' format modifier that will output the GMT offset as "[+-]HHMM"
@  (eg: Pacific time is -0700).  This is useful for things such as Date: mail
@  headers.
#  Um, this should have existed LONG time ago...   much better than that gmt
#   offset in seconds modifier :)
2000-07-04 16:16:32 +00:00
Stig Bakken 23ca7b9f1a Added "html_errors" directive to optionally disable HTML formatting of error
messages.  The default is on. (Stig)
2000-07-04 09:15:06 +00:00
Sascha Schumann f34c1fbee2 Make script work on POSIX sh 2000-07-04 05:15:33 +00:00
b9b3aaa62f ChangeLog update 2000-07-04 01:09:08 +00:00
02e636f4c0 NEWS update 2000-07-04 01:09:05 +00:00
Zeev Suraski 510adfc2a2 Fix logic (thanks to Dean Bennett) 2000-07-03 22:04:10 +00:00
Danny Heijl 017cde1d11 - Informix driver : Changes for new "main" directory (win32 build) 2000-07-03 19:27:28 +00:00
Andi Gutmans 6d6d52551e - Fix bug #4120 2000-07-03 19:17:57 +00:00
Sam Ruby bea9651995 Fix typo. Thanks to Adam Trachtenberg for noticing it! 2000-07-03 17:34:41 +00:00
Stanislav Malyshev 91130b6a00 Unblock SIGPROF signal when starting timer.
On Linux, this signal is blocked by default after first signal is run
2000-07-03 16:53:39 +00:00
Thies C. Arntzen d58ff645ff @- Fixed crash on OCI?Logon() failure. (thies) 2000-07-03 15:05:46 +00:00
Sam Ruby 1a6116c1f2 Add suggestions for dealing with difficult installations, based on feedback
from multiple people.  The .bashrc suggestion was from Rael Dornfest.
2000-07-03 09:00:54 +00:00
Sascha Schumann e24f505bf9 Identifiers which begin with an underscore are reserved. Changed
_PHP_SOCKETS_H to PHP_SOCKETS_H.
2000-07-03 06:45:07 +00:00
Rasmus Lerdorf 78ec5a54a0 Use AC_CHECK_HEADERS(unistd.h) instead 2000-07-03 05:25:00 +00:00
Chris Vandomelen 56ff5f7abf * ext/sockets/.cvsignore
- Forgot to import into repository.
2000-07-03 04:45:21 +00:00
Chris Vandomelen 21abde5ca1 * Makefile.in
config.m4
  php_sockets.h
  sockets.c
  sockets.php:
  - Added files needed for Unix-style sockets support in PHP.
2000-07-03 04:35:57 +00:00
7a4d4bcd6b ChangeLog update 2000-07-03 01:09:05 +00:00
Sascha Schumann a61721741b Replace macros which begin with an underscore through an appropiately
named macro.
2000-07-03 00:55:36 +00:00
Sascha Schumann 0db7994248 Rename macros which begin with underscore to valid macros. 2000-07-03 00:45:21 +00:00
Sascha Schumann cd754d7825 Rename macros which begin with underscore to appropiate macros. The general
rule is:

	macro_name=`echo $filename|tr a-z A-Z|sed 's/\./_/'`
2000-07-03 00:41:19 +00:00
Sascha Schumann b982307dd1 Change header protection macros to conform to standard.
Draft 3 of IEEE 1003.1 200x, "2.2 The Compilation Environment"

    All identifiers that begin with an underscore and either an uppercase
    letter or another underscore are always reserved for any use by the
    implementation.
2000-07-02 23:54:19 +00:00
Sascha Schumann 16017f6d78 Change header protection macros to conform to standard.
Draft 3 of IEEE 1003.1 200x, "2.2 The Compilation Environment"

  All identifiers that begin with an underscore and either an uppercase
  letter or another underscore are always reserved for any use by the
  implementation.
2000-07-02 23:46:51 +00:00
Sascha Schumann 8adf849dce Identifiers that begin with underscore are reserved for the implementation. 2000-07-02 23:16:54 +00:00
Chuck Hagenbuch 75879e3f18 i don't think there's a reason to nuke the db handle here (when freeing
results).
2000-07-02 19:04:36 +00:00
Shane Caraveo 8a4e08da4f fix php4dllts dsp file 2000-07-02 17:20:38 +00:00
Shane Caraveo 5fcf863579 fix apache dsp file 2000-07-02 17:20:03 +00:00
Shane Caraveo 712cd89434 fix nsapi dsp file 2000-07-02 17:19:49 +00:00
Stanislav Malyshev 10342b4b9e react only on CORE_ERROR 2000-07-02 16:36:31 +00:00
Stanislav Malyshev 4d1f03839c Fix couple of crashes on error conditions
Make session_module_name really work
2000-07-02 16:27:39 +00:00
Stanislav Malyshev d3afeb5b4e Be strict on errors in modules startup 2000-07-02 16:23:43 +00:00
Andi Gutmans 4f88e66167 - Take #2 with tab size 4 2000-07-02 16:06:45 +00:00
Andi Gutmans e3c5f6e890 - Beautify parser a bit. It still could do with some more at some point 2000-07-02 16:00:00 +00:00
Andi Gutmans b72a2738dc - Forgot ZEND_API 2000-07-02 15:39:54 +00:00
Andi Gutmans b9037f7d69 - Make PHP compile again under Windows.
- Please be careful when you make such changes.
2000-07-02 15:12:34 +00:00
Kristian Köhntopp 0249137148 unlink() is not a function related to HAVE_SYMLINK. It is being
used to delete files (actually, in Unix, names of files, as in
Unix nobody has deleted a file, ever).
2000-07-02 13:41:26 +00:00
Rui Hirokawa 074f52f382 added new functions: pg_setclientencoding, pg_clientencoding in Postgres-7.0. 2000-07-02 08:59:44 +00:00
4300d396b4 ChangeLog update 2000-07-02 01:09:08 +00:00
f54fca2cf6 NEWS update 2000-07-02 01:09:05 +00:00
Sterling Hughes b87f5e93a3 revert + note. 2000-07-01 22:39:27 +00:00
Sterling Hughes a43572123c - strdup -> estrdup
- check whether return_value array is initialized.
2000-07-01 21:34:45 +00:00
Rasmus Lerdorf 2b61d55b1d This is documented to not be case sensitive and it is not case sensitive
in PHP 3, so let's not make it case sensitive.
@Make the special Header("http/...") response be case insensitive like 3.0 (Rasmus)
2000-07-01 18:06:11 +00:00
Andi Gutmans 50e9b1fe36 - Commit tiny patch to remove redundant code by Amit Schreiber. 2000-07-01 12:23:09 +00:00
Sterling Hughes f5385608c1 stylistic modifications. 2000-07-01 01:43:37 +00:00
Sterling Hughes 8745b71fc6 definition. 2000-07-01 01:42:51 +00:00
Sterling Hughes 51370ab76c @- Allow cybercash to compile as a DL module. (Sterling)
-Allow cybercash to compile as a DL module.
-Stylistic changes.
-Add RETURN_STRINGL + Z_*_PP macros
2000-07-01 01:37:11 +00:00
440f8ad0a5 ChangeLog update 2000-07-01 01:09:09 +00:00
73908c2804 NEWS update 2000-07-01 01:09:06 +00:00
Sterling Hughes 857e80f5c6 Fix bug 4813. Fixed by greg@darkphoton.com 2000-06-30 22:44:20 +00:00
Sterling Hughes 7f7c14d9f5 @- Fixed the dbase_create function. (Sterling)
Fixed the dbase_create function.
2000-06-30 21:21:17 +00:00
Andrei Zmievski 1ca7f07d1a Typo. 2000-06-30 19:40:42 +00:00
Dan Kalowsky 5f81cba573 updates for the SolidEE to work for 3.5 with PHP4.0.1. Still causes warning of "integer from pointer used without typecast" but does not seem to effect the final build any. have not found a correction yet. has not shown the SQLParamData bug either, but unknown if it is closed as i was unable to reproduce it.
basically fixed the config.m4 file, and added a #define of HAVE_SOLID_35, due to the solidee 3.5 vs all other solidee systems being drastically different.  and solidtech providing no means for testing what version you are using.

does not include fixes for the linux users of glibc2 (automatically assumes libc5).  temporary work around, link your /usr/local/solid/lib files from a scll2x23 or scll2x30 to a scllux30 or scllux23 name...  suggestions to automate this are welcome.
2000-06-30 19:22:52 +00:00
Chuck Hagenbuch 353dcc835f DB::parseDSN() now checks the value it is passed, and if it is already an
array, returns it. This lets you pass arrays to the connect functions and
they'll work transparently.
2000-06-30 19:20:03 +00:00
Rasmus Lerdorf aa83dde27b Some user-agents send 'basic' instead of 'Basic' in their Authorization
header.  ApacheBench is an example.  PHP's HTTP Auth would not work with
these.
Some user-agents send 'basic' instead of 'Basic' in their Authorization
header.  ApacheBench is an example.  PHP's HTTP Auth would not work with
these. (Rasmus)
2000-06-30 17:39:21 +00:00
Zeev Suraski 5660a80cfc First Sybase-DB fix patch 2000-06-30 16:24:17 +00:00
Sam Ruby f72de266e2 remove unnecessary dependency 2000-06-30 14:33:46 +00:00
Zeev Suraski 397df3ca87 - Revert bogus time.h commit
- Fixed a problem under some versions of Windows that could cause PHP to hang
  on startup if errors occured, e.g. in the php.ini file
2000-06-30 13:23:08 +00:00
Zeev Suraski b3b67b04b7 Add a messagebox style that's safe to use from an ISAPI filter 2000-06-30 12:55:00 +00:00
Thies C. Arntzen 930b212c23 hmm, this file is not really auto-generated. 2000-06-30 12:31:24 +00:00
Zeev Suraski 37fb71b9ba Set version number on DLLs 2000-06-30 12:16:58 +00:00
Zeev Suraski 887495811b PHP modules should only be in the php_modules.dsw workspace... 2000-06-30 11:48:14 +00:00
Zeev Suraski fde2e61d54 error_reporting fix 2000-06-30 11:45:32 +00:00
Uwe Steinmann 33471de02a - using more of the zend API 2000-06-30 09:46:39 +00:00
Sam Ruby 2d8b72535f Fix garbage in warning strings, and IllegalArgumentException on
assignments which require data type conversions.
2000-06-30 04:48:46 +00:00
3def9079fd ChangeLog update 2000-06-30 01:09:04 +00:00
Sascha Schumann 69724dbc7c . 2000-06-30 00:40:07 +00:00
Zeev Suraski 7fb72c1726 Fixed opendir() thoroughly 2000-06-29 21:51:40 +00:00
Thies C. Arntzen 4e5597e061 welcome 4.0.2-dev 2000-06-29 17:37:58 +00:00
Andi Gutmans 1dcee33866 - Get rid of absolute path 2000-06-29 16:08:02 +00:00
Andi Gutmans bd8aeb5342 - Make pgsql compile on Windows. 2000-06-29 16:00:30 +00:00
Zeev Suraski f34b9d41be Add $context argument to error handler 2000-06-29 15:07:59 +00:00
Stanislav Malyshev a6b31f04cd Lowercase class name before checking for it
# I didn't really check it - have no WDDX
2000-06-29 14:50:23 +00:00
Stanislav Malyshev 740fc2f5de Lowercase class name before looking for it 2000-06-29 14:49:23 +00:00
Kristian Köhntopp 02cad904ee ezmlm_hash() function also available for php4. 2000-06-29 14:07:10 +00:00
Andi Gutmans 85422c3c60 - Extra newline crept in somehow 2000-06-29 13:34:58 +00:00
Stanislav Malyshev e8c219fef2 Make fgets not use maximal buffer length always, but shrink buffer
if it's too big.
2000-06-29 13:34:55 +00:00
Andi Gutmans 1f828a6e88 - Fix problem with DICARD_PATH being defined in windows 2000-06-29 13:31:52 +00:00
Andrei Zmievski a1b07b6303 Starting 4.0.2 changes. 2000-06-29 13:16:46 +00:00
Stanislav Malyshev 1d46433bfa Try to fix #5271 - crash when $HTTP_SESSION_VARS is already defined
via "global"
# I'm not sure it's fastest fix possible, but at least it should remove the
# crash
2000-06-29 13:09:27 +00:00
64293ba38f ChangeLog update 2000-06-29 01:09:08 +00:00
7f5c13db41 NEWS update 2000-06-29 01:09:05 +00:00
Zeev Suraski a31dc47ae4 Improve error handling code 2000-06-28 22:08:47 +00:00
Zeev Suraski 100196face Be HTML friendly 2000-06-28 21:31:50 +00:00
Andrei Zmievski fa5e623e95 Would be a useful thing to have. 2000-06-28 21:24:23 +00:00
Andrei Zmievski 49365eea79 Oops, didn't mean to commit that. 2000-06-28 20:09:04 +00:00
Andrei Zmievski 29e8e565c6 @- Added an optional parameter to preg_replace() that can be used to
@  specify how many replacements to make. (Andrei)
2000-06-28 20:07:26 +00:00
Andi Gutmans 3860254631 version update 2000-06-28 18:32:13 +00:00
Zeev Suraski 01a8f4606e I'm not sure whether this is necessary or not. Is it guarenteed that get_module_conf()
will always return a value?  Even if there were no relevant directives at all?
2000-06-28 18:27:13 +00:00
Andi Gutmans da8843aa55 - Fix problem with VIRTUAL_DIR and relative paths containing .. 2000-06-28 17:30:30 +00:00
Joey Smith b952c2c95a Added note about creating PDF documents in memory.
This is not quite complete, due to a bug in pdflib 3.0.
2000-06-28 11:44:32 +00:00
993803e997 ChangeLog update 2000-06-28 01:09:07 +00:00
3f4e93f7d0 NEWS update 2000-06-28 01:09:04 +00:00
Sascha Schumann 50595370e0 Cosmetic name change 2000-06-27 23:09:49 +00:00
Jouni Ahto e092c0c00c # Forgot this... 2000-06-27 22:25:51 +00:00
Jouni Ahto 8b8f191e59 # Reverting as requested. 2000-06-27 22:25:27 +00:00
Zeev Suraski 2fdd934f42 - Limit lines to 80 chars
- Let people know they don't have to use the ISAPI filter if they don't need
  HTTP authenatication
2000-06-27 21:39:41 +00:00
Jouni Ahto 1dfe76f5f6 - dba_[p]open accepts now a new parameter, which kind of database to create
(DBA_BTREE or DBA_HASH), if the handler is either 'db2' or 'db3' and
  mode 'c' or 'n'. It is ignored if mode is 'c' and the db already exists.
# Asked on the list 4 1/2 hours ago if anyone's got to say something to this,
# no response, so I'm assuming it's ok. And yes, I did test this.
2000-06-27 21:36:26 +00:00
Zeev Suraski c860633741 Fixed a bug in opendir(), which prevented readdir() from working properly if
the $dir argument wasn't explicitly specified
2000-06-27 18:44:30 +00:00
Zeev Suraski 130b9e7ef2 Revert the sendmail.c patch - it uses 4 different variables that aren't defined, and breaks
the Win32 build
2000-06-27 18:41:44 +00:00
Andi Gutmans eaa2a158c8 - Fix bug with VIRTUAL_DIR, .., and symlinks. 2000-06-27 18:18:18 +00:00
Sascha Schumann 7f059e7255 Use [\]n to refer to the two characters '\' and 'n'. This is the correct way
according to SUS II.

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

Change the deserialization semantics to:

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

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

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

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

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

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

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

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

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

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

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

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

  Ignore errors during header installation

  Automatically enable modules in self-contained mode

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

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

with

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

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

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

  (*) capable of using bundled library or external library

All changes:

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

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

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

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

  ext/Makefile.in has been simplified enormously.

  Dependencies are now stored in the build tree.

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

  Implicit rules for .S were removed.

  The NO_RECURSION feature was removed.

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

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

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

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

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

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

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

The changes should be completely backwards-compatible.

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

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

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

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

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

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

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

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

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

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

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

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

X-Powered-By: PHP/4.0b5-dev
Content-type: iso-8859-1   <<< where is text/html?
2000-02-25 10:10:43 +00:00
Egon Schmid c0b3d86d91 More protos. 2000-02-25 08:54:12 +00:00
Jouni Ahto ab7bbbb160 Ported T1lib support from PHP3.
@- Ported T1lib support from PHP3. (Jouni)
# That's almost a lie... needs still some work.
2000-02-25 06:43:51 +00:00
f0cfb4aee8 ChangeLog update 2000-02-25 02:09:12 +00:00
8fa4f7d83f NEWS update 2000-02-25 02:09:09 +00:00
Stig Bakken ba03c9f2aa started implementing directives for default mimetype/charset 2000-02-24 22:00:47 +00:00
Zeev Suraski b51805caeb Update .dsp 2000-02-24 20:03:58 +00:00
Egon Schmid e387105e35 Thies I will give up until tomorrow. 2000-02-24 17:23:04 +00:00
Egon Schmid 35a5c6f192 More protos. 2000-02-24 16:53:39 +00:00
Egon Schmid c846de3fb4 More protos. 2000-02-24 16:36:07 +00:00
Egon Schmid 0178fb1ab5 More protos. 2000-02-24 16:30:42 +00:00
Egon Schmid 76ec07c402 Is it ok, Andrei. 2000-02-24 16:03:27 +00:00
Zeev Suraski 5520a43b77 - Fix Win32 build in Release_TS* modes 2000-02-24 15:56:48 +00:00
Egon Schmid 478abf57d4 More protos. 2000-02-24 15:55:10 +00:00
Andrei Zmievski 7a22bb09d7 Revert the y2k ini patches.
# Adam's right, it shouldn't be here
2000-02-24 15:41:34 +00:00
Andrei Zmievski f5cc1929eb Turn on y2k_compliance by default. 2000-02-24 15:16:07 +00:00
Kristian Köhntopp 8481cdf62f Set y2k_compliance to "On" by default, as we do have y2k now. 2000-02-24 15:13:28 +00:00
Egon Schmid 971a6f1702 More protos. 2000-02-24 15:11:09 +00:00
Egon Schmid 284491887f There are more '|' and should be mixed. 2000-02-24 15:06:33 +00:00
Egon Schmid c07b5282af More protos. 2000-02-24 14:43:53 +00:00
Andrei Zmievski 2b9b11d3af Fix bug #3599. 2000-02-24 14:37:05 +00:00
Andrei Zmievski c401bbe22e Fix proto. 2000-02-24 14:07:35 +00:00
Sascha Schumann 3bd34bf386 @- Fixed -DEAPI inheritance from APXS. (Sascha) 2000-02-24 13:48:44 +00:00
Sascha Schumann 59d1066525 Improve APXS_CFLAGS checks 2000-02-24 13:43:28 +00:00
Thies C. Arntzen 4a37c618e6 @-Fixed possible crash in request-shutdown. (Thies)
(pvalue_config_destructor) gets a zval* not a zval**
2000-02-24 13:39:36 +00:00
Sascha Schumann d64c1652e2 Define EAPI, if Apache uses EAPI 2000-02-24 13:38:03 +00:00
Sascha Schumann fca41d2752 Remove XML_INCLUDE, we use the embedded expat always 2000-02-24 13:35:07 +00:00
Sascha Schumann 189847996d Revert last commit (cybercash has its own version of base64.h) 2000-02-24 10:58:21 +00:00
Egon Schmid 0275e4f665 Will watch the diffs as much as I can. 2000-02-24 10:11:42 +00:00
Thies C. Arntzen 88b903da66 zorro does a Z - egon does an e? 2000-02-24 09:32:50 +00:00
Egon Schmid fe615efb5c More protos. 2000-02-24 08:39:02 +00:00
Egon Schmid 7da7a50c69 More protos. 2000-02-24 08:07:29 +00:00
Egon Schmid 3b5efa05f7 More protos. 2000-02-24 07:49:43 +00:00
Egon Schmid dcf5f1a8d5 Most functions don't have protos. 2000-02-24 07:46:56 +00:00
Egon Schmid 5bccee70ae More protos. 2000-02-24 07:38:19 +00:00
Egon Schmid 9c94a2b971 More protos. 2000-02-24 07:27:39 +00:00
Sascha Schumann ac22cb771b WTF? 2000-02-24 03:05:28 +00:00
1200b075dc ChangeLog update 2000-02-24 02:09:09 +00:00
Zeev Suraski b82f261918 Fix name 2000-02-23 22:50:57 +00:00
David Hedbor 9d1847cdd4 The Roxen PHP4 module is now a part of the Roxen CVS which makes more sense. 2000-02-23 22:27:56 +00:00
Zeev Suraski 6981775d23 Remove obsolete code 2000-02-23 21:52:23 +00:00
Stig Bakken b275477b76 (PHP getrusage) don't define this function at all if the getrusage() function
is not available on the system.
2000-02-23 21:37:43 +00:00
Danny Heijl 4eae85673a - Win32 compile fixes 2000-02-23 21:18:06 +00:00
Andi Gutmans de6c9f35a1 - MySQL now compiles right into the PHP 4 binary on Windows 2000-02-23 21:10:18 +00:00
Sascha Schumann ccc386c8e3 Kill another warning 2000-02-23 20:56:18 +00:00
Sascha Schumann a965c2d73b Remove warning message 2000-02-23 20:48:12 +00:00
Sascha Schumann fcd0c2a03f . 2000-02-23 20:22:55 +00:00
Stig Bakken c475b6112a shut up cross compiling warnings 2000-02-23 19:26:31 +00:00
Sascha Schumann 1e1e162e31 Define SQL_SUCCEEDED for Solid.
PR: #3383
2000-02-23 19:16:34 +00:00
Thies C. Arntzen a8c7a9deb8 bump version number 2000-02-23 18:57:08 +00:00
Sascha Schumann 027512320f Include <sys/types.h> and <sys/time.h> before <sys/resource.h> 2000-02-23 17:39:58 +00:00
Egon Schmid 7bc9ea2b9f More protos. 2000-02-23 16:57:09 +00:00
Egon Schmid 11e2405489 More protos. 2000-02-23 16:38:38 +00:00
Andreas Karajannis 324391bc30 uodbc now uses zend's reference system. The crashes on request shutdown should be gone. 2000-02-23 16:34:08 +00:00
Egon Schmid 1970a527ff More protos. 2000-02-23 16:33:01 +00:00
Egon Schmid ecb74a01a1 More protos. 2000-02-23 16:26:10 +00:00
Egon Schmid 6aff02506e Thies, it looks now a little bit better.
Please correct my dummy entries.
2000-02-23 15:54:23 +00:00
Sascha Schumann 53e1ea7728 php.h should be the first file included, so that HAVE_* are defined 2000-02-23 15:44:02 +00:00
Egon Schmid 86c96359f3 More protos. 2000-02-23 15:04:36 +00:00
Egon Schmid eb1cc78be8 Changed here also. 2000-02-23 14:50:40 +00:00
Sascha Schumann 21ca719293 Include <sys/resource.h> for getrusage(2)
PR: #3479
2000-02-23 14:13:34 +00:00
Sascha Schumann 9dc605afe5 Fix include file path
Suggested by: stephen@ecoverage.com
PR: #3542
2000-02-23 14:08:16 +00:00
Sascha Schumann b828e6971c Speling mistake, fix suggested by zeekamotay@hotmail.com in #3558 2000-02-23 14:05:56 +00:00
Sascha Schumann da8c6bea46 Proper check for getrusage(), it somehow disappeared. 2000-02-23 13:57:06 +00:00
Egon Schmid 835fb93f63 More protos. 2000-02-23 09:29:10 +00:00
Andi Gutmans 4c0058f44a - Make libmsyql.lib compile. It fails with two unresolved symbols on link
with PHP 4 so I am not commiting the .dsw quite yet.
2000-02-23 05:25:28 +00:00
f788b6743b ChangeLog update 2000-02-23 02:09:12 +00:00
e3d76db455 NEWS update 2000-02-23 02:09:09 +00:00
Sascha Schumann 67f6945e8a Revert part of the last commit 2000-02-22 22:52:14 +00:00
Andrew Skalski ceebb2db61 added the ftp_site() function 2000-02-22 20:50:00 +00:00
Uwe Steinmann 5283b0b821 - added support for namespaces
- made entities in attributes possible
2000-02-22 20:24:56 +00:00
Andrei Zmievski 98674b73bd (PHP exec) Return last line of output properly. 2000-02-22 18:00:32 +00:00
Uwe Steinmann 9133a9b8b0 - some tiny changes to the test routine 2000-02-22 17:03:36 +00:00
Uwe Steinmann 5f34cfddbc - dom tree isn't editable anymore. Will probably change back in the future 2000-02-22 17:03:01 +00:00
Egon Schmid 18fee17d38 More protos. 2000-02-22 16:46:40 +00:00
Egon Schmid e06c2021c9 More protos. 2000-02-22 15:48:43 +00:00
Sascha Schumann 3b74bbe999 Print out a warning, if writing the session data failed. This might
happen in a request shutdown handler; php_error() worked for me in the
CGI version.
2000-02-22 14:44:29 +00:00
Sam Ruby b117adeded add proper dependencies 2000-02-22 14:37:45 +00:00
Andrei Zmievski 1e5749f47f Added phpextdist script for making external extension packages. 2000-02-22 14:26:12 +00:00
Andrei Zmievski 838bab821c Use 'cp' instead of 'install'. 2000-02-22 14:23:45 +00:00
Andrei Zmievski e9abf023b4 Typo. 2000-02-22 14:23:09 +00:00
Andrei Zmievski d5f6f5cb50 Remove duplicates. 2000-02-22 14:20:54 +00:00
74c94b2b1a ChangeLog update 2000-02-22 14:14:45 +00:00
485d10cb13 NEWS update 2000-02-22 14:14:42 +00:00
Thies C. Arntzen e0b0919375 @- Fixed OCI8 crash when returning cursors from stored-procedures. (Thies) 2000-02-22 13:56:48 +00:00
MySQL Team da98cacafc Ignore more 2000-02-21 18:54:27 +00:00
MySQL Team a75a9fb8ef Autogenerated file. 2000-02-21 16:42:14 +00:00
Zeev Suraski 2fb4209083 *** empty log message *** 2000-02-21 16:41:15 +00:00
Zeev Suraski a763da63ad Prepare a package 2000-02-21 16:34:50 +00:00
Uwe Steinmann aa7efd11b7 - Ups, 2000-02-21 16:24:05 +00:00
Uwe Steinmann 5dd0055c77 - pdf_set_text_matrix() disappeared in pdflib 2.30. Put in another ifdef
- small fix in testdom to suppress error msg.
2000-02-21 16:23:09 +00:00
Andi Gutmans 9ff0159bf4 - Update CVS with right version 2000-02-21 16:19:02 +00:00
Chuck Hagenbuch 13f27d8063 being accountable for the imap and mcal work that I've done (and adding an
MCAL credits line)
2000-02-21 14:50:41 +00:00
Andrew Skalski b99722ddf5 added myself to the FTP/IMAP credits 2000-02-21 14:35:28 +00:00
Thies C. Arntzen b7e53b12f6 compile-fix 2000-02-21 14:01:19 +00:00
Thies C. Arntzen 361ae6886e @- Fixed crash when magic_quotes were switched off. (Thies) 2000-02-21 12:13:27 +00:00
Thies C. Arntzen ef1ea9c895 the next baby is likely to be RC1, but... 2000-02-21 11:02:02 +00:00
22099d934e ChangeLog update 2000-02-21 02:09:03 +00:00
MySQL Team 8a61125a54 Some small changes for readability 2000-02-21 00:07:09 +00:00
MySQL Team bac6df0475 Autogenerated! 2000-02-21 00:03:28 +00:00
MySQL Team 349e81e468 Update for libmysql. 2000-02-20 22:50:57 +00:00
MySQL Team c3db2fe705 Update for libmysql. 2000-02-20 22:49:31 +00:00
790 changed files with 76029 additions and 31290 deletions

No files matched your search

+10857
View File
File diff suppressed because it is too large. Load diff
+344
View File
@@ -0,0 +1,344 @@
List of PHP maintainers
=======================
Maintenance 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.
Unknown: Not known at this time.
Status legend
-------------
Working: Working under both Windows and Unix.
Windows: Working only under Windows.
Unix: Working only under Unix.
Experimental: Under development or initial release.
Not Working: Not working.
Unknown: Status unknown.
== Server APIs ==
-------------------------------------------------------------------------------
EXTENSION: aolserver
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: apache
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: cgi
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: fhttpd
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: isapi
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: nsapi
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: phttpd
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: pi3web
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: roxen
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: servlet
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: thttpd
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
== Database extensions ==
-------------------------------------------------------------------------------
EXTENSION: dba
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: dbase
PRIMARY MAINTAINER: Jim Winstead <jimw@php.net>
MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: filepro
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: hyperwave
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
MAINTENANCE: Maintained
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: informix
PRIMARY MAINTAINER: Danny Heijl <Danny.Heijl@cevi.be>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: ingres_ii
PRIMARY MAINTAINER: David Hénot <henot@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: interbase
PRIMARY MAINTAINER: Jouni Ahto <jah@mork.net>
MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: msql
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: mssql
PRIMARY MAINTAINER: Frank M. Kromann <fmk@swwwing.com>
MAINTENANCE: Maintained
STATUS: Working
COMMENT: Tested on phpts and isapi versions
-------------------------------------------------------------------------------
EXTENSION: mysql
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: pgsql
PRIMARY MAINTAINER: Jouni Ahto <jah@mork.net>
MAINTENANCE: Odd fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: sybase
MAINTENANCE: Unknown
STATUS: Not Working
-------------------------------------------------------------------------------
EXTENSION: sybase_ct
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: oci8
PRIMARY MAINTAINER: Thies C. Arntzen <thies@digicol.de>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: odbc
PRIMARY MAINTAINER: Andreas Karajannis <Karajannis@gmd.de>
MAINTENANCE: Maintained
STATUS: Working
COMMENT: Working except for persistent connections
-------------------------------------------------------------------------------
EXTENSION: oracle
PRIMARY MAINTAINER: Thies C. Arntzen <thies@digicol.de>
MAINTENANCE: Maintained
STATUS: Working
COMMENT: Using the new OCI8 driver is encouraged where possible.
-------------------------------------------------------------------------------
== Other extensions ==
-------------------------------------------------------------------------------
EXTENSION: aspell
MAINTENANCE: Unknown
STATUS: Working
COMMENT: For aspell .27 and greater, check out the pspell extension
-------------------------------------------------------------------------------
EXTENSION: bcmath
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: calendar
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: com
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: cpdf
PRIMARY MAINTAINER: Uwe Steinmann <Uwe.Steinmann@fernuni-hagen.de>
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: CURL
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: cybercash
PRIMARY MAINTAINER: Evan Klinger <evan715@sirius.com>
MAINTENANCE: Maintained
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: domxml
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: exif
MAINTENANCE: Unknown
STATUS: Unknown
SINCE: 4.0.1
-------------------------------------------------------------------------------
EXTENSION: fdf
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
MAINTENANCE: Maintained
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: ftp
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: gd
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: gettext
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: icap
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: imap
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: java
PRIMARY MAINTAINER: Sam Ruby <rubys@us.ibm.com>
MAINTENANCE: Maintained
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: ldap
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: mcal
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: mcrypt
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
MAINTENANCE: Maintained
STATUS: Working
COMMENT: Currently working only with libmcrypt 2.7.7 and earlier
-------------------------------------------------------------------------------
EXTENSION: mhash
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: pcre
PRIMARY MAINTAINER: Andrei Zmievski <andrei@ispi.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: pdf
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
MAINTENANCE: Maintained
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: pfpro
PRIMARY MAINTAINER: David Croft <david@infotrek.co.uk>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: posix
PRIMARY MAINTAINER: Kristian Köhntopp <kris@koehntopp.de>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: pspell
PRIMARY MAINTAINER: Vlad Krupin <phpdevel@echospace.com>
MAINTENANCE: Unknown
STATUS: Unknown
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: readline
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: recode
PRIMARY MAINTAINER: Kristian Köhntopp <kris@koehntopp.de>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: session
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: snmp
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: sockets
PRIMARY MAINTAINER: Chris Vandomelen <chrisv@b0rked.dhs.org>
MAINTENANCE: Unknown
STATUS: Unknown
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: swf
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
MAINTENANCE: Maintained
STATUS: Unix (won't change)
-------------------------------------------------------------------------------
EXTENSION: sysvsem
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: sysvshm
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: wddx
PRIMARY MAINTAINER: Andrei Zmievski <andrei@ispi.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: xml
PRIMARY MAINTAINER: Thies C. Arntzen <thies@digicol.de>
MAINTENANCE: Maintained
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: yaz
PRIMARY MAINTAINER: Adam Dickmeiss <adam@indexdata.dk>
MAINTENANCE: Maintained
STATUS: Unknown
SINCE: 4.0.1
-------------------------------------------------------------------------------
EXTENSION: zlib
PRIMARY MAINTAINER: Stefan Roehrich <sr@linux.de>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
# iptc?
+229 -18
View File
@@ -1,14 +1,73 @@
Installation Instructions for PHP 4.0
-------------------------------------
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.
first a dynamic Apache module (DSO) for Apache 1.3.x with MySQL support
and then a static module. A more verbose explanation follows.
Note! Only install either the static module or the dynamic one. Do not
install both.
Note 2! If you are recompiling PHP to add new extensions or upgrading
something like GD, remove the config.cache file before you re-run
configure.
Note 3! If you are on Linux and have installed shared libraries, make
sure the location of these shared libraries are listed in your
/etc/ld.so.conf file. For example, if you have:
/usr/local/lib/mysql/libmysqlclient.so
Make sure /etc/ld.so.conf contains:
/usr/local/lib/mysql
Then run ldconfig.
If you want both PHP 3 and 4 modules in the same Apache server, check the
bottom of this file for instructions.
INSTALLATION WITH THE ZEUS WEB SERVER:
--Please see the 'README.Zeus' file included in this distribution
QUICK INSTALL
QUICK INSTALL (DSO)
For this to work your Apache httpd must have mod_so enabled.
Check using httpd -l. You should see something like:
Compiled-in modules:
http_core.c
mod_so.c
Chances are you will see a lot more modules than these two. That's ok,
as long as mod_so.c shows up you can proceed with the following steps:
$ gunzip -c php-4.0.x.tar.gz | tar xf -
$ cd php-4.0.x
$ ./configure --with-mysql --with-apxs
$ make
$ make install
If you get an error telling you that the apxs script could not be found,
look for it on your system and if you find it, provide the full path to it
as: --with-apxs=/path/to/apxs
Next you must copy php.ini-dist to the appropriate place (normally
/usr/local/lib/php.ini) and edit it as necessary to set PHP options.
The only thing left to do is to edit your httpd.conf file and make sure the
PHP 4 mime type is there and uncommented. You need a line that looks like
this:
AddType application/x-httpd-php .php
Then restart your server (apachectl restart) and you should be able to
serve up PHP files now. Make a test file called test.php and put some
PHP tags in it. Like <?phpinfo()?>, for example.
QUICK INSTALL (Static)
$ gunzip -c apache_1.3.x.tar.gz | tar xf -
$ cd apache_1.3.x
@@ -25,10 +84,10 @@ $ 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
$ make
(you should now have an httpd binary which you can copy to your Apache bin dir)
cd ../php-4.0.x
cp php.ini-dist /usr/local/lib/php.ini
$ 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-php .php
@@ -36,18 +95,66 @@ Edit your httpd.conf or srm.conf file and add:
VERBOSE INSTALL
Chances are you are reading this because the quick install steps above
did not work for you. If this is the case, congratulations, you are
among the elite few that actually reads documentation. It really is
not a difficult install and once you have done it once you will fly
through it.
Installing PHP can be done in four simple steps:
1. Unpack your distribution file.
You will have downloaded a file named something like php4xn.tar.gz.
Unzip this file with a command like: gunzip php4xn.tar.gz
You will have downloaded a file named something like php-4.0.x.tar.gz.
Unzip this file with a command like: gunzip php-4.0.x.tar.gz
Next you have to untar it with: tar -xvf php4xn.tar
Next you have to untar it with: tar -xvf php-4.0.x.tar
This will create a php-4.0.x directory. cd into this new directory.
2. Configure PHP.
2a. Configure PHP (Dynamic Module) - Skip to 2b if you wish to build
a static module
You now have to choose the options you would like. There are quite
a few of them. To see a list, type: ./configure --help
The only options that you are likely to want to use are the ones in
the last section entitled, "--enable and --with options recognized:"
A popular choice is to build the Apache module version. In order to
build PHP as a dynamic module for Apache-1.3.x you have to first have
Apache installed. Assuming Apache is already installed, make sure
the shared object module is enabled. To check this, type: httpd -l
You should see something like:
Compiled-in modules:
http_core.c
mod_so.c
You will most likely have a lot more modules than what is shown here.
As long as mod_so.c shows up in the list, PHP should be happy.
Now, type: ./configure --with-mysql --with-apxs
If you get an error telling you that the apxs script could not be found,
look for it on your system and if you find it, provide the full path to it
as: --with-apxs=/path/to/apxs
You might also want other flags on this configure line. --with-mysql
is just an example.
There are a few things that can go wrong during this configure step.
The most common is that you have asked for an option and that the
configure script can not find the files required to enable this
option in PHP. Chances are you can provide the full path to the
base directory under which the related files were installed. For
example, if you have installed the GD library in /opt/gd which means
that /opt/gd/include has your GD header files and /opt/gd/lib contains
your GD library files, you would use --with-gd=/opt/gd
Skip to step 3 for compilation and installation instructions.
2b. Configure PHP (Static Module) - Skip if you performed 2a
You now have to choose the options you would like. There are quite
a few of them. To see a list, type: ./configure --help
@@ -77,8 +184,16 @@ Installing PHP can be done in four simple steps:
Apache Configure script at least once before compiling PHP. It
doesn't matter how you have Apache configured at this point.
Skip to step 3b at this point.
3. Compile and install the files. Simply type: make install
3a. Dynamic Module Installation
Nothing else is needed here. Proceed to step 4a.
3b. Static Module Installation
For the Apache module version this will copy the appropriate files
to the src/modules/php4 directory in your Apache distribution if
you are using Apache 1.3.x. If you are still running Apache 1.2.x
@@ -136,11 +251,49 @@ Installing PHP can be done in four simple steps:
somewhere. Re-edit Configuration and try again. If it goes well,
type: make
4. Setting up the server.
Assuming it compiles without errors, proceed to step 4b.
4a. Setting up the server. (Dynamic Module)
The make install command in step 3 should have done most of your
work for you. It actually edits your httpd.conf file and tries to
enable the dynamic PHP module. To verify this, look for a line that
looks like this:
LoadModule php4_module libexec/libphp4.so
The actual path before the libphp4.so part might differ slightly. This
is likely fine. If you are paranoid you can examine the output from the
make install step to see where the libphp4.so file was actually put and
place the full path to this file on this LoadModule line.
If somewhere in your httpd.conf file you have a ClearModuleList line
then you also need this line:
AddModule mod_php4.c
And finally you need to tell Apache which file extension should trigger
PHP. You do this by creating a special mime type and associating it
with an extension. We suggest using:
AddType application/x-httpd-php .php
You are however free to use any extension you wish, including .html.
Note! If a line has a # at the beginning, then it is commented out
and you need to remove the # for that line to take effect.
Finally you need to copy php.ini-dist to the appropriate place
(normally /usr/local/lib/php.ini) and edit if necessary.
Once you have made these changes you should be ready to restart your
server and try it out. Type: apachectl restart
4b. Setting up the server. (Static Module)
You should now have a new httpd binary. Shut down your existing server,
if you have one, and copy this new binary overtop of it. Perhaps make
a backup of your previous one first. Then edit your conf/srm.conf file
a backup of your previous one first. Then edit your conf/httpd.conf file
and add the line:
AddType application/x-httpd-php .php
@@ -154,13 +307,71 @@ Installing PHP can be done in four simple steps:
Any file ending in .phps will now be displayed with full colour syntax
highlighting instead of being executed.
When you are finished making changes to your srm.conf file, you can
Note that on some older server setups, the AddType lines are in the
conf/srm.conf file instead of conf/httpd.conf.
Note! If a line has a # at the beginning, then it is commented out
and you need to remove the # for that line to take effect.
When you are finished making changes to your httpd.conf file, you need
to copy php.ini-dist to the appropriate place (normally
/usr/local/lib/php.ini) and edit if necessary. You can then
start up your server.
USING PHP3 AND PHP4 AS CONCURRENT APACHE MODULES
5. Testing it all worked
Create a test file named test.php in your web tree somewhere and
put some test PHP tags in it. <?phpinfo()?> is a good first test.
This tag tells PHP to do a braindump and tells you all sorts of things
about itself.
WHY DISABLING -fPIC WORKS ON LINUX
From: Martin v. Loewis <martin@loewis.home.cs.tu-berlin.de>
To: glibc-linux@ricardo.ecn.wfu.edu
Subject: Re: Shared library -shared vs. -fpic
[In reply to Kaz Kylheku <kaz@ashi.footprints.net>]
> PIC stands for Position-Independent Code.
Correct.
> Code isn't position-independent (or ``relocatable'') cannot be
> loaded at an arbitrary address;
Wrong.
> it requires some references to be patched at load time.
Correct.
> Shared libraries need to be relocatable because it's not known
> beforehand what address they will be loaded at
Correct, depending on the meaning of "relocatable". PIC code typically
does not contain relocations; that's why its position-independent.
> Just because you don't specify -fPIC doesn't mean that the compiler
> won't emit position-independent code; the option prevents it from
> emitting position-dependent code in situations where it otherwise
> would.
Correct. However, a non-trivial shared library typically won't be
position-independent unless explicitly compiled with
-fPIC. Linux/glibc indeed does not require a shared library to be
position-independent; instead, it will perform the relocations in the
binary, even if they refer to code pages. As a result, those relocated
pages won't be shared across processes, anymore.
Regards,
Martin
USING PHP 3 AND PHP 4 AS CONCURRENT APACHE MODULES
Recent operating systems provide the ability to perform versioning and
scoping. This features make it possible to let PHP3 and PHP4 run as
scoping. This features make it possible to let PHP 3 and PHP 4 run as
concurrent modules in one Apache server.
This feature is known to work on the following platforms:
@@ -169,7 +380,7 @@ USING PHP3 AND PHP4 AS CONCURRENT APACHE MODULES
- 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
To enable it, configure PHP 3 and PHP 4 to use APXS (--with-apxs) and the
necessary link extensions (--enable-versioning). Otherwise, all standard
installations instructions apply. For example:
+12 -7
View File
@@ -1,5 +1,5 @@
--------------------------------------------------------------------
The PHP License, version 2.01
The PHP License, version 2.02
Copyright (c) 1999, 2000 The PHP Group. All rights reserved.
--------------------------------------------------------------------
@@ -37,12 +37,17 @@ are met:
"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.
6. The software incorporates the Zend Engine, a product of Zend
Technologies, Ltd. ("Zend"). The Zend Engine is licensed to the
PHP Association (pursuant to a grant from Zend that can be
found at http://www.php.net/license/ZendGrant/) for
distribution to you under this license agreement, only as a
part of PHP. In the event that you separate the Zend Engine
(or any portion thereof) from the rest of the software, or
modify the Zend Engine, or any portion thereof, your use of the
separated or modified Zend Engine software shall not be governed
by this license, and instead shall be governed by the license
set forth at http://www.zend.com/license/ZendLicense/.
-101
View File
@@ -1,101 +0,0 @@
List of PHP maintainers
=======================
Status legend
-------------
Supported: Someone is actually paid to look after this.
Maintained: Someone actually looks after it.
Odd Fixes: It has a maintainer but they don't have time to do
much other than throw the odd patch in. See below..
Orphan: No current maintainer [but maybe you could take the
role as you write your new code].
Obsolete: Old code. Something tagged obsolete generally means
it has been replaced by a better system and you
should be using that.
--------------------------------------------------------------------------------
EXTENSION: apache
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: cybercash
PRIMARY MAINTAINER: Evan Klinger <evan715@sirius.com>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: dba
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: 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
--------------------------------------------------------------------------------
-21
View File
@@ -1,21 +0,0 @@
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)
MS SQL Working (tested on phpts and isapi versions)
+27 -25
View File
@@ -1,24 +1,14 @@
DEPTH = .
topsrcdir = @topsrcdir@
srcdir = @srcdir@
VPATH = @srcdir@
ZEND_DIR = $(srcdir)/Zend
SUBDIRS = Zend ext sapi $(TSRM_DIR) $(REGEX_DIR) . $(PEAR_DIR)
SUBDIRS = Zend main ext sapi $(TSRM_DIR) $(REGEX_DIR) . $(PEAR_DIR)
LTLIBRARY_NAME = libphp4.la
LTLIBRARY_SOURCES = \
main.c internal_functions.c snprintf.c php_sprintf.c \
configuration-parser.c configuration-scanner.c \
safe_mode.c fopen-wrappers.c php_realpath.c alloca.c \
php_ini.c SAPI.c rfc1867.c dlist.c php_content_types.c strlcpy.c \
strlcat.c mergesort.c reentrancy.c php_variables.c
LTLIBRARY_SOURCES = stub.c
LTLIBRARY_DEPENDENCIES = \
Zend/libZend.la \
sapi/$(PHP_SAPI)/libsapi.la \
main/libmain.la \
$(REGEX_LIB) \
$(EXT_LTLIBS) \
$(TSRM_LIB)
@@ -26,29 +16,41 @@ LTLIBRARY_DEPENDENCIES = \
LTLIBRARY_LDFLAGS = -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS)
LTLIBRARY_LIBADD = $(LTLIBRARY_DEPENDENCIES) $(EXTRA_LIBS)
PROGRAM_NAME = $(PHP_PROGRAM)
PROGRAM_NAME = php
PROGRAM_SOURCES = stub.c
PROGRAM_LDADD = libphp4.la
PROGRAM_LDFLAGS = -export-dynamic
PROGRAM_DEPENDENCIES = $(PROGRAM_LDADD)
targets = $(LTLIBRARY_NAME) $(PROGRAM_NAME)
targets = $(LTLIBRARY_NAME) $(PHP_PROGRAM)
install_targets = install-local install-modules
include $(topsrcdir)/build/rules.mk
include $(topsrcdir)/build/library.mk
include $(topsrcdir)/build/program.mk
install_targets = install-sapi install-modules
install-local:
include $(top_srcdir)/build/rules.mk
include $(top_srcdir)/build/library.mk
include $(top_srcdir)/build/program.mk
install-sapi:
@$(LIBTOOL) --silent --mode=install cp libphp4.la $(phptempdir)/libphp4.la >/dev/null 2>&1
-@$(mkinstalldirs) $(bindir)
-@if test ! -r $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME); then \
for i in 0.0.0 0.0 0; do \
if test -r $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME).$$i; then \
$(LN_S) $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME).$$i $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME); \
break; \
fi; \
done; \
fi
$(INSTALL_IT)
configuration-parser.h configuration-parser.c: configuration-parser.y
$(YACC) -p cfg -v -d $< -o configuration-parser.c
install-modules:
@test -d modules && \
$(mkinstalldirs) $(moduledir) && \
echo "installing shared modules into $(moduledir)" && \
rm -f modules/*.la && \
cp modules/* $(moduledir) >/dev/null 2>&1 || true
configuration-scanner.c: configuration-scanner.l
$(LEX) -Pcfg -o$@ -i $<
install-su: install-modules
(cd pear && $(MAKE) install)
.NOEXPORT:
+495 -33
View File
@@ -1,6 +1,468 @@
PHP 4.0 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2000, Version 4.0.2
- Fixed warning when shutting down OCINLogon() connections. (Thies)
- Fixed \n in session variables bug on Win32 (Stas)
- OCIError() would sometimes not report failed connections. (Thies)
- Fix HEAD request bug on an Apache ErrorDocument redirect and preserve
the status code across the redirect as well. (Rasmus)
- Add Olympus-specific tags to read_exif_data() (Rasmus)
- Fixed bug in imap_fetchheader() where using FT_PREFETCHTEXT didn't return
the body. Bug #4447. (Jani)
- Fixed exec() returning "\0" when output is empty
- Added XML_Parser class in PEAR (Stig)
- Added "make test" target in pear/ and added some regression tests (Stig)
- Fix bug in strip_tags function as per bug #5857 (Rasmus)
- Fix reading of IPTC via GetImageInfo() for certain JPEG files. (Thies)
- Improved the output-buffering functions to be re-entrant (Zeev)
- Made ldap_add(), ldap_modify(), ldap_mod_add(), ldap_mod_replace()
binary-safe. Original patch: Terrence Miao <terrence_miao@email.com> (Jani)
- CGI aka. command line version has now an option '-l' for syntax check
without execution (Hartmut)
- Fixed bug in ldap_get_values_len() which makes it NULL-safe. (Jani)
- Bug-report and fix submitted by Michel Alexeline <alexel@dr15.cnrs.fr>
- Make ext_skel create a Makefile.in set up to handle shared extension
support automatically (Rasmus)
- Fix php_realpath not to die on non-existing files (needed for touch()) (Stas and china@thewrittenword.com)
- Fix get_browser() function (Stas)
- Fix symbol clash which caused a DSO problem on OpenBSD (Rob Black and
anil@recoil.org)
- Added new function: ldap_compare(). (Jani)
- Fixed a bug in ldap_get_entries() and ldap_get_attributes(). (Jani)
- Ported DB to new error reporting scheme in PEAR. (Stig)
- Added sybase and ibase DB backends in PEAR. (Sterling)
- New PEAR package Payment_Verisign for use with the Payflow Pro
(pfpro) extension. (David Croft)
- Added CURL support. (Sterling)
- Catch users trying to set "compatibility" parameter in PDF, which is not
supported from user-land. (Joey)
- Fixed dbase_add_record. (Sterling)
- Added new function wordwrap() to wordwrap long strings from Chris
Russel <russel@yorku.ca> (David Croft)
- Added four additional arguments: attrsonly, sizelimit, timelimit, deref which
were missing in ldap_search(), ldap_list() and ldap_read() functions (Jani)
- Fixed a bug in ldap_search/list/read() which prevented returning the partial
results when 'Sizelimit exceeded' error occurred. (Jani Taskinen)
- Fixed preg_replace() to automatically escape quotes in matched
strings when using /e modifier. (Andrei)
- Itanium patch (Steve Robb)
- Set default include_path so PEAR files can be reached (Stig)
- Added "pear" executable, requires CGI version installed (Stig)
- Added extension ii for Ingres II native support. See README in ext/ingres_ii
directory. (David H)
- Added Win32 project for the Interbase module (Zeev)
- Added ability to perform calls to the parent class without explicitly
specifying its name, using parent::func_name(...) (Zeev, Zend Engine)
- You can now call Ora_Error() without prameters to get the reason
for a failed connection attempt. (Kirill Maximov)
- New extension "pfpro" for interface with Verisign Payflow Pro (David Croft)
- Add IMG_GIF, IMG_JPG, IMG_JPEG, IMG_PNG and IMG_WBMP constants for
imagetypes() function (Rasmus)
- Add ImageTypes() function which returns a bitfield with the supported
image formats. 1=gif, 2=jpeg, 4=png and 8=wbmp (Rasmus)
- Make it possible to specify an empty string as a thousands-seperator
in number_format() (Rasmus)
- Shared module support for LDAP extension (Troels Arvin)
- Fixed a bug with imap_mail where apache would segfault if the rpath
parameter was specified.
- Use dashes and short day name in cookies since some browsers seem picky
about this (Rasmus)
- Added pspell module. (Vlad)
- Added 3 additional arguments to the user-defined error handler - the file
name and line number in which the error occured, and the context (local
variables) of the code in which the error occured (Zeev, Zend Engine)
- Improved the error handling code to handle an error in a user-defined error
handling function (Zeev, Zend Engine)
- Fixed leak when using string offsets in the array() construct.
(Andi, Zend Engine)
- Fixed corruption problem when changing deeply nested values in objects.
(Andi & Zeev, Zend Engine)
- Improved array_multisort() to be able to specify sort type as well sort
order. Incidentally, it can be used to sort multi-dimensional arrays
as well. (Andrei)
- Fixed a possible data corruption in case of a huge amount of aborted requests
(Zeev)
- Apache module would sometimes close a wrong file-descriptor. (Sascha)
- Fixed use of alternative storage handlers in the session module. (Sascha)
- Updated str_pad() to be able to pad on left/right/both sides. (Andrei)
- Fixed crash in gzopen(). (Thies)
- Multiple character set support in gdttf.c (Rob Goodwin)
- When using HTTP auth from PHP, fill in the %u custom log field so the
authenticated used id will get logged in the Apache access_log (Rasmus)
- Support for pdflib 3.01. (Uwe)
- FDF Data is handled properly and can be accessed by reading
HTTP_RAW_POST_DATA. (Uwe)
- Added new 'O' format modifier that will output the GMT offset as "[+-]HHMM"
(eg: Pacific time is -0700). This is useful for things such as Date: mail
headers. (Mike W)
- Fixed crash on OCI?Logon() failure. (Thies)
- Make the special Header("http/...") response be case insensitive like 3.0
(Rasmus)
- Allow cybercash to compile as a DL module. (Sterling)
- Fixed the dbase_create function. (Sterling)
- Fixed a problem under some versions of Windows that could cause PHP to hang
on startup if errors occured, e.g. in the php.ini file (Zeev)
- Fixed opendir() again. It should actually work well continuously now (Zeev)
- Added three additional arguments to be sent to a user-defined error handler -
the filename and line number in which the error occured, and the context
(the local variables) of the error (Zeev, Zend Engine)
- Improved the error handling code to handle an error in a user-defined error
handling function (Zeev, Zend Engine)
- Added an optional parameter to preg_replace() that can be used to
specify how many replacements to make. (Andrei)
28 Jun 2000, Version 4.0.1
- Fixed a possible crash in the LDAP modify code. (Eric Kilfoil)
- Fixed a bug in opendir(), which prevented readdir() from working properly if
the $dir argument wasn't explicitly specified (Zeev)
- Made --enable-discard-path work again. (Andi)
- Removed 8KB limit on line length of the file() function (Zeev)
- Disabled dl() when PHP is being used as a module inside a multithreaded web
server - it didn't work before, and caused weird results (Zeev)
- Added the ImageColorClosestHWB(), ImageCopyMerge() and ImagePaletteCopy()
functions. (Sterling)
- Added ImageCreateFromWBMP() function. (Jouni)
- Fixed problems with POST requests under the NSAPI module. (Roberto Biancardi)
- Added spliti() function. (Thies)
- Fixed serializer behaviour with regards to serializing objects whose class
definition was not available in the deserializing context. (Sascha)
- Improve memory cache performance and increase cache size. (Stas, Zend Engine)
- Added a crc32 checksum function - used by the UdmSearch search engine
and currently run through a system call. This will speed up the UdmSearch
php frontend significantly. (Rasmus)
- Modified in_array() to not touch array pointer. (Andrei)
- Added restore_error_handler(). (Zeev, Zend engine)
- Fixed erroneous file names and line numbers in error situations under the
multithreaded version of PHP - most noticeably Win32 (Zeev, Zend Engine)
- Fixed problem with CGI crashing on certain servers especially Windows Apache
& O'Reilly website (Andi)
- Added Pi3Web SAPI module; run ./configure --with-pi3web to enable this.
(Holger; zimpel@t-online.de)
- Enhanced WDDX functions to call __sleep() and __wakeup() when working on
objects. (Andrei)
- Changed WDDX to serialize arrays as structs only if needed. (Thies)
- Implemented max_execution_time under Win32 (Zeev)
- Updated strtotime() to handle many more formats. It now has complete
feature parity with GNU date command. (Andrei)
- Added support for multiple arguments in unset(). (Faisal, Zend Engine)
- Functions that expect a resource but are passed something else now return
NULL instead of FALSE. (Thies, Zend Engine)
- Fixed gmmktime(), on certain systems it incorrectly adjusted for the timezone
offset and daylight savings time. (Andrei)
- Moved VC++ Win32 project and workspace files to the win32 directory
(Zeev)
- Fixed checkdate() to not return true on non-numeric arguments (Rasmus)
- Added --enable-c9x-inline option for compilers which support the new C9x
standard. If you encounter undefined references to i_zend_is_true and
other symbols, you should enable this. (Sascha, Zend Library)
- Fixed a problem in ldap_add() and ldap_modify(), sometimes added trailing
garbage to the values (Stig Venaas)
- Fixed a problem with dbmopen() not handing 'c' correctly with dbm/db/ndbm
databases. (JimJag)
- Fixed a crash in number_format() when used with locales. (Andrei)
- Fixed an initialization problem in the MS-SQL problem that could cause
a crash in mssql_query() (Zeev)
- Upgraded PCRE to version 3.2 and fixed a bug when anchored pattern
matched an empty string. (Andrei)
- Fixed a bug that prevented PHP from paying attention to the extension_dir
directive with extensions that were loaded from the php.ini file (Zeev)
- Changed set_error_handler() to return the name of the previously defined
error handler, if any (Zeev, Zend Engine)
- Declared <?php_track_vars?> officially dead. It didn't work in PHP 4.0.0
either, but now it's gone for good (Zeev)
- Make convert_cyr_string() binary safe and stop it from corrupting other
PHP variables. (Andi)
- Added functions array_unique, array_intersect and array_diff (Stig Venaas)
- Fixed problem when using uninitialized values in comparisons with strings.
They behave as empty strings again just like in PHP 3.
(Andi & Zeev, Zend Engine)
- Fixed 'Z' flag in date() to adjust for daylight savings time. (Andrei)
- Fixed var_dump() not to modify the internal order of array elements (Zeev)
- Fixed stripcslashes() to remove to strip \ in unknown escapes instead of
leaving it. (Andrei)
- Changed WDDX to always serialize arrays as structs. (Andrei)
- Fixed include_once() to issue a warning in case the supplied file name is
not found (Zeev, Zend Engine)
- Fixed a bug in get_declared_classes() which could return the same class
multiple times under certain circumstances (Zeev, Zend Engine)
- Fixed a bug in rawurldecode() that would cause in rawurldecode() corrupting
its argument (Zeev)
- Parse errors (or other errors) in the php.ini files under Windows will no
longer mess up the HTTP headers in CGI mode and are now displayed in a
message box (Zeev)
- Fixed a crash in OCIFetchStatement() when trying to read after all data
has already been read. (Thies)
- fopen_wrappers() are now extensible via modules (Hartmut Holzgraefe)
- Make trim strip \0 to match php 3 (Rasmus)
- Added function imagecreatefromxbm(). (Jouni)
- Added function imagewbmp(). (Jouni, based on patch from Rune Nordbøe
Skillingstad)
- Added str_pad() for padding a string with an arbitrary string on left or
right. (Andrei)
- Made the short_tags, asp_tags and allow_call_time_pass_reference INI
directives work on a per-directory basis as well, e.g. from .htaccess
files. (Zeev)
- Added fflush() function. (Eric Huss)
- Fixed a problem with static variables, default function arguments and class
member variables, that contained array values. (Andi & Zeev, Zend Engine)
- Fix virtual() when used with output buffering (Marc Pohl)
- Clean up constants in flock() function and add optional 3rd arg which
is set to true on EWOULDBLOCK (Rasmus)
- Added functions pg_loimport(), pg_loexport(). (Jouni)
- Added SWF support to getimagesize() function (Derick Rethans)
- Added support for both indexed and non-indexed arrays of file uploads
eg. name="file[]" type="file" (Rasmus)
- Added create_function(), which gives the ability to create functions
on-the-fly (Zeev, Zend Engine)
- Added support for comparisons of arrays (with arrays) and objects (with
objects); The equality operator (==) performs an unordered comparison,
whereas the identity operator (===) performs an ordered comparison (Zeev,
Zend Engine)
- Allow all functions that receive user-defined function callbacks to accept
an array that contains an object and a method name, in place of a function
name, e.g. usort($array, array($obj, "ObjSort")) (Zeev, Zend Engine)
- Added set_error_handler() to allow custom error handling functions,
instead of the built-in error handling code (Zeev, Zend Engine)
- Renamed user_error() to trigger_error(); user_error() remains
defined for compatibility (Zeev, Zend Engine)
- Fix the global/static statements to require a trailing terminating
semi-colon ';'. (Andi, Zend Engine)
- Cleaned up PCRE extension and made it binary-safe. (Andrei)
- Added third argument to in_array(). If it's true, then in_array()
will use strict comparison instead of the default one. (Andrei)
- Added pg_trace() and pg_untrace (Dominic J. Eidson & Zeev)
- ignore_user_abort=Off is now default. (Thies)
- Added array_merge_recursive() that will recursively merge values
under the same keys. (Andrei)
- fixed crash in OCIParse when parsing invalid SQL. (Thies)
- Fixed a bug in mysql_connect() that made it ignore the socket argument, in
case of non-persistent connects (Zeev)
- Added disable_functions php.ini directive, to allow administrators to disable
certain functions for security reasons (Zeev)
- Fixed sessions on Win32. When setting the directory depth parameter in
save_path you need to now delimit it with a ';' instead of ':', e.g
"5;/tmp" instead of "5:/tmp" (Andi)
- Changed the Apache handler's return status to 'Declined' when a requested
PHP file could not be found. Returning 'Not Found' caused problems
in the ErrorDocument handler stage in that $REDIRECT_REDIRECT_ERROR_NOTES
was not getting set at all. Moving to 'Declined' should fix this and I
can't see any other side effects. (Rasmus)
- Fixed scanning decimal numbers in internationalized environments. They should
always be in standard US format e.g. 23.3. (Andi, Zend Engine)
- Added second argument to preg_quote() which allows quoting of
one additional character, usually the regex delimiter. (Andrei)
- Uncommitted outstanding OCI8 transactions are now rolled back
before the connection is closed. (Thies)
- ignore_user_abort() & friends should now work in CGI mode as well.
(Patch by daniel.braun@ercom.fr)
- Added extension YAZ (dickmeiss).
- Fixed a crash bug triggered by certain cases of class redeclarations
(Stanislav & Zeev, Zend Engine)
- Fixed min()/max() segfault. (Andrei)
- New module for reading EXIF header data from JPEG files. Most digital
cameras will embed all sorts of information about a picture inside the
jpeg images it generates. (Rasmus)
- Fixed basename() bug where "file.ext///" would not return the same
as "/path/file.ext///" (Rasmus)
- Added the swf_ortho function. (Sterling)
- Moved to virtual current working directory support. This highly improves the
functionality and stability of multi-threaded versions of PHP (Andi, Sascha)
22 May 2000, Version 4.0.0 Release
- Allow the writing of flash files to stdout.
- Fixed a crash bug in .phps syntax-highlighted files (Andi)
- Improved round() to allow specification of rounding precision.
(Andrei, Todd Kirby <kirbyt@yahoo.com>)
- Added SORT_REGULAR, SORT_NUMERIC, SORT_STRING flags that can be used with
non-user sort functions for precise sorting behavior. (Andrei)
- Fixed two 64-bit issues (startup crash, gethostbyaddr). (Sascha)
- NULL values are now preserved in the return value of mysql_fetch_array()
and mysql_fetch_object(). (Andrei)
- Ported InterBase module finally from PHP 3 to PHP 4. Full support for
InterBase 6. (Jouni)
- Added swf_definepoly for drawing polygons to the SWF functions. (Sterling)
- Ported imagegammacorrect from PHP3 to PHP4. (Sterling)
- Added array_rand() function. (Andrei)
8 May 2000, Version 4.0 Release Candidate 2
- NSAPI WIN32 Module compilable, untested (Shane)
- Apache WIN32 Module compilable and lightly tested. (Shane)
- Enabled assert() by default in php.ini-dist. (Andrei)
- Put in safeguards in case dynamic code evaluation in assert() and
preg_replace() with /e modifier fails. (Andrei)
- Fixed infinite recursion when serializing $GLOBALS[] in WDDX. (Andrei)
- Made WDDX serialization properly escape <, >, and &. Also speeded up
the serialization in general. (Andrei)
- Moved install-local to install-sapi for clarity. (Joey)
- Improved extension build framework. Refer to README.SELF-CONTAINED-EXTENSIONS
for an introduction. (Sascha)
- ImagePolygon() is no longer limited by a maximum number of polygons.
(Marc Pohl)
- Added configure time checking for bcmath package. (Joey, Sascha)
- Added get_declared_classes(). (Andrei, Zend Engine)
- Add initial NSAPI module from Jayakumar Muthukumarasamy. (Rasmus)
- Added the SWF module which allows you to create Macromedia Flash files via
libswf. (Sterling)
- Improved UNIX build system to support more vendor make tools (Sascha)
- Updated natural comparison/sorting algorithm by Martin Pool
<mbp@humbug.org.au>. (Andrei)
- Fixed a crash in array_multisort() that happened when empty arrays
were passed to it. (Andrei)
- Added substr_count() from Peter Kovacs. (Andrei)
- Add an optional third argument to fseek to indicate where to seek from.
(Andrei)
- OCIBindByName() will no longer complain about bindlength beeing zero. (Thies)
- Converted the IMAP module to the high performance API (Zeev)
- The fgetcsv() function now handles embedded end-of-line in a quoted field
(Nick Talbott)
- Added user_error(), to allow explicitly generate error messages from scripts
(Zeev, Zend Engine)
- Fixed a problem in long2ip() that occasionally returned incorrect IP address.
(Evan, Andrei)
- Fixed many memory leaks in the IMAP module (Stas, Andi, Zeev)
- Fixed bug in number_format (Jon Forsberg)
- Make error_prepend_string and error_append_string work (Rasmus)
- array_walk() now automatically resets the array. (Andrei)
- Added natural comparison/sorting routines strnatcmp(), strnatcasecmp(),
natsort(), and natcasesort(). These are useful for comparing and sorting
strings that contain numbers. Based on the code from Martin Pool
<mbp@humbug.org.au>. See http://www.linuxcare.com.au/projects/natsort/
for more info on natural sorting. (Andrei)
- Zeus Webserver support (version 3.3.6+) for ISAPI (Ben Mansell)
- Fixed several problems with the PATH_TRANSLATED and PHP_SELF under Apache
(Paul Gregg & Zeev)
- Ported ldap_get_values_len() function from PHP3 to PHP4. (Sterling)
- Fixed a problem in include_once() with non constant arguments (Andi & Zeev,
Zend Engine)
- Added php.ini-optimized (Zeev)
- Ported ldap_errno(), ldap_err2str() and ldap_error() from PHP3 to PHP4.
(Sterling)
- WDDX now defaults to ISO-8859-1. (Thies)
- Fixed crash resulting from IMAP's error handling (Stas)
- Added $HTTP_POST_FILES[filename][tmp_name] - it was previously impossible to
retrieve the temporary name of an uploaded file using $HTTP_POST_FILES[]
(Zeev)
- Made the IMAP and LDAP modules compilable under Windows and thread-safe
(Zeev)
- Fixed a problem when dealing with large POST blocks in CGI mode (Zeev)
- Added session_get_cookie_params() function. (Sterling)
- Fixed return of stristr() to no longer always be lowercased. (Andrei)
- Changed the Windows version of PHP so that a php.ini file is no
longer mandatory (Zeev)
- session_start() is now more verbose if headers cannot be send. (Thies)
- Fixed a memory leak when using assign-op bitwise operators on strings (Zeev,
Zend Engine)
- Added support for reading properties that require arguments in the COM
module - writing to them will only be supported in PHP 4.1 (Zeev)
- Fixed a very old legacy memory leak in the COM module (Zeev)
- Fixed problems with object-overloading support - noteably, COM and Java
(Zeev, Zend Engine)
- Fixed an overrun in WDDX. (Thies)
- Fixed a crash bug with modules loaded through dl() not properly freeing their
resources (Zeev, Zend Engine)
- Added localtime() function. (Sterling)
- Added the 'I' format option for the date function, this option will return
true or false depending on whether or not daylight savings time is in effect.
(Sterling)
- Added gmstrftime() function. (Sterling)
- snmp_walkoid is now an alias for snmp_realwalk. (Sterling)
- Fixed a bug that could cause a crash when using 'global' inside large include
files (Stas, Zend Engine)
- Added --enable-libgcc switch to force linking against libgcc (Sascha)
- Fixed dynamic loading where extension_dir had no trailing slash (Sascha)
- Fixed dynamic loading on OpenBSD (Sascha)
- Improved POSIX threads check. ZTS works now on at least Linux, Solaris,
FreeBSD and OpenBSD (Sascha, TSRM)
- Added !== operator support. (Torben, Zend Engine)
27 March 2000, Version 4.0 Release Candidate 1
- Added support for UCD-SNMP 4.1.x (Sascha)
- Fixed a data corruption bug in mysql_result(), if used in table.fieldname
mode (Zeev)
- Fixed a crash problem in func_num_args(), func_get_arg() and func_get_args()
when used as function arguments (Andi, Zend Engine)
- Added get_class_methods(string classname) function. (Andrei)
- Added 'I' switch to test whether or not DST is active. (Sterling)
- Fixed a data corruption bug in mysql_result(), if used in table.fieldname
mode (Zeev)
- Modified the registry INI entry reader (Win32) to work with drive letters.
For example, if you wish to wish to specify INI entries for C:\foo\bar, you
should create HKLM\PHP\Per Directory Values\C\foo\bar in the registry, and add
string values for each directive you want to override in this directory (Zeev)
- Fixed extract() for EXTR_PREFIX_SAME and EXTR_SKIP cases. (Andrei)
- stristr() no longer modifies it's arguments. (Thies)
- Don't default to iso-8859-1 since this confuses some browsers. (Rasmus)
- Make it possible to specify both a port and a socket
in mysql_[p]connect. (Rasmus)
- Added --disable-pic for disabling generating PIC for shared objects
on platforms which support it (i.e. Linux) (Sascha)
- serialize()/unserialize() now call __sleep() and __wakeup() when
working on objects. (Thies)
- renamed to_string() method to __string_value() for consistency.
(Thies, Zend Engine)
- Fixed a bug in the third argument to define()
- Added is_numeric() that returns true if the argument is a number
or a numeric string. (Andrei)
- domxml now supports libxml 2.0 Beta and drops support for older versions,
due to massive changes in libxml
- fixed possible crash in unserialize() if serialized data was
corrupted. (Thies)
- Changed $HTTP_STATE_VARS to $HTTP_SESSION_VARS. Use only the latter
version now! (Andrei)
- Added GD-JPEG Support (Rasmus)
- Prevent from loading dynamic PHP modules which were compiled with different
debug and thread safety modes than PHP, which resulted in a crash (Andi)
- connection_aborted() and friends work again (Thies)
- Upgraded to libtool 1.3.4 (Sascha)
- UNIX configure creates config.nice in the build directory now which allows
easy reuse of configuration options (Sascha)
- Added support for embedded MySQL client library. Unless you specify a path
to --with-mysql, the bundled MySQL client library will be used (Sascha)
- Added include_once() and require_once() functionality (Andi, Zend Engine)
- Removed support for pdflib < 3.0 (Uwe)
- Added auto-registration of everything in $HTTP_SESSION_VARS[] if
register_globals is turned off. (Andrei)
- Cleaned up extension namespace (Stig)
- OCINLogon() sessions are now closed again. (Thies)
- Added ip2long() and long2ip(),
courtesy of Faisal Nasim <faisal@nasim.org> (Andrei)
- Added ftruncate() and fstat(),
courtesy of Faisal Nasim <faisal@nasim.org> (Andrei)
- Added parse_ini_file(). Currently implemented in non thread safe version
of PHP, and currently lacks section support (Zeev)
- "none" is now equivalent with "" in Apache config directives (Stig)
- OCINLogon no longer crashes. (Thies)
- Fixed comparisons of (string) "nan" with (string) "nan". (Thies, Zend Engine)
- Switched back to the old $HTTP_*_VARS[] behavior - $HTTP_GET_VARS["foo"]
and $foo are no longer references to each other, but separate variables
like they were prior to PHP 4.0 Beta 4 (Zeev)
- Fixed Sybase-DB compilation (Zeev)
- Fixed a (fairly common) situation where error_reporting values would not be
properly restored after a call to error_reporting(), in between requests
(Zeev)
- The various $HTTP_*_VARS[] are now protected, and cannot be manipulated by
user input (Zeev)
- Added ini_set() as an alias to ini_alter() (Zeev)
- The string None is now recognized as a keyword by the php.ini processor, and
can be used to denote an empty string (Zeev)
- Added get_class_vars(string class_name) and get_object_vars(object obj)
functions. (Andrei, Zend Engine)
- Added pdf_set_parameter(), pdf_skew(), pdf_show_boxed() (Uwe)
- Fixed comparison of (string) "inf" with (string) "inf", which was erroneously
returning false (Zeev)
- Implemented default_charset and default_mimetype config directives (Stig)
- Ported T1lib support from PHP3. (Jouni)
- Fixed -DEAPI inheritance from APXS. (Sascha)
- Fixed possible crash in module-shutdown. (Thies)
- Fixed safe_mode_protected_env_vars INI directive (Zeev)
- Fixed getrusage() (Sascha)
- Fixed OCI8 crash when returning cursors from stored-procedures. (Thies)
21 February 2000 Version 4.0 Beta 4 patch level 1
- Fixed crash when magic_quotes were switched off. (Thies)
- Support for pdflib 2.30 (Uwe)
20 February 2000, Version 4.0 Beta 4
- Introduced $HTTP_POST_FILES[], that contains information about files uploaded
through HTTP upload (Zeev)
@@ -9,8 +471,8 @@ PHP 4.0 NEWS
- Made multipart/form-data content obey to the variables_order directive (Zeev)
- Updated the browscap module to work with PHP 4.0 (Zeev)
- Recover gracefully in ISAPI after the client prematurely presses STOP (Andi)
- Fix bug in unset() on array offsets which are referenced more than once
(Andi, Zend library)
- Fixed bug in unset() on array offsets which are referenced more than once
(Andi, Zend Engine)
- Improved ISAPI module - it should no longer be necessary to set PHP as
an ISAPI filter, only as an ISAPI extension, unless you wish to perform
authentication using PHP. This didn't yet get enough testing, but it
@@ -21,7 +483,7 @@ PHP 4.0 NEWS
- Re-introduced "none" for disabling auto_prepend/append_file (Stig)
- Added DB/storage (Stig, PEAR)
- Introduced DB warnings (Stig, PEAR)
- Fix overrun in strip_tags (Stas)
- Fixed overrun in strip_tags (Stas)
- Fixed crash in strip_tags() and related functions. (Thies)
- Workaround for bogus POST-Data from IE/Mac. (Thies)
Patch by Alain Malek <alain@virtua.ch>
@@ -32,7 +494,7 @@ PHP 4.0 NEWS
- base64_decode() will decode POST data correct. (Thies)
Patch submitted by: Turadg Aleahmad <turadg@wise.berkeley.edu>
- Much more work on domxml. Build xml tree, create xml doc works (Uwe)
- Made foreach() work on objects. (Thies, Zend library)
- Made foreach() work on objects. (Thies, Zend Engine)
- Added domxml extension based on libxml, still little functionality (Uwe)
- Fixed memory corruption in fgetss(), strip_tags() and gzgetss() (Zeev)
- Updated calendar dynamic library to work with PHP 4. (Evan)
@@ -88,10 +550,10 @@ PHP 4.0 NEWS
- Implemented support for <boolean> and <null> types according
to WDDX version 1.0 (Andrei)
- Made var_dump()/serialize()/unserialize() NULL aware. (Thies)
- Added new NULL constant (Zeev, Zend library)
- Added new NULL constant (Zeev, Zend Engine)
- Fixed -c support in the standalone CGI binary (Zeev)
- Increased PHP's performance by 5-15% using a new memory cache (Andi & Zeev,
Zend library)
Zend Engine)
- Improved the php.ini reader to support constants and bitwise operators (Zeev)
- Fixed strrev() to no longer modify arg1. (Thies)
- Fixed buffer overruns in iptcembed(). (Thies)
@@ -112,16 +574,16 @@ PHP 4.0 NEWS
- Added get_loaded_extensions(), extension_loaded(), and
get_extension_funcs() functions. (Andrei)
- Added date/time stamping to PHP error log file. (Andrei, Joey)
- Added is_subclass_of() function (Andrei, Zend library)
- Added is_subclass_of() function (Andrei, Zend Engine)
- Implemented count_chars(). (Thies)
- Added class_exists() function (Andrei, Zend library)
- Added class_exists() function (Andrei, Zend Engine)
- Made strspn() and strcspn() binary-safe. (Andrei)
- Added array_multisort() function. (Andrei)
- Made pageinfo.c thread-safe (Sascha)
- Made implode() binary-safe (Andrei)
- Made strstr(), stristr(), and ucwords() binary-safe() (Andrei)
- Made strtoupper(), strtolower(), substr_replace() binary-safe. (Andrei)
- Fix a crash in the Apache syntax highlighting mode (Zeev)
- Fixed a crash in the Apache syntax highlighting mode (Zeev)
- Report all ODBC error's not just the one on the top of the stack (lurcher)
- OCI8 now returns NULL values in LONG columns correct. (Thies)
- Added support for a C-like assert() function. (Thies)
@@ -142,7 +604,7 @@ PHP 4.0 NEWS
- Make the global GET/POST/Cookie variables and their $HTTP_*_VARS[] counterparts
be references to each other (Zeev)
- Added support for the 'use' keyword - behaves like 'require', but will not
use the same file more than once (Andi & Zeev, Zend library)
use the same file more than once (Andi & Zeev, Zend Engine)
- Added check to see if a persistent connection is still valid with the
ODBC interface before reusing (nick@easysoft.com)
- Added DBMaker support (patch by Pax Tsai <paxtsai@lion.syscom.com.tw>)
@@ -151,7 +613,7 @@ PHP 4.0 NEWS
- Disable symlinks to urls (Rasmus)
- Informix driver now reflects version of ESQL/C used (Danny)
- Modified session_register() to take variable number of arguments (Andrei)
- Fixed file descriptor leak in thread safe mode (Zeev, Zend library)
- Fixed file descriptor leak in thread safe mode (Zeev, Zend Engine)
- Added select(), fd_set() and fd_isset() (Evan)
- cpdf support has been ported from php3, needs ClibPDF 2.x (Uwe)
- Fixed a leak when using automatic output buffering (Zeev)
@@ -160,7 +622,7 @@ PHP 4.0 NEWS
- Fixed inconsistencies in the implementation of here-docs (Andi & Zeev, Zend
library)
- Fixed a problem with constant class-member initializations (Andi & Zeev,
Zend library)
Zend Engine)
- Fixed float-compare in min(),max(),a[r]sort(),[r]sort() (Thies)
- Implemented get_html_translation_table() function (Thies)
- Implemented array_flip() function. Returns input-array with key, value
@@ -180,7 +642,7 @@ November 16 1999, Version 4.0 Beta 3
- 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)
- Fixed OpenLink ODBC support (Stig)
- min(),max(),a[r]sort(),[r]sort(),k[r]sort() now work consistent with the
language-core. (Thies)
- tempnam() now uses mkstemp() if available (Stig)
@@ -191,7 +653,7 @@ November 16 1999, Version 4.0 Beta 3
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)
by reference. (Andi & Zeev, Zend Engine)
- Implemented getprotoby{name,number} (Evan)
- Added array_pad() function. (Andrei)
- Added new getservby{name,port} functions. (Evan)
@@ -207,7 +669,7 @@ November 16 1999, Version 4.0 Beta 3
- 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)
- added === operator support. (Andi & Thies, Zend Engine)
- unserialize() now gives a notice when passed invalid data. (Thies)
- Fixed shuffle() so that it no longer breaks on Solaris. (Andrei)
- Added is_resource(), is_bool() functions. (Thies)
@@ -229,7 +691,7 @@ November 16 1999, Version 4.0 Beta 3
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)
- You can use resources as array-indices again (Thies, Zend Engine)
- Fixed pg_fetch_array() with three arguments (Sascha)
Patch submitted by: brian@soda.berkeley.edu
- Upgraded a lot internal functions to use new Zend function API (Thies)
@@ -242,12 +704,12 @@ November 16 1999, Version 4.0 Beta 3
- 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)
Zend Engine)
- Fixed backwards incompatibility with ereg() (Thies)
- Updated Zend garbage collection with a much more thorough method.
(Andi, Zend library)
(Andi, Zend Engine)
- Added the ability to use variable references in the array() construct.
For example, array("foo" => &$foo). (Andi, Zend library)
For example, array("foo" => &$foo). (Andi, Zend Engine)
- Added array_reverse() function (Andrei)
- Some more XML fixes/cleanups (Thies)
- Updated preg_replace() so that if any argument passed in is an array
@@ -273,8 +735,8 @@ November 16 1999, Version 4.0 Beta 3
- 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)
- Added support for the Easysoft ODBC-ODCB Bridge (martin@easysoft.com)
- Fixed bug in odbc_setoption, getParameter call incorrect (martin@easysoft.com)
- Ora_Fetch_Into now resets the returned array in all cases (Thies)
- Fixed NULL-Column problem in Oracle-Driver (Thies)
- Added extra metadata functions to ODBC, SQLTables etc (nick@easysoft.com)
@@ -360,15 +822,15 @@ November 16 1999, Version 4.0 Beta 3
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 a bugglet when redefining a class at run-time (Andi, Zend Engine)
- Fixed sem_get() on AIX (Sascha)
- Fixed fopen() to work with URL's in Win32 (Andi & Zeev)
- Fixed include_path for Win32 (Andi, Zend library)
- Fixed include_path for Win32 (Andi, Zend Engine)
- Fixed bug in ISAPI header sending function (Charles)
- Fixed memory leak when using undefined values (Andi & Zeev, Zend library)
- Fixed memory leak when using undefined values (Andi & Zeev, Zend Engine)
- Added output_buffering directive to php.ini, to enable output buffering
for all PHP scripts - default is off (Zeev).
- Fixed some more class inheritance issues (Zeev, Zend library)
- Fixed some more class inheritance issues (Zeev, Zend Engine)
- Fixed Apache build wrt to shared modules on FreeBSD/Linux (Sascha)
- Added session.extern_referer_chk which checks whether session ids were
referred to by an external site and eliminates them (Sascha)
@@ -421,25 +883,25 @@ August 9 1999, Version 4.0 Beta 2
- 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)
- Fixed various inheritance problems (Andi & Zeev, Zend Engine)
- Children now inherit their parent's constructor, if they do not supply a
constructor of their own.
- Fixed runtime inheritance of classes (parent methods/properties were
overriding their children) (Zeev, Zend library)
- Fixed backwards incompatibility with the "new" operator (Andi, Zend library)
overriding their children) (Zeev, Zend Engine)
- Fixed backwards incompatibility with the "new" operator (Andi, Zend Engine)
- Fixed bugs in uksort() and ksort() sort ordering (Andrei)
- Fixed a memory leak when using assignment-op operators with lvalue of type
string (Zeev, Zend library)
string (Zeev, Zend Engine)
- Fixed a problem in inheritance from classes that are defined in include()d
files (Zeev, Zend library)
files (Zeev, Zend Engine)
- Fixed a problem with the PHP error handler that could result in a crash
on certain operating systems (Zeev)
- Apache php_flag values only recognized 'On' (case sensitive) - changed
to case insensitive (Zeev)
- Fixed a memory leak with switch statement containing return statements
(Andi & Zeev, Zend library)
(Andi & Zeev, Zend Engine)
- Fixed a crash problem in switch statements that had a string offset
as a conditional (Andi & Zeev, Zend library)
as a conditional (Andi & Zeev, Zend Engine)
- Imported PHP 3.0 fixes for rand() and mt_rand() (Rasmus)
- Added function entries for strip_tags() and similar_text() (Andrei)
- Fixed a bug in WDDX that would cause a crash if a number was passed in
@@ -462,7 +924,7 @@ August 9 1999, Version 4.0 Beta 2
- 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)
- Added missing E_ error level constants (Zeev, Zend Engine)
- Fixed a bug in sending multiple HTTP Cookies under Apache (Zeev)
- Fixed implicit connect on the MySQL, mSQL, PostgreSQL and Sybase
modules (Zeev)
View File
File renamed without changes.
+4 -2
View File
@@ -19,7 +19,7 @@ Having said that, here are the organizational rules:
2. Discuss any significant changes on the list before committing.
3. Look at MAINTANERS file to see who is the primary maintainer of
3. Look at EXTENSIONS 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
@@ -62,7 +62,9 @@ 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.
lines, you have to put # or @ at the beginning of _every_ such line. Every
entry in NEWS has to have a name after it, so if you did it with someone's
help, put both your names there.
Example. Say you modified two files, datetime.c and string.c. In datetime.c
you added a new format option for date() function, and in string.c you fixed
+181
View File
@@ -0,0 +1,181 @@
WHAT IT IS
It's a tool for automatically creating the basic framework for a PHP module
and writing C code handling arguments passed to your functions from a simple
configuration file. See an example at the end of this file.
HOW TO USE IT
Very simple. First, cd do directory ext/ in PHP 4 sources. If you just need
the basic framework and will be writing all the code in your functions
yourself, you can now do
./ext_skel --extname=module_name
and everything you need is placed in directory module_name. In fact, if you
don't need to test the existence of any external header files, libraries or
functions in them, the module is already almost ready to be compiled in PHP.
Just remove 3 comments in your_module_name/config.m4, cd back up to PHP
sources top directory, and do
./buildconf; ./configure --enable-module_name; make
But if you already have planned the overall scheme of your module, what
functions it will contain, their return types and the arguments they take
(a very good idea) and don't want to bother yourself with creating function
definitions and handling arguments passed yourself, it's time to create a
function definitions file, which you will give as an argument to ext_skel
with option
--proto=filename.
FORMAT OF FUNCTION DEFINITIONS FILE
All the definitions must be on one line. In it's simplest form, it's just
the function name, ie.
my_function
but then you'll be left with an almost empty function body without any
argument handling.
Arguments are given in parenthesis after the function name, and are of
the form 'argument_type argument_name'. Arguments are separated from each
other with a comma and optional space. Argument_type can be one of int,
bool, double, float, string, array, object or mixed.
An optional argument is separated from the previous by an optional space,
then '[' and of course comma and optional space, like all the other
arguments. You should close a row of optional arguments with same amount of
']'s as there where '['s. Currently, it does not harm if you forget to do it
or there is a wrong amount of ']'s, but this may change in the future.
An example:
my_function(int arg1, int arg2 [, int arg3 [, int arg4]])
Arguments arg3 and arg4 are optional.
If possible, the function definition should also contain it's return type
in front of the definition. It's not actually used for any C code generating
purposes but PHP in-source documentation instead, and as such, very useful.
It can be any of int, double, string, bool, array, object, resource, mixed
or void.
The file must contain nothing else but function definitions, no comments or
empty lines.
OTHER OPTIONS
--no-help
By default, ext_skel creates both comments in the source code and a test
function to help first time module writers to get started and testing
configuring and compiling their module. This option turns off all such things
which may just annoy experienced PHP module coders. Especially useful with
--stubs=file
which will leave out also all module specific stuff and write just function
stubs with function value declarations and passed argument handling, and
function entries and definitions at the end of the file, for copying and
pasting into an already existing module.
--assign-params
--string-lens
By default, function proto 'void foo(string bar)' creates the following:
...
zval **bar;
... (zend_get_parameters_ex() called in the middle...)
convert_to_string_ex(bar);
Specifying both of these options changes the generated code to:
...
zval **bar_arg;
int bar_len;
char *bar = NULL;
... (zend_get_parameters_ex() called in the middle...)
convert_to_string_ex(bar_arg);
bar = Z_STRVAL_PP(bar_arg);
bar_len = Z_STRLEN_PP(bar_arg);
You shouldn't have to ask what happens if you leave --string-lens out. If you
have to, it's questionable whether you should be reading this document.
--with-xml[=file]
Creates the basics for phpdoc .xml file.
--full-xml
Not implemented yet. When or if there will ever be created a framework for
self-contained extensions to use phpdoc system for their documentation, this
option enables it on the created xml file.
CURRENT LIMITATIONS, BUGS AND OTHER ODDITIES
Only arguments of types int, bool, double, float, string and array are
handled. For other types you must write the code yourself. And for type
mixed, it wouldn't even be possible to write anything, because only you
know what to expect.
It can't handle correctly, and probably never will, variable list of
of arguments. (void foo(int bar [, ...])
Don't trust too much the generated code. It tries to be useful in most of
the situations you might encounter, but automatic code generating will never
beat a programmer who knows the real situation at hand. ext_skel is generally
best suited for quickly generating a wrapper for c-library functions you
might want to have available in PHP too.
This program doesn't have a --help option. It has --no-help instead.
EXAMPLE
The following _one_ line
bool my_drawtext(resource image, string text, resource font, int x, int y [, int color])
will create this function definition for you (note that there are a few
question marks to be replaced by you, and you must of course add your own
value definitions too):
/* {{{ proto bool my_drawtext(resource image, string text, resource font, int x, int y[, int color])
*/
PHP_FUNCTION(my_drawtext)
{
zval **image, **text, **font, **x, **y, **color;
int argc;
int image_id = -1;
int font_id = -1;
???LS_FETCH();
argc = ZEND_NUM_ARGS();
if (argc < 5 || argc > 6 || zend_get_parameters_ex(argc, &image, &text, &font, &x, &y, &color) == FAILURE) {
WRONG_PARAM_COUNT;
}
ZEND_FETCH_RESOURCE(???, ???, image, image_id, "???", ???G());
ZEND_FETCH_RESOURCE(???, ???, font, font_id, "???", ???G());
switch (argc) {
case 6:
convert_to_long_ex(color);
/* Fall-through. */
case 5:
convert_to_long_ex(y);
convert_to_long_ex(x);
/* font: fetching resources already handled. */
convert_to_string_ex(text);
/* image: fetching resources already handled. */
break;
default:
WRONG_PARAM_COUNT;
}
php_error(E_WARNING, "my_drawtext: not yet implemented");
}
/* }}} */
+174
View File
@@ -0,0 +1,174 @@
$Id$
=============================================================================
HOW TO CREATE A SELF-CONTAINED PHP EXTENSION
A self-contained extension can be distributed independently of
the PHP source. To create such an extension, three things are
required:
- Makefile template (Makefile.in)
- Configuration file (config.m4)
- Source code for your module
We will describe now how to create these and how to put things
together.
PREPARING YOUR SYSTEM
While the result will run on any system, a developer's setup needs these
tools:
GNU autoconf
GNU automake
GNU libtool
GNU m4
All of these are available from
ftp://ftp.gnu.org/pub/gnu/
CONVERTING AN EXISTING EXTENSION
Just to show you how easy it is to create a self-contained
extension, we will convert an embedded extension into a
self-contained one. Install PHP and execute the following
commands.
$ mkdir /tmp/newext
$ cd /tmp/newext
You now have an empty directory. We will copy the files from
the mysql extension:
$ cp -rp php-4.0.X/ext/mysql/* .
It is time to finish the module. Run:
$ phpize
You can now ship the contents of the directory - the extension
can live completely on its own.
The user instructions boil down to
$ ./configure \
[--with-php-config=/path/to/php-config] \
[--with-mysql=MYSQL-DIR]
$ make install
The MySQL module will either use the embedded MySQL client
library or the MySQL installation in MYSQL-DIR.
DEFINING THE NEW EXTENSION
Our demo extension is called "foobar".
It consists of two source files "foo.c" and "bar.c"
(and any arbitrary amount of header files, but that is not
important here).
The demo extension does not reference any external
libraries (that is important, because the user does not
need to specify anything).
CREATING THE MAKEFILE TEMPLATE
The Makefile Template (Makefile.in) contains three lines:
------------------------------------------------------------------------------
LTLIBRARY_SHARED_NAME = foobar.la
LTLIBRARY_SOURCES = foo.c bar.c
include $(top_srcdir)/build/dynlib.mk
------------------------------------------------------------------------------
LTLIBRARY_SHARED_NAME specifies the name of the extension.
It must be of the form `ext-name.la'.
LTLIBRARY_SOURCES specifies the names of the sources files. You can
name an arbitrary number of source files here.
The final include directive includes the build rules (you usually
don't need to care about what happens there). rules.mk and other
files are installed by phpize which we will cover later.
CREATING THE M4 CONFIGURATION FILE
The m4 configuration can perform additional checks. For a
self-contained extension, you do not need more than a few
macro calls.
------------------------------------------------------------------------------
PHP_ARG_ENABLE(foobar,whether to enable foobar,
[ --enable-foobar Enable foobar])
if test "$PHP_FOOBAR" != "no"; then
PHP_EXTENSION(foobar, $ext_shared)
fi
------------------------------------------------------------------------------
PHP_ARG_ENABLE will automatically set the correct variables, so
that the extension will be enabled by PHP_EXTENSION in shared mode.
Please use always PHP_ARG_ENABLE or PHP_ARG_WITH. Even if you do not
plan to distribute your module with PHP, these facilities allow you
to integrate your module easily into the main PHP module framework.
CREATING SOURCE FILES
ext_skel can be of great help when creating the common code for all modules
in PHP for you and also writing basic function definitions and C code for
handling arguments passed to your functions. See README.EXT_SKEL for further
information.
As for the rest, you are currently alone here. There are a lot of existing
modules, use a simple module as a starting point and add your own code.
CREATING THE SELF-CONTAINED EXTENSION
Put Makefile.in, config.m4 and the source files into one directory.
Then run phpize (this is installed during make install by PHP 4.0).
For example, if you configured PHP with --prefix=/php, you would run
$ /php/bin/phpize
This will automatically copy the necessary build files and create
configure from your config.m4.
And that's it. You now have a self-contained extension.
INSTALLING A SELF-CONTAINED EXTENSION
An extension can be installed by running:
$ ./configure \
[--with-php-config=/path/to/php-config]
$ make install
ADDING SHARED MODULE SUPPORT TO A MODULE
In order to be useful, a self-contained extension must be loadable
as a shared module. I will explain now how you can add shared module
support to an existing module called foo.
1. In config.m4, use PHP_ARG_WITH/PHP_ARG_ENABLE. Then you will
automatically be able to use --with-foo=shared or
--enable-foo=shared.
2. In config.m4, use PHP_EXTENSION(foo, $ext_shared) to enable
building the extension.
3. Add the following line to Makefile.in:
LTLIBRARY_SHARED_NAME = foo.la
4. Add the following lines to your C source file:
#ifdef COMPILE_DL_FOO
ZEND_GET_MODULE(foo)
#endif
+102
View File
@@ -0,0 +1,102 @@
Using PHP4 with the Zeus Web Server
-----------------------------------
Zeus fully supports running PHP in combination with our webserver. A
significant improvement in PHP 4 is that you can now run PHP as an
ISAPI module, giving great performance benefits over traditional CGI
code.
Note that you will need to be running at least version 3.3.6 of the
webserver. If you are running an earlier version, please see our
website (http://www.zeus.com) for upgrade instructions.
To build the ISAPI version of PHP, start the configuration with:
./configure --with-zeus=/usr/local/zeus
Obviously, replace /usr/local/zeus with the location of where you have
installed Zeus on your machine. For PHP to build successfully, you
need to have 3.3.6 already installed, because the code relies on the
presence of header files provided with the latest version.
You may have to adjust the environment variable LDFLAGS and EXTRA_LIBS
in order to link in extra libraries. This depends on the platform on
which you are building and also on the compiler used (see below). A
standard GNU/Linux install with GCC should build fine with no changes.
Configuring the webserver
-------------------------
After running 'make' and 'make install', you will have a 'libphp4.so'
file. Copy this file into a directory reserved for ISAPI
binaries. Now, perform the following steps for each virtual server
that you wish to run PHP on:
1) On the Admin server, go to 'edit server->path mapping'
2) Add an alias to the directory with libphp4.so in it, mapped to
/isapi/ (or a location of your choice). Make sure you set the alias
type to ISAPI.
3) Click 'update'
4) Add a handler for file extension 'php' to be run by /isapi/libphp4.so
5) Click 'update', then go back to the previous page.
6) Click on the 'module configuration' button, ensure that ISAPI
support is ticked.
7) Click on the ISAPI link. At the bottom of the page, click the
checkbox for running ISAPI extensions 'out of process'.
8) Click 'update'. Then restart the virtual server. Done!
Troubleshooting
---------------
*) Why does the compile fail at Zend/zend-scanner-cc.cc
or Zend/zend-parser.c ?
These source files are auto-generated from the corresponding .y files.
The default distribution of PHP contains pre-generated versions of these
files that have caused problems for some people. The simplest solution is
to delete the files. They will then be rebuilt correctly. You must have the
following GNU tools to do this:
bison 1.28 or later
flex 2.5.4 or later
*) Why does my PHP library fail to load?
After configuring Zeus, if you get a '502 Bad Gateway' error when
accessing a PHP page, there are problems loading the PHP
library. Check the error log ($ZEUSHOME/web/log/errors) for errors.
Failing to load the PHP ISAPI module is likely to be due to unresolved
symbols in the module. A way to check for this is to visit our support
page at http://support.zeus.com/faq/entries/isapi_error.html and run
the program there on your libphp4.so. It will list any unresolved
symbols.
*) My libphp4.so has unresolved symbols. How do I fix this?
You must ensure that the PHP build process links in the appropriate
libraries that contain these symbols! The libraries required will
depend on the platform you are running PHP on.
You may need to set one or two environment variables before running
the 'configure' program to set up PHP; LDFLAGS and EXTRA_LIBS. Make
sure that you also export these variables to the build process.
(Type 'export LDFLAGS EXTRA_LIBS' in the shell to do this.)
Specific examples:
Solaris + gcc:
Ensure you run ./configure with the `--enable-libgcc' parameter. You
may need to set LDFLAGS to '-L/usr/local/egcs/lib' (path depends on
your gcc installation)
FreeBSD 4.0:
Some people may find they need to run ./configure with the
'--enable-libgcc' compile option too.
For more information and help with Zeus, please visit our website:
http://www.zeus.com
+77 -23
View File
@@ -3,16 +3,18 @@ parenthesis means that person has taken on this project.
Zend
----
* allow foreach ($array as $k => &$val) syntax. right now we can not
traverse an array without copying each element.
* create typedefs for all kinds of callback functions - this would make
casting easier. eg: zend_hash_apply(someht,(zend_apply_f) bla);
* allow foreach ($array as $k => &$val) syntax. right now we cannot
traverse an array without copying each element.
* look at replacing c-lib call tolower().
global
------
* let every module (source-file) have it's own module & function_entry
block. Right now the math functions are in math.c but the corresponding
function-entries are in basic_functions.
* make everything on the language-level independent of your locale setings.
* always build the standalone executable as well as the chosen SAPI
target.
* make sure all source files have the "right" copyright.
* the following modules still use PHP3_TLS_*() macros (and thereby don't
work in ZTS mode): ext/dav/dav.c, ext/db/db.c, ext/gd/gd.c, ext/ldap/ldap.c
* make sure that all ZTS globals get destructed. Most ts_allocate_id()
calls should have a dtor entry.
* activate all extensions by default that don't rely on external
@@ -20,43 +22,79 @@ global
* --enable-all in configure. (--enable-shared=max ...)
* make configure print out a summary when it's done (like XEmacs)
* replace standard functions which work on static data with
reentrant-save functions
* there is only one current directory per process; to make
chdir() etc. thread-safe, we must introduce a per-thread
current directory
* on some platforms unimplemented function will just do nothing (eg symlink)
they should print a warning or be not even defined!
* banish the legacy of php3_ prefixes
* implement javadoc based function docs template system
* use thread-safe resolver functions (either require BIND 8 or adns)
* provide optional IPv6 support
reentrancy-safe functions.
* on some platforms unimplemented function will just do nothing (e.g. symlink)
they should print a warning or not even be defined!
* implement javadoc based function docs template system.
* use thread-safe resolver functions (either require BIND 8 or adns).
* provide optional IPv6 support.
* make SAPI conform to CGI/1.1. Currently, all SAPI modules
define REMOTE_ADDR etc. themselves and reach only various level
of compliance.
* find a better way to implement script timeouts. SIGVTALRM is used
by some POSIX threads implementations (i.e. OpenBSD) and is not
available in ZTS mode.
* add aliases to functions to conform to new naming conventions, e.g.
str_to_upper().
* see what functions might need to be changed to use HashPosition, so
that the internal array pointer is not affected.
documentation
-------------
* add remarks in the documentation which functions are not implemented on win32.
* add remarks in the documentation which functions are not binary-safe.
ext/wddx
ext/dav
--------
* implement wddx_packet_as_javascript(). (Andrei)
* rewrite.
ext/mcrypt
----------
* port to mcrypt-2.6 or later
ext/oci8
--------
* all OCIFetch*() functions should return 0 for no more data and false on error.
* have a flag that trims trailing spaces from CHAR fields on retrieval.
* make allow_call_time_pass_reference=Off working.
ext/pcre
--------
* have an option for preg_grep() to return keys as well.
* update the online docs from version 3.1 man page
ext/session
-----------
* implement a call to set a session read-only to overcome
the need to serialize frame-loads.
* maybe implement finer-grained session variables that could be
locked individually.
* write a network-transparent storage back-end with fallover
facilities
ext/standard
------------
* add a version number to data serialized via serialize().
* array_add(). (Andrei)
* implement pathinfo()
$a = pathinfo("/some/file.bla");
=> array("dirname" => "/some/",
"basename" => "file.bla",
"extension" => "bla");
We could also make it return just one part as a sting if used
like this:
$a = pathinfo("/some/file.bla", PATHINFO_BASENAME);
* possibly modify parsing of GPC data to automatically create arrays if
variable name is seen more than once.
* implement regex-cache for url-functions.
* strpad() (Andrei)
* stri_replace() (Andrei)
* comparing arrays semantically (like Python) (Andrei)
* move socket related functions to fsock.c
* strcase_replace(). (Andrei)
* move socket related functions to fsock.c.
* get_defined_funcs(), get_defined_vars().
* NOT binary safe:
strtok()
basename()
@@ -64,3 +102,19 @@ ext/standard
strrpos()
strrchr()
strip_tags()
ext/wddx
--------
* See if we can support the remaining datatypes:
dateTime
binary
recordset
http://www.wddx.org/WDDX_SDK_10a/7__References/WDDX_DTD.htm
(Andrei)
* implement wddx_packet_as_javascript(). (Andrei)
other cool stuff
----------------
* PVM extension
-75
View File
@@ -1,75 +0,0 @@
This is the ChangeLog from PHP3 as of Apr 12 1999.
Entries should be removed from this file, if you transfer changes
over to PHP4.
============================================================================
?? 1999, Version 3.0.8
- added Oracle-OCI8 persistent connections
- fixed OCIDefineByName crash.
- fixed some NULL-column related problems in OCI8-module.
- Some Informix driver improvements.
- PUT method support (mlemos@acm.org)
- Fix parameter count problem in odbc_setoption()
- Really fix implode() this time. The fix in 3.0.7 was bogus
- Make fgetss() slightly smarter
- Add strip_tags() which uses the fgetss state-machine but acts on a string
March 1 1999, Version 3.0.7
- Added pdf_put_image and pdf_execute_image
- Initial work on an ImageMagick module - doesn't do anything yet
- Make configure script detect Netscape's LDAP SDK automagically
- Fixed Oracle-OCI8 module for windows.
- Add OCIRowCount function. (Number of affected rows for update-statements)
- Add OCIDefineByName function.
- Change the behaviour of open_basedir. It's now possible to supply more
than one directory. open_basedir paths from parent directories are now
automatically inherited.
- fix rand() and mt_rand() to make the ranges work correctly
- htmlspecialchars() and htmlentities() are now binary safe.
- Add extract() function.
- Oracle-OCI8 driver now supports BLOBS/CLOBS and IN/OUT binding of local php
variables.
- Clean up apxs build
- Add INSTALL.REDHAT file to walk RedHat users through the install
- Add function_exists() function.
- Add another version of WDDX module
(we need to pick a single implementation here)
- Fixed includes for iODBC to support both the old and the new LGPL version
- Fix implode() bug - When imploding an array that contained unset() elements
it wasn't correctly skipping past these
- Add connection_status() function. This returns the raw bitfield which
indicates whether the script terminated due to a user abort, a timeout
or normally. Note that if ignore_user_abort is enabled, then both the
timeout state and the user abort state can be active
- Add connection_timeout() function. This one can be called in a shutdown
function to tell you if you got there because of a timeout
- Add ignore_user_abort() function and .ini/.conf directive of same name
- Fix connection abort detection code - It should now work reliably with
Apache. Also added a user-level connection_aborted() function designed to
let people check whether the user aborted the connection in a user-level
shutdown function.
- Add pfsockopen() function
- Improvements in FreeType support: Macintosh fonts work, and non-antialiased
output is considerably cleaner <mka@satama.com>
- Fixed checkdate() function, range of valid years is now 0 to 32767
- hw_insertdocument() returns object id now
- Add pdf_open() warning in configure and documentation
- Add diskfreespace() function
- Added aspell support
- Iptcparse would sometimes find a wrong tag.
- Force var_dump() to output headers
- Add optional 3th parameter to ora_fetchinto.
- Serialize and var_dump no longer show array elements that
have been unset.
- Add IptcEmbed() function (can replace an APP13-Marker in a JPEG file)
- Add OCI8 module for Windows
- Fix bug in pdf_close() function
- Add WDDX support (see http://www.wddx.org for more info)
- Add similar_text() function
- Introduce simple regex compilation cache
+26
View File
@@ -0,0 +1,26 @@
Copyright (c) 1999,2000, Andi Gutmans, Sascha Schumann, Zeev Suraski.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- Neither name of the copyright holders nor the names of their contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+7 -3
View File
@@ -13,7 +13,6 @@
+----------------------------------------------------------------------+
*/
#include "TSRM.h"
#include <stdio.h>
#include <stdlib.h>
@@ -207,13 +206,18 @@ static void allocate_new_resource(tsrm_tls_entry **thread_resources_ptr, THREAD_
/* fetches the requested resource for the current thread */
void *ts_resource(ts_rsrc_id id)
TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
{
THREAD_T thread_id = tsrm_thread_id();
THREAD_T thread_id;
int hash_value;
tsrm_tls_entry *thread_resources;
void *resource;
if (th_id) {
thread_id = *th_id;
} else {
thread_id = tsrm_thread_id();
}
tsrm_debug("Fetching resource id %d for thread %ld\n", id, (long) thread_id);
tsrm_mutex_lock(tsmm_mutex);
+3 -3
View File
@@ -42,7 +42,7 @@ RSC=rc.exe
# PROP Intermediate_Dir "Debug_TS"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "C:\Projects\TSRM" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_DEBUG" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_DEBUG" /D "TSRM_EXPORTS" /D "_LIB" /D "WIN32" /D "_MBCS" /YX /FD /GZ /c
# ADD BASE RSC /l 0x40d /d "_DEBUG"
# ADD RSC /l 0x40d /d "_DEBUG"
BSC32=bscmake.exe
@@ -65,7 +65,7 @@ LIB32=link.exe -lib
# PROP Intermediate_Dir "Release_TS"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "TSRM_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x40d /d "NDEBUG"
# ADD RSC /l 0x40d /d "NDEBUG"
BSC32=bscmake.exe
@@ -88,7 +88,7 @@ LIB32=link.exe -lib
# PROP Intermediate_Dir "Release_TS_inline"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "TSRM_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "TSRM_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x40d /d "NDEBUG"
# ADD RSC /l 0x40d /d "NDEBUG"
BSC32=bscmake.exe
+5 -4
View File
@@ -14,8 +14,8 @@
*/
#ifndef _TSRM_H
#define _TSRM_H
#ifndef TSRM_H
#define TSRM_H
#ifdef HAVE_CONFIG_H
# undef PACKAGE
@@ -81,7 +81,8 @@ TSRM_API void tsrm_shutdown(void);
TSRM_API ts_rsrc_id ts_allocate_id(size_t size, ts_allocate_ctor ctor, ts_allocate_dtor dtor);
/* fetches the requested resource for the current thread */
TSRM_API void *ts_resource(ts_rsrc_id id);
TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id);
#define ts_resource(id) ts_resource_ex(id, NULL)
/* frees all resources allocated for the current thread */
TSRM_API void ts_free_thread(void);
@@ -107,4 +108,4 @@ TSRM_API void *tsrm_set_new_thread_end_handler(void (*new_thread_end_handler)(TH
}
#endif
#endif /* _TSRM_H */
#endif /* TSRM_H */
+157
View File
@@ -0,0 +1,157 @@
dnl Copyright (c) 1999, 2000 Sascha Schumann. All rights reserved.
dnl
dnl Redistribution and use in source and binary forms, with or without
dnl modification, are permitted provided that the following conditions
dnl are met:
dnl
dnl 1. Redistributions of source code must retain the above copyright
dnl notice, this list of conditions and the following disclaimer.
dnl
dnl 2. Redistributions in binary form must reproduce the above copyright
dnl notice, this list of conditions and the following disclaimer in
dnl the documentation and/or other materials provided with the
dnl distribution.
dnl
dnl THIS SOFTWARE IS PROVIDED BY SASCHA SCHUMANN ``AS IS'' AND ANY
dnl EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
dnl PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SASCHA SCHUMANN OR
dnl HIS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
dnl SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
dnl NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
dnl LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
dnl HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
dnl STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
dnl ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
dnl OF THE POSSIBILITY OF SUCH DAMAGE.
dnl
dnl PTHREADS_FLAGS
dnl
dnl Set some magic defines to achieve POSIX threads conformance
dnl
AC_DEFUN(PTHREADS_FLAGS,[
if test -z "$host_alias"; then
AC_MSG_ERROR(host_alias is not set. Make sure to run config.guess)
fi
case "$host_alias" in
*solaris*)
PTHREAD_FLAGS="-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT";;
*freebsd*)
PTHREAD_FLAGS="-D_REENTRANT -D_THREAD_SAFE";;
*linux*)
PTHREAD_FLAGS="-D_REENTRANT";;
*aix*)
PTHREAD_FLAGS="-D_THREAD_SAFE";;
*irix*)
PTHREAD_FLAGS="-D_POSIX_THREAD_SAFE_FUNCTIONS";;
*hpux*)
PTHREAD_FLAGS="-D_REENTRANT";;
*sco*)
PTHREAD_FLAGS="-D_REENTRANT";;
dnl Solves sigwait() problem, creates problems with u_long etc.
dnl PTHREAD_FLAGS="-D_REENTRANT -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=199506 -D_XOPEN_SOURCE_EXTENDED=1";;
esac
if test -n "$PTHREAD_FLAGS"; then
CPPFLAGS="$CPPFLAGS $PTHREAD_FLAGS"
fi
])dnl
dnl
dnl PTHREADS_CHECK_COMPILE
dnl
dnl Check whether the current setup can use POSIX threads calls
dnl
AC_DEFUN(PTHREADS_CHECK_COMPILE, [
AC_TRY_RUN( [
#include <pthread.h>
#include <stddef.h>
void *thread_routine(void *data) {
return data;
}
int main() {
pthread_t thd;
pthread_mutexattr_t mattr;
int data = 1;
pthread_mutexattr_init(&mattr);
return pthread_create(&thd, NULL, thread_routine, &data);
} ], [
pthreads_working="yes"
], [
pthreads_working="no"
], pthreads_working="no" ) ] )dnl
dnl
dnl PTHREADS_CHECK()
dnl
dnl Try to find a way to enable POSIX threads
dnl
dnl Magic flags
dnl -kthread gcc (FreeBSD)
dnl -Kthread UDK cc (UnixWare)
dnl -mt WorkShop cc (Solaris)
dnl -mthreads gcc (AIX)
dnl -pthread gcc (Linux, FreeBSD, NetBSD, OpenBSD)
dnl -pthreads gcc (Solaris)
dnl -qthreaded AIX cc V5
dnl -threads gcc (HP-UX)
dnl
AC_DEFUN(PTHREADS_CHECK,[
save_CFLAGS="$CFLAGS"
save_LIBS="$LIBS"
PTHREADS_ASSIGN_VARS
PTHREADS_CHECK_COMPILE
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
AC_CACHE_CHECK(for pthreads_cflags,ac_cv_pthreads_cflags,[
ac_cv_pthreads_cflags=""
if test "$pthreads_working" != "yes"; then
for flag in -kthread -pthread -pthreads -mthreads -Kthread -threads -mt -qthreaded; do
ac_save="$CFLAGS"
CFLAGS="$CFLAGS $flag"
PTHREADS_CHECK_COMPILE
CFLAGS="$ac_save"
if test "$pthreads_working" = "yes"; then
ac_cv_pthreads_cflags="$flag"
break
fi
done
fi
])
AC_CACHE_CHECK(for pthreads_lib, ac_cv_pthreads_lib,[
ac_cv_pthreads_lib=""
if test "$pthreads_working" != "yes"; then
for lib in pthread pthreads c_r; do
ac_save="$LIBS"
LIBS="$LIBS -l$lib"
PTHREADS_CHECK_COMPILE
LIBS="$ac_save"
if test "$pthreads_working" = "yes"; then
ac_cv_pthreads_lib="$lib"
break
fi
done
fi
])
if test "$pthreads_working" = "yes"; then
threads_result="POSIX Threads found"
else
threads_result="POSIX Threads not found"
fi
])dnl
dnl
dnl
AC_DEFUN(PTHREADS_ASSIGN_VARS,[
if test -n "$ac_cv_pthreads_lib"; then
LIBS="$LIBS -l$ac_cv_pthreads_lib"
fi
if test -n "$ac_cv_pthreads_cflags"; then
CFLAGS="$CFLAGS $ac_cv_pthreads_cflags"
fi
])dnl
+7 -22
View File
@@ -50,30 +50,15 @@ AC_MSG_RESULT(yes - installed in $PTH_PREFIX)
])
sinclude(threads.m4)
sinclude(TSRM/threads.m4)
AC_DEFUN(TSRM_CHECK_PTHREADS,[
old_CFLAGS="$CFLAGS"
if test -n "$GCC"; then
TSRM_CHECK_GCC_ARG(-pthread, [
CFLAGS="$CFLAGS -pthread"
],[
TSRM_CHECK_GCC_ARG(-pthreads, [
CFLAGS="$CFLAGS -pthreads"
])])
fi
AC_CHECK_FUNCS(pthread_kill)
if test "$ac_cv_func_pthread_kill" != "yes"; then
CFLAGS="$old_CFLAGS"
AC_CHECK_LIB(pthread, pthread_kill)
unset ac_cv_func_pthread_kill
AC_CHECK_FUNCS(pthread_kill)
if test "$ac_cv_func_pthread_kill" != "yes"; then
AC_MSG_ERROR(Your system seems to lack POSIX threads.)
fi
PTHREADS_CHECK
if test "$pthreads_working" != "yes"; then
AC_MSG_ERROR(Your system seems to lack POSIX threads.)
fi
AC_DEFINE(PTHREADS, 1, Whether to use Pthreads)
+2 -2
View File
@@ -41,9 +41,9 @@
// #include <FlexLexer.h>
// ...
#ifndef __FLEX_LEXER_H
#ifndef FLEXLEXER_H
// Never included before - need to define base class.
#define __FLEX_LEXER_H
#define FLEXLEXER_H
#include <iostream.h>
extern "C++" {
+6 -6
View File
@@ -1,11 +1,11 @@
---------------------------------------------------------------------------
The Zend License, version 0.91
Copyright (C) 1999 Andi Gutmans & Zeev Suraski
The Zend License, version 0.92
Copyright (C) 1999-2000 Zend Technologies Ltd.
---------------------------------------------------------------------------
The Zend scripting engine library is a product of Andi Gutmans and
Zeev Suraski. It may be used and/or distributed under the terms of the
Q Public License (QPL) version 1.0, enclosed below.
The Zend scripting engine library is a product of Zend Technologies Ltd.
It may be used and/or distributed under the terms of the Q Public
License (QPL) version 1.0, enclosed below.
For more information about Zend please visit http://www.zend.com/
For license related questions please mail license@zend.com
@@ -113,4 +113,4 @@ OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE.
===========================================================================
===========================================================================
+9 -7
View File
@@ -3,12 +3,14 @@
#CLEANFILES = zend-parser.c zend-parser.h zend-scanner.c zend-parser.output
AUTOMAKE_OPTIONS=foreign
EXTRA_LTLIBRARIES=libZend_cc.la libZend_c.la
noinst_LTLIBRARIES=$(ZEND_SCANNER) libZend.la
EXTRA_LTLIBRARIES=libZend_cc.la libZend_c.la libZend_gcc.la
noinst_LTLIBRARIES=$(ZEND_SCANNER) $(ZEND_GCC) libZend.la
libZend_cc_la_SOURCES=zend-scanner-cc.cc
libZend_c_la_SOURCES=zend-scanner.c
libZend_gcc_la_SOURCES=zend_gcc_inline.c
libZend_la_SOURCES=\
zend-parser.y \
zend_alloc.c zend_compile.c zend_constants.c zend_dynamic_array.c \
@@ -17,22 +19,22 @@ libZend_la_SOURCES=\
zend_variables.c zend.c zend_API.c zend_extensions.c zend_hash.c \
zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c
libZend_la_LIBADD = $(ZEND_SCANNER)
libZend_la_LIBADD = $(ZEND_SCANNER) $(ZEND_GCC)
libZend_la_LDFLAGS = @EXTRA_LIBS@
libZend_la_DEPENDENCIES = $(ZEND_SCANNER)
# automake isn't too clever about "non-standard" use of lex and yacc
zend-scanner.l: zend-parser.h
$(libZend_la_OBJECTS) zend-scanner.lo zend-scanner-cc.lo: zend-parser.h
zend-scanner.c: zend-scanner.l
zend-scanner.c: $(srcdir)/zend-scanner.l
$(LEX) -Pzend -o$@ -i $(srcdir)/zend-scanner.l
zend-scanner-cc.cc: zend-scanner.l
zend-scanner-cc.cc: $(srcdir)/zend-scanner.l
$(LEX) -+ -B -i -S$(srcdir)/flex.skl -Pzend -o$@ $(srcdir)/zend-scanner.l
zend-parser.h: zend-parser.c
zend-parser.c: zend-parser.y
zend-parser.c: $(srcdir)/zend-parser.y
$(YACC) -p zend -v -d $(srcdir)/zend-parser.y -o zend-parser.c
depend:
+1 -1
View File
@@ -84,7 +84,7 @@ shamelessly lying about it. Here's why:
* static variable initializers only accept scalar values
(in PHP 3.0 they accepted any valid expression). The impact
should be somewhere in between void and non existant, since
should be somewhere in between void and non existent, since
initializing a static variable with anything but a simple
static value makes no sense at all.
+4
View File
@@ -151,6 +151,10 @@ SOURCE=.\zend_extensions.c
# End Source File
# Begin Source File
SOURCE=.\zend_gcc_inline.c
# End Source File
# Begin Source File
SOURCE=.\zend_hash.c
# End Source File
# Begin Source File
+29 -16
View File
@@ -50,13 +50,8 @@ dlfcn.h)
AC_TYPE_SIZE_T
AC_TYPE_SIGNAL
AC_CHECK_LIB(c, dlopen, [
# fake it
AC_DEFINE(HAVE_LIBDL) ], [
AC_CHECK_LIB(dl, dlopen, [
LIBS="-ldl $LIBS"
AC_DEFINE(HAVE_LIBDL) ], []) ])
AC_CHECK_LIB(dl, dlopen, [LIBS="-ldl $LIBS"])
AC_CHECK_FUNC(dlopen,[AC_DEFINE(HAVE_LIBDL, 1,[ ])])
dnl This is required for QNX and may be some BSD derived systems
AC_CHECK_TYPE( uint, unsigned int )
@@ -67,8 +62,12 @@ dnl Checks for library functions.
AC_FUNC_VPRINTF
AC_FUNC_MEMCMP
AC_FUNC_ALLOCA
AC_CHECK_FUNCS(memcpy strdup getpid kill strtod strtol)
AC_CHECK_FUNCS(memcpy strdup getpid kill strtod strtol finite)
AC_ZEND_BROKEN_SPRINTF
AC_CHECK_FUNCS(finite isfinite isinf isnan)
ZEND_FP_EXCEPT
AC_SUBST(ZEND_SCANNER)
@@ -81,10 +80,10 @@ AC_SUBST(ZEND_SCANNER)
AC_DEFUN(LIBZEND_ENABLE_DEBUG,[
AC_ARG_ENABLE(debug,
[ --disable-debug Compile without debugging symbols],[
[ --enable-debug Compile with debugging symbols],[
ZEND_DEBUG=$enableval
],[
ZEND_DEBUG=yes
ZEND_DEBUG=no
])
])
@@ -100,11 +99,15 @@ AC_ARG_ENABLE(debug,
AC_DEFUN(LIBZEND_OTHER_CHECKS,[
AC_ARG_ENABLE(c9x-inline,
[ --enable-c9x-inline Enable C9x-inline semantics],[
ZEND_C9X_INLINE=$enableval
],[
ZEND_C9X_INLINE=no
])
AC_ARG_ENABLE(experimental-zts,
[ --enable-experimental-zts This will most likely break your build],[
ZEND_EXPERIMENTAL_ZTS=$enableval
@@ -127,6 +130,9 @@ AC_ARG_ENABLE(memory-limit,
ZEND_MEMORY_LIMIT=no
])
AC_MSG_CHECKING(whether to enable C9x-inline semantics)
AC_MSG_RESULT($ZEND_C9X_INLINE)
AC_MSG_CHECKING(whether to enable experimental ZTS)
AC_MSG_RESULT($ZEND_EXPERIMENTAL_ZTS)
@@ -140,19 +146,19 @@ AC_MSG_CHECKING(whether to enable Zend debugging)
AC_MSG_RESULT($ZEND_DEBUG)
if test "$ZEND_DEBUG" = "yes"; then
AC_DEFINE(ZEND_DEBUG,1)
AC_DEFINE(ZEND_DEBUG,1,[ ])
echo " $CFLAGS" | grep ' -g' >/dev/null || DEBUG_CFLAGS="-g"
test -n "$GCC" && DEBUG_CFLAGS="$DEBUG_CFLAGS -Wall"
test -n "$GCC" && test "$USE_MAINTAINER_MODE" = "yes" && \
DEBUG_CFLAGS="$DEBUG_CFLAGS -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations"
else
AC_DEFINE(ZEND_DEBUG,0)
AC_DEFINE(ZEND_DEBUG,0,[ ])
fi
test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS"
if test "$ZEND_EXPERIMENTAL_ZTS" = "yes"; then
AC_DEFINE(ZTS)
AC_DEFINE(ZTS,1,[ ])
ZEND_SCANNER_TYPE=cc
CPPFLAGS="$CPPFLAGS -I../TSRM"
LIBZEND_CPLUSPLUS_CHECKS
@@ -160,6 +166,13 @@ else
ZEND_SCANNER_TYPE=c
fi
if test "$ZEND_C9X_INLINE" = "yes"; then
AC_DEFINE(C9X_INLINE_SEMANTICS, 1, [whether to enable C9x-inline semantics])
else
ZEND_GCC=libZend_gcc.la
AC_SUBST(ZEND_GCC)
fi
ZEND_SCANNER="libZend_${ZEND_SCANNER_TYPE}.la"
if test "$ZEND_MEMORY_LIMIT" = "yes"; then
+7 -3
View File
@@ -40,7 +40,7 @@ RSC=rc.exe
# 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 ZEND_DEBUG=0 /D "ZTS" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /FR /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x40d /d "NDebug_TS"
# ADD RSC /l 0x40d /d "NDebug_TS"
@@ -62,7 +62,7 @@ LIB32=link.exe -lib
# 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 ZEND_DEBUG=1 /D "ZEND_WIN32" /D "ZTS" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_Debug_TS" /D ZEND_DEBUG=1 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c
# ADD BASE RSC /l 0x40d /d "_Debug_TS"
# ADD RSC /l 0x40d /d "_Debug_TS"
BSC32=bscmake.exe
@@ -84,7 +84,7 @@ LIB32=link.exe -lib
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "WIN32" /D "_MBCS" /D ZEND_DEBUG=0 /FR /FD /c
# SUBTRACT BASE CPP /YX
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D ZEND_DEBUG=0 /D "ZTS" /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32_FORCE_INLINE" /FR /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug_TS" /D ZEND_DEBUG=0 /D "ZEND_WIN32_FORCE_INLINE" /D _WIN32_WINNT=0x400 /D "_LIB" /D "TSRM_EXPORTS" /D "LIBZEND_EXPORTS" /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "WIN32" /D "_MBCS" /FR /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x40d /d "NDebug_TS"
# ADD RSC /l 0x40d /d "NDebug_TS"
@@ -155,6 +155,10 @@ SOURCE=.\zend_extensions.c
# End Source File
# Begin Source File
SOURCE=.\zend_gcc_inline.c
# End Source File
# Begin Source File
SOURCE=.\zend_hash.c
# End Source File
# Begin Source File
+15 -24
View File
@@ -1,38 +1,18 @@
#define ZEND_API
#define ZEND_DLEXPORT
@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
/* Undefine if you want stricter XML/SGML compliance by default */
/* (this disables "<?expression?>" by default) */
#define T_DEFAULT_SHORT_OPEN_TAG 1
/* Define both of these if you want the bundled REGEX library */
#define REGEX 0
#define HSREGEX 0
#undef ZEND_DEBUG
/* Define if you want to enable memory limit support */
#define MEMORY_LIMIT 0
/* Define to compile Zend thread safe */
#undef ZTS
#undef HAVE_LIBDL
@BOTTOM@
#ifdef HAVE_STDLIB_H
@@ -49,15 +29,26 @@
# include <strings.h>
#endif
/* Define if you have stdiostream.h */
#undef HAVE_STDIOSTREAM_H
#if ZEND_BROKEN_SPRINTF
int zend_sprintf(char *buffer, const char *format, ...);
#else
# define zend_sprintf sprintf
#endif
#ifdef HAVE_FINITE
#define zend_finite(a) finite(a)
#elif defined(HAVE_ISFINITE)
#define zend_finite(a) isfinite(a)
#elif defined(HAVE_ISNAN) && defined(HAVE_ISINF)
#define zend_finite(a) (isnan(a) ? 0 : isinf(a) ? 0 : 1)
#elif defined(HAVE_ISNAN)
#define zend_finite(a) (isnan(a) ? 0 : 1)
#elif defined(HAVE_ISINF)
#define zend_finite(a) (isinf(a) ? 0 : 1)
#else
#define zend_finite(a) (1)
#endif
/*
* Local variables:
* tab-width: 4
+18
View File
@@ -2,6 +2,24 @@ dnl $Id$
dnl
dnl This file contains local autoconf functions.
AC_DEFUN(ZEND_FP_EXCEPT,[
AC_CACHE_CHECK(whether fp_except is defined, ac_cv_type_fp_except,[
AC_TRY_COMPILE([
#include <floatingpoint.h>
],[
fp_except x = (fp_except) 0;
],[
ac_cv_type_fp_except=yes
],[
ac_cv_type_fp_except=no
],[
ac_cv_type_fp_except=no
])])
if test "$ac_cv_type_fp_except" = "yes"; then
AC_DEFINE(HAVE_FP_EXCEPT, 1, [whether floatingpoint.h defines fp_except])
fi
])
dnl
dnl Check for broken sprintf()
dnl
+118 -108
View File
@@ -3,12 +3,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -33,8 +33,6 @@
#include "zend_list.h"
#include "zend_globals.h"
#include "zend_API.h"
#include "zend_variables.h"
#include "zend_operators.h"
#define YYERROR_VERBOSE
#define YYSTYPE znode
@@ -47,22 +45,22 @@
%}
%pure_parser
%expect 7
%expect 4
%left T_INCLUDE T_EVAL T_IMPORT
%left T_INCLUDE T_INCLUDE_ONCE T_EVAL
%left ','
%left T_LOGICAL_OR
%left T_LOGICAL_XOR
%left T_LOGICAL_AND
%right T_PRINT
%left '=' T_PLUS_EQUAL T_MINUS_EQUAL T_MUL_EQUAL T_DIV_EQUAL T_CONCAT_EQUAL T_MOD_EQUAL T_AND_EQUAL T_OR_EQUAL XT_OR_EQUAL T_SL_EQUAL T_SR_EQUAL
%left '=' T_PLUS_EQUAL T_MINUS_EQUAL T_MUL_EQUAL T_DIV_EQUAL T_CONCAT_EQUAL T_MOD_EQUAL T_AND_EQUAL T_OR_EQUAL T_XOR_EQUAL T_SL_EQUAL T_SR_EQUAL
%left '?' ':'
%left T_BOOLEAN_OR
%left T_BOOLEAN_AND
%left '|'
%left '^'
%left '&'
%nonassoc T_IS_EQUAL T_IS_NOT_EQUAL T_IS_IDENTICAL
%nonassoc T_IS_EQUAL T_IS_NOT_EQUAL T_IS_IDENTICAL T_IS_NOT_IDENTICAL
%nonassoc '<' T_IS_SMALLER_OR_EQUAL '>' T_IS_GREATER_OR_EQUAL
%left T_SL T_SR
%left '+' '-' '.'
@@ -108,6 +106,7 @@
%token T_CONST
%token T_RETURN
%token T_REQUIRE
%token T_REQUIRE_ONCE
%token T_USE
%token T_GLOBAL
%token T_STATIC
@@ -134,7 +133,6 @@
%token T_DOLLAR_OPEN_CURLY_BRACES
%token T_CURLY_OPEN
%token T_PAAMAYIM_NEKUDOTAYIM
%token T_PHP_TRACK_VARS
%% /* Rules */
@@ -182,31 +180,40 @@ unticked_statement:
for_expr
';' { do_free(&$3 CLS_CC); $4.u.opline_num = get_next_op_number(CG(active_op_array)); }
for_expr
';' { do_for_cond(&$6, &$7 CLS_CC); }
';' { do_extended_info(CLS_C); do_for_cond(&$6, &$7 CLS_CC); }
for_expr
')' { do_free(&$9 CLS_CC); do_for_before_statement(&$4, &$7 CLS_CC); }
for_statement { do_for_end(&$7 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_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, 0 CLS_CC); }
| T_RETURN expr_without_variable ';' { do_return(&$2, 0 CLS_CC); }
| T_RETURN cvar ';' { do_return(&$2, 1 CLS_CC); }
| T_GLOBAL global_var_list
| T_STATIC static_var_list
| T_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, 0 CLS_CC); }
| T_RETURN expr_without_variable ';' { do_return(&$2, 0 CLS_CC); }
| T_RETURN cvar ';' { do_return(&$2, 1 CLS_CC); }
| T_GLOBAL global_var_list ';'
| T_STATIC static_var_list ';'
| T_ECHO echo_expr_list ';'
| T_INLINE_HTML { do_echo(&$1 CLS_CC); }
| expr ';' { do_free(&$1 CLS_CC); }
| T_REQUIRE expr ';' { do_require(&$2 CLS_CC); }
| expr ';' { do_free(&$1 CLS_CC); }
| T_REQUIRE expr ';' { do_require(&$2, 0 CLS_CC); }
| T_REQUIRE_ONCE use_filename ';' { do_require(&$2, 1 CLS_CC); }
| T_USE use_filename ';' { use_filename($2.u.constant.value.str.val, $2.u.constant.value.str.len CLS_CC); zval_dtor(&$2.u.constant); }
| T_UNSET '(' cvar ')' ';' { do_end_variable_parse(BP_VAR_UNSET, 0 CLS_CC); do_unset(&$3 CLS_CC); }
| T_UNSET '(' unset_variables ')' ';'
| T_FOREACH '(' expr T_AS { do_foreach_begin(&$1, &$3, &$2, &$4 CLS_CC); } w_cvar foreach_optional_arg ')' { do_foreach_cont(&$6, &$7, &$4 CLS_CC); } foreach_statement { do_foreach_end(&$1, &$2 CLS_CC); }
| T_DECLARE { do_declare_begin(CLS_C); } '(' declare_list ')' declare_statement { do_declare_end(CLS_C); }
| ';' /* empty statement */
;
unset_variables:
unset_variable
| unset_variables ',' unset_variable
;
unset_variable:
cvar { do_end_variable_parse(BP_VAR_UNSET, 0 CLS_CC); do_unset(&$1 CLS_CC); }
;
use_filename:
T_CONSTANT_ENCAPSED_STRING { $$ = $1; }
@@ -230,8 +237,8 @@ unticked_declaration_statement:
foreach_optional_arg:
/* empty */ { $$.op_type = IS_UNUSED; }
| T_DOUBLE_ARROW w_cvar { $$ = $2; }
/* empty */ { $$.op_type = IS_UNUSED; }
| T_DOUBLE_ARROW w_cvar { $$ = $2; }
;
@@ -254,23 +261,23 @@ declare_statement:
declare_list:
T_STRING '=' static_scalar { do_declare_stmt(&$1, &$3 CLS_CC); }
| declare_list ',' T_STRING '=' static_scalar { do_declare_stmt(&$3, &$5 CLS_CC); }
T_STRING '=' static_scalar { do_declare_stmt(&$1, &$3 CLS_CC); }
| declare_list ',' T_STRING '=' static_scalar { do_declare_stmt(&$3, &$5 CLS_CC); }
;
switch_case_list:
'{' case_list '}' { $$ = $2; }
| '{' ';' case_list '}' { $$ = $3; }
| ':' case_list T_ENDSWITCH ';' { $$ = $2; }
| ':' ';' case_list T_ENDSWITCH ';' { $$ = $3; }
| ':' case_list T_ENDSWITCH ';' { $$ = $2; }
| ':' ';' case_list T_ENDSWITCH ';' { $$ = $3; }
;
case_list:
/* empty */ { $$.u.opline_num = -1; }
| case_list T_CASE expr case_separator { do_case_before_statement(&$1, &$2, &$3 CLS_CC); } inner_statement_list { do_case_after_statement(&$$, &$2 CLS_CC); }
| case_list T_DEFAULT case_separator { do_default_before_statement(&$1, &$2 CLS_CC); } inner_statement_list { do_case_after_statement(&$$, &$2 CLS_CC); }
/* empty */ { $$.op_type = IS_UNUSED; }
| case_list T_CASE expr case_separator { do_extended_info(CLS_C); do_case_before_statement(&$1, &$2, &$3 CLS_CC); } inner_statement_list { do_case_after_statement(&$$, &$2 CLS_CC); $$.op_type = IS_CONST }
| case_list T_DEFAULT case_separator { do_extended_info(CLS_C); do_default_before_statement(&$1, &$2 CLS_CC); } inner_statement_list { do_case_after_statement(&$$, &$2 CLS_CC); $$.op_type = IS_CONST; }
;
@@ -311,8 +318,6 @@ new_else_single:
;
parameter_list:
non_empty_parameter_list
| /* empty */
@@ -320,35 +325,35 @@ parameter_list:
non_empty_parameter_list:
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); }
| 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); }
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); }
| 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); }
;
function_call_parameter_list:
non_empty_function_call_parameter_list { $$ = $1; }
| /* empty */ { $$.u.constant.value.lval = 0; }
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 = 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); }
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); }
;
global_var_list:
global_var_list ',' global_var { do_fetch_global_or_static_variable(&$3, NULL, ZEND_FETCH_GLOBAL CLS_CC); }
| global_var { do_fetch_global_or_static_variable(&$1, NULL, ZEND_FETCH_GLOBAL CLS_CC); }
global_var_list ',' global_var { do_fetch_global_or_static_variable(&$3, NULL, ZEND_FETCH_GLOBAL CLS_CC); }
| global_var { do_fetch_global_or_static_variable(&$1, NULL, ZEND_FETCH_GLOBAL CLS_CC); }
;
@@ -384,14 +389,14 @@ class_statement:
;
is_reference:
/* empty */ { $$.op_type = ZEND_RETURN_VAL; }
/* empty */ { $$.op_type = ZEND_RETURN_VAL; }
| '&' { $$.op_type = ZEND_RETURN_REF; }
class_variable_decleration:
class_variable_decleration ',' T_VARIABLE { do_declare_property(&$3, NULL CLS_CC); }
| 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); }
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); }
;
@@ -403,12 +408,12 @@ echo_expr_list:
for_expr:
/* empty */ { $$.op_type = IS_CONST; $$.u.constant.type = IS_BOOL; $$.u.constant.value.lval = 1; }
| non_empty_for_expr { $$ = $1; }
| non_empty_for_expr { $$ = $1; }
;
non_empty_for_expr:
non_empty_for_expr ',' { do_free(&$1 CLS_CC); } expr { $$ = $4; }
| expr { $$ = $1; }
non_empty_for_expr ',' { do_free(&$1 CLS_CC); } expr { $$ = $4; }
| expr { $$ = $1; }
;
@@ -426,7 +431,7 @@ expr_without_variable:
| 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_XOR_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_BW_XOR, &$$, &$1, &$3 CLS_CC); }
| cvar T_SL_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_SL, &$$, &$1, &$3 CLS_CC); }
| cvar T_SR_EQUAL expr { do_end_variable_parse(BP_VAR_RW, 0 CLS_CC); do_binary_assign_op(ZEND_ASSIGN_SR, &$$, &$1, &$3 CLS_CC); }
| rw_cvar T_INC { do_post_incdec(&$$, &$1, ZEND_POST_INC CLS_CC); }
@@ -447,26 +452,27 @@ 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 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 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 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 T_IS_IDENTICAL expr { do_binary_op(ZEND_IS_IDENTICAL, &$$, &$1, &$3 CLS_CC); }
| expr T_IS_NOT_IDENTICAL expr { do_binary_op(ZEND_IS_NOT_IDENTICAL, &$$, &$1, &$3 CLS_CC); }
| expr T_IS_EQUAL expr { do_binary_op(ZEND_IS_EQUAL, &$$, &$1, &$3 CLS_CC); }
| expr T_IS_NOT_EQUAL expr { do_binary_op(ZEND_IS_NOT_EQUAL, &$$, &$1, &$3 CLS_CC); }
| expr '<' expr { do_binary_op(ZEND_IS_SMALLER, &$$, &$1, &$3 CLS_CC); }
| expr T_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 T_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); }
| function_call { $$ = $1; }
| internal_functions_in_yacc { $$ = $1; }
| T_INT_CAST expr { do_cast(&$$, &$2, IS_LONG 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); }
@@ -483,10 +489,10 @@ expr_without_variable:
function_call:
T_STRING '(' { do_extended_fcall_begin(CLS_C); $2.u.opline_num = do_begin_function_call(&$1 CLS_CC); }
T_STRING '(' { $2.u.opline_num = do_begin_function_call(&$1 CLS_CC); }
function_call_parameter_list
')' { do_end_function_call(&$1, &$$, &$4, 0, $2.u.opline_num CLS_CC); do_extended_fcall_end(CLS_C); }
| r_cvar '(' { do_extended_fcall_begin(CLS_C); do_begin_dynamic_function_call(&$1 CLS_CC); }
| cvar '(' { do_begin_dynamic_function_call(&$1 CLS_CC); }
function_call_parameter_list
')' { do_end_function_call(&$1, &$$, &$4, 0, 1 CLS_CC); do_extended_fcall_end(CLS_C);}
| T_STRING T_PAAMAYIM_NEKUDOTAYIM T_STRING '(' { do_extended_fcall_begin(CLS_C); do_begin_class_member_function_call(&$1, &$3 CLS_CC); }
@@ -496,46 +502,46 @@ function_call:
exit_expr:
/* empty */ { $$.op_type = IS_UNUSED; }
| '(' ')' { $$.op_type = IS_UNUSED; }
/* empty */ { memset(&$$, 0, sizeof(znode)); $$.op_type = IS_UNUSED; }
| '(' ')' { memset(&$$, 0, sizeof(znode)); $$.op_type = IS_UNUSED; }
| '(' expr ')' { $$ = $2; }
;
ctor_arguments:
/* empty */ { $$.u.constant.value.lval=0; }
| '(' function_call_parameter_list ')' { $$ = $2; }
/* empty */ { $$.u.constant.value.lval=0; }
| '(' function_call_parameter_list ')' { $$ = $2; }
;
class_name:
T_STRING { $$ = $1; }
| r_cvar { $$ = $1; }
| r_cvar { $$ = $1; }
;
common_scalar:
T_LNUMBER { $$=$1; }
| T_DNUMBER { $$=$1; }
T_LNUMBER { $$ = $1; }
| T_DNUMBER { $$ = $1; }
| T_CONSTANT_ENCAPSED_STRING { $$ = $1; }
| T_LINE { $$ = $1; }
| T_FILE { $$ = $1; }
| T_LINE { $$ = $1; }
| T_FILE { $$ = $1; }
;
static_scalar: /* compile-time evaluated scalars */
common_scalar { $$ = $1; }
| T_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; }
| T_ARRAY '(' static_array_pair_list ')' { $$ = $3; }
| T_ARRAY '(' static_array_pair_list ')' { $$ = $3; $$.u.constant.type = IS_CONSTANT_ARRAY; }
;
scalar:
T_STRING { do_fetch_constant(&$$, &$1, ZEND_RT CLS_CC); }
| T_STRING_VARNAME { $$ = $1; }
T_STRING { do_fetch_constant(&$$, &$1, ZEND_RT CLS_CC); }
| T_STRING_VARNAME { $$ = $1; }
| common_scalar { $$ = $1; }
| '"' encaps_list '"' { $$ = $2; }
| '\'' encaps_list '\'' { $$ = $2; }
@@ -544,16 +550,20 @@ scalar:
static_array_pair_list:
/* empty */ { $$.op_type = IS_CONST; INIT_PZVAL(&$$.u.constant); array_init(&$$.u.constant); }
| non_empty_static_array_pair_list { $$ = $1; }
/* empty */ { $$.op_type = IS_CONST; INIT_PZVAL(&$$.u.constant); array_init(&$$.u.constant); }
| non_empty_static_array_pair_list possible_comma { $$ = $1; }
;
possible_comma:
/* empty */
| ','
;
non_empty_static_array_pair_list:
non_empty_static_array_pair_list ',' static_scalar T_DOUBLE_ARROW static_scalar { do_add_static_array_element(&$$, &$3, &$5); }
| 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); }
| 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:
@@ -598,8 +608,8 @@ cvar_without_objects:
reference_variable:
reference_variable '[' dim_offset ']' { fetch_array_dim(&$$, &$1, &$3 CLS_CC); }
| reference_variable '{' expr '}' { fetch_string_offset(&$$, &$1, &$3 CLS_CC); }
| compound_variable { do_fetch_globals(&$1 CLS_CC); do_begin_variable_parse(CLS_C); fetch_simple_variable(&$$, &$1, 1 CLS_CC); }
| reference_variable '{' expr '}' { fetch_string_offset(&$$, &$1, &$3 CLS_CC); }
| compound_variable { do_fetch_globals(&$1 CLS_CC); do_begin_variable_parse(CLS_C); fetch_simple_variable(&$$, &$1, 1 CLS_CC); }
;
@@ -654,33 +664,33 @@ assignment_list_element:
array_pair_list:
/* empty */ { do_init_array(&$$, NULL, NULL, 0 CLS_CC); }
| non_empty_array_pair_list { $$ = $1; }
/* empty */ { do_init_array(&$$, NULL, NULL, 0 CLS_CC); }
| non_empty_array_pair_list possible_comma { $$ = $1; }
;
non_empty_array_pair_list:
non_empty_array_pair_list ',' expr T_DOUBLE_ARROW expr { do_add_array_element(&$$, &$5, &$3, 0 CLS_CC); }
| non_empty_array_pair_list ',' expr { do_add_array_element(&$$, &$3, NULL, 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); }
| 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); }
| '&' w_cvar { do_init_array(&$$, &$2, NULL, 1 CLS_CC); }
;
encaps_list:
encaps_list encaps_var { do_end_variable_parse(BP_VAR_R, 0 CLS_CC); do_add_variable(&$$, &$1, &$2 CLS_CC); }
| encaps_list T_STRING { do_add_string(&$$, &$1, &$2 CLS_CC); }
| encaps_list T_NUM_STRING { do_add_string(&$$, &$1, &$2 CLS_CC); }
| encaps_list T_ENCAPSED_AND_WHITESPACE { do_add_string(&$$, &$1, &$2 CLS_CC); }
| encaps_list T_CHARACTER { do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list T_BAD_CHARACTER { do_add_string(&$$, &$1, &$2 CLS_CC); }
| encaps_list '[' { $2.u.constant.value.chval = '['; do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list ']' { $2.u.constant.value.chval = ']'; do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list '{' { $2.u.constant.value.chval = '{'; do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list '}' { $2.u.constant.value.chval = '}'; do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list T_OBJECT_OPERATOR { znode tmp; $2.u.constant.value.chval = '-'; do_add_char(&tmp, &$1, &$2 CLS_CC); $2.u.constant.value.chval = '>'; do_add_char(&$$, &tmp, &$2 CLS_CC); }
| encaps_list 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.lval = (long) '['; do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list ']' { $2.u.constant.value.lval = (long) ']'; do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list '{' { $2.u.constant.value.lval = (long) '{'; do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list '}' { $2.u.constant.value.lval = (long) '}'; do_add_char(&$$, &$1, &$2 CLS_CC); }
| encaps_list T_OBJECT_OPERATOR { znode tmp; $2.u.constant.value.lval = (long) '-'; do_add_char(&tmp, &$1, &$2 CLS_CC); $2.u.constant.value.lval = (long) '>'; do_add_char(&$$, &tmp, &$2 CLS_CC); }
| /* empty */ { do_init_string(&$$ CLS_CC); }
;
@@ -698,9 +708,9 @@ encaps_var:
encaps_var_offset:
T_STRING { $$ = $1; }
T_STRING { $$ = $1; }
| T_NUM_STRING { $$ = $1; }
| T_VARIABLE { fetch_simple_variable(&$$, &$1, 1 CLS_CC); }
| T_VARIABLE { fetch_simple_variable(&$$, &$1, 1 CLS_CC); }
;
@@ -708,8 +718,8 @@ internal_functions_in_yacc:
T_ISSET '(' cvar ')' { do_isset_or_isempty(ZEND_ISSET, &$$, &$3 CLS_CC); }
| T_EMPTY '(' cvar ')' { do_isset_or_isempty(ZEND_ISEMPTY, &$$, &$3 CLS_CC); }
| T_INCLUDE expr { do_include_or_eval(ZEND_INCLUDE, &$$, &$2 CLS_CC); }
| T_INCLUDE_ONCE expr { do_include_or_eval(ZEND_INCLUDE_ONCE, &$$, &$2 CLS_CC); }
| T_EVAL '(' expr ')' { do_include_or_eval(ZEND_EVAL, &$$, &$3 CLS_CC); }
| T_IMPORT '(' expr ')' { do_include_or_eval(ZEND_IMPORT, &$$, &$3 CLS_CC); }
;
+10 -12
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -18,8 +18,8 @@
*/
#ifndef _LANGUAGE_SCANNER_H
#define _LANGUAGE_SCANNER_H
#ifndef ZEND_SCANNER_H
#define ZEND_SCANNER_H
#ifdef ZTS
class ZendFlexLexer : public yyFlexLexer
@@ -33,21 +33,19 @@ public:
#endif /* ZTS */
#ifndef ZTS
typedef struct _zend_lex_state {
#ifndef ZTS
YY_BUFFER_STATE buffer_state;
int state;
uint return_offset;
uint lineno;
FILE *in;
char *filename;
} zend_lex_state;
#else
typedef struct _zend_lex_state {
ZendFlexLexer *ZFL;
istream *input_file;
} zend_lex_state;
#endif
uint lineno;
char *filename;
} zend_lex_state;
void zend_fatal_scanner_error(char *);
inline void restore_lexical_state(zend_lex_state * CLS_DC);
+100 -97
View File
@@ -4,12 +4,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -34,7 +34,6 @@
%{
#ifdef ZEND_WIN32
#include <winsock.h>
#include <io.h>
#endif
@@ -92,6 +91,7 @@ private:
stdiobuf _file;
public:
istdiostream (FILE* __f) : istream(), _file(__f) { init(&_file); }
stdiobuf* rdbuf()/* const */ { return &_file; }
};
#endif
@@ -148,12 +148,12 @@ static inline void save_lexical_state(zend_lex_state *lex_state CLS_DC)
#ifndef ZTS
memcpy(&lex_state->buffer_state,&YY_CURRENT_BUFFER,sizeof(YY_BUFFER_STATE));
lex_state->in = yyin;
lex_state->lineno = CG(zend_lineno);
lex_state->state = YYSTATE;
lex_state->filename = zend_get_compiled_filename(CLS_C);
#else
lex_state->ZFL = CG(ZFL);
#endif
lex_state->filename = zend_get_compiled_filename(CLS_C);
lex_state->lineno = CG(zend_lineno);
}
@@ -170,13 +170,13 @@ inline void restore_lexical_state(zend_lex_state *lex_state CLS_DC)
yy_delete_buffer(original_buffer_state);
yyin = lex_state->in;
CG(zend_lineno) = lex_state->lineno;
BEGIN(lex_state->state);
zend_restore_compiled_filename(lex_state->filename);
#else
delete((ZendFlexLexer *) CG(ZFL));
CG(ZFL) = lex_state->ZFL;
#endif
CG(zend_lineno) = lex_state->lineno;
zend_restore_compiled_filename(lex_state->filename);
}
@@ -243,16 +243,21 @@ ZEND_API void zend_close_file_handle(zend_file_handle *file_handle CLS_DC)
ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
{
char *file_path;
#ifndef ZTS
switch (file_handle->type) {
case ZEND_HANDLE_FILENAME:
file_handle->handle.fp = zend_fopen(file_handle->filename, &file_handle->opened_path);
file_path = file_handle->opened_path;
break;
case ZEND_HANDLE_FD:
file_path = file_handle->filename;
file_handle->opened_path = NULL;
file_handle->handle.fp = fdopen(file_handle->handle.fd, "r");
break;
case ZEND_HANDLE_FP:
file_path = file_handle->filename;
file_handle->opened_path = NULL;
file_handle->handle.fp = file_handle->handle.fp;
break;
@@ -298,6 +303,9 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
}
break;
}
file_path = file_handle->filename;
if (file_handle->handle.is->fail()) {
delete file_handle->handle.is;
return FAILURE;
@@ -309,53 +317,71 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC)
CG(ZFL) = new ZendFlexLexer;
CG(ZFL)->switch_streams(file_handle->handle.is, &cout);
#endif
zend_set_compiled_filename(file_handle->filename);
zend_set_compiled_filename(file_path);
CG(zend_lineno) = 1;
return SUCCESS;
}
END_EXTERN_C()
ZEND_API zend_op_array *compile_files(int mark_as_ref CLS_DC, int file_count, ...)
ZEND_API zend_op_array *zend_compile_files(int type CLS_DC, int file_count, ...)
{
va_list files;
zend_op_array *op_array;
va_start(files, file_count);
op_array = v_compile_files(mark_as_ref CLS_CC, file_count, files);
op_array = zend_v_compile_files(type CLS_CC, file_count, files);
va_end(files);
return op_array;
}
ZEND_API zend_op_array *v_compile_files(int mark_as_ref CLS_DC, int file_count, va_list files)
ZEND_API zend_op_array *v_compile_files(int type CLS_DC, int file_count, va_list files)
{
zend_lex_state original_lex_state;
zend_op_array *op_array = (zend_op_array *) emalloc(sizeof(zend_op_array));
zend_op_array *original_active_op_array = CG(active_op_array);
zend_op_array *retval=NULL;
zend_file_handle *file_handle;
int i;
int compiler_result;
int compiled_files=0;
int last_file=0;
znode retval_znode;
zend_bool original_in_compilation = CG(in_compilation);
zend_file_handle **file_handles = (zend_file_handle **) do_alloca(file_count * sizeof(zend_file_handle *));
init_op_array(op_array, INITIAL_OP_ARRAY_SIZE);
retval_znode.op_type = IS_CONST;
retval_znode.u.constant.type = IS_LONG;
retval_znode.u.constant.value.lval = 1;
retval_znode.u.constant.is_ref = 0;
retval_znode.u.constant.refcount = 1;
init_op_array(op_array, ZEND_USER_FUNCTION, INITIAL_OP_ARRAY_SIZE);
save_lexical_state(&original_lex_state CLS_CC);
retval = op_array; /* success oriented */
for (i=0; i<file_count; i++) {
file_handle = va_arg(files, zend_file_handle *);
if (!file_handle) {
file_handles[i] = va_arg(files, zend_file_handle *);
if (file_handles[i]) {
last_file = i;
}
}
for (i=0; i<file_count; i++) {
if (!file_handles[i]) {
continue;
}
if (open_file_for_scanning(file_handle CLS_CC)==FAILURE) {
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, file_handle->filename);
if (open_file_for_scanning(file_handles[i] CLS_CC)==FAILURE) {
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, file_handles[i]->filename);
} else {
CG(in_compilation) = 1;
CG(active_op_array) = op_array;
compiler_result = zendparse(CLS_C);
zend_close_file_handle(file_handle CLS_CC);
zend_close_file_handle(file_handles[i] CLS_CC);
if (i == last_file) {
do_return(&retval_znode, 0 CLS_CC);
}
restore_lexical_state(&original_lex_state CLS_CC);
CG(in_compilation) = original_in_compilation;
if (compiler_result==1) { /* parser error */
@@ -369,12 +395,8 @@ ZEND_API zend_op_array *v_compile_files(int mark_as_ref CLS_DC, int file_count,
if (retval) {
if (compiled_files>0) {
do_return(NULL, 0 CLS_CC);
CG(active_op_array) = original_active_op_array;
pass_two(op_array);
if (mark_as_ref) {
pass_include_eval(op_array);
}
} else {
CG(active_op_array) = original_active_op_array;
destroy_op_array(op_array);
@@ -382,11 +404,12 @@ ZEND_API zend_op_array *v_compile_files(int mark_as_ref CLS_DC, int file_count,
retval = NULL;
}
}
free_alloca(file_handles);
return retval;
}
zend_op_array *compile_filename(int mode, zval *filename CLS_DC ELS_DC)
zend_op_array *compile_filename(int type, zval *filename CLS_DC ELS_DC)
{
zend_file_handle file_handle;
zval tmp;
@@ -405,16 +428,16 @@ zend_op_array *compile_filename(int mode, zval *filename CLS_DC ELS_DC)
file_handle.opened_path = NULL;
if (mode==ZEND_REQUIRE) {
if (type==ZEND_REQUIRE) {
/* We don't want to hear about inclusion failures; If we fail,
* we'll generate a require failure
*/
error_reporting = EG(error_reporting);
EG(error_reporting) = 0;
}
retval = zend_compile_files(1 CLS_CC, 1, &file_handle);
retval = zend_compile_files(type CLS_CC, 1, &file_handle);
if (mode==ZEND_REQUIRE) {
if (type==ZEND_REQUIRE) {
EG(error_reporting) = error_reporting;
if (!retval) {
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, filename->value.str.val);
@@ -445,6 +468,8 @@ static inline int prepare_string_for_scanning(zval *str CLS_DC)
CG(ZFL)->switch_streams(input_stream, &cout);
#endif
zend_set_compiled_filename("Eval code");
CG(zend_lineno) = 1;
return SUCCESS;
}
@@ -471,8 +496,7 @@ zend_op_array *compile_string(zval *source_string CLS_DC)
convert_to_string(&tmp);
source_string = &tmp;
init_op_array(op_array, INITIAL_OP_ARRAY_SIZE);
op_array->type = ZEND_EVAL_CODE;
init_op_array(op_array, ZEND_EVAL_CODE, INITIAL_OP_ARRAY_SIZE);
save_lexical_state(&original_lex_state CLS_CC);
if (prepare_string_for_scanning(source_string CLS_CC)==FAILURE) {
destroy_op_array(op_array);
@@ -507,14 +531,14 @@ zend_op_array *compile_string(zval *source_string CLS_DC)
BEGIN_EXTERN_C()
int require_filename(char *filename CLS_DC)
int require_filename(char *filename, zend_bool unique CLS_DC)
{
zend_file_handle file_handle;
file_handle.type = ZEND_HANDLE_FILENAME;
file_handle.filename = filename;
file_handle.free_filename = 0;
if (require_file(&file_handle, 0 CLS_CC)==FAILURE) {
if (require_file(&file_handle, unique CLS_CC)==FAILURE) {
zend_bailout();
return FAILURE; /* will never get here */
}
@@ -524,6 +548,10 @@ int require_filename(char *filename CLS_DC)
int use_filename(char *filename, uint filename_length CLS_DC)
{
zend_error(E_COMPILE_ERROR,"use: Not yet supported. Please use include_once() or require_once()");
return FAILURE;
#if 0
zend_file_handle file_handle;
file_handle.filename = (char *) emalloc(filename_length + zend_uv.import_use_extension_length);
@@ -539,6 +567,7 @@ int use_filename(char *filename, uint filename_length CLS_DC)
return FAILURE; /* will never get here */
}
return SUCCESS;
#endif
}
@@ -565,6 +594,7 @@ int require_file(zend_file_handle *file_handle, zend_bool unique CLS_DC)
pfh->type = ZEND_HANDLE_FILENAME;
if (pfh->filename) {
pfh->filename = estrdup(pfh->filename);
pfh->free_filename = 1;
}
if (pfh->opened_path) {
pfh->opened_path = strdup(pfh->opened_path);
@@ -666,47 +696,6 @@ int yyFlexLexer::yylex()
#endif
/* redefine YY_INPUT to handle urls for win32*/
#if 0 /*defined(ZEND_WIN32)*/
#define YY_INPUT(buf,result,max_size) \
if ( yyin->_tmpfname != "url" ){ \
if ( yy_current_buffer->yy_is_interactive ) \
{ \
int c = '*', n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
if ( c == EOF && ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
&& ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
}else{ /* this is a url */ \
int recv_char=0,socketd=0; \
/*memset(buf,0,max_size);*/ \
socketd=yyin->_file; \
if ( yy_current_buffer->yy_is_interactive ) \
{ \
int c = '*', n; \
for ( n = 0; n < max_size && \
( (recv_char=recv( socketd,(char *)&c,1,0 ))) >0 && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
if ( recv_char == SOCKET_ERROR ) \
YY_FATAL_ERROR( "input from url in flex scanner failed" ); \
result = n; \
} \
else if ((result = recv( socketd, (char *)buf, max_size, 0)) == SOCKET_ERROR) \
YY_FATAL_ERROR( "input from url read in flex scanner failed" ); \
}
#endif
%}
LNUM [0-9]+
@@ -719,6 +708,7 @@ TABS_AND_SPACES [ \t]*
TOKENS [;:,.\[\]()|^&+-/*=%!~$<>?@]
ENCAPSED_TOKENS [\[\]{}$]
ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
ANY_CHAR (.|[\n])
%option noyylineno
%option noyywrap
@@ -857,7 +847,7 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
return T_STRING;
}
<ST_LOOKING_FOR_PROPERTY>. {
<ST_LOOKING_FOR_PROPERTY>{ANY_CHAR} {
/*unput(yytext[0]);*/
yyless(0);
yy_pop_state();
@@ -911,14 +901,18 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
return T_INCLUDE;
}
<ST_IN_SCRIPTING>"import" {
return T_IMPORT;
<ST_IN_SCRIPTING>"include_once" {
return T_INCLUDE_ONCE;
}
<ST_IN_SCRIPTING>"require" {
return T_REQUIRE;
}
<ST_IN_SCRIPTING>"require_once" {
return T_REQUIRE_ONCE;
}
<ST_IN_SCRIPTING>"use" {
return T_USE;
}
@@ -967,6 +961,10 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
return T_IS_IDENTICAL;
}
<ST_IN_SCRIPTING>"!==" {
return T_IS_NOT_IDENTICAL;
}
<ST_IN_SCRIPTING>"==" {
return T_IS_EQUAL;
}
@@ -1025,7 +1023,7 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
}
<ST_IN_SCRIPTING>"^=" {
return XT_OR_EQUAL;
return T_XOR_EQUAL;
}
<ST_IN_SCRIPTING>"||" {
@@ -1092,7 +1090,7 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
}
<ST_LOOKING_FOR_VARNAME>. {
<ST_LOOKING_FOR_VARNAME>{ANY_CHAR} {
/*unput(yytext[0]);*/
yyless(0);
yy_pop_state();
@@ -1193,6 +1191,7 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
zendlval->value.str.len = yyleng;
zendlval->type = IS_STRING;
BEGIN(ST_IN_SCRIPTING);
return T_OPEN_TAG;
} else {
zendlval->value.str.val = (char *) estrndup(yytext, yyleng);
zendlval->value.str.len = yyleng;
@@ -1213,9 +1212,12 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
<INITIAL>"<?php_track_vars?>"([\n]|"\r\n")? {
zend_message_dispatcher(ZMSG_ENABLE_TRACK_VARS, NULL);
zend_error(E_WARNING, "&lt;?php_track_vars?&gt; is no longer supported - please use the track_vars INI directive instead");
HANDLE_NEWLINE(yytext[yyleng-1]);
return T_PHP_TRACK_VARS;
zendlval->value.str.val = (char *) estrndup(yytext, yyleng);
zendlval->value.str.len = yyleng;
zendlval->type = IS_STRING;
return T_INLINE_HTML;
}
<ST_IN_SCRIPTING,ST_DOUBLE_QUOTES,ST_HEREDOC,ST_BACKQUOTE>"$"{LABEL} {
@@ -1288,14 +1290,15 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
<ST_IN_SCRIPTING>"%>"([\n]|"\r\n")? {
zendlval->value.str.val = yytext; /* no copying - intentional */
zendlval->value.str.len = yyleng;
zendlval->type = IS_STRING;
HANDLE_NEWLINES(yytext,yyleng);
if (CG(asp_tags)) {
BEGIN(INITIAL);
zendlval->value.str.val = yytext; /* no copying - intentional */
return T_CLOSE_TAG; /* implicit ';' at php-end tag */
} else {
zendlval->value.str.val = (char *) estrndup(yytext, yyleng);
return T_INLINE_HTML;
}
}
@@ -1528,7 +1531,7 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
<ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC>"$"[^a-zA-Z_\x7f-\xff{] {
zendlval->value.chval = yytext[0];
zendlval->value.lval = (long) yytext[0];
if (yyleng == 2) {
yyless(1);
/*unput(yytext[1]);
@@ -1540,12 +1543,12 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
<ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC>{ENCAPSED_TOKENS} {
zendlval->value.chval = yytext[0];
zendlval->value.lval = (long) yytext[0];
return yytext[0];
}
<ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC>"{$" {
zendlval->value.chval = yytext[0];
zendlval->value.lval = (long) yytext[0];
yy_push_state(ST_IN_SCRIPTING);
/*unput('$');*/
yyless(1);
@@ -1554,54 +1557,54 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
<ST_SINGLE_QUOTE>"\\'" {
zendlval->value.chval='\'';
zendlval->value.lval = (long) '\'';
return T_CHARACTER;
}
<ST_SINGLE_QUOTE>"\\\\" {
zendlval->value.chval='\\';
zendlval->value.lval = (long)'\\';
return T_CHARACTER;
}
<ST_DOUBLE_QUOTES>"\\\"" {
zendlval->value.chval='"';
zendlval->value.lval = (long) '"';
return T_CHARACTER;
}
<ST_BACKQUOTE>"\\`" {
zendlval->value.chval='`';
zendlval->value.lval = (long) '`';
return T_CHARACTER;
}
<ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC>"\\"[0-7]{1,3} {
zendlval->value.chval = (char) strtol (yytext+1, NULL, 8);
zendlval->value.lval = strtol(yytext+1, NULL, 8);
return T_CHARACTER;
}
<ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC>"\\x"[0-9A-Fa-f]{1,2} {
zendlval->value.chval = (char) strtol (yytext+2, NULL, 16);
zendlval->value.lval = strtol (yytext+2, NULL, 16);
return T_CHARACTER;
}
<ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC>"\\". {
<ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC>"\\"{ANY_CHAR} {
switch (yytext[1]) {
case 'n':
zendlval->value.chval='\n';
zendlval->value.lval = (long) '\n';
break;
case 't':
zendlval->value.chval='\t';
zendlval->value.lval = (long) '\t';
break;
case 'r':
zendlval->value.chval='\r';
zendlval->value.lval = (long) '\r';
break;
case '\\':
zendlval->value.chval='\\';
zendlval->value.lval = (long) '\\';
break;
case '$':
zendlval->value.chval=yytext[1];
zendlval->value.lval = (long) yytext[1];
break;
case '{':
zendlval->value.chval=yytext[1];
zendlval->value.lval = (long) yytext[1];
break;
default:
zendlval->value.str.val = estrndup(yytext,yyleng);
@@ -1651,6 +1654,6 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
<ST_IN_SCRIPTING,INITIAL,ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_SINGLE_QUOTE,ST_HEREDOC>. {
<ST_IN_SCRIPTING,INITIAL,ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_SINGLE_QUOTE,ST_HEREDOC>{ANY_CHAR} {
zend_error(E_COMPILE_WARNING,"Unexpected character in input: '%c' (ASCII=%d) state=%d",yytext[0],yytext[0],YYSTATE);
}
+279 -51
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -19,8 +19,6 @@
#include "zend.h"
#include "zend_operators.h"
#include "zend_variables.h"
#include "zend_extensions.h"
#include "modules.h"
#include "zend_constants.h"
@@ -38,17 +36,23 @@
# define GLOBAL_CONSTANTS_TABLE CG(zend_constants)
#endif
#if defined(ZEND_WIN32) && ZEND_DEBUG
BOOL WINAPI IsDebuggerPresent(VOID);
#endif
/* true multithread-shared globals */
ZEND_API zend_class_entry zend_standard_class_def;
ZEND_API int (*zend_printf)(const char *format, ...);
ZEND_API int (*zend_write)(const char *str, uint str_length);
ZEND_API void (*zend_error)(int type, const char *format, ...);
ZEND_API void (*zend_message_dispatcher)(long message, void *data);
ZEND_API zend_write_func_t zend_write;
ZEND_API FILE *(*zend_fopen)(const char *filename, char **opened_path);
ZEND_API void (*zend_block_interruptions)(void);
ZEND_API void (*zend_unblock_interruptions)(void);
ZEND_API int (*zend_get_ini_entry)(char *name, uint name_length, zval *contents);
ZEND_API void (*zend_ticks_function)(int ticks);
ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
static void (*zend_message_dispatcher_p)(long message, void *data);
static int (*zend_get_ini_entry_p)(char *name, uint name_length, zval *contents);
#ifdef ZTS
ZEND_API int compiler_globals_id;
@@ -66,7 +70,7 @@ ZEND_API zval zval_used_for_init; /* True global variable */
/* version information */
static char *zend_version_info;
static uint zend_version_info_length;
#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski\n"
#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998-2000 Zend Technologies\n"
#define PRINT_ZVAL_INDENT 4
@@ -123,7 +127,6 @@ ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_cop
expr_copy->value.str.val = empty_string;
break;
case IS_BOOL:
#if 1
if (expr->value.lval) {
expr_copy->value.str.len = 1;
expr_copy->value.str.val = estrndup("1", 1);
@@ -131,15 +134,6 @@ ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_cop
expr_copy->value.str.len = 0;
expr_copy->value.str.val = empty_string;
}
#else
if (expr->value.lval) {
expr_copy->value.str.len = sizeof("true")-1;
expr_copy->value.str.val = estrndup("true", expr_copy->value.str.len);
} else {
expr_copy->value.str.len = sizeof("false")-1;
expr_copy->value.str.val = estrndup("false", expr_copy->value.str.len);
}
#endif
break;
case IS_RESOURCE:
expr_copy->value.str.val = (char *) emalloc(sizeof("Resource id #")-1 + MAX_LENGTH_OF_LONG);
@@ -151,10 +145,7 @@ ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_cop
break;
case IS_OBJECT: {
zval function_name;
function_name.value.str.len = sizeof("to_string")-1;
function_name.value.str.val = estrndup("to_string", function_name.value.str.len);
function_name.type = IS_STRING;
ZVAL_STRING(&function_name,"__string_value",1);
if (call_user_function(NULL, expr, &function_name, expr_copy, 0, NULL)==FAILURE) {
expr_copy->value.str.len = sizeof("Object")-1;
@@ -175,6 +166,12 @@ ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_cop
ZEND_API int zend_print_zval(zval *expr, int indent)
{
return zend_print_zval_ex(zend_write, expr, indent);
}
ZEND_API int zend_print_zval_ex(zend_write_func_t write_func, zval *expr, int indent)
{
zval expr_copy;
int use_copy;
@@ -189,7 +186,7 @@ ZEND_API int zend_print_zval(zval *expr, int indent)
}
return 0;
}
ZEND_WRITE(expr->value.str.val,expr->value.str.len);
write_func(expr->value.str.val,expr->value.str.len);
if (use_copy) {
zval_dtor(expr);
}
@@ -197,7 +194,13 @@ ZEND_API int zend_print_zval(zval *expr, int indent)
}
ZEND_API void zend_print_zval_r(zval *expr, int indent)
ZEND_API void zend_print_zval_r(zval *expr, int indent)
{
zend_print_zval_r_ex(zend_write, expr, indent);
}
ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int indent)
{
switch(expr->type) {
case IS_ARRAY:
@@ -220,7 +223,7 @@ static FILE *zend_fopen_wrapper(const char *filename, char **opened_path)
if (opened_path) {
*opened_path = strdup(filename);
}
return fopen(filename, "r");
return fopen(filename, "rb");
}
@@ -230,8 +233,8 @@ static void register_standard_class(void)
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, ZVAL_PTR_DTOR, 1);
zend_hash_init(&zend_standard_class_def.function_table, 0, NULL, ZEND_FUNCTION_DTOR, 1);
zend_hash_init_ex(&zend_standard_class_def.default_properties, 0, NULL, ZVAL_PTR_DTOR, 1, 0);
zend_hash_init_ex(&zend_standard_class_def.function_table, 0, NULL, ZEND_FUNCTION_DTOR, 1, 0);
zend_standard_class_def.handle_function_call = NULL;
zend_standard_class_def.handle_property_get = NULL;
zend_standard_class_def.handle_property_set = NULL;
@@ -241,21 +244,33 @@ static void register_standard_class(void)
}
static void zend_set_default_compile_time_values(CLS_D)
{
/* default compile-time values */
CG(asp_tags) = 0;
CG(short_tags) = 1;
CG(allow_call_time_pass_reference) = 1;
CG(extended_info) = 0;
}
#ifdef ZTS
static void compiler_globals_ctor(zend_compiler_globals *compiler_globals)
{
zend_function tmp_func;
zend_class_entry tmp_class;
compiler_globals->compiled_filename = NULL;
compiler_globals->function_table = (HashTable *) malloc(sizeof(HashTable));
zend_hash_init(compiler_globals->function_table, 100, NULL, ZEND_FUNCTION_DTOR, 1);
zend_hash_init_ex(compiler_globals->function_table, 100, NULL, ZEND_FUNCTION_DTOR, 1, 0);
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_init_ex(compiler_globals->class_table, 10, NULL, ZEND_CLASS_DTOR, 1, 0);
zend_hash_copy(compiler_globals->class_table, global_class_table, (copy_ctor_func_t) zend_class_add_ref, &tmp_class, sizeof(zend_class_entry));
compiler_globals->extended_info = 0;
zend_set_default_compile_time_values(CLS_C);
}
@@ -278,14 +293,15 @@ static void executor_globals_ctor(zend_executor_globals *executor_globals)
zend_startup_constants(ELS_C);
zend_copy_constants(executor_globals->zend_constants, global_constants_table);
}
init_resource_plist(ELS_C);
zend_init_rsrc_plist(ELS_C);
EG(lambda_count)=0;
}
static void executor_globals_dtor(zend_executor_globals *executor_globals)
{
zend_shutdown_constants(ELS_C);
destroy_resource_plist(ELS_C);
zend_destroy_rsrc_plist(ELS_C);
}
@@ -296,8 +312,12 @@ static void alloc_globals_ctor(zend_alloc_globals *alloc_globals)
#endif
#ifdef __FreeBSD__
/* FreeBSD floating point precision fix */
#include <floatingpoint.h>
#endif
int zend_startup(zend_utility_functions *utility_functions, char **extensions)
int zend_startup(zend_utility_functions *utility_functions, char **extensions, int start_builtin_functions)
{
#ifdef ZTS
zend_compiler_globals *compiler_globals;
@@ -308,24 +328,39 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions)
start_memory_manager(ALS_C);
#endif
#ifdef __FreeBSD__
{
/* FreeBSD floating point precision fix */
#ifdef HAVE_FP_EXCEPT
fp_except
#else
fp_except_t
#endif
mask;
mask = fpgetmask();
fpsetmask(mask & ~FP_X_IMP);
}
#endif
/* Set up utility functions and values */
zend_error = utility_functions->error_function;
zend_error_cb = utility_functions->error_function;
zend_printf = utility_functions->printf_function;
zend_write = utility_functions->write_function;
zend_write = (zend_write_func_t) utility_functions->write_function;
zend_fopen = utility_functions->fopen_function;
if (!zend_fopen) {
zend_fopen = zend_fopen_wrapper;
}
zend_message_dispatcher = utility_functions->message_handler;
zend_message_dispatcher_p = utility_functions->message_handler;
zend_block_interruptions = utility_functions->block_interruptions;
zend_unblock_interruptions = utility_functions->unblock_interruptions;
zend_get_ini_entry = utility_functions->get_ini_entry;
zend_get_ini_entry_p = utility_functions->get_ini_entry;
zend_ticks_function = utility_functions->ticks_function;
zend_compile_files = compile_files;
zend_v_compile_files = v_compile_files;
zend_execute = execute;
zend_llist_init(&zend_extensions, sizeof(zend_extension), (void (*)(void *)) zend_extension_dtor, 1);
zend_startup_extensions();
/* set up version */
zend_version_info = strdup(ZEND_CORE_VERSION_INFO);
@@ -333,11 +368,11 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions)
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);
zend_hash_init_ex(GLOBAL_FUNCTION_TABLE, 100, NULL, ZEND_FUNCTION_DTOR, 1, 0);
zend_hash_init_ex(GLOBAL_CLASS_TABLE, 10, NULL, ZEND_CLASS_DTOR, 1, 0);
register_standard_class();
zend_hash_init(&module_registry, 50, NULL, ZEND_MODULE_DTOR, 1);
zend_hash_init(&list_destructors, 50, NULL, NULL, 1);
zend_hash_init_ex(&module_registry, 50, NULL, ZEND_MODULE_DTOR, 1, 0);
zend_init_rsrc_list_dtors();
/* This zval can be used to initialize allocate zval's to an uninit'ed value */
zval_used_for_init.is_ref = 0;
@@ -357,14 +392,17 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions)
GLOBAL_CONSTANTS_TABLE = EG(zend_constants);
#else
zend_startup_constants();
zend_set_default_compile_time_values(CLS_C);
#endif
zend_register_standard_constants(ELS_C);
#ifndef ZTS
init_resource_plist(ELS_C);
zend_init_rsrc_plist(ELS_C);
#endif
zend_startup_builtin_functions();
if (start_builtin_functions) {
zend_startup_builtin_functions();
}
return SUCCESS;
}
@@ -372,10 +410,13 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions)
void zend_shutdown()
{
#ifndef ZTS
destroy_resource_plist();
#ifdef ZEND_WIN32
zend_shutdown_timeout_thread();
#endif
zend_hash_destroy(&list_destructors);
#ifndef ZTS
zend_destroy_rsrc_plist();
#endif
zend_destroy_rsrc_list_dtors();
zend_hash_destroy(&module_registry);
zend_hash_destroy(GLOBAL_FUNCTION_TABLE);
free(GLOBAL_FUNCTION_TABLE);
@@ -456,11 +497,198 @@ void zend_activate_modules()
zend_hash_apply(&module_registry, (int (*)(void *)) module_registry_request_startup);
}
void zend_deactivate_modules()
{
ELS_FETCH();
EG(opline_ptr) = NULL; /* we're no longer executing anything */
zend_hash_apply(&module_registry, (int (*)(void *)) module_registry_cleanup);
}
void zend_deactivate(CLS_D ELS_DC)
{
zend_hash_apply(&module_registry, (int (*)(void *)) module_registry_cleanup);
/* we're no longer executing anything */
EG(opline_ptr) = NULL;
EG(active_symbol_table) = NULL;
shutdown_scanner(CLS_C);
shutdown_executor(ELS_C);
shutdown_compiler(CLS_C);
}
BEGIN_EXTERN_C()
ZEND_API void zend_message_dispatcher(long message, void *data)
{
if (zend_message_dispatcher_p) {
zend_message_dispatcher_p(message, data);
}
}
END_EXTERN_C()
ZEND_API int zend_get_ini_entry(char *name, uint name_length, zval *contents)
{
if (zend_get_ini_entry_p) {
return zend_get_ini_entry_p(name, name_length, contents);
} else {
return FAILURE;
}
}
#define ZEND_ERROR_BUFFER_SIZE 1024
ZEND_API void zend_error(int type, const char *format, ...)
{
va_list args;
zval ***params;
zval *retval;
zval *z_error_type, *z_error_message, *z_error_filename, *z_error_lineno, *z_context;
char *error_filename;
uint error_lineno;
zval *orig_user_error_handler;
ELS_FETCH();
CLS_FETCH();
/* Obtain relevant filename and lineno */
switch (type) {
case E_CORE_ERROR:
case E_CORE_WARNING:
error_filename = NULL;
error_lineno = 0;
break;
case E_PARSE:
case E_COMPILE_ERROR:
case E_COMPILE_WARNING:
case E_ERROR:
case E_NOTICE:
case E_WARNING:
case E_USER_ERROR:
case E_USER_WARNING:
case E_USER_NOTICE:
if (zend_is_compiling()) {
error_filename = zend_get_compiled_filename(CLS_C);
error_lineno = zend_get_compiled_lineno(CLS_C);
} else if (zend_is_executing()) {
error_filename = zend_get_executed_filename(ELS_C);
error_lineno = zend_get_executed_lineno(ELS_C);
} else {
error_filename = NULL;
error_lineno = 0;
}
break;
default:
error_filename = NULL;
error_lineno = 0;
break;
}
if (!error_filename) {
error_filename = "Unknown";
}
va_start(args, format);
/* if we don't have a user defined error handler */
if (!EG(user_error_handler)) {
zend_error_cb(type, error_filename, error_lineno, format, args);
} else switch (type) {
case E_ERROR:
case E_PARSE:
case E_CORE_ERROR:
case E_CORE_WARNING:
case E_COMPILE_ERROR:
case E_COMPILE_WARNING:
/* The error may not be safe to handle in user-space */
zend_error_cb(type, error_filename, error_lineno, format, args);
break;
default:
/* Handle the error in user space */
ALLOC_INIT_ZVAL(z_error_message);
ALLOC_INIT_ZVAL(z_error_type);
ALLOC_INIT_ZVAL(z_error_filename);
ALLOC_INIT_ZVAL(z_error_lineno);
ALLOC_INIT_ZVAL(z_context);
z_error_message->value.str.val = (char *) emalloc(ZEND_ERROR_BUFFER_SIZE);
#ifdef HAVE_VSNPRINTF
z_error_message->value.str.len = vsnprintf(z_error_message->value.str.val, ZEND_ERROR_BUFFER_SIZE, format, args);
#else
/* This is risky... */
z_error_message->value.str.len = vsprintf(z_error_message->value.str.val, format, args);
#endif
z_error_message->type = IS_STRING;
z_error_type->value.lval = type;
z_error_type->type = IS_LONG;
if (error_filename) {
z_error_filename->value.str.len = strlen(error_filename);
z_error_filename->value.str.val = estrndup(error_filename, z_error_filename->value.str.len);
z_error_filename->type = IS_STRING;
}
z_error_lineno->value.lval = error_lineno;
z_error_lineno->type = IS_LONG;
z_context->value.ht = EG(active_symbol_table);
z_context->type = IS_ARRAY;
ZVAL_ADDREF(z_context); /* we don't want this one to be freed */
params = (zval ***) emalloc(sizeof(zval **)*5);
params[0] = &z_error_type;
params[1] = &z_error_message;
params[2] = &z_error_filename;
params[3] = &z_error_lineno;
params[4] = &z_context;
orig_user_error_handler = EG(user_error_handler);
EG(user_error_handler) = NULL;
if (call_user_function_ex(CG(function_table), NULL, orig_user_error_handler, &retval, 5, params, 1, NULL)==SUCCESS) {
zval_ptr_dtor(&retval);
} else {
/* The user error handler failed, use built-in error handler */
zend_error_cb(type, error_filename, error_lineno, format, args);
}
EG(user_error_handler) = orig_user_error_handler;
efree(params);
zval_ptr_dtor(&z_error_message);
zval_ptr_dtor(&z_error_type);
zval_ptr_dtor(&z_error_filename);
zval_ptr_dtor(&z_error_lineno);
if (ZVAL_REFCOUNT(z_context)==2) {
FREE_ZVAL(z_context);
}
break;
}
va_end(args);
}
ZEND_API void zend_output_debug_string(zend_bool trigger_break, char *format, ...)
{
#if ZEND_DEBUG
va_list args;
va_start(args, format);
# ifdef ZEND_WIN32
{
char output_buf[1024];
vsnprintf(output_buf, 1024, format, args);
OutputDebugString(output_buf);
OutputDebugString("\n");
if (trigger_break && IsDebuggerPresent()) {
DebugBreak();
}
}
# else
vfprintf(stderr, format, args);
fprintf(stderr, "\n");
# endif
va_end(args);
#endif
}
+99 -34
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -18,10 +18,10 @@
*/
#ifndef _ZEND_H
#define _ZEND_H
#ifndef ZEND_H
#define ZEND_H
#define ZEND_VERSION "0.90"
#define ZEND_VERSION "1.0.1"
#ifdef __cplusplus
#define BEGIN_EXTERN_C() extern "C" {
@@ -57,8 +57,17 @@
# include <dlfcn.h>
#endif
#if defined(HAVE_LIBDL) && defined(RTLD_NOW)
# define DL_LOAD(libname) dlopen(libname, RTLD_NOW)
#if defined(HAVE_LIBDL)
# ifndef RTLD_LAZY
# define RTLD_LAZY 1 /* Solaris 1, FreeBSD's (2.1.7.1 and older) */
# endif
# ifndef RTLD_GLOBAL
# define RTLD_GLOBAL 0
# endif
# define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL)
# define DL_UNLOAD dlclose
# define DL_FETCH_SYMBOL dlsym
# define DL_HANDLE void *
@@ -74,6 +83,18 @@
# define ZEND_EXTENSIONS_SUPPORT 0
#endif
#if HAVE_ALLOCA_H
# include <alloca.h>
#endif
#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && defined(ZEND_WIN32))
# define do_alloca(p) alloca(p)
# define free_alloca(p)
#else
# define do_alloca(p) emalloc(p)
# define free_alloca(p) efree(p)
#endif
#if ZEND_DEBUG
#define ZEND_FILE_LINE_D char *__zend_filename, uint __zend_lineno
#define ZEND_FILE_LINE_DC , ZEND_FILE_LINE_D
@@ -102,11 +123,20 @@
#define ZEND_FILE_LINE_ORIG_RELAY_CC
#endif /* ZEND_DEBUG */
#ifdef ZTS
#define ZTS_V 1
#else
#define ZTS_V 0
#endif
#include "zend_errors.h"
#include "zend_alloc.h"
typedef unsigned char zend_bool;
typedef unsigned char zend_uchar;
typedef unsigned int zend_uint;
typedef unsigned long zend_ulong;
typedef unsigned short zend_ushort;
#undef SUCCESS
#undef FAILURE
@@ -133,7 +163,6 @@ typedef union _zvalue_value {
char *val;
int len;
} str;
char chval; /* char value */
HashTable *ht; /* hash table value */
struct {
zend_class_entry *ce;
@@ -145,9 +174,9 @@ typedef union _zvalue_value {
struct _zval_struct {
/* Variable information */
zvalue_value value; /* value */
unsigned char type; /* active type */
unsigned char is_ref;
short refcount;
zend_uchar type; /* active type */
zend_uchar is_ref;
zend_ushort refcount;
};
@@ -162,7 +191,7 @@ typedef struct _zend_function_entry {
typedef struct _zend_property_reference {
int type; /* read, write or r/w */
zval *object;
zend_llist elements_list;
zend_llist *elements_list;
} zend_property_reference;
@@ -196,7 +225,7 @@ struct _zend_class_entry {
typedef struct _zend_utility_functions {
void (*error_function)(int type, const char *format, ...);
void (*error_function)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
int (*printf_function)(const char *format, ...);
int (*write_function)(const char *str, uint str_length);
FILE *(*fopen_function)(const char *filename, char **opened_path);
@@ -209,20 +238,22 @@ typedef struct _zend_utility_functions {
typedef struct _zend_utility_values {
zend_bool short_tags;
zend_bool asp_tags;
zend_bool allow_call_time_pass_reference;
char *import_use_extension;
uint import_use_extension_length;
} zend_utility_values;
typedef int (*zend_write_func_t)(const char *str, uint str_length);
#undef MIN
#undef MAX
#define MAX(a,b) (((a)>(b))?(a):(b))
#define MIN(a,b) (((a)<(b))?(a):(b))
#define ZEND_STRL(str) (str), (sizeof(str)-1)
#define ZEND_STRS(str) (str), (sizeof(str)
#define ZEND_NORMALIZE_BOOL(n) \
((n) ? (((n)>0) ? 1 : -1) : 0)
/* data types */
@@ -235,16 +266,24 @@ typedef struct _zend_utility_values {
#define IS_BOOL 6
#define IS_RESOURCE 7
#define IS_CONSTANT 8
#define IS_CONSTANT_ARRAY 9
/* Special data type to temporarily mark large numbers */
#define FLAG_IS_BC 9 /* for parser internal use only */
#define FLAG_IS_BC 10 /* for parser internal use only */
/* overloaded elements data types */
#define OE_IS_ARRAY (1<<0)
#define OE_IS_OBJECT (1<<1)
#define OE_IS_METHOD (1<<2)
int zend_startup(zend_utility_functions *utility_functions, char **extensions);
/* Argument passing types */
#define BYREF_NONE 0
#define BYREF_FORCE 1
#define BYREF_ALLOW 2
#define BYREF_FORCE_REST 3
int zend_startup(zend_utility_functions *utility_functions, char **extensions, int start_builtin_functions);
void zend_shutdown(void);
void zend_set_utility_values(zend_utility_values *utility_values);
@@ -255,7 +294,16 @@ ZEND_API char *get_zend_version(void);
ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_copy);
ZEND_API int zend_print_zval(zval *expr, int indent);
ZEND_API int zend_print_zval_ex(zend_write_func_t write_func, zval *expr, int indent);
ZEND_API void zend_print_zval_r(zval *expr, int indent);
ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int indent);
ZEND_API void zend_output_debug_string(zend_bool trigger_break, char *format, ...);
#if ZEND_DEBUG
#define Z_DBG(expr) (expr)
#else
#define Z_DBG(expr)
#endif
ZEND_API extern char *empty_string;
@@ -275,17 +323,19 @@ ZEND_API extern char *empty_string;
#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 ZEND_API zend_write_func_t zend_write;
extern ZEND_API FILE *(*zend_fopen)(const char *filename, char **opened_path);
extern ZEND_API void (*zend_block_interruptions)(void);
extern ZEND_API void (*zend_unblock_interruptions)(void);
extern ZEND_API void (*zend_message_dispatcher)(long message, void *data);
extern ZEND_API int (*zend_get_ini_entry)(char *name, uint name_length, zval *contents);
extern ZEND_API void (*zend_ticks_function)(int ticks);
extern ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
ZEND_API void zend_error(int type, const char *format, ...);
void zenderror(char *error);
extern ZEND_API zend_class_entry zend_standard_class_def;
@@ -300,15 +350,25 @@ END_EXTERN_C()
#define HANDLE_BLOCK_INTERRUPTIONS() if (zend_block_interruptions) { zend_block_interruptions(); }
#define HANDLE_UNBLOCK_INTERRUPTIONS() if (zend_unblock_interruptions) { zend_unblock_interruptions(); }
BEGIN_EXTERN_C()
ZEND_API void zend_message_dispatcher(long message, void *data);
END_EXTERN_C()
ZEND_API int zend_get_ini_entry(char *name, uint name_length, zval *contents);
/* Messages for applications of Zend */
#define ZMSG_ENABLE_TRACK_VARS 1L
#define ZMSG_FAILED_INCLUDE_FOPEN 2L
#define ZMSG_FAILED_REQUIRE_FOPEN 3L
#define ZMSG_FAILED_HIGHLIGHT_FOPEN 4L
#define ZMSG_MEMORY_LEAK_DETECTED 5L
#define ZMSG_MEMORY_LEAK_REPEATED 6L
#define ZMSG_LOG_SCRIPT_NAME 7L
#define ZMSG_FAILED_INCLUDE_FOPEN 1L
#define ZMSG_FAILED_REQUIRE_FOPEN 2L
#define ZMSG_FAILED_HIGHLIGHT_FOPEN 3L
#define ZMSG_MEMORY_LEAK_DETECTED 4L
#define ZMSG_MEMORY_LEAK_REPEATED 5L
#define ZMSG_LOG_SCRIPT_NAME 6L
#define ZVAL_ADDREF(pz) (++(pz)->refcount)
#define ZVAL_DELREF(pz) (--(pz)->refcount)
#define ZVAL_REFCOUNT(pz) ((pz)->refcount)
#define INIT_PZVAL(z) \
(z)->refcount = 1; \
@@ -345,6 +405,11 @@ END_EXTERN_C()
SEPARATE_ZVAL(ppzv); \
}
#define SEPARATE_ZVAL_TO_MAKE_IS_REF(ppzv) \
if (!PZVAL_IS_REF(*ppzv)) { \
SEPARATE_ZVAL(ppzv); \
(*(ppzv))->is_ref = 1; \
}
#define COPY_PZVAL_TO_ZVAL(zv, pzv) \
(zv) = *(pzv); \
@@ -352,11 +417,11 @@ END_EXTERN_C()
zval_copy_ctor(&(zv)); \
(pzv)->refcount--; \
} else { \
FREE_ZVAL(pzv); \
FREE_ZVAL(pzv); \
} \
INIT_PZVAL(&(zv));
#define ZEND_MAX_RESERVED_RESOURCES 1
#define ZEND_MAX_RESERVED_RESOURCES 2
#ifdef ZEND_WIN32
/* Only use this macro if you know for sure that all of the switches values
@@ -369,7 +434,7 @@ END_EXTERN_C()
#define EMPTY_SWITCH_DEFAULT_CASE()
#endif
#endif /* _ZEND_H */
#endif /* ZEND_H */
/*
* Local variables:
+94 -57
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -19,20 +19,18 @@
#include "zend.h"
#include "zend_variables.h"
#include "zend_execute.h"
#include "zend_API.h"
#include "modules.h"
#include "zend_constants.h"
#include "zend_operators.h"
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#include <stdarg.h>
#endif
/* these variables are true statics/globals, and have to be mutex'ed on every access */
static int module_count=0;
HashTable list_destructors, module_registry;
HashTable module_registry;
/* this function doesn't check for too many parameters */
ZEND_API int zend_get_parameters(int ht, int param_count, ...)
@@ -43,7 +41,7 @@ ZEND_API int zend_get_parameters(int ht, int param_count, ...)
zval **param, *param_ptr;
ELS_FETCH();
p = EG(argument_stack).top_element-1;
p = EG(argument_stack).top_element-2;
arg_count = (ulong) *p;
if (param_count>arg_count) {
@@ -52,9 +50,9 @@ ZEND_API int zend_get_parameters(int ht, int param_count, ...)
va_start(ptr, param_count);
while (param_count>0) {
while (param_count-->0) {
param = va_arg(ptr, zval **);
param_ptr = *(p-param_count);
param_ptr = *(p-arg_count);
if (!PZVAL_IS_REF(param_ptr) && param_ptr->refcount>1) {
zval *new_tmp;
@@ -63,11 +61,11 @@ ZEND_API int zend_get_parameters(int ht, int param_count, ...)
zval_copy_ctor(new_tmp);
INIT_PZVAL(new_tmp);
param_ptr = new_tmp;
((zval *) *(p-param_count))->refcount--;
*(p-param_count) = param_ptr;
((zval *) *(p-arg_count))->refcount--;
*(p-arg_count) = param_ptr;
}
*param = param_ptr;
param_count--;
arg_count--;
}
va_end(ptr);
@@ -82,16 +80,15 @@ ZEND_API int zend_get_parameters_array(int ht, int param_count, zval **argument_
zval *param_ptr;
ELS_FETCH();
p = EG(argument_stack).top_element-1;
p = EG(argument_stack).top_element-2;
arg_count = (ulong) *p;
if (param_count>arg_count) {
return FAILURE;
}
while (param_count>0) {
param_ptr = *(p-param_count);
while (param_count-->0) {
param_ptr = *(p-arg_count);
if (!PZVAL_IS_REF(param_ptr) && param_ptr->refcount>1) {
zval *new_tmp;
@@ -100,11 +97,11 @@ ZEND_API int zend_get_parameters_array(int ht, int param_count, zval **argument_
zval_copy_ctor(new_tmp);
INIT_PZVAL(new_tmp);
param_ptr = new_tmp;
((zval *) *(p-param_count))->refcount--;
*(p-param_count) = param_ptr;
((zval *) *(p-arg_count))->refcount--;
*(p-arg_count) = param_ptr;
}
*(argument_array++) = param_ptr;
param_count--;
arg_count--;
}
return SUCCESS;
@@ -123,7 +120,7 @@ ZEND_API int zend_get_parameters_ex(int param_count, ...)
zval ***param;
ELS_FETCH();
p = EG(argument_stack).top_element-1;
p = EG(argument_stack).top_element-2;
arg_count = (ulong) *p;
if (param_count>arg_count) {
@@ -131,9 +128,9 @@ ZEND_API int zend_get_parameters_ex(int param_count, ...)
}
va_start(ptr, param_count);
while (param_count>0) {
while (param_count-->0) {
param = va_arg(ptr, zval ***);
*param = (zval **) p-(param_count--);
*param = (zval **) p-(arg_count--);
}
va_end(ptr);
@@ -147,15 +144,15 @@ ZEND_API int zend_get_parameters_array_ex(int param_count, zval ***argument_arra
int arg_count;
ELS_FETCH();
p = EG(argument_stack).top_element-1;
p = EG(argument_stack).top_element-2;
arg_count = (ulong) *p;
if (param_count>arg_count) {
return FAILURE;
}
while (param_count>0) {
*(argument_array++) = (zval **) p-(param_count--);
while (param_count-->0) {
*(argument_array++) = (zval **) p-(arg_count--);
}
return SUCCESS;
@@ -169,7 +166,7 @@ ZEND_API int ParameterPassedByReference(int ht, uint n)
zval *arg;
ELS_FETCH();
p = EG(argument_stack).elements+EG(argument_stack).top-1;
p = EG(argument_stack).elements+EG(argument_stack).top-2;
arg_count = (ulong) *p;
if (n>arg_count) {
@@ -191,7 +188,7 @@ ZEND_API inline int _array_init(zval *arg ZEND_FILE_LINE_DC)
ALLOC_HASHTABLE_REL(arg->value.ht);
if (!arg->value.ht || zend_hash_init(arg->value.ht, 0, NULL, ZVAL_PTR_DTOR, 0)) {
zend_error(E_CORE_ERROR, "Cannot allocate memory for array");
zend_error(E_ERROR, "Cannot allocate memory for array");
return FAILURE;
}
arg->type = IS_ARRAY;
@@ -204,7 +201,7 @@ ZEND_API inline int _object_init_ex(zval *arg, zend_class_entry *class_type ZEND
zval *tmp;
if (!class_type->constants_updated) {
zend_hash_apply(&class_type->default_properties, (int (*)(void *)) zval_update_constant);
zend_hash_apply_with_argument(&class_type->default_properties, (int (*)(void *,void *)) zval_update_constant, (void *) 1);
class_type->constants_updated = 1;
}
@@ -709,36 +706,23 @@ ZEND_API int zend_startup_module(zend_module_entry *module)
}
ZEND_API int _register_list_destructors(void (*list_destructor)(void *), void (*plist_destructor)(void *), int module_number)
{
list_destructors_entry ld;
#if 0
printf("Registering destructors %d for module %d\n", list_destructors.nNextFreeElement, module_number);
#endif
ld.list_destructor=(void (*)(void *)) list_destructor;
ld.plist_destructor=(void (*)(void *)) plist_destructor;
ld.module_number = module_number;
ld.resource_id = list_destructors.nNextFreeElement;
if (zend_hash_next_index_insert(&list_destructors,(void *) &ld,sizeof(list_destructors_entry),NULL)==FAILURE) {
return FAILURE;
}
return list_destructors.nNextFreeElement-1;
}
/* registers all functions in *library_functions in the function hash */
int zend_register_functions(zend_function_entry *functions, HashTable *function_table)
int zend_register_functions(zend_function_entry *functions, HashTable *function_table, int type)
{
zend_function_entry *ptr = functions;
zend_function function;
zend_internal_function *internal_function = (zend_internal_function *)&function;
int count=0,unload=0;
HashTable *target_function_table = function_table;
int error_type;
CLS_FETCH();
if (type==MODULE_PERSISTENT) {
error_type = E_CORE_WARNING;
} else {
error_type = E_WARNING;
}
if (!target_function_table) {
target_function_table = CG(function_table);
}
@@ -749,7 +733,7 @@ int zend_register_functions(zend_function_entry *functions, HashTable *function_
internal_function->arg_types = ptr->func_arg_types;
internal_function->function_name = ptr->fname;
if (!internal_function->handler) {
zend_error(E_CORE_WARNING,"Null function defined as active function");
zend_error(error_type, "Null function defined as active function");
zend_unregister_functions(functions, count, target_function_table);
return FAILURE;
}
@@ -763,7 +747,7 @@ int zend_register_functions(zend_function_entry *functions, HashTable *function_
if (unload) { /* before unloading, display all remaining bad function in the module */
while (ptr->fname) {
if (zend_hash_exists(target_function_table, ptr->fname, strlen(ptr->fname)+1)) {
zend_error(E_CORE_WARNING, "Function registration failed - duplicate name - %s",ptr->fname);
zend_error(error_type, "Function registration failed - duplicate name - %s",ptr->fname);
}
ptr++;
}
@@ -805,7 +789,7 @@ ZEND_API int zend_register_module(zend_module_entry *module)
#if 0
zend_printf("%s: Registering module %d\n",module->name, module->module_number);
#endif
if (module->functions && zend_register_functions(module->functions, NULL)==FAILURE) {
if (module->functions && zend_register_functions(module->functions, NULL, module->type)==FAILURE) {
zend_error(E_CORE_WARNING,"%s: Unable to register functions, unable to load",module->name);
return FAILURE;
}
@@ -817,8 +801,10 @@ ZEND_API int zend_register_module(zend_module_entry *module)
void module_destructor(zend_module_entry *module)
{
if (module->type == MODULE_TEMPORARY) {
zend_hash_apply_with_argument(&list_destructors, (int (*)(void *,void *)) clean_module_resource_destructors, (void *) &(module->module_number));
zend_clean_module_rsrc_dtors(module->module_number);
clean_module_constants(module->module_number);
if (module->request_shutdown_func)
module->request_shutdown_func(module->type, module->module_number);
}
if (module->module_started && module->module_shutdown_func) {
@@ -887,8 +873,31 @@ int zend_next_free_module(void)
return ++module_count;
}
/* If parent_ce is not NULL then it inherits from parent_ce
* If parent_ce is NULL and parent_name isn't then it looks for the parent and inherits from it
* If both parent_ce and parent_name are NULL it does a regular class registration
* If parent_name is specified but not found NULL is returned
*/
ZEND_API zend_class_entry *zend_register_internal_class_ex(zend_class_entry *class_entry, zend_class_entry *parent_ce, char *parent_name)
{
zend_class_entry *register_class;
CLS_FETCH();
ZEND_API zend_class_entry *register_internal_class(zend_class_entry *class_entry)
if (!parent_ce && parent_name) {
if (zend_hash_find(CG(class_table), parent_name, strlen(parent_name)+1, (void **) &parent_ce)==FAILURE) {
return NULL;
}
}
register_class = zend_register_internal_class(class_entry);
if (parent_ce) {
do_inheritance(register_class, parent_ce);
}
return register_class;
}
ZEND_API zend_class_entry *zend_register_internal_class(zend_class_entry *class_entry)
{
zend_class_entry *register_class;
char *lowercase_name = zend_strndup(class_entry->name, class_entry->name_length);
@@ -906,7 +915,7 @@ ZEND_API zend_class_entry *register_internal_class(zend_class_entry *class_entry
if (class_entry->builtin_functions) {
zend_register_functions(class_entry->builtin_functions, &class_entry->function_table);
zend_register_functions(class_entry->builtin_functions, &class_entry->function_table, MODULE_PERSISTENT);
}
zend_hash_update(CG(class_table), lowercase_name, class_entry->name_length+1, class_entry, sizeof(zend_class_entry), (void **) &register_class);
@@ -939,9 +948,37 @@ ZEND_API int zend_set_hash_symbol(zval *symbol, char *name, int name_length,
va_start(symbol_table_list, num_symbol_tables);
while(num_symbol_tables-- > 0) {
symbol_table = va_arg(symbol_table_list, HashTable *);
zend_hash_update_ptr(symbol_table, name, name_length + 1, symbol, sizeof(zval *), NULL);
zend_hash_update(symbol_table, name, name_length + 1, &symbol, sizeof(zval *), NULL);
zval_add_ref(&symbol);
}
va_end(symbol_table_list);
return SUCCESS;
}
/* Disabled functions support */
static ZEND_FUNCTION(display_disabled_function)
{
zend_error(E_WARNING, "%s() has been disabled for security reasons.", get_active_function_name());
}
static zend_function_entry disabled_function[] = {
ZEND_FE(display_disabled_function, NULL)
{ NULL, NULL, NULL }
};
ZEND_API int zend_disable_function(char *function_name, uint function_name_length)
{
CLS_FETCH();
if (zend_hash_del(CG(function_table), function_name, function_name_length+1)==FAILURE) {
return FAILURE;
}
disabled_function[0].fname = function_name;
return zend_register_functions(disabled_function, CG(function_table), MODULE_PERSISTENT);
}
+66 -20
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -18,19 +18,64 @@
*/
#ifndef _ZEND_API_H
#define _ZEND_API_H
#ifndef ZEND_API_H
#define ZEND_API_H
#include "modules.h"
#include "zend_list.h"
#include "zend_fast_cache.h"
#include "zend_operators.h"
#include "zend_variables.h"
#include "zend_execute.h"
#define ZEND_FN(name) zend_if_##name
#define ZEND_NAMED_FUNCTION(name) void name(INTERNAL_FUNCTION_PARAMETERS)
#define ZEND_FUNCTION(name) ZEND_NAMED_FUNCTION(zend_if_##name)
#define ZEND_FUNCTION(name) ZEND_NAMED_FUNCTION(ZEND_FN(name))
#define ZEND_NAMED_FE(zend_name, name, arg_types) { #zend_name, name, arg_types },
#define ZEND_FE(name, arg_types) ZEND_NAMED_FE(name, ZEND_FN(name), arg_types)
#define ZEND_FALIAS(name, alias, arg_types) ZEND_NAMED_FE(name, ZEND_FN(alias), arg_types)
#define ZEND_MINIT(module) zend_minit_##module
#define ZEND_MSHUTDOWN(module) zend_mshutdown_##module
#define ZEND_RINIT(module) zend_rinit_##module
#define ZEND_RSHUTDOWN(module) zend_rshutdown_##module
#define ZEND_MINFO(module) zend_info_##module
#define ZEND_GINIT(module) zend_ginit_##module
#define ZEND_GSHUTDOWN(module) zend_gshutdown_##module
#define ZEND_MINIT_FUNCTION(module) int ZEND_MINIT(module)(INIT_FUNC_ARGS)
#define ZEND_MSHUTDOWN_FUNCTION(module) int ZEND_MSHUTDOWN(module)(SHUTDOWN_FUNC_ARGS)
#define ZEND_RINIT_FUNCTION(module) int ZEND_RINIT(module)(INIT_FUNC_ARGS)
#define ZEND_RSHUTDOWN_FUNCTION(module) int ZEND_RSHUTDOWN(module)(SHUTDOWN_FUNC_ARGS)
#define ZEND_MINFO_FUNCTION(module) void ZEND_MINFO(module)(ZEND_MODULE_INFO_FUNC_ARGS)
#define ZEND_GINIT_FUNCTION(module) int ZEND_GINIT(module)(GINIT_FUNC_ARGS)
#define ZEND_GSHUTDOWN_FUNCTION(module) int ZEND_GSHUTDOWN(module)(void)
#define ZEND_GET_MODULE(name) \
ZEND_DLEXPORT zend_module_entry *get_module(void) { return &name##_module_entry; }
#define ZEND_BEGIN_MODULE_GLOBALS(module_name) \
typedef struct _zend_##module_name##_globals {
#define ZEND_END_MODULE_GLOBALS(module_name) \
} zend_##module_name##_globals;
#ifdef ZTS
#define ZEND_DECLARE_MODULE_GLOBALS(module_name) \
static ts_rsrc_id module_name##_globals_id;
#define ZEND_INIT_MODULE_GLOBALS(module_name, globals_ctor, globals_dtor) \
module_name##_globals_id = ts_allocate_id(sizeof(zend_##module_name##_globals), (ts_allocate_ctor) globals_ctor, (ts_allocate_dtor) globals_dtor);
#else
#define ZEND_DECLARE_MODULE_GLOBALS(module_name) \
static zend_##module_name##_globals module_name##_globals;
#define ZEND_INIT_MODULE_GLOBALS(module_name, globals_ctor, globals_dtor) \
globals_ctor(&module_name##_globals);
#endif
#define ZEND_NAMED_FE(runtime_name, name, arg_types) { #runtime_name, name, arg_types },
#define ZEND_FE(name, arg_types) ZEND_NAMED_FE(name, zend_if_##name, arg_types)
#define INIT_CLASS_ENTRY(class_container, class_name, functions) \
@@ -64,25 +109,26 @@ ZEND_API int zend_get_parameters_array_ex(int param_count, zval ***argument_arra
ZEND_API int ParameterPassedByReference(int ht, uint n);
int zend_register_functions(zend_function_entry *functions, HashTable *function_table);
int zend_register_functions(zend_function_entry *functions, HashTable *function_table, int type);
void zend_unregister_functions(zend_function_entry *functions, int count, HashTable *function_table);
ZEND_API int zend_register_module(zend_module_entry *module_entry);
ZEND_API zend_class_entry *register_internal_class(zend_class_entry *class_entry);
ZEND_API zend_class_entry *zend_register_internal_class(zend_class_entry *class_entry);
ZEND_API zend_class_entry *zend_register_internal_class_ex(zend_class_entry *class_entry, zend_class_entry *parent_ce, char *parent_name);
ZEND_API zend_module_entry *zend_get_module(int module_number);
ZEND_API int zend_disable_function(char *function_name, uint function_name_length);
ZEND_API void wrong_param_count(void);
#define getThis() (this_ptr)
#define WRONG_PARAM_COUNT { wrong_param_count(); return; }
#define WRONG_PARAM_COUNT_WITH_RETVAL(ret) { wrong_param_count(); return ret; }
#define WRONG_PARAM_COUNT ZEND_WRONG_PARAM_COUNT()
#define WRONG_PARAM_COUNT_WITH_RETVAL(ret) ZEND_WRONG_PARAM_COUNT_WITH_RETVAL(ret)
#define ARG_COUNT(dummy) (ht)
#define ZEND_NUM_ARGS() (ht)
#define BYREF_NONE 0
#define BYREF_FORCE 1
#define BYREF_ALLOW 2
#define BYREF_FORCE_REST 3
#define ZEND_WRONG_PARAM_COUNT() { wrong_param_count(); return; }
#define ZEND_WRONG_PARAM_COUNT_WITH_RETVAL(ret) { wrong_param_count(); return ret; }
#ifndef ZEND_WIN32
#define DLEXPORT
@@ -132,7 +178,7 @@ ZEND_API int add_get_index_string(zval *arg, uint idx, char *str, void **dest, i
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_ptr, int param_count, zval *params[]);
ZEND_API int call_user_function_ex(HashTable *function_table, zval *object, zval *function_name, zval **retval_ptr_ptr, int param_count, zval **params[], int no_separation);
ZEND_API int call_user_function_ex(HashTable *function_table, zval *object, zval *function_name, zval **retval_ptr_ptr, int param_count, zval **params[], int no_separation, HashTable *symbol_table);
ZEND_API int add_property_long(zval *arg, char *key, long l);
ZEND_API int add_property_unset(zval *arg, char *key);
@@ -370,7 +416,7 @@ ZEND_API int zend_set_hash_symbol(zval *symbol, char *name, int name_length,
#define HASH_OF(p) ((p)->type==IS_ARRAY ? (p)->value.ht : (((p)->type==IS_OBJECT ? (p)->value.obj.properties : NULL)))
#define ZVAL_IS_NULL(z) ((z)->type==IS_NULL)
#endif /* _ZEND_API_H */
#endif /* ZEND_API_H */
/*
* Local variables:
+92 -34
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -50,12 +50,12 @@ ZEND_API zend_alloc_globals alloc_globals;
# if MEMORY_LIMIT
# if ZEND_DEBUG
#define CHECK_MEMORY_LIMIT(s) _CHECK_MEMORY_LIMIT(s, __zend_filename, __zend_lineno)
#define CHECK_MEMORY_LIMIT(s, rs) _CHECK_MEMORY_LIMIT(s, rs, __zend_filename, __zend_lineno)
# else
#define CHECK_MEMORY_LIMIT(s) _CHECK_MEMORY_LIMIT(s,NULL,0)
#define CHECK_MEMORY_LIMIT(s, rs) _CHECK_MEMORY_LIMIT(s, rs, NULL,0)
# endif
#define _CHECK_MEMORY_LIMIT(s,file,lineno) { AG(allocated_memory) += (s);\
#define _CHECK_MEMORY_LIMIT(s, rs, file, lineno) { AG(allocated_memory) += rs;\
if (AG(memory_limit)<AG(allocated_memory)) {\
if (!file) { \
zend_error(E_ERROR,"Allowed memory size of %d bytes exhausted (tried to allocate %d bytes)", AG(memory_limit),s); \
@@ -67,7 +67,7 @@ ZEND_API zend_alloc_globals alloc_globals;
# endif
#ifndef CHECK_MEMORY_LIMIT
#define CHECK_MEMORY_LIMIT(s)
#define CHECK_MEMORY_LIMIT(s, rs)
#endif
@@ -99,15 +99,30 @@ ZEND_API zend_alloc_globals alloc_globals;
} \
p->pLast = (zend_mem_header *) NULL;
#define DECLARE_CACHE_VARS \
unsigned int real_size; \
unsigned int cache_index;
#define REAL_SIZE(size) ((size+7) & ~0x7)
#define CALCULATE_REAL_SIZE_AND_CACHE_INDEX(size) \
real_size = REAL_SIZE(size); \
cache_index = real_size >> 3;
#define SIZE real_size
#define CACHE_INDEX cache_index
ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
zend_mem_header *p;
DECLARE_CACHE_VARS
ALS_FETCH();
if (!ZEND_DISABLE_MEMORY_CACHE && (size < MAX_CACHED_MEMORY) && (AG(cache_count)[size] > 0)) {
p = AG(cache)[size][--AG(cache_count)[size]];
CALCULATE_REAL_SIZE_AND_CACHE_INDEX(size);
if (!ZEND_DISABLE_MEMORY_CACHE && (CACHE_INDEX < MAX_CACHED_MEMORY) && (AG(cache_count)[CACHE_INDEX] > 0)) {
p = AG(cache)[CACHE_INDEX][--AG(cache_count)[CACHE_INDEX]];
#if ZEND_DEBUG
p->filename = __zend_filename;
p->lineno = __zend_lineno;
@@ -115,18 +130,22 @@ ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
p->orig_lineno = __zend_orig_lineno;
p->magic = MEM_BLOCK_START_MAGIC;
p->reported = 0;
AG(cache_stats)[size][1]++;
AG(cache_stats)[CACHE_INDEX][1]++;
#endif
p->persistent = 0;
p->cached = 0;
p->size = size;
HANDLE_BLOCK_INTERRUPTIONS();
ADD_POINTER_TO_LIST(p);
HANDLE_UNBLOCK_INTERRUPTIONS();
return (void *)((char *)p + sizeof(zend_mem_header) + PLATFORM_PADDING);
} else {
#if ZEND_DEBUG
if (size<MAX_CACHED_MEMORY) {
AG(cache_stats)[size][0]++;
if (CACHE_INDEX<MAX_CACHED_MEMORY) {
AG(cache_stats)[CACHE_INDEX][0]++;
}
#endif
p = (zend_mem_header *) malloc(sizeof(zend_mem_header) + size + PLATFORM_PADDING + END_ALIGNMENT(size) + END_MAGIC_SIZE);
p = (zend_mem_header *) malloc(sizeof(zend_mem_header) + SIZE + PLATFORM_PADDING + END_ALIGNMENT(SIZE) + END_MAGIC_SIZE);
}
HANDLE_BLOCK_INTERRUPTIONS();
@@ -143,7 +162,7 @@ ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
}
p->persistent = p->cached = 0;
ADD_POINTER_TO_LIST(p);
p->size = size;
p->size = size; /* Save real size for correct cache output */
#if ZEND_DEBUG
p->filename = __zend_filename;
p->lineno = __zend_lineno;
@@ -151,10 +170,10 @@ ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
p->orig_lineno = __zend_orig_lineno;
p->magic = MEM_BLOCK_START_MAGIC;
p->reported = 0;
*((long *)(((char *) p) + sizeof(zend_mem_header)+size+PLATFORM_PADDING+END_ALIGNMENT(size))) = MEM_BLOCK_END_MAGIC;
*((long *)(((char *) p) + sizeof(zend_mem_header)+SIZE+PLATFORM_PADDING+END_ALIGNMENT(SIZE))) = MEM_BLOCK_END_MAGIC;
#endif
#if MEMORY_LIMIT
CHECK_MEMORY_LIMIT(size);
CHECK_MEMORY_LIMIT(size, SIZE);
#endif
HANDLE_UNBLOCK_INTERRUPTIONS();
return (void *)((char *)p + sizeof(zend_mem_header) + PLATFORM_PADDING);
@@ -164,29 +183,34 @@ 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_mem_header *p = (zend_mem_header *) ((char *)ptr - sizeof(zend_mem_header) - PLATFORM_PADDING);
DECLARE_CACHE_VARS
ALS_FETCH();
CALCULATE_REAL_SIZE_AND_CACHE_INDEX(p->size);
#if ZEND_DEBUG
if (!_mem_block_check(ptr, 1 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC)) {
return;
}
memset(ptr, 0x5a, p->size);
memset(ptr, 0x5a, SIZE);
#endif
if (!ZEND_DISABLE_MEMORY_CACHE
&& !p->persistent && (p->size < MAX_CACHED_MEMORY) && (AG(cache_count)[p->size] < MAX_CACHED_ENTRIES)) {
AG(cache)[p->size][AG(cache_count)[p->size]++] = p;
&& !p->persistent && (CACHE_INDEX < MAX_CACHED_MEMORY) && (AG(cache_count)[CACHE_INDEX] < MAX_CACHED_ENTRIES)) {
AG(cache)[CACHE_INDEX][AG(cache_count)[CACHE_INDEX]++] = p;
p->cached = 1;
#if ZEND_DEBUG
p->magic = MEM_BLOCK_CACHED_MAGIC;
#endif
HANDLE_BLOCK_INTERRUPTIONS();
REMOVE_POINTER_FROM_LIST(p);
HANDLE_UNBLOCK_INTERRUPTIONS();
return;
}
HANDLE_BLOCK_INTERRUPTIONS();
REMOVE_POINTER_FROM_LIST(p);
#if MEMORY_LIMIT
AG(allocated_memory) -= p->size;
AG(allocated_memory) -= SIZE;
#endif
free(p);
@@ -198,14 +222,14 @@ ZEND_API void *_ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LI
{
void *p;
int final_size=size*nmemb;
HANDLE_BLOCK_INTERRUPTIONS();
p = _emalloc(final_size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
if (!p) {
HANDLE_UNBLOCK_INTERRUPTIONS();
return (void *) p;
}
memset(p,(int)NULL,final_size);
memset(p,(int)NULL, final_size);
HANDLE_UNBLOCK_INTERRUPTIONS();
return p;
}
@@ -215,14 +239,18 @@ ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure ZEND_FILE_LIN
{
zend_mem_header *p = (zend_mem_header *) ((char *)ptr-sizeof(zend_mem_header)-PLATFORM_PADDING);
zend_mem_header *orig = p;
DECLARE_CACHE_VARS
ALS_FETCH();
if (!ptr) {
return _emalloc(size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
}
CALCULATE_REAL_SIZE_AND_CACHE_INDEX(size);
HANDLE_BLOCK_INTERRUPTIONS();
REMOVE_POINTER_FROM_LIST(p);
p = (zend_mem_header *) realloc(p,sizeof(zend_mem_header)+size+PLATFORM_PADDING+END_ALIGNMENT(size)+END_MAGIC_SIZE);
p = (zend_mem_header *) realloc(p,sizeof(zend_mem_header)+SIZE+PLATFORM_PADDING+END_ALIGNMENT(SIZE)+END_MAGIC_SIZE);
if (!p) {
if (!allow_failure) {
fprintf(stderr,"FATAL: erealloc(): Unable to allocate %ld bytes\n", (long) size);
@@ -241,10 +269,10 @@ ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure ZEND_FILE_LIN
p->filename = __zend_filename;
p->lineno = __zend_lineno;
p->magic = MEM_BLOCK_START_MAGIC;
*((long *)(((char *) p) + sizeof(zend_mem_header)+size+PLATFORM_PADDING+END_ALIGNMENT(size))) = MEM_BLOCK_END_MAGIC;
*((long *)(((char *) p) + sizeof(zend_mem_header)+SIZE+PLATFORM_PADDING+END_ALIGNMENT(SIZE))) = MEM_BLOCK_END_MAGIC;
#endif
#if MEMORY_LIMIT
CHECK_MEMORY_LIMIT(size - p->size);
CHECK_MEMORY_LIMIT(size - p->size, SIZE - REAL_SIZE(p->size));
#endif
p->size = size;
@@ -319,6 +347,11 @@ ZEND_API int zend_set_memory_limit(unsigned int memory_limit)
ZEND_API void start_memory_manager(ALS_D)
{
#ifndef ZTS
int i, j;
void *cached_entries[MAX_CACHED_MEMORY][MAX_CACHED_ENTRIES];
#endif
AG(phead) = AG(head) = NULL;
#if MEMORY_LIMIT
@@ -327,27 +360,43 @@ ZEND_API void start_memory_manager(ALS_D)
AG(memory_exhausted)=0;
#endif
memset(AG(fast_cache_list_head), 0, sizeof(AG(fast_cache_list_head)));
memset(AG(cache_count),0,sizeof(AG(cache_count)));
#ifndef ZTS
/* Initialize cache, to prevent fragmentation */
/* We can't do this in ZTS mode, because calling emalloc() from within start_memory_manager()
* will yield an endless recursion calling to alloc_globals_ctor()
*/
for (i=1; i<MAX_CACHED_MEMORY; i++) {
for (j=0; j<PRE_INIT_CACHE_ENTRIES; j++) {
cached_entries[i][j] = emalloc(8*i);
}
}
for (i=1; i<MAX_CACHED_MEMORY; i++) {
for (j=0; j<PRE_INIT_CACHE_ENTRIES; j++) {
efree(cached_entries[i][j]);
}
}
#endif
#if ZEND_DEBUG
memset(AG(cache_stats), 0, sizeof(AG(cache_stats)));
memset(AG(fast_cache_stats), 0, sizeof(AG(fast_cache_stats)));
#endif
memset(AG(fast_cache_list_head), 0, sizeof(AG(fast_cache_list_head)));
memset(AG(cache_count),0,MAX_CACHED_MEMORY*sizeof(unsigned char));
}
ZEND_API void shutdown_memory_manager(int silent, int clean_cache)
{
zend_mem_header *p, *t;
int fci;
unsigned int fci, i, j;
#if ZEND_DEBUG
int had_leaks=0;
#endif
zend_fast_cache_list_entry *fast_cache_list_entry, *next_fast_cache_list_entry;
ALS_FETCH();
for (fci=0; fci<MAX_FAST_CACHE_TYPES; fci++) {
fast_cache_list_entry = AG(fast_cache_list_head)[fci];
while (fast_cache_list_entry) {
@@ -395,6 +444,14 @@ ZEND_API void shutdown_memory_manager(int silent, int clean_cache)
}
}
if(clean_cache) {
for (i=1; i<MAX_CACHED_MEMORY; i++) {
for (j=0; j<AG(cache_count)[i]; j++) {
free(AG(cache)[i][j]);
}
}
}
#if (ZEND_DEBUG)
do {
zval display_memory_cache_stats;
@@ -519,7 +576,7 @@ ZEND_API int _mem_block_check(void *ptr, int silent ZEND_FILE_LINE_DC ZEND_FILE_
if (valid_beginning
&& *((long *)(((char *) p)+sizeof(zend_mem_header)+p->size+PLATFORM_PADDING+END_ALIGNMENT(p->size))) != MEM_BLOCK_END_MAGIC) {
&& *((long *)(((char *) p)+sizeof(zend_mem_header)+REAL_SIZE(p->size)+PLATFORM_PADDING+END_ALIGNMENT(REAL_SIZE(p->size)))) != MEM_BLOCK_END_MAGIC) {
long magic_num = MEM_BLOCK_END_MAGIC;
char *overflow_ptr, *magic_ptr=(char *) &magic_num;
int overflows=0;
@@ -529,7 +586,7 @@ ZEND_API int _mem_block_check(void *ptr, int silent ZEND_FILE_LINE_DC ZEND_FILE_
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(zend_mem_header)+p->size+PLATFORM_PADDING;
overflow_ptr = ((char *) p)+sizeof(zend_mem_header)+REAL_SIZE(p->size)+PLATFORM_PADDING;
for (i=0; i<sizeof(long); i++) {
if (overflow_ptr[i]!=magic_ptr[i]) {
@@ -539,7 +596,7 @@ ZEND_API int _mem_block_check(void *ptr, int silent ZEND_FILE_LINE_DC ZEND_FILE_
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(zend_mem_header)+p->size+PLATFORM_PADDING+END_ALIGNMENT(p->size))), MEM_BLOCK_END_MAGIC);
*((long *)(((char *) p) + sizeof(zend_mem_header)+REAL_SIZE(p->size)+PLATFORM_PADDING+END_ALIGNMENT(REAL_SIZE(p->size)))), MEM_BLOCK_END_MAGIC);
zend_debug_alloc_output("%10s\t","");
if (overflows>=sizeof(long)) {
zend_debug_alloc_output("At least %d bytes overflown\n", sizeof(long));
@@ -592,7 +649,7 @@ ZEND_API void _full_mem_check(int silent ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_D
#endif
ZEND_API void _persist_alloc(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
ZEND_API int _persist_alloc(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
zend_mem_header *p = (zend_mem_header *) ((char *)ptr-sizeof(zend_mem_header)-PLATFORM_PADDING);
ALS_FETCH();
@@ -611,6 +668,7 @@ ZEND_API void _persist_alloc(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
/* add the block to the persistent list */
ADD_POINTER_TO_LIST(p);
HANDLE_UNBLOCK_INTERRUPTIONS();
return REAL_SIZE(p->size)+sizeof(zend_mem_header)+PLATFORM_PADDING;
}
+11 -9
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -18,15 +18,15 @@
*/
#ifndef _ALLOC_H
#define _ALLOC_H
#ifndef ZEND_ALLOC_H
#define ZEND_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_END_MAGIC 0x2A8FCC84L
#define MEM_BLOCK_FREED_MAGIC 0x99954317L
#define MEM_BLOCK_CACHED_MAGIC 0xFB8277DCL
@@ -52,8 +52,10 @@ typedef union _align_test {
long lng;
} align_test;
#define MAX_CACHED_MEMORY 64
#define MAX_CACHED_ENTRIES 16
#define MAX_CACHED_MEMORY 11
#define MAX_CACHED_ENTRIES 256
#define PRE_INIT_CACHE_ENTRIES 32
#if (defined (__GNUC__) && __GNUC__ >= 2)
#define PLATFORM_ALIGNMENT (__alignof__ (align_test))
#else
@@ -72,7 +74,7 @@ ZEND_API void *_ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LI
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);
ZEND_API int _persist_alloc(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
/* Standard wrapper macros */
#define emalloc(size) _emalloc((size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
+413 -52
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -21,8 +21,6 @@
#include "zend.h"
#include "zend_API.h"
#include "zend_builtin_functions.h"
#include "zend_operators.h"
#include "zend_variables.h"
#include "zend_constants.h"
#undef ZEND_TEST_EXCEPTIONS
@@ -35,6 +33,7 @@ static ZEND_FUNCTION(strlen);
static ZEND_FUNCTION(strcmp);
static ZEND_FUNCTION(strncmp);
static ZEND_FUNCTION(strcasecmp);
static ZEND_FUNCTION(strncasecmp);
static ZEND_FUNCTION(each);
static ZEND_FUNCTION(error_reporting);
static ZEND_FUNCTION(define);
@@ -48,11 +47,26 @@ static ZEND_FUNCTION(leak);
#ifdef ZEND_TEST_EXCEPTIONS
static ZEND_FUNCTION(crash);
#endif
static ZEND_FUNCTION(get_used_files);
static ZEND_FUNCTION(get_imported_files);
static ZEND_FUNCTION(get_required_files);
static ZEND_FUNCTION(get_included_files);
static ZEND_FUNCTION(is_subclass_of);
static ZEND_FUNCTION(get_class_vars);
static ZEND_FUNCTION(get_object_vars);
static ZEND_FUNCTION(get_class_methods);
static ZEND_FUNCTION(trigger_error);
static ZEND_FUNCTION(set_error_handler);
static ZEND_FUNCTION(restore_error_handler);
static ZEND_FUNCTION(get_declared_classes);
static ZEND_FUNCTION(create_function);
static ZEND_FUNCTION(get_resource_type);
#if ZEND_DEBUG
static ZEND_FUNCTION(zend_test_func);
#endif
extern unsigned char first_arg_force_ref[];
unsigned char first_arg_force_ref[] = { 1, BYREF_FORCE };
unsigned char first_arg_allow_ref[] = { 1, BYREF_ALLOW };
unsigned char second_arg_force_ref[] = { 2, BYREF_NONE, BYREF_FORCE };
unsigned char second_arg_allow_ref[] = { 2, BYREF_NONE, BYREF_ALLOW };
static zend_function_entry builtin_functions[] = {
ZEND_FE(zend_version, NULL)
@@ -63,6 +77,7 @@ static zend_function_entry builtin_functions[] = {
ZEND_FE(strcmp, NULL)
ZEND_FE(strncmp, NULL)
ZEND_FE(strcasecmp, NULL)
ZEND_FE(strncasecmp, NULL)
ZEND_FE(each, first_arg_force_ref)
ZEND_FE(error_reporting, NULL)
ZEND_FE(define, NULL)
@@ -76,16 +91,29 @@ static zend_function_entry builtin_functions[] = {
#ifdef ZEND_TEST_EXCEPTIONS
ZEND_FE(crash, NULL)
#endif
ZEND_FE(get_used_files, NULL)
ZEND_FE(get_imported_files, NULL)
ZEND_FE(get_required_files, NULL)
ZEND_FE(get_included_files, NULL)
ZEND_FE(is_subclass_of, NULL)
ZEND_FE(get_class_vars, NULL)
ZEND_FE(get_object_vars, NULL)
ZEND_FE(get_class_methods, NULL)
ZEND_FE(trigger_error, NULL)
ZEND_FALIAS(user_error, trigger_error, NULL)
ZEND_FE(set_error_handler, NULL)
ZEND_FE(restore_error_handler, NULL)
ZEND_FE(get_declared_classes, NULL)
ZEND_FE(create_function, NULL)
ZEND_FE(get_resource_type, NULL)
#if ZEND_DEBUG
ZEND_FE(zend_test_func, NULL)
#endif
{ NULL, NULL, NULL }
};
int zend_startup_builtin_functions()
{
return zend_register_functions(builtin_functions, NULL);
return zend_register_functions(builtin_functions, NULL, MODULE_PERSISTENT);
}
@@ -100,10 +128,13 @@ ZEND_FUNCTION(func_num_args)
void **p;
int arg_count;
p = EG(argument_stack).top_element-1;
p = EG(argument_stack).top_element-1-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;
p -= 1+arg_count;
if (*p) {
zend_error(E_ERROR, "func_num_args(): Can't be used as a function parameter");
}
--p;
if (p>=EG(argument_stack).elements) {
RETURN_LONG((ulong) *p);
} else {
@@ -127,10 +158,13 @@ ZEND_FUNCTION(func_get_arg)
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;
p = EG(argument_stack).top_element-1-1;
arg_count = (ulong) *p; /* this is the amount of arguments passed to func_get_arg(); */
p -= 1+arg_count;
if (*p) {
zend_error(E_ERROR, "func_get_arg(): Can't be used as a function parameter");
}
--p;
if (p<EG(argument_stack).elements) {
zend_error(E_WARNING, "func_get_arg(): Called from the global scope - no function context");
RETURN_FALSE;
@@ -154,10 +188,14 @@ ZEND_FUNCTION(func_get_args)
int arg_count;
int i;
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-1;
arg_count = (ulong) *p; /* this is the amount of arguments passed to func_get_args(); */
p -= 1+arg_count;
if (*p) {
zend_error(E_ERROR, "func_get_args(): Can't be used as a function parameter");
}
--p;
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;
@@ -185,7 +223,7 @@ ZEND_FUNCTION(strlen)
zval **str;
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
WRONG_PARAM_COUNT;
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(str);
RETVAL_LONG((*str)->value.str.len);
@@ -199,7 +237,7 @@ ZEND_FUNCTION(strcmp)
zval **s1, **s2;
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &s1, &s2) == FAILURE) {
WRONG_PARAM_COUNT;
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(s1);
convert_to_string_ex(s2);
@@ -214,7 +252,7 @@ ZEND_FUNCTION(strncmp)
zval **s1, **s2, **s3;
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &s1, &s2, &s3) == FAILURE) {
WRONG_PARAM_COUNT;
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(s1);
convert_to_string_ex(s2);
@@ -230,7 +268,7 @@ ZEND_FUNCTION(strcasecmp)
zval **s1, **s2;
if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, &s1, &s2) == FAILURE) {
WRONG_PARAM_COUNT;
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(s1);
convert_to_string_ex(s2);
@@ -238,6 +276,22 @@ ZEND_FUNCTION(strcasecmp)
}
/* }}} */
/* {{{ proto int strncasecmp(string str1, string str2, int len)
Binary safe string comparison */
ZEND_FUNCTION(strncasecmp)
{
zval **s1, **s2, **s3;
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &s1, &s2, &s3) == FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(s1);
convert_to_string_ex(s2);
convert_to_long_ex(s3);
RETURN_LONG(zend_binary_zval_strncasecmp(*s1,*s2,*s3));
}
/* }}} */
ZEND_FUNCTION(each)
{
zval **array,*entry,**entry_ptr, *tmp;
@@ -247,7 +301,7 @@ ZEND_FUNCTION(each)
HashTable *target_hash;
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) {
WRONG_PARAM_COUNT;
ZEND_WRONG_PARAM_COUNT();
}
target_hash = HASH_OF(*array);
if (!target_hash) {
@@ -271,7 +325,7 @@ ZEND_FUNCTION(each)
}
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);
zend_hash_update(return_value->value.ht, "value", sizeof("value"), &entry, sizeof(zval *), NULL);
entry->refcount++;
/* add the key elements */
@@ -305,10 +359,10 @@ ZEND_FUNCTION(error_reporting)
EG(error_reporting)=(*arg)->value.lval;
break;
default:
WRONG_PARAM_COUNT;
ZEND_WRONG_PARAM_COUNT();
break;
}
RETVAL_LONG(old_error_reporting);
}
@@ -337,9 +391,10 @@ ZEND_FUNCTION(define)
}
break;
default:
WRONG_PARAM_COUNT;
ZEND_WRONG_PARAM_COUNT();
break;
}
switch((*val)->type) {
case IS_LONG:
case IS_DOUBLE:
@@ -357,11 +412,14 @@ ZEND_FUNCTION(define)
c.value = **val;
zval_copy_ctor(&c.value);
c.flags = case_sensitive | ~CONST_PERSISTENT; /* non persistent */
c.flags = case_sensitive; /* non persistent */
c.name = zend_strndup((*var)->value.str.val, (*var)->value.str.len);
c.name_len = (*var)->value.str.len+1;
zend_register_constant(&c ELS_CC);
RETURN_TRUE;
if(zend_register_constant(&c ELS_CC) == SUCCESS) {
RETURN_TRUE;
} else {
RETURN_FALSE;
}
}
@@ -371,7 +429,7 @@ ZEND_FUNCTION(defined)
zval c;
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &var)==FAILURE) {
WRONG_PARAM_COUNT;
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(var);
@@ -384,14 +442,13 @@ ZEND_FUNCTION(defined)
}
/* {{{ proto string get_class(object object)
Retrieves the class name ...
*/
Retrieves the class name */
ZEND_FUNCTION(get_class)
{
zval **arg;
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &arg)==FAILURE) {
RETURN_FALSE;
ZEND_WRONG_PARAM_COUNT();
}
if ((*arg)->type != IS_OBJECT) {
RETURN_FALSE;
@@ -401,14 +458,13 @@ ZEND_FUNCTION(get_class)
/* }}} */
/* {{{ proto string get_parent_class(object object)
Retrieves the parent class name ...
*/
Retrieves the parent class name */
ZEND_FUNCTION(get_parent_class)
{
zval **arg;
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &arg)==FAILURE) {
RETURN_FALSE;
ZEND_WRONG_PARAM_COUNT();
}
if (((*arg)->type != IS_OBJECT) || !(*arg)->value.obj.ce->parent) {
RETURN_FALSE;
@@ -426,7 +482,7 @@ ZEND_FUNCTION(is_subclass_of)
zend_class_entry *parent_ce = NULL;
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &obj, &class_name)==FAILURE) {
RETURN_FALSE;
ZEND_WRONG_PARAM_COUNT();
}
if ((*obj)->type != IS_OBJECT) {
@@ -448,16 +504,105 @@ ZEND_FUNCTION(is_subclass_of)
}
/* }}} */
/* {{{ proto array get_class_vars(string class_name)
Returns an array of default properties of the class */
ZEND_FUNCTION(get_class_vars)
{
zval **class_name;
char *lcname;
zend_class_entry *ce;
zval *tmp;
CLS_FETCH();
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &class_name)==FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(class_name);
lcname = estrndup((*class_name)->value.str.val, (*class_name)->value.str.len);
zend_str_tolower(lcname, (*class_name)->value.str.len);
if (zend_hash_find(CG(class_table), lcname, (*class_name)->value.str.len+1, (void **)&ce)==FAILURE) {
efree(lcname);
RETURN_FALSE;
} else {
efree(lcname);
array_init(return_value);
zend_hash_copy(return_value->value.ht, &ce->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
}
}
/* }}} */
/* {{{ proto array get_object_vars(object obj)
Returns an array of object properties */
ZEND_FUNCTION(get_object_vars)
{
zval **obj;
zval *tmp;
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &obj) == FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
if ((*obj)->type != IS_OBJECT) {
RETURN_FALSE;
}
array_init(return_value);
zend_hash_copy(return_value->value.ht, (*obj)->value.obj.properties,
(copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
}
/* }}} */
/* {{{ proto array get_class_methods(string class_name)
Returns an array of class methods' names */
ZEND_FUNCTION(get_class_methods)
{
zval **class_name;
zval *method_name;
char *lcname;
zend_class_entry *ce;
char *string_key;
ulong num_key;
int key_type;
CLS_FETCH();
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &class_name)==FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(class_name);
lcname = estrndup((*class_name)->value.str.val, (*class_name)->value.str.len);
zend_str_tolower(lcname, (*class_name)->value.str.len);
if (zend_hash_find(CG(class_table), lcname, (*class_name)->value.str.len+1, (void **)&ce)==FAILURE) {
efree(lcname);
RETURN_NULL();
} else {
efree(lcname);
array_init(return_value);
zend_hash_internal_pointer_reset(&ce->function_table);
while ((key_type = zend_hash_get_current_key(&ce->function_table, &string_key, &num_key)) != HASH_KEY_NON_EXISTANT) {
if (key_type == HASH_KEY_IS_STRING) {
MAKE_STD_ZVAL(method_name);
ZVAL_STRING(method_name, string_key, 0);
zend_hash_next_index_insert(return_value->value.ht, &method_name, sizeof(zval *), NULL);
}
zend_hash_move_forward(&ce->function_table);
}
}
}
/* }}} */
/* {{{ proto bool method_exists(object object, string method)
Checks if the class method exists ...
*/
Checks if the class method exists */
ZEND_FUNCTION(method_exists)
{
zval **klass, **method_name;
char *lcname;
if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, &klass, &method_name)==FAILURE) {
RETURN_FALSE;
ZEND_WRONG_PARAM_COUNT();
}
if ((*klass)->type != IS_OBJECT) {
RETURN_FALSE;
@@ -476,8 +621,7 @@ ZEND_FUNCTION(method_exists)
/* }}} */
/* {{{ proto bool class_exists(string classname)
Checks if the class exists ...
*/
Checks if the class exists */
ZEND_FUNCTION(class_exists)
{
zval **class_name;
@@ -485,7 +629,7 @@ ZEND_FUNCTION(class_exists)
CLS_FETCH();
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &class_name)==FAILURE) {
RETURN_FALSE;
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(class_name);
lcname = estrndup((*class_name)->value.str.val, (*class_name)->value.str.len);
@@ -509,7 +653,7 @@ ZEND_FUNCTION(function_exists)
int retval;
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &function_name)==FAILURE) {
WRONG_PARAM_COUNT;
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(function_name);
lcname = estrndup((*function_name)->value.str.val, (*function_name)->value.str.len);
@@ -569,17 +713,234 @@ static int copy_import_use_file(zend_file_handle *fh, zval *array)
}
ZEND_FUNCTION(get_used_files)
/* {{{ proto array get_required_files(void)
Returns an array with the file names that were require_once()'d */
ZEND_FUNCTION(get_required_files)
{
CLS_FETCH();
if (ZEND_NUM_ARGS() != 0) {
ZEND_WRONG_PARAM_COUNT();
}
array_init(return_value);
zend_hash_apply_with_argument(&CG(used_files), (int (*)(void *, void *)) copy_import_use_file, return_value);
zend_hash_apply_with_argument(&CG(used_files), (apply_func_arg_t) copy_import_use_file, return_value);
}
/* }}} */
ZEND_FUNCTION(get_imported_files)
/* {{{ proto array get_included_files(void)
Returns an array with the file names that were include_once()'d */
ZEND_FUNCTION(get_included_files)
{
if (ZEND_NUM_ARGS() != 0) {
ZEND_WRONG_PARAM_COUNT();
}
array_init(return_value);
zend_hash_apply_with_argument(&EG(imported_files), (int (*)(void *, void *)) copy_import_use_file, return_value);
zend_hash_apply_with_argument(&EG(included_files), (apply_func_arg_t) copy_import_use_file, return_value);
}
/* }}} */
/* {{{ proto void trigger_error(string messsage [, int error_type])
Generates a user-level error/warning/notice message */
ZEND_FUNCTION(trigger_error)
{
int error_type = E_USER_NOTICE;
zval **z_error_type, **z_error_message;
switch(ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &z_error_message)==FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
break;
case 2:
if (zend_get_parameters_ex(2, &z_error_message, &z_error_type)==FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
convert_to_long_ex(z_error_type);
error_type = (*z_error_type)->value.lval;
switch (error_type) {
case E_USER_ERROR:
case E_USER_WARNING:
case E_USER_NOTICE:
break;
default:
zend_error(E_WARNING, "Invalid error type specified");
RETURN_FALSE;
break;
}
break;
}
convert_to_string_ex(z_error_message);
zend_error(error_type, (*z_error_message)->value.str.val);
RETURN_TRUE;
}
/* }}} */
/* {{{ proto string set_error_handler(string error_handler)
Sets a user-defined error handler function. Returns the previously defined error handler, or false on error */
ZEND_FUNCTION(set_error_handler)
{
zval **error_handler;
zend_bool had_orig_error_handler=0;
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &error_handler)==FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(error_handler);
if (EG(user_error_handler)) {
had_orig_error_handler = 1;
*return_value = *EG(user_error_handler);
zval_copy_ctor(return_value);
zend_ptr_stack_push(&EG(user_error_handlers), EG(user_error_handler));
}
ALLOC_ZVAL(EG(user_error_handler));
if (Z_STRLEN_PP(error_handler)==0) { /* unset user-defined handler */
FREE_ZVAL(EG(user_error_handler));
EG(user_error_handler) = NULL;
RETURN_TRUE;
}
*EG(user_error_handler) = **error_handler;
zval_copy_ctor(EG(user_error_handler));
if (!had_orig_error_handler) {
RETURN_NULL();
}
}
/* }}} */
/* {{{ proto void restore_error_handler(void)
Restores the previously defined error handler function */
ZEND_FUNCTION(restore_error_handler)
{
if (EG(user_error_handler)) {
zval_ptr_dtor(&EG(user_error_handler));
}
if (zend_ptr_stack_num_elements(&EG(user_error_handlers))==0) {
EG(user_error_handler) = NULL;
} else {
EG(user_error_handler) = zend_ptr_stack_pop(&EG(user_error_handlers));
}
RETURN_TRUE;
}
static int copy_class_name(zend_class_entry *ce, int num_args, va_list args, zend_hash_key *hash_key)
{
zval *array = va_arg(args, zval *);
if (hash_key->nKeyLength==0 || hash_key->arKey[0]!=0) {
add_next_index_stringl(array, ce->name, ce->name_length, 1);
}
return 0;
}
/* {{{ proto array get_declared_classes(void)
Returns an array of all declared classes. */
ZEND_FUNCTION(get_declared_classes)
{
CLS_FETCH();
if (ZEND_NUM_ARGS() != 0) {
ZEND_WRONG_PARAM_COUNT();
}
array_init(return_value);
zend_hash_apply_with_arguments(CG(class_table), (apply_func_args_t)copy_class_name, 1, return_value);
}
/* }}} */
#define LAMBDA_TEMP_FUNCNAME "__lambda_func"
/* {{{ proto string create_function(string args, string code)
Creates an anonymous function, and returns its name (funny, eh?) */
ZEND_FUNCTION(create_function)
{
char *eval_code, *function_name;
int eval_code_length, function_name_length;
zval **z_function_args, **z_function_code;
int retval;
CLS_FETCH();
if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, &z_function_args, &z_function_code)==FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(z_function_args);
convert_to_string_ex(z_function_code);
eval_code_length = sizeof("function " LAMBDA_TEMP_FUNCNAME)
+Z_STRLEN_PP(z_function_args)
+2 /* for the args parentheses */
+2 /* for the curly braces */
+Z_STRLEN_PP(z_function_code);
eval_code = (char *) emalloc(eval_code_length);
sprintf(eval_code, "function " LAMBDA_TEMP_FUNCNAME "(%s){%s}", Z_STRVAL_PP(z_function_args), Z_STRVAL_PP(z_function_code));
retval = zend_eval_string(eval_code, NULL CLS_CC ELS_CC);
efree(eval_code);
if (retval==SUCCESS) {
zend_function *func;
if (zend_hash_find(EG(function_table), LAMBDA_TEMP_FUNCNAME, sizeof(LAMBDA_TEMP_FUNCNAME), (void **) &func)==FAILURE) {
zend_error(E_ERROR, "Unexpected inconsistency in create_function()");
RETURN_FALSE;
}
function_add_ref(func);
function_name = (char *) emalloc(sizeof("0lambda_")+MAX_LENGTH_OF_LONG);
do {
sprintf(function_name, "%clambda_%d", 0, ++EG(lambda_count));
function_name_length = strlen(function_name+1)+1;
} while (zend_hash_add(EG(function_table), function_name, function_name_length+1, func, sizeof(zend_function), NULL)==FAILURE);
zend_hash_del(EG(function_table), LAMBDA_TEMP_FUNCNAME, sizeof(LAMBDA_TEMP_FUNCNAME));
RETURN_STRINGL(function_name, function_name_length, 0);
} else {
RETURN_FALSE;
}
}
/* }}} */
ZEND_FUNCTION(zend_test_func)
{
zval *arg1, *arg2;
zend_get_parameters(ht, 2, &arg1, &arg2);
}
ZEND_FUNCTION(get_resource_type)
{
char *resource_type;
zval **z_resource_type;
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &z_resource_type)==FAILURE) {
ZEND_WRONG_PARAM_COUNT();
}
if (Z_TYPE_PP(z_resource_type) != IS_RESOURCE) {
zend_error(E_WARNING, "Supplied argument is not a valid resource handle");
RETURN_FALSE;
}
resource_type = zend_rsrc_list_get_rsrc_type(Z_LVAL_PP(z_resource_type));
if (resource_type) {
RETURN_STRING(resource_type, 1);
} else {
RETURN_STRING("Unknown", 1);
}
}
+6 -6
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -18,9 +18,9 @@
*/
#ifndef _ZEND_BUILTIN_FUNCTIONS_H
#define _ZEND_BUILTIN_FUNCTIONS_H
#ifndef ZEND_BUILTIN_FUNCTIONS_H
#define ZEND_BUILTIN_FUNCTIONS_H
int zend_startup_builtin_functions(void);
#endif /* _ZEND_BUILTIN_FUNCTIONS_H */
#endif /* ZEND_BUILTIN_FUNCTIONS_H */
+132 -86
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -23,12 +23,10 @@
#include "zend_compile.h"
#include "zend_llist.h"
#include "zend_API.h"
#include "zend_variables.h"
#include "zend_operators.h"
#include "zend_fast_cache.h"
ZEND_API zend_op_array *(*zend_compile_files)(int mark_as_ref CLS_DC, int file_count, ...);
ZEND_API zend_op_array *(*zend_v_compile_files)(int type CLS_DC, int file_count, va_list files);
#ifndef ZTS
@@ -39,18 +37,6 @@ ZEND_API zend_executor_globals executor_globals;
#define SET_UNUSED(op) (op).op_type = IS_UNUSED
static int is_not_internal_function(zend_function *function)
{
return(function->type != ZEND_INTERNAL_FUNCTION);
}
static int is_not_internal_class(zend_class_entry *ce)
{
return(ce->type != ZEND_INTERNAL_CLASS);
}
static void free_filename(void *p)
{
efree(*((char **) p));
@@ -72,7 +58,7 @@ static void build_runtime_defined_function_key(zval *result, zval *name, zend_op
/* NULL, name length, filename length, line number length */
result->value.str.len = 1+name->value.str.len+strlen(filename)+lineno_len+1;
result->value.str.val = (char *) emalloc(result->value.str.len+1);
result->value.str.val = (char *) emalloc(result->value.str.len); /* Extra null byte is calculated a line before */
sprintf(result->value.str.val, "%c%s%s%s", '\0', name->value.str.val, filename, lineno_buf);
result->type = IS_STRING;
result->refcount = 1;
@@ -104,12 +90,9 @@ void init_compiler(CLS_D ELS_DC)
zend_llist_init(&CG(list_llist), sizeof(list_llist_element), NULL, 0);
zend_llist_init(&CG(dimension_llist), sizeof(int), NULL, 0);
zend_llist_init(&CG(filenames_list), sizeof(char *), free_filename, 0);
CG(short_tags) = ZEND_UV(short_tags);
CG(asp_tags) = ZEND_UV(asp_tags);
CG(allow_call_time_pass_reference) = ZEND_UV(allow_call_time_pass_reference);
CG(handle_op_arrays) = 1;
CG(in_compilation) = 0;
init_resource_list(ELS_C);
zend_init_rsrc_list(ELS_C);
CG(unclean_shutdown) = 0;
zend_llist_init(&CG(open_files), sizeof(zend_file_handle), (void (*)(void *)) zend_open_file_dtor, 0);
zend_hash_init(&CG(used_files), 5, NULL, (void (*)(void *)) zend_open_file_dtor_wrapper, 0);
@@ -126,8 +109,6 @@ void shutdown_compiler(CLS_D)
zend_stack_destroy(&CG(object_stack));
zend_stack_destroy(&CG(declare_stack));
zend_llist_destroy(&CG(filenames_list));
zend_hash_apply(CG(function_table), (int (*)(void *)) is_not_internal_function);
zend_hash_apply(CG(class_table), (int (*)(void *)) is_not_internal_class);
zend_llist_destroy(&CG(open_files));
zend_hash_destroy(&CG(used_files));
}
@@ -172,7 +153,7 @@ ZEND_API zend_bool zend_is_compiling()
}
static int get_temporary_variable(zend_op_array *op_array)
static zend_uint get_temporary_variable(zend_op_array *op_array)
{
return (op_array->T)++;
}
@@ -414,9 +395,8 @@ void do_for_cond(znode *expr, znode *second_semicolon_token CLS_DC)
zend_op *opline = get_next_op(CG(active_op_array) CLS_CC);
opline->opcode = ZEND_JMPZNZ;
opline->result = *expr; /* the conditional expression */
opline->op1 = *expr; /* the conditional expression */
second_semicolon_token->u.opline_num = for_cond_op_number;
SET_UNUSED(opline->op1);
SET_UNUSED(opline->op2);
}
@@ -427,7 +407,7 @@ void do_for_before_statement(znode *cond_start, znode *second_semicolon_token CL
opline->opcode = ZEND_JMP;
opline->op1.u.opline_num = cond_start->u.opline_num;
CG(active_op_array)->opcodes[second_semicolon_token->u.opline_num].op1.u.opline_num = get_next_op_number(CG(active_op_array));
CG(active_op_array)->opcodes[second_semicolon_token->u.opline_num].extended_value = get_next_op_number(CG(active_op_array));
SET_UNUSED(opline->op1);
SET_UNUSED(opline->op2);
@@ -536,8 +516,6 @@ void do_begin_variable_parse(CLS_D)
{
zend_llist fetch_list;
/* zend_llist_init(&fetch_list, sizeof(int), NULL, 0);
zend_stack_push(&CG(bp_stack), (void *) &fetch_list, sizeof(zend_llist));*/
zend_llist_init(&fetch_list, sizeof(zend_op), NULL, 0);
zend_stack_push(&CG(bp_stack), (void *) &fetch_list, sizeof(zend_llist));
}
@@ -587,6 +565,27 @@ void do_end_variable_parse(int type, int arg_offset CLS_DC)
}
static zend_bool is_method_call(CLS_D)
{
zend_llist *fetch_list_ptr;
zend_llist_element *cur;
zend_op *cur_opline;
zend_stack_top(&CG(bp_stack), (void **) &fetch_list_ptr);
cur = fetch_list_ptr->head;
/* There is always at least one node in the list */
while (cur->next) {
cur = cur->next;
}
cur_opline = (zend_op *)cur->data;
if (cur_opline->opcode == ZEND_FETCH_OBJ_W) {
return 1;
}
return 0;
}
void do_init_string(znode *result CLS_DC)
{
zend_op *opline = get_next_op(CG(active_op_array) CLS_CC);
@@ -681,7 +680,7 @@ void do_free(znode *op1 CLS_DC)
opline->result.u.EA.type |= EXT_TYPE_UNUSED;
} else {
while (opline>CG(active_op_array)->opcodes) {
/* This should be an object instanciation
/* This should be an object instantiation
* Find JMP_NO_CTOR, mark the preceding ASSIGN and the
* proceeding INIT_FCALL_BY_NAME as unused
*/
@@ -718,7 +717,7 @@ void do_begin_function_declaration(znode *function_token, znode *function_name,
function_token->u.op_array = CG(active_op_array);
zend_str_tolower(name, name_len);
init_op_array(&op_array, INITIAL_OP_ARRAY_SIZE);
init_op_array(&op_array, ZEND_USER_FUNCTION, INITIAL_OP_ARRAY_SIZE);
op_array.function_name = name;
op_array.arg_types = NULL;
@@ -767,6 +766,7 @@ void do_begin_function_declaration(znode *function_token, znode *function_name,
void do_end_function_declaration(znode *function_token CLS_DC)
{
do_extended_info(CLS_C);
do_return(NULL, 0 CLS_CC);
pass_two(CG(active_op_array));
CG(active_op_array) = function_token->u.op_array;
@@ -789,19 +789,21 @@ void do_receive_arg(int op, znode *var, znode *offset, znode *initialization, un
} else {
SET_UNUSED(opline->op2);
}
if (pass_type==BYREF_FORCE && !CG(active_op_array)->arg_types) {
int i;
if (!CG(active_op_array)->arg_types) {
if (pass_type==BYREF_FORCE) {
int i;
CG(active_op_array)->arg_types = (unsigned char *) emalloc(sizeof(unsigned char)*(offset->u.constant.value.lval+1));
for (i=1; i<offset->u.constant.value.lval; i++) {
CG(active_op_array)->arg_types[i] = BYREF_NONE;
CG(active_op_array)->arg_types = (unsigned char *) emalloc(sizeof(unsigned char)*(offset->u.constant.value.lval+1));
for (i=1; i<offset->u.constant.value.lval; i++) {
CG(active_op_array)->arg_types[i] = BYREF_NONE;
}
CG(active_op_array)->arg_types[0]=(unsigned char) offset->u.constant.value.lval;
CG(active_op_array)->arg_types[offset->u.constant.value.lval] = pass_type;
}
CG(active_op_array)->arg_types[0]=(unsigned char) offset->u.constant.value.lval;
}
if (CG(active_op_array)->arg_types) {
} else {
CG(active_op_array)->arg_types = (unsigned char *) erealloc(CG(active_op_array)->arg_types, sizeof(unsigned char)*(offset->u.constant.value.lval+1));
CG(active_op_array)->arg_types[0]=(unsigned char) offset->u.constant.value.lval;
CG(active_op_array)->arg_types[offset->u.constant.value.lval] = pass_type;
CG(active_op_array)->arg_types[0]++;
}
}
@@ -833,6 +835,7 @@ int do_begin_function_call(znode *function_name CLS_DC)
}
break;
}
do_extended_fcall_begin(CLS_C);
return 0;
}
@@ -840,20 +843,30 @@ int do_begin_function_call(znode *function_name CLS_DC)
void do_begin_dynamic_function_call(znode *function_name CLS_DC)
{
unsigned char *ptr = NULL;
int last_op_number = get_next_op_number(CG(active_op_array))-1;
int last_op_number;
zend_op *last_op;
if (last_op_number>=0 && CG(active_op_array)->opcodes[last_op_number].opcode == ZEND_FETCH_OBJ_R) {
CG(active_op_array)->opcodes[last_op_number].opcode = ZEND_INIT_FCALL_BY_NAME;
CG(active_op_array)->opcodes[last_op_number].extended_value = ZEND_MEMBER_FUNC_CALL;
if (function_name->op_type != IS_CONST && is_method_call(CLS_C)) {
do_end_variable_parse(BP_VAR_W, 0 CLS_CC);
last_op_number = get_next_op_number(CG(active_op_array))-1;
last_op = &CG(active_op_array)->opcodes[last_op_number];
last_op->opcode = ZEND_INIT_FCALL_BY_NAME;
last_op->extended_value = ZEND_MEMBER_FUNC_CALL;
} else {
zend_op *opline = get_next_op(CG(active_op_array) CLS_CC);
zend_op *opline;
if (function_name->op_type != IS_CONST) {
do_end_variable_parse(BP_VAR_R, 0 CLS_CC);
}
opline = get_next_op(CG(active_op_array) CLS_CC);
opline->opcode = ZEND_INIT_FCALL_BY_NAME;
opline->op2 = *function_name;
opline->extended_value = 0;
SET_UNUSED(opline->op1);
}
zend_stack_push(&CG(function_call_stack), (void *) &ptr, sizeof(zend_function *));
do_extended_fcall_begin(CLS_C);
}
@@ -864,6 +877,15 @@ void do_begin_class_member_function_call(znode *class_name, znode *function_name
opline->opcode = ZEND_INIT_FCALL_BY_NAME;
zend_str_tolower(class_name->u.constant.value.str.val, class_name->u.constant.value.str.len);
if ((class_name->u.constant.value.str.len == sizeof("parent")-1)
&& !memcmp(class_name->u.constant.value.str.val, "parent", sizeof("parent")-1)) {
if (!CG(active_class_entry) || !CG(active_class_entry)->parent) {
zend_error(E_COMPILE_ERROR, "No parent class available in this context");
}
efree(class_name->u.constant.value.str.val);
class_name->u.constant.value.str.len = CG(active_class_entry)->parent->name_length;
class_name->u.constant.value.str.val = estrndup(CG(active_class_entry)->parent->name, class_name->u.constant.value.str.len);
}
opline->op1 = *class_name;
opline->op2 = *function_name;
opline->extended_value = ZEND_MEMBER_FUNC_CALL;
@@ -908,9 +930,9 @@ void do_pass_param(znode *param, int op, int offset CLS_DC)
zend_error(E_COMPILE_WARNING,
"Call-time pass-by-reference has been deprecated - argument passed by value; "
"If you would like to pass it by reference, modify the declaration of %s(). "
"If you would like to enable call-time pass-by-reference, you can set"
"If you would like to enable call-time pass-by-reference, you can set "
"allow_call_time_pass_reference to true in your INI file. "
"However, future versions may not support this any longer.",
"However, future versions may not support this any longer. ",
(function_ptr?function_ptr->common.function_name:"[runtime function name]"),
offset+1);
}
@@ -978,7 +1000,7 @@ static int generate_free_switch_expr(zend_switch_entry *switch_entry CLS_DC)
{
zend_op *opline;
if (switch_entry->cond.op_type == IS_UNUSED) {
if (switch_entry->cond.op_type!=IS_VAR && switch_entry->cond.op_type!=IS_TMP_VAR) {
return 1;
}
@@ -995,7 +1017,7 @@ static int generate_free_foreach_copy(znode *foreach_copy CLS_DC)
{
zend_op *opline;
if (foreach_copy->op_type == IS_UNUSED) {
if (foreach_copy->op_type!=IS_VAR && foreach_copy->op_type!=IS_TMP_VAR) {
return 1;
}
@@ -1020,11 +1042,11 @@ void do_return(znode *expr, int do_end_vparse CLS_DC)
}
}
#ifdef ZTS
zend_stack_apply_with_argument(&CG(switch_cond_stack), (int (*)(void *element, void *)) generate_free_switch_expr, ZEND_STACK_APPLY_TOPDOWN CLS_CC);
zend_stack_apply_with_argument(&CG(foreach_copy_stack), (int (*)(void *element, void *)) generate_free_foreach_copy, ZEND_STACK_APPLY_TOPDOWN CLS_CC);
zend_stack_apply_with_argument(&CG(switch_cond_stack), ZEND_STACK_APPLY_TOPDOWN, (int (*)(void *element, void *)) generate_free_switch_expr CLS_CC);
zend_stack_apply_with_argument(&CG(foreach_copy_stack), ZEND_STACK_APPLY_TOPDOWN, (int (*)(void *element, void *)) generate_free_foreach_copy CLS_CC);
#else
zend_stack_apply(&CG(switch_cond_stack), (int (*)(void *element)) generate_free_switch_expr, ZEND_STACK_APPLY_TOPDOWN);
zend_stack_apply(&CG(foreach_copy_stack), (int (*)(void *element)) generate_free_foreach_copy, ZEND_STACK_APPLY_TOPDOWN);
zend_stack_apply(&CG(switch_cond_stack), ZEND_STACK_APPLY_TOPDOWN, (int (*)(void *element)) generate_free_switch_expr);
zend_stack_apply(&CG(foreach_copy_stack), ZEND_STACK_APPLY_TOPDOWN, (int (*)(void *element)) generate_free_foreach_copy);
#endif
opline = get_next_op(CG(active_op_array) CLS_CC);
@@ -1041,7 +1063,7 @@ void do_return(znode *expr, int do_end_vparse CLS_DC)
}
static void function_add_ref(zend_function *function)
ZEND_API void function_add_ref(zend_function *function)
{
if (function->type == ZEND_USER_FUNCTION) {
zend_op_array *op_array = &function->op_array;
@@ -1073,6 +1095,18 @@ static void do_inherit_parent_constructor(zend_class_entry *ce)
}
}
void do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce)
{
zend_function tmp_zend_function;
zval *tmp;
/* Perform inheritance */
zend_hash_merge(&ce->default_properties, &parent_ce->default_properties, (void (*)(void *)) zval_add_ref, (void *) &tmp, sizeof(zval *), 0);
zend_hash_merge(&ce->function_table, &parent_ce->function_table, (void (*)(void *)) function_add_ref, &tmp_zend_function, sizeof(zend_function), 0);
ce->parent = parent_ce;
do_inherit_parent_constructor(ce);
}
ZEND_API int do_bind_function_or_class(zend_op *opline, HashTable *function_table, HashTable *class_table, int compile_time)
{
@@ -1096,7 +1130,10 @@ ZEND_API int do_bind_function_or_class(zend_op *opline, HashTable *function_tabl
case ZEND_DECLARE_CLASS: {
zend_class_entry *ce;
zend_hash_find(class_table, opline->op1.u.constant.value.str.val, opline->op1.u.constant.value.str.len, (void **) &ce);
if (zend_hash_find(class_table, opline->op1.u.constant.value.str.val, opline->op1.u.constant.value.str.len, (void **) &ce)==FAILURE) {
zend_error(E_ERROR, "Internal Zend error - Missing class information for %s", opline->op1.u.constant.value.str.val);
return FAILURE;
}
(*ce->refcount)++;
if (zend_hash_add(class_table, opline->op2.u.constant.value.str.val, opline->op2.u.constant.value.str.len+1, ce, sizeof(zend_class_entry), NULL)==FAILURE) {
(*ce->refcount)--;
@@ -1111,36 +1148,41 @@ ZEND_API int do_bind_function_or_class(zend_op *opline, HashTable *function_tabl
break;
case ZEND_DECLARE_INHERITED_CLASS: {
zend_class_entry *ce, *parent_ce;
int parent_name_length;
char *class_name, *parent_name;
zend_function tmp_zend_function;
zval *tmp;
int found_ce;
zend_hash_find(class_table, opline->op1.u.constant.value.str.val, opline->op1.u.constant.value.str.len, (void **) &ce);
(*ce->refcount)++;
found_ce = zend_hash_find(class_table, opline->op1.u.constant.value.str.val, opline->op1.u.constant.value.str.len, (void **) &ce);
/* Restore base class / derived class names */
parent_name = opline->op2.u.constant.value.str.val;
class_name = strchr(opline->op2.u.constant.value.str.val, ':');
if (!class_name) {
zend_error(E_CORE_ERROR, "Invalid runtime class entry");
}
*class_name++ = 0;
class_name++;
if (found_ce==FAILURE) {
zend_error(E_ERROR, "Cannot redeclare class %s", class_name);
return FAILURE;
}
(*ce->refcount)++;
/* Obtain parent class */
if (zend_hash_find(class_table, parent_name, strlen(parent_name)+1, (void **) &parent_ce)==FAILURE) {
parent_name_length = class_name - opline->op2.u.constant.value.str.val - 1;
parent_name = estrndup(opline->op2.u.constant.value.str.val, parent_name_length);
if (zend_hash_find(class_table, parent_name, parent_name_length+1, (void **) &parent_ce)==FAILURE) {
if (!compile_time) {
zend_error(E_ERROR, "Class %s: Cannot inherit from undefined class %s", class_name, parent_name);
}
(*ce->refcount)--;
*(class_name-1) = ':';
efree(parent_name);
return FAILURE;
}
efree(parent_name);
/* Perform inheritance */
zend_hash_merge(&ce->default_properties, &parent_ce->default_properties, (void (*)(void *)) zval_add_ref, (void *) &tmp, sizeof(zval *), 0);
zend_hash_merge(&ce->function_table, &parent_ce->function_table, (void (*)(void *)) function_add_ref, &tmp_zend_function, sizeof(zend_function), 0);
ce->parent = parent_ce;
do_inherit_parent_constructor(ce);
do_inheritance(ce, parent_ce);
/* Register the derived class */
if (zend_hash_add(class_table, class_name, strlen(class_name)+1, ce, sizeof(zend_class_entry), NULL)==FAILURE) {
@@ -1183,6 +1225,8 @@ void do_early_binding(CLS_D)
zval_dtor(&opline->op1.u.constant);
zval_dtor(&opline->op2.u.constant);
opline->opcode = ZEND_NOP;
memset(&opline->op1, 0, sizeof(znode));
memset(&opline->op2, 0, sizeof(znode));
SET_UNUSED(opline->op1);
SET_UNUSED(opline->op2);
}
@@ -1321,7 +1365,7 @@ void do_switch_end(znode *case_list CLS_DC)
zend_stack_top(&CG(switch_cond_stack), (void **) &switch_entry_ptr);
if (case_list->u.opline_num != -1) { /* empty switch */
if (case_list->op_type != IS_UNUSED) { /* non-empty switch */
int next_op_number = get_next_op_number(CG(active_op_array));
CG(active_op_array)->opcodes[case_list->u.opline_num].op1.u.opline_num = next_op_number;
@@ -1342,11 +1386,13 @@ void do_switch_end(znode *case_list CLS_DC)
CG(active_op_array)->brk_cont_array[CG(active_op_array)->current_brk_cont].cont = CG(active_op_array)->brk_cont_array[CG(active_op_array)->current_brk_cont].brk = get_next_op_number(CG(active_op_array));
CG(active_op_array)->current_brk_cont = CG(active_op_array)->brk_cont_array[CG(active_op_array)->current_brk_cont].parent;
/* emit free for the switch condition*/
opline = get_next_op(CG(active_op_array) CLS_CC);
opline->opcode = ZEND_SWITCH_FREE;
opline->op1 = switch_entry_ptr->cond;
SET_UNUSED(opline->op2);
if (switch_entry_ptr->cond.op_type==IS_VAR || switch_entry_ptr->cond.op_type==IS_TMP_VAR) {
/* emit free for the switch condition*/
opline = get_next_op(CG(active_op_array) CLS_CC);
opline->opcode = ZEND_SWITCH_FREE;
opline->op1 = switch_entry_ptr->cond;
SET_UNUSED(opline->op2);
}
if (switch_entry_ptr->cond.op_type == IS_CONST) {
zval_dtor(&switch_entry_ptr->cond.u.constant);
}
@@ -1386,7 +1432,7 @@ void do_case_before_statement(znode *case_list, znode *case_token, znode *case_e
SET_UNUSED(opline->op2);
case_token->u.opline_num = next_op_number;
if (case_list->u.opline_num==-1) {
if (case_list->op_type==IS_UNUSED) {
return;
}
next_op_number = get_next_op_number(CG(active_op_array));
@@ -1445,7 +1491,7 @@ void do_default_before_statement(znode *case_list, znode *default_token CLS_DC)
switch_entry_ptr->default_case = next_op_number;
next_op_number = get_next_op_number(CG(active_op_array));
if (case_list->u.opline_num==-1) {
if (case_list->op_type==IS_UNUSED) {
return;
}
CG(active_op_array)->opcodes[case_list->u.opline_num].op1.u.opline_num = next_op_number;
@@ -1846,6 +1892,7 @@ void do_fetch_global_or_static_variable(znode *varname, znode *static_assignment
{
zend_op *opline = get_next_op(CG(active_op_array) CLS_CC);
znode lval;
znode result;
if (fetch_type==ZEND_FETCH_STATIC && static_assignment) {
zval *tmp;
@@ -1857,7 +1904,7 @@ void do_fetch_global_or_static_variable(znode *varname, znode *static_assignment
ALLOC_HASHTABLE(CG(active_op_array)->static_variables);
zend_hash_init(CG(active_op_array)->static_variables, 2, NULL, ZVAL_PTR_DTOR, 0);
}
zend_hash_update_ptr(CG(active_op_array)->static_variables, varname->u.constant.value.str.val, varname->u.constant.value.str.len+1, tmp, sizeof(zval *), NULL);
zend_hash_update(CG(active_op_array)->static_variables, varname->u.constant.value.str.val, varname->u.constant.value.str.len+1, &tmp, sizeof(zval *), NULL);
}
@@ -1868,14 +1915,14 @@ void do_fetch_global_or_static_variable(znode *varname, znode *static_assignment
opline->op1 = *varname;
SET_UNUSED(opline->op2);
opline->op2.u.fetch_type = fetch_type;
result = opline->result;
if (varname->op_type == IS_CONST) {
zval_copy_ctor(&varname->u.constant);
}
fetch_simple_variable(&lval, varname, 0 CLS_CC); /* Relies on the fact that the default fetch is BP_VAR_W */
do_assign_ref(NULL, &lval, &opline->result CLS_CC);
do_assign_ref(NULL, &lval, &result CLS_CC);
CG(active_op_array)->opcodes[CG(active_op_array)->last-1].result.u.EA.type |= EXT_TYPE_UNUSED;
}
@@ -1889,7 +1936,7 @@ void do_cast(znode *result, znode *expr, int type CLS_DC)
opline->result.u.var = get_temporary_variable(CG(active_op_array));
opline->op1 = *expr;
SET_UNUSED(opline->op2);
opline->op2.u.constant.type = type;
opline->extended_value = type;
*result = opline->result;
}
@@ -1911,11 +1958,11 @@ void do_include_or_eval(int type, znode *result, znode *op1 CLS_DC)
}
void do_require(znode *filename CLS_DC)
void do_require(znode *filename, zend_bool unique CLS_DC)
{
if (filename->op_type==IS_CONST
&& filename->u.constant.type==IS_STRING) {
require_filename(filename->u.constant.value.str.val CLS_CC);
require_filename(filename->u.constant.value.str.val, unique CLS_CC);
zval_dtor(&filename->u.constant);
} else {
znode result;
@@ -2283,7 +2330,6 @@ int zendlex(znode *zendlval CLS_DC)
case T_COMMENT:
case T_OPEN_TAG:
case T_WHITESPACE:
case T_PHP_TRACK_VARS:
retval = zendlex(zendlval CLS_CC);
break;
case T_CLOSE_TAG:
+149 -128
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -18,8 +18,8 @@
*/
#ifndef _COMPILE_H
#define _COMPILE_H
#ifndef ZEND_COMPILE_H
#define ZEND_COMPILE_H
#include "zend.h"
@@ -27,6 +27,10 @@
# include <stdarg.h>
#endif
#ifdef __cplusplus
#include <istream.h>
#endif
#include "zend_llist.h"
#define DEBUG_ZEND 0
@@ -58,20 +62,20 @@ typedef struct _znode {
union {
zval constant;
int var;
int opline_num;
int fetch_type;
zend_uint var;
zend_uint opline_num; /* Needs to be signed */
zend_uint fetch_type;
zend_op_array *op_array;
struct {
int var; /* dummy */
int type;
zend_uint var; /* dummy */
zend_uint type;
} EA;
} u;
} znode;
typedef struct _zend_op {
int opcode;
zend_uchar opcode;
znode result;
znode op1;
znode op2;
@@ -89,23 +93,22 @@ typedef struct _zend_brk_cont_element {
struct _zend_op_array {
int type; /* MUST be the first element of this struct! */
zend_uchar type; /* MUST be the first element of this struct! */
unsigned char *arg_types; /* MUST be the second element of this struct! */
zend_uchar *arg_types; /* MUST be the second element of this struct! */
char *function_name; /* MUST be the third element of this struct! */
int *refcount;
zend_uint *refcount;
zend_op *opcodes;
int last, size;
int T;
zend_uint last, size;
zend_uint T;
zend_brk_cont_element *brk_cont_array;
int last_brk_cont;
int current_brk_cont;
unsigned char uses_globals;
zend_uint last_brk_cont;
zend_uint current_brk_cont;
zend_bool uses_globals;
/* static variables support */
HashTable *static_variables;
@@ -116,31 +119,43 @@ struct _zend_op_array {
int backpatch_count;
#endif
zend_bool return_reference;
zend_bool done_pass_two;
void *reserved[ZEND_MAX_RESERVED_RESOURCES];
};
typedef struct _zend_internal_function {
int type; /* MUST be the first element of this struct! */
zend_uchar type; /* MUST be the first element of this struct! */
unsigned char *arg_types; /* MUST be the second element of this struct */
zend_uchar *arg_types; /* MUST be the second element of this struct */
char *function_name; /* MUST be the third element of this struct */
void (*handler)(INTERNAL_FUNCTION_PARAMETERS);
} zend_internal_function;
typedef struct _zend_overloaded_function {
zend_uchar type; /* MUST be the first element of this struct! */
zend_uchar *arg_types; /* MUST be the second element of this struct */
char *function_name; /* MUST be the third element of this struct */
zend_uint var;
} zend_overloaded_function;
typedef union _zend_function {
int type; /* MUST be the first element of this struct! */
zend_uchar type; /* MUST be the first element of this struct! */
struct {
int type; /* never used */
unsigned char *arg_types;
zend_uchar type; /* never used */
zend_uchar *arg_types;
char *function_name;
} common;
zend_op_array op_array;
zend_internal_function internal_function;
zend_overloaded_function overloaded_function;
} zend_function;
@@ -166,7 +181,7 @@ typedef struct _list_llist_element {
typedef struct _zend_file_handle {
int type;
zend_uchar type;
char *filename;
char *opened_path;
union {
@@ -180,7 +195,6 @@ typedef struct _zend_file_handle {
} zend_file_handle;
#include "zend_globals.h"
#define IS_CONST (1<<0)
#define IS_TMP_VAR (1<<1)
@@ -190,16 +204,19 @@ typedef struct _zend_file_handle {
#define EXT_TYPE_UNUSED (1<<0)
#include "zend_globals.h"
BEGIN_EXTERN_C()
void init_compiler(CLS_D ELS_DC);
void shutdown_compiler(CLS_D);
extern ZEND_API zend_op_array *(*zend_compile_files)(int mark_as_ref CLS_DC, int file_count, ...);
extern ZEND_API zend_op_array *(*zend_v_compile_files)(int type CLS_DC, int file_count, va_list files);
void zend_activate(CLS_D ELS_DC);
void zend_deactivate(CLS_D ELS_DC);
void zend_activate_modules();
void zend_activate_modules(void);
void zend_deactivate_modules(void);
int lex_scan(zval *zendlval CLS_DC);
@@ -274,6 +291,7 @@ void do_begin_class_member_function_call(znode *class_name, znode *function_name
void do_end_function_call(znode *function_name, znode *result, znode *argument_list, int is_method, int is_dynamic_fcall CLS_DC);
void do_return(znode *expr, int do_end_vparse CLS_DC);
ZEND_API int do_bind_function_or_class(zend_op *opline, HashTable *function_table, HashTable *class_table, int compile_time);
void do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce);
void do_early_binding(CLS_D);
void do_pass_param(znode *param, int op, int offset CLS_DC);
@@ -321,7 +339,7 @@ void do_new_list_end(CLS_D);
void do_cast(znode *result, znode *expr, int type CLS_DC);
void do_include_or_eval(int type, znode *result, znode *op1 CLS_DC);
void do_require(znode *filename CLS_DC);
void do_require(znode *filename, zend_bool unique CLS_DC);
void do_unset(znode *variable CLS_DC);
void do_isset_or_isempty(int type, znode *result, znode *variable CLS_DC);
@@ -351,19 +369,21 @@ void do_extended_fcall_end(CLS_D);
void do_ticks(CLS_D);
ZEND_API void function_add_ref(zend_function *function);
#define INITIAL_OP_ARRAY_SIZE 64
/* helper functions in zend-scanner.l */
ZEND_API int require_file(zend_file_handle *file_handle, zend_bool unique CLS_DC);
ZEND_API int require_filename(char *filename CLS_DC);
ZEND_API int require_filename(char *filename, zend_bool unique CLS_DC);
ZEND_API int use_filename(char *filename, uint filename_length CLS_DC);
ZEND_API zend_op_array *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 *zend_compile_files(int type CLS_DC, int file_count, ...);
ZEND_API zend_op_array *v_compile_files(int type CLS_DC, int file_count, va_list files);
ZEND_API zend_op_array *compile_string(zval *source_string CLS_DC);
ZEND_API zend_op_array *compile_filename(int mode, zval *filename CLS_DC ELS_DC);
ZEND_API zend_op_array *compile_filename(int type, zval *filename CLS_DC ELS_DC);
ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC);
ZEND_API void init_op_array(zend_op_array *op_array, int initial_ops_size);
ZEND_API void init_op_array(zend_op_array *op_array, int type, int initial_ops_size);
ZEND_API void destroy_op_array(zend_op_array *op_array);
ZEND_API void zend_close_file_handle(zend_file_handle *file_handle CLS_DC);
ZEND_API void zend_open_file_dtor(zend_file_handle *fh);
@@ -381,7 +401,7 @@ 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);
int pass_two(zend_op_array *op_array);
void pass_include_eval(zend_op_array *op_array);
ZEND_API void pass_include_eval(zend_op_array *op_array);
zend_brk_cont_element *get_next_brk_cont_element(zend_op_array *op_array);
ZEND_API zend_bool zend_is_compiling(void);
@@ -404,120 +424,121 @@ int zendlex(znode *zendlval CLS_DC);
#define ZEND_BOOL_NOT 13
#define ZEND_BOOL_XOR 14
#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_IS_NOT_IDENTICAL 16
#define ZEND_IS_EQUAL 17
#define ZEND_IS_NOT_EQUAL 18
#define ZEND_IS_SMALLER 19
#define ZEND_IS_SMALLER_OR_EQUAL 20
#define ZEND_CAST 21
#define ZEND_QM_ASSIGN 22
#define ZEND_ASSIGN_ADD 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_ASSIGN_ADD 23
#define ZEND_ASSIGN_SUB 24
#define ZEND_ASSIGN_MUL 25
#define ZEND_ASSIGN_DIV 26
#define ZEND_ASSIGN_MOD 27
#define ZEND_ASSIGN_SL 28
#define ZEND_ASSIGN_SR 29
#define ZEND_ASSIGN_CONCAT 30
#define ZEND_ASSIGN_BW_OR 31
#define ZEND_ASSIGN_BW_AND 32
#define ZEND_ASSIGN_BW_XOR 33
#define ZEND_PRE_INC 33
#define ZEND_PRE_DEC 34
#define ZEND_POST_INC 35
#define ZEND_POST_DEC 36
#define ZEND_ASSIGN 37
#define ZEND_ASSIGN_REF 38
#define ZEND_PRE_INC 34
#define ZEND_PRE_DEC 35
#define ZEND_POST_INC 36
#define ZEND_POST_DEC 37
#define ZEND_ASSIGN 38
#define ZEND_ASSIGN_REF 39
#define ZEND_ECHO 39
#define ZEND_PRINT 40
#define ZEND_ECHO 40
#define ZEND_PRINT 41
#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_JMP 42
#define ZEND_JMPZ 43
#define ZEND_JMPNZ 44
#define ZEND_JMPZNZ 45
#define ZEND_JMPZ_EX 46
#define ZEND_JMPNZ_EX 47
#define ZEND_CASE 48
#define ZEND_SWITCH_FREE 49
#define ZEND_BRK 50
#define ZEND_CONT 51
#define ZEND_BOOL 52
#define ZEND_INIT_STRING 52
#define ZEND_ADD_CHAR 53
#define ZEND_ADD_STRING 54
#define ZEND_ADD_VAR 55
#define ZEND_INIT_STRING 53
#define ZEND_ADD_CHAR 54
#define ZEND_ADD_STRING 55
#define ZEND_ADD_VAR 56
#define ZEND_BEGIN_SILENCE 56
#define ZEND_END_SILENCE 57
#define ZEND_BEGIN_SILENCE 57
#define ZEND_END_SILENCE 58
#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_INIT_FCALL_BY_NAME 59
#define ZEND_DO_FCALL 60
#define ZEND_DO_FCALL_BY_NAME 61
#define ZEND_RETURN 62
#define ZEND_RECV 62
#define ZEND_RECV_INIT 63
#define ZEND_RECV 63
#define ZEND_RECV_INIT 64
#define ZEND_SEND_VAL 64
#define ZEND_SEND_VAR 65
#define ZEND_SEND_REF 66
#define ZEND_SEND_VAL 65
#define ZEND_SEND_VAR 66
#define ZEND_SEND_REF 67
#define ZEND_NEW 67
#define ZEND_JMP_NO_CTOR 68
#define ZEND_FREE 69
#define ZEND_NEW 68
#define ZEND_JMP_NO_CTOR 69
#define ZEND_FREE 70
#define ZEND_INIT_ARRAY 70
#define ZEND_ADD_ARRAY_ELEMENT 71
#define ZEND_INIT_ARRAY 71
#define ZEND_ADD_ARRAY_ELEMENT 72
#define ZEND_INCLUDE_OR_EVAL 72
#define ZEND_INCLUDE_OR_EVAL 73
#define ZEND_UNSET_VAR 73
#define ZEND_UNSET_DIM_OBJ 74
#define ZEND_ISSET_ISEMPTY 75
#define ZEND_UNSET_VAR 74
#define ZEND_UNSET_DIM_OBJ 75
#define ZEND_ISSET_ISEMPTY 76
#define ZEND_FE_RESET 76
#define ZEND_FE_FETCH 77
#define ZEND_FE_RESET 77
#define ZEND_FE_FETCH 78
#define ZEND_EXIT 78
#define ZEND_EXIT 79
/* the following 18 opcodes are 6 groups of 3 opcodes each, and must
* remain in that order!
*/
#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_UNSET 94
#define ZEND_FETCH_DIM_UNSET 95
#define ZEND_FETCH_OBJ_UNSET 96
#define ZEND_FETCH_R 80
#define ZEND_FETCH_DIM_R 81
#define ZEND_FETCH_OBJ_R 82
#define ZEND_FETCH_W 83
#define ZEND_FETCH_DIM_W 84
#define ZEND_FETCH_OBJ_W 85
#define ZEND_FETCH_RW 86
#define ZEND_FETCH_DIM_RW 87
#define ZEND_FETCH_OBJ_RW 88
#define ZEND_FETCH_IS 89
#define ZEND_FETCH_DIM_IS 90
#define ZEND_FETCH_OBJ_IS 91
#define ZEND_FETCH_FUNC_ARG 92
#define ZEND_FETCH_DIM_FUNC_ARG 93
#define ZEND_FETCH_OBJ_FUNC_ARG 94
#define ZEND_FETCH_UNSET 95
#define ZEND_FETCH_DIM_UNSET 96
#define ZEND_FETCH_OBJ_UNSET 97
#define ZEND_FETCH_DIM_TMP_VAR 97
#define ZEND_FETCH_CONSTANT 98
#define ZEND_FETCH_DIM_TMP_VAR 98
#define ZEND_FETCH_CONSTANT 99
#define ZEND_DECLARE_FUNCTION_OR_CLASS 99
#define ZEND_DECLARE_FUNCTION_OR_CLASS 100
#define ZEND_EXT_STMT 100
#define ZEND_EXT_FCALL_BEGIN 101
#define ZEND_EXT_FCALL_END 102
#define ZEND_EXT_NOP 103
#define ZEND_EXT_STMT 101
#define ZEND_EXT_FCALL_BEGIN 102
#define ZEND_EXT_FCALL_END 103
#define ZEND_EXT_NOP 104
#define ZEND_TICKS 104
#define ZEND_TICKS 105
/* end of block */
@@ -549,7 +570,7 @@ int zendlex(znode *zendlval CLS_DC);
#define ZEND_EVAL (1<<0)
#define ZEND_INCLUDE (1<<1)
#define ZEND_IMPORT (1<<2)
#define ZEND_INCLUDE_ONCE (1<<2)
#define ZEND_REQUIRE (1<<3)
#define ZEND_ISSET (1<<0)
@@ -607,4 +628,4 @@ int zendlex(znode *zendlval CLS_DC);
END_EXTERN_C()
#endif /* _COMPILE_H */
#endif /* ZEND_COMPILE_H */
+26 -6
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -18,12 +18,13 @@
*/
#ifndef _ZEND_CONFIG_W32_H
#define _ZEND_CONFIG_W32_H
#ifndef ZEND_CONFIG_W32_H
#define ZEND_CONFIG_W32_H
#include <string.h>
#include <windows.h>
#include <float.h>
typedef unsigned long ulong;
typedef unsigned int uint;
@@ -41,6 +42,11 @@ typedef unsigned int uint;
#define HAVE_STDIOSTR_H 1
#define HAVE_CLASS_ISTDIOSTREAM
#define istdiostream stdiostream
#define HAVE_STDARG_H 1
#define HAVE_SNPRINTF 1
#define HAVE_VSNPRINTF 1
#define vsnprintf _vsnprintf
#ifdef inline
#undef inline
@@ -57,6 +63,7 @@ typedef unsigned int uint;
# define inline
#endif
#define zend_finite(A) _finite(A)
#ifdef LIBZEND_EXPORTS
# define ZEND_API __declspec(dllexport)
@@ -64,4 +71,17 @@ typedef unsigned int uint;
# define ZEND_API __declspec(dllimport)
#endif
#endif /* _ZEND_CONFIG_W32_H */
#define ZEND_DLEXPORT __declspec(dllexport)
/* 0x00200000L is MB_SERVICE_NOTIFICATION, which is only supported under Windows NT
* (and requires _WIN32_WINNT to be defined, which prevents the resulting executable
* from running under Windows 9x
* Windows 9x should silently ignore it, so it's being used here directly
*/
#ifndef MB_SERVICE_NOTIFICATION
#define MB_SERVICE_NOTIFICATION 0x00200000L
#endif
#define ZEND_SERVICE_MB_STYLE (MB_TOPMOST|MB_SERVICE_NOTIFICATION)
#endif /* ZEND_CONFIG_W32_H */
+17 -4
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -108,6 +108,9 @@ void zend_register_standard_constants(ELS_D)
REGISTER_MAIN_LONG_CONSTANT("E_CORE_WARNING", E_CORE_WARNING, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_COMPILE_ERROR", E_COMPILE_ERROR, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_COMPILE_WARNING", E_COMPILE_WARNING, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_USER_ERROR", E_USER_ERROR, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_USER_WARNING", E_USER_WARNING, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_USER_NOTICE", E_USER_NOTICE, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_ALL", E_ALL, CONST_PERSISTENT | CONST_CS);
@@ -131,6 +134,12 @@ void zend_register_standard_constants(ELS_D)
c.value.type = IS_BOOL;
zend_register_constant(&c ELS_CC);
c.name = zend_strndup(ZEND_STRL("ZEND_THREAD_SAFE"));
c.name_len = sizeof("ZEND_THREAD_SAFE");
c.value.value.lval = ZTS_V;
c.value.type = IS_BOOL;
zend_register_constant(&c ELS_CC);
c.name = zend_strndup(ZEND_STRL("NULL"));
c.name_len = sizeof("NULL");
c.value.type = IS_NULL;
@@ -230,9 +239,10 @@ ZEND_API int zend_get_constant(char *name, uint name_len, zval *result)
}
ZEND_API void zend_register_constant(zend_constant *c ELS_DC)
ZEND_API int zend_register_constant(zend_constant *c ELS_DC)
{
char *lowercase_name = zend_strndup(c->name, c->name_len);
int ret = SUCCESS;
#if 0
printf("Registering constant for module %d\n",c->module_number);
@@ -241,8 +251,11 @@ ZEND_API void zend_register_constant(zend_constant *c ELS_DC)
zend_str_tolower(lowercase_name, c->name_len);
if (zend_hash_add(EG(zend_constants), lowercase_name, c->name_len, (void *) c, sizeof(zend_constant), NULL)==FAILURE) {
zval_dtor(&c->value);
zend_error(E_NOTICE,"Constant %s already defined",lowercase_name);
ret = FAILURE;
}
free(lowercase_name);
return ret;
}
+6 -6
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -18,8 +18,8 @@
*/
#ifndef _CONSTANTS_H
#define _CONSTANTS_H
#ifndef ZEND_CONSTANTS_H
#define ZEND_CONSTANTS_H
#include "zend_globals.h"
@@ -55,7 +55,7 @@ ZEND_API void zend_register_long_constant(char *name, uint name_len, long lval,
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);
ZEND_API int zend_register_constant(zend_constant *c ELS_DC);
void zend_copy_constants(HashTable *target, HashTable *sourc);
void copy_zend_constant(zend_constant *c);
+3 -3
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+6 -6
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -18,8 +18,8 @@
*/
#ifndef _DYNAMIC_ARRAY_H
#define _DYNAMIC_ARRAY_H
#ifndef ZEND_DYNAMIC_ARRAY_H
#define ZEND_DYNAMIC_ARRAY_H
typedef struct _dynamic_array {
char *array;
@@ -35,4 +35,4 @@ ZEND_API void *zend_dynamic_array_pop(dynamic_array *da);
ZEND_API void *zend_dynamic_array_get_element(dynamic_array *da, unsigned int index);
END_EXTERN_C()
#endif /* _ZEND_DYNAMIC_ARRAY_H */
#endif /* ZEND_DYNAMIC_ARRAY_H */
+10 -7
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -18,8 +18,8 @@
*/
#ifndef _ZEND_ERRORS_H
#define _ZEND_ERRORS_H
#ifndef ZEND_ERRORS_H
#define ZEND_ERRORS_H
#define E_ERROR (1<<0L)
#define E_WARNING (1<<1L)
@@ -29,9 +29,12 @@
#define E_CORE_WARNING (1<<5L)
#define E_COMPILE_ERROR (1<<6L)
#define E_COMPILE_WARNING (1<<7L)
#define E_USER_ERROR (1<<8L)
#define E_USER_WARNING (1<<9L)
#define E_USER_NOTICE (1<<10L)
#define E_ALL (E_ERROR | E_WARNING | E_PARSE | E_NOTICE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING)
#define E_ALL (E_ERROR | E_WARNING | E_PARSE | E_NOTICE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE)
#define E_CORE (E_CORE_ERROR | E_CORE_WARNING)
#endif /* _ZEND_ERRORS_H */
#endif /* ZEND_ERRORS_H */
+214 -237
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -27,17 +27,11 @@
#include "zend_execute.h"
#include "zend_API.h"
#include "zend_ptr_stack.h"
#include "zend_variables.h"
#include "zend_operators.h"
#include "zend_constants.h"
#include "zend_extensions.h"
#include "zend_fast_cache.h"
#include "zend_execute_locks.h"
#if defined(HAVE_ALLOCA) && defined(HAVE_ALLOCA_H)
# include <alloca.h>
#endif
#define get_zval_ptr(node, Ts, should_free, type) _get_zval_ptr(node, Ts, should_free ELS_CC)
#define get_zval_ptr_ptr(node, Ts, type) _get_zval_ptr_ptr(node, Ts ELS_CC)
@@ -60,25 +54,17 @@
/* Prototypes */
static zval get_overloaded_property(ELS_D);
static void set_overloaded_property(zval *value ELS_DC);
static void call_overloaded_function(int arg_count, zval *return_value ELS_DC);
static inline void zend_fetch_var_address(znode *result, znode *op1, znode *op2, temp_variable *Ts, int type ELS_DC);
static inline void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2, temp_variable *Ts, int type ELS_DC);
static inline void zend_fetch_property_address(znode *result, znode *op1, znode *op2, temp_variable *Ts, int type ELS_DC);
static inline void zend_fetch_dimension_address_from_tmp_var(znode *result, znode *op1, znode *op2, temp_variable *Ts ELS_DC);
static zval get_overloaded_property(temp_variable *T ELS_DC);
static void set_overloaded_property(temp_variable *T, zval *value ELS_DC);
static void call_overloaded_function(temp_variable *T, int arg_count, zval *return_value ELS_DC);
static void zend_fetch_var_address(znode *result, znode *op1, znode *op2, temp_variable *Ts, int type ELS_DC);
static void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2, temp_variable *Ts, int type ELS_DC);
static void zend_fetch_property_address(znode *result, znode *op1, znode *op2, temp_variable *Ts, int type ELS_DC);
static void zend_fetch_dimension_address_from_tmp_var(znode *result, znode *op1, znode *op2, temp_variable *Ts ELS_DC);
static void zend_extension_statement_handler(zend_extension *extension, zend_op_array *op_array);
static void zend_extension_fcall_begin_handler(zend_extension *extension, zend_op_array *op_array);
static void zend_extension_fcall_end_handler(zend_extension *extension, zend_op_array *op_array);
#define SEPARATE_ON_READ_OBJECT(obj, _type) \
if ((obj) && ((_type) == BP_VAR_R) && ((*(obj))->type == IS_OBJECT)) { \
SEPARATE_ZVAL_IF_NOT_REF((obj)); \
(*(obj))->is_ref = 1; \
}
#define RETURN_VALUE_USED(opline) (!((opline)->result.u.EA.type & EXT_TYPE_UNUSED))
static inline zval *_get_zval_ptr(znode *node, temp_variable *Ts, int *should_free ELS_DC)
@@ -102,21 +88,21 @@ static inline zval *_get_zval_ptr(znode *node, temp_variable *Ts, int *should_fr
switch (Ts[node->u.var].EA.type) {
case IS_OVERLOADED_OBJECT:
Ts[node->u.var].tmp_var = get_overloaded_property(ELS_C);
Ts[node->u.var].tmp_var = get_overloaded_property(&Ts[node->u.var] ELS_CC);
Ts[node->u.var].tmp_var.refcount=1;
Ts[node->u.var].tmp_var.is_ref=1;
return &Ts[node->u.var].tmp_var;
break;
case IS_STRING_OFFSET: {
temp_variable *T = &Ts[node->u.var];
zval *str = T->EA.str;
zval *str = T->EA.data.str_offset.str;
if (T->EA.str->type != IS_STRING
|| (T->EA.str->value.str.len <= T->EA.offset)) {
if (T->EA.data.str_offset.str->type != IS_STRING
|| (T->EA.data.str_offset.str->value.str.len <= T->EA.data.str_offset.offset)) {
T->tmp_var.value.str.val = empty_string;
T->tmp_var.value.str.len = 0;
} else {
char c = str->value.str.val[T->EA.offset];
char c = str->value.str.val[T->EA.data.str_offset.offset];
T->tmp_var.value.str.val = estrndup(&c, 1);
T->tmp_var.value.str.len = 1;
@@ -148,13 +134,14 @@ static inline zval *_get_object_zval_ptr(znode *node, temp_variable *Ts, int *sh
return &Ts[node->u.var].tmp_var;
break;
case IS_VAR:
if (Ts[node->u.var].var.ptr) {
PZVAL_UNLOCK(Ts[node->u.var].var.ptr);
if (Ts[node->u.var].var.ptr_ptr) {
PZVAL_UNLOCK(*Ts[node->u.var].var.ptr_ptr);
*should_free = 0;
return Ts[node->u.var].var.ptr;
SEPARATE_ZVAL_IF_NOT_REF(Ts[node->u.var].var.ptr_ptr);
return *Ts[node->u.var].var.ptr_ptr;
} else {
if (Ts[node->u.var].EA.type==IS_STRING_OFFSET) {
PZVAL_UNLOCK(Ts[node->u.var].EA.str);
PZVAL_UNLOCK(Ts[node->u.var].EA.data.str_offset.str);
}
*should_free = 1;
return NULL;
@@ -175,7 +162,7 @@ static inline zval **_get_zval_ptr_ptr(znode *node, temp_variable *Ts ELS_DC)
if (Ts[node->u.var].var.ptr_ptr) {
PZVAL_UNLOCK(*Ts[node->u.var].var.ptr_ptr);
} else if (Ts[node->u.var].EA.type==IS_STRING_OFFSET) {
PZVAL_UNLOCK(Ts[node->u.var].EA.str);
PZVAL_UNLOCK(Ts[node->u.var].EA.data.str_offset.str);
}
return Ts[node->u.var].var.ptr_ptr;
} else {
@@ -222,7 +209,7 @@ static inline zval **zend_fetch_property_address_inner(HashTable *ht, znode *op2
zval *new_zval = &EG(uninitialized_zval);
new_zval->refcount++;
zend_hash_update_ptr(ht, prop_ptr->value.str.val, prop_ptr->value.str.len+1, new_zval, sizeof(zval *), (void **) &retval);
zend_hash_update(ht, prop_ptr->value.str.val, prop_ptr->value.str.len+1, &new_zval, sizeof(zval *), (void **) &retval);
}
break;
EMPTY_SWITCH_DEFAULT_CASE()
@@ -268,7 +255,7 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
if (!variable_ptr_ptr) {
switch (Ts[op1->u.var].EA.type) {
case IS_OVERLOADED_OBJECT:
set_overloaded_property(value ELS_CC);
set_overloaded_property(&Ts[op1->u.var], value ELS_CC);
if (type == IS_TMP_VAR) {
zval_dtor(value);
}
@@ -276,8 +263,8 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
case IS_STRING_OFFSET: {
temp_variable *T = &Ts[op1->u.var];
if (T->EA.str->type == IS_STRING
&& (T->EA.offset < T->EA.str->value.str.len)) {
if (T->EA.data.str_offset.str->type == IS_STRING
&& (T->EA.data.str_offset.offset < T->EA.data.str_offset.str->value.str.len)) {
zval tmp;
zval *final_value = value;
@@ -290,7 +277,7 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
final_value = &tmp;
}
T->EA.str->value.str.val[T->EA.offset] = final_value->value.str.val[0];
T->EA.data.str_offset.str->value.str.val[T->EA.data.str_offset.offset] = final_value->value.str.val[0];
if (op2
&& op2->op_type == IS_VAR
&& value==&Ts[op2->u.var].tmp_var) {
@@ -301,10 +288,10 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
}
/*
* the value of an assignment to a string offset is undefined
Ts[result->u.var].var = &T->EA.str;
Ts[result->u.var].var = &T->EA.data.str_offset.str;
*/
}
/* zval_ptr_dtor(&T->EA.str); Nuke this line if it doesn't cause a leak */
/* zval_ptr_dtor(&T->EA.data.str_offset.str); Nuke this line if it doesn't cause a leak */
T->tmp_var.type = IS_STRING;
}
break;
@@ -353,16 +340,6 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
if (variable_ptr->refcount==0) {
switch (type) {
case IS_VAR:
/*
if (PZVAL_IS_LOCKED(value)) {
zval *orig_value = value;
ALLOC_ZVAL(value);
*value = *orig_value;
value->refcount=0;
zval_copy_ctor(value);
}
*/
/* break missing intentionally */
case IS_CONST:
if (variable_ptr==value) {
@@ -392,16 +369,6 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
} else { /* we need to split */
switch (type) {
case IS_VAR:
/*
if (PZVAL_IS_LOCKED(value)) {
zval *orig_value = value;
ALLOC_ZVAL(value);
*value = *orig_value;
value->refcount=0;
zval_copy_ctor(value);
}
*/
/* break missing intentionally */
case IS_CONST:
if (PZVAL_IS_REF(value) && value->refcount > 0) {
@@ -464,7 +431,7 @@ static void print_refcount(zval *p, char *str)
}
static inline void zend_fetch_var_address(znode *result, znode *op1, znode *op2, temp_variable *Ts, int type ELS_DC)
static void zend_fetch_var_address(znode *result, znode *op1, znode *op2, temp_variable *Ts, int type ELS_DC)
{
int free_op1;
zval *varname = get_zval_ptr(op1, Ts, &free_op1, BP_VAR_R);
@@ -513,7 +480,7 @@ static inline void zend_fetch_var_address(znode *result, znode *op1, znode *op2,
zval *new_zval = &EG(uninitialized_zval);
new_zval->refcount++;
zend_hash_update_ptr(target_symbol_table, varname->value.str.val, varname->value.str.len+1, new_zval, sizeof(zval *), (void **) &retval);
zend_hash_update(target_symbol_table, varname->value.str.val, varname->value.str.len+1, &new_zval, sizeof(zval *), (void **) &retval);
}
break;
EMPTY_SWITCH_DEFAULT_CASE()
@@ -522,14 +489,13 @@ static inline void zend_fetch_var_address(znode *result, znode *op1, znode *op2,
if (op2->u.fetch_type == ZEND_FETCH_LOCAL) {
FREE_OP(op1, free_op1);
} else if (op2->u.fetch_type == ZEND_FETCH_STATIC) {
zval_update_constant(retval);
zval_update_constant(retval, (void *) 1);
}
if (varname == &tmp_varname) {
zval_dtor(varname);
}
Ts[result->u.var].var.ptr_ptr = retval;
SEPARATE_ON_READ_OBJECT(retval, type);
SELECTIVE_PZVAL_LOCK(*retval, result);
}
@@ -567,7 +533,7 @@ fetch_string_dim:
zval *new_zval = &EG(uninitialized_zval);
new_zval->refcount++;
zend_hash_update_ptr(ht, offset_key, offset_key_length+1, new_zval, sizeof(zval *), (void **) &retval);
zend_hash_update(ht, offset_key, offset_key_length+1, &new_zval, sizeof(zval *), (void **) &retval);
}
break;
}
@@ -620,7 +586,7 @@ fetch_string_dim:
}
static inline void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2, temp_variable *Ts, int type ELS_DC)
static void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2, temp_variable *Ts, int type ELS_DC)
{
int free_op2;
zval **container_ptr = get_zval_ptr_ptr(op1, Ts, type);
@@ -629,7 +595,6 @@ static inline void zend_fetch_dimension_address(znode *result, znode *op1, znode
if (container_ptr == NULL) {
zend_property_reference *property_reference;
zend_overloaded_element overloaded_element;
if (Ts[op1->u.var].EA.type == IS_STRING_OFFSET) {
@@ -655,9 +620,8 @@ static inline void zend_fetch_dimension_address(znode *result, znode *op1, znode
zval_copy_ctor(&overloaded_element.element);
}
zend_stack_top(&EG(overloaded_objects_stack), (void **) &property_reference);
zend_llist_add_element(&property_reference->elements_list, &overloaded_element);
Ts[result->u.var].EA = Ts[op1->u.var].EA;
zend_llist_add_element(Ts[result->u.var].EA.data.overloaded_element.elements_list, &overloaded_element);
Ts[result->u.var].EA.type = IS_OVERLOADED_OBJECT;
*retval = NULL;
@@ -672,18 +636,14 @@ static inline void zend_fetch_dimension_address(znode *result, znode *op1, znode
}
if (container->type==IS_NULL
|| (container->type==IS_BOOL && container->value.lval==0)
|| (container->type==IS_STRING && container->value.str.len==0)) {
switch (type) {
case BP_VAR_RW:
case BP_VAR_W:
if (!PZVAL_IS_REF(container)) {
container->refcount--;
if (container->refcount>0) {
ALLOC_ZVAL(container);
*container_ptr = container;
container->is_ref=0;
}
container->refcount=1;
SEPARATE_ZVAL(container_ptr);
container = *container_ptr;
}
array_init(container);
break;
@@ -693,22 +653,17 @@ static inline void zend_fetch_dimension_address(znode *result, znode *op1, znode
switch (container->type) {
case IS_ARRAY:
if ((type==BP_VAR_W || type==BP_VAR_RW) && container->refcount>1 && !PZVAL_IS_REF(container)) {
container->refcount--;
ALLOC_ZVAL(*container_ptr);
**container_ptr = *container;
SEPARATE_ZVAL(container_ptr);
container = *container_ptr;
INIT_PZVAL(container);
zendi_zval_copy_ctor(*container);
}
if (op2->op_type == IS_UNUSED) {
zval *new_zval = &EG(uninitialized_zval);
new_zval->refcount++;
zend_hash_next_index_insert_ptr(container->value.ht, new_zval, sizeof(zval *), (void **) retval);
zend_hash_next_index_insert(container->value.ht, &new_zval, sizeof(zval *), (void **) retval);
} else {
*retval = zend_fetch_dimension_address_inner(container->value.ht, op2, Ts, type ELS_CC);
}
SEPARATE_ON_READ_OBJECT(*retval, type);
SELECTIVE_PZVAL_LOCK(**retval, result);
break;
case IS_NULL:
@@ -717,6 +672,9 @@ static inline void zend_fetch_dimension_address(znode *result, znode *op1, znode
*retval = &EG(uninitialized_zval_ptr);
SELECTIVE_PZVAL_LOCK(**retval, result);
FREE_OP(op2, free_op2);
if (type==BP_VAR_W || type==BP_VAR_RW) {
zend_error(E_WARNING, "Cannot use a NULL value as an array");
}
break;
case IS_STRING: {
zval *offset;
@@ -738,9 +696,9 @@ static inline void zend_fetch_dimension_address(znode *result, znode *op1, znode
SEPARATE_ZVAL_IF_NOT_REF(container_ptr);
}
container = *container_ptr;
Ts[result->u.var].EA.str = container;
Ts[result->u.var].EA.data.str_offset.str = container;
PZVAL_LOCK(container);
Ts[result->u.var].EA.offset = offset->value.lval;
Ts[result->u.var].EA.data.str_offset.offset = offset->value.lval;
Ts[result->u.var].EA.type = IS_STRING_OFFSET;
FREE_OP(op2, free_op2);
*retval = NULL;
@@ -758,13 +716,16 @@ static inline void zend_fetch_dimension_address(znode *result, znode *op1, znode
}
FREE_OP(op2, free_op2);
SELECTIVE_PZVAL_LOCK(**retval, result);
if (type==BP_VAR_W || type==BP_VAR_RW) {
zend_error(E_WARNING, "Cannot use a scalar value as an array");
}
}
break;
}
}
static inline void zend_fetch_dimension_address_from_tmp_var(znode *result, znode *op1, znode *op2, temp_variable *Ts ELS_DC)
static void zend_fetch_dimension_address_from_tmp_var(znode *result, znode *op1, znode *op2, temp_variable *Ts ELS_DC)
{
int free_op1;
zval *container = get_zval_ptr(op1, Ts, &free_op1, BP_VAR_R);
@@ -780,7 +741,7 @@ static inline void zend_fetch_dimension_address_from_tmp_var(znode *result, znod
}
static inline void zend_fetch_property_address(znode *result, znode *op1, znode *op2, temp_variable *Ts, int type ELS_DC)
static void zend_fetch_property_address(znode *result, znode *op1, znode *op2, temp_variable *Ts, int type ELS_DC)
{
int free_op2;
zval **container_ptr = get_zval_ptr_ptr(op1, Ts, type);
@@ -789,11 +750,10 @@ static inline void zend_fetch_property_address(znode *result, znode *op1, znode
if (container_ptr == NULL) {
zend_property_reference *property_reference;
zend_overloaded_element overloaded_element;
if (Ts[op1->u.var].EA.type == IS_STRING_OFFSET) {
zval_ptr_dtor(&Ts[op1->u.var].EA.str);
zval_ptr_dtor(&Ts[op1->u.var].EA.data.str_offset.str);
switch (type) {
case BP_VAR_R:
case BP_VAR_IS:
@@ -815,9 +775,8 @@ static inline void zend_fetch_property_address(znode *result, znode *op1, znode
zval_copy_ctor(&overloaded_element.element);
}
zend_stack_top(&EG(overloaded_objects_stack), (void **) &property_reference);
zend_llist_add_element(&property_reference->elements_list, &overloaded_element);
Ts[result->u.var].EA = Ts[op1->u.var].EA;
zend_llist_add_element(Ts[result->u.var].EA.data.overloaded_element.elements_list, &overloaded_element);
Ts[result->u.var].EA.type = IS_OVERLOADED_OBJECT;
*retval = NULL;
@@ -833,38 +792,33 @@ static inline void zend_fetch_property_address(znode *result, znode *op1, znode
if (container->type == IS_OBJECT
&& container->value.obj.ce->handle_property_get) {
zend_property_reference property_reference;
zend_overloaded_element overloaded_element;
property_reference.object = container;
property_reference.type = type;
zend_llist_init(&property_reference.elements_list, sizeof(zend_overloaded_element), NULL, 0);
Ts[result->u.var].EA.data.overloaded_element.object = container;
Ts[result->u.var].EA.data.overloaded_element.type = type;
Ts[result->u.var].EA.data.overloaded_element.elements_list = (zend_llist *) emalloc(sizeof(zend_llist));
zend_llist_init(Ts[result->u.var].EA.data.overloaded_element.elements_list, sizeof(zend_overloaded_element), NULL, 0);
overloaded_element.element = *get_zval_ptr(op2, Ts, &free_op2, type);
overloaded_element.type = OE_IS_OBJECT;
if (!free_op2) {
zval_copy_ctor(&overloaded_element.element);
}
zend_llist_add_element(&property_reference.elements_list, &overloaded_element);
zend_stack_push(&EG(overloaded_objects_stack), &property_reference, sizeof(zend_property_reference));
zend_llist_add_element(Ts[result->u.var].EA.data.overloaded_element.elements_list, &overloaded_element);
Ts[result->u.var].EA.type = IS_OVERLOADED_OBJECT;
*retval = NULL;
return;
}
if (container->type == IS_STRING && container->value.str.len==0) {
if (container->type==IS_NULL
|| (container->type==IS_BOOL && container->value.lval==0)
|| (container->type==IS_STRING && container->value.str.len==0)) {
switch (type) {
case BP_VAR_RW:
case BP_VAR_W:
if (!PZVAL_IS_REF(container)) {
container->refcount--;
if (container->refcount>0) {
ALLOC_ZVAL(container);
*container_ptr = container;
container->is_ref=0;
}
container->refcount=1;
SEPARATE_ZVAL(container_ptr);
container = *container_ptr;
}
object_init(container);
break;
@@ -887,56 +841,39 @@ static inline void zend_fetch_property_address(znode *result, znode *op1, znode
if ((type==BP_VAR_W || type==BP_VAR_RW) && container->refcount>1 && !PZVAL_IS_REF(container)) {
container->refcount--;
ALLOC_ZVAL(*container_ptr);
**container_ptr = *container;
SEPARATE_ZVAL(container_ptr);
container = *container_ptr;
INIT_PZVAL(container);
zendi_zval_copy_ctor(*container);
}
*retval = zend_fetch_property_address_inner(container->value.obj.properties, op2, Ts, type ELS_CC);
SEPARATE_ON_READ_OBJECT(*retval, type);
SELECTIVE_PZVAL_LOCK(**retval, result);
}
static zval get_overloaded_property(ELS_D)
static zval get_overloaded_property(temp_variable *T ELS_DC)
{
zend_property_reference *property_reference;
zval result;
zend_stack_top(&EG(overloaded_objects_stack), (void **) &property_reference);
result = (property_reference->object)->value.obj.ce->handle_property_get(property_reference);
result = (T->EA.data.overloaded_element.object)->value.obj.ce->handle_property_get(&T->EA.data.overloaded_element);
zend_llist_destroy(&property_reference->elements_list);
zend_stack_del_top(&EG(overloaded_objects_stack));
zend_llist_destroy(T->EA.data.overloaded_element.elements_list);
efree(T->EA.data.overloaded_element.elements_list);
return result;
}
static void set_overloaded_property(zval *value ELS_DC)
static void set_overloaded_property(temp_variable *T, zval *value ELS_DC)
{
zend_property_reference *property_reference;
zend_stack_top(&EG(overloaded_objects_stack), (void **) &property_reference);
(property_reference->object)->value.obj.ce->handle_property_set(property_reference, value);
zend_llist_destroy(&property_reference->elements_list);
zend_stack_del_top(&EG(overloaded_objects_stack));
(T->EA.data.overloaded_element.object)->value.obj.ce->handle_property_set(&T->EA.data.overloaded_element, value);
zend_llist_destroy(T->EA.data.overloaded_element.elements_list);
efree(T->EA.data.overloaded_element.elements_list);
}
static void call_overloaded_function(int arg_count, zval *return_value ELS_DC)
static void call_overloaded_function(temp_variable *T, int arg_count, zval *return_value ELS_DC)
{
zend_property_reference *property_reference;
zend_stack_top(&EG(overloaded_objects_stack), (void **) &property_reference);
(property_reference->object)->value.obj.ce->handle_function_call(arg_count, return_value, property_reference->object, 1 ELS_CC, property_reference);
zend_llist_destroy(&property_reference->elements_list);
zend_stack_del_top(&EG(overloaded_objects_stack));
(T->EA.data.overloaded_element.object)->value.obj.ce->handle_function_call(arg_count, return_value, T->EA.data.overloaded_element.object, 1 ELS_CC, &T->EA.data.overloaded_element);
zend_llist_destroy(T->EA.data.overloaded_element.elements_list);
efree(T->EA.data.overloaded_element.elements_list);
}
@@ -966,15 +903,6 @@ static int zend_check_symbol(zval **pz)
#define CHECK_SYMBOL_TABLES()
#endif
#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && defined(ZEND_WIN32))
# define do_alloca(p) alloca(p)
# define free_alloca(p)
#else
# define do_alloca(p) emalloc(p)
# define free_alloca(p) efree(p)
#endif
#define NEXT_OPCODE() \
CHECK_SYMBOL_TABLES() \
opline++; \
@@ -1036,6 +964,11 @@ void execute(zend_op_array *op_array ELS_DC)
while (opline<end) {
#else
while (1) {
#endif
#ifdef ZEND_WIN32
if (EG(timed_out)) {
zend_timeout(0);
}
#endif
switch(opline->opcode) {
case ZEND_ADD:
@@ -1065,6 +998,9 @@ void execute(zend_op_array *op_array ELS_DC)
case ZEND_IS_IDENTICAL:
EG(binary_op) = is_identical_function;
goto binary_op_addr;
case ZEND_IS_NOT_IDENTICAL:
EG(binary_op) = is_not_identical_function;
goto binary_op_addr;
case ZEND_IS_EQUAL:
EG(binary_op) = is_equal_function;
goto binary_op_addr;
@@ -1149,17 +1085,9 @@ binary_assign_op_addr: {
opline++;
continue;
}
if (!PZVAL_IS_REF(*var_ptr)) {
if ((*var_ptr)->refcount>1) {
zval *orig_var=*var_ptr;
(*var_ptr)->refcount--;
ALLOC_ZVAL(*var_ptr);
**var_ptr = *orig_var;
zendi_zval_copy_ctor(**var_ptr);
(*var_ptr)->refcount=1;
}
}
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
EG(binary_op)(*var_ptr, *var_ptr, get_zval_ptr(&opline->op2, Ts, &EG(free_op2), BP_VAR_R));
Ts[opline->result.u.var].var.ptr_ptr = var_ptr;
SELECTIVE_PZVAL_LOCK(*var_ptr, &opline->result);
@@ -1194,17 +1122,9 @@ binary_assign_op_addr: {
zendi_zval_copy_ctor(Ts[opline->result.u.var].tmp_var);
break;
}
if (!PZVAL_IS_REF(*var_ptr)) {
if ((*var_ptr)->refcount>1) {
zval *orig_var = *var_ptr;
(*var_ptr)->refcount--;
ALLOC_ZVAL(*var_ptr);
**var_ptr = *orig_var;
zendi_zval_copy_ctor(**var_ptr);
(*var_ptr)->refcount=1;
}
}
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
incdec_op(*var_ptr);
switch (opline->opcode) {
case ZEND_PRE_INC:
@@ -1338,7 +1258,7 @@ binary_assign_op_addr: {
zval *value;
value = get_zval_ptr(&opline->op2, Ts, &EG(free_op2), BP_VAR_R);
zend_assign_to_variable(&opline->result, &opline->op1, &opline->op2, value, (EG(free_op2)?IS_TMP_VAR:opline->op2.op_type), Ts ELS_CC);
zend_assign_to_variable(&opline->result, &opline->op1, &opline->op2, value, (EG(free_op2)?IS_TMP_VAR:opline->op2.op_type), Ts ELS_CC);
/* zend_assign_to_variable() always takes care of op2, never free it! */
}
NEXT_OPCODE();
@@ -1381,18 +1301,18 @@ binary_assign_op_addr: {
}
NEXT_OPCODE();
case ZEND_JMPZNZ: {
znode *res = &opline->result;
znode *res = &opline->op1;
if (!zend_is_true(get_zval_ptr(res, Ts, &EG(free_op1), BP_VAR_R))) {
if (zend_is_true(get_zval_ptr(res, Ts, &EG(free_op1), BP_VAR_R))) {
#if DEBUG_ZEND>=2
printf("Conditional jmp on true to %d\n", opline->extended_value);
#endif
opline = &op_array->opcodes[opline->extended_value];
} else {
#if DEBUG_ZEND>=2
printf("Conditional jmp on false to %d\n", opline->op2.u.opline_num);
#endif
opline = &op_array->opcodes[opline->op2.u.opline_num];
} else {
#if DEBUG_ZEND>=2
printf("Conditional jmp on true to %d\n", opline->op1.u.opline_num);
#endif
opline = &op_array->opcodes[opline->op1.u.opline_num];
}
FREE_OP(res, EG(free_op1));
}
@@ -1529,31 +1449,32 @@ binary_assign_op_addr: {
if ((!object.ptr && Ts[opline->op1.u.var].EA.type==IS_OVERLOADED_OBJECT)
|| ((object.ptr && object.ptr->type==IS_OBJECT) && (object.ptr->value.obj.ce->handle_function_call))) { /* overloaded function call */
zend_overloaded_element overloaded_element;
zend_property_reference *property_reference;
overloaded_element.element = *function_name;
overloaded_element.type = OE_IS_METHOD;
if (object.ptr) {
zend_property_reference property_reference;
property_reference.object = object.ptr;
property_reference.type = BP_VAR_NA;
zend_llist_init(&property_reference.elements_list, sizeof(zend_overloaded_element), NULL, 0);
zend_stack_push(&EG(overloaded_objects_stack), &property_reference, sizeof(zend_property_reference));
Ts[opline->op1.u.var].EA.data.overloaded_element.object = object.ptr;
Ts[opline->op1.u.var].EA.data.overloaded_element.type = BP_VAR_NA;
Ts[opline->op1.u.var].EA.data.overloaded_element.elements_list = (zend_llist *) emalloc(sizeof(zend_llist));
zend_llist_init(Ts[opline->op1.u.var].EA.data.overloaded_element.elements_list, sizeof(zend_overloaded_element), NULL, 0);
}
zend_stack_top(&EG(overloaded_objects_stack), (void **) &property_reference);
zend_llist_add_element(&property_reference->elements_list, &overloaded_element);
zend_llist_add_element(Ts[opline->op1.u.var].EA.data.overloaded_element.elements_list, &overloaded_element);
fbc = (zend_function *) emalloc(sizeof(zend_function));
fbc->type = ZEND_OVERLOADED_FUNCTION;
fbc->common.arg_types = NULL;
fbc->overloaded_function.var = opline->op1.u.var;
goto overloaded_function_call_cont;
}
if (!object.ptr || object.ptr->type != IS_OBJECT) {
zend_error(E_ERROR, "Call to a member function on a non-object");
}
object.ptr->refcount++; /* For this pointer */
if (!object.ptr->is_ref && object.ptr->refcount > 1) {
zend_error(E_ERROR, "Bug: Problem in method call\n");
}
object.ptr->is_ref=1;
object.ptr->refcount++; /* For $this pointer */
active_function_table = &(object.ptr->value.obj.ce->function_table);
}
} else { /* function pointer */
@@ -1588,7 +1509,7 @@ do_fcall_common:
zval **original_return_value;
int return_value_used = RETURN_VALUE_USED(opline);
zend_ptr_stack_push(&EG(argument_stack), (void *) opline->extended_value);
zend_ptr_stack_n_push(&EG(argument_stack), 2, (void *) opline->extended_value, NULL);
Ts[opline->result.u.var].var.ptr_ptr = &Ts[opline->result.u.var].var.ptr;
@@ -1622,8 +1543,9 @@ do_fcall_common:
&& object.ptr
&& fbc->type!=ZEND_OVERLOADED_FUNCTION) {
zval **this_ptr;
zval *null_ptr = NULL;
zend_hash_update_ptr(function_state.function_symbol_table, "this", sizeof("this"), NULL, sizeof(zval *), (void **) &this_ptr);
zend_hash_update(function_state.function_symbol_table, "this", sizeof("this"), &null_ptr, sizeof(zval *), (void **) &this_ptr);
if (!PZVAL_IS_REF(object.ptr)) {
zend_error(E_WARNING,"Problem with method call. Report this bug\n");
}
@@ -1656,7 +1578,7 @@ do_fcall_common:
} else { /* ZEND_OVERLOADED_FUNCTION */
ALLOC_ZVAL(Ts[opline->result.u.var].var.ptr);
INIT_ZVAL(*(Ts[opline->result.u.var].var.ptr));
call_overloaded_function(opline->extended_value, Ts[opline->result.u.var].var.ptr ELS_CC);
call_overloaded_function(&Ts[fbc->overloaded_function.var], opline->extended_value, Ts[opline->result.u.var].var.ptr ELS_CC);
efree(fbc);
if (!return_value_used) {
zval_ptr_dtor(&Ts[opline->result.u.var].var.ptr);
@@ -1681,10 +1603,8 @@ do_fcall_common:
retval_ptr_ptr = get_zval_ptr_ptr(&opline->op1, Ts, BP_VAR_W);
if (!PZVAL_IS_REF(*retval_ptr_ptr)) {
SEPARATE_ZVAL(retval_ptr_ptr);
(*retval_ptr_ptr)->is_ref = 1;
}
SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr_ptr);
(*retval_ptr_ptr)->refcount++;
(*EG(return_value_ptr_ptr)) = (*retval_ptr_ptr);
} else {
@@ -1763,21 +1683,12 @@ send_by_ref:
zval *varptr;
varptr_ptr = get_zval_ptr_ptr(&opline->op1, Ts, BP_VAR_W);
varptr = *varptr_ptr;
if (!PZVAL_IS_REF(varptr)) {
/* code to break away this variable */
if (varptr->refcount>1) {
varptr->refcount--;
ALLOC_ZVAL(*varptr_ptr);
**varptr_ptr = *varptr;
varptr = *varptr_ptr;
varptr->refcount = 1;
zval_copy_ctor(varptr);
}
varptr->is_ref = 1;
/* at the end of this code refcount is always 1 */
if (!varptr_ptr) {
zend_error(E_ERROR, "Only variables can be passed by reference");
}
SEPARATE_ZVAL_TO_MAKE_IS_REF(varptr_ptr);
varptr = *varptr_ptr;
varptr->refcount++;
zend_ptr_stack_push(&EG(argument_stack), varptr);
}
@@ -1786,7 +1697,7 @@ send_by_ref:
zval **param;
if (zend_ptr_stack_get_arg(opline->op1.u.constant.value.lval, (void **) &param ELS_CC)==FAILURE) {
zend_error(E_NOTICE, "Missing argument %d for %s()\n", opline->op1.u.constant.value.lval, get_active_function_name());
zend_error(E_WARNING, "Missing argument %d for %s()\n", opline->op1.u.constant.value.lval, get_active_function_name());
if (opline->result.op_type == IS_VAR) {
PZVAL_UNLOCK(*Ts[opline->result.u.var].var.ptr_ptr);
}
@@ -1801,18 +1712,15 @@ send_by_ref:
zval **param, *assignment_value;
if (zend_ptr_stack_get_arg(opline->op1.u.constant.value.lval, (void **) &param ELS_CC)==FAILURE) {
if (opline->op2.u.constant.type == IS_CONSTANT) {
if (opline->op2.u.constant.type == IS_CONSTANT || opline->op2.u.constant.type==IS_CONSTANT_ARRAY) {
zval *default_value;
zval tmp;
ALLOC_ZVAL(default_value);
*default_value = opline->op2.u.constant;
if (!zend_get_constant(default_value->value.str.val, default_value->value.str.len, &tmp)) {
default_value->type = IS_STRING;
if (opline->op2.u.constant.type==IS_CONSTANT_ARRAY) {
zval_copy_ctor(default_value);
} else {
*default_value = tmp;
}
zval_update_constant(&default_value, 0);
default_value->refcount=0;
default_value->is_ref=0;
param = &default_value;
@@ -1825,7 +1733,7 @@ send_by_ref:
assignment_value = *param;
}
if (PZVAL_IS_REF(assignment_value)) {
if (PZVAL_IS_REF(assignment_value) && param) {
zend_assign_to_variable_reference(NULL, get_zval_ptr_ptr(&opline->result, Ts, BP_VAR_W), param, NULL ELS_CC);
} else {
zend_assign_to_variable(NULL, &opline->result, NULL, assignment_value, IS_VAR, Ts ELS_CC);
@@ -1893,7 +1801,7 @@ send_by_ref:
} else {
switch_expr_is_overloaded = 1;
if (Ts[opline->op1.u.var].EA.type==IS_STRING_OFFSET) {
Ts[opline->op1.u.var].EA.str->refcount++;
Ts[opline->op1.u.var].EA.data.str_offset.str->refcount++;
}
}
}
@@ -1928,7 +1836,7 @@ send_by_ref:
zend_str_tolower(class_name.value.str.val, class_name.value.str.len);
if (zend_hash_find(EG(class_table), class_name.value.str.val, class_name.value.str.len+1, (void **) &ce)==FAILURE) {
zend_error(E_ERROR, "Cannot instanciate non-existant class: %s", class_name.value.str.val);
zend_error(E_ERROR, "Cannot instantiate non-existent class: %s", class_name.value.str.val);
}
object_init_ex(&Ts[opline->result.u.var].tmp_var, ce);
Ts[opline->result.u.var].tmp_var.refcount=1;
@@ -1965,7 +1873,7 @@ send_by_ref:
NEXT_OPCODE();
}
}
if (opline->op1.op_type == IS_TMP_VAR) { /* temporary variable */
if (!opline->extended_value && EG(free_op1)) { /* temporary variable */
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -1974,11 +1882,8 @@ send_by_ref:
INIT_PZVAL(expr_ptr);
} else {
if (opline->extended_value) {
if (!PZVAL_IS_REF(expr_ptr)) {
SEPARATE_ZVAL(expr_ptr_ptr);
expr_ptr = *expr_ptr_ptr;
expr_ptr->is_ref = 1;
}
SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
expr_ptr = *expr_ptr_ptr;
expr_ptr->refcount++;
} else if (PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
@@ -2021,7 +1926,7 @@ send_by_ref:
if (!EG(free_op1)) {
zendi_zval_copy_ctor(*result);
}
switch (opline->op2.u.constant.type) {
switch (opline->extended_value) {
case IS_NULL:
convert_to_null(result);
break;
@@ -2050,21 +1955,72 @@ send_by_ref:
zend_op_array *new_op_array=NULL;
zval **original_return_value = EG(return_value_ptr_ptr);
int return_value_used;
zval *inc_filename = get_zval_ptr(&opline->op1, Ts, &EG(free_op1), BP_VAR_R);
zval tmp_inc_filename;
CLS_FETCH();
if (inc_filename->type!=IS_STRING) {
tmp_inc_filename = *inc_filename;
zval_copy_ctor(&tmp_inc_filename);
convert_to_string(&tmp_inc_filename);
inc_filename = &tmp_inc_filename;
}
return_value_used = RETURN_VALUE_USED(opline);
switch (opline->op2.u.constant.value.lval) {
case ZEND_INCLUDE:
case ZEND_IMPORT:
case ZEND_REQUIRE:
new_op_array = compile_filename(opline->op2.u.constant.value.lval, get_zval_ptr(&opline->op1, Ts, &EG(free_op1), BP_VAR_R) CLS_CC ELS_CC);
case ZEND_INCLUDE_ONCE: {
char *opened_path;
int dummy = 1;
zend_file_handle file_handle;
file_handle.handle.fp = zend_fopen(inc_filename->value.str.val, &opened_path);
file_handle.type = ZEND_HANDLE_FP;
if (opened_path) {
file_handle.filename = opened_path;
file_handle.free_filename = 0;
} else {
file_handle.filename = inc_filename->value.str.val;
file_handle.free_filename = 0;
}
if (file_handle.handle.fp) {
if (!opened_path || zend_hash_add(&EG(included_files), opened_path, strlen(opened_path)+1, (void *)&dummy, sizeof(int), NULL)==SUCCESS) {
new_op_array = zend_compile_files(ZEND_INCLUDE CLS_CC, 1, &file_handle);
if (new_op_array) {
pass_include_eval(new_op_array);
} else {
fclose(file_handle.handle.fp);
}
} else {
fclose(file_handle.handle.fp);
}
} else {
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, file_handle.filename);
}
if (opened_path) {
free (opened_path);
}
break;
}
break;
case ZEND_INCLUDE:
case ZEND_REQUIRE:
{
new_op_array = compile_filename(opline->op2.u.constant.value.lval, inc_filename CLS_CC ELS_CC);
if (new_op_array) {
pass_include_eval(new_op_array);
}
break;
}
case ZEND_EVAL:
new_op_array = compile_string(get_zval_ptr(&opline->op1, Ts, &EG(free_op1), BP_VAR_R) CLS_CC);
new_op_array = compile_string(inc_filename CLS_CC);
break;
EMPTY_SWITCH_DEFAULT_CASE()
}
if (inc_filename==&tmp_inc_filename) {
zval_dtor(&tmp_inc_filename);
}
FREE_OP(&opline->op1, EG(free_op1));
Ts[opline->result.u.var].var.ptr = NULL;
Ts[opline->result.u.var].var.ptr_ptr = &Ts[opline->result.u.var].var.ptr;
@@ -2126,6 +2082,8 @@ send_by_ref:
if (container) {
HashTable *ht;
SEPARATE_ZVAL_IF_NOT_REF(container);
switch ((*container)->type) {
case IS_ARRAY:
ht = (*container)->value.ht;
@@ -2137,14 +2095,32 @@ send_by_ref:
ht = NULL;
break;
}
if (ht) {
if (ht) {
switch (offset->type) {
case IS_DOUBLE:
case IS_RESOURCE:
case IS_BOOL:
case IS_LONG:
zend_hash_index_del(ht, offset->value.lval);
break;
{
long index;
if (offset->type == IS_DOUBLE) {
index = (long) offset->value.lval;
} else {
index = offset->value.lval;
}
zend_hash_index_del(ht, index);
break;
}
case IS_STRING:
zend_hash_del(ht, offset->value.str.val, offset->value.str.len+1);
break;
case IS_NULL:
zend_hash_del(ht, "", sizeof(""));
break;
default:
zend_error(E_WARNING, "Illegal offset type in unset");
break;
}
}
} else {
@@ -2247,8 +2223,8 @@ send_by_ref:
if (!var) {
if (Ts[opline->op1.u.var].EA.type==IS_STRING_OFFSET) {
if (Ts[opline->op1.u.var].EA.offset>=0
&& Ts[opline->op1.u.var].EA.offset<Ts[opline->op1.u.var].EA.str->value.str.len) {
if (Ts[opline->op1.u.var].EA.data.str_offset.offset>=0
&& Ts[opline->op1.u.var].EA.data.str_offset.offset<Ts[opline->op1.u.var].EA.data.str_offset.str->value.str.len) {
isset = 1;
} else {
isset = 0;
@@ -2270,7 +2246,7 @@ send_by_ref:
case ZEND_ISEMPTY:
if (!var) {
if (!isset
|| Ts[opline->op1.u.var].EA.str->value.str.val[Ts[opline->op1.u.var].EA.offset]=='0') {
|| Ts[opline->op1.u.var].EA.data.str_offset.str->value.str.val[Ts[opline->op1.u.var].EA.data.str_offset.offset]=='0') {
Ts[opline->result.u.var].tmp_var.value.lval = 1;
} else {
Ts[opline->result.u.var].tmp_var.value.lval = 0;
@@ -2339,6 +2315,7 @@ send_by_ref:
case ZEND_NOP:
NEXT_OPCODE();
EMPTY_SWITCH_DEFAULT_CASE()
}
}
#if SUPPORT_INTERACTIVE
+168 -15
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -18,11 +18,13 @@
*/
#ifndef _EXECUTE_H
#define _EXECUTE_H
#ifndef ZEND_EXECUTE_H
#define ZEND_EXECUTE_H
#include "zend_compile.h"
#include "zend_hash.h"
#include "zend_variables.h"
#include "zend_execute_locks.h"
typedef union _temp_variable {
zval tmp_var;
@@ -33,8 +35,14 @@ typedef union _temp_variable {
struct {
zval tmp_var; /* a dummy */
zval *str;
int offset;
union {
struct {
zval *str;
int offset;
} str_offset;
zend_property_reference overloaded_element;
} data;
unsigned char type;
} EA;
} temp_variable;
@@ -46,15 +54,95 @@ void init_executor(CLS_D ELS_DC);
void shutdown_executor(ELS_D);
void execute(zend_op_array *op_array ELS_DC);
ZEND_API int zend_is_true(zval *op);
ZEND_API inline void safe_free_zval_ptr(zval *p);
ZEND_API void zend_eval_string(char *str, zval *retval_ptr CLS_DC ELS_DC);
ZEND_API inline int i_zend_is_true(zval *op);
ZEND_API int zval_update_constant(zval **pp);
ZEND_API inline void zend_assign_to_variable_reference(znode *result, zval **variable_ptr_ptr, zval **value_ptr_ptr, temp_variable *Ts ELS_DC);
ZEND_API inline void safe_free_zval_ptr(zval *p)
#if defined(C9X_INLINE_SEMANTICS)
{
ELS_FETCH();
if (p!=EG(uninitialized_zval_ptr)) {
FREE_ZVAL(p);
}
}
#else
;
#endif
ZEND_API int zend_eval_string(char *str, zval *retval_ptr CLS_DC ELS_DC);
ZEND_API inline int i_zend_is_true(zval *op)
#if defined(C9X_INLINE_SEMANTICS)
{
int result;
switch (op->type) {
case IS_NULL:
result = 0;
break;
case IS_LONG:
case IS_BOOL:
case IS_RESOURCE:
result = (op->value.lval?1:0);
break;
case IS_DOUBLE:
result = (op->value.dval ? 1 : 0);
break;
case IS_STRING:
if (op->value.str.len == 0
|| (op->value.str.len==1 && op->value.str.val[0]=='0')) {
result = 0;
} else {
result = 1;
}
break;
case IS_ARRAY:
result = (zend_hash_num_elements(op->value.ht)?1:0);
break;
case IS_OBJECT:
result = (zend_hash_num_elements(op->value.obj.properties)?1:0);
break;
default:
result = 0;
break;
}
return result;
}
#else
;
#endif
ZEND_API int zval_update_constant(zval **pp, void *arg);
/* dedicated Zend executor functions - do not use! */
ZEND_API inline void zend_ptr_stack_clear_multiple(ELS_D);
ZEND_API inline int zend_ptr_stack_get_arg(int requested_arg, void **data ELS_DC);
ZEND_API inline void zend_ptr_stack_clear_multiple(ELS_D)
#if defined(C9X_INLINE_SEMANTICS)
{
void **p = EG(argument_stack).top_element-2;
int delete_count = (ulong) *p;
EG(argument_stack).top -= (delete_count+2);
while (--delete_count>=0) {
zval_ptr_dtor((zval **) --p);
}
EG(argument_stack).top_element = p;
}
#else
;
#endif
ZEND_API inline int zend_ptr_stack_get_arg(int requested_arg, void **data ELS_DC)
#if defined(C9X_INLINE_SEMANTICS)
{
void **p = EG(argument_stack).top_element-2;
int arg_count = (ulong) *p;
if (requested_arg>arg_count) {
return FAILURE;
}
*data = (p-arg_count+requested_arg-1);
return SUCCESS;
}
#else
;
#endif
#if SUPPORT_INTERACTIVE
void execute_new_code(CLS_D);
@@ -67,13 +155,78 @@ ZEND_API char *zend_get_executed_filename(ELS_D);
ZEND_API uint zend_get_executed_lineno(ELS_D);
ZEND_API zend_bool zend_is_executing(void);
void zend_set_timeout(long seconds);
void zend_unset_timeout(void);
ZEND_API void zend_timeout(int dummy);
#ifdef ZEND_WIN32
void zend_init_timeout_thread();
void zend_shutdown_timeout_thread();
#define WM_REGISTER_ZEND_TIMEOUT (WM_USER+1)
#define WM_UNREGISTER_ZEND_TIMEOUT (WM_USER+2)
#endif
#define zendi_zval_copy_ctor(p) zval_copy_ctor(&(p))
#define zendi_zval_dtor(p) zval_dtor(&(p))
#define active_opline (*EG(opline_ptr))
ZEND_API inline void zend_assign_to_variable_reference(znode *result, zval **variable_ptr_ptr, zval **value_ptr_ptr, temp_variable *Ts ELS_DC)
#if defined(C9X_INLINE_SEMANTICS)
{
zval *variable_ptr = *variable_ptr_ptr;
zval *value_ptr;
if (!value_ptr_ptr) {
zend_error(E_ERROR, "Cannot create references to string offsets nor overloaded objects");
return;
}
value_ptr = *value_ptr_ptr;
if (variable_ptr == EG(error_zval_ptr) || value_ptr==EG(error_zval_ptr)) {
variable_ptr_ptr = &EG(uninitialized_zval_ptr);
/* } else if (variable_ptr==&EG(uninitialized_zval) || variable_ptr!=value_ptr) { */
} else if (variable_ptr_ptr != value_ptr_ptr) {
variable_ptr->refcount--;
if (variable_ptr->refcount==0) {
zendi_zval_dtor(*variable_ptr);
FREE_ZVAL(variable_ptr);
}
if (!PZVAL_IS_REF(value_ptr)) {
/* break it away */
value_ptr->refcount--;
if (value_ptr->refcount>0) {
ALLOC_ZVAL(*value_ptr_ptr);
**value_ptr_ptr = *value_ptr;
value_ptr = *value_ptr_ptr;
zendi_zval_copy_ctor(*value_ptr);
}
value_ptr->refcount = 1;
value_ptr->is_ref = 1;
}
*variable_ptr_ptr = value_ptr;
value_ptr->refcount++;
} else {
if (variable_ptr->refcount>1) { /* we need to break away */
SEPARATE_ZVAL(variable_ptr_ptr);
}
(*variable_ptr_ptr)->is_ref = 1;
}
if (result && (result->op_type != IS_UNUSED)) {
Ts[result->u.var].var.ptr_ptr = variable_ptr_ptr;
SELECTIVE_PZVAL_LOCK(*variable_ptr_ptr, result);
AI_USE_PTR(Ts[result->u.var].var);
}
}
#else
;
#endif
#define IS_OVERLOADED_OBJECT 1
#define IS_STRING_OFFSET 2
#endif /* _EXECUTE_H */
#endif /* ZEND_EXECUTE_H */
+267 -143
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -26,15 +26,26 @@
#include "zend_execute.h"
#include "zend_API.h"
#include "zend_ptr_stack.h"
#include "zend_variables.h"
#include "zend_operators.h"
#include "zend_constants.h"
#include "zend_extensions.h"
#include "zend_execute_locks.h"
#if HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
ZEND_API void (*zend_execute)(zend_op_array *op_array ELS_DC);
#ifdef ZEND_WIN32
#include <process.h>
/* true global */
static WNDCLASS wc;
static HWND timeout_window;
static HANDLE timeout_thread_event;
static DWORD timeout_thread_id;
static int timeout_thread_initialized=0;
#endif
#if ZEND_DEBUG
static void (*original_sigsegv_handler)(int);
@@ -80,6 +91,18 @@ static void zend_extension_deactivator(zend_extension *extension)
}
static int is_not_internal_function(zend_function *function)
{
return(function->type != ZEND_INTERNAL_FUNCTION);
}
static int is_not_internal_class(zend_class_entry *ce)
{
return(ce->type != ZEND_INTERNAL_CLASS);
}
void init_executor(CLS_D ELS_DC)
{
INIT_ZVAL(EG(uninitialized_zval));
@@ -87,7 +110,6 @@ void init_executor(CLS_D ELS_DC)
EG(uninitialized_zval_ptr)=&EG(uninitialized_zval);
EG(error_zval_ptr)=&EG(error_zval);
zend_ptr_stack_init(&EG(arg_types_stack));
zend_stack_init(&EG(overloaded_objects_stack));
/* destroys stack frame, therefore makes core dumps worthless */
#if 0&&ZEND_DEBUG
original_sigsegv_handler = signal(SIGSEGV, zend_handle_sigsegv);
@@ -115,17 +137,30 @@ void init_executor(CLS_D ELS_DC)
EG(opline_ptr) = NULL;
EG(garbage_ptr) = 0;
zend_hash_init(&EG(imported_files), 5, NULL, NULL, 0);
zend_hash_init(&EG(included_files), 5, NULL, NULL, 0);
EG(ticks_count) = 0;
EG(user_error_handler) = NULL;
zend_ptr_stack_init(&EG(user_error_handlers));
EG(orig_error_reporting) = EG(error_reporting);
#ifdef ZEND_WIN32
EG(timed_out) = 0;
#endif
}
void shutdown_executor(ELS_D)
{
zval_dtor(&EG(global_return_value));
if (EG(global_return_value_ptr) == &EG(global_return_value)) {
zval_dtor(&EG(global_return_value));
} else {
zval_ptr_dtor(EG(return_value_ptr_ptr));
}
zend_ptr_stack_destroy(&EG(arg_types_stack));
zend_stack_destroy(&EG(overloaded_objects_stack));
while (EG(symtable_cache_ptr)>=EG(symtable_cache)) {
zend_hash_destroy(*EG(symtable_cache_ptr));
@@ -142,20 +177,36 @@ void shutdown_executor(ELS_D)
}
}
destroy_resource_list(ELS_C); /* must be destroyed after the main symbol table is destroyed */
zend_ptr_stack_destroy(&EG(argument_stack));
/* Destroy all op arrays */
if (EG(main_op_array)) {
destroy_op_array(EG(main_op_array));
efree(EG(main_op_array));
}
zend_hash_apply(EG(function_table), (int (*)(void *)) is_not_internal_function);
zend_hash_apply(EG(class_table), (int (*)(void *)) is_not_internal_class);
zend_destroy_rsrc_list(ELS_C); /* must be destroyed after the main symbol table and
* op arrays are destroyed.
*/
clean_non_persistent_constants();
#if ZEND_DEBUG
signal(SIGSEGV, original_sigsegv_handler);
#endif
zend_hash_destroy(&EG(included_files));
zend_hash_destroy(&EG(imported_files));
if (EG(user_error_handler)) {
zval_dtor(EG(user_error_handler));
FREE_ZVAL(EG(user_error_handler));
}
zend_ptr_stack_clean(&EG(user_error_handlers), ZVAL_DESTRUCTOR, 1);
zend_ptr_stack_destroy(&EG(user_error_handlers));
EG(error_reporting) = EG(orig_error_reporting);
}
@@ -211,16 +262,6 @@ ZEND_API zend_bool zend_is_executing()
}
ZEND_API inline void safe_free_zval_ptr(zval *p)
{
ELS_FETCH();
if (p!=EG(uninitialized_zval_ptr)) {
FREE_ZVAL(p);
}
}
ZEND_API void _zval_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC)
{
#if DEBUG_ZEND>=2
@@ -236,71 +277,47 @@ ZEND_API void _zval_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC)
}
ZEND_API inline int i_zend_is_true(zval *op)
{
int result;
switch (op->type) {
case IS_NULL:
result = 0;
break;
case IS_LONG:
case IS_BOOL:
case IS_RESOURCE:
result = (op->value.lval?1:0);
break;
case IS_DOUBLE:
result = (op->value.dval ? 1 : 0);
break;
case IS_STRING:
if (op->value.str.len == 0
|| (op->value.str.len==1 && op->value.str.val[0]=='0')) {
result = 0;
} else {
result = 1;
}
break;
case IS_ARRAY:
result = (zend_hash_num_elements(op->value.ht)?1:0);
break;
case IS_OBJECT:
result = (zend_hash_num_elements(op->value.obj.properties)?1:0);
break;
default:
result = 0;
break;
}
return result;
}
ZEND_API int zend_is_true(zval *op)
{
return i_zend_is_true(op);
}
ZEND_API int zval_update_constant(zval **pp)
ZEND_API int zval_update_constant(zval **pp, void *arg)
{
zval *p = *pp;
zend_bool inline_change = (zend_bool) (unsigned long) arg;
if (p->type == IS_CONSTANT) {
zval c;
int refcount = p->refcount;
int refcount;
SEPARATE_ZVAL(pp);
p = *pp;
refcount = p->refcount;
if (!zend_get_constant(p->value.str.val, p->value.str.len, &c)) {
zend_error(E_NOTICE, "Use of undefined constant %s - assumed '%s'",
p->value.str.val,
p->value.str.val);
p->type = IS_STRING;
if (!inline_change) {
zval_copy_ctor(p);
}
} else {
STR_FREE(p->value.str.val);
if (inline_change) {
STR_FREE(p->value.str.val);
}
*p = c;
}
INIT_PZVAL(p);
p->refcount = refcount;
} else if (p->type == IS_ARRAY) {
zend_hash_apply(p->value.ht, (int (*)(void *)) zval_update_constant);
} else if (p->type == IS_CONSTANT_ARRAY) {
SEPARATE_ZVAL(pp);
p = *pp;
p->type = IS_ARRAY;
zend_hash_apply_with_argument(p->value.ht, (int (*)(void *,void *)) zval_update_constant, (void *) 1);
}
return 0;
}
@@ -316,7 +333,7 @@ int call_user_function(HashTable *function_table, zval *object, zval *function_n
for (i=0; i<param_count; i++) {
params_array[i] = &params[i];
}
ex_retval = call_user_function_ex(function_table, object, function_name, &local_retval_ptr, param_count, params_array, 1);
ex_retval = call_user_function_ex(function_table, object, function_name, &local_retval_ptr, param_count, params_array, 1, NULL);
if (local_retval_ptr) {
COPY_PZVAL_TO_ZVAL(*retval_ptr, local_retval_ptr);
} else {
@@ -327,7 +344,7 @@ int call_user_function(HashTable *function_table, zval *object, zval *function_n
}
int call_user_function_ex(HashTable *function_table, zval *object, zval *function_name, zval **retval_ptr_ptr, int param_count, zval **params[], int no_separation)
int call_user_function_ex(HashTable *function_table, zval *object, zval *function_name, zval **retval_ptr_ptr, int param_count, zval **params[], int no_separation, HashTable *symbol_table)
{
int i;
zval **original_return_value;
@@ -340,12 +357,30 @@ int call_user_function_ex(HashTable *function_table, zval *object, zval *functio
*retval_ptr_ptr = NULL;
if (function_name->type==IS_ARRAY) { /* assume array($obj, $name) couple */
zval **tmp_object_ptr, **tmp_real_function_name;
if (zend_hash_index_find(function_name->value.ht, 0, (void **) &tmp_object_ptr)==FAILURE) {
return FAILURE;
}
if (zend_hash_index_find(function_name->value.ht, 1, (void **) &tmp_real_function_name)==FAILURE) {
return FAILURE;
}
function_name = *tmp_real_function_name;
object = *tmp_object_ptr;
}
if (object) {
if (object->type != IS_OBJECT) {
return FAILURE;
}
function_table = &object->value.obj.ce->function_table;
}
if (function_name->type!=IS_STRING) {
return FAILURE;
}
original_function_state_ptr = EG(function_state_ptr);
zend_str_tolower(function_name->value.str.val, function_name->value.str.len);
if (zend_hash_find(function_table, function_name->value.str.val, function_name->value.str.len+1, (void **) &function_state.function)==FAILURE) {
@@ -386,19 +421,23 @@ int call_user_function_ex(HashTable *function_table, zval *object, zval *functio
zend_ptr_stack_push(&EG(argument_stack), param);
}
zend_ptr_stack_push(&EG(argument_stack), (void *) (long) param_count);
zend_ptr_stack_n_push(&EG(argument_stack), 2, (void *) (long) param_count, NULL);
if (function_state.function->type == ZEND_USER_FUNCTION) {
calling_symbol_table = EG(active_symbol_table);
ALLOC_HASHTABLE(EG(active_symbol_table));
zend_hash_init(EG(active_symbol_table), 0, NULL, ZVAL_PTR_DTOR, 0);
if (symbol_table) {
EG(active_symbol_table) = symbol_table;
} else {
ALLOC_HASHTABLE(EG(active_symbol_table));
zend_hash_init(EG(active_symbol_table), 0, NULL, ZVAL_PTR_DTOR, 0);
}
if (object) {
zval *dummy, **this_ptr;
ALLOC_ZVAL(dummy);
INIT_ZVAL(*dummy);
zend_hash_update_ptr(EG(active_symbol_table), "this", sizeof("this"), dummy, sizeof(zval *), (void **) &this_ptr);
zend_hash_update(EG(active_symbol_table), "this", sizeof("this"), &dummy, sizeof(zval *), (void **) &this_ptr);
zend_assign_to_variable_reference(NULL, this_ptr, &object, NULL ELS_CC);
}
original_return_value = EG(return_value_ptr_ptr);
@@ -407,8 +446,10 @@ int call_user_function_ex(HashTable *function_table, zval *object, zval *functio
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));
FREE_HASHTABLE(EG(active_symbol_table));
if (!symbol_table) {
zend_hash_destroy(EG(active_symbol_table));
FREE_HASHTABLE(EG(active_symbol_table));
}
EG(active_symbol_table) = calling_symbol_table;
EG(active_op_array) = original_op_array;
EG(return_value_ptr_ptr)=original_return_value;
@@ -425,13 +466,14 @@ int call_user_function_ex(HashTable *function_table, zval *object, zval *functio
}
ZEND_API void zend_eval_string(char *str, zval *retval_ptr CLS_DC ELS_DC)
ZEND_API int zend_eval_string(char *str, zval *retval_ptr CLS_DC ELS_DC)
{
zval pv;
zend_op_array *new_op_array;
zend_op_array *original_active_op_array = EG(active_op_array);
zend_function_state *original_function_state_ptr = EG(function_state_ptr);
int original_handle_op_arrays;
int retval;
if (retval_ptr) {
pv.value.str.len = strlen(str)+sizeof("return ;")-1;
@@ -482,64 +524,15 @@ ZEND_API void zend_eval_string(char *str, zval *retval_ptr CLS_DC ELS_DC)
destroy_op_array(new_op_array);
efree(new_op_array);
EG(return_value_ptr_ptr) = original_return_value_ptr_ptr;
retval = SUCCESS;
} else {
printf("Failed executing:\n%s\n", str);
retval = FAILURE;
}
zval_dtor(&pv);
return retval;
}
ZEND_API inline void zend_assign_to_variable_reference(znode *result, zval **variable_ptr_ptr, zval **value_ptr_ptr, temp_variable *Ts ELS_DC)
{
zval *variable_ptr = *variable_ptr_ptr;
zval *value_ptr;
if (!value_ptr_ptr) {
zend_error(E_ERROR, "Cannot create references to string offsets nor overloaded objects");
return;
}
value_ptr = *value_ptr_ptr;
if (variable_ptr == EG(error_zval_ptr) || value_ptr==EG(error_zval_ptr)) {
variable_ptr_ptr = &EG(uninitialized_zval_ptr);
/* } else if (variable_ptr==&EG(uninitialized_zval) || variable_ptr!=value_ptr) { */
} else if (variable_ptr_ptr != value_ptr_ptr) {
variable_ptr->refcount--;
if (variable_ptr->refcount==0) {
zendi_zval_dtor(*variable_ptr);
FREE_ZVAL(variable_ptr);
}
if (!PZVAL_IS_REF(value_ptr)) {
/* break it away */
value_ptr->refcount--;
if (value_ptr->refcount>0) {
ALLOC_ZVAL(*value_ptr_ptr);
**value_ptr_ptr = *value_ptr;
value_ptr = *value_ptr_ptr;
zendi_zval_copy_ctor(*value_ptr);
}
value_ptr->refcount = 1;
value_ptr->is_ref = 1;
}
*variable_ptr_ptr = value_ptr;
value_ptr->refcount++;
} else {
if (variable_ptr->refcount>1) { /* we need to break away */
SEPARATE_ZVAL(variable_ptr_ptr);
}
(*variable_ptr_ptr)->is_ref = 1;
}
if (result && (result->op_type != IS_UNUSED)) {
Ts[result->u.var].var.ptr_ptr = variable_ptr_ptr;
SELECTIVE_PZVAL_LOCK(*variable_ptr_ptr, result);
AI_USE_PTR(Ts[result->u.var].var);
}
}
#if SUPPORT_INTERACTIVE
void execute_new_code(CLS_D)
@@ -561,32 +554,163 @@ void execute_new_code(CLS_D)
#endif
/* these are a dedicated, optimized, function, and shouldn't be used for any purpose
* other than by Zend's executor
*/
ZEND_API inline void zend_ptr_stack_clear_multiple(ELS_D)
ZEND_API void zend_timeout(int dummy)
{
void **p = EG(argument_stack).top_element-1;
int delete_count = (ulong) *p;
ELS_FETCH();
EG(argument_stack).top -= (delete_count+1);
while (--delete_count>=0) {
zval_ptr_dtor((zval **) --p);
/* is there any point in this? we're terminating the request anyway...
PLS_FETCH();
PG(connection_status) |= PHP_CONNECTION_TIMEOUT;
*/
zend_error(E_ERROR, "Maximum execution time of %d second%s exceeded",
EG(timeout_seconds), EG(timeout_seconds) == 1 ? "" : "s");
}
#ifdef ZEND_WIN32
static LRESULT CALLBACK zend_timeout_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message) {
case WM_DESTROY:
PostQuitMessage(0);
break;
case WM_REGISTER_ZEND_TIMEOUT:
/* wParam is the thread id pointer, lParam is the timeout amount in seconds */
if (lParam==0) {
KillTimer(timeout_window, wParam);
} else {
SetTimer(timeout_window, wParam, lParam*1000, NULL);
}
break;
case WM_UNREGISTER_ZEND_TIMEOUT:
/* wParam is the thread id pointer */
KillTimer(timeout_window, wParam);
break;
case WM_TIMER: {
#ifdef ZTS
zend_executor_globals *executor_globals;
executor_globals = ts_resource_ex(executor_globals_id, &wParam);
if (!executor_globals) {
/* Thread died before receiving its timeout? */
break;
}
#endif
KillTimer(timeout_window, wParam);
EG(timed_out) = 1;
}
break;
default:
return DefWindowProc(hWnd,message,wParam,lParam);
}
EG(argument_stack).top_element = p;
return 0;
}
ZEND_API int zend_ptr_stack_get_arg(int requested_arg, void **data ELS_DC)
static unsigned __stdcall timeout_thread_proc(void *pArgs)
{
void **p = EG(argument_stack).top_element-1;
int arg_count = (ulong) *p;
MSG message;
if (requested_arg>arg_count) {
return FAILURE;
wc.style=0;
wc.lpfnWndProc = zend_timeout_WndProc;
wc.cbClsExtra=0;
wc.cbWndExtra=0;
wc.hInstance=NULL;
wc.hIcon=NULL;
wc.hCursor=NULL;
wc.hbrBackground=(HBRUSH)(COLOR_BACKGROUND + 5);
wc.lpszMenuName=NULL;
wc.lpszClassName = "Zend Timeout Window";
if(!RegisterClass(&wc)) {
return -1;
}
*data = (p-arg_count+requested_arg-1);
return SUCCESS;
timeout_window = CreateWindow(wc.lpszClassName, wc.lpszClassName, 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, NULL, NULL);
SetEvent(timeout_thread_event);
while (GetMessage(&message, NULL, 0, 0)) {
SendMessage(timeout_window, message.message, message.wParam, message.lParam);
if (message.message == WM_QUIT) {
break;
}
}
DestroyWindow(timeout_window);
UnregisterClass(wc.lpszClassName, NULL);
return 0;
}
void zend_init_timeout_thread()
{
timeout_thread_event = CreateEvent(NULL, FALSE, FALSE, NULL);
_beginthreadex(NULL, 0, timeout_thread_proc, NULL, 0, &timeout_thread_id);
WaitForSingleObject(timeout_thread_event, INFINITE);
}
void zend_shutdown_timeout_thread()
{
if (!timeout_thread_initialized) {
return;
}
PostThreadMessage(timeout_thread_id, WM_QUIT, 0, 0);
}
#endif
/* This one doesn't exists on QNX */
#ifndef SIGPROF
#define SIGPROF 27
#endif
void zend_set_timeout(long seconds)
{
ELS_FETCH();
EG(timeout_seconds) = seconds;
#ifdef ZEND_WIN32
if (timeout_thread_initialized==0 && InterlockedIncrement(&timeout_thread_initialized)==1) {
/* We start up this process-wide thread here and not in zend_startup(), because if Zend
* is initialized inside a DllMain(), you're not supposed to start threads from it.
*/
zend_init_timeout_thread();
}
PostThreadMessage(timeout_thread_id, WM_REGISTER_ZEND_TIMEOUT, (WPARAM) GetCurrentThreadId(), (LPARAM) seconds);
#else
# ifdef HAVE_SETITIMER
{
struct itimerval t_r; /* timeout requested */
sigset_t sigset;
t_r.it_value.tv_sec = seconds;
t_r.it_value.tv_usec = t_r.it_interval.tv_sec = t_r.it_interval.tv_usec = 0;
setitimer(ITIMER_PROF, &t_r, NULL);
signal(SIGPROF, zend_timeout);
sigemptyset(&sigset);
sigaddset(&sigset, SIGPROF);
sigprocmask(SIG_UNBLOCK,&sigset,NULL);
}
# endif
#endif
}
void zend_unset_timeout(void)
{
ELS_FETCH();
#ifdef ZEND_WIN32
PostThreadMessage(timeout_thread_id, WM_UNREGISTER_ZEND_TIMEOUT, (WPARAM) GetCurrentThreadId(), (LPARAM) 0);
#else
# ifdef HAVE_SETITIMER
{
struct itimerval no_timeout;
no_timeout.it_value.tv_sec = no_timeout.it_value.tv_usec = no_timeout.it_interval.tv_sec = no_timeout.it_interval.tv_usec = 0;
setitimer(ITIMER_PROF, &no_timeout, NULL);
}
# endif
#endif
}
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef _ZEND_EXECUTE_LOCKS_H
#define _ZEND_EXECUTE_LOCKS_H
#ifndef ZEND_EXECUTE_LOCKS_H
#define ZEND_EXECUTE_LOCKS_H
#define PZVAL_LOCK(z) ((z)->refcount++)
#define PZVAL_UNLOCK(z) { ((z)->refcount--); \
@@ -19,4 +19,4 @@
#define SELECTIVE_PZVAL_LOCK(pzv, pzn) if (!((pzn)->u.EA.type & EXT_TYPE_UNUSED)) { PZVAL_LOCK(pzv); }
#endif /* _ZEND_EXECUTE_LOCKS_H */
#endif /* ZEND_EXECUTE_LOCKS_H */
+64 -19
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -44,7 +44,7 @@ int zend_load_extension(char *path)
{
#if ZEND_EXTENSIONS_SUPPORT
DL_HANDLE handle;
zend_extension extension, *new_extension;
zend_extension *new_extension;
zend_extension_version_info *extension_version_info;
handle = DL_LOAD(path);
@@ -65,18 +65,19 @@ int zend_load_extension(char *path)
}
if (extension_version_info->zend_extension_api_no > ZEND_EXTENSION_API_NO) {
fprintf(stderr, "%s requires Zend version %s or later\n"
"Current version %s, API version %d\n",
fprintf(stderr, "%s requires Zend Engine API version %d\n"
"The installed Zend Engine API version is %d\n\n",
new_extension->name,
extension_version_info->required_zend_version,
ZEND_VERSION,
extension_version_info->zend_extension_api_no,
ZEND_EXTENSION_API_NO);
DL_UNLOAD(handle);
return FAILURE;
} else if (extension_version_info->zend_extension_api_no < ZEND_EXTENSION_API_NO) {
/* we may be able to allow for downwards compatability in some harmless cases. */
fprintf(stderr, "%s is outdated (API version %d, current version %d)\n"
"Contact %s at %s for a later version of this module.\n",
fprintf(stderr, "%s designed to be used with the Zend Engine API %d is outdated\n"
"It requires a more recent version of the Zend Engine\n"
"The installed Zend Engine API version is %d\n"
"Contact %s at %s for a later version of this module.\n\n",
new_extension->name,
extension_version_info->zend_extension_api_no,
ZEND_EXTENSION_API_NO,
@@ -100,27 +101,41 @@ int zend_load_extension(char *path)
return FAILURE;
}
return zend_register_extension(new_extension, handle);
#else
fprintf(stderr, "Extensions are not supported on this platform.\n");
return FAILURE;
#endif
}
int zend_register_extension(zend_extension *new_extension, DL_HANDLE handle)
{
#if ZEND_EXTENSIONS_SUPPORT
zend_extension extension;
if (new_extension->startup) {
if (new_extension->startup(new_extension)!=SUCCESS) {
DL_UNLOAD(handle);
return FAILURE;
}
}
extension = *new_extension;
extension.handle = handle;
zend_extension_dispatch_message(ZEND_EXTMSG_NEW_EXTENSION, &extension);
zend_llist_add_element(&zend_extensions, &extension);
/*fprintf(stderr, "Loaded %s, version %s\n", extension.name, extension.version);*/
zend_append_version_info(&extension);
return SUCCESS;
#else
fprintf(stderr, "Extensions are not supported on this platform.\n");
return FAILURE;
/*fprintf(stderr, "Loaded %s, version %s\n", extension.name, extension.version);*/
#endif
return SUCCESS;
}
static void zend_extension_shutdown(zend_extension *extension)
{
#if ZEND_EXTENSIONS_SUPPORT
@@ -131,6 +146,14 @@ static void zend_extension_shutdown(zend_extension *extension)
}
int zend_startup_extensions()
{
zend_llist_init(&zend_extensions, sizeof(zend_extension), (void (*)(void *)) zend_extension_dtor, 1);
last_resource_number = 0;
return SUCCESS;
}
void zend_shutdown_extensions()
{
zend_llist_apply(&zend_extensions, (void (*)(void *)) zend_extension_shutdown);
@@ -141,16 +164,38 @@ void zend_shutdown_extensions()
void zend_extension_dtor(zend_extension *extension)
{
#if ZEND_EXTENSIONS_SUPPORT
DL_UNLOAD(extension->handle);
if (extension->handle) {
DL_UNLOAD(extension->handle);
}
#endif
}
static void zend_extension_message_dispatcher(zend_extension *extension, int num_args, va_list args)
{
int message;
void *arg;
if (!extension->message_handler || num_args!=2) {
return;
}
message = va_arg(args, int);
arg = va_arg(args, void *);
extension->message_handler(message, arg);
}
ZEND_API void zend_extension_dispatch_message(int message, void *arg)
{
zend_llist_apply_with_arguments(&zend_extensions, (llist_apply_with_args_func_t) zend_extension_message_dispatcher, 2, message, arg);
}
ZEND_API int zend_get_resource_handle(zend_extension *extension)
{
if (last_resource_number<4) {
if (last_resource_number<ZEND_MAX_RESERVED_RESOURCES) {
extension->resource_number = last_resource_number;
return last_resource_number;
return last_resource_number++;
} else {
return -1;
}
+18 -17
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -18,12 +18,12 @@
*/
#ifndef _ZEND_EXTENSIONS_H
#define _ZEND_EXTENSIONS_H
#ifndef ZEND_EXTENSIONS_H
#define ZEND_EXTENSIONS_H
#include "zend_compile.h"
#define ZEND_EXTENSION_API_NO 19990619
#define ZEND_EXTENSION_API_NO 20000707
typedef struct _zend_extension_version_info {
int zend_extension_api_no;
@@ -47,14 +47,16 @@ struct _zend_extension {
void (*activate)();
void (*deactivate)();
void (*message_handler)(int message, void *arg);
void (*op_array_handler)(zend_op_array *op_array);
void (*statement_handler)(zend_op_array *op_array);
void (*fcall_begin_handler)(zend_op_array *op_array);
void (*fcall_end_handler)(zend_op_array *op_array);
void (*op_array_ctor)(void **resource);
void (*op_array_dtor)(void **resource);
void (*op_array_ctor)(zend_op_array *op_array);
void (*op_array_dtor)(zend_op_array *op_array);
void *reserved1;
void *reserved2;
@@ -71,16 +73,13 @@ struct _zend_extension {
ZEND_API int zend_get_resource_handle(zend_extension *extension);
ZEND_API void zend_extension_dispatch_message(int message, void *arg);
#ifdef ZTS
#define ZTS_V 1
#else
#define ZTS_V 0
#endif
#define ZEND_EXTMSG_NEW_EXTENSION 1
#define ZEND_EXTENSION() \
ZEND_EXT_API zend_extension_version_info extension_version_info = { ZEND_EXTENSION_API_NO, "0.90", ZTS_V, ZEND_DEBUG }
ZEND_EXT_API zend_extension_version_info extension_version_info = { ZEND_EXTENSION_API_NO, ZEND_VERSION, ZTS_V, ZEND_DEBUG }
#define STANDARD_ZEND_EXTENSION_PROPERTIES NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -1
@@ -88,9 +87,11 @@ ZEND_API int zend_get_resource_handle(zend_extension *extension);
ZEND_API extern zend_llist zend_extensions;
void zend_extension_dtor(zend_extension *extension);
int zend_load_extension(char *path);
int zend_load_extensions(char **extension_paths);
ZEND_API int zend_load_extension(char *path);
ZEND_API int zend_load_extensions(char **extension_paths);
ZEND_API int zend_register_extension(zend_extension *new_extension, DL_HANDLE handle);
void zend_append_version_info(zend_extension *extension);
int zend_startup_extensions(void);
void zend_shutdown_extensions(void);
#endif /* _ZEND_EXTENSIONS_H */
#endif /* ZEND_EXTENSIONS_H */
+7 -7
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -18,8 +18,8 @@
*/
#ifndef _ZEND_FAST_CACHE_H
#define _ZEND_FAST_CACHE_H
#ifndef ZEND_FAST_CACHE_H
#define ZEND_FAST_CACHE_H
#ifndef ZEND_ENABLE_FAST_CACHE
# if ZEND_DEBUG
@@ -117,7 +117,7 @@ typedef struct _zend_fast_cache_list_entry {
#define FREE_ZVAL_REL(z) \
ZEND_FAST_FREE_REL(z, ZVAL_CACHE_LIST)
/* fast cache for HashTable's */
/* fast cache for HashTables */
#define ALLOC_HASHTABLE(ht) \
ZEND_FAST_ALLOC(ht, HashTable, HASHTABLE_CACHE_LIST)
@@ -130,7 +130,7 @@ typedef struct _zend_fast_cache_list_entry {
#define FREE_HASHTABLE_REL(ht) \
ZEND_FAST_FREE_REL(ht, HASHTABLE_CACHE_LIST)
#endif /* _ZEND_FAST_CACHE_H */
#endif /* ZEND_FAST_CACHE_H */
/*
* Local variables:
+17
View File
@@ -0,0 +1,17 @@
/*
* If C9X_INLINE_SEMANTICS is already defined here,
* we assume the user does not want GCC inline semantics,
* but compiles this file always.
*/
#ifndef C9X_INLINE_SEMANTICS
#define C9X_INLINE_SEMANTICS
#include "zend.h"
#include "zend_execute.h"
#include "zend_operators.h"
#endif
+21 -11
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -18,8 +18,8 @@
*/
#ifndef _T_GLOBALS_H
#define _T_GLOBALS_H
#ifndef ZEND_GLOBALS_H
#define ZEND_GLOBALS_H
#include <setjmp.h>
@@ -54,7 +54,6 @@ END_EXTERN_C()
#include "zend_compile.h"
#include "zend_execute.h"
/* excpt.h on Digital Unix 4.0 defines function_table */
#undef function_table
@@ -131,7 +130,6 @@ struct _zend_executor_globals {
zend_function_state *function_state_ptr;
zend_ptr_stack arg_types_stack;
zend_stack overloaded_objects_stack;
/* for global return() support */
zval *global_return_value_ptr;
@@ -147,11 +145,12 @@ struct _zend_executor_globals {
HashTable *active_symbol_table;
HashTable symbol_table; /* main symbol table */
HashTable imported_files; /* files already included using 'import' */
HashTable included_files; /* files already included */
jmp_buf bailout;
int error_reporting;
int orig_error_reporting;
zend_op_array *active_op_array;
zend_op_array *main_op_array;
@@ -169,6 +168,10 @@ struct _zend_executor_globals {
/* for extended information support */
zend_bool no_extensions;
#ifdef ZEND_WIN32
zend_bool timed_out;
#endif
HashTable regular_list;
HashTable persistent_list;
@@ -180,6 +183,14 @@ struct _zend_executor_globals {
zval *garbage[4];
int garbage_ptr;
zval *user_error_handler;
zend_ptr_stack user_error_handlers;
/* timeout support */
int timeout_seconds;
int lambda_count;
void *reserved[ZEND_MAX_RESERVED_RESOURCES];
#if SUPPORT_INTERACTIVE
int interactive;
@@ -191,7 +202,7 @@ struct _zend_alloc_globals {
zend_mem_header *head; /* standard list */
zend_mem_header *phead; /* persistent list */
void *cache[MAX_CACHED_MEMORY][MAX_CACHED_ENTRIES];
unsigned char cache_count[MAX_CACHED_MEMORY];
unsigned int cache_count[MAX_CACHED_MEMORY];
void *fast_cache_list_head[MAX_FAST_CACHE_TYPES];
#if ZEND_DEBUG
@@ -206,5 +217,4 @@ struct _zend_alloc_globals {
#endif
};
#endif /* _T_GLOBALS_H */
#endif /* ZEND_GLOBALS_H */
+6 -6
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -18,8 +18,8 @@
*/
#ifndef _ZEND_GLOBALS_MACROS_H
#define _ZEND_GLOBALS_MACROS_H
#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;
@@ -85,5 +85,5 @@ extern ZEND_API zend_executor_globals executor_globals;
extern ZEND_API zend_alloc_globals alloc_globals;
#endif
#endif /* _ZEND_GLOBALS_MACROS_H */
#endif /* ZEND_GLOBALS_MACROS_H */
+173 -43
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -78,24 +78,28 @@
}
#if ZEND_DEBUG
#define HT_OK 0
#define HT_IS_DESTROYING 1
#define HT_DESTROYED 2
#define HT_CLEANING 3
#define HT_OK 0
#define HT_CLEANING 3
static void _zend_is_inconsistent(HashTable *ht, char *file, int line)
{
if (ht->inconsistent==HT_OK) {
return;
}
switch (ht->inconsistent) {
case HT_IS_DESTROYING:
zend_error(E_CORE_ERROR, "ht=%08x is destroying in %s:%d", ht, file, line);
break;
case HT_DESTROYED:
zend_error(E_CORE_ERROR, "ht=%08x is already destroyed in %s:%d", ht, file, line);
break;
case HT_CLEANING:
zend_error(E_CORE_ERROR, "ht=%08x is cleaning %s:%d", ht, file, line);
break;
case HT_IS_DESTROYING:
zend_output_debug_string(1, "%s(%d) : ht=0x%08x is being destroyed", file, line, ht);
break;
case HT_DESTROYED:
zend_output_debug_string(1, "%s(%d) : ht=0x%08x is already destroyed", file, line, ht);
break;
case HT_CLEANING:
zend_output_debug_string(1, "%s(%d) : ht=0x%08x is being cleaned", file, line, ht);
break;
}
zend_bailout();
}
#define IS_CONSISTENT(a) _zend_is_inconsistent(a,__FILE__,__LINE__);
#define SET_INCONSISTENT(n) ht->inconsistent = n;
@@ -104,9 +108,23 @@ static void _zend_is_inconsistent(HashTable *ht, char *file, int line)
#define SET_INCONSISTENT(n)
#endif
#define HASH_APPLY_BEGIN(ht) \
if ((ht)->bApplyProtection) { \
if ((ht)->nApplyCount>=3) { \
zend_error(E_WARNING, "Nesting level too deep - recursive dependency?"); \
return; \
} \
(ht)->nApplyCount++; \
}
#define HASH_APPLY_END(ht) \
(ht)->nApplyCount--;
/* Generated on an Octa-ALPHA 300MHz CPU & 2.5GB RAM monster */
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};
{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 uint nNumPrimeNumbers = sizeof(PrimeNumbers) / sizeof(uint);
#define ZEND_HASH_IF_FULL_DO_RESIZE(ht) \
if ((ht)->nNumOfElements > (ht)->nTableSize) { \
@@ -115,7 +133,6 @@ static uint PrimeNumbers[] =
static int zend_hash_do_resize(HashTable *ht);
static uint nNumPrimeNumbers = sizeof(PrimeNumbers) / sizeof(ulong);
ZEND_API ulong hashpjw(char *arKey, uint nKeyLength)
{
@@ -134,11 +151,11 @@ ZEND_API ulong hashpjw(char *arKey, uint nKeyLength)
#define UPDATE_DATA(ht, p, pData, nDataSize) \
if (flag & HASH_ADD_PTR) { \
if (nDataSize == sizeof(void*)) { \
if (!(p)->pDataPtr) { \
pefree((p)->pData, (ht)->persistent); \
} \
(p)->pDataPtr = pData; \
(p)->pDataPtr = *(void **)pData; \
(p)->pData = &(p)->pDataPtr; \
} else { \
if ((p)->pDataPtr) { \
@@ -149,8 +166,8 @@ ZEND_API ulong hashpjw(char *arKey, uint nKeyLength)
}
#define INIT_DATA(ht, p, pData, nDataSize); \
if (flag & HASH_ADD_PTR) { \
(p)->pDataPtr = pData; \
if (nDataSize == sizeof(void*)) { \
(p)->pDataPtr = *(void **)pData; \
(p)->pData = &(p)->pDataPtr; \
} else { \
(p)->pData = (void *) pemalloc(nDataSize, (ht)->persistent); \
@@ -200,9 +217,28 @@ ZEND_API int zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunction
ht->nNextFreeElement = 0;
ht->pInternalPointer = NULL;
ht->persistent = persistent;
ht->nApplyCount = 0;
ht->bApplyProtection = 1;
return SUCCESS;
}
ZEND_API int zend_hash_init_ex(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, int persistent, zend_bool bApplyProtection)
{
int retval = zend_hash_init(ht, nSize, pHashFunction, pDestructor, persistent);
ht->bApplyProtection = bApplyProtection;
return retval;
}
ZEND_API void zend_hash_set_apply_protection(HashTable *ht, zend_bool bApplyProtection)
{
ht->bApplyProtection = bApplyProtection;
}
ZEND_API int zend_hash_add_or_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag)
{
ulong h;
@@ -650,6 +686,7 @@ ZEND_API void zend_hash_apply(HashTable *ht, apply_func_t apply_func)
IS_CONSISTENT(ht);
HASH_APPLY_BEGIN(ht);
p = ht->pListHead;
while (p != NULL) {
if (apply_func(p->pData)) {
@@ -658,6 +695,7 @@ ZEND_API void zend_hash_apply(HashTable *ht, apply_func_t apply_func)
p = p->pListNext;
}
}
HASH_APPLY_END(ht);
}
@@ -667,6 +705,7 @@ ZEND_API void zend_hash_apply_with_argument(HashTable *ht, apply_func_arg_t appl
IS_CONSISTENT(ht);
HASH_APPLY_BEGIN(ht);
p = ht->pListHead;
while (p != NULL) {
if (apply_func(p->pData, argument)) {
@@ -675,6 +714,7 @@ ZEND_API void zend_hash_apply_with_argument(HashTable *ht, apply_func_arg_t appl
p = p->pListNext;
}
}
HASH_APPLY_END(ht);
}
@@ -686,8 +726,9 @@ ZEND_API void zend_hash_apply_with_arguments(HashTable *ht, int (*destruct)(void
IS_CONSISTENT(ht);
va_start(args, num_args);
HASH_APPLY_BEGIN(ht);
va_start(args, num_args);
p = ht->pListHead;
while (p != NULL) {
hash_key.arKey = p->arKey;
@@ -699,8 +740,9 @@ ZEND_API void zend_hash_apply_with_arguments(HashTable *ht, int (*destruct)(void
p = p->pListNext;
}
}
va_end(args);
HASH_APPLY_END(ht);
}
@@ -893,48 +935,64 @@ ZEND_API int zend_hash_num_elements(HashTable *ht)
}
ZEND_API void zend_hash_internal_pointer_reset(HashTable *ht)
ZEND_API void zend_hash_internal_pointer_reset_ex(HashTable *ht, HashPosition *pos)
{
IS_CONSISTENT(ht);
ht->pInternalPointer = ht->pListHead;
if (pos)
*pos = ht->pListHead;
else
ht->pInternalPointer = ht->pListHead;
}
/* This function will be extremely optimized by remembering
* the end of the list
*/
ZEND_API void zend_hash_internal_pointer_end(HashTable *ht)
ZEND_API void zend_hash_internal_pointer_end_ex(HashTable *ht, HashPosition *pos)
{
IS_CONSISTENT(ht);
ht->pInternalPointer = ht->pListTail;
if (pos)
*pos = ht->pListTail;
else
ht->pInternalPointer = ht->pListTail;
}
ZEND_API void zend_hash_move_forward(HashTable *ht)
ZEND_API int zend_hash_move_forward_ex(HashTable *ht, HashPosition *pos)
{
HashPosition *current = pos ? pos : &ht->pInternalPointer;
IS_CONSISTENT(ht);
if (ht->pInternalPointer) {
ht->pInternalPointer = ht->pInternalPointer->pListNext;
}
if (*current) {
*current = (*current)->pListNext;
return SUCCESS;
} else
return FAILURE;
}
ZEND_API void zend_hash_move_backwards(HashTable *ht)
ZEND_API int zend_hash_move_backwards_ex(HashTable *ht, HashPosition *pos)
{
HashPosition *current = pos ? pos : &ht->pInternalPointer;
IS_CONSISTENT(ht);
if (ht->pInternalPointer) {
ht->pInternalPointer = ht->pInternalPointer->pListLast;
}
if (*current) {
*current = (*current)->pListLast;
return SUCCESS;
} else
return FAILURE;
}
/* This function should be made binary safe */
ZEND_API int zend_hash_get_current_key(HashTable *ht, char **str_index, ulong *num_index)
ZEND_API int zend_hash_get_current_key_ex(HashTable *ht, char **str_index, ulong *str_length, ulong *num_index, HashPosition *pos)
{
Bucket *p = ht->pInternalPointer;
Bucket *p;
p = pos ? (*pos) : ht->pInternalPointer;
IS_CONSISTENT(ht);
@@ -942,6 +1000,9 @@ ZEND_API int zend_hash_get_current_key(HashTable *ht, char **str_index, ulong *n
if (p->nKeyLength) {
*str_index = (char *) pemalloc(p->nKeyLength, ht->persistent);
memcpy(*str_index, p->arKey, p->nKeyLength);
if (str_length) {
*str_length = p->nKeyLength;
}
return HASH_KEY_IS_STRING;
} else {
*num_index = p->h;
@@ -952,9 +1013,11 @@ 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)
ZEND_API int zend_hash_get_current_key_type_ex(HashTable *ht, HashPosition *pos)
{
Bucket *p = ht->pInternalPointer;
Bucket *p;
p = pos ? (*pos) : ht->pInternalPointer;
IS_CONSISTENT(ht);
@@ -969,9 +1032,11 @@ 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 int zend_hash_get_current_data_ex(HashTable *ht, void **pData, HashPosition *pos)
{
Bucket *p = ht->pInternalPointer;
Bucket *p;
p = pos ? (*pos) : ht->pInternalPointer;
IS_CONSISTENT(ht);
@@ -1041,6 +1106,71 @@ ZEND_API int zend_hash_sort(HashTable *ht, sort_func_t sort_func,
}
ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t compar, zend_bool ordered)
{
Bucket *p1, *p2;
int result;
void *pData2;
IS_CONSISTENT(ht1);
IS_CONSISTENT(ht2);
result = ht1->nNumOfElements - ht2->nNumOfElements;
if (result!=0) {
return result;
}
p1 = ht1->pListHead;
if (ordered) {
p2 = ht2->pListHead;
}
while (p1) {
if (ordered && !p2) {
return 1; /* That's not supposed to happen */
}
if (ordered) {
if (p1->nKeyLength==0 && p2->nKeyLength==0) { /* numeric indices */
result = p1->h - p2->h;
if (result!=0) {
return result;
}
} else { /* string indices */
result = p1->nKeyLength - p2->nKeyLength;
if (result!=0) {
return result;
}
result = memcmp(p1->arKey, p2->arKey, p1->nKeyLength);
if (result!=0) {
return result;
}
}
pData2 = p2->pData;
} else {
if (p1->nKeyLength==0) { /* numeric index */
if (zend_hash_index_find(ht2, p1->h, &pData2)==FAILURE) {
return 1;
}
} else { /* string index */
if (zend_hash_find(ht2, p1->arKey, p1->nKeyLength, &pData2)==FAILURE) {
return 1;
}
}
}
result = compar(p1->pData, pData2);
if (result!=0) {
return result;
}
p1 = p1->pListNext;
if (ordered) {
p2 = p2->pListNext;
}
}
return 0;
}
ZEND_API int zend_hash_minmax(HashTable *ht, int (*compar) (const void *, const void *), int flag, void **pData)
{
Bucket *p,*res;
@@ -1083,7 +1213,7 @@ void zend_hash_display_pListTail(HashTable *ht)
p = ht->pListTail;
while (p != NULL) {
zend_printf("pListTail has key %s\n", p->arKey);
zend_output_debug_string(0, "pListTail has key %s\n", p->arKey);
p = p->pListLast;
}
}
@@ -1096,14 +1226,14 @@ void zend_hash_display(HashTable *ht)
for (i = 0; i < ht->nTableSize; i++) {
p = ht->arBuckets[i];
while (p != NULL) {
zend_printf("%s <==> 0x%X\n", p->arKey, p->h);
zend_output_debug_string(0, "%s <==> 0x%X\n", p->arKey, p->h);
p = p->pNext;
}
}
p = ht->pListTail;
while (p != NULL) {
zend_printf("%s <==> 0x%X\n", p->arKey, p->h);
zend_output_debug_string(0, "%s <==> 0x%X\n", p->arKey, p->h);
p = p->pListLast;
}
}
+46 -25
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -17,8 +17,8 @@
+----------------------------------------------------------------------+
*/
#ifndef _HASH_
#define _HASH_
#ifndef ZEND_HASH_H
#define ZEND_HASH_H
#include <sys/types.h>
@@ -29,7 +29,6 @@
#define HASH_UPDATE (1<<0)
#define HASH_ADD (1<<1)
#define HASH_NEXT_INSERT (1<<2)
#define HASH_ADD_PTR (1<<3)
#define HASH_DEL_KEY 0
#define HASH_DEL_INDEX 1
@@ -42,7 +41,7 @@ typedef int (*apply_func_arg_t)(void *pDest, void *argument);
typedef ulong (*hash_func_t)(char *arKey, uint nKeyLength);
typedef void (*copy_ctor_func_t)(void *pElement);
struct hashtable;
struct _hashtable;
typedef struct bucket {
ulong h; /* Used for numeric indexing */
@@ -56,7 +55,7 @@ typedef struct bucket {
char arKey[1]; /* Must be last element */
} Bucket;
typedef struct hashtable {
typedef struct _hashtable {
uint nTableSize;
uint nHashSizeIndex;
uint nNumOfElements;
@@ -67,16 +66,21 @@ typedef struct hashtable {
Bucket *pListTail;
Bucket **arBuckets;
dtor_func_t pDestructor;
unsigned char persistent;
zend_bool persistent;
unsigned char nApplyCount;
zend_bool bApplyProtection;
#if ZEND_DEBUG
int inconsistent;
#endif
} HashTable;
typedef Bucket* HashPosition;
BEGIN_EXTERN_C()
/* startup/shutdown */
ZEND_API int zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, int persistent);
ZEND_API int zend_hash_init_ex(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, int persistent, zend_bool bApplyProtection);
ZEND_API void zend_hash_destroy(HashTable *ht);
ZEND_API void zend_hash_clean(HashTable *ht);
@@ -87,26 +91,18 @@ ZEND_API int zend_hash_add_or_update(HashTable *ht, char *arKey, uint nKeyLength
zend_hash_add_or_update(ht,arKey,nKeyLength,pData,nDataSize,pDest,HASH_UPDATE)
#define zend_hash_add(ht,arKey,nKeyLength,pData,nDataSize,pDest) \
zend_hash_add_or_update(ht,arKey,nKeyLength,pData,nDataSize,pDest,HASH_ADD)
#define zend_hash_update_ptr(ht,arKey,nKeyLength,pData,nDataSize,pDest) \
zend_hash_add_or_update(ht,arKey,nKeyLength,pData,0,pDest,(HASH_UPDATE|HASH_ADD_PTR))
#define zend_hash_add_ptr(ht,arKey,nKeyLength,pData,nDataSize,pDest) \
zend_hash_add_or_update(ht,arKey,nKeyLength,pData,nDataSize,pDest,(HASH_ADD|HASH_ADD_PTR))
ZEND_API int zend_hash_quick_add_or_update(HashTable *ht, char *arKey, uint nKeyLength, ulong h, void *pData, uint nDataSize, void **pDest,int flag);
#define zend_hash_quick_update(ht,arKey,nKeyLength,h,pData,nDataSize,pDest) \
zend_hash_quick_add_or_update(ht,arKey,nKeyLength,h,pData,nDataSize,pDest,HASH_UPDATE)
#define zend_hash_quick_add(ht,arKey,nKeyLength,h,pData,nDataSize,pDest) \
zend_hash_quick_add_or_update(ht,arKey,nKeyLength,h,pData,nDataSize,pDest,HASH_ADD)
#define zend_hash_quick_update_ptr(ht,arKey,nKeyLength,h,pData,nDataSize,pDest) \
zend_hash_quick_add_or_update(ht,arKey,nKeyLength,h,pData,0,pDest,HASH_UPDATE|HASH_ADD_PTR)
ZEND_API int zend_hash_index_update_or_next_insert(HashTable *ht, ulong h, void *pData, uint nDataSize, void **pDest, int flag);
#define zend_hash_index_update(ht,h,pData,nDataSize,pDest) \
zend_hash_index_update_or_next_insert(ht,h,pData,nDataSize,pDest,HASH_UPDATE)
#define zend_hash_next_index_insert(ht,pData,nDataSize,pDest) \
zend_hash_index_update_or_next_insert(ht,0,pData,nDataSize,pDest,HASH_NEXT_INSERT)
#define zend_hash_next_index_insert_ptr(ht,pData,nDataSize,pDest) \
zend_hash_index_update_or_next_insert(ht,0,pData,nDataSize,pDest,HASH_NEXT_INSERT|HASH_ADD_PTR)
typedef struct _zend_hash_key {
char *arKey;
@@ -115,6 +111,8 @@ typedef struct _zend_hash_key {
} zend_hash_key;
typedef int (*apply_func_args_t)(void *pDest, int num_args, va_list args, zend_hash_key *hash_key);
#define ZEND_STD_HASH_APPLIER \
int (*)(void *element, int num_args, va_list args, zend_hash_key *hash_key)
@@ -146,18 +144,34 @@ ZEND_API int zend_hash_index_exists(HashTable *ht, ulong h);
ZEND_API ulong zend_hash_next_free_element(HashTable *ht);
/* traversing */
ZEND_API void zend_hash_move_forward(HashTable *ht);
ZEND_API void zend_hash_move_backwards(HashTable *ht);
ZEND_API int zend_hash_get_current_key(HashTable *ht, char **str_index, ulong *num_index);
ZEND_API int zend_hash_get_current_key_type(HashTable *ht);
ZEND_API int zend_hash_get_current_data(HashTable *ht, void **pData);
ZEND_API void zend_hash_internal_pointer_reset(HashTable *ht);
ZEND_API void zend_hash_internal_pointer_end(HashTable *ht);
ZEND_API int zend_hash_move_forward_ex(HashTable *ht, HashPosition *pos);
ZEND_API int zend_hash_move_backwards_ex(HashTable *ht, HashPosition *pos);
ZEND_API int zend_hash_get_current_key_ex(HashTable *ht, char **str_index, ulong *str_length, ulong *num_index, HashPosition *pos);
ZEND_API int zend_hash_get_current_key_type_ex(HashTable *ht, HashPosition *pos);
ZEND_API int zend_hash_get_current_data_ex(HashTable *ht, void **pData, HashPosition *pos);
ZEND_API void zend_hash_internal_pointer_reset_ex(HashTable *ht, HashPosition *pos);
ZEND_API void zend_hash_internal_pointer_end_ex(HashTable *ht, HashPosition *pos);
#define zend_hash_move_forward(ht) \
zend_hash_move_forward_ex(ht, NULL)
#define zend_hash_move_backwards(ht) \
zend_hash_move_backwards_ex(ht, NULL)
#define zend_hash_get_current_key(ht, str_index, num_index) \
zend_hash_get_current_key_ex(ht, str_index, NULL, num_index, NULL)
#define zend_hash_get_current_key_type(ht) \
zend_hash_get_current_key_type_ex(ht, NULL)
#define zend_hash_get_current_data(ht, pData) \
zend_hash_get_current_data_ex(ht, pData, NULL)
#define zend_hash_internal_pointer_reset(ht) \
zend_hash_internal_pointer_reset_ex(ht, NULL)
#define zend_hash_internal_pointer_end(ht) \
zend_hash_internal_pointer_end_ex(ht, NULL)
/* Copying, merging and sorting */
ZEND_API void zend_hash_copy(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size);
ZEND_API void zend_hash_merge(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size, int overwrite);
ZEND_API int zend_hash_sort(HashTable *ht, sort_func_t sort_func, compare_func_t compare_func, int renumber);
ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t compar, zend_bool ordered);
ZEND_API int zend_hash_minmax(HashTable *ht, int (*compar)(const void *, const void *), int flag, void **pData);
ZEND_API int zend_hash_num_elements(HashTable *ht);
@@ -174,4 +188,11 @@ void zend_hash_display(HashTable *ht);
END_EXTERN_C()
#endif /* _HASH_ */
#define ZEND_INIT_SYMTABLE(ht) \
ZEND_INIT_SYMTABLE_EX(ht, 2, 0)
#define ZEND_INIT_SYMTABLE_EX(ht, n, persistent) \
zend_hash_init(ht, n, NULL, ZVAL_PTR_DTOR, persistent)
#endif /* ZEND_HASH_H */
+11 -9
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -33,7 +33,7 @@ extern int zendleng;
#define zendleng zend_get_zendleng(CLS_C)
#endif
static void html_putc(char c)
ZEND_API void zend_html_putc(char c)
{
switch (c) {
case '\n':
@@ -61,12 +61,12 @@ static void html_putc(char c)
}
static void html_puts(char *s, uint len)
ZEND_API void zend_html_puts(char *s, uint len)
{
register char *ptr=s, *end=s+len;
while (ptr<end) {
html_putc(*ptr++);
zend_html_putc(*ptr++);
}
}
@@ -94,6 +94,7 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
next_color = syntax_highlighter_ini->highlight_comment;
break;
case T_OPEN_TAG:
case T_OPEN_TAG_WITH_ECHO:
next_color = syntax_highlighter_ini->highlight_default;
break;
case T_CLOSE_TAG:
@@ -107,7 +108,7 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
in_string = !in_string;
break;
case T_WHITESPACE:
html_puts(zendtext, zendleng); /* no color needed */
zend_html_puts(zendtext, zendleng); /* no color needed */
token.type = 0;
continue;
break;
@@ -135,16 +136,17 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
}
switch (token_type) {
case T_END_HEREDOC:
html_puts(token.value.str.val, token.value.str.len);
zend_html_puts(token.value.str.val, token.value.str.len);
break;
default:
html_puts(zendtext, zendleng);
zend_html_puts(zendtext, zendleng);
break;
}
if (token.type == IS_STRING) {
switch (token_type) {
case T_OPEN_TAG:
case T_OPEN_TAG_WITH_ECHO:
case T_CLOSE_TAG:
case T_WHITESPACE:
break;
+7 -5
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -18,8 +18,8 @@
*/
#ifndef _HIGHLIGHT_H
#define _HIGHLIGHT_H
#ifndef ZEND_HIGHLIGHT_H
#define ZEND_HIGHLIGHT_H
#define HL_COMMENT_COLOR "#FF8000" /* orange */
#define HL_DEFAULT_COLOR "#0000BB" /* blue */
@@ -42,6 +42,8 @@ BEGIN_EXTERN_C()
ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini);
int highlight_file(char *filename, zend_syntax_highlighter_ini *syntax_highlighter_ini);
int highlight_string(zval *str, zend_syntax_highlighter_ini *syntax_highlighter_ini);
ZEND_API void zend_html_putc(char c);
ZEND_API void zend_html_puts(char *s, uint len);
END_EXTERN_C()
extern zend_syntax_highlighter_ini syntax_highlighter_ini;
+3 -3
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+6 -6
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -18,9 +18,9 @@
*/
#ifndef _ZEND_INDENT_H
#define _ZEND_INDENT_H
#ifndef ZEND_INDENT_H
#define ZEND_INDENT_H
ZEND_API void zend_indent(void);
#endif /* _ZEND_INDENT_H */
#endif /* ZEND_INDENT_H */
+155 -30
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -27,10 +27,14 @@
ZEND_API int le_index_ptr;
static inline int zend_list_do_insert(HashTable *list,void *ptr, int type)
/* true global */
static HashTable list_destructors;
static inline int zend_list_do_insert(HashTable *list, void *ptr, int type, zend_bool valid)
{
int index;
list_entry le;
zend_rsrc_list_entry le;
index = zend_hash_next_free_element(list);
@@ -39,13 +43,14 @@ static inline int zend_list_do_insert(HashTable *list,void *ptr, int type)
le.ptr=ptr;
le.type=type;
le.refcount=1;
zend_hash_index_update(list, index, (void *) &le, sizeof(list_entry), NULL);
le.valid = valid;
zend_hash_index_update(list, index, (void *) &le, sizeof(zend_rsrc_list_entry), NULL);
return index;
}
static inline int zend_list_do_delete(HashTable *list,int id)
{
list_entry *le;
zend_rsrc_list_entry *le;
ELS_FETCH();
if (zend_hash_index_find(&EG(regular_list), id, (void **) &le)==SUCCESS) {
@@ -63,7 +68,7 @@ static inline int zend_list_do_delete(HashTable *list,int id)
static inline void *zend_list_do_find(HashTable *list,int id, int *type)
{
list_entry *le;
zend_rsrc_list_entry *le;
if (zend_hash_index_find(list, id, (void **) &le)==SUCCESS) {
*type = le->type;
@@ -79,7 +84,7 @@ ZEND_API int zend_list_insert(void *ptr, int type)
{
ELS_FETCH();
return zend_list_do_insert(&EG(regular_list), ptr, type);
return zend_list_do_insert(&EG(regular_list), ptr, type, 1);
}
@@ -87,13 +92,13 @@ ZEND_API int zend_plist_insert(void *ptr, int type)
{
ELS_FETCH();
return zend_list_do_insert(&EG(persistent_list), ptr, type);
return zend_list_do_insert(&EG(persistent_list), ptr, type, 1);
}
ZEND_API int zend_list_addref(int id)
{
list_entry *le;
zend_rsrc_list_entry *le;
ELS_FETCH();
if (zend_hash_index_find(&EG(regular_list), id, (void **) &le)==SUCCESS) {
@@ -122,6 +127,20 @@ ZEND_API int zend_plist_delete(int id)
}
ZEND_API int zend_list_convert_to_number(int id)
{
zend_rsrc_list_entry *le;
ELS_FETCH();
if (zend_hash_index_find(&EG(regular_list), id, (void **) &le)==SUCCESS
&& le->valid) {
return id;
}
return 0;
}
ZEND_API void *zend_list_find(int id, int *type)
{
ELS_FETCH();
@@ -153,6 +172,22 @@ ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int r
}
ZEND_API int zend_register_false_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type)
{
int rsrc_id;
ELS_FETCH();
rsrc_id = zend_list_do_insert(&EG(regular_list), rsrc_pointer, rsrc_type, 0);
if (rsrc_result) {
rsrc_result->value.lval = rsrc_id;
rsrc_result->type = IS_RESOURCE;
}
return rsrc_id;
}
ZEND_API void *zend_fetch_resource(zval **passed_id, int default_id, char *resource_type_name, int *found_resource_type, int num_resource_types, ...)
{
int id;
@@ -180,8 +215,9 @@ ZEND_API void *zend_fetch_resource(zval **passed_id, int default_id, char *resou
resource = zend_list_find(id, &actual_resource_type);
if (!resource) {
if (resource_type_name)
if (resource_type_name) {
zend_error(E_WARNING, "%d is not a valid %s resource", id, resource_type_name);
}
return NULL;
}
@@ -197,8 +233,9 @@ ZEND_API void *zend_fetch_resource(zval **passed_id, int default_id, char *resou
}
va_end(resource_types);
if (resource_type_name)
if (resource_type_name) {
zend_error(E_WARNING, "Supplied resource is not a valid %s resource", resource_type_name);
}
return NULL;
}
@@ -206,12 +243,22 @@ ZEND_API void *zend_fetch_resource(zval **passed_id, int default_id, char *resou
void list_entry_destructor(void *ptr)
{
list_entry *le = (list_entry *) ptr;
list_destructors_entry *ld;
zend_rsrc_list_entry *le = (zend_rsrc_list_entry *) ptr;
zend_rsrc_list_dtors_entry *ld;
if (zend_hash_index_find(&list_destructors,le->type,(void **) &ld)==SUCCESS) {
if (ld->list_destructor) {
(ld->list_destructor)(le->ptr);
if (zend_hash_index_find(&list_destructors, le->type,(void **) &ld)==SUCCESS) {
switch (ld->type) {
case ZEND_RESOURCE_LIST_TYPE_STD:
if (ld->list_dtor) {
(ld->list_dtor)(le->ptr);
}
break;
case ZEND_RESOURCE_LIST_TYPE_EX:
if (ld->list_dtor_ex) {
ld->list_dtor_ex(le);
}
break;
EMPTY_SWITCH_DEFAULT_CASE()
}
} else {
zend_error(E_WARNING,"Unknown list entry type in request shutdown (%d)",le->type);
@@ -221,12 +268,12 @@ void list_entry_destructor(void *ptr)
void plist_entry_destructor(void *ptr)
{
list_entry *le = (list_entry *) ptr;
list_destructors_entry *ld;
zend_rsrc_list_entry *le = (zend_rsrc_list_entry *) ptr;
zend_rsrc_list_dtors_entry *ld;
if (zend_hash_index_find(&list_destructors,le->type,(void **) &ld)==SUCCESS) {
if (ld->plist_destructor) {
(ld->plist_destructor)(le->ptr);
if (zend_hash_index_find(&list_destructors, le->type,(void **) &ld)==SUCCESS) {
if (ld->plist_dtor) {
(ld->plist_dtor)(le->ptr);
}
} else {
zend_error(E_WARNING,"Unknown persistent list entry type in module shutdown (%d)",le->type);
@@ -234,31 +281,31 @@ void plist_entry_destructor(void *ptr)
}
int init_resource_list(ELS_D)
int zend_init_rsrc_list(ELS_D)
{
return zend_hash_init(&EG(regular_list), 0, NULL, list_entry_destructor, 0);
}
int init_resource_plist(ELS_D)
int zend_init_rsrc_plist(ELS_D)
{
return zend_hash_init(&EG(persistent_list), 0, NULL, plist_entry_destructor, 1);
return zend_hash_init_ex(&EG(persistent_list), 0, NULL, plist_entry_destructor, 1, 0);
}
void destroy_resource_list(ELS_D)
void zend_destroy_rsrc_list(ELS_D)
{
zend_hash_graceful_destroy(&EG(regular_list));
}
void destroy_resource_plist(ELS_D)
void zend_destroy_rsrc_plist(ELS_D)
{
zend_hash_graceful_destroy(&EG(persistent_list));
}
static int clean_module_resource(list_entry *le, int *resource_id)
static int clean_module_resource(zend_rsrc_list_entry *le, int *resource_id)
{
if (le->type == *resource_id) {
return 1;
@@ -268,11 +315,12 @@ static int clean_module_resource(list_entry *le, int *resource_id)
}
int clean_module_resource_destructors(list_destructors_entry *ld, int *module_number)
static int zend_clean_module_rsrc_dtors_cb(zend_rsrc_list_dtors_entry *ld, int *module_number)
{
if (ld->module_number == *module_number) {
ELS_FETCH();
zend_hash_apply_with_argument(&EG(regular_list), (int (*)(void *,void *)) clean_module_resource, (void *) &(ld->resource_id));
zend_hash_apply_with_argument(&EG(persistent_list), (int (*)(void *,void *)) clean_module_resource, (void *) &(ld->resource_id));
return 1;
} else {
@@ -281,6 +329,83 @@ int clean_module_resource_destructors(list_destructors_entry *ld, int *module_nu
}
void zend_clean_module_rsrc_dtors(int module_number)
{
zend_hash_apply_with_argument(&list_destructors, (int (*)(void *,void *)) zend_clean_module_rsrc_dtors_cb, (void *) &module_number);
}
ZEND_API int zend_register_list_destructors(void (*ld)(void *), void (*pld)(void *), int module_number)
{
zend_rsrc_list_dtors_entry lde;
#if 0
printf("Registering destructors %d for module %d\n", list_destructors.nNextFreeElement, module_number);
#endif
lde.list_dtor=(void (*)(void *)) ld;
lde.plist_dtor=(void (*)(void *)) pld;
lde.list_dtor_ex = lde.plist_dtor_ex = NULL;
lde.module_number = module_number;
lde.resource_id = list_destructors.nNextFreeElement;
lde.type = ZEND_RESOURCE_LIST_TYPE_STD;
lde.type_name = NULL;
if (zend_hash_next_index_insert(&list_destructors, (void *) &lde, sizeof(zend_rsrc_list_dtors_entry), NULL)==FAILURE) {
return FAILURE;
}
return list_destructors.nNextFreeElement-1;
}
ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_func_t pld, char *type_name, int module_number)
{
zend_rsrc_list_dtors_entry lde;
#if 0
printf("Registering destructors %d for module %d\n", list_destructors.nNextFreeElement, module_number);
#endif
lde.list_dtor = NULL;
lde.plist_dtor = NULL;
lde.list_dtor_ex = ld;
lde.plist_dtor_ex = pld;
lde.module_number = module_number;
lde.resource_id = list_destructors.nNextFreeElement;
lde.type = ZEND_RESOURCE_LIST_TYPE_EX;
lde.type_name = type_name;
if (zend_hash_next_index_insert(&list_destructors,(void *) &lde, sizeof(zend_rsrc_list_dtors_entry),NULL)==FAILURE) {
return FAILURE;
}
return list_destructors.nNextFreeElement-1;
}
int zend_init_rsrc_list_dtors()
{
return zend_hash_init(&list_destructors, 50, NULL, NULL, 1);
}
void zend_destroy_rsrc_list_dtors()
{
zend_hash_destroy(&list_destructors);
}
char *zend_rsrc_list_get_rsrc_type(int resource)
{
zend_rsrc_list_dtors_entry *lde;
if (zend_hash_index_find(&list_destructors, resource, (void **) &lde)==SUCCESS) {
return lde->type_name;
} else {
return NULL;
}
}
/*
* Local variables:
* tab-width: 4
+42 -20
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -18,29 +18,46 @@
*/
#ifndef _LIST_H
#define _LIST_H
#ifndef ZEND_LIST_H
#define ZEND_LIST_H
#include "zend_hash.h"
#include "zend_globals.h"
extern HashTable list_destructors;
typedef struct _list_entry {
#define ZEND_RESOURCE_LIST_TYPE_STD 1
#define ZEND_RESOURCE_LIST_TYPE_EX 2
typedef struct _zend_rsrc_list_entry {
void *ptr;
int type;
int refcount;
} list_entry;
zend_bool valid;
} zend_rsrc_list_entry;
typedef void (*rsrc_dtor_func_t)(zend_rsrc_list_entry *rsrc);
#define ZEND_RSRC_DTOR_FUNC(name) void name(zend_rsrc_list_entry *rsrc)
typedef struct _zend_rsrc_list_dtors_entry {
/* old style destructors */
void (*list_dtor)(void *);
void (*plist_dtor)(void *);
/* new style destructors */
rsrc_dtor_func_t list_dtor_ex;
rsrc_dtor_func_t plist_dtor_ex;
char *type_name;
typedef struct _list_destructors_entry {
void (*list_destructor)(void *);
void (*plist_destructor)(void *);
int module_number;
int resource_id;
} list_destructors_entry;
unsigned char type;
} zend_rsrc_list_dtors_entry;
#define register_list_destructors(ld,pld) _register_list_destructors((void (*)(void *))ld, (void (*)(void *))pld, module_number);
ZEND_API int _register_list_destructors(void (*ld)(void *), void (*pld)(void *), int module_number);
#define register_list_destructors(ld, pld) zend_register_list_destructors((void (*)(void *))ld, (void (*)(void *))pld, module_number);
ZEND_API int zend_register_list_destructors(void (*ld)(void *), void (*pld)(void *), int module_number);
ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_func_t pld, char *type_name, int module_number);
enum list_entry_type {
LE_DB=1000
@@ -49,28 +66,33 @@ enum list_entry_type {
void list_entry_destructor(void *ptr);
void plist_entry_destructor(void *ptr);
int clean_module_resource_destructors(list_destructors_entry *ld, int *module_number);
int init_resource_list(ELS_D);
int init_resource_plist(ELS_D);
void destroy_resource_list(ELS_D);
void destroy_resource_plist(ELS_D);
void zend_clean_module_rsrc_dtors(int module_number);
int zend_init_rsrc_list(ELS_D);
int zend_init_rsrc_plist(ELS_D);
void zend_destroy_rsrc_list(ELS_D);
void zend_destroy_rsrc_plist(ELS_D);
int zend_init_rsrc_list_dtors();
void zend_destroy_rsrc_list_dtors();
ZEND_API int zend_list_insert(void *ptr, int type);
ZEND_API int zend_plist_insert(void *ptr, int type);
ZEND_API int zend_list_addref(int id);
ZEND_API int zend_list_delete(int id);
ZEND_API int zend_plist_delete(int id);
ZEND_API int zend_list_convert_to_number(int id);
ZEND_API void *zend_list_find(int id, int *type);
ZEND_API void *zend_plist_find(int id, int *type);
ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type);
ZEND_API void *zend_fetch_resource(zval **passed_id, int default_id, char *resource_type_name, int *found_resource_type, int num_resource_types, ...);
ZEND_API char *zend_rsrc_list_get_rsrc_type(int resource);
extern ZEND_API int le_index_ptr; /* list entry type for index pointers */
#define ZEND_VERIFY_RESOURCE(rsrc) \
if (!rsrc) { \
RETURN_FALSE; \
RETURN_NULL(); \
}
#define ZEND_FETCH_RESOURCE(rsrc, rsrc_type, passed_id, default_id, resource_type_name, resource_type) \
+44 -23
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -81,7 +81,7 @@ ZEND_API void zend_llist_del_element(zend_llist *l, void *element, int (*compare
}
if (l->dtor) {
l->dtor(current->data);
efree(current);
pefree(current, l->persistent);
}
break;
}
@@ -121,7 +121,7 @@ ZEND_API void zend_llist_remove_tail(zend_llist *l)
l->tail->prev->next = NULL;
}
l->tail = l->tail->prev;
efree(old_tail);
pefree(old_tail, l->persistent);
}
}
@@ -196,6 +196,19 @@ ZEND_API void zend_llist_apply_with_argument(zend_llist *l, void (*func)(void *d
}
ZEND_API void zend_llist_apply_with_arguments(zend_llist *l, llist_apply_with_args_func_t func, int num_args, ...)
{
zend_llist_element *element;
va_list args;
va_start(args, num_args);
for (element=l->head; element; element=element->next) {
func(element->data, num_args, args);
}
va_end(args);
}
ZEND_API int zend_llist_count(zend_llist *l)
{
zend_llist_element *element;
@@ -208,46 +221,54 @@ ZEND_API int zend_llist_count(zend_llist *l)
}
ZEND_API void *zend_llist_get_first(zend_llist *l)
ZEND_API void *zend_llist_get_first_ex(zend_llist *l, zend_llist_position *pos)
{
l->traverse_ptr = l->head;
if (l->traverse_ptr) {
return l->traverse_ptr->data;
zend_llist_position *current = pos ? pos : &l->traverse_ptr;
*current = l->head;
if (*current) {
return (*current)->data;
} else {
return NULL;
}
}
ZEND_API void *zend_llist_get_last(zend_llist *l)
ZEND_API void *zend_llist_get_last_ex(zend_llist *l, zend_llist_position *pos)
{
l->traverse_ptr = l->tail;
if (l->traverse_ptr) {
return l->traverse_ptr->data;
zend_llist_position *current = pos ? pos : &l->traverse_ptr;
*current = l->tail;
if (*current) {
return (*current)->data;
} else {
return NULL;
}
}
ZEND_API void *zend_llist_get_next(zend_llist *l)
ZEND_API void *zend_llist_get_next_ex(zend_llist *l, zend_llist_position *pos)
{
if (l->traverse_ptr) {
l->traverse_ptr = l->traverse_ptr->next;
if (l->traverse_ptr) {
return l->traverse_ptr->data;
zend_llist_position *current = pos ? pos : &l->traverse_ptr;
if (*current) {
*current = (*current)->next;
if (*current) {
return (*current)->data;
}
}
return NULL;
}
ZEND_API void *zend_llist_get_prev(zend_llist *l)
ZEND_API void *zend_llist_get_prev_ex(zend_llist *l, zend_llist_position *pos)
{
if (l->traverse_ptr) {
l->traverse_ptr = l->traverse_ptr->prev;
if (l->traverse_ptr) {
return l->traverse_ptr->data;
zend_llist_position *current = pos ? pos : &l->traverse_ptr;
if (*current) {
*current = (*current)->prev;
if (*current) {
return (*current)->data;
}
}
return NULL;
+25 -13
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -18,8 +18,8 @@
*/
#ifndef _ZEND_LLIST_H
#define _ZEND_LLIST_H
#ifndef ZEND_LLIST_H
#define ZEND_LLIST_H
#include <stdlib.h>
@@ -38,7 +38,12 @@ typedef struct _zend_llist {
zend_llist_element *traverse_ptr;
} zend_llist;
typedef int (*llist_compare_func_t) (const zend_llist_element *, const zend_llist_element *);
typedef int (*llist_compare_func_t)(const zend_llist_element *, const zend_llist_element *);
typedef void(*llist_apply_with_arg_func_t)(void *data, void *arg);
typedef void(*llist_apply_with_args_func_t)(void *data, int num_args, va_list args);
typedef void (*llist_apply_func_t)(void *);
typedef zend_llist_element* zend_llist_position;
BEGIN_EXTERN_C()
ZEND_API void zend_llist_init(zend_llist *l, size_t size, void (*dtor)(void *data), unsigned char persistent);
@@ -49,16 +54,23 @@ ZEND_API void zend_llist_destroy(zend_llist *l);
ZEND_API void zend_llist_clean(zend_llist *l);
ZEND_API void zend_llist_remove_tail(zend_llist *l);
ZEND_API void zend_llist_copy(zend_llist *dst, zend_llist *src);
ZEND_API void zend_llist_apply(zend_llist *l, void (*func)(void *data));
ZEND_API void zend_llist_apply_with_argument(zend_llist *l, void (*func)(void *data, void *arg), void *arg);
ZEND_API void zend_llist_apply(zend_llist *l, llist_apply_func_t);
ZEND_API void zend_llist_apply_with_argument(zend_llist *l, llist_apply_with_arg_func_t, void *arg);
ZEND_API void zend_llist_apply_with_arguments(zend_llist *l, llist_apply_with_args_func_t func, int num_args, ...);
ZEND_API int zend_llist_count(zend_llist *l);
ZEND_API void zend_llist_sort(zend_llist *l, llist_compare_func_t comp_func);
/* traversal */
ZEND_API void *zend_llist_get_first(zend_llist *l);
ZEND_API void *zend_llist_get_last(zend_llist *l);
ZEND_API void *zend_llist_get_next(zend_llist *l);
ZEND_API void *zend_llist_get_prev(zend_llist *l);
ZEND_API void *zend_llist_get_first_ex(zend_llist *l, zend_llist_position *pos);
ZEND_API void *zend_llist_get_last_ex(zend_llist *l, zend_llist_position *pos);
ZEND_API void *zend_llist_get_next_ex(zend_llist *l, zend_llist_position *pos);
ZEND_API void *zend_llist_get_prev_ex(zend_llist *l, zend_llist_position *pos);
#define zend_llist_get_first(l) zend_llist_get_first_ex(l, NULL)
#define zend_llist_get_last(l) zend_llist_get_last_ex(l, NULL)
#define zend_llist_get_next(l) zend_llist_get_next_ex(l, NULL)
#define zend_llist_get_prev(l) zend_llist_get_prev_ex(l, NULL)
END_EXTERN_C()
#endif /* _ZEND_LLIST_H */
#endif /* ZEND_LLIST_H */
+27 -6
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -18,16 +18,33 @@
*/
#ifndef _MODULES_H
#define _MODULES_H
#ifndef MODULES_H
#define MODULES_H
#define INIT_FUNC_ARGS int type, int module_number ELS_DC
#define INIT_FUNC_ARGS_PASSTHRU type, module_number ELS_CC
#define SHUTDOWN_FUNC_ARGS int type, int module_number
#define SHUTDOWN_FUNC_ARGS_PASSTHRU type, module_number
#define ZEND_MODULE_INFO_FUNC_ARGS zend_module_entry *zend_module
#define ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU zend_module
#define GINIT_FUNC_ARGS void
#define GINIT_FUNC_ARGS_PASSTHRU
#define STANDARD_MODULE_PROPERTIES_EX 0, 0, NULL, 0
extern unsigned char first_arg_force_ref[];
extern unsigned char first_arg_allow_ref[];
extern unsigned char second_arg_force_ref[];
extern unsigned char second_arg_allow_ref[];
#include "zend.h"
#define ZEND_MODULE_API_NO 20000609
#ifdef ZTS
#define USING_ZTS 1
#else
#define USING_ZTS 0
#endif
#define STANDARD_MODULE_PROPERTIES_EX 0, 0, 0, NULL, 0, ZEND_DEBUG, USING_ZTS, ZEND_MODULE_API_NO
#define STANDARD_MODULE_PROPERTIES \
NULL, NULL, STANDARD_MODULE_PROPERTIES_EX
@@ -47,10 +64,14 @@ struct _zend_module_entry {
void (*info_func)(ZEND_MODULE_INFO_FUNC_ARGS);
int (*global_startup_func)(void);
int (*global_shutdown_func)(void);
int globals_id;
int module_started;
unsigned char type;
void *handle;
int module_number;
unsigned char zend_debug;
unsigned char zts;
unsigned int zend_api;
};
+21 -27
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -23,8 +23,6 @@
#include "zend.h"
#include "zend_alloc.h"
#include "zend_compile.h"
#include "zend_variables.h"
#include "zend_operators.h"
#include "zend_extensions.h"
#include "zend_API.h"
@@ -32,11 +30,7 @@
static void zend_extension_op_array_ctor_handler(zend_extension *extension, zend_op_array *op_array)
{
if (extension->op_array_ctor) {
if (extension->resource_number>=0) {
extension->op_array_ctor(&op_array->reserved[extension->resource_number]);
} else {
extension->op_array_ctor(NULL);
}
extension->op_array_ctor(op_array);
}
}
@@ -44,11 +38,7 @@ static void zend_extension_op_array_ctor_handler(zend_extension *extension, zend
static void zend_extension_op_array_dtor_handler(zend_extension *extension, zend_op_array *op_array)
{
if (extension->op_array_dtor) {
if (extension->resource_number>=0) {
extension->op_array_dtor(&op_array->reserved[extension->resource_number]);
} else {
extension->op_array_dtor(NULL);
}
extension->op_array_dtor(op_array);
}
}
@@ -60,9 +50,9 @@ static void op_array_alloc_ops(zend_op_array *op_array)
void init_op_array(zend_op_array *op_array, int initial_ops_size)
void init_op_array(zend_op_array *op_array, int type, int initial_ops_size)
{
op_array->type = ZEND_USER_FUNCTION;
op_array->type = type;
#if SUPPORT_INTERACTIVE
{
ELS_FETCH();
@@ -78,7 +68,7 @@ void init_op_array(zend_op_array *op_array, int initial_ops_size)
}
#endif
op_array->refcount = (int *) emalloc(sizeof(int));
op_array->refcount = (zend_uint *) emalloc(sizeof(zend_uint));
*op_array->refcount = 1;
op_array->size = initial_ops_size;
op_array->last = 0;
@@ -100,6 +90,7 @@ void init_op_array(zend_op_array *op_array, int initial_ops_size)
op_array->uses_globals = 0;
op_array->return_reference = 0;
op_array->done_pass_two = 0;
zend_llist_apply_with_argument(&zend_extensions, (void (*)(void *, void *)) zend_extension_op_array_ctor_handler, op_array);
}
@@ -187,27 +178,26 @@ ZEND_API void destroy_op_array(zend_op_array *op_array)
if (op_array->brk_cont_array) {
efree(op_array->brk_cont_array);
}
zend_llist_apply_with_argument(&zend_extensions, (void (*)(void *, void *)) zend_extension_op_array_dtor_handler, op_array);
if (op_array->done_pass_two) {
zend_llist_apply_with_argument(&zend_extensions, (void (*)(void *, void *)) zend_extension_op_array_dtor_handler, op_array);
}
}
void init_op(zend_op *op CLS_DC)
{
memset(&op->result, 0, sizeof(znode));
op->lineno = CG(zend_lineno);
op->filename = zend_get_compiled_filename(CLS_C);
op->result.op_type = IS_UNUSED;
op->extended_value = 0;
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;
memset(&op->op1, 0, sizeof(znode));
memset(&op->op2, 0, sizeof(znode));
}
zend_op *get_next_op(zend_op_array *op_array CLS_DC)
{
int next_op_num = op_array->last++;
zend_uint next_op_num = op_array->last++;
zend_op *next_op;
if (next_op_num >= op_array->size) {
@@ -302,11 +292,12 @@ int pass_two(zend_op_array *op_array)
if (CG(handle_op_arrays)) {
zend_llist_apply_with_argument(&zend_extensions, (void (*)(void *, void *)) zend_extension_op_array_handler, op_array);
}
op_array->done_pass_two = 1;
return 0;
}
void pass_include_eval(zend_op_array *op_array)
ZEND_API void pass_include_eval(zend_op_array *op_array)
{
zend_op *opline=op_array->opcodes, *end=opline+op_array->last;
@@ -386,6 +377,9 @@ ZEND_API void *get_binary_op(int opcode)
case ZEND_IS_IDENTICAL:
return (void *) is_identical_function;
break;
case ZEND_IS_NOT_IDENTICAL:
return (void *) is_not_identical_function;
break;
case ZEND_IS_EQUAL:
return (void *) is_equal_function;
break;
+314 -101
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -23,6 +23,7 @@
#include <stdlib.h>
#include <limits.h>
#include <ctype.h>
#include <math.h>
#include "zend.h"
#include "zend_operators.h"
@@ -31,11 +32,55 @@
#include "zend_list.h"
#include "zend_fast_cache.h"
#if WITH_BCMATH
#include "ext/bcmath/number.h"
#endif
ZEND_API double zend_string_to_double(const char *number, zend_uint length)
{
double divisor = 10.0;
double result = 0.0;
double exponent;
const char *end = number+length;
const char *digit = number;
if (!length) {
return result;
}
while (digit < end) {
if ((*digit <= '9' && *digit >= '0')) {
result *= 10;
result += *digit - '0';
} else if (*digit == '.') {
digit++;
break;
} else if (toupper(*digit) == 'E') {
exponent = (double) atoi(digit+1);
result *= pow(10.0, exponent);
return result;
} else {
return result;
}
digit++;
}
while (digit < end) {
if ((*digit <= '9' && *digit >= '0')) {
result += (*digit - '0') / divisor;
divisor *= 10;
} else if (toupper(*digit) == 'E') {
exponent = (double) atoi(digit+1);
result *= pow(10.0, exponent);
return result;
} else {
return result;
}
digit++;
}
return result;
}
ZEND_API void convert_scalar_to_number(zval *op)
{
@@ -312,7 +357,7 @@ ZEND_API void convert_to_boolean(zval *op)
}
ZEND_API void convert_to_string(zval *op)
ZEND_API void _convert_to_string(zval *op ZEND_FILE_LINE_DC)
{
long lval;
double dval;
@@ -327,34 +372,40 @@ ZEND_API void convert_to_string(zval *op)
break;
case IS_BOOL:
if (op->value.lval) {
op->value.str.val = estrndup("1", 1);
op->value.str.val = estrndup_rel("1", 1);
op->value.str.len = 1;
} else {
op->value.str.val = empty_string;
op->value.str.len = 0;
}
break;
case IS_RESOURCE: {
long tmp = op->value.lval;
op->value.str.val = (char *) emalloc(sizeof("Resource id #")-1 + MAX_LENGTH_OF_LONG);
op->value.str.len = sprintf(op->value.str.val, "Resource id #%ld", tmp);
break;
}
case IS_LONG:
lval = op->value.lval;
op->value.str.val = (char *) emalloc(MAX_LENGTH_OF_LONG + 1);
op->value.str.val = (char *) emalloc_rel(MAX_LENGTH_OF_LONG + 1);
op->value.str.len = zend_sprintf(op->value.str.val, "%ld", lval); /* SAFE */
break;
case IS_DOUBLE: {
dval = op->value.dval;
op->value.str.val = (char *) emalloc(MAX_LENGTH_OF_DOUBLE + EG(precision) + 1);
op->value.str.val = (char *) emalloc_rel(MAX_LENGTH_OF_DOUBLE + EG(precision) + 1);
op->value.str.len = zend_sprintf(op->value.str.val, "%.*G", (int) EG(precision), dval); /* SAFE */
/* %G already handles removing trailing zeros from the fractional part, yay */
break;
}
case IS_ARRAY:
zval_dtor(op);
op->value.str.val = estrndup("Array",sizeof("Array")-1);
op->value.str.val = estrndup_rel("Array",sizeof("Array")-1);
op->value.str.len = sizeof("Array")-1;
break;
case IS_OBJECT:
zval_dtor(op);
op->value.str.val = estrndup("Object",sizeof("Object")-1);
op->value.str.val = estrndup_rel("Object",sizeof("Object")-1);
op->value.str.len = sizeof("Object")-1;
break;
default:
@@ -726,7 +777,8 @@ ZEND_API int bitwise_or_function(zval *result, zval *op1, zval *op2)
if (op1->type == IS_STRING && op2->type == IS_STRING) {
zval *longer, *shorter;
int i;
char *result_str;
int i, result_len;
if (op1->value.str.len >= op2->value.str.len) {
longer = op1;
@@ -736,11 +788,17 @@ ZEND_API int bitwise_or_function(zval *result, zval *op1, zval *op2)
shorter = op1;
}
result->value.str.len = longer->value.str.len;
result->value.str.val = estrndup(longer->value.str.val, longer->value.str.len);
result->type = IS_STRING;
result_len = longer->value.str.len;
result_str = estrndup(longer->value.str.val, longer->value.str.len);
for (i = 0; i < shorter->value.str.len; i++) {
result->value.str.val[i] |= shorter->value.str.val[i];
result_str[i] |= shorter->value.str.val[i];
}
if (result==op1) {
efree(result->value.str.val);
}
result->value.str.val = result_str;
result->value.str.len = result_len;
return SUCCESS;
}
zendi_convert_to_long(op1, op1_copy, result);
@@ -758,7 +816,8 @@ ZEND_API int bitwise_and_function(zval *result, zval *op1, zval *op2)
if (op1->type == IS_STRING && op2->type == IS_STRING) {
zval *longer, *shorter;
int i;
char *result_str;
int i, result_len;
if (op1->value.str.len >= op2->value.str.len) {
longer = op1;
@@ -768,11 +827,17 @@ ZEND_API int bitwise_and_function(zval *result, zval *op1, zval *op2)
shorter = op1;
}
result->value.str.len = shorter->value.str.len;
result->value.str.val = estrndup(shorter->value.str.val, shorter->value.str.len);
result->type = IS_STRING;
result_len = shorter->value.str.len;
result_str = estrndup(shorter->value.str.val, shorter->value.str.len);
for (i = 0; i < shorter->value.str.len; i++) {
result->value.str.val[i] &= longer->value.str.val[i];
result_str[i] &= longer->value.str.val[i];
}
if (result==op1) {
efree(result->value.str.val);
}
result->value.str.val = result_str;
result->value.str.len = result_len;
return SUCCESS;
}
@@ -792,7 +857,8 @@ ZEND_API int bitwise_xor_function(zval *result, zval *op1, zval *op2)
if (op1->type == IS_STRING && op2->type == IS_STRING) {
zval *longer, *shorter;
int i;
char *result_str;
int i, result_len;
if (op1->value.str.len >= op2->value.str.len) {
longer = op1;
@@ -802,11 +868,17 @@ ZEND_API int bitwise_xor_function(zval *result, zval *op1, zval *op2)
shorter = op1;
}
result->value.str.len = shorter->value.str.len;
result->value.str.val = estrndup(shorter->value.str.val, shorter->value.str.len);
result->type = IS_STRING;
result_len = shorter->value.str.len;
result_str = estrndup(shorter->value.str.val, shorter->value.str.len);
for (i = 0; i < shorter->value.str.len; i++) {
result->value.str.val[i] ^= longer->value.str.val[i];
result_str[i] ^= longer->value.str.val[i];
}
if (result==op1) {
efree(result->value.str.val);
}
result->value.str.val = result_str;
result->value.str.len = result_len;
return SUCCESS;
}
@@ -849,7 +921,7 @@ ZEND_API int add_char_to_string(zval *result, zval *op1, zval *op2)
{
result->value.str.len = op1->value.str.len + 1;
result->value.str.val = (char *) erealloc(op1->value.str.val, result->value.str.len+1);
result->value.str.val[result->value.str.len - 1] = op2->value.chval;
result->value.str.val[result->value.str.len - 1] = (char) op2->value.lval;
result->value.str.val[result->value.str.len] = 0;
result->type = IS_STRING;
return SUCCESS;
@@ -914,10 +986,70 @@ ZEND_API int concat_function(zval *result, zval *op1, zval *op2)
}
ZEND_API int string_compare_function(zval *result, zval *op1, zval *op2)
{
zval op1_copy, 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;
}
result->value.lval = zend_binary_zval_strcmp(op1, op2);
result->type = IS_LONG;
if (use_copy1) {
zval_dtor(op1);
}
if (use_copy2) {
zval_dtor(op2);
}
return SUCCESS;
}
ZEND_API int numeric_compare_function(zval *result, zval *op1, zval *op2)
{
zval op1_copy, op2_copy;
op1_copy = *op1;
zval_copy_ctor(&op1_copy);
op2_copy = *op2;
zval_copy_ctor(&op2_copy);
convert_to_double(&op1_copy);
convert_to_double(&op2_copy);
result->value.lval = ZEND_NORMALIZE_BOOL(op1_copy.value.dval-op2_copy.value.dval);
result->type = IS_LONG;
return SUCCESS;
}
ZEND_API int compare_function(zval *result, zval *op1, zval *op2)
{
zval op1_copy, op2_copy;
if ((op1->type == IS_NULL && op2->type == IS_STRING)
|| (op2->type == IS_NULL && op1->type == IS_STRING)) {
if (op1->type == IS_NULL) {
result->type = IS_LONG;
result->value.lval = zend_binary_strcmp("", 0, op2->value.str.val, op2->value.str.len);
return SUCCESS;
} else {
result->type = IS_LONG;
result->value.lval = zend_binary_strcmp(op1->value.str.val, op1->value.str.len, "", 0);
return SUCCESS;
}
}
if (op1->type == IS_STRING && op2->type == IS_STRING) {
zendi_smart_strcmp(result, op1, op2);
return SUCCESS;
@@ -928,7 +1060,7 @@ ZEND_API int compare_function(zval *result, zval *op1, zval *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 = ZEND_NORMALIZE_BOOL(op1->value.lval-op2->value.lval);
return SUCCESS;
}
@@ -937,24 +1069,68 @@ ZEND_API int compare_function(zval *result, zval *op1, zval *op2)
if (op1->type == IS_LONG && op2->type == IS_LONG) {
result->type = IS_LONG;
result->value.lval = op1->value.lval - op2->value.lval;
result->value.lval = ZEND_NORMALIZE_BOOL(op1->value.lval-op2->value.lval);
return SUCCESS;
}
if ((op1->type == IS_DOUBLE || op1->type == IS_LONG)
&& (op2->type == IS_DOUBLE || op2->type == IS_LONG)) {
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;
result->value.lval = ZEND_NORMALIZE_BOOL(result->value.dval);
result->type = IS_LONG;
return SUCCESS;
}
if ((op1->type==IS_ARRAY || op1->type==IS_OBJECT)
&& (op2->type==IS_ARRAY || op2->type==IS_OBJECT)) {
zend_error(E_WARNING,"Cannot compare arrays or objects");
if (op1->type==IS_ARRAY && op2->type==IS_ARRAY) {
zend_compare_arrays(result, op1, op2);
return SUCCESS;
}
if (op1->type==IS_OBJECT && op2->type==IS_OBJECT) {
zend_compare_objects(result, op1, op2);
return SUCCESS;
}
if (op1->type==IS_ARRAY) {
result->value.lval = 1;
result->type = IS_LONG;
return SUCCESS;
}
if (op2->type==IS_ARRAY) {
result->value.lval = -1;
result->type = IS_LONG;
return SUCCESS;
}
if (op1->type==IS_OBJECT) {
result->value.lval = 1;
result->type = IS_LONG;
return SUCCESS;
}
if (op2->type==IS_OBJECT) {
result->value.lval = -1;
result->type = IS_LONG;
return SUCCESS;
}
var_reset(result);
return FAILURE;
}
static int hash_zval_identical_function(const zval **z1, const zval **z2)
{
zval result;
/* is_identical_function() returns 1 in case of identity and 0 in case
* of a difference;
* whereas this comparison function is expected to return 0 on identity,
* and non zero otherwise.
*/
if (is_identical_function(&result, (zval *) *z1, (zval *) *z2)==FAILURE) {
return 1;
}
return !result.value.lval;
}
ZEND_API int is_identical_function(zval *result, zval *op1, zval *op2)
{
result->type = IS_BOOL;
@@ -965,17 +1141,14 @@ ZEND_API int is_identical_function(zval *result, zval *op1, zval *op2)
switch (op1->type) {
case IS_NULL:
result->value.lval = (op2->type==IS_NULL);
return SUCCESS;
break;
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)
@@ -984,17 +1157,44 @@ ZEND_API int is_identical_function(zval *result, zval *op1, zval *op2)
} else {
result->value.lval = 0;
}
return SUCCESS;
break;
case IS_ARRAY:
case IS_OBJECT:
zend_error(E_WARNING,"Cannot compare arrays or objects");
if (zend_hash_compare(op1->value.ht, op2->value.ht, (compare_func_t) hash_zval_identical_function, 1)==0) {
result->value.lval = 1;
} else {
result->value.lval = 0;
}
break;
case IS_OBJECT:
if (op1->value.obj.ce != op2->value.obj.ce) {
result->value.lval = 0;
} else {
if (zend_hash_compare(op1->value.obj.properties, op2->value.obj.properties, (compare_func_t) hash_zval_identical_function, 1)==0) {
result->value.lval = 1;
} else {
result->value.lval = 0;
}
}
break;
default:
var_reset(result);
return FAILURE;
}
var_reset(result);
return FAILURE;
return SUCCESS;
}
ZEND_API int is_not_identical_function(zval *result, zval *op1, zval *op2)
{
result->type = IS_BOOL;
if (is_identical_function( result, op1, op2 ) == FAILURE) {
return FAILURE;
}
result->value.lval = !result->value.lval;
return SUCCESS;
}
ZEND_API int is_equal_function(zval *result, zval *op1, zval *op2)
{
if (compare_function(result, op1, op2) == FAILURE) {
@@ -1031,6 +1231,7 @@ ZEND_API int is_smaller_function(zval *result, zval *op1, zval *op2)
return FAILURE;
}
if (result->type == IS_LONG) {
result->type = IS_BOOL;
if (result->value.lval < 0) {
result->value.lval = 1;
} else {
@@ -1039,7 +1240,7 @@ ZEND_API int is_smaller_function(zval *result, zval *op1, zval *op2)
return SUCCESS;
}
if (result->type == IS_DOUBLE) {
result->type = IS_LONG;
result->type = IS_BOOL;
if (result->value.dval < 0) {
result->value.lval = 1;
} else {
@@ -1058,6 +1259,7 @@ ZEND_API int is_smaller_or_equal_function(zval *result, zval *op1, zval *op2)
return FAILURE;
}
if (result->type == IS_LONG) {
result->type = IS_BOOL;
if (result->value.lval <= 0) {
result->value.lval = 1;
} else {
@@ -1066,7 +1268,7 @@ ZEND_API int is_smaller_or_equal_function(zval *result, zval *op1, zval *op2)
return SUCCESS;
}
if (result->type == IS_DOUBLE) {
result->type = IS_LONG;
result->type = IS_BOOL;
if (result->value.dval <= 0) {
result->value.lval = 1;
} else {
@@ -1254,21 +1456,39 @@ ZEND_API int zend_binary_strncmp(char *s1, uint len1, char *s2, uint len2, uint
ZEND_API int zend_binary_strcasecmp(char *s1, uint len1, char *s2, uint len2)
{
unsigned char c1 = 0, c2 = 0;
int len;
int c1,c2;
if (len1 != len2 || !len1) {
return len1 - len2;
}
len = MIN(len1, len2);
while (len1--) {
while (len--) {
c1 = tolower(*s1++);
c2 = tolower(*s2++);
if (c1 != c2) {
break;
return c1 - c2;
}
}
return c1 - c2;
return len1 - len2;
}
ZEND_API int zend_binary_strncasecmp(char *s1, uint len1, char *s2, uint len2, uint length)
{
int len;
int c1,c2;
len = MIN(length, MIN(len1, len2));
while (len--) {
c1 = tolower(*s1++);
c2 = tolower(*s2++);
if (c1 != c2) {
return c1 - c2;
}
}
return len1 - len2;
}
@@ -1289,6 +1509,12 @@ ZEND_API int zend_binary_zval_strcasecmp(zval *s1, zval *s2)
}
ZEND_API int zend_binary_zval_strncasecmp(zval *s1, zval *s2, zval *s3)
{
return zend_binary_strncasecmp(s1->value.str.val, s1->value.str.len, s2->value.str.val, s2->value.str.len, s3->value.lval);
}
ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2)
{
int ret1,ret2;
@@ -1307,6 +1533,7 @@ ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2)
str2num(&first,s1->value.str.val,100); /* this scale should do */
str2num(&second,s2->value.str.val,100); /* ditto */
result->value.lval = bc_compare(first,second);
result->value.lval = ZEND_NORMALIZE_BOOL(result->value.lval);
result->type = IS_LONG;
free_num(&first);
free_num(&second);
@@ -1319,79 +1546,65 @@ ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2)
dval2 = strtod(s2->value.str.val, NULL);
}
result->value.dval = dval1 - dval2;
result->type = IS_DOUBLE;
result->value.lval = ZEND_NORMALIZE_BOOL(result->value.dval);
result->type = IS_LONG;
} else { /* they both have to be long's */
result->value.lval = lval1 - lval2;
result->value.lval = ZEND_NORMALIZE_BOOL(result->value.lval);
result->type = IS_LONG;
}
} else {
result->value.lval = zend_binary_zval_strcmp(s1, s2);
result->value.lval = ZEND_NORMALIZE_BOOL(result->value.lval);
result->type = IS_LONG;
}
return;
}
static int hash_zval_compare_function(const zval **z1, const zval **z2)
{
zval result;
if (compare_function(&result, (zval *) *z1, (zval *) *z2)==FAILURE) {
return 1;
}
return result.value.lval;
}
ZEND_API void zend_compare_symbol_tables(zval *result, HashTable *ht1, HashTable *ht2)
{
result->type = IS_LONG;
result->value.lval = zend_hash_compare(ht1, ht2, (compare_func_t) hash_zval_compare_function, 0);
}
ZEND_API void zend_compare_arrays(zval *result, zval *a1, zval *a2)
{
zend_compare_symbol_tables(result, a1->value.ht, a2->value.ht);
}
ZEND_API void zend_compare_objects(zval *result, zval *o1, zval *o2)
{
if (o1->value.obj.ce != o2->value.obj.ce) {
result->value.lval = 1; /* Comparing objects of different types is pretty much meaningless */
result->type = IS_LONG;
return;
}
zend_compare_symbol_tables(result, o1->value.obj.properties, o2->value.obj.properties);
}
/* returns 0 for non-numeric string
* returns IS_DOUBLE for floating point string, and assigns the value to *dval (if it's not NULL)
* returns IS_LONG for integer strings, and assigns the value to *lval (if it's not NULL)
* returns FLAG_IS_BC if the number might lose accuracy when converted to a double
*/
#if 1
ZEND_API inline int is_numeric_string(char *str, int length, long *lval, double *dval)
{
long local_lval;
double local_dval;
char *end_ptr;
if (!length) {
return 0;
}
errno=0;
local_lval = strtol(str, &end_ptr, 10);
if (errno!=ERANGE && end_ptr == str+length) { /* integer string */
if (lval) {
*lval = local_lval;
}
return IS_LONG;
}
errno=0;
local_dval = strtod(str, &end_ptr);
if (errno!=ERANGE && end_ptr == str+length) { /* floating point string */
if (dval) {
*dval = local_dval;
}
#if WITH_BCMATH
if (length>16) {
register char *ptr=str, *end=str+length;
while(ptr<end) {
switch(*ptr++) {
case 'e':
case 'E':
/* scientific notation, not handled by the BC library */
return IS_DOUBLE;
break;
default:
break;
}
}
return FLAG_IS_BC;
} else {
return IS_DOUBLE;
}
#else
return IS_DOUBLE;
#endif
}
return 0;
}
#else
#if 0
static inline int is_numeric_string(char *str, int length, long *lval, double *dval)
{
+130 -7
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -18,8 +18,19 @@
*/
#ifndef _OPERATORS_H
#define _OPERATORS_H
#ifndef ZEND_OPERATORS_H
#define ZEND_OPERATORS_H
#include <errno.h>
#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
#if WITH_BCMATH
#include "ext/bcmath/number.h"
#endif
#define MAX_LENGTH_OF_LONG 18
#define MAX_LENGTH_OF_DOUBLE 32
@@ -43,17 +54,77 @@ ZEND_API int concat_function(zval *result, zval *op1, zval *op2);
ZEND_API int is_equal_function(zval *result, zval *op1, zval *op2);
ZEND_API int is_identical_function(zval *result, zval *op1, zval *op2);
ZEND_API int is_not_identical_function(zval *result, zval *op1, zval *op2);
ZEND_API int is_not_equal_function(zval *result, zval *op1, zval *op2);
ZEND_API int is_smaller_function(zval *result, zval *op1, zval *op2);
ZEND_API int is_smaller_or_equal_function(zval *result, zval *op1, zval *op2);
ZEND_API inline int is_numeric_string(char *str, int length, long *lval, double *dval);
ZEND_API inline int is_numeric_string(char *str, int length, long *lval, double *dval)
#if defined(C9X_INLINE_SEMANTICS)
{
long local_lval;
double local_dval;
char *end_ptr;
if (!length) {
return 0;
}
errno=0;
local_lval = strtol(str, &end_ptr, 10);
if (errno!=ERANGE && end_ptr == str+length) { /* integer string */
if (lval) {
*lval = local_lval;
}
return IS_LONG;
}
errno=0;
local_dval = strtod(str, &end_ptr);
if (errno!=ERANGE && end_ptr == str+length) { /* floating point string */
if (! zend_finite(local_dval)) {
/* "inf","nan" and maybe other weird ones */
return 0;
}
if (dval) {
*dval = local_dval;
}
#if WITH_BCMATH
if (length>16) {
register char *ptr=str, *end=str+length;
while(ptr<end) {
switch(*ptr++) {
case 'e':
case 'E':
/* scientific notation, not handled by the BC library */
return IS_DOUBLE;
break;
default:
break;
}
}
return FLAG_IS_BC;
} else {
return IS_DOUBLE;
}
#else
return IS_DOUBLE;
#endif
}
return 0;
}
#else
;
#endif
ZEND_API int increment_function(zval *op1);
ZEND_API int decrement_function(zval *op2);
BEGIN_EXTERN_C()
ZEND_API void convert_scalar_to_number(zval *op);
ZEND_API void convert_to_string(zval *op);
ZEND_API void _convert_to_string(zval *op ZEND_FILE_LINE_DC);
ZEND_API void convert_to_long(zval *op);
ZEND_API void convert_to_double(zval *op);
ZEND_API void convert_to_long_base(zval *op, int base);
@@ -63,19 +134,31 @@ ZEND_API void convert_to_array(zval *op);
ZEND_API void convert_to_object(zval *op);
ZEND_API int add_char_to_string(zval *result, zval *op1, zval *op2);
ZEND_API int add_string_to_string(zval *result, zval *op1, zval *op2);
#define convert_to_string(op) _convert_to_string((op) ZEND_FILE_LINE_CC)
ZEND_API double zend_string_to_double(const char *number, zend_uint length);
END_EXTERN_C()
ZEND_API int zval_is_true(zval *op);
ZEND_API int compare_function(zval *result, zval *op1, zval *op2);
ZEND_API int numeric_compare_function(zval *result, zval *op1, zval *op2);
ZEND_API int string_compare_function(zval *result, zval *op1, zval *op2);
ZEND_API void zend_str_tolower(char *str, unsigned int length);
ZEND_API int zend_binary_zval_strcmp(zval *s1, zval *s2);
ZEND_API int zend_binary_zval_strncmp(zval *s1, zval *s2, zval *s3);
ZEND_API int zend_binary_zval_strcasecmp(zval *s1, zval *s2);
ZEND_API int zend_binary_zval_strncasecmp(zval *s1, zval *s2, zval *s3);
ZEND_API int zend_binary_strcmp(char *s1, uint len1, char *s2, uint len2);
ZEND_API int zend_binary_strncmp(char *s1, uint len1, char *s2, uint len2, uint length);
ZEND_API int zend_binary_strcasecmp(char *s1, uint len1, char *s2, uint len2);
ZEND_API int zend_binary_strncasecmp(char *s1, uint len1, char *s2, uint len2, uint length);
ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2);
ZEND_API void zend_compare_symbol_tables(zval *result, HashTable *ht1, HashTable *ht2);
ZEND_API void zend_compare_arrays(zval *result, zval *a1, zval *a2);
ZEND_API void zend_compare_objects(zval *result, zval *o1, zval *o2);
#define convert_to_ex_master(ppzv, lower_type, upper_type) \
if ((*ppzv)->type!=IS_##upper_type) { \
@@ -85,6 +168,13 @@ ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2);
convert_to_##lower_type(*ppzv); \
}
#define convert_to_writable_ex_master(ppzv, lower_type, upper_type) \
if ((*ppzv)->type!=IS_##upper_type) { \
SEPARATE_ZVAL(ppzv); \
convert_to_##lower_type(*ppzv); \
}
#define convert_to_boolean_ex(ppzv) convert_to_ex_master(ppzv, boolean, BOOL)
#define convert_to_long_ex(ppzv) convert_to_ex_master(ppzv, long, LONG)
#define convert_to_double_ex(ppzv) convert_to_ex_master(ppzv, double, DOUBLE)
@@ -93,6 +183,15 @@ ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2);
#define convert_to_object_ex(ppzv) convert_to_ex_master(ppzv, object, OBJECT)
#define convert_to_null_ex(ppzv) convert_to_ex_master(ppzv, null, NULL)
#define convert_to_writable_boolean_ex(ppzv) convert_to_writable_ex_master(ppzv, boolean, BOOL)
#define convert_to_writable_long_ex(ppzv) convert_to_writable_ex_master(ppzv, long, LONG)
#define convert_to_writable_double_ex(ppzv) convert_to_writable_ex_master(ppzv, double, DOUBLE)
#define convert_to_writable_string_ex(ppzv) convert_to_writable_ex_master(ppzv, string, STRING)
#define convert_to_writable_array_ex(ppzv) convert_to_writable_ex_master(ppzv, array, ARRAY)
#define convert_to_writable_object_ex(ppzv) convert_to_writable_ex_master(ppzv, object, OBJECT)
#define convert_to_writable_null_ex(ppzv) convert_to_writable_ex_master(ppzv, null, NULL)
#define convert_scalar_to_number_ex(ppzv) \
if ((*ppzv)->type!=IS_LONG && (*ppzv)->type!=IS_DOUBLE) { \
if (!(*ppzv)->is_ref) { \
@@ -101,4 +200,28 @@ ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2);
convert_scalar_to_number(*ppzv); \
}
#define Z_LVAL(zval) (zval).value.lval
#define Z_DVAL(zval) (zval).value.dval
#define Z_STRVAL(zval) (zval).value.str.val
#define Z_STRLEN(zval) (zval).value.str.len
#define Z_ARRVAL(zval) (zval).value.ht
#define Z_LVAL_P(zval_p) Z_LVAL(*zval_p)
#define Z_DVAL_P(zval_p) Z_DVAL(*zval_p)
#define Z_STRVAL_P(zval_p) Z_STRVAL(*zval_p)
#define Z_STRLEN_P(zval_p) Z_STRLEN(*zval_p)
#define Z_ARRVAL_P(zval_p) Z_ARRVAL(*zval_p)
#define Z_LVAL_PP(zval_pp) Z_LVAL(**zval_pp)
#define Z_DVAL_PP(zval_pp) Z_DVAL(**zval_pp)
#define Z_STRVAL_PP(zval_pp) Z_STRVAL(**zval_pp)
#define Z_STRLEN_PP(zval_pp) Z_STRLEN(**zval_pp)
#define Z_ARRVAL_PP(zval_pp) Z_ARRVAL(**zval_pp)
#define Z_TYPE(zval) (zval).type
#define Z_TYPE_P(zval_p) Z_TYPE(*zval_p)
#define Z_TYPE_PP(zval_pp) Z_TYPE(**zval_pp)
#endif
+15 -4
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -104,11 +104,22 @@ ZEND_API void zend_ptr_stack_apply(zend_ptr_stack *stack, void (*func)(void *))
}
ZEND_API void zend_ptr_stack_clean(zend_ptr_stack *stack, void (*func)(void *))
ZEND_API void zend_ptr_stack_clean(zend_ptr_stack *stack, void (*func)(void *), zend_bool free_elements)
{
zend_ptr_stack_apply(stack, func);
if (free_elements) {
int i = stack->top;
while (--i >= 0) {
efree(stack->elements[i]);
}
}
stack->top = 0;
stack->top_element = stack->elements;
}
ZEND_API int zend_ptr_stack_num_elements(zend_ptr_stack *stack)
{
return stack->top;
}
+9 -8
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -18,11 +18,11 @@
*/
#ifndef _ZEND_PTR_STACK_H
#define _ZEND_PTR_STACK_H
#ifndef ZEND_PTR_STACK_H
#define ZEND_PTR_STACK_H
typedef struct _zend_ptr_stack {
short top, max;
int top, max;
void **elements;
void **top_element;
} zend_ptr_stack;
@@ -37,6 +37,7 @@ ZEND_API void *zend_ptr_stack_pop(zend_ptr_stack *stack);
ZEND_API void zend_ptr_stack_n_pop(zend_ptr_stack *stack, int count, ...);
ZEND_API void zend_ptr_stack_destroy(zend_ptr_stack *stack);
ZEND_API void zend_ptr_stack_apply(zend_ptr_stack *stack, void (*func)(void *));
ZEND_API void zend_ptr_stack_clean(zend_ptr_stack *stack, void (*func)(void *));
ZEND_API void zend_ptr_stack_clean(zend_ptr_stack *stack, void (*func)(void *), zend_bool free_elements);
ZEND_API int zend_ptr_stack_num_elements(zend_ptr_stack *stack);
#endif /* _ZEND_PTR_STACK_H */
#endif /* ZEND_PTR_STACK_H */
+3 -3
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+5 -5
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -118,7 +118,7 @@ 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(zend_stack *stack, int type, int (*apply_function)(void *element))
{
int i;
@@ -141,7 +141,7 @@ ZEND_API void zend_stack_apply(zend_stack *stack, int (*apply_function)(void *el
}
ZEND_API void zend_stack_apply_with_argument(zend_stack *stack, int (*apply_function)(void *element, void *arg), int type, void *arg)
ZEND_API void zend_stack_apply_with_argument(zend_stack *stack, int type, int (*apply_function)(void *element, void *arg), void *arg)
{
int i;
+8 -8
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -18,8 +18,8 @@
*/
#ifndef _ZEND_STACK_H
#define _ZEND_STACK_H
#ifndef ZEND_STACK_H
#define ZEND_STACK_H
typedef struct _zend_stack {
int top, max;
@@ -38,10 +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);
ZEND_API void zend_stack_apply(zend_stack *stack, int type, int (*apply_function)(void *element));
ZEND_API void zend_stack_apply_with_argument(zend_stack *stack, int type, int (*apply_function)(void *element, void *arg), void *arg);
#define ZEND_STACK_APPLY_TOPDOWN 1
#define ZEND_STACK_APPLY_BOTTOMUP 2
#endif /* _ZEND_STACK_H */
#endif /* ZEND_STACK_H */
+76
View File
@@ -0,0 +1,76 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
+----------------------------------------------------------------------+
*/
#include <stdlib.h>
#include "zend_static_allocator.h"
/* Not checking emalloc() and erealloc() return values as they are supposed to bailout */
inline static void block_init(Block *block, zend_uint block_size)
{
block->pos = block->bp = (char *) emalloc(block_size);
block->end = block->bp + block_size;
}
inline static char *block_allocate(Block *block, zend_uint size)
{
char *retval = block->pos;
if ((block->pos += size) >= block->end) {
return (char *)NULL;
}
return retval;
}
inline static void block_destroy(Block *block)
{
efree(block->bp);
}
void static_allocator_init(StaticAllocator *sa)
{
sa->Blocks = (Block *) emalloc(sizeof(Block));
block_init(sa->Blocks, ALLOCATOR_BLOCK_SIZE);
sa->num_blocks = 1;
sa->current_block = 0;
}
char *static_allocator_allocate(StaticAllocator *sa, zend_uint size)
{
char *retval;
retval = block_allocate(&sa->Blocks[sa->current_block], size);
if (retval) {
return retval;
}
sa->Blocks = (Block *) erealloc(sa->Blocks, ++sa->num_blocks);
sa->current_block++;
block_init(&sa->Blocks[sa->current_block], (size > ALLOCATOR_BLOCK_SIZE) ? size : ALLOCATOR_BLOCK_SIZE);
retval = block_allocate(&sa->Blocks[sa->current_block], size);
return retval;
}
void static_allocator_destroy(StaticAllocator *sa)
{
zend_uint i;
for (i=0; i<sa->num_blocks; i++) {
block_free(&sa->Blocks[i]);
}
efree(sa->Blocks);
}
+45
View File
@@ -0,0 +1,45 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef ZEND_STATIC_ALLOCATOR_H
#define ZEND_STATIC_ALLOCATOR_H
#define ALLOCATOR_BLOCK_SIZE 400000
/* Temporary */
typedef unsigned int zend_uint;
#define emalloc(s) malloc(s)
#define efree(p) free(p)
typedef struct _Block {
char *bp;
char *pos;
char *end;
} Block;
typedef struct _StaticAllocator {
Block *Blocks;
zend_uint num_blocks;
zend_uint current_block;
} StaticAllocator;
void static_allocator_init(StaticAllocator *sa);
char *static_allocator_allocate(StaticAllocator *sa, zend_uint size);
void static_allocator_destroy(StaticAllocator *sa);
#endif /* ZEND_STATIC_ALLOCATOR_H */
+12 -10
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -23,7 +23,6 @@
#include "zend_API.h"
#include "zend_globals.h"
#include "zend_constants.h"
#include "zend_variables.h"
#include "zend_list.h"
ZEND_API char *empty_string = ""; /* in order to save emalloc() and efree() time for
@@ -62,7 +61,8 @@ ZEND_API void _zval_dtor(zval *zvalue ZEND_FILE_LINE_DC)
case IS_CONSTANT:
STR_FREE_REL(zvalue->value.str.val);
break;
case IS_ARRAY: {
case IS_ARRAY:
case IS_CONSTANT_ARRAY: {
ELS_FETCH();
if (zvalue->value.ht && (zvalue->value.ht != &EG(symbol_table))) {
@@ -90,7 +90,7 @@ ZEND_API void _zval_dtor(zval *zvalue ZEND_FILE_LINE_DC)
}
void zval_del_ref(zval **p)
ZEND_API void zval_del_ref(zval **p)
{
(*p)->refcount--;
if ((*p)->refcount==0) {
@@ -100,7 +100,7 @@ void zval_del_ref(zval **p)
}
void zval_add_ref(zval **p)
ZEND_API void zval_add_ref(zval **p)
{
(*p)->refcount++;
}
@@ -116,6 +116,7 @@ ZEND_API int _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
case IS_LONG:
case IS_NULL:
break;
case IS_CONSTANT:
case IS_STRING:
if (zvalue->value.str.val) {
if (zvalue->value.str.len==0) {
@@ -125,7 +126,8 @@ ZEND_API int _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
}
zvalue->value.str.val = (char *) estrndup_rel(zvalue->value.str.val, zvalue->value.str.len);
break;
case IS_ARRAY: {
case IS_ARRAY:
case IS_CONSTANT_ARRAY: {
zval *tmp;
HashTable *original_ht = zvalue->value.ht;
ELS_FETCH();
@@ -136,7 +138,7 @@ ZEND_API int _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
} else if (zvalue->value.ht==&EG(symbol_table)) {
return SUCCESS; /* do nothing */
}
zvalue->value.ht = (HashTable *) emalloc_rel(sizeof(HashTable));
ALLOC_HASHTABLE_REL(zvalue->value.ht);
zend_hash_init(zvalue->value.ht, 0, NULL, ZVAL_PTR_DTOR, 0);
zend_hash_copy(zvalue->value.ht, original_ht, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
}
@@ -145,7 +147,7 @@ ZEND_API int _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
zval *tmp;
HashTable *original_ht = zvalue->value.obj.properties;
zvalue->value.obj.properties = (HashTable *) emalloc_rel(sizeof(HashTable));
ALLOC_HASHTABLE_REL(zvalue->value.obj.properties);
zend_hash_init(zvalue->value.obj.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
zend_hash_copy(zvalue->value.obj.properties, original_ht, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
}
+7 -7
View File
@@ -2,12 +2,12 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2000 Andi Gutmans, Zeev Suraski |
| Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 0.91 of the Zend license, |
| This source file is subject to version 0.92 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.zend.com/license/0_91.txt. |
| http://www.zend.com/license/0_92.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
@@ -18,8 +18,8 @@
*/
#ifndef _VARIABLES_H
#define _VARIABLES_H
#ifndef ZEND_VARIABLES_H
#define ZEND_VARIABLES_H
ZEND_API int zend_print_variable(zval *var);
@@ -48,8 +48,8 @@ ZEND_API void _zval_ptr_dtor_wrapper(zval **zval_ptr);
END_EXTERN_C()
void zval_add_ref(zval **p);
void zval_del_ref(zval **p);
ZEND_API void zval_add_ref(zval **p);
ZEND_API void zval_del_ref(zval **p);
#define ZVAL_DESTRUCTOR (void (*)(void *)) zval_dtor_wrapper
#define ZVAL_PTR_DTOR (void (*)(void *)) zval_ptr_dtor_wrapper
+1 -126
View File
@@ -1,126 +1 @@
/* This is the default configuration file to read -*- C -*- */
/* these are defined by automake */
#undef PACKAGE
#undef VERSION
#undef HAVE_LIBDL
#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 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 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
#undef BROKEN_SPRINTF
#if BROKEN_SPRINTF
#define sprintf php_sprintf
#endif
/* Leave this file alone */
+427 -52
View File
@@ -2,6 +2,281 @@ dnl $Id$
dnl
dnl This file contains local autoconf functions.
sinclude(dynlib.m4)
dnl PHP_EVAL_LIBLINE(LINE, SHARED-LIBADD)
dnl
dnl Use this macro, if you need to add libraries and or library search
dnl paths to the PHP build system which are only given in compiler
dnl notation.
dnl
AC_DEFUN(PHP_EVAL_LIBLINE,[
for ac_i in $1; do
case "$ac_i" in
-l*)
ac_ii=`echo $ac_i|cut -c 3-`
AC_ADD_LIBRARY($ac_ii,,$2)
;;
-L*)
ac_ii=`echo $ac_i|cut -c 3-`
AC_ADD_LIBPATH($ac_ii,$2)
;;
esac
done
])
dnl PHP_EVAL_INCLINE(LINE)
dnl
dnl Use this macro, if you need to add header search paths to the PHP
dnl build system which are only given in compiler notation.
dnl
AC_DEFUN(PHP_EVAL_INCLINE,[
for ac_i in $1; do
case "$ac_i" in
-I*)
ac_ii=`echo $ac_i|cut -c 3-`
AC_ADD_INCLUDE($ac_ii)
;;
esac
done
])
AC_DEFUN(PHP_READDIR_R_TYPE,[
dnl HAVE_READDIR_R is also defined by libmysql
AC_CHECK_FUNC(readdir_r,ac_cv_func_readdir_r=yes,ac_cv_func_readdir=no)
if test "$ac_cv_func_readdir_r" = "yes"; then
AC_CACHE_CHECK(for type of readdir_r, ac_cv_what_readdir_r,[
AC_TRY_RUN([
#define _REENTRANT
#include <sys/types.h>
#include <dirent.h>
main() {
DIR *dir;
struct dirent entry, *pentry;
dir = opendir("/");
if (!dir)
exit(1);
if (readdir_r(dir, &entry, &pentry) == 0)
exit(0);
exit(1);
}
],[
ac_cv_what_readdir_r=POSIX
],[
AC_TRY_CPP([
#define _REENTRANT
#include <sys/types.h>
#include <dirent.h>
int readdir_r(DIR *, struct dirent *);
],[
ac_cv_what_readdir_r=old-style
],[
ac_cv_what_readdir_r=none
])
],[
ac_cv_what_readdir_r=none
])
])
case "$ac_cv_what_readdir_r" in
POSIX)
AC_DEFINE(HAVE_POSIX_READDIR_R,1,[whether you have POSIX readdir_r]);;
old-style)
AC_DEFINE(HAVE_OLD_READDIR_R,1,[whether you have old-style readdir_r]);;
esac
fi
])
AC_DEFUN(PHP_SHLIB_SUFFIX_NAME,[
PHP_SUBST(SHLIB_SUFFIX_NAME)
SHLIB_SUFFIX_NAME=so
case "$host_alias" in
*hpux*)
SHLIB_SUFFIX_NAME=sl
;;
esac
])
AC_DEFUN(PHP_DEBUG_MACRO,[
DEBUG_LOG="$1"
cat >$1 <<X
CONFIGURE: $CONFIGURE_COMMAND
CC: $CC
CFLAGS: $CFLAGS
CPPFLAGS: $CPPFLAGS
CXX: $CXX
CXXFLAGS: $CXXFLAGS
INCLUDES: $INCLUDES
LDFLAGS: $LDFLAGS
LIBS: $LIBS
DLIBS: $DLIBS
SAPI: $PHP_SAPI
PHP_RPATHS: $PHP_RPATHS
uname -a: `uname -a`
X
cat >conftest.$ac_ext <<X
main()
{
exit(0);
}
X
(eval echo \"$ac_link\"; eval $ac_link && ./conftest) >>$1 2>&1
rm -fr conftest*
])
AC_DEFUN(PHP_MISSING_TIME_R_DECL,[
AC_MSG_CHECKING(for missing declarations of reentrant functions)
AC_TRY_COMPILE([#include <time.h>],[struct tm *(*func)() = localtime_r],[
:
],[
AC_DEFINE(MISSING_LOCALTIME_R_DECL,1,[Whether localtime_r is declared])
])
AC_TRY_COMPILE([#include <time.h>],[struct tm *(*func)() = gmtime_r],[
:
],[
AC_DEFINE(MISSING_GMTIME_R_DECL,1,[Whether gmtime_r is declared])
])
AC_TRY_COMPILE([#include <time.h>],[char *(*func)() = asctime_r],[
:
],[
AC_DEFINE(MISSING_ASCTIME_R_DECL,1,[Whether asctime_r is declared])
])
AC_TRY_COMPILE([#include <time.h>],[char *(*func)() = ctime_r],[
:
],[
AC_DEFINE(MISSING_CTIME_R_DECL,1,[Whether ctime_r is declared])
])
AC_TRY_COMPILE([#include <string.h>],[char *(*func)() = strtok_r],[
:
],[
AC_DEFINE(MISSING_STRTOK_R_DECL,1,[Whether strtok_r is declared])
])
AC_MSG_RESULT(done)
])
dnl
dnl PHP_LIBGCC_LIBPATH(gcc)
dnl Stores the location of libgcc in libgcc_libpath
dnl
AC_DEFUN(PHP_LIBGCC_LIBPATH,[
changequote({,})
libgcc_libpath="`$1 --print-libgcc-file-name|sed 's%/*[^/][^/]*$%%'`"
changequote([,])
])
AC_DEFUN(PHP_ARG_ANALYZE,[
case "[$]$1" in
shared,*)
ext_output="yes, shared"
ext_shared=yes
$1=`echo $ac_n "[$]$1$ac_c"|sed s/^shared,//`
;;
shared)
ext_output="yes, shared"
ext_shared=yes
$1=yes
;;
no)
ext_output="no"
ext_shared=no
;;
*)
ext_output="yes"
ext_shared=no
;;
esac
if test "$php_always_shared" = "yes"; then
ext_output="yes, shared"
ext_shared=yes
test "[$]$1" = "no" && $1=yes
fi
AC_MSG_RESULT($ext_output)
])
dnl
dnl PHP_ARG_WITH(arg-name, check message, help text[, default-val])
dnl Sets PHP_ARG_NAME either to the user value or to the default value.
dnl default-val defaults to no.
dnl
AC_DEFUN(PHP_ARG_WITH,[
PHP_REAL_ARG_WITH([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z-,A-Z_))
])
AC_DEFUN(PHP_REAL_ARG_WITH,[
AC_MSG_CHECKING($2)
AC_ARG_WITH($1,[$3],$5=[$]withval,$5=ifelse($4,,no,$4))
PHP_ARG_ANALYZE($5)
])
dnl
dnl PHP_ARG_ENABLE(arg-name, check message, help text[, default-val])
dnl Sets PHP_ARG_NAME either to the user value or to the default value.
dnl default-val defaults to no.
dnl
AC_DEFUN(PHP_ARG_ENABLE,[
PHP_REAL_ARG_ENABLE([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z-,A-Z_))
])
AC_DEFUN(PHP_REAL_ARG_ENABLE,[
AC_MSG_CHECKING($2)
AC_ARG_ENABLE($1,[$3],$5=[$]enableval,$5=ifelse($4,,no,$4))
PHP_ARG_ANALYZE($5)
])
AC_DEFUN(PHP_MODULE_PTR,[
EXTRA_MODULE_PTRS="$EXTRA_MODULE_PTRS $1,"
])
AC_DEFUN(PHP_CONFIG_NICE,[
rm -f $1
cat >$1<<EOF
#! /bin/sh
#
# Created by configure
EOF
for arg in [$]0 "[$]@"; do
echo "\"[$]arg\" \\" >> $1
done
echo '"[$]@"' >> $1
chmod +x $1
])
AC_DEFUN(PHP_TIME_R_TYPE,[
AC_CACHE_CHECK(for type of reentrant time-related functions, ac_cv_time_r_type,[
AC_TRY_RUN([
#include <time.h>
#include <stdlib.h>
main() {
char buf[27];
struct tm t;
time_t old = 0;
int r, s;
s = gmtime_r(&old, &t);
r = (int) asctime_r(&t, buf, 26);
if (r == s && s == 0) exit(0);
exit(1);
}
],[
ac_cv_time_r_type=hpux
],[
ac_cv_time_r_type=POSIX
],[
ac_cv_time_r_type=POSIX
])
])
if test "$ac_cv_time_r_type" = "hpux"; then
AC_DEFINE(PHP_HPUX_TIME_R,1,[Whether you have HP-UX 10.x])
fi
])
AC_DEFUN(PHP_SUBST,[
PHP_VAR_SUBST="$PHP_VAR_SUBST $1"
AC_SUBST($1)
@@ -24,14 +299,17 @@ AC_DEFUN(PHP_MKDIR_P_CHECK,[
])
])
AC_DEFUN(PHP_FAST_GENERATE,[
AC_DEFUN(PHP_GEN_CONFIG_VARS,[
PHP_MKDIR_P_CHECK
echo creating config_vars.mk
> config_vars.mk
for i in $PHP_VAR_SUBST; do
eval echo "$i = \$$i" >> config_vars.mk
done
$SHELL $srcdir/build/fastgen.sh $srcdir $ac_cv_mkdir_p $PHP_FAST_OUTPUT_FILES
])
AC_DEFUN(PHP_GEN_MAKEFILES,[
$SHELL $srcdir/build/fastgen.sh $srcdir $ac_cv_mkdir_p $1
])
AC_DEFUN(PHP_TM_GMTOFF,[
@@ -41,7 +319,7 @@ AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff,
ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)])
if test "$ac_cv_struct_tm_gmtoff" = yes; then
AC_DEFINE(HAVE_TM_GMTOFF)
AC_DEFINE(HAVE_TM_GMTOFF,1,[whether you have tm_gmtoff in struct tm])
fi
])
@@ -53,9 +331,9 @@ AC_DEFUN(PHP_CONFIGURE_PART,[
])
AC_DEFUN(PHP_PROG_SENDMAIL,[
AC_PATH_PROG(PROG_SENDMAIL, sendmail, /usr/lib/sendmail, $PATH /usr/bin /usr/sbin /usr/etc /etc /usr/ucblib)
AC_PATH_PROG(PROG_SENDMAIL, sendmail, /usr/lib/sendmail, $PATH:/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib)
if test -n "$PROG_SENDMAIL"; then
AC_DEFINE(HAVE_SENDMAIL)
AC_DEFINE(HAVE_SENDMAIL,1,[whether you have sendmail])
fi
])
@@ -101,7 +379,7 @@ AC_CACHE_CHECK(for struct flock,ac_cv_struct_flock,
])
)
if test "$ac_cv_struct_flock" = "yes" ; then
AC_DEFINE(HAVE_STRUCT_FLOCK, 1)
AC_DEFINE(HAVE_STRUCT_FLOCK, 1,[whether you have struct flock])
fi
])
@@ -137,6 +415,17 @@ dnl PHP_BUILD_THREAD_SAFE
dnl
AC_DEFUN(PHP_BUILD_THREAD_SAFE,[
enable_experimental_zts=yes
if test "$pthreads_working" != "yes"; then
AC_MSG_ERROR(ZTS currently requires working POSIX threads. Your system does not support this.)
fi
])
AC_DEFUN(PHP_REQUIRE_CXX,[
if test -z "$php_cxx_done"; then
AC_PROG_CXX
AC_PROG_CXXCPP
php_cxx_done=yes
fi
])
dnl
@@ -166,7 +455,9 @@ 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 -cd a-zA-Z0-9`
changequote({,})
unique=`echo $2|sed 's/[^a-zA-Z0-9]/_/g'`
changequote([,])
cmd="echo $ac_n \"\$$1$unique$ac_c\""
if test -n "$unique" && test "`eval $cmd`" = "" ; then
eval "$1$unique=set"
@@ -183,25 +474,31 @@ AC_DEFUN(AC_EXPAND_PATH,[
if test -z "$1" || echo "$1" | grep '^/' >/dev/null ; then
$2="$1"
else
ep_dir="`dirname \"$1\"`"
changequote({,})
ep_dir="`echo $1|sed 's%/*[^/][^/]*$%%'`"
changequote([,])
ep_realdir="`(cd \"$ep_dir\" && pwd)`"
$2="$ep_realdir/`basename \"$1\"`"
fi
])
dnl
dnl AC_ADD_LIBPATH(path)
dnl AC_ADD_LIBPATH(path[, shared-libadd])
dnl
dnl add a library to linkpath/runpath
dnl
AC_DEFUN(AC_ADD_LIBPATH,[
if test "$1" != "/usr/lib"; then
AC_EXPAND_PATH($1, ai_p)
AC_PHP_ONCE(LIBPATH, $ai_p, [
test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
LDFLAGS="$LDFLAGS -L$ai_p"
PHP_RPATHS="$PHP_RPATHS $ai_p"
])
if test "$ext_shared" = "yes" && test -n "$2"; then
$2="-R$1 -L$1 [$]$2"
else
AC_PHP_ONCE(LIBPATH, $ai_p, [
test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p"
LDFLAGS="$LDFLAGS -L$ai_p"
PHP_RPATHS="$PHP_RPATHS $ai_p"
])
fi
fi
])
@@ -211,14 +508,14 @@ dnl
dnl builds RPATH from PHP_RPATHS
dnl
AC_DEFUN(AC_BUILD_RPATH,[
if test "$enable_rpath" = "yes" && test -n "$PHP_RPATHS"; then
if test "$PHP_RPATH" = "yes" && test -n "$PHP_RPATHS"; then
OLD_RPATHS="$PHP_RPATHS"
PHP_RPATHS=""
for i in $OLD_RPATHS; do
PHP_LDFLAGS="$PHP_LDFLAGS -L$i"
PHP_RPATHS="$PHP_RPATHS -R $i"
NATIVE_RPATHS="$NATIVE_RPATHS ${ld_runpath_switch}$i"
done
PHP_RPATHS=""
for i in $OLD_RPATHS; do
PHP_LDFLAGS="$PHP_LDFLAGS -L$i"
PHP_RPATHS="$PHP_RPATHS -R $i"
NATIVE_RPATHS="$NATIVE_RPATHS ${ld_runpath_switch}$i"
done
fi
])
@@ -236,27 +533,75 @@ AC_DEFUN(AC_ADD_INCLUDE,[
fi
])
AC_DEFUN(PHP_X_ADD_LIBRARY,[
ifelse($2,,$3="-l$1 [$]$3", $3="[$]$3 -l$1")
])
dnl
dnl AC_ADD_LIBRARY(library[, append])
dnl AC_ADD_LIBRARY(library[, append[, shared-libadd]])
dnl
dnl add a library to the link line
dnl
AC_DEFUN(AC_ADD_LIBRARY,[
AC_PHP_ONCE(LIBRARY, $1, [
ifelse($#, 1, LIBS="-l$1 $LIBS", LIBS="$LIBS -l$1")
])
case "$1" in
c|c_r|pthread*) ;;
*)
ifelse($3,,[
PHP_X_ADD_LIBRARY($1,$2,LIBS)
],[
if test "$ext_shared" = "yes"; then
PHP_X_ADD_LIBRARY($1,$2,$3)
else
AC_ADD_LIBRARY($1,$2)
fi
])
;;
esac
])
dnl
dnl AC_ADD_LIBRARY_WITH_PATH(library, path)
dnl AC_ADD_LIBRARY_DEFER(library[, append])
dnl
dnl add a library to the link line and path to linkpath/runpath
dnl add a library to the link line (deferred)
AC_DEFUN(AC_ADD_LIBRARY_DEFER,[
ifelse($#, 1, DLIBS="-l$1 $DLIBS", DLIBS="$DLIBS -l$1")
])
dnl
dnl AC_ADD_LIBRARY_WITH_PATH(library, path[, shared-libadd])
dnl
dnl add a library to the link line and path to linkpath/runpath.
dnl if shared-libadd is not empty and $ext_shared is yes,
dnl shared-libadd will be assigned the library information
dnl
AC_DEFUN(AC_ADD_LIBRARY_WITH_PATH,[
AC_ADD_LIBPATH($2)
ifelse($3,,[
if test -n "$2"; then
AC_ADD_LIBPATH($2)
fi
AC_ADD_LIBRARY($1)
],[
if test "$ext_shared" = "yes"; then
$3="-l$1 [$]$3"
if test -n "$2"; then
AC_ADD_LIBPATH($2,$3)
fi
else
AC_ADD_LIBRARY_WITH_PATH($1,$2)
fi
])
])
dnl
dnl AC_ADD_LIBRARY_DEFER_WITH_PATH(library, path)
dnl
dnl add a library to the link line (deferred)
dnl and path to linkpath/runpath (not deferred)
dnl
AC_DEFUN(AC_ADD_LIBRARY_DEFER_WITH_PATH,[
AC_ADD_LIBPATH($2)
AC_ADD_LIBRARY_DEFER($1)
])
AC_DEFUN(AM_SET_LIBTOOL_VARIABLE,[
LIBTOOL='$(SHELL) $(top_builddir)/libtool $1'
@@ -268,7 +613,9 @@ dnl
AC_DEFUN(AC_CHECK_CC_OPTION,[
echo "main(){return 0;}" > conftest.$ac_ext
opt="$1"
var=`echo $ac_n "$opt$ac_c"|tr -c a-zA-Z0-9 _`
changequote({,})
var=`echo $opt|sed 's/[^a-zA-Z0-9]/_/g'`
changequote([,])
AC_MSG_CHECKING([if compiler supports -$1 really])
ac_php_compile="${CC-cc} -$opt -o conftest $CFLAGS $CPPFLAGS conftest.$ac_ext 2>&1"
if eval $ac_php_compile 2>&1 | egrep "$opt" > /dev/null 2>&1 ; then
@@ -290,11 +637,11 @@ 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)
AC_DEFINE(HSREGEX,1,[ ])
AC_DEFINE(REGEX,1,[ ])
PHP_FAST_OUTPUT(regex/Makefile)
elif test "$REGEX_TYPE" = "system"; then
AC_DEFINE(REGEX,0)
AC_DEFINE(REGEX,0,[ ])
fi
AC_MSG_CHECKING(which regex library to use)
@@ -311,10 +658,10 @@ dnl
AC_DEFUN(AC_MISSING_FCLOSE_DECL,[
AC_MSG_CHECKING([for fclose declaration])
AC_TRY_COMPILE([#include <stdio.h>],[int (*func)() = fclose],[
AC_DEFINE(MISSING_FCLOSE_DECL,0)
AC_DEFINE(MISSING_FCLOSE_DECL,0,[ ])
AC_MSG_RESULT(ok)
],[
AC_DEFINE(MISSING_FCLOSE_DECL,1)
AC_DEFINE(MISSING_FCLOSE_DECL,1,[ ])
AC_MSG_RESULT(missing)
])
])
@@ -333,9 +680,9 @@ AC_DEFUN(AC_BROKEN_SPRINTF,[
])
])
if test "$ac_cv_broken_sprintf" = "yes"; then
AC_DEFINE(BROKEN_SPRINTF, 1)
AC_DEFINE(PHP_BROKEN_SPRINTF, 1, [ ])
else
AC_DEFINE(BROKEN_SPRINTF, 0)
AC_DEFINE(PHP_BROKEN_SPRINTF, 0, [ ])
fi
])
@@ -349,21 +696,30 @@ 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_src_base="${abs_srcdir}/ext/$1/"
ext_base="ext/$1/"
EXT_SUBDIRS="$EXT_SUBDIRS $1"
if test "$2" != "shared" && test "$2" != "yes" && test -z "$php_always_shared"; then
_extlib="lib$1.a"
EXT_LTLIBS="$EXT_LTLIBS ext/$1/lib$1.la"
EXT_LIBS="$EXT_LIBS $1/$_extlib"
EXT_STATIC="$EXT_STATIC $1"
else
AC_DEFINE_UNQUOTED([COMPILE_DL_]translit($1,a-z,A-Z), 1, Whether to build $1 as dynamic module)
EXT_SHARED="$EXT_SHARED $1"
fi
PHP_FAST_OUTPUT(ext/$1/Makefile)
EXT_SUBDIRS="$EXT_SUBDIRS $1"
if test -d "$abs_srcdir/ext/$1"; then
dnl ---------------------------------------------- Internal Module
ext_builddir="ext/$1"
ext_srcdir="$abs_srcdir/ext/$1"
else
dnl ---------------------------------------------- External Module
ext_builddir="."
ext_srcdir="$abs_srcdir"
fi
if test "$2" != "shared" && test "$2" != "yes"; then
dnl ---------------------------------------------- Static module
LIB_BUILD($ext_builddir)
EXT_LTLIBS="$EXT_LTLIBS $ext_builddir/lib$1.la"
EXT_STATIC="$EXT_STATIC $1"
else
dnl ---------------------------------------------- Shared module
LIB_BUILD($ext_builddir,yes)
AC_DEFINE_UNQUOTED([COMPILE_DL_]translit($1,a-z-,A-Z_), 1, Whether to build $1 as dynamic module)
fi
PHP_FAST_OUTPUT($ext_builddir/Makefile)
])
PHP_SUBST(EXT_SUBDIRS)
@@ -471,13 +827,13 @@ AC_DEFUN(AC_SOCKADDR_SA_LEN,[
#include <sys/socket.h>],
[struct sockaddr s; s.sa_len;],
[ac_cv_sockaddr_sa_len=yes
AC_DEFINE(HAVE_SOCKADDR_SA_LEN)],
AC_DEFINE(HAVE_SOCKADDR_SA_LEN,1,[ ])],
[ac_cv_sockaddr_sa_len=no])
])
])
dnl ## PHP_AC_OUTPUT(file)
dnl ## PHP_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,[
@@ -503,3 +859,22 @@ AC_DEFUN(PHP_DECLARED_TIMEZONE,[
AC_DEFINE(HAVE_DECLARED_TIMEZONE, 1, [Whether system headers declare timezone])
fi
])
AC_DEFUN(PHP_EBCDIC,[
AC_CACHE_CHECK([whether system uses EBCDIC],ac_cv_ebcdic,[
AC_TRY_RUN( [
int main(void) {
return (unsigned char)'A' != (unsigned char)0xC1;
}
],[
ac_cv_ebcdic="yes"
],[
ac_cv_ebcdic="no"
],[
ac_cv_ebcdic="no"
])])
if test "$ac_cv_ebcdic" = "yes"; then
AC_DEFINE(CHARSET_EBCDIC,1, [Define if system uses EBCDIC])
fi
])
+21 -29
View File
@@ -1,31 +1,22 @@
/* -*- C -*-
+----------------------------------------------------------------------+
| PHP HTML Embedded Scripting Language Version 3.0 |
| PHP version 4.0 |
+----------------------------------------------------------------------+
| Copyright (c) 1997,1998 PHP Development Team (See Credits file) |
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
+----------------------------------------------------------------------+
| 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. |
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Stig Sæther Bakken <ssb@fast.no> |
+----------------------------------------------------------------------+
*/
*/
/* $Id$ */
#define CONFIGURE_COMMAND "@CONFIGURE_COMMAND@"
#define PHP_ADA_INCLUDE ""
@@ -39,7 +30,7 @@
#define PHP_BINNAME "@BINNAME@"
#define PHP_CFLAGS "@CFLAGS@"
#define PHP_DBASE_LIB ""
#define PHP_DEBUG "@DEBUG_CFLAGS@"
#define PHP_BUILD_DEBUG "@DEBUG_CFLAGS@"
#define PHP_GDBM_INCLUDE ""
#define PHP_HSREGEX ""
#define PHP_IBASE_INCLUDE ""
@@ -62,13 +53,12 @@
#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_OCI8_SHARED_LIBADD "@OCI8_SHARED_LIBADD@"
#define PHP_OCI8_DIR "@OCI8_DIR@"
#define PHP_OCI8_VERSION "@OCI8_VERSION@"
#define PHP_ORACLE_SHARED_LIBADD "@ORACLE_SHARED_LIBADD@"
#define PHP_ORACLE_DIR "@ORACLE_DIR@"
#define PHP_ORACLE_VERSION "@ORACLE_VERSION@"
#define PHP_PGSQL_INCLUDE ""
#define PHP_PGSQL_LFLAGS ""
#define PHP_PGSQL_LIBS ""
@@ -88,3 +78,5 @@
#define PHP_LDAP_LIBS ""
#define PHP_VELOCIS_INCLUDE ""
#define PHP_VELOCIS_LIBS ""
#define PHP_EXTENSION_DIR "@EXTENSION_DIR@"
#define PHP_INCLUDE_PATH "@INCLUDE_PATH@"
+6 -13
View File
@@ -39,15 +39,8 @@ acconfig_h_SOURCES = acconfig.h.in $(config_h_files)
targets = $(TOUCH_FILES) $(makefile_in_files) configure $(config_h_in)
all: .deps Zend/Makefile.am TSRM/Makefile.am $(targets)
all: Zend/Makefile.am TSRM/Makefile.am $(targets)
.deps:
@echo creating empty dependencies
for i in `find ext sapi regex -type d \! -name \*CVS`; do \
list="$$list $$i/.deps"; \
done; \
touch $$list pear/.deps $@
Zend/Makefile.am:
test -d Zend || (test -d ../Zend && ln -s ../Zend Zend)
@@ -59,7 +52,7 @@ acconfig.h: $(acconfig_h_SOURCES)
cat $(acconfig_h_SOURCES) > $@
$(makefile_in_files): $(makefile_am_files) aclocal.m4 configure.in $(config_m4_files)
@echo rebuilding Makefile.in\'s
@echo rebuilding Makefile templates
@for i in $(LT_TARGETS); do \
if test -f "$$i"; then \
mv $$i $$i.bak; \
@@ -71,7 +64,7 @@ $(makefile_in_files): $(makefile_am_files) aclocal.m4 configure.in $(config_m4_f
|| true >&2
@for i in $(LT_TARGETS); do mv $$i.bak $$i; done
aclocal.m4: configure.in acinclude.m4
aclocal.m4: configure.in acinclude.m4 dynlib.m4
aclocal
$(config_h_in): configure acconfig.h
@@ -79,11 +72,11 @@ $(config_h_in): configure acconfig.h
# correctly otherwise (timestamps are not updated)
@echo rebuilding $@
@rm -f $@
autoheader
@autoheader 2>&1 | (grep -v 'warning: AC_TRY_RUN called without default to allow cross compiling'||true)
$(TOUCH_FILES):
touch $(TOUCH_FILES)
configure: aclocal.m4 configure.in $(config_m4_files)
@echo rebuilding $@
autoconf
@autoconf 2>&1 | (grep -v 'warning: AC_TRY_RUN called without default to allow cross compiling'||true)
+1 -1
View File
@@ -48,7 +48,7 @@ exit 1
fi
lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'`
IFS=.; set $lt_version; IFS=' '
if test "$1" -gt "1" || test "$2" -gt "3" || test "$2" = "3" -a "$3" -ge "3"
if test "$1" -gt "1" || test "$2" -gt "3" || test "$2" = "3" && (test "$3" = "c" || test "$3" -ge "3")
then
echo "buildconf: libtool version $lt_pversion (ok)"
else
+5
View File
@@ -0,0 +1,5 @@
all: all-recursive
include $(builddir)/libs.mk
include $(top_srcdir)/build/rules.mk
+19 -12
View File
@@ -23,29 +23,36 @@
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
##############################################################################
# $Id: fastgen.sh,v 1.2 2000-01-01 20:48:42 sas Exp $
# $Id: fastgen.sh,v 1.7 2000-06-11 10:33:39 sas Exp $
#
srcdir=$1
shift
topsrcdir=`(cd $srcdir; pwd)`
mkdir_p=$1
shift
top_srcdir=`(cd $srcdir; pwd)`
top_builddir=`pwd`
if test "$mkdir_p" = "yes"; then
mkdir_p="mkdir -p"
else
mkdir_p="$topsrcdir/build/shtool mkdir -f -p"
mkdir_p="$top_srcdir/helpers/mkdir.sh"
fi
for i in $@ ; do
echo "creating $i"
dir=`dirname $i`
$mkdir_p $dir
sed \
-e s#@topsrcdir@#$topsrcdir# \
-e s#@srcdir@#$topsrcdir/$dir# \
< $topsrcdir/$i.in > $i
for makefile in $@; do
echo "creating $makefile"
dir=`echo $makefile|sed 's%/*[^/][^/]*$%%'`
$mkdir_p "$dir/"
cat - $top_srcdir/$makefile.in <<EOF >$makefile
top_srcdir = $top_srcdir
top_builddir = $top_builddir
srcdir = $top_srcdir/$dir
builddir = $top_builddir/$dir
VPATH = $top_srcdir/$dir
EOF
test -z "$dir" || touch $dir/.deps
done
+1 -16
View File
@@ -24,22 +24,7 @@
# $Id$
#
LTLIBRARY_OBJECTS = $(LTLIBRARY_SOURCES:.c=.lo)
LTLIBRARY_OBJECTS = $(LTLIBRARY_SOURCES:.c=.lo) $(LTLIBRARY_OBJECTS_X)
$(LTLIBRARY_NAME): $(LTLIBRARY_OBJECTS) $(LTLIBRARY_DEPENDENCIES)
$(LINK) $(LTLIBRARY_LDFLAGS) $(LTLIBRARY_OBJECTS) $(LTLIBRARY_LIBADD)
$(LTLIBRARY_SHARED_NAME): $(LTLIBRARY_OBJECTS) $(LTLIBRARY_DEPENDENCIES)
@test -d $(phplibdir) || $(mkinstalldirs) $(phplibdir)
$(LINK) -avoid-version -module -rpath $(phplibdir) $(LTLIBRARY_LDFLAGS) $(LTLIBRARY_OBJECTS) $(LTLIBRARY_SHARED_LIBADD)
$(SHLIBTOOL) --mode=install install $@ $(phplibdir)
shared:
@if test -z '$(LTLIBRARY_SHARED_NAME)'; then \
echo "LTLIBRARY_SHARED_NAME is empty. Double check your Makefile.in"; \
fi
@if test '$(SHLIBTOOL)' != '$(LIBTOOL)'; then \
$(MAKE) 'LIBTOOL=$(SHLIBTOOL)' $(LTLIBRARY_SHARED_NAME); \
else \
$(MAKE) $(LTLIBRARY_SHARED_NAME); \
fi; \
+2 -4
View File
@@ -26,8 +26,6 @@
targets = $(LTLIBRARY_NAME)
include $(topsrcdir)/build/rules.mk
include $(topsrcdir)/build/library.mk
include $(top_srcdir)/build/rules.mk
include $(top_srcdir)/build/library.mk
# CC = insure
CC = gcc
+41 -42
View File
@@ -24,42 +24,53 @@
# $Id$
#
include $(DEPTH)/config_vars.mk
include $(top_builddir)/config_vars.mk
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(CFLAGS) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@
mkinstalldirs = $(top_srcdir)/build/shtool mkdir -f -p
COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS)
COMPILE = $(CC) $(COMMON_FLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
CXX_COMPILE = $(CXX) $(COMMON_FLAGS) $(CXXFLAGS) $(EXTRA_CXXFLAGS)
SHARED_COMPILE = $(SHARED_LIBTOOL) --mode=compile $(COMPILE) -c $< && touch $@
CXX_SHARED_COMPILE = $(SHARED_LIBTOOL) --mode=compile $(CXX_COMPILE) -c $< && touch $@
LINK = $(LIBTOOL) --mode=link $(COMPILE) $(LDFLAGS) -o $@
mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p
INSTALL = $(top_srcdir)/build/shtool install -c
INSTALL_DATA = $(INSTALL) -m 644
DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I$(DEPTH)
DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I$(top_builddir) -I$(top_builddir)/main
moduledir = $(libdir)/php/modules
top_srcdir = $(topsrcdir)
top_builddir = $(DEPTH)
moduledir = $(EXTENSION_DIR)
CXX_SUFFIX = .cxx
.SUFFIXES:
.SUFFIXES: .S .c .lo .o .s .y .l
.SUFFIXES: .slo .c $(CXX_SUFFIX) .lo .o .s .y .l
.c.o:
$(COMPILE) -c $<
.s.o:
$(COMPILE) -c $<
$(CXX_SUFFIX).o:
$(CXX_COMPILE) -c $<
.S.o:
.s.o:
$(COMPILE) -c $<
.c.lo:
$(PHP_COMPILE)
$(CXX_SUFFIX).lo:
$(CXX_PHP_COMPILE)
.s.lo:
$(PHP_COMPILE)
.S.lo:
$(PHP_COMPILE)
.c.slo:
$(SHARED_COMPILE)
$(CXX_SUFFIX).slo:
$(CXX_SHARED_COMPILE)
.y.c:
$(YACC) $(YFLAGS) $< && mv y.tab.c $*.c
@@ -76,48 +87,36 @@ install: install-recursive
distclean-recursive depend-recursive clean-recursive all-recursive install-recursive:
@otarget=`echo $@|sed s/-recursive//`; \
if test '$(NO_RECURSION)' != "$$otarget"; then \
list='$(SUBDIRS)'; for i in $$list; do \
target="$$otarget"; \
echo "Making $$target in $$i"; \
if test "$$i" = "."; then \
ok=yes; \
target="$$target-p"; \
fi; \
(cd $$i && $(MAKE) $$target) || exit 1; \
done; \
if test "$$otarget" = "all" && test -z '$(targets)'; then ok=yes; fi; \
if test "$$ok" != "yes"; then $(MAKE) "$$otarget-p" || exit 1; fi; \
fi; \
if test -n '$(make_shared)'; then \
$(MAKE) shared || exit 1; \
fi;
list='$(SUBDIRS)'; for i in $$list; do \
target="$$otarget"; \
echo "Making $$target in $$i"; \
if test "$$i" = "."; then \
ok=yes; \
target="$$target-p"; \
fi; \
(cd $$i && $(MAKE) $$target) || exit 1; \
done; \
if test "$$otarget" = "all" && test -z '$(targets)'; then ok=yes; fi; \
if test "$$ok" != "yes"; then $(MAKE) "$$otarget-p" || exit 1; fi
all-p: $(targets)
install-p: $(targets) $(install_targets)
distclean-p depend-p clean-p:
depend: depend-recursive
test "`echo *.c`" = '*.c' || perl $(top_srcdir)/build/mkdep.perl $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) *.c > .deps
test "`echo *.c`" = '*.c' || perl $(top_srcdir)/build/mkdep.perl $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) *.c > $(builddir)/.deps
clean: clean-recursive clean-x
clean-x:
rm -f $(targets) *.lo *.la *.o $(CLEANFILES)
rm -f $(targets) *.lo *.slo *.la *.o $(CLEANFILES)
rm -rf .libs
distclean: distclean-recursive clean-x
rm -f config.cache config.log config.status config_vars.mk libtool \
php_config.h stamp-h Makefile build-defs.h php4.spec libphp4.module
install-modules:
@test -d modules && \
$(mkinstalldirs) $(moduledir) && \
echo "installing shared modules into $(moduledir)" && \
rm -f modules/*.la && \
cp modules/* $(moduledir) || true
include $(srcdir)/.deps
include $(builddir)/.deps
.PHONY: all-recursive clean-recursive install-recursive \
$(install_targets) install all clean depend depend-recursive shared \
+24 -37
View File
@@ -24,7 +24,7 @@
# $Id$
#
include $(DEPTH)/config_vars.mk
include $(top_builddir)/config_vars.mk
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
@@ -33,15 +33,13 @@ LINK = $(LIBTOOL) --mode=link $(CCLD) $(CFLAGS) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@
mkinstalldirs = $(top_srcdir)/build/shtool mkdir -f -p
INSTALL = $(top_srcdir)/build/shtool install -c
INSTALL_DATA = $(INSTALL) -m 644
SHARED_COMPILE = $(SHARED_LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -c $< && touch $@
DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I$(top_builddir) -I$(top_builddir)/main
DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I$(DEPTH)
moduledir = $(libdir)/php/modules
top_srcdir = $(topsrcdir)
top_builddir = $(DEPTH)
moduledir = $(EXTENSION_DIR)
.SUFFIXES:
.SUFFIXES: .S .c .lo .o .s .y .l
.SUFFIXES: .slo .c .lo .o .s .y .l
.c.o:
$(COMPILE) -c $<
@@ -49,17 +47,14 @@ top_builddir = $(DEPTH)
.s.o:
$(COMPILE) -c $<
.S.o:
$(COMPILE) -c $<
.c.lo:
$(PHP_COMPILE)
.s.lo:
$(PHP_COMPILE)
.S.lo:
$(PHP_COMPILE)
.c.slo:
$(SHARED_COMPILE)
.y.c:
$(YACC) $(YFLAGS) $< && mv y.tab.c $*.c
@@ -70,44 +65,36 @@ top_builddir = $(DEPTH)
.l.c:
$(LEX) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@
#################################
# Simplified Makefile
install_targets = install-modules
all: shared
install: shared install-modules
#################################
#all: all-recursive
all: all-recursive
install: install-recursive
distclean-recursive depend-recursive clean-recursive all-recursive install-recursive:
@otarget=`echo $@|sed s/-recursive//`; \
if test '$(NO_RECURSION)' != "$$otarget"; then \
list='$(SUBDIRS)'; for i in $$list; do \
target="$$otarget"; \
echo "Making $$target in $$i"; \
if test "$$i" = "."; then \
ok=yes; \
target="$$target-p"; \
fi; \
(cd $$i && $(MAKE) $$target) || exit 1; \
done; \
test "$otarget" = "all" && test -z '$(targets)' && ok=yes; \
test "$ok" = "yes" || $(MAKE) "$$otarget-p" || exit 1; \
fi;
list='$(SUBDIRS)'; for i in $$list; do \
target="$$otarget"; \
echo "Making $$target in $$i"; \
if test "$$i" = "."; then \
ok=yes; \
target="$$target-p"; \
fi; \
(cd $$i && $(MAKE) $$target) || exit 1; \
done; \
if test "$$otarget" = "all" && test -z '$(targets)'; then ok=yes; fi; \
if test "$$ok" != "yes"; then $(MAKE) "$$otarget-p" || exit 1; fi
all-p: $(targets)
install-p: $(targets) $(install_targets)
distclean-p depend-p clean-p:
depend: depend-recursive
test "`echo *.c`" = '*.c' || perl $(top_srcdir)/build/mkdep.perl $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) *.c > .deps
test "`echo *.c`" = '*.c' || perl $(top_srcdir)/build/mkdep.perl $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) *.c > $(builddir)/.deps
clean: clean-recursive clean-x
clean-x:
rm -f $(targets) *.lo *.la *.o $(CLEANFILES)
rm -f $(targets) *.lo *.slo *.la *.o $(CLEANFILES)
rm -rf .libs
distclean: distclean-recursive clean-x
@@ -120,8 +107,8 @@ install-modules:
echo "installing shared modules into $(moduledir)" && \
rm -f modules/*.la && \
cp modules/* $(moduledir) || true
include $(srcdir)/.deps
include $(builddir)/.deps
.PHONY: all-recursive clean-recursive install-recursive \
$(install_targets) install all clean depend depend-recursive shared \
+85 -76
View File
@@ -1,12 +1,12 @@
#!/bin/sh
##
## GNU shtool -- The GNU Portable Shell Tool
## Copyright (c) 1994-1999 Ralf S. Engelschall <rse@engelschall.com>
## Copyright (c) 1994-2000 Ralf S. Engelschall <rse@engelschall.com>
##
## See http://www.gnu.org/software/shtool/ for more information.
## See ftp://ftp.gnu.org/gnu/shtool/ for latest version.
##
## Version 1.4.7 (24-Dec-1999)
## Version 1.4.9 (16-Apr-2000)
## Ingredients: 3/17 available modules
##
@@ -44,14 +44,14 @@
##
## Not available commands (because module was not built-in):
## mdate Pretty-print modification time of a file or dir
## table Pretty print a field-separated list as a table
## table Pretty-print a field-separated list as a table
## prop Display progress with a running propeller
## move Move files with simultan substitution
## move Move files with simultaneous substitution
## mkln Make link with calculation of relative paths
## mkshadow Make a shadow tree
## mkshadow Make a shadow tree through symbolic links
## fixperm Fix file permissions inside a source tree
## tarball Roll distribution tarballs
## guessos Simple OS/platform guesser
## guessos Simple operating system guesser
## arx Extended archive command
## slo Separate linker options by library class
## scpp Sharing C Pre-Processor
@@ -65,8 +65,8 @@ if [ $# -eq 0 ]; then
exit 1
fi
if [ ".$1" = ".-h" -o ".$1" = ".--help" ]; then
echo "This is GNU shtool, version 1.4.7 (24-Dec-1999)"
echo "Copyright (c) 1994-1999 Ralf S. Engelschall <rse@engelschall.com>"
echo "This is GNU shtool, version 1.4.9 (16-Apr-2000)"
echo "Copyright (c) 1994-2000 Ralf S. Engelschall <rse@engelschall.com>"
echo "Report bugs to <bug-shtool@gnu.org>"
echo ''
echo "Usage: shtool [<options>] [<cmd-name> [<cmd-options>] [<cmd-args>]]"
@@ -94,9 +94,9 @@ if [ ".$1" = ".-h" -o ".$1" = ".--help" ]; then
echo ' <user>] [-g <group>] [-e <pattern>] <path> [<path> ...]'
echo ' guessos '
echo ' arx [-t] [-C<cmd>] <op> <archive> [<file> ...]'
echo ' slo -- -L<dir> -l<lib> [ -L<dir> -l<lib> ... ]'
echo ' scpp [-v] [-p] [-o<ofile>] [-t<tfile>] [-M<mark>] [-D<dname>]'
echo ' [-C<cname>] <file> [<file> ...]'
echo ' slo [-p<str>] -- -L<dir> -l<lib> [-L<dir> -l<lib> ...]'
echo ' scpp [-v] [-p] [-f<filter>] [-o<ofile>] [-t<tfile>] [-M<mark>]'
echo ' [-D<dname>] [-C<cname>] <file> [<file> ...]'
echo ' version [-l<lang>] [-n<name>] [-p<prefix>] [-s<version>] [-i<knob>]'
echo ' [-d<type>] <file>'
echo ' path [-s] [-r] [-d] [-b] [-m] [-p<path>] <str> [<str> ...]'
@@ -104,7 +104,7 @@ if [ ".$1" = ".-h" -o ".$1" = ".--help" ]; then
exit 0
fi
if [ ".$1" = ".-v" -o ".$1" = ."--version" ]; then
echo "GNU shtool 1.4.7 (24-Dec-1999)"
echo "GNU shtool 1.4.9 (16-Apr-2000)"
exit 0
fi
if [ ".$1" = ".-d" -o ".$1" = ."--debug" ]; then
@@ -136,13 +136,20 @@ case $tool in
str_tool="echo"
str_usage="[-n] [-e] [<str> ...]"
arg_spec="0+"
opt_spec="ne"
opt_spec="n.e."
opt_n=no
opt_e=no
;;
install )
str_tool="install"
str_usage="[-v] [-t] [-c] [-C] [-s] [-m<mode>] [-o<owner>] [-g<group>] [-e<ext>] <file> <path>"
arg_spec="2"
opt_spec="vtcCsm:o:g:e:"
arg_spec="2="
opt_spec="v.t.c.C.s.m:o:g:e:"
opt_v=no
opt_t=no
opt_c=no
opt_C=no
opt_s=no
opt_m=""
opt_o=""
opt_g=""
@@ -152,9 +159,17 @@ case $tool in
str_tool="mkdir"
str_usage="[-t] [-f] [-p] [-m<mode>] <dir> [<dir> ...]"
arg_spec="1+"
opt_spec="tfpm:"
opt_spec="t.f.p.m:"
opt_t=no
opt_f=no
opt_p=no
opt_m=""
;;
-* )
echo "$0:Error: unknown option \`$tool'" 2>&1
echo "$0:Hint: run \`$0 -h' for usage" 2>&1
exit 1
;;
* )
echo "$0:Error: unknown command \`$tool'" 2>&1
echo "$0:Hint: run \`$0 -h' for usage" 2>&1
@@ -168,30 +183,24 @@ esac
# determine name of tool
if [ ".$tool" != . ]; then
# inside shtool
# used inside shtool script
toolcmd="$0 $tool"
toolcmdhelp="shtool $tool"
msgprefix="shtool:$tool"
else
# standalone
# used as standalone script
toolcmd="$0"
toolcmdhelp="sh.$tool"
toolcmdhelp="sh $0"
msgprefix="$str_tool"
fi
# parse argument specification string
eval `echo $arg_spec | sed -e 's/^\([0-9]*\)\(.*\)/arg_NUMS="\1"; arg_MODE="\2"/'`
test ".$arg_MODE" = . && arg_MODE="="
eval `echo $arg_spec |\
sed -e 's/^\([0-9]*\)\([+=]\)/arg_NUMS=\1; arg_MODE=\2/'`
# parse option specification string
for opt in `echo "h$opt_spec" | sed -e 's/\([a-zA-Z0-9][:+]*\)/\1 /g'`; do
opt_MODE="."
eval `echo $opt |\
sed -e 's/^\([a-zA-Z0-9]\)/opt_THIS="\1";/' \
-e 's/";\([:+]\)/"; opt_MODE="\1";/'`
eval "opt_MODE_${opt_THIS}=${opt_MODE}"
test "$opt_MODE" = . && eval "opt_${opt_THIS}=no"
done
eval `echo h.$opt_spec |\
sed -e 's/\([a-zA-Z0-9]\)\([.:+]\)/opt_MODE_\1=\2;/g'`
# interate over argument line
opt_PREV=''
@@ -209,7 +218,7 @@ while [ $# -gt 0 ]; do
opt_OPT="$opt_PREV"
opt_ARG="$1"
opt_ARG_OK=yes
opt_PREV=""
opt_PREV=''
else
# split argument into option and argument
case "$1" in
@@ -219,8 +228,7 @@ while [ $# -gt 0 ]; do
-e 's/";\(.*\)$/"; opt_ARG="\1"/'`
;;
-[a-zA-Z0-9])
opt_OPT=`awk 'BEGIN { printf("%s", substr(OPT, 2)); }' \
"OPT=$1" </dev/null"`
opt_OPT=`echo "x$1" | cut -c3-`
opt_ARG=''
;;
*)
@@ -243,15 +251,15 @@ while [ $# -gt 0 ]; do
# process option
case $opt_MODE in
"." )
'.' )
# boolean option
eval "opt_${opt_OPT}=yes"
;;
":" )
':' )
# option with argument (multiple occurances override)
eval "opt_${opt_OPT}=\"\$opt_ARG\""
;;
"+" )
'+' )
# option with argument (multiple occurances append)
eval "opt_${opt_OPT}=\"\$opt_${opt_OPT} \$opt_ARG\""
;;
@@ -276,14 +284,14 @@ fi
# complain about incorrect number of arguments
case $arg_MODE in
"=" )
'=' )
if [ $# -ne $arg_NUMS ]; then
echo "$msgprefix:Error: invalid number of arguments (exactly $arg_NUMS expected)" 1>&2
echo "$msgprefix:Hint: run \`$toolcmd -h' or \`man shtool' for details" 1>&2
exit 1
fi
;;
"+" )
'+' )
if [ $# -lt $arg_NUMS ]; then
echo "$msgprefix:Error: invalid number of arguments (at least $arg_NUMS expected)" 1>&2
echo "$msgprefix:Hint: run \`$toolcmd -h' or \`man shtool' for details" 1>&2
@@ -294,13 +302,12 @@ esac
# establish a temporary file on request
if [ ".$gen_tmpfile" = .yes ]; then
tmpdir="/tmp"
if [ ".$TMPDIR" != . ]; then
tmpdir="$TMPDIR"
elif [ ".$TEMPDIR" != . ]; then
tmpdir="$TEMPDIR"
else
if [ ".$TEMPDIR" != . ]; then
tmpdir="$TEMPDIR"
fi
tmpdir="/tmp"
fi
tmpfile="$tmpdir/.shtool.$$"
rm -f $tmpfile >/dev/null 2>&1
@@ -316,7 +323,7 @@ case $tool in
echo )
##
## echo -- Print string with optional construct expansion
## Copyright (c) 1998-1999 Ralf S. Engelschall <rse@engelschall.com>
## Copyright (c) 1998-2000 Ralf S. Engelschall <rse@engelschall.com>
## Originally written for WML as buildinfo
##
@@ -343,8 +350,8 @@ echo )
term_bold=''
term_norm=''
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%[Bb]'`" != . ]; then
# the most important terminals we directly know
case $TERM in
# for the most important terminal types we directly know the sequences
xterm|xterm*|vt220|vt220*)
term_bold=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' </dev/null 2>/dev/null`
term_norm=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' </dev/null 2>/dev/null`
@@ -353,35 +360,37 @@ echo )
term_bold=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' </dev/null 2>/dev/null`
term_norm=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' </dev/null 2>/dev/null`
;;
esac
# then try a possibly existing "tput" or "tcout" utility
paths=`echo $PATH | sed -e 's/:/ /g'`
for tool in tput tcout; do
for dir in $paths; do
if [ -r "$dir/$tool" ]; then
for seq in bold md smso; do # smso is last
bold="`$dir/$tool $seq 2>/dev/null`"
if [ ".$bold" != . ]; then
term_bold="$bold"
# for all others, we try to use a possibly existing `tput' or `tcout' utility
* )
paths=`echo $PATH | sed -e 's/:/ /g'`
for tool in tput tcout; do
for dir in $paths; do
if [ -r "$dir/$tool" ]; then
for seq in bold md smso; do # 'smso' is last
bold="`$dir/$tool $seq 2>/dev/null`"
if [ ".$bold" != . ]; then
term_bold="$bold"
break
fi
done
if [ ".$term_bold" != . ]; then
for seq in sgr0 me rmso reset; do # 'reset' is last
norm="`$dir/$tool $seq 2>/dev/null`"
if [ ".$norm" != . ]; then
term_norm="$norm"
break
fi
done
fi
break
fi
done
if [ ".$term_bold" != . ]; then
for seq in sgr0 me rmso reset; do # 'reset' is last
norm="`$dir/$tool $seq 2>/dev/null`"
if [ ".$norm" != . ]; then
term_norm="$norm"
break
fi
done
if [ ".$term_bold" != . -a ".$term_norm" != . ]; then
break;
fi
break
fi
done
if [ ".$term_bold" != . -a ".$term_norm" != . ]; then
break;
fi
done
done
;;
esac
if [ ".$term_bold" = . -o ".$term_norm" = . ]; then
echo "$msgprefix:Warning: unable to determine terminal sequence for bold mode" 1>&2
fi
@@ -525,7 +534,7 @@ echo )
echo $seo "$text"
else
# the harder part: echo -n is best, because
# awk complains about some \xx sequences.
# awk may complain about some \xx sequences.
if [ ".$minusn" != . ]; then
echo $seo $minusn "$text"
else
@@ -537,7 +546,7 @@ echo )
install )
##
## install -- Install a program, script or datafile
## Copyright (c) 1997-1999 Ralf S. Engelschall <rse@engelschall.com>
## Copyright (c) 1997-2000 Ralf S. Engelschall <rse@engelschall.com>
## Originally written for shtool
##
@@ -644,24 +653,24 @@ install )
mkdir )
##
## mkdir -- Make one or more directories
## Copyright (c) 1996-1999 Ralf S. Engelschall <rse@engelschall.com>
## Copyright (c) 1996-2000 Ralf S. Engelschall <rse@engelschall.com>
## Originally written for public domain by Noah Friedman <friedman@prep.ai.mit.edu>
## Cleaned up and enhanced for shtool
##
errstatus=0
for p in ${1+"$@"}; do
# when the directory already exists...
# if the directory already exists...
if [ -d "$p" ]; then
if [ ".$opt_f" = .no ]; then
echo "$msgprefix:Error: file exists: $p" 1>&2
if [ ".$opt_f" = .no ] && [ ".$opt_p" = .no ]; then
echo "$msgprefix:Error: directory already exists: $p" 1>&2
errstatus=1
break
else
continue
fi
fi
# when the directory has to be created
# if the directory has to be created...
if [ ".$opt_p" = .no ]; then
if [ ".$opt_t" = .yes ]; then
echo "mkdir $p" 1>&2
@@ -675,7 +684,7 @@ mkdir )
-e 's/\// /g' \
-e 's/^%/\//'`
shift
pathcomp=
pathcomp=''
for d in ${1+"$@"}; do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-244
View File
@@ -1,244 +0,0 @@
# Microsoft Developer Studio Generated NMAKE File, Based on calendar.dsp
!IF "$(CFG)" == ""
CFG=calendar - Win32 Debug
!MESSAGE No configuration specified. Defaulting to calendar - Win32 Debug.
!ENDIF
!IF "$(CFG)" != "calendar - Win32 Release" && "$(CFG)" != "calendar - Win32 Debug"
!MESSAGE Invalid configuration "$(CFG)" specified.
!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 "calendar.mak" CFG="calendar - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "calendar - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "calendar - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
!ERROR An invalid configuration is specified.
!ENDIF
!IF "$(OS)" == "Windows_NT"
NULL=
!ELSE
NULL=nul
!ENDIF
!IF "$(CFG)" == "calendar - Win32 Release"
OUTDIR=.\module_release
INTDIR=.\module_release
# Begin Custom Macros
OutDir=.\module_release
# End Custom Macros
ALL : "$(OUTDIR)\php3_calendar.dll"
CLEAN :
-@erase "$(INTDIR)\calendar.obj"
-@erase "$(INTDIR)\dow.obj"
-@erase "$(INTDIR)\french.obj"
-@erase "$(INTDIR)\gregor.obj"
-@erase "$(INTDIR)\jewish.obj"
-@erase "$(INTDIR)\julian.obj"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(OUTDIR)\php3_calendar.dll"
-@erase "$(OUTDIR)\php3_calendar.exp"
-@erase "$(OUTDIR)\php3_calendar.lib"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MT /W3 /GX /O2 /I "./" /I "../" /D "NDEBUG" /D "COMPILE_DL" /D "MSVC5" /D "WIN32" /D "_WINDOWS" /Fp"$(INTDIR)\calendar.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
MTL=midl.exe
MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\calendar.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=php.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /version:1 /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\php3_calendar.pdb" /machine:I386 /out:"$(OUTDIR)\php3_calendar.dll" /implib:"$(OUTDIR)\php3_calendar.lib" /libpath:"cgi_release"
LINK32_OBJS= \
"$(INTDIR)\calendar.obj" \
"$(INTDIR)\dow.obj" \
"$(INTDIR)\french.obj" \
"$(INTDIR)\gregor.obj" \
"$(INTDIR)\jewish.obj" \
"$(INTDIR)\julian.obj"
"$(OUTDIR)\php3_calendar.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ELSEIF "$(CFG)" == "calendar - Win32 Debug"
OUTDIR=.\module_debug
INTDIR=.\module_debug
# Begin Custom Macros
OutDir=.\module_debug
# End Custom Macros
ALL : "$(OUTDIR)\php3_calendar.dll"
CLEAN :
-@erase "$(INTDIR)\calendar.obj"
-@erase "$(INTDIR)\dow.obj"
-@erase "$(INTDIR)\french.obj"
-@erase "$(INTDIR)\gregor.obj"
-@erase "$(INTDIR)\jewish.obj"
-@erase "$(INTDIR)\julian.obj"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(INTDIR)\vc60.pdb"
-@erase "$(OUTDIR)\php3_calendar.dll"
-@erase "$(OUTDIR)\php3_calendar.exp"
-@erase "$(OUTDIR)\php3_calendar.ilk"
-@erase "$(OUTDIR)\php3_calendar.lib"
-@erase "$(OUTDIR)\php3_calendar.pdb"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MTd /W3 /Gm /GX /ZI /Od /I "./" /I "../" /D "DEBUG" /D "_DEBUG" /D "COMPILE_DL" /D "MSVC5" /D "WIN32" /D "_WINDOWS" /Fp"$(INTDIR)\calendar.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
MTL=midl.exe
MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\calendar.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=php.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /version:1 /subsystem:windows /dll /incremental:yes /pdb:"$(OUTDIR)\php3_calendar.pdb" /debug /machine:I386 /out:"$(OUTDIR)\php3_calendar.dll" /implib:"$(OUTDIR)\php3_calendar.lib" /pdbtype:sept /libpath:"cgi_debug"
LINK32_OBJS= \
"$(INTDIR)\calendar.obj" \
"$(INTDIR)\dow.obj" \
"$(INTDIR)\french.obj" \
"$(INTDIR)\gregor.obj" \
"$(INTDIR)\jewish.obj" \
"$(INTDIR)\julian.obj"
"$(OUTDIR)\php3_calendar.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ENDIF
!IF "$(NO_EXTERNAL_DEPS)" != "1"
!IF EXISTS("calendar.dep")
!INCLUDE "calendar.dep"
!ELSE
!MESSAGE Warning: cannot find "calendar.dep"
!ENDIF
!ENDIF
!IF "$(CFG)" == "calendar - Win32 Release" || "$(CFG)" == "calendar - Win32 Debug"
SOURCE=.\dl\calendar\calendar.c
"$(INTDIR)\calendar.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=.\dl\calendar\dow.c
"$(INTDIR)\dow.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=.\dl\calendar\french.c
"$(INTDIR)\french.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=.\dl\calendar\gregor.c
"$(INTDIR)\gregor.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=.\dl\calendar\jewish.c
"$(INTDIR)\jewish.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=.\dl\calendar\julian.c
"$(INTDIR)\julian.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ENDIF
+146 -84
View File
@@ -1,6 +1,6 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
# Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify it
@@ -23,8 +23,7 @@
# the same distribution terms that you use for the rest of that program.
# Written by Per Bothner <bothner@cygnus.com>.
# The master version of this file is at the FSF in /home/gd/gnu/lib.
# Please send patches to <autoconf-patches@gnu.org>.
# Please send patches to <config-patches@gnu.org>.
#
# This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and
@@ -68,6 +67,43 @@ trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*)
# Netbsd (nbsd) targets should (where applicable) match one or
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
# compatibility and a consistent mechanism for selecting the
# object file format.
# Determine the machine/vendor (is the vendor relevant).
case "${UNAME_MACHINE}" in
amiga) machine=m68k-cbm ;;
arm32) machine=arm-unknown ;;
atari*) machine=m68k-atari ;;
sun3*) machine=m68k-sun ;;
mac68k) machine=m68k-apple ;;
macppc) machine=powerpc-apple ;;
hp3[0-9][05]) machine=m68k-hp ;;
ibmrt|romp-ibm) machine=romp-ibm ;;
*) machine=${UNAME_MACHINE}-unknown ;;
esac
# The Operating System including object format.
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep __ELF__ >/dev/null
then
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
# Return netbsd for either. FIX?
os=netbsd
else
os=netbsdelf
fi
# The OS release
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit 0 ;;
alpha:OSF1:*:*)
if test $UNAME_RELEASE = "V4.0"; then
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
@@ -77,41 +113,51 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
cat <<EOF >$dummy.s
.data
\$Lformat:
.byte 37,100,45,37,120,10,0 # "%d-%x\n"
.text
.globl main
.align 4
.ent main
main:
.frame \$30,0,\$26,0
.prologue 0
.long 0x47e03d80 # implver $0
lda \$2,259
.long 0x47e20c21 # amask $2,$1
srl \$1,8,\$2
sll \$2,2,\$2
sll \$0,3,\$0
addl \$1,\$0,\$0
addl \$2,\$0,\$0
ret \$31,(\$26),1
.frame \$30,16,\$26,0
ldgp \$29,0(\$27)
.prologue 1
.long 0x47e03d80 # implver \$0
lda \$2,-1
.long 0x47e20c21 # amask \$2,\$1
lda \$16,\$Lformat
mov \$0,\$17
not \$1,\$18
jsr \$26,printf
ldgp \$29,0(\$26)
mov 0,\$16
jsr \$26,exit
.end main
EOF
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
if test "$?" = 0 ; then
./$dummy
case "$?" in
7)
case `./$dummy` in
0-0)
UNAME_MACHINE="alpha"
;;
15)
1-0)
UNAME_MACHINE="alphaev5"
;;
14)
1-1)
UNAME_MACHINE="alphaev56"
;;
10)
1-101)
UNAME_MACHINE="alphapca56"
;;
16)
2-303)
UNAME_MACHINE="alphaev6"
;;
2-307)
UNAME_MACHINE="alphaev67"
;;
esac
fi
rm -f $dummy.s $dummy
@@ -129,9 +175,6 @@ EOF
Amiga*:UNIX_System_V:4.0:*)
echo m68k-cbm-sysv4
exit 0;;
amiga:NetBSD:*:*)
echo m68k-cbm-netbsd${UNAME_RELEASE}
exit 0 ;;
amiga:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
@@ -162,9 +205,6 @@ EOF
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit 0;;
arm32:NetBSD:*:*)
echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
SR2?01:HI-UX/MPP:*:*)
echo hppa1.1-hitachi-hiuxmpp
exit 0;;
@@ -221,15 +261,12 @@ EOF
aushp:SunOS:*:*)
echo sparc-auspex-sunos${UNAME_RELEASE}
exit 0 ;;
atari*:NetBSD:*:*)
echo m68k-atari-netbsd${UNAME_RELEASE}
exit 0 ;;
atari*:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
# The situation for MiNT is a little confusing. The machine name
# can be virtually everything (everything which is not
# "atarist" or "atariste" at least should have a processor
# "atarist" or "atariste" at least should have a processor
# > m68000). The system name ranges from "MiNT" over "FreeMiNT"
# to the lowercase version "mint" (or "freemint"). Finally
# the system name "TOS" denotes a system which is actually not
@@ -253,15 +290,9 @@ EOF
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE}
exit 0 ;;
sun3*:NetBSD:*:*)
echo m68k-sun-netbsd${UNAME_RELEASE}
exit 0 ;;
sun3*:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mac68k:NetBSD:*:*)
echo m68k-apple-netbsd${UNAME_RELEASE}
exit 0 ;;
mac68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
@@ -274,9 +305,6 @@ EOF
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
exit 0 ;;
macppc:NetBSD:*:*)
echo powerpc-apple-netbsd${UNAME_RELEASE}
exit 0 ;;
RISC*:Mach:*:*)
echo mips-dec-mach_bsd4.3
exit 0 ;;
@@ -292,6 +320,7 @@ EOF
mips:*:*:UMIPS | mips:*:*:RISCos)
sed 's/^ //' << EOF >$dummy.c
#ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */
int main (int argc, char *argv[]) {
#else
int main (argc, argv) int argc; char *argv[]; {
@@ -331,7 +360,7 @@ EOF
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110]
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
then
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
[ ${TARGET_BINARY_INTERFACE}x = x ]
@@ -408,7 +437,7 @@ EOF
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
echo romp-ibm-bsd4.4
exit 0 ;;
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
exit 0 ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
@@ -429,6 +458,8 @@ EOF
9000/[34]?? ) HP_ARCH=m68k ;;
9000/[678][0-9][0-9])
sed 's/^ //' << EOF >$dummy.c
#define _HPUX_SOURCE
#include <stdlib.h>
#include <unistd.h>
@@ -553,10 +584,13 @@ EOF
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
exit 0 ;;
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE}
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY*T3E:*:*:*)
echo alpha-cray-unicosmk${UNAME_RELEASE}
echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY*SV1:*:*:*)
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY-2:*:*:*)
echo cray2-cray-unicos
@@ -569,13 +603,10 @@ EOF
F301:UNIX_System_V:*:*)
echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
exit 0 ;;
hp3[0-9][05]:NetBSD:*:*)
echo m68k-hp-netbsd${UNAME_RELEASE}
exit 0 ;;
hp300:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit 0 ;;
sparc*:BSD/OS:*:*)
@@ -585,17 +616,8 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit 0 ;;
*:FreeBSD:*:*)
if test -x /usr/bin/objformat; then
if test "elf" = "`/usr/bin/objformat`"; then
echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
exit 0
fi
fi
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit 0 ;;
*:NetBSD:*:*)
echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
exit 0 ;;
*:OpenBSD:*:*)
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
@@ -644,6 +666,10 @@ EOF
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
exit 0
;;
elf_i?86)
echo "${UNAME_MACHINE}-pc-linux"
exit 0
;;
i?86coff)
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
exit 0
@@ -657,7 +683,7 @@ EOF
exit 0
;;
elf32arm*)
echo "${UNAME_MACHINE}-unknown-linux-gnu"
echo "${UNAME_MACHINE}-unknown-linux-gnuoldld"
exit 0
;;
armelf_linux*)
@@ -668,7 +694,7 @@ EOF
echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
exit 0
;;
elf32ppc)
elf32ppc | elf32ppclinux)
# Determine Lib Version
cat >$dummy.c <<EOF
#include <features.h>
@@ -695,7 +721,7 @@ EOF
if test "$?" = 0 ; then
LIBC="libc1"
fi
fi
fi
rm -f $dummy.c $dummy
echo powerpc-unknown-linux-gnu${LIBC}
exit 0
@@ -703,43 +729,53 @@ EOF
esac
if test "${UNAME_MACHINE}" = "alpha" ; then
sed 's/^ //' <<EOF >$dummy.s
.globl main
.ent main
main:
.frame \$30,0,\$26,0
.prologue 0
.long 0x47e03d80 # implver $0
lda \$2,259
.long 0x47e20c21 # amask $2,$1
srl \$1,8,\$2
sll \$2,2,\$2
sll \$0,3,\$0
addl \$1,\$0,\$0
addl \$2,\$0,\$0
ret \$31,(\$26),1
.end main
cat <<EOF >$dummy.s
.data
\$Lformat:
.byte 37,100,45,37,120,10,0 # "%d-%x\n"
.text
.globl main
.align 4
.ent main
main:
.frame \$30,16,\$26,0
ldgp \$29,0(\$27)
.prologue 1
.long 0x47e03d80 # implver \$0
lda \$2,-1
.long 0x47e20c21 # amask \$2,\$1
lda \$16,\$Lformat
mov \$0,\$17
not \$1,\$18
jsr \$26,printf
ldgp \$29,0(\$26)
mov 0,\$16
jsr \$26,exit
.end main
EOF
LIBC=""
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
if test "$?" = 0 ; then
./$dummy
case "$?" in
7)
case `./$dummy` in
0-0)
UNAME_MACHINE="alpha"
;;
15)
1-0)
UNAME_MACHINE="alphaev5"
;;
14)
1-1)
UNAME_MACHINE="alphaev56"
;;
10)
1-101)
UNAME_MACHINE="alphapca56"
;;
16)
2-303)
UNAME_MACHINE="alphaev6"
;;
2-307)
UNAME_MACHINE="alphaev67"
;;
esac
objdump --private-headers $dummy | \
@@ -753,6 +789,7 @@ EOF
elif test "${UNAME_MACHINE}" = "mips" ; then
cat >$dummy.c <<EOF
#ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */
int main (int argc, char *argv[]) {
#else
int main (argc, argv) int argc; char *argv[]; {
@@ -768,6 +805,8 @@ EOF
EOF
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
elif test "${UNAME_MACHINE}" = "s390"; then
echo s390-ibm-linux && exit 0
else
# Either a pre-BFD a.out linker (linux-gnuoldld)
# or one that does not give us useful --help.
@@ -789,6 +828,7 @@ EOF
cat >$dummy.c <<EOF
#include <features.h>
#ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */
int main (int argc, char *argv[]) {
#else
int main (argc, argv) int argc; char *argv[]; {
@@ -860,7 +900,11 @@ EOF
echo ${UNAME_MACHINE}-pc-sysv32
fi
exit 0 ;;
i?86:*DOS:*:*)
echo ${UNAME_MACHINE}-pc-msdosdjgpp
exit 0 ;;
pc:*:*:*)
# Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i386.
echo i386-pc-msdosdjgpp
@@ -974,8 +1018,26 @@ EOF
*:Rhapsody:*:*)
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
exit 0 ;;
*:Darwin:*:*)
echo `uname -p`-apple-darwin${UNAME_RELEASE}
exit 0 ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
if test "${UNAME_MACHINE}" = "x86pc"; then
UNAME_MACHINE=pc
fi
echo `uname -p`-${UNAME_MACHINE}-nto-qnx
exit 0 ;;
*:QNX:*:4*)
echo i386-qnx-qnx${UNAME_VERSION}
echo i386-pc-qnx
exit 0 ;;
NSR-W:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
exit 0 ;;
BS2000:POSIX*:*:*)
echo bs2000-siemens-sysv
exit 0 ;;
DS/*:UNIX_System_V:*:*)
echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
exit 0 ;;
esac
Vendored
+52 -16
View File
@@ -1,6 +1,8 @@
#! /bin/sh
# Configuration validation subroutine script, version 1.1.
# Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
# Free Software Foundation, Inc.
#
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
# can handle that machine. It does not imply ALL GNU software can.
@@ -25,6 +27,9 @@
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Written by Per Bothner <bothner@cygnus.com>.
# Please send patches to <config-patches@gnu.org>.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1.
@@ -68,7 +73,7 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
linux-gnu*)
nto-qnx* | linux-gnu*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -169,15 +174,18 @@ case $basic_machine in
tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
| arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
| 580 | i960 | h8300 \
| x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \
| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
| alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \
| hppa64 \
| alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
| alphaev6[78] \
| we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
| 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
| mips64orion | mips64orionel | mipstx39 | mipstx39el \
| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
| mips64vr5000 | miprs64vr5000el | mcore \
| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
| thumb | d10v | fr30)
| thumb | d10v | fr30 | avr)
basic_machine=$basic_machine-unknown
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
@@ -201,8 +209,11 @@ case $basic_machine in
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
| power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
| xmp-* | ymp-* \
| hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
| alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \
| x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \
| hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
| hppa2.0n-* | hppa64-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
| alphaev6[78]-* \
| we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
| clipper-* | orion-* \
| sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
@@ -210,9 +221,10 @@ case $basic_machine in
| mips64el-* | mips64orion-* | mips64orionel-* \
| mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
| mipstx39-* | mipstx39el-* | mcore-* \
| f301-* | armv*-* | t3e-* \
| f301-* | armv*-* | s390-* | sv1-* | t3e-* \
| m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
| thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* )
| thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \
| bs2000-*)
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
@@ -464,9 +476,6 @@ case $basic_machine in
basic_machine=i386-unknown
os=-mingw32
;;
i386-qnx | qnx)
basic_machine=i386-qnx
;;
iris | iris4d)
basic_machine=mips-sgi
case $os in
@@ -513,6 +522,10 @@ case $basic_machine in
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
mmix*)
basic_machine=mmix-knuth
os=-mmixware
;;
monitor)
basic_machine=m68k-rom68k
os=-coff
@@ -585,6 +598,9 @@ case $basic_machine in
np1)
basic_machine=np1-gould
;;
nsr-tandem)
basic_machine=nsr-tandem
;;
op50n-* | op60c-*)
basic_machine=hppa1.1-oki
os=-proelf
@@ -729,6 +745,10 @@ case $basic_machine in
sun386 | sun386i | roadrunner)
basic_machine=i386-sun
;;
sv1)
basic_machine=sv1-cray
os=-unicos
;;
symmetry)
basic_machine=i386-sequent
os=-dynix
@@ -918,12 +938,25 @@ case $os in
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -rhapsody* | -opened* | -openstep* | -oskit*)
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
case $basic_machine in
x86-* | i[34567]86-*)
;;
*)
os=-nto$os
;;
esac
;;
-nto*)
os=-nto-qnx
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
| -macos* | -mpw* | -magic* | -mon960* | -lnews*)
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
;;
-mac*)
os=`echo $os | sed -e 's|mac|macos|'`
@@ -940,6 +973,9 @@ case $os in
-opened*)
os=-openedition
;;
-wince*)
os=-wince
;;
-osfrose*)
os=-osfrose
;;
@@ -964,6 +1000,9 @@ case $os in
-ns2 )
os=-nextstep2
;;
-nsk)
os=-nsk
;;
# Preserve the version number of sinix5.
-sinix5.*)
os=`echo $os | sed -e 's|sinix|sysv|'`
@@ -977,9 +1016,6 @@ case $os in
-oss*)
os=-sysv3
;;
-qnx)
os=-qnx4
;;
-svr4)
os=-sysv4
;;
+330 -263
View File
@@ -3,15 +3,9 @@ dnl ## Process this file with autoconf to produce a configure script.
divert(1)
AC_INIT(main.c)
AC_INIT(README.CVS-RULES)
PHP_FAST_OUTPUT(sapi/Makefile ext/Makefile Makefile pear/Makefile)
dnl Because ``make install'' is often performed by the superuser,
dnl we create the libs subdirectory as the user who configures PHP.
dnl Otherwise, the current user will not be able to delete libs
dnl or the contents of libs.
test -d libs || mkdir libs
PHP_FAST_OUTPUT(sapi/Makefile ext/Makefile Makefile pear/Makefile main/Makefile)
if test "$with_shared_apache" != "no" && test -n "$with_shared_apache" ; then
AC_MSG_ERROR(--with-shared-apache is not supported. Please refer to the documentation for using APXS)
@@ -23,8 +17,9 @@ fi
cwd=`pwd`
CONFIGURE_COMMAND=$0
for arg in "$@"; do
PHP_CONFIG_NICE(config.nice)
for arg in $0 "$@"; do
CONFIGURE_COMMAND="$CONFIGURE_COMMAND '$arg'"
done
@@ -32,6 +27,14 @@ php_shtool="$srcdir/build/shtool"
T_MD=`$php_shtool echo -n -e %B`
T_ME=`$php_shtool echo -n -e %b`
dnl Because ``make install'' is often performed by the superuser,
dnl we create the libs subdirectory as the user who configures PHP.
dnl Otherwise, the current user will not be able to delete libs
dnl or the contents of libs.
$php_shtool mkdir -p libs
rm -f libs/*
dnl ## Diversion 2 is the initial checking of OS features, programs,
dnl ## libraries and so on.
@@ -47,12 +50,8 @@ dnl ## All of these are normally in the extension directories.
dnl ## Diversion 5 is the last one. Here we generate files and clean up.
divert(2)
PHP_CONFIGURE_PART(Running system checks)
dnl ## This is where the version number is changed from now on!
AM_INIT_AUTOMAKE(php, 4.0b4)
AM_INIT_AUTOMAKE(php, 4.0.2-dev)
PHP_VERSION=$VERSION
echo "/* automatically generated by configure */" > php_version.h.new
@@ -68,15 +67,11 @@ fi
AM_CONFIG_HEADER(php_config.h)
AM_MAINTAINER_MODE
AC_CANONICAL_HOST
dnl We want this one before the checks, so the checks can modify CFLAGS.
test -z "$CFLAGS" && auto_cflags=1
dnl If we're using cc on HP-UX, add -Ae -D_HPUX_SOURCE [obsolete]
dnl if test -n "$auto_cflags" && test "`uname -s 2>/dev/null`" = "HP-UX"; then
dnl test -n "$GCC" || CFLAGS="-Ae $CFLAGS -D_HPUX_SOURCE"
dnl fi
dnl Checks for programs.
AC_PROG_YACC
if test "$YACC" != "bison -y"; then
@@ -92,11 +87,17 @@ else
AC_MSG_RESULT($1.$2 (ok))
fi
dnl ## there has to be a better way...
dnl## OLDLIBS=$LIBS; LIBS=""
AC_PROG_CC
AC_AIX
dnl## LIBS=$OLDLIBS
case "$host_alias" in
*solaris*)
CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS";;
*dgux*)
CPPFLAGS="$CPPFLAGS -D_BSD_TIMEOFDAY_FLAVOR";;
*rhapsody*)
CPPFLAGS="$CPPFLAGS -traditional-cpp";;
esac
AM_PROG_CC_STDC
@@ -106,9 +107,9 @@ AC_PROG_LN_S
AM_PROG_LEX
dnl Make flex scanners use const if they can, even if __STDC__ is not
dnl true, for compilers like Sun's that only set __STDC__ true in
dnl "limit-to-ANSI-standard" mode, not in "ANSI-compatible" mode
dnl ## Make flex scanners use const if they can, even if __STDC__ is not
dnl ## true, for compilers like Sun's that only set __STDC__ true in
dnl ## "limit-to-ANSI-standard" mode, not in "ANSI-compatible" mode
AC_C_CONST
if test "$ac_cv_c_const" = "yes" ; then
LEX_CFLAGS="-DYY_USE_CONST"
@@ -118,6 +119,37 @@ sinclude(Zend/acinclude.m4)
sinclude(Zend/Zend.m4)
sinclude(TSRM/tsrm.m4)
divert(2)
PTHREADS_CHECK
PHP_SHLIB_SUFFIX_NAME
PHP_SAPI=cgi
PHP_BUILD_PROGRAM
dnl paths to the targets are relative to the build directory
SAPI_PROGRAM=php
SAPI_SHARED=libs/libphp4.$SHLIB_SUFFIX_NAME
SAPI_STATIC=libs/libphp4.a
PHP_CONFIGURE_PART(Configuring SAPI modules)
esyscmd(./scripts/config-stubs sapi)
AC_MSG_CHECKING(for chosen SAPI module)
AC_MSG_RESULT($PHP_SAPI)
if test "$enable_experimental_zts" = "yes"; then
PTHREADS_ASSIGN_VARS
PTHREADS_FLAGS
fi
divert(3)
PHP_CONFIGURE_PART(Running system checks)
PHP_MISSING_TIME_R_DECL
dnl check for -R, etc. switch
AC_MSG_CHECKING(whether compiler supports -R)
AC_CACHE_VAL(php_cv_cc_dashr,[
@@ -144,49 +176,64 @@ else
fi
fi
dnl AC_PROG_INSTALL
AC_PATH_PROG(PROG_SENDMAIL, sendmail, /usr/lib/sendmail, $PATH /usr/bin /usr/sbin /usr/etc /etc /usr/ucblib)
if test -n "$PROG_SENDMAIL"; then
AC_DEFINE(HAVE_SENDMAIL)
fi
PHP_PROG_SENDMAIL
dnl Check whether the system uses EBCDIC (not ASCII) as its native codeset
PHP_EBCDIC
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.
dnl
if test -d /usr/pkg/include -a -d /usr/pkg/lib ; then
CFLAGS="$CFLAGS -I/usr/pkg/include"
CPPFLAGS="$CPPFLAGS -I/usr/pkg/include"
LDFLAGS="$LDFLAGS -L/usr/pkg/lib"
fi
INCLUDES="-I\$(top_builddir)/Zend -I\$(top_srcdir)"
INCLUDES="$INCLUDES -I\$(top_builddir)/Zend -I\$(top_srcdir)"
AC_CHECK_LIB(nsl, gethostname, [
AC_ADD_LIBRARY(nsl)
AC_DEFINE(HAVE_LIBNSL) ], [])
AC_CHECK_LIB(socket, socket, [
AC_ADD_LIBRARY(socket)
AC_DEFINE(HAVE_LIBSOCKET) ], [
AC_DEFINE(HAVE_LIBSOCKET,1,[ ]) ], [
AC_CHECK_LIB(socket, htonl, [
AC_ADD_LIBRARY(socket)
])])
AC_CHECK_LIB(nsl, gethostbyaddr, [
dnl Some systems (OpenServer 5) dislike -lsocket -lnsl, so we try
dnl to avoid -lnsl checks, if we already have the functions which
dnl are usually in libnsl
unset ac_cv_func_yp_get_default_domain
AC_CHECK_FUNC(yp_get_default_domain,
[php_no_nsl_checks=yes],[ ])
unset ac_cv_func_yp_get_default_domain
if test "$php_no_nsl_checks" != "yes"; then
AC_CHECK_LIB(nsl, gethostname, [
AC_ADD_LIBRARY(nsl)
AC_DEFINE(HAVE_LIBNSL) ], [])
AC_DEFINE(HAVE_LIBNSL,1,[ ]) ],[
AC_CHECK_LIB(nsl, gethostbyaddr, [
AC_ADD_LIBRARY(nsl)
AC_DEFINE(HAVE_LIBNSL,1,[ ]) ], [])
])
fi
AC_CHECK_LIB(crypt, crypt, [
AC_ADD_LIBRARY(crypt)
AC_DEFINE(HAVE_LIBCRYPT,1,[ ]) ], [])
AC_CHECK_LIB(dl, dlopen,[AC_ADD_LIBRARY(dl)])
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(m, sin)
AC_CHECK_LIB(bind, inet_aton, [
AC_ADD_LIBRARY(bind)
AC_DEFINE(HAVE_LIBBIND) ], [])
AC_DEFINE(HAVE_LIBBIND,1,[Whether you have bind]) ], [])
AC_CHECK_LIB(resolv, inet_aton)
@@ -197,10 +244,10 @@ 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_DEFINE(HAVE_LIBSOCKET,1,[ ]) ], [
AC_CHECK_LIB(resolv, res_search, [
LIBS="$LIBS -lresolv"
AC_DEFINE(HAVE_LIBRESOLV)
AC_DEFINE(HAVE_LIBRESOLV,1,[ ])
], [
AC_CHECK_LIB(resolv, dn_skipname)
AC_CHECK_LIB(resolv, __dn_skipname)
@@ -219,22 +266,23 @@ fi
AC_MISSING_FCLOSE_DECL
dnl QNX requires unix.h to allow functions in libunix to work properly
AC_CHECK_HEADERS(
alloca.h \
arpa/inet.h \
crypt.h \
dlfcn.h \
fcntl.h \
grp.h \
limits.h \
locale.h \
memory.h \
netinet/in.h \
pwd.h \
signal.h \
stdarg.h \
stdlib.h \
string.h \
syslog.h \
sys/file.h \
sys/mman.h \
sys/resource.h \
sys/select.h \
sys/socket.h \
sys/statfs.h \
@@ -243,9 +291,9 @@ sys/time.h \
sys/types.h \
sys/varargs.h \
sys/wait.h \
syslog.h \
unistd.h \
unix.h \
utime.h \
)
dnl Checks for typedefs, structures, and compiler characteristics.
@@ -276,9 +324,6 @@ AC_STRUCT_ST_RDEV
dnl Checks for types
AC_TYPE_SIZE_T
AC_TYPE_UID_T
dnl This is required for QNX and may be some BSD derived systems
AC_CHECK_TYPE( uint, unsigned int )
AC_CHECK_TYPE( ulong, unsigned long )
dnl Checks for library functions.
AC_FUNC_VPRINTF
@@ -291,9 +336,11 @@ flock \
gcvt \
getlogin \
gethostbyaddr \
getrusage \
gettimeofday \
gmtime_r \
inet_aton \
isascii \
link \
localtime_r \
lockf \
@@ -305,7 +352,6 @@ putenv \
random \
rand_r \
regcomp \
rint \
setitimer \
setlocale \
setsockopt \
@@ -317,6 +363,7 @@ srand48 \
srandom \
statfs \
statvfs \
std_syslog \
strcasecmp \
strdup \
strerror \
@@ -337,6 +384,8 @@ AC_FUNC_UTIME_NULL
AC_FUNC_ALLOCA
AC_BROKEN_SPRINTF
PHP_DECLARED_TIMEZONE
PHP_TIME_R_TYPE
PHP_READDIR_R_TYPE
dnl AIX keeps in_addr_t in /usr/include/netinet/in.h
dnl AC_MSG_CHECKING(for in_addr_t)
@@ -355,60 +404,40 @@ changequote([,]), [#include <sys/types.h>
dnl AC_MSG_RESULT($ac_cv_type_in_addr_t)
if test $ac_cv_type_in_addr_t = no; then
AC_DEFINE(in_addr_t, u_int)
AC_DEFINE(in_addr_t, u_int, [ ])
fi
divert(3)
divert(4)
abs_srcdir=`(cd $srcdir; pwd)`
abs_builddir=`pwd`
AC_MSG_CHECKING(whether to use a configuration file)
AC_ARG_WITH(config-file-path,
PHP_ARG_WITH(config-file-path,whether to use a configuration file,
[ --with-config-file-path=PATH
Sets the path in which to look for php.ini.
defaults to /usr/local/lib],
[
if test "$withval" = "yes"; then
AC_DEFINE_UNQUOTED(CONFIGURATION_FILE_PATH, "/usr/local/lib")
AC_DEFINE(USE_CONFIG_FILE, 1)
AC_MSG_RESULT(yes)
else
if test "$withval" != "no"; then
AC_DEFINE_UNQUOTED(CONFIGURATION_FILE_PATH, "$withval")
AC_DEFINE(USE_CONFIG_FILE, 1)
AC_MSG_RESULT(yes)
else
AC_DEFINE(CONFIGURATION_FILE_PATH, 0)
AC_DEFINE(USE_CONFIG_FILE, 0)
AC_MSG_RESULT(no)
fi
fi
],[
AC_DEFINE_UNQUOTED(CONFIGURATION_FILE_PATH, "/usr/local/lib")
AC_DEFINE(USE_CONFIG_FILE, 1)
AC_MSG_RESULT(yes)
])
defaults to /usr/local/lib], yes)
if test "$PHP_CONFIG_FILE_PATH" = "yes"; then
PHP_CONFIG_FILE_PATH="/usr/local/lib"
fi
AC_ARG_ENABLE(debug,
[ --disable-debug Compile without debugging symbols], [
PHP_DEBUG=$enableval
],[
PHP_DEBUG=yes
])
if test "$PHP_CONFIG_FILE_PATH" != "no"; then
AC_DEFINE_UNQUOTED(CONFIGURATION_FILE_PATH, "$PHP_CONFIG_FILE_PATH",[ ])
AC_DEFINE(USE_CONFIG_FILE, 1, [ ])
else
AC_DEFINE(CONFIGURATION_FILE_PATH, 0, [ ])
AC_DEFINE(USE_CONFIG_FILE, 0, [ ])
fi
AC_MSG_CHECKING(whether to include debugging symbols)
AC_MSG_RESULT($PHP_DEBUG)
PHP_ARG_ENABLE(debug, whether to include debugging symbols,
[ --enable-debug Compile with debugging symbols.], no)
if test "$PHP_DEBUG" = "yes"; then
AC_DEFINE(DEBUG,1)
PHP_DEBUG=1
ZEND_DEBUG=yes
else
AC_DEFINE(DEBUG,0)
PHP_DEBUG=0
ZEND_DEBUG=no
fi
@@ -416,23 +445,14 @@ fi
test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS"
PHP_ARG_ENABLE(safe-mode, whether to enable safe mode by default,
[ --enable-safe-mode Enable safe mode by default.])
AC_MSG_CHECKING(whether to enable safe mode by default)
AC_ARG_ENABLE(safe-mode,
[ --enable-safe-mode Enable safe mode by default.],
[
if test "$enableval" = "yes"; then
AC_DEFINE(PHP_SAFE_MODE, 1)
AC_MSG_RESULT(yes)
else
AC_DEFINE(PHP_SAFE_MODE, 0)
AC_MSG_RESULT(no)
fi
],[
AC_DEFINE(PHP_SAFE_MODE, 0)
AC_MSG_RESULT(no)
])
if test "$PHP_SAFE_MODE" = "yes"; then
AC_DEFINE(PHP_SAFE_MODE,1,[ ])
else
AC_DEFINE(PHP_SAFE_MODE,0,[ ])
fi
AC_MSG_CHECKING(for safe mode exec dir)
AC_ARG_WITH(exec-dir,
@@ -441,150 +461,103 @@ AC_ARG_WITH(exec-dir,
[
if test "$withval" != "no"; then
if test "$withval" = "yes"; then
AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin")
AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ])
AC_MSG_RESULT(/usr/local/php/bin)
else
AC_DEFINE_UNQUOTED(PHP_SAFE_MODE_EXEC_DIR,"$withval")
AC_DEFINE_UNQUOTED(PHP_SAFE_MODE_EXEC_DIR,"$withval", [ ])
AC_MSG_RESULT($withval)
fi
else
AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin")
AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ])
AC_MSG_RESULT(/usr/local/php/bin)
fi
],[
AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin")
AC_DEFINE(PHP_SAFE_MODE_EXEC_DIR,"/usr/local/php/bin", [ ])
AC_MSG_RESULT(/usr/local/php/bin)
])
PHP_ARG_ENABLE(sigchild,whether to enable PHP's own SIGCHLD handler,
[ --enable-sigchild Enable PHP's own SIGCHLD handler.],no)
AC_MSG_CHECKING(whether to enable track_vars variables by default)
AC_ARG_ENABLE(track-vars,
[ --enable-track-vars Enable GET/POST/Cookie track variables by default.],
[
if test "$enableval" = "yes"; then
AC_DEFINE(PHP_TRACK_VARS, 1)
AC_MSG_RESULT(yes)
else
AC_DEFINE(PHP_TRACK_VARS, 0)
AC_MSG_RESULT(no)
fi
],[
AC_DEFINE(PHP_TRACK_VARS, 0)
AC_MSG_RESULT(no)
])
if test "$PHP_SIGCHILD" = "yes"; then
AC_DEFINE(PHP_SIGCHILD, 1, [ ])
else
AC_DEFINE(PHP_SIGCHILD, 0, [ ])
fi
PHP_ARG_ENABLE(magic-quotes,whether to enable magic quotes by default,
[ --enable-magic-quotes Enable magic quotes by default.])
AC_MSG_CHECKING(whether to enable magic quotes by default)
AC_ARG_ENABLE(magic-quotes,
[ --enable-magic-quotes Enable magic quotes by default.],
[
if test "$enableval" = "yes"; then
AC_DEFINE(MAGIC_QUOTES, 1)
AC_MSG_RESULT(yes)
else
AC_DEFINE(MAGIC_QUOTES, 0)
AC_MSG_RESULT(no)
fi
],[
AC_DEFINE(MAGIC_QUOTES, 0)
AC_MSG_RESULT(no)
])
if test "$PHP_MAGIC_QUOTES" = "yes"; then
AC_DEFINE(MAGIC_QUOTES, 1, [ ])
else
AC_DEFINE(MAGIC_QUOTES, 0, [ ])
fi
AC_MSG_CHECKING(whether to enable runpaths)
AC_ARG_ENABLE(rpath,
PHP_ARG_ENABLE(rpath, whether to enable runpaths,
[ --disable-rpath Disable passing additional runtime library
search paths],
[
if test "$enableval" = "no"; then
enable_rpath=no
else
enable_rpath=yes
fi
],[
enable_rpath=yes
])
AC_MSG_RESULT($enable_rpath)
search paths], yes)
AC_MSG_CHECKING(whether to enable short tags by default)
AC_ARG_ENABLE(short-tags,
[ --disable-short-tags Disable the short-form <? start tag by default.],
[
if test "$enableval" = "no"; then
AC_DEFINE(DEFAULT_SHORT_OPEN_TAG, 0)
AC_MSG_RESULT(no)
else
AC_DEFINE(DEFAULT_SHORT_OPEN_TAG, 1)
AC_MSG_RESULT(yes)
fi
],[
AC_DEFINE(DEFAULT_SHORT_OPEN_TAG, 1)
AC_MSG_RESULT(yes)
])
PHP_ARG_ENABLE(libgcc, whether to explicitly link against libgcc,
[ --enable-libgcc Enable explicitly linking against libgcc])
AC_MSG_CHECKING(whether to enable the URL-aware fopen wrapper)
AC_ARG_ENABLE(url-fopen-wrapper,
if test "$PHP_LIBGCC" = "yes"; then
PHP_LIBGCC_LIBPATH(gcc)
if test -z "$libgcc_libpath"; then
AC_MSG_ERROR(Cannot locate libgcc. Make sure that gcc is in your path)
fi
AC_ADD_LIBPATH($libgcc_libpath)
AC_ADD_LIBRARY(gcc, yes)
fi
PHP_ARG_ENABLE(short-tags,whether to enable short tags by default,
[ --disable-short-tags Disable the short-form <? start tag by default.],yes)
if test "$PHP_SHORT_TAGS" = "yes"; then
AC_DEFINE(DEFAULT_SHORT_OPEN_TAG,1,[ ])
else
AC_DEFINE(DEFAULT_SHORT_OPEN_TAG,0,[ ])
fi
PHP_ARG_ENABLE(url-fopen-wrapper,whether to enable the URL-aware fopen wrapper,
[ --disable-url-fopen-wrapper
Disable the URL-aware fopen wrapper that allows
accessing files via http or ftp.],
[
if test "$enableval" = "yes"; then
AC_DEFINE(PHP3_URL_FOPEN, 1)
AC_MSG_RESULT(yes)
else
AC_DEFINE(PHP3_URL_FOPEN, 0)
AC_MSG_RESULT(no)
fi
],[
AC_DEFINE(PHP3_URL_FOPEN, 1)
AC_MSG_RESULT(yes)
])
accessing files via http or ftp.], yes)
DMALLOC_RESULT=no
AC_MSG_CHECKING(whether to enable dmalloc)
AC_ARG_ENABLE(dmalloc,
[ --enable-dmalloc Enable dmalloc],
[
if test "$enableval" = "yes" ; then
AC_DEFINE(HAVE_DMALLOC, 1)
AC_ADD_LIBRARY(dmalloc)
CFLAGS="$CFLAGS -DDMALLOC_FUNC_CHECK"
DMALLOC_RESULT=yes
fi
])
AC_MSG_RESULT($DMALLOC_RESULT)
if test "$PHP_URL_FOPEN_WRAPPER" = "yes"; then
AC_DEFINE(PHP_URL_FOPEN, 1, [ ])
else
AC_DEFINE(PHP_URL_FOPEN, 0, [ ])
fi
AC_ARG_ENABLE(pear,
[ --disable-pear Do not install PEAR],[
PHP_PEAR=$enableval
],[
PHP_PEAR=yes
])
PHP_ARG_ENABLE(pic,whether to enable PIC for shared objects,
[ --disable-pic Disable PIC for shared objects], yes)
AC_MSG_CHECKING(whether to install PEAR)
AC_MSG_RESULT($PHP_PEAR)
PHP_ARG_ENABLE(dmalloc,whether to enable dmalloc,
[ --enable-dmalloc Enable dmalloc])
if test "$PHP_DMALLOC" = "yes"; then
AC_DEFINE(HAVE_DMALLOC,1,[Whether you have dmalloc])
AC_ADD_LIBRARY(dmalloc)
CPPFLAGS="$CPPFLAGS -DDMALLOC_FUNC_CHECK"
fi
PHP_ARG_ENABLE(pear,whether to install PEAR,
[ --disable-pear Do not install PEAR],yes)
if test "$PHP_PEAR" = "yes"; then
PEAR_DIR=pear
fi
PHP_OUTPUT(pear/pear)
PHP_OUTPUT(pear/run-tests)
PHP_OUTPUT(pear/phpize)
PHP_OUTPUT(pear/php-config)
PHP_OUTPUT(pear/PEAR.php)
PHP_SAPI=cgi
PHP_BUILD_PROGRAM
dnl paths to the targets relative to the build directory
SAPI_PROGRAM=php
dnl on HP-UX, the extension is .sl. Need to improve this
SAPI_SHARED=libs/libphp4.so
SAPI_STATIC=libs/libphp4.a
PHP_CONFIGURE_PART(Configuring SAPI modules)
esyscmd(./scripts/config-stubs sapi)
AC_MSG_CHECKING(for chosen SAPI module)
AC_MSG_RESULT($PHP_SAPI)
divert(4)
divert(5)
PHP_CONFIGURE_PART(Configuring extensions)
@@ -610,7 +583,7 @@ if test "$PHP_VERSIONING" = "yes"; then
fi
fi
divert(5)
divert(6)
enable_shared=yes
enable_static=yes
@@ -634,13 +607,6 @@ fi
PHP_REGEX
case "`uname -s`" in
SunOS*)
CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS";;
esac
CPPFLAGS="$CPPFLAGS -D_REENTRANT"
PHP_CONFIGURE_PART(Configuring Zend)
LIBZEND_BASIC_CHECKS
LIBZEND_OTHER_CHECKS
@@ -648,7 +614,7 @@ LIBZEND_OTHER_CHECKS
if test "$ZEND_EXPERIMENTAL_ZTS" = "yes"; then
TSRM_LIB='TSRM/libtsrm.la'
TSRM_DIR=TSRM
AC_DEFINE(ZTS)
AC_DEFINE(ZTS,1,[ ])
INCLUDES="$INCLUDES -I\$(top_builddir)/TSRM"
PHP_THREAD_SAFETY=yes
else
@@ -656,22 +622,13 @@ else
fi
if test "$abs_srcdir" != "$abs_builddir"; then
INCLUDES="$INCLUDES -I\$(top_srcdir)/Zend"
INCLUDES="$INCLUDES -I\$(top_srcdir)/main -I\$(top_srcdir)/Zend"
if test "$PHP_THREAD_SAFETY" = "yes"; then
INCLUDES="$INCLUDES -I\$(top_srcdir)/TSRM"
fi
fi
dnl *** Commented out - generates slow code and consumes a lot of
dnl *** resources during compilation - we need to figure out how
dnl *** to supply it only when absolutely necessary
dnl If we are using gcc add -fpic to make dl() work on some platforms
dnl test -n "$GCC" && CFLAGS="$CFLAGS -fpic"
dnl add -fPIC option on Solaris if we are building dynamic extensions
dnl PHP_SOLARIS_PIC_WEIRDNESS
EXTRA_LIBS="$EXTRA_LIBS $LIBS"
EXTRA_LIBS="$EXTRA_LIBS $DLIBS $LIBS"
LIBS=""
LDFLAGS=""
if test "$PHP_THREAD_SAFETY" = "yes"; then
@@ -687,18 +644,44 @@ fi
phplibdir="`pwd`/modules"
$php_shtool mkdir -p $phplibdir
phptempdir="`pwd`/libs"
test "$prefix" = "NONE" && prefix="/usr/local"
test "$exec_prefix" = "NONE" && exec_prefix='$(prefix)'
dnl Build extension directory path
if test "$PHP_DEBUG" = "1"; then
PART1=debug
else
PART1=no-debug
fi
if test "$enable_experimental_zts" = "yes"; then
PART2=zts
else
PART2=non-zts
fi
ZEND_MODULE_API_NO=`egrep '#define ZEND_MODULE_API_NO ' $srcdir/Zend/modules.h|sed 's/#define ZEND_MODULE_API_NO //'`
EXTENSION_DIR="$prefix/lib/php/extensions/$PART1-$PART2-$ZEND_MODULE_API_NO"
PEAR_INSTALLDIR="$prefix/lib/php"
INCLUDE_PATH=".:$PEAR_INSTALLDIR"
AC_BUILD_RPATH
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS"
PHP_BUILD_DATE=`date '+%Y-%m-%d'`
AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE")
AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build date])
PHP_UNAME=`uname -a`
AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME")
AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[uname -a output])
PHP_OS=`uname`
AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS")
AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS",[uname output])
@@ -718,18 +701,24 @@ PHP_SUBST(CONFIGURE_COMMAND)
PHP_SUBST(CPP)
PHP_SUBST(CPPFLAGS)
PHP_SUBST(CXX)
PHP_SUBST(CXXFLAGS)
PHP_SUBST(CXX_PHP_COMPILE)
PHP_SUBST(DEBUG_CFLAGS)
PHP_SUBST(DEFS)
PHP_SUBST(EXTENSION_DIR)
PHP_SUBST(EXTRA_LDFLAGS)
PHP_SUBST(EXTRA_LIBS)
PHP_SUBST(INCLUDES)
PHP_SUBST(INCLUDE_PATH)
PHP_SUBST(INSTALL_IT)
PHP_SUBST(LEX)
PHP_SUBST(LEX_OUTPUT_ROOT)
PHP_SUBST(LFLAGS)
PHP_SUBST(LIBTOOL)
PHP_SUBST(LN_S)
PHP_SUBST(NATIVE_RPATHS)
PHP_SUBST(PEAR_DIR)
PHP_SUBST(PEAR_INSTALLDIR)
PHP_SUBST(PHP_BUILD_DATE)
PHP_SUBST(PHP_COMPILE)
PHP_SUBST(PHP_LDFLAGS)
@@ -740,45 +729,85 @@ PHP_SUBST(PHP_SAPI)
PHP_SUBST(PHP_VERSION)
PHP_SUBST(PROG_SENDMAIL)
PHP_SUBST(SHELL)
PHP_SUBST(SHLIBTOOL)
PHP_SUBST(SHARED_LIBTOOL)
PHP_SUBST(TSRM_DIR)
PHP_SUBST(TSRM_LIB)
PHP_SUBST(WARNING_LEVEL)
PHP_SUBST(YACC)
PHP_CONFIGURE_PART(Configuring libtool)
old_CC="$CC"
if test "$PHP_THREAD_SAFETY" = "yes" && test -n "$ac_cv_pthreads_cflags"; then
CXXFLAGS="$CXXFLAGS $ac_cv_pthreads_cflags"
INLINE_CFLAGS="$INLINE_CFLAGS $ac_cv_pthreads_cflags"
cat >meta_ccld<<EOF
#! /bin/sh
exec $CC $ac_cv_pthreads_cflags \$@
EOF
CC="$abs_builddir/meta_ccld"
chmod +x meta_ccld
fi
dnl This will go away, if we have a facility to run per-extension code
dnl after the thread_safety decision was done
if test "$PHP_THREAD_SAFETY" = "yes" && test "$PHP_MYSQL" = "yes"; then
CPPFLAGS="$CPPFLAGS -DTHREAD=1"
fi
AM_PROG_LIBTOOL
if test "$enable_debug" != "yes"; then
AM_SET_LIBTOOL_VARIABLE([--silent])
fi
PHP_COMPILE='$(LIBTOOL) --mode=compile $(COMPILE) -c $<'
CXX_PHP_COMPILE='$(LIBTOOL) --mode=compile $(CXX_COMPILE) -c $<'
if test "$enable_shared" = "yes"; then
SHLIBTOOL='$(LIBTOOL)'
SHARED_LIBTOOL='$(LIBTOOL)'
else
if test -n "$EXT_SHARED"; then
if test "$lib_build_shared" = "yes"; then
PHP_CONFIGURE_PART(Configuring shared libtool)
$SHELL $srcdir/ltconfig --output=shlibtool --disable-static --srcdir=$srcdir --cache-file=./config.cache $srcdir/ltmain.sh
SHLIBTOOL='$(SHELL) $(top_builddir)/shlibtool'
SHARED_LIBTOOL='$(SHELL) $(top_builddir)/shlibtool'
else
PHP_COMPILE='$(COMPILE) -c $< && touch $@'
CXX_PHP_COMPILE='$(CXX_COMPILE) -c $< && touch $@'
fi
fi
test "$prefix" = "NONE" && prefix="/usr/local"
test "$exec_prefix" = "NONE" && exec_prefix='$(prefix)'
CC="$old_CC"
changequote({,})
if test "$PHP_PIC" = "no"; then
cat >meta_cc<<EOF
#! /bin/sh
cmd="$CC \`echo \$@|sed s/-[fFD]PIC//g\`"
exec \$cmd
EOF
chmod +x meta_cc
CC="$abs_builddir/meta_cc"
fi
changequote([,])
PHP_CONFIGURE_PART(Generating files)
PHP_FAST_GENERATE
PHP_GEN_CONFIG_VARS
touch .deps
#libphp4.module
AC_OUTPUT([php4.spec Zend/Makefile
scripts/mkextlib build-defs.h
$PHP_OUTPUT_FILES
], [], [
ALL_OUTPUT_FILES="php4.spec Zend/Makefile build-defs.h $PHP_OUTPUT_FILES"
AC_OUTPUT($ALL_OUTPUT_FILES, [], [
if test "\$CONFIG_FILES" = "$ALL_OUTPUT_FILES"; then
REDO_ALL=yes
fi
if test -n "\$REDO_ALL"; then
PHP_GEN_MAKEFILES($PHP_FAST_OUTPUT_FILES)
fi
if test ! -f $srcdir/ext/bcmath/number.c; then
echo "creating number.c"
echo "/* Dummy File */" > $srcdir/ext/bcmath/number.c
@@ -802,26 +831,25 @@ cat >Zend/zend_config.h <<FEO
FEO
# run this only when generating all the files?
if true; then
chmod +x scripts/mkextlib
if test -n "\$REDO_ALL"; then
# Hacking while airborne considered harmful.
#
echo "creating internal_functions.c"
echo "creating main/internal_functions.c"
extensions=\`grep '^s.@EXT_STATIC@' \$0|sed -e 's/^.*@% *//' -e 's/%.*$//'\`
mv -f internal_functions.c internal_functions.c.old 2>/dev/null
sh $srcdir/genif.sh $srcdir/internal_functions.c.in $srcdir \$extensions > internal_functions.c
if cmp internal_functions.c.old internal_functions.c > /dev/null 2>&1; then
echo "internal_functions.c is unchanged"
mv internal_functions.c.old internal_functions.c
mv -f main/internal_functions.c main/internal_functions.c.old 2>/dev/null
sh $srcdir/genif.sh $srcdir/main/internal_functions.c.in $srcdir "$EXTRA_MODULE_PTRS" \$extensions > main/internal_functions.c
if cmp main/internal_functions.c.old main/internal_functions.c > /dev/null 2>&1; then
echo "main/internal_functions.c is unchanged"
mv main/internal_functions.c.old main/internal_functions.c
else
rm -f internal_functions.c.old
rm -f main/internal_functions.c.old
fi
if test -n "$PHP_APXS_BROKEN"; then
echo "+--------------------------------------------------------------------+"
echo "| WARNING: Your $APXS script is most likely broken."
echo "| |"
echo "| Please go read http://www.php.net/FAQ.php3#4.11 and make the |"
echo "| Please go read http://www.php.net/FAQ.php#6.11 and make the |"
echo "| changes described there and try again. |"
fi
@@ -830,16 +858,49 @@ if true; then
if test "$REDIRECT" = "0"; then
if test "$DISCARD_PATH" = "0"; then
echo "+--------------------------------------------------------------------+"
echo "| Warning: |"
echo "| *** WARNING *** |"
echo "| |"
echo "| You will be compiling the CGI version of PHP without any |"
echo "| redirection checking. By putting this cgi binary somewhere in |"
echo "| your web space, users may be able to circumvent existing .htaccess |"
echo "| security by loading files directly through the parser. See |"
echo "| http://www.php.net/manual/config-security.php3 for more details. |"
echo "| http://www.php.net/manual/security.php for more details. |"
fi
fi
fi
if test -n "$DEBUG_LOG"; then
rm -f config.cache
cat <<X
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
| Something is likely to be messed up here, because the configure |
| script was not able to detect a simple feature on your platform. |
| This is often caused by incorrect configuration parameters. Please |
| see the file debug.log for error messages. |
| |
| If you are unable to fix this, send the file debug.log to the |
| php-install@lists.php.net mailing list and include appropiate |
| information about your setup. |
X
fi
if test "$MYSQL_MODULE_TYPE" = "builtin" ; then
cat <<X
+--------------------------------------------------------------------+
| *** WARNING *** |
| |
| You chose to compile PHP with the built-in MySQL support. If you |
| are compiling a server module, and intend to use other server |
| modules that also use MySQL (e.g, mod_auth_mysql, PHP 3.0, |
| mod_perl) you must NOT rely on PHP's built-in MySQL support, and |
| instead build it with your local MySQL support files, by adding |
| --with-mysql=/path/to/mysql to your configure line. |
X
fi
echo "+--------------------------------------------------------------------+"
echo "| License: |"
echo "| This software is subject to the PHP License, available in this |"
@@ -849,6 +910,12 @@ if true; then
echo "| the installation process at this point. |"
echo "+--------------------------------------------------------------------+"
cat<<X
Thank you for using PHP.
X
fi
])
-204
View File
@@ -1,204 +0,0 @@
# Microsoft Developer Studio Generated NMAKE File, Based on crypt.dsp
!IF "$(CFG)" == ""
CFG=crypt - Win32 Debug
!MESSAGE No configuration specified. Defaulting to crypt - Win32 Debug.
!ENDIF
!IF "$(CFG)" != "crypt - Win32 Release" && "$(CFG)" != "crypt - Win32 Debug"
!MESSAGE Invalid configuration "$(CFG)" specified.
!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 "crypt.mak" CFG="crypt - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "crypt - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "crypt - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
!ERROR An invalid configuration is specified.
!ENDIF
!IF "$(OS)" == "Windows_NT"
NULL=
!ELSE
NULL=nul
!ENDIF
!IF "$(CFG)" == "crypt - Win32 Release"
OUTDIR=.\module_Release
INTDIR=.\module_Release
# Begin Custom Macros
OutDir=.\module_Release
# End Custom Macros
ALL : "$(OUTDIR)\php3_crypt.dll"
CLEAN :
-@erase "$(INTDIR)\crypt.obj"
-@erase "$(INTDIR)\sflcryp.obj"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(OUTDIR)\php3_crypt.dll"
-@erase "$(OUTDIR)\php3_crypt.exp"
-@erase "$(OUTDIR)\php3_crypt.lib"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MT /W3 /GX /O2 /I "./" /I "../" /D HAVE_SFLCRYPT=1 /D "COMPILE_DL" /D "MSVC5" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Fp"$(INTDIR)\crypt.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
MTL=midl.exe
MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\crypt.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=php.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\php3_crypt.pdb" /machine:I386 /out:"$(OUTDIR)\php3_crypt.dll" /implib:"$(OUTDIR)\php3_crypt.lib" /libpath:"cgi_release"
LINK32_OBJS= \
"$(INTDIR)\crypt.obj" \
"$(INTDIR)\sflcryp.obj"
"$(OUTDIR)\php3_crypt.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ELSEIF "$(CFG)" == "crypt - Win32 Debug"
OUTDIR=.\module_debug
INTDIR=.\module_debug
# Begin Custom Macros
OutDir=.\module_debug
# End Custom Macros
ALL : "$(OUTDIR)\php3_crypt.dll"
CLEAN :
-@erase "$(INTDIR)\crypt.obj"
-@erase "$(INTDIR)\sflcryp.obj"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(INTDIR)\vc60.pdb"
-@erase "$(OUTDIR)\php3_crypt.dll"
-@erase "$(OUTDIR)\php3_crypt.exp"
-@erase "$(OUTDIR)\php3_crypt.ilk"
-@erase "$(OUTDIR)\php3_crypt.lib"
-@erase "$(OUTDIR)\php3_crypt.pdb"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MTd /W3 /Gm /GX /ZI /Od /I "./" /I "../" /I "../../" /D HAVE_SFLCRYPT=1 /D "DEBUG" /D "COMPILE_DL" /D "MSVC5" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /Fp"$(INTDIR)\crypt.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
MTL=midl.exe
MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\crypt.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=php.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /incremental:yes /pdb:"$(OUTDIR)\php3_crypt.pdb" /debug /machine:I386 /out:"$(OUTDIR)\php3_crypt.dll" /implib:"$(OUTDIR)\php3_crypt.lib" /pdbtype:sept /libpath:"cgi_debug"
LINK32_OBJS= \
"$(INTDIR)\crypt.obj" \
"$(INTDIR)\sflcryp.obj"
"$(OUTDIR)\php3_crypt.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ENDIF
!IF "$(NO_EXTERNAL_DEPS)" != "1"
!IF EXISTS("crypt.dep")
!INCLUDE "crypt.dep"
!ELSE
!MESSAGE Warning: cannot find "crypt.dep"
!ENDIF
!ENDIF
!IF "$(CFG)" == "crypt - Win32 Release" || "$(CFG)" == "crypt - Win32 Debug"
SOURCE=.\dl\crypt\crypt.c
"$(INTDIR)\crypt.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=.\dl\crypt\sflcryp.c
"$(INTDIR)\sflcryp.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ENDIF
Executable
+3
View File
@@ -0,0 +1,3 @@
#! /bin/sh
${MAKE:-make} -f build/build.mk cvsclean
Loaded 100 of 790 files, more files were not shown because too many files have changed in this diff. Show more