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
619 changed files with 39636 additions and 16792 deletions

No files matched your search

+5983
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?
+85 -14
View File
@@ -8,12 +8,29 @@ 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 (DSO)
For this to work your Apache httpd must have mod_so enabled.
@@ -36,6 +53,9 @@ 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:
@@ -64,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
@@ -263,14 +283,12 @@ Installing PHP can be done in four simple steps:
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
The create a test file named test.php in your web tree somewhere and
put some test PHP tags in it. <?phpinfo()?> is a good first test.
This tag tells PHP to do a braindump and tells you all sorts of things
about itself.
4b. Setting up the server. (Static Module)
You should now have a new httpd binary. Shut down your existing server,
@@ -289,18 +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 httpd.conf file, you can
start up your server. Note that on some older server setups, the
AddType lines are in the conf/srm.conf file instead of conf/httpd.conf.
Note 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:
@@ -309,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.92
of the Zend License.
The license is bundled with the Zend engine, and is available
at http://www.zend.com/license/0_92.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/.
-105
View File
@@ -1,105 +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: interbase
PRIMARY MAINTAINER: Jouni Ahto <jah@mork.net>
STATUS: Odd Fixes
--------------------------------------------------------------------------------
EXTENSION: java
PRIMARY MAINTAINER: Sam Ruby <rubys@us.ibm.com>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: ldap
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
STATUS: Odd Fixes
--------------------------------------------------------------------------------
EXTENSION: mcrypt
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: mhash
PRIMARY MAINTAINER: Sascha Schumann <sascha@schumann.cx>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: mssql
PRIMARY MAINTAINER: Frank M. Kromann <fmk@swwwing.com>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: oci8
PRIMARY MAINTAINER: Thies C. Arntzen <thies@digicol.de>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: oracle
PRIMARY MAINTAINER: Thies C. Arntzen <thies@digicol.de>
STATUS: Maintained
COMMENT: Using the new OCI8 driver is encouraged where possible.
--------------------------------------------------------------------------------
EXTENSION: pcre
PRIMARY MAINTAINER: Andrei Zmievski <andrei@ispi.net>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: pdf
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
STATUS: Maintained
--------------------------------------------------------------------------------
EXTENSION: 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
--------------------------------------------------------------------------------
-25
View File
@@ -1,25 +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
oracle Working
iptc Working
informix Working
zlib Working
sysvshm Working
odbc Working (except for persistent connections)
MS SQL Working (tested on phpts and isapi versions)
snmp Working
gettext Working
mcal Working
interbase Mostly working
+14 -20
View File
@@ -1,19 +1,14 @@
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 php_ticks.c php_virtual_cwd.c
LTLIBRARY_SOURCES = stub.c
LTLIBRARY_DEPENDENCIES = \
Zend/libZend.la \
sapi/$(PHP_SAPI)/libsapi.la \
main/libmain.la \
$(REGEX_LIB) \
$(EXT_LTLIBS) \
$(TSRM_LIB)
@@ -21,13 +16,13 @@ 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-sapi install-modules
@@ -38,6 +33,14 @@ 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)
install-modules:
@@ -45,18 +48,9 @@ install-modules:
$(mkinstalldirs) $(moduledir) && \
echo "installing shared modules into $(moduledir)" && \
rm -f modules/*.la && \
cp modules/* $(moduledir) || true
cp modules/* $(moduledir) >/dev/null 2>&1 || true
install-su: install-modules
(cd pear && $(MAKE) install)
configuration-parser.h configuration-parser.c: $(srcdir)/configuration-parser.y
$(YACC) -p cfg -v -d $< -o configuration-parser.c
configuration-scanner.c: $(srcdir)/configuration-scanner.l
$(LEX) -Pcfg -o$@ -i $<
internal_functions.c: internal_functions.c.in config.status
CONFIG_FILES= CONFIG_HEADERS= ./config.status
.NOEXPORT:
+285 -3
View File
@@ -1,7 +1,289 @@
PHP 4.0 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2000, Version 4.0.0 Release
?? ??? 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)
@@ -18,7 +300,7 @@ PHP 4.0 NEWS
- 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 library)
- 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)
@@ -28,7 +310,7 @@ PHP 4.0 NEWS
- 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 were to seek from.
- 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)
+1 -1
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
+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");
}
/* }}} */
+50 -5
View File
@@ -14,6 +14,19 @@ HOW TO CREATE A SELF-CONTAINED PHP EXTENSION
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
@@ -69,7 +82,7 @@ CREATING THE MAKEFILE TEMPLATE
LTLIBRARY_SHARED_NAME = foobar.la
LTLIBRARY_SOURCES = foo.c bar.c
include $(top_srcdir)/build/rules.mk
include $(top_srcdir)/build/dynlib.mk
------------------------------------------------------------------------------
LTLIBRARY_SHARED_NAME specifies the name of the extension.
@@ -93,17 +106,27 @@ CREATING THE M4 CONFIGURATION FILE
PHP_ARG_ENABLE(foobar,whether to enable foobar,
[ --enable-foobar Enable foobar])
PHP_EXTENSION(foobar, $ext_shared)
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
[You are currently alone here. There are a lot of existing modules,
use a simply module as a starting point and add your own code.]
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
@@ -126,4 +149,26 @@ INSTALLING A SELF-CONTAINED EXTENSION
$ ./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
+16 -1
View File
@@ -51,9 +51,21 @@ that you wish to run PHP on:
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 Gatway' error when
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.
@@ -81,6 +93,9 @@ 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:
+27 -6
View File
@@ -9,6 +9,7 @@ Zend
global
------
* make everything on the language-level independent of your locale setings.
* always build the standalone executable as well as the chosen SAPI
target.
* make sure all source files have the "right" copyright.
@@ -35,6 +36,8 @@ global
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
-------------
@@ -53,24 +56,43 @@ ext/oci8
--------
* all OCIFetch*() functions should return 0 for no more data and false on error.
* have a flag that trims trailing spaces from CHAR fields on retrieval.
* make allow_call_time_pass_reference=Off working.
ext/pcre
--------
* have a non-greedy option for preg_replace().
* have an option for preg_grep() to return keys as well.
* update the online docs from version 3.1 man page
ext/session
-----------
* implement a call to set a session read-only to overcome
the need to serialize frame-loads.
* maybe implement finer-grained session variables that could be
locked individually.
* write a network-transparent storage back-end with fallover
facilities
ext/standard
------------
* add a version number to data serialized via serialize().
* array_add(), array_rand(), array_uniq(). (Andrei)
* implement pathinfo() (what the heck is it?)
* 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)
* strcase_replace(). (Andrei)
* comparing arrays semantically (like Python). (Andrei)
* move socket related functions to fsock.c.
* get_defined_funcs(), get_defined_vars().
* NOT binary safe:
@@ -83,7 +105,6 @@ ext/standard
ext/wddx
--------
* implement __sleep() and __wakeup() the way serialize()/unserialize() do.
* See if we can support the remaining datatypes:
dateTime
binary
+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 */
+11 -1
View File
@@ -87,6 +87,16 @@ 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"
@@ -99,7 +109,7 @@ 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 -pthreads -pthread -mthreads -Kthread; do
for flag in -kthread -pthread -pthreads -mthreads -Kthread -threads -mt -qthreaded; do
ac_save="$CFLAGS"
CFLAGS="$CFLAGS $flag"
PTHREADS_CHECK_COMPILE
+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 -4
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,13 +19,13 @@ 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.lo zend-scanner-cc.lo: zend-parser.h
$(libZend_la_OBJECTS) zend-scanner.lo zend-scanner-cc.lo: zend-parser.h
zend-scanner.c: $(srcdir)/zend-scanner.l
$(LEX) -Pzend -o$@ -i $(srcdir)/zend-scanner.l
+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
+26 -8
View File
@@ -64,6 +64,10 @@ AC_FUNC_MEMCMP
AC_FUNC_ALLOCA
AC_CHECK_FUNCS(memcpy strdup getpid kill strtod strtol finite)
AC_ZEND_BROKEN_SPRINTF
AC_CHECK_FUNCS(finite isfinite isinf isnan)
ZEND_FP_EXCEPT
AC_SUBST(ZEND_SCANNER)
@@ -76,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
])
])
@@ -95,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
@@ -122,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)
@@ -135,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
@@ -155,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 "ZEND_WIN32" /D "WIN32" /D "_MBCS" /D "PHP_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" /D "PHP_WIN32" /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 "ZEND_WIN32_FORCE_INLINE" /D "WIN32" /D "_MBCS" /D "PHP_WIN32" /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
+14 -24
View File
@@ -3,37 +3,16 @@
@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
@@ -50,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
+105 -100
View File
@@ -45,7 +45,7 @@
%}
%pure_parser
%expect 7
%expect 4
%left T_INCLUDE T_INCLUDE_ONCE T_EVAL
%left ','
@@ -53,7 +53,7 @@
%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
@@ -133,7 +133,6 @@
%token T_DOLLAR_OPEN_CURLY_BRACES
%token T_CURLY_OPEN
%token T_PAAMAYIM_NEKUDOTAYIM
%token T_PHP_TRACK_VARS
%% /* Rules */
@@ -181,32 +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, 0 CLS_CC); }
| T_REQUIRE_ONCE use_filename ';' { do_require(&$2, 1 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 */ { $$.op_type = IS_UNUSED; }
| case_list T_CASE expr case_separator { do_case_before_statement(&$1, &$2, &$3 CLS_CC); } inner_statement_list { do_case_after_statement(&$$, &$2 CLS_CC); $$.op_type = IS_CONST }
| case_list T_DEFAULT case_separator { do_default_before_statement(&$1, &$2 CLS_CC); } inner_statement_list { do_case_after_statement(&$$, &$2 CLS_CC); $$.op_type = IS_CONST; }
| 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,27 +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_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 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); }
@@ -484,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); }
@@ -497,46 +502,46 @@ function_call:
exit_expr:
/* empty */ { memset(&$$, 0, sizeof(znode)); $$.op_type = IS_UNUSED; }
| '(' ')' { memset(&$$, 0, sizeof(znode)); $$.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; }
@@ -545,7 +550,7 @@ scalar:
static_array_pair_list:
/* empty */ { $$.op_type = IS_CONST; INIT_PZVAL(&$$.u.constant); array_init(&$$.u.constant); }
/* empty */ { $$.op_type = IS_CONST; INIT_PZVAL(&$$.u.constant); array_init(&$$.u.constant); }
| non_empty_static_array_pair_list possible_comma { $$ = $1; }
;
@@ -556,9 +561,9 @@ possible_comma:
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:
@@ -603,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); }
;
@@ -659,33 +664,33 @@ assignment_list_element:
array_pair_list:
/* empty */ { do_init_array(&$$, NULL, NULL, 0 CLS_CC); }
/* 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); }
;
@@ -703,16 +708,16 @@ 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); }
;
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 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); }
;
+7 -9
View File
@@ -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);
+45 -70
View File
@@ -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,7 +317,7 @@ 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;
}
@@ -460,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;
}
@@ -686,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]+
@@ -739,6 +708,7 @@ TABS_AND_SPACES [ \t]*
TOKENS [;:,.\[\]()|^&+-/*=%!~$<>?@]
ENCAPSED_TOKENS [\[\]{}$]
ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
ANY_CHAR (.|[\n])
%option noyylineno
%option noyywrap
@@ -877,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();
@@ -1053,7 +1023,7 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
}
<ST_IN_SCRIPTING>"^=" {
return XT_OR_EQUAL;
return T_XOR_EQUAL;
}
<ST_IN_SCRIPTING>"||" {
@@ -1120,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();
@@ -1221,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;
@@ -1241,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} {
@@ -1316,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;
}
}
@@ -1556,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]);
@@ -1568,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);
@@ -1582,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);
@@ -1679,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);
}
+138 -38
View File
@@ -36,6 +36,10 @@
# 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, ...);
@@ -44,14 +48,11 @@ ZEND_API FILE *(*zend_fopen)(const char *filename, char **opened_path);
ZEND_API void (*zend_block_interruptions)(void);
ZEND_API void (*zend_unblock_interruptions)(void);
ZEND_API void (*zend_ticks_function)(int ticks);
ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
static void (*zend_message_dispatcher_p)(long message, void *data);
static int (*zend_get_ini_entry_p)(char *name, uint name_length, zval *contents);
#if ZEND_NEW_ERROR_HANDLING
static void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
#else
ZEND_API void (*zend_error_cb)(int type, const char *format, ...);
#endif
#ifdef ZTS
ZEND_API int compiler_globals_id;
@@ -69,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-2000 Zend Technologies Ltd.\n"
#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998-2000 Zend Technologies\n"
#define PRINT_ZVAL_INDENT 4
@@ -222,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");
}
@@ -232,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;
@@ -243,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);
}
@@ -281,6 +294,7 @@ static void executor_globals_ctor(zend_executor_globals *executor_globals)
zend_copy_constants(executor_globals->zend_constants, global_constants_table);
}
zend_init_rsrc_plist(ELS_C);
EG(lambda_count)=0;
}
@@ -298,6 +312,10 @@ 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 start_builtin_functions)
{
@@ -310,6 +328,21 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions, i
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_cb = utility_functions->error_function;
zend_printf = utility_functions->printf_function;
@@ -335,10 +368,10 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions, i
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_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 */
@@ -359,6 +392,7 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions, i
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);
@@ -376,6 +410,9 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions, i
void zend_shutdown()
{
#ifdef ZEND_WIN32
zend_shutdown_timeout_thread();
#endif
#ifndef ZTS
zend_destroy_rsrc_plist();
#endif
@@ -460,12 +497,20 @@ void zend_activate_modules()
zend_hash_apply(&module_registry, (int (*)(void *)) module_registry_request_startup);
}
void zend_deactivate(CLS_D ELS_DC)
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)
{
/* 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);
@@ -492,19 +537,17 @@ ZEND_API int zend_get_ini_entry(char *name, uint name_length, zval *contents)
}
#if ZEND_NEW_ERROR_HANDLING
#define ZEND_ERROR_BUFFER_SIZE 1024
ZEND_API void zend_error(int type, const char *format, ...)
{
va_list args;
zval **params;
zval retval;
zval error_type, error_message;
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();
@@ -546,6 +589,7 @@ ZEND_API void zend_error(int type, const char *format, ...)
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);
@@ -561,34 +605,90 @@ ZEND_API void zend_error(int type, const char *format, ...)
break;
default:
/* Handle the error in user space */
INIT_PZVAL(&error_message);
INIT_PZVAL(&error_type);
error_message.value.str.val = (char *) emalloc(ZEND_ERROR_BUFFER_SIZE);
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);
/* error_message.value.str.len = vsnprintf(error_message->value.str.val, error_message->value.str.len-1, format, args); */
error_message.value.str.len = vsprintf(error_message.value.str.val, format, args);
error_message.type = IS_STRING;
#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;
error_type.value.lval = type;
error_type.type = IS_LONG;
z_error_type->value.lval = type;
z_error_type->type = IS_LONG;
params = (zval **) emalloc(sizeof(zval *)*2);
params[0] = &error_type;
params[1] = &error_message;
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;
if (call_user_function(CG(function_table), NULL, EG(user_error_handler), &retval, 2, params)==SUCCESS) {
zval_dtor(&retval);
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);
efree(error_message.value.str.val);
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);
}
#endif
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
}
+39 -28
View File
@@ -18,12 +18,10 @@
*/
#ifndef _ZEND_H
#define _ZEND_H
#ifndef ZEND_H
#define ZEND_H
#define ZEND_VERSION "0.99"
#define ZEND_NEW_ERROR_HANDLING 0
#define ZEND_VERSION "1.0.1"
#ifdef __cplusplus
#define BEGIN_EXTERN_C() extern "C" {
@@ -125,6 +123,11 @@
#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"
@@ -132,6 +135,7 @@
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
@@ -159,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;
@@ -222,11 +225,7 @@ struct _zend_class_entry {
typedef struct _zend_utility_functions {
#if ZEND_NEW_ERROR_HANDLING
void (*error_function)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
#else
void (*error_function)(int type, const char *format, ...);
#endif
int (*printf_function)(const char *format, ...);
int (*write_function)(const char *str, uint str_length);
FILE *(*fopen_function)(const char *filename, char **opened_path);
@@ -239,9 +238,6 @@ 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;
@@ -256,6 +252,8 @@ typedef int (*zend_write_func_t)(const char *str, uint str_length);
#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 */
@@ -268,9 +266,10 @@ typedef int (*zend_write_func_t)(const char *str, uint str_length);
#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)
@@ -299,6 +298,13 @@ ZEND_API int zend_print_zval_ex(zend_write_func_t write_func, zval *expr, int in
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;
#define STR_FREE(ptr) if (ptr && ptr!=empty_string) { efree(ptr); }
@@ -325,14 +331,10 @@ extern ZEND_API FILE *(*zend_fopen)(const char *filename, char **opened_path);
extern ZEND_API void (*zend_block_interruptions)(void);
extern ZEND_API void (*zend_unblock_interruptions)(void);
extern ZEND_API void (*zend_ticks_function)(int ticks);
extern ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
#if ZEND_NEW_ERROR_HANDLING
ZEND_API void zend_error(int type, const char *format, ...);
#else
#define zend_error zend_error_cb
ZEND_API void (*zend_error_cb)(int type, const char *format, ...);
#endif
void zenderror(char *error);
@@ -356,13 +358,17 @@ 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; \
@@ -399,6 +405,11 @@ ZEND_API int zend_get_ini_entry(char *name, uint name_length, zval *contents);
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); \
@@ -406,7 +417,7 @@ ZEND_API int zend_get_ini_entry(char *name, uint name_length, zval *contents);
zval_copy_ctor(&(zv)); \
(pzv)->refcount--; \
} else { \
FREE_ZVAL(pzv); \
FREE_ZVAL(pzv); \
} \
INIT_PZVAL(&(zv));
@@ -423,7 +434,7 @@ ZEND_API int zend_get_ini_entry(char *name, uint name_length, zval *contents);
#define EMPTY_SWITCH_DEFAULT_CASE()
#endif
#endif /* _ZEND_H */
#endif /* ZEND_H */
/*
* Local variables:
+81 -24
View File
@@ -25,7 +25,7 @@
#include "zend_constants.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 */
@@ -50,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;
@@ -61,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);
@@ -87,9 +87,8 @@ ZEND_API int zend_get_parameters_array(int ht, int param_count, zval **argument_
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;
@@ -98,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;
@@ -129,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);
@@ -152,8 +151,8 @@ ZEND_API int zend_get_parameters_array_ex(int param_count, zval ***argument_arra
return FAILURE;
}
while (param_count>0) {
*(argument_array++) = (zval **) p-(param_count--);
while (param_count-->0) {
*(argument_array++) = (zval **) p-(arg_count--);
}
return SUCCESS;
@@ -189,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;
@@ -202,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;
}
@@ -708,15 +707,22 @@ ZEND_API int zend_startup_module(zend_module_entry *module)
/* 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);
}
@@ -727,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;
}
@@ -741,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++;
}
@@ -783,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;
}
@@ -867,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);
@@ -886,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);
@@ -925,3 +954,31 @@ ZEND_API int zend_set_hash_symbol(zval *symbol, char *name, int name_length,
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);
}
+11 -6
View File
@@ -18,14 +18,15 @@
*/
#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)
@@ -108,11 +109,15 @@ 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);
@@ -173,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);
@@ -411,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:
+88 -31
View File
@@ -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));
@@ -611,7 +668,7 @@ ZEND_API int _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 p->size+sizeof(zend_mem_header)+PLATFORM_PADDING;
return REAL_SIZE(p->size)+sizeof(zend_mem_header)+PLATFORM_PADDING;
}
+7 -5
View File
@@ -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
+194 -37
View File
@@ -33,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);
@@ -52,9 +53,15 @@ 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(user_error);
static ZEND_FUNCTION(set_user_error_handler);
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
unsigned char first_arg_force_ref[] = { 1, BYREF_FORCE };
unsigned char first_arg_allow_ref[] = { 1, BYREF_ALLOW };
@@ -70,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)
@@ -89,16 +97,23 @@ static zend_function_entry builtin_functions[] = {
ZEND_FE(get_class_vars, NULL)
ZEND_FE(get_object_vars, NULL)
ZEND_FE(get_class_methods, NULL)
ZEND_FE(user_error, NULL)
ZEND_FE(set_user_error_handler, 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);
}
@@ -208,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);
@@ -222,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);
@@ -237,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);
@@ -253,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);
@@ -261,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;
@@ -270,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) {
@@ -328,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);
}
@@ -360,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:
@@ -383,8 +415,11 @@ ZEND_FUNCTION(define)
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;
}
}
@@ -394,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);
@@ -413,7 +448,7 @@ ZEND_FUNCTION(get_class)
zval **arg;
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &arg)==FAILURE) {
WRONG_PARAM_COUNT;
ZEND_WRONG_PARAM_COUNT();
}
if ((*arg)->type != IS_OBJECT) {
RETURN_FALSE;
@@ -429,7 +464,7 @@ ZEND_FUNCTION(get_parent_class)
zval **arg;
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &arg)==FAILURE) {
WRONG_PARAM_COUNT;
ZEND_WRONG_PARAM_COUNT();
}
if (((*arg)->type != IS_OBJECT) || !(*arg)->value.obj.ce->parent) {
RETURN_FALSE;
@@ -447,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) {
WRONG_PARAM_COUNT;
ZEND_WRONG_PARAM_COUNT();
}
if ((*obj)->type != IS_OBJECT) {
@@ -480,7 +515,7 @@ ZEND_FUNCTION(get_class_vars)
CLS_FETCH();
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &class_name)==FAILURE) {
WRONG_PARAM_COUNT;
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(class_name);
@@ -506,7 +541,7 @@ ZEND_FUNCTION(get_object_vars)
zval *tmp;
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &obj) == FAILURE) {
WRONG_PARAM_COUNT;
ZEND_WRONG_PARAM_COUNT();
}
if ((*obj)->type != IS_OBJECT) {
@@ -533,7 +568,7 @@ ZEND_FUNCTION(get_class_methods)
CLS_FETCH();
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &class_name)==FAILURE) {
WRONG_PARAM_COUNT;
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(class_name);
@@ -567,7 +602,7 @@ ZEND_FUNCTION(method_exists)
char *lcname;
if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, &klass, &method_name)==FAILURE) {
WRONG_PARAM_COUNT;
ZEND_WRONG_PARAM_COUNT();
}
if ((*klass)->type != IS_OBJECT) {
RETURN_FALSE;
@@ -594,7 +629,7 @@ ZEND_FUNCTION(class_exists)
CLS_FETCH();
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &class_name)==FAILURE) {
WRONG_PARAM_COUNT;
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(class_name);
lcname = estrndup((*class_name)->value.str.val, (*class_name)->value.str.len);
@@ -618,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);
@@ -685,7 +720,7 @@ ZEND_FUNCTION(get_required_files)
CLS_FETCH();
if (ZEND_NUM_ARGS() != 0) {
WRONG_PARAM_COUNT;
ZEND_WRONG_PARAM_COUNT();
}
array_init(return_value);
@@ -699,7 +734,7 @@ ZEND_FUNCTION(get_required_files)
ZEND_FUNCTION(get_included_files)
{
if (ZEND_NUM_ARGS() != 0) {
WRONG_PARAM_COUNT;
ZEND_WRONG_PARAM_COUNT();
}
array_init(return_value);
@@ -708,9 +743,9 @@ ZEND_FUNCTION(get_included_files)
/* }}} */
/* {{{ proto void user_error(string messsage [, int error_type])
/* {{{ proto void trigger_error(string messsage [, int error_type])
Generates a user-level error/warning/notice message */
ZEND_FUNCTION(user_error)
ZEND_FUNCTION(trigger_error)
{
int error_type = E_USER_NOTICE;
zval **z_error_type, **z_error_message;
@@ -746,9 +781,12 @@ ZEND_FUNCTION(user_error)
/* }}} */
ZEND_FUNCTION(set_user_error_handler)
/* {{{ 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();
@@ -756,20 +794,53 @@ ZEND_FUNCTION(set_user_error_handler)
convert_to_string_ex(error_handler);
if (EG(user_error_handler)) {
zval_dtor(EG(user_error_handler));
} else {
ALLOC_ZVAL(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, zval *array)
static int copy_class_name(zend_class_entry *ce, int num_args, va_list args, zend_hash_key *hash_key)
{
add_next_index_stringl(array, ce->name, ce->name_length, 1);
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;
}
@@ -780,10 +851,96 @@ ZEND_FUNCTION(get_declared_classes)
CLS_FETCH();
if (ZEND_NUM_ARGS() != 0) {
WRONG_PARAM_COUNT;
ZEND_WRONG_PARAM_COUNT();
}
array_init(return_value);
zend_hash_apply_with_argument(CG(class_table), (apply_func_arg_t)copy_class_name, 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);
}
}
+3 -3
View File
@@ -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 */
+96 -55
View File
@@ -37,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));
@@ -102,9 +90,6 @@ 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;
zend_init_rsrc_list(ELS_C);
@@ -124,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));
}
@@ -533,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));
}
@@ -584,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);
@@ -764,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;
@@ -786,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]++;
}
}
@@ -830,6 +835,7 @@ int do_begin_function_call(znode *function_name CLS_DC)
}
break;
}
do_extended_fcall_begin(CLS_C);
return 0;
}
@@ -837,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);
}
@@ -861,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;
@@ -905,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);
}
@@ -1038,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;
@@ -1070,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)
{
@@ -1093,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)--;
@@ -1108,37 +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) {
@@ -1148,10 +1192,8 @@ ZEND_API int do_bind_function_or_class(zend_op *opline, HashTable *function_tabl
(*ce->refcount)--;
zend_hash_destroy(&ce->function_table);
zend_hash_destroy(&ce->default_properties);
*(class_name-1) = ':';
return FAILURE;
}
*(class_name-1) = ':';
return SUCCESS;
}
break;
@@ -2288,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:
+13 -4
View File
@@ -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
@@ -191,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)
@@ -201,6 +204,8 @@ 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);
@@ -211,6 +216,7 @@ extern ZEND_API zend_op_array *(*zend_v_compile_files)(int type CLS_DC, int file
void zend_activate(CLS_D ELS_DC);
void zend_deactivate(CLS_D ELS_DC);
void zend_activate_modules(void);
void zend_deactivate_modules(void);
int lex_scan(zval *zendlval CLS_DC);
@@ -285,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);
@@ -362,6 +369,8 @@ 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
@@ -619,4 +628,4 @@ int zendlex(znode *zendlval CLS_DC);
END_EXTERN_C()
#endif /* _COMPILE_H */
#endif /* ZEND_COMPILE_H */
+20 -4
View File
@@ -18,8 +18,8 @@
*/
#ifndef _ZEND_CONFIG_W32_H
#define _ZEND_CONFIG_W32_H
#ifndef ZEND_CONFIG_W32_H
#define ZEND_CONFIG_W32_H
#include <string.h>
@@ -42,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
@@ -58,7 +63,7 @@ typedef unsigned int uint;
# define inline
#endif
#define finite(A) _finite(A)
#define zend_finite(A) _finite(A)
#ifdef LIBZEND_EXPORTS
# define ZEND_API __declspec(dllexport)
@@ -68,4 +73,15 @@ typedef unsigned int uint;
#define ZEND_DLEXPORT __declspec(dllexport)
#endif /* _ZEND_CONFIG_W32_H */
/* 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 */
+11 -1
View File
@@ -134,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;
@@ -233,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);
@@ -244,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;
}
+3 -3
View File
@@ -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
@@ -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 */
+3 -3
View File
@@ -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)
@@ -36,5 +36,5 @@
#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 */
+90 -136
View File
@@ -65,14 +65,6 @@ static void zend_extension_statement_handler(zend_extension *extension, zend_op_
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)
@@ -142,10 +134,11 @@ 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.data.str_offset.str);
@@ -347,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) {
@@ -386,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) {
@@ -516,14 +489,13 @@ static void zend_fetch_var_address(znode *result, znode *op1, znode *op2, temp_v
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);
}
@@ -670,13 +642,8 @@ static void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2,
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;
@@ -686,12 +653,8 @@ static void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2,
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);
@@ -701,7 +664,6 @@ static void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2,
} 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:
@@ -855,13 +817,8 @@ static void zend_fetch_property_address(znode *result, znode *op1, znode *op2, t
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;
@@ -884,15 +841,10 @@ static void zend_fetch_property_address(znode *result, znode *op1, znode *op2, t
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);
}
@@ -1012,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:
@@ -1128,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);
@@ -1173,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:
@@ -1317,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();
@@ -1529,6 +1470,10 @@ binary_assign_op_addr: {
if (!object.ptr || object.ptr->type != IS_OBJECT) {
zend_error(E_ERROR, "Call to a member function on a non-object");
}
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);
}
@@ -1658,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 {
@@ -1744,21 +1687,8 @@ send_by_ref:
zend_error(E_ERROR, "Only variables can be passed by reference");
}
SEPARATE_ZVAL_TO_MAKE_IS_REF(varptr_ptr);
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 */
}
varptr->refcount++;
zend_ptr_stack_push(&EG(argument_stack), varptr);
}
@@ -1767,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);
}
@@ -1782,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;
@@ -1806,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);
@@ -1946,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);
@@ -1955,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;
@@ -2031,7 +1955,16 @@ 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);
@@ -2039,21 +1972,17 @@ send_by_ref:
case ZEND_INCLUDE_ONCE: {
char *opened_path;
int dummy = 1;
zval *inc_filename = get_zval_ptr(&opline->op1, Ts, &EG(free_op1), BP_VAR_R);
zval tmp_inc_filename;
zend_file_handle file_handle;
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;
}
file_handle.handle.fp = zend_fopen(inc_filename->value.str.val, &opened_path);
file_handle.type = ZEND_HANDLE_FP;
file_handle.filename = inc_filename->value.str.val;
file_handle.free_filename = 0;
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) {
@@ -2066,28 +1995,32 @@ send_by_ref:
} else {
fclose(file_handle.handle.fp);
}
if (opened_path) {
free(opened_path);
}
} else {
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, file_handle.filename);
}
if (opened_path) {
free (opened_path);
}
break;
if (inc_filename==&tmp_inc_filename) {
zval_dtor(&tmp_inc_filename);
}
}
break;
case ZEND_INCLUDE:
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);
{
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;
@@ -2149,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;
@@ -2160,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 {
@@ -2362,6 +2315,7 @@ send_by_ref:
case ZEND_NOP:
NEXT_OPCODE();
EMPTY_SWITCH_DEFAULT_CASE()
}
}
#if SUPPORT_INTERACTIVE
+156 -9
View File
@@ -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;
@@ -52,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 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);
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 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);
@@ -73,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 */
+236 -128
View File
@@ -29,10 +29,23 @@
#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);
@@ -78,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));
@@ -117,6 +142,14 @@ void init_executor(CLS_D ELS_DC)
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
}
@@ -144,13 +177,20 @@ void shutdown_executor(ELS_D)
}
}
zend_destroy_rsrc_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);
@@ -162,6 +202,11 @@ void shutdown_executor(ELS_D)
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);
}
@@ -217,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
@@ -242,53 +277,16 @@ 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;
@@ -304,16 +302,22 @@ ZEND_API int zval_update_constant(zval **pp)
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) {
} else if (p->type == IS_CONSTANT_ARRAY) {
SEPARATE_ZVAL(pp);
p = *pp;
zend_hash_apply(p->value.ht, (int (*)(void *)) zval_update_constant);
p->type = IS_ARRAY;
zend_hash_apply_with_argument(p->value.ht, (int (*)(void *,void *)) zval_update_constant, (void *) 1);
}
return 0;
}
@@ -329,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 {
@@ -340,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;
@@ -353,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) {
@@ -403,8 +425,12 @@ int call_user_function_ex(HashTable *function_table, zval *object, zval *functio
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;
@@ -420,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;
@@ -505,57 +533,6 @@ ZEND_API int zend_eval_string(char *str, zval *retval_ptr CLS_DC ELS_DC)
}
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)
@@ -577,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-2;
int delete_count = (ulong) *p;
ELS_FETCH();
EG(argument_stack).top -= (delete_count+2);
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-2;
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 */
+7 -6
View File
@@ -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,
+5 -11
View File
@@ -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 20000428
#define ZEND_EXTENSION_API_NO 20000707
typedef struct _zend_extension_version_info {
int zend_extension_api_no;
@@ -77,15 +77,9 @@ ZEND_API void zend_extension_dispatch_message(int message, void *arg);
#define ZEND_EXTMSG_NEW_EXTENSION 1
#ifdef ZTS
#define ZTS_V 1
#else
#define ZTS_V 0
#endif
#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
@@ -100,4 +94,4 @@ 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 */
+3 -3
View File
@@ -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
@@ -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
+15 -6
View File
@@ -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
@@ -151,6 +150,7 @@ struct _zend_executor_globals {
jmp_buf bailout;
int error_reporting;
int orig_error_reporting;
zend_op_array *active_op_array;
zend_op_array *main_op_array;
@@ -168,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 +184,12 @@ struct _zend_executor_globals {
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
@@ -192,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
@@ -207,5 +217,4 @@ struct _zend_alloc_globals {
#endif
};
#endif /* _T_GLOBALS_H */
#endif /* ZEND_GLOBALS_H */
+3 -3
View File
@@ -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 */
+125 -18
View File
@@ -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)
{
@@ -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);
}
@@ -1064,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;
@@ -1106,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;
}
}
@@ -1119,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;
}
}
+12 -6
View File
@@ -17,8 +17,8 @@
+----------------------------------------------------------------------+
*/
#ifndef _HASH_
#define _HASH_
#ifndef ZEND_HASH_H
#define ZEND_HASH_H
#include <sys/types.h>
@@ -41,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 */
@@ -55,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;
@@ -66,7 +66,9 @@ 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
@@ -78,6 +80,7 @@ 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);
@@ -108,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)
@@ -166,6 +171,7 @@ ZEND_API void zend_hash_internal_pointer_end_ex(HashTable *ht, HashPosition *pos
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);
@@ -189,4 +195,4 @@ END_EXTERN_C()
zend_hash_init(ht, n, NULL, ZVAL_PTR_DTOR, persistent)
#endif /* _HASH_ */
#endif /* ZEND_HASH_H */
+6 -6
View File
@@ -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++);
}
}
@@ -108,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;
@@ -136,10 +136,10 @@ 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;
}
+4 -2
View File
@@ -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
@@ -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 */
+20 -4
View File
@@ -215,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;
}
@@ -232,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;
}
@@ -287,7 +289,7 @@ int zend_init_rsrc_list(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);
}
@@ -347,6 +349,7 @@ ZEND_API int zend_register_list_destructors(void (*ld)(void *), void (*pld)(void
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;
@@ -355,7 +358,7 @@ ZEND_API int zend_register_list_destructors(void (*ld)(void *), void (*pld)(void
}
ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_func_t pld, 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)
{
zend_rsrc_list_dtors_entry lde;
@@ -370,6 +373,7 @@ ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_fu
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;
@@ -390,6 +394,18 @@ void zend_destroy_rsrc_list_dtors()
}
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
+10 -5
View File
@@ -18,8 +18,8 @@
*/
#ifndef _LIST_H
#define _LIST_H
#ifndef ZEND_LIST_H
#define ZEND_LIST_H
#include "zend_hash.h"
#include "zend_globals.h"
@@ -35,7 +35,8 @@ typedef struct _zend_rsrc_list_entry {
zend_bool valid;
} zend_rsrc_list_entry;
typedef void (*rsrc_dtor_func_t)(zend_rsrc_list_entry *le);
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 */
@@ -46,6 +47,8 @@ typedef struct _zend_rsrc_list_dtors_entry {
rsrc_dtor_func_t list_dtor_ex;
rsrc_dtor_func_t plist_dtor_ex;
char *type_name;
int module_number;
int resource_id;
unsigned char type;
@@ -54,7 +57,7 @@ typedef struct _zend_rsrc_list_dtors_entry {
#define register_list_destructors(ld, pld) zend_register_list_destructors((void (*)(void *))ld, (void (*)(void *))pld, module_number);
ZEND_API int zend_register_list_destructors(void (*ld)(void *), void (*pld)(void *), int module_number);
ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_func_t pld, int module_number);
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
@@ -83,11 +86,13 @@ 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) \
+6 -5
View File
@@ -18,8 +18,8 @@
*/
#ifndef _ZEND_LLIST_H
#define _ZEND_LLIST_H
#ifndef ZEND_LLIST_H
#define ZEND_LLIST_H
#include <stdlib.h>
@@ -41,6 +41,7 @@ typedef struct _zend_llist {
typedef int (*llist_compare_func_t)(const zend_llist_element *, const zend_llist_element *);
typedef void(*llist_apply_with_arg_func_t)(void *data, void *arg);
typedef void(*llist_apply_with_args_func_t)(void *data, int num_args, va_list args);
typedef void (*llist_apply_func_t)(void *);
typedef zend_llist_element* zend_llist_position;
@@ -53,8 +54,8 @@ 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);
@@ -72,4 +73,4 @@ ZEND_API void *zend_llist_get_prev_ex(zend_llist *l, zend_llist_position *pos);
END_EXTERN_C()
#endif /* _ZEND_LLIST_H */
#endif /* ZEND_LLIST_H */
+3 -4
View File
@@ -18,8 +18,8 @@
*/
#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
@@ -37,8 +37,7 @@ extern unsigned char second_arg_allow_ref[];
#include "zend.h"
#define ZEND_MODULE_API_NO 20000401
#define ZEND_MODULE_API_NO 20000609
#ifdef ZTS
#define USING_ZTS 1
#else
+1 -1
View File
@@ -186,13 +186,13 @@ ZEND_API void destroy_op_array(zend_op_array *op_array)
void init_op(zend_op *op CLS_DC)
{
memset(&op->result, 0, sizeof(znode));
op->lineno = CG(zend_lineno);
op->filename = zend_get_compiled_filename(CLS_C);
op->result.op_type = IS_UNUSED;
op->extended_value = 0;
memset(&op->op1, 0, sizeof(znode));
memset(&op->op2, 0, sizeof(znode));
memset(&op->result, 0, sizeof(znode));
}
zend_op *get_next_op(zend_op_array *op_array CLS_DC)
+250 -86
View File
@@ -32,20 +32,55 @@
#include "zend_list.h"
#include "zend_fast_cache.h"
#ifndef HAVE_FINITE
#ifndef finite /* in case it's already a macro */
#define finite(a) isfinite(a) /* HPUX 11 only has isfinite() */
#endif
#else
#if HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
#endif
#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)
{
@@ -344,6 +379,12 @@ ZEND_API void _convert_to_string(zval *op ZEND_FILE_LINE_DC)
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;
@@ -880,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;
@@ -945,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;
@@ -959,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;
}
@@ -968,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;
@@ -996,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)
@@ -1015,22 +1157,37 @@ 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 ) {
if (is_identical_function( result, op1, op2 ) == FAILURE) {
return FAILURE;
}
result->value.lval = !result->value.lval;
@@ -1316,6 +1473,25 @@ 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)
{
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;
}
ZEND_API int zend_binary_zval_strcmp(zval *s1, zval *s2)
{
return zend_binary_strcmp(s1->value.str.val, s1->value.str.len, s2->value.str.val, s2->value.str.len);
@@ -1333,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;
@@ -1351,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);
@@ -1363,84 +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 (! 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
#if 0
static inline int is_numeric_string(char *str, int length, long *lval, double *dval)
{
+84 -3
View File
@@ -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
@@ -47,7 +58,66 @@ 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);
@@ -65,19 +135,30 @@ 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) { \
+12 -1
View File
@@ -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;
}
+5 -4
View File
@@ -18,8 +18,8 @@
*/
#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 {
int top, max;
@@ -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
@@ -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;
@@ -44,4 +44,4 @@ ZEND_API void zend_stack_apply_with_argument(zend_stack *stack, int type, int (*
#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 */
+4 -2
View File
@@ -61,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))) {
@@ -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();
+2 -2
View File
@@ -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);
+1 -122
View File
@@ -1,122 +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
/* 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 PHP_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 */
+194 -46
View File
@@ -4,6 +4,128 @@ 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],[
@@ -66,7 +188,7 @@ no)
;;
esac
if test "$php_always_shared"; then
if test "$php_always_shared" = "yes"; then
ext_output="yes, shared"
ext_shared=yes
test "[$]$1" = "no" && $1=yes
@@ -126,7 +248,7 @@ EOF
])
AC_DEFUN(PHP_TIME_R_TYPE,[
AC_CACHE_CHECK(for *time_r type, ac_cv_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>
@@ -145,13 +267,13 @@ exit(1);
],[
ac_cv_time_r_type=hpux
],[
ac_cv_time_r_type=normal
ac_cv_time_r_type=POSIX
],[
ac_cv_time_r_type=normal
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-SUX 10.x])
AC_DEFINE(PHP_HPUX_TIME_R,1,[Whether you have HP-UX 10.x])
fi
])
@@ -177,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,[
@@ -194,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
])
@@ -206,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
])
@@ -254,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
])
@@ -295,6 +420,14 @@ AC_DEFUN(PHP_BUILD_THREAD_SAFE,[
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
dnl PHP_BUILD_SHARED
dnl
@@ -322,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"
@@ -348,18 +483,22 @@ AC_DEFUN(AC_EXPAND_PATH,[
])
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
])
@@ -394,17 +533,30 @@ 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, [
if test "$1" != "c"; then
ifelse($#, 1, LIBS="-l$1 $LIBS", LIBS="$LIBS -l$1")
fi
])
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
@@ -412,9 +564,7 @@ dnl AC_ADD_LIBRARY_DEFER(library[, append])
dnl
dnl add a library to the link line (deferred)
AC_DEFUN(AC_ADD_LIBRARY_DEFER,[
AC_PHP_ONCE(LIBRARY, $1, [
ifelse($#, 1, DLIBS="-l$1 $DLIBS", DLIBS="$DLIBS -l$1")
])
ifelse($#, 1, DLIBS="-l$1 $DLIBS", DLIBS="$DLIBS -l$1")
])
dnl
@@ -432,17 +582,13 @@ ifelse($3,,[
AC_ADD_LIBRARY($1)
],[
if test "$ext_shared" = "yes"; then
$3="-l$1 [$]$3"
if test -n "$2"; then
$3="-R$2 -L$2 -l$1 [$]$3"
else
$3="-l$1 [$]$3"
AC_ADD_LIBPATH($2,$3)
fi
else
if test -n "$2"; then
AC_ADD_LIBPATH($2)
fi
AC_ADD_LIBRARY($1)
fi
AC_ADD_LIBRARY_WITH_PATH($1,$2)
fi
])
])
@@ -467,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
@@ -489,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)
@@ -510,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)
])
])
@@ -532,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
])
@@ -679,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,[
@@ -726,7 +874,7 @@ int main(void) {
ac_cv_ebcdic="no"
])])
if test "$ac_cv_ebcdic" = "yes"; then
AC_DEFINE(CHARSET_EBCDIC,, [Define if system uses EBCDIC])
AC_DEFINE(CHARSET_EBCDIC,1, [Define if system uses EBCDIC])
fi
])
+13 -21
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 ""
@@ -88,3 +79,4 @@
#define PHP_VELOCIS_INCLUDE ""
#define PHP_VELOCIS_LIBS ""
#define PHP_EXTENSION_DIR "@EXTENSION_DIR@"
#define PHP_INCLUDE_PATH "@INCLUDE_PATH@"
+1 -1
View File
@@ -52,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; \
+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
+3 -6
View File
@@ -23,7 +23,7 @@
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
##############################################################################
# $Id: fastgen.sh,v 1.5 2000-05-04 17:50:32 sas Exp $
# $Id: fastgen.sh,v 1.7 2000-06-11 10:33:39 sas Exp $
#
srcdir=$1
@@ -43,19 +43,16 @@ fi
for makefile in $@; do
echo "creating $makefile"
# portable dirname
dir=`echo $makefile|sed 's%/*[^/][^/]*$%%'`
test -d "$dir/" || $mkdir_p "$dir/"
$mkdir_p "$dir/"
(cat <<EOF
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
)| cat - $top_srcdir/$makefile.in > $makefile
test -z "$dir" || touch $dir/.deps
done
+1 -1
View File
@@ -24,7 +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)
+25 -9
View File
@@ -26,36 +26,52 @@
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
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)
DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I$(top_builddir) -I$(top_builddir)/main
moduledir = $(EXTENSION_DIR)
CXX_SUFFIX = .cxx
.SUFFIXES:
.SUFFIXES: .slo .c .lo .o .s .y .l
.SUFFIXES: .slo .c $(CXX_SUFFIX) .lo .o .s .y .l
.c.o:
$(COMPILE) -c $<
$(CXX_SUFFIX).o:
$(CXX_COMPILE) -c $<
.s.o:
$(COMPILE) -c $<
.c.lo:
$(PHP_COMPILE)
$(CXX_SUFFIX).lo:
$(CXX_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
if test -f y.tab.h; then \
@@ -88,7 +104,7 @@ 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 > $(builddir)/.deps
test "`echo *.c`" = '*.c' || perl $(top_srcdir)/build/mkdep.perl $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) *.c > $(builddir)/.deps
clean: clean-recursive clean-x
+1 -1
View File
@@ -34,7 +34,7 @@ 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)
DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I$(top_builddir) -I$(top_builddir)/main
moduledir = $(EXTENSION_DIR)
+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
;;
+172 -133
View File
@@ -3,16 +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
rm -f 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)
@@ -34,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.
@@ -50,7 +51,7 @@ dnl ## All of these are normally in the extension directories.
dnl ## Diversion 5 is the last one. Here we generate files and clean up.
dnl ## This is where the version number is changed from now on!
AM_INIT_AUTOMAKE(php, 4.0RC2)
AM_INIT_AUTOMAKE(php, 4.0.2-dev)
PHP_VERSION=$VERSION
echo "/* automatically generated by configure */" > php_version.h.new
@@ -89,6 +90,15 @@ fi
AC_PROG_CC
AC_AIX
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
AC_PROG_RANLIB
@@ -113,12 +123,13 @@ divert(2)
PTHREADS_CHECK
PHP_SHLIB_SUFFIX_NAME
PHP_SAPI=cgi
PHP_BUILD_PROGRAM
dnl paths to the targets relative to the build directory
dnl paths to the targets are relative to the build directory
SAPI_PROGRAM=php
dnl on HP-UX, the extension is .sl. Need to improve this
SAPI_SHARED=libs/libphp4.s*
SAPI_SHARED=libs/libphp4.$SHLIB_SUFFIX_NAME
SAPI_STATIC=libs/libphp4.a
PHP_CONFIGURE_PART(Configuring SAPI modules)
@@ -165,11 +176,7 @@ 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
@@ -179,7 +186,7 @@ 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
@@ -188,7 +195,7 @@ INCLUDES="$INCLUDES -I\$(top_builddir)/Zend -I\$(top_srcdir)"
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)
])])
@@ -206,10 +213,10 @@ 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) ], [])
AC_DEFINE(HAVE_LIBNSL,1,[ ]) ], [])
])
fi
@@ -226,7 +233,7 @@ 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)
@@ -237,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)
@@ -259,23 +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 \
ieeefp.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 \
@@ -284,10 +291,9 @@ sys/time.h \
sys/types.h \
sys/varargs.h \
sys/wait.h \
sys/resource.h \
syslog.h \
unistd.h \
unix.h \
utime.h \
)
dnl Checks for typedefs, structures, and compiler characteristics.
@@ -334,6 +340,7 @@ getrusage \
gettimeofday \
gmtime_r \
inet_aton \
isascii \
link \
localtime_r \
lockf \
@@ -345,7 +352,6 @@ putenv \
random \
rand_r \
regcomp \
rint \
setitimer \
setlocale \
setsockopt \
@@ -357,6 +363,7 @@ srand48 \
srandom \
statfs \
statvfs \
std_syslog \
strcasecmp \
strdup \
strerror \
@@ -378,6 +385,7 @@ 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)
@@ -396,7 +404,7 @@ 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(4)
@@ -416,15 +424,15 @@ if test "$PHP_CONFIG_FILE_PATH" = "yes"; then
fi
if test "$PHP_CONFIG_FILE_PATH" != "no"; then
AC_DEFINE_UNQUOTED(CONFIGURATION_FILE_PATH, "$PHP_CONFIG_FILE_PATH")
AC_DEFINE(USE_CONFIG_FILE, 1)
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)
AC_DEFINE(CONFIGURATION_FILE_PATH, 0, [ ])
AC_DEFINE(USE_CONFIG_FILE, 0, [ ])
fi
PHP_ARG_ENABLE(debug, whether to include debugging symbols,
[ --disable-debug Compile without debugging symbols.], yes)
[ --enable-debug Compile with debugging symbols.], no)
if test "$PHP_DEBUG" = "yes"; then
PHP_DEBUG=1
@@ -441,9 +449,9 @@ PHP_ARG_ENABLE(safe-mode, whether to enable safe mode by default,
[ --enable-safe-mode Enable safe mode by default.])
if test "$PHP_SAFE_MODE" = "yes"; then
AC_DEFINE(PHP_SAFE_MODE, 1)
AC_DEFINE(PHP_SAFE_MODE,1,[ ])
else
AC_DEFINE(PHP_SAFE_MODE, 0)
AC_DEFINE(PHP_SAFE_MODE,0,[ ])
fi
AC_MSG_CHECKING(for safe mode exec dir)
@@ -453,37 +461,37 @@ 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(track-vars,whether to enable track_vars variables by default,
[ --enable-track-vars Enable GET/POST/Cookie track variables by default.],yes)
PHP_ARG_ENABLE(sigchild,whether to enable PHP's own SIGCHLD handler,
[ --enable-sigchild Enable PHP's own SIGCHLD handler.],no)
if test "$PHP_TRACK_VARS" = "yes"; then
AC_DEFINE(PHP_TRACK_VARS, 1)
if test "$PHP_SIGCHILD" = "yes"; then
AC_DEFINE(PHP_SIGCHILD, 1, [ ])
else
AC_DEFINE(PHP_TRACK_VARS, 0)
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.])
if test "$PHP_MAGIC_QUOTES" = "yes"; then
AC_DEFINE(MAGIC_QUOTES, 1)
AC_DEFINE(MAGIC_QUOTES, 1, [ ])
else
AC_DEFINE(MAGIC_QUOTES, 0)
AC_DEFINE(MAGIC_QUOTES, 0, [ ])
fi
PHP_ARG_ENABLE(rpath, whether to enable runpaths,
@@ -502,78 +510,53 @@ if test "$PHP_LIBGCC" = "yes"; then
AC_ADD_LIBRARY(gcc, yes)
fi
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(short-tags,whether to enable short tags by default,
[ --disable-short-tags Disable the short-form <? start tag by default.],yes)
AC_MSG_CHECKING(whether to enable the URL-aware fopen wrapper)
AC_ARG_ENABLE(url-fopen-wrapper,
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(PHP_URL_FOPEN, 1)
AC_MSG_RESULT(yes)
else
AC_DEFINE(PHP_URL_FOPEN, 0)
AC_MSG_RESULT(no)
fi
],[
AC_DEFINE(PHP_URL_FOPEN, 1)
AC_MSG_RESULT(yes)
])
accessing files via http or ftp.], yes)
AC_MSG_CHECKING(whether to enable PIC for shared objects)
AC_ARG_ENABLE(pic,
[ --disable-pic Disable PIC for shared objects],[
PHP_PIC=$enableval
],[
PHP_PIC=yes
])
AC_MSG_RESULT($PHP_PIC)
if test "$PHP_URL_FOPEN_WRAPPER" = "yes"; then
AC_DEFINE(PHP_URL_FOPEN, 1, [ ])
else
AC_DEFINE(PHP_URL_FOPEN, 0, [ ])
fi
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)
PHP_ARG_ENABLE(pic,whether to enable PIC for shared objects,
[ --disable-pic Disable PIC for shared objects], yes)
AC_ARG_ENABLE(pear,
[ --disable-pear Do not install PEAR],[
PHP_PEAR=$enableval
],[
PHP_PEAR=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)
divert(5)
PHP_CONFIGURE_PART(Configuring extensions)
@@ -631,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
@@ -639,7 +622,7 @@ 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
@@ -661,7 +644,7 @@ fi
phplibdir="`pwd`/modules"
test -d $phplibdir || mkdir $phplibdir
$php_shtool mkdir -p $phplibdir
phptempdir="`pwd`/libs"
test "$prefix" = "NONE" && prefix="/usr/local"
@@ -685,16 +668,20 @@ ZEND_MODULE_API_NO=`egrep '#define ZEND_MODULE_API_NO ' $srcdir/Zend/modules.h|s
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])
@@ -714,19 +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)
@@ -770,6 +762,7 @@ if test "$enable_debug" != "yes"; then
fi
PHP_COMPILE='$(LIBTOOL) --mode=compile $(COMPILE) -c $<'
CXX_PHP_COMPILE='$(LIBTOOL) --mode=compile $(CXX_COMPILE) -c $<'
if test "$enable_shared" = "yes"; then
SHARED_LIBTOOL='$(LIBTOOL)'
@@ -780,6 +773,7 @@ else
SHARED_LIBTOOL='$(SHELL) $(top_builddir)/shlibtool'
else
PHP_COMPILE='$(COMPILE) -c $< && touch $@'
CXX_PHP_COMPILE='$(CXX_COMPILE) -c $< && touch $@'
fi
fi
@@ -799,15 +793,21 @@ changequote([,])
PHP_CONFIGURE_PART(Generating files)
PHP_FAST_GENERATE
PHP_GEN_CONFIG_VARS
touch .deps
#libphp4.module
AC_OUTPUT([php4.spec Zend/Makefile
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
@@ -831,25 +831,25 @@ cat >Zend/zend_config.h <<FEO
FEO
# run this only when generating all the files?
if true; then
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 "$EXTRA_MODULE_PTRS" \$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
@@ -858,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 |"
@@ -877,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
-234
View File
@@ -1,234 +0,0 @@
# Microsoft Developer Studio Generated NMAKE File, Based on dbase.dsp
!IF "$(CFG)" == ""
CFG=dbase - Win32 Debug
!MESSAGE No configuration specified. Defaulting to dbase - Win32 Debug.
!ENDIF
!IF "$(CFG)" != "dbase - Win32 Release" && "$(CFG)" != "dbase - 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 "dbase.mak" CFG="dbase - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "dbase - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "dbase - 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)" == "dbase - Win32 Release"
OUTDIR=.\module_release
INTDIR=.\module_release
# Begin Custom Macros
OutDir=.\module_release
# End Custom Macros
ALL : "$(OUTDIR)\php3_dbase.dll"
CLEAN :
-@erase "$(INTDIR)\dbase.obj"
-@erase "$(INTDIR)\dbf_head.obj"
-@erase "$(INTDIR)\dbf_misc.obj"
-@erase "$(INTDIR)\dbf_ndx.obj"
-@erase "$(INTDIR)\dbf_rec.obj"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(OUTDIR)\php3_dbase.dll"
-@erase "$(OUTDIR)\php3_dbase.exp"
-@erase "$(OUTDIR)\php3_dbase.lib"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MT /W3 /GX /O2 /I "dbase\\" /I "./" /I "../" /D DBASE=1 /D "NDEBUG" /D "THREAD_SAFE" /D "COMPILE_DL" /D "MSVC5" /D "WIN32" /D "_WINDOWS" /Fp"$(INTDIR)\dbase.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)\dbase.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:3 /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\php3_dbase.pdb" /machine:I386 /out:"$(OUTDIR)\php3_dbase.dll" /implib:"$(OUTDIR)\php3_dbase.lib" /libpath:"cgi_release"
LINK32_OBJS= \
"$(INTDIR)\dbase.obj" \
"$(INTDIR)\dbf_head.obj" \
"$(INTDIR)\dbf_misc.obj" \
"$(INTDIR)\dbf_ndx.obj" \
"$(INTDIR)\dbf_rec.obj"
"$(OUTDIR)\php3_dbase.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ELSEIF "$(CFG)" == "dbase - Win32 Debug"
OUTDIR=.\module_debug
INTDIR=.\module_debug
# Begin Custom Macros
OutDir=.\module_debug
# End Custom Macros
ALL : "$(OUTDIR)\php3_dbase.dll"
CLEAN :
-@erase "$(INTDIR)\dbase.obj"
-@erase "$(INTDIR)\dbf_head.obj"
-@erase "$(INTDIR)\dbf_misc.obj"
-@erase "$(INTDIR)\dbf_ndx.obj"
-@erase "$(INTDIR)\dbf_rec.obj"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(INTDIR)\vc60.pdb"
-@erase "$(OUTDIR)\php3_dbase.dll"
-@erase "$(OUTDIR)\php3_dbase.exp"
-@erase "$(OUTDIR)\php3_dbase.ilk"
-@erase "$(OUTDIR)\php3_dbase.lib"
-@erase "$(OUTDIR)\php3_dbase.pdb"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MTd /W3 /Gm /GX /ZI /Od /I "dbase\\" /I "./" /I "../" /D DBASE=1 /D "DEBUG" /D "_DEBUG" /D "THREAD_SAFE" /D "COMPILE_DL" /D "MSVC5" /D "WIN32" /D "_WINDOWS" /Fp"$(INTDIR)\dbase.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)\dbase.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:3 /subsystem:windows /dll /incremental:yes /pdb:"$(OUTDIR)\php3_dbase.pdb" /debug /machine:I386 /out:"$(OUTDIR)\php3_dbase.dll" /implib:"$(OUTDIR)\php3_dbase.lib" /pdbtype:sept /libpath:"cgi_debug"
LINK32_OBJS= \
"$(INTDIR)\dbase.obj" \
"$(INTDIR)\dbf_head.obj" \
"$(INTDIR)\dbf_misc.obj" \
"$(INTDIR)\dbf_ndx.obj" \
"$(INTDIR)\dbf_rec.obj"
"$(OUTDIR)\php3_dbase.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ENDIF
!IF "$(NO_EXTERNAL_DEPS)" != "1"
!IF EXISTS("dbase.dep")
!INCLUDE "dbase.dep"
!ELSE
!MESSAGE Warning: cannot find "dbase.dep"
!ENDIF
!ENDIF
!IF "$(CFG)" == "dbase - Win32 Release" || "$(CFG)" == "dbase - Win32 Debug"
SOURCE=.\functions\dbase.c
"$(INTDIR)\dbase.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=.\dbase\dbf_head.c
"$(INTDIR)\dbf_head.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=.\dbase\dbf_misc.c
"$(INTDIR)\dbf_misc.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=.\dbase\dbf_ndx.c
"$(INTDIR)\dbf_ndx.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=.\dbase\dbf_rec.c
"$(INTDIR)\dbf_rec.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ENDIF
-201
View File
@@ -1,201 +0,0 @@
# Microsoft Developer Studio Generated NMAKE File, Based on dbm.dsp
!IF "$(CFG)" == ""
CFG=dbm - Win32 Debug
!MESSAGE No configuration specified. Defaulting to dbm - Win32 Debug.
!ENDIF
!IF "$(CFG)" != "dbm - Win32 Release" && "$(CFG)" != "dbm - 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 "dbm.mak" CFG="dbm - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "dbm - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "dbm - 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)" == "dbm - Win32 Release"
OUTDIR=.\module_release
INTDIR=.\module_release
# Begin Custom Macros
OutDir=.\module_release
# End Custom Macros
ALL : "$(OUTDIR)\php3_dbm.dll"
CLEAN :
-@erase "$(INTDIR)\db.obj"
-@erase "$(INTDIR)\flock.obj"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(OUTDIR)\php3_dbm.dll"
-@erase "$(OUTDIR)\php3_dbm.exp"
-@erase "$(OUTDIR)\php3_dbm.lib"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MT /W3 /GX /O2 /I "./" /I "../" /I "../../include" /D NDBM=1 /D GDBM=0 /D BSD2=1 /D "NDEBUG" /D "COMPILE_DL" /D "MSVC5" /D "WIN32" /D "_WINDOWS" /Fp"$(INTDIR)\dbm.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)\dbm.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=php.lib libdb.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:2 /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\php3_dbm.pdb" /machine:I386 /out:"$(OUTDIR)\php3_dbm.dll" /implib:"$(OUTDIR)\php3_dbm.lib" /libpath:"..\..\lib" /libpath:"cgi_release"
LINK32_OBJS= \
"$(INTDIR)\db.obj" \
"$(INTDIR)\flock.obj"
"$(OUTDIR)\php3_dbm.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ELSEIF "$(CFG)" == "dbm - Win32 Debug"
OUTDIR=.\module_debug
INTDIR=.\module_debug
ALL : "c:\php3\php3_dbm.dll"
CLEAN :
-@erase "$(INTDIR)\db.obj"
-@erase "$(INTDIR)\flock.obj"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(INTDIR)\vc60.pdb"
-@erase "$(OUTDIR)\php3_dbm.exp"
-@erase "$(OUTDIR)\php3_dbm.lib"
-@erase "$(OUTDIR)\php3_dbm.pdb"
-@erase "c:\php3\php3_dbm.dll"
-@erase "c:\php3\php3_dbm.ilk"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MTd /W3 /Gm /GX /ZI /Od /I "./" /I "../" /I "../../include" /D NDBM=1 /D GDBM=0 /D BSD2=1 /D "DEBUG" /D "_DEBUG" /D COMPILE_DL=1 /D "MSVC5" /D "WIN32" /D "_WINDOWS" /Fp"$(INTDIR)\dbm.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)\dbm.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=php.lib libdb.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:2 /subsystem:windows /dll /incremental:yes /pdb:"$(OUTDIR)\php3_dbm.pdb" /debug /machine:I386 /out:"c:\php3/php3_dbm.dll" /implib:"$(OUTDIR)\php3_dbm.lib" /pdbtype:sept /libpath:"..\..\lib" /libpath:"cgi_debug"
LINK32_OBJS= \
"$(INTDIR)\db.obj" \
"$(INTDIR)\flock.obj"
"c:\php3\php3_dbm.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ENDIF
!IF "$(NO_EXTERNAL_DEPS)" != "1"
!IF EXISTS("dbm.dep")
!INCLUDE "dbm.dep"
!ELSE
!MESSAGE Warning: cannot find "dbm.dep"
!ENDIF
!ENDIF
!IF "$(CFG)" == "dbm - Win32 Release" || "$(CFG)" == "dbm - Win32 Debug"
SOURCE=.\functions\db.c
"$(INTDIR)\db.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE=.\win32\flock.c
"$(INTDIR)\flock.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ENDIF
-424
View File
@@ -1,424 +0,0 @@
/****************************************************************************
*
* Copyright (C) 1991 Kendall Bennett.
* All rights reserved.
*
* Filename: $RCSfile$
* Version: $Revision$
*
* Language: ANSI C
* Environment: any
*
* Description: Module to implement doubly linked lists. Includes a routine
* to peform a mergesort on the doubly linked list.
*
* $Id$
*
* Revision History:
* -----------------
*
* $Log$
* Revision 1.2 1999/08/23 19:43:01 sas
* malloc.h is deprecated, use stdlib.h instead
*
* Revision 1.1 1999/07/19 18:58:44 andrey
* Moving dlist stuff into core.
*
* Revision 1.2 1999/05/11 00:01:42 zeev
* * Get Apache to work. POST doesn't work yet.
* * There are now -I directives for the absolute path of php4, php4/Zend and the builddir for
* the Apache module, so we can #include any php/Zend header.
* * Rename config.h to php_config.h
*
* Revision 1.1 1999/04/21 23:11:20 ssb
* moved apache, com and hyperwave into ext/
*
* Revision 1.1.1.1 1999/04/07 21:03:31 zeev
* PHP 4.0
*
* Revision 1.1.1.1 1999/03/17 04:29:11 andi
* PHP4
*
* Revision 1.1.1.1 1998/12/21 07:56:22 andi
* Trying to start the zend CVS tree
*
* Revision 1.1 1998/08/12 09:29:16 steinm
* First version of Hyperwave module.
*
* Revision 1.5 91/12/31 19:39:49 kjb
* Modified include file directories.
*
* Revision 1.4 91/10/28 03:16:39 kjb
* Ported to the Iris.
*
* Revision 1.3 91/09/27 03:09:18 kjb
* Cosmetic change.
*
* Revision 1.2 91/09/03 18:27:42 ROOT_DOS
* Ported to UNIX.
*
* Revision 1.1 91/09/01 18:35:23 ROOT_DOS
* Initial revision
*
****************************************************************************/
#ifndef MSVC5
#include "php_config.h"
#endif
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include "dlist.h"
#define PUBLIC
#define PRIVATE static
PUBLIC void *dlst_newnode(int size)
/****************************************************************************
*
* Function: dlst_newnode
* Parameters: size - Amount of memory to allocate for node
* Returns: Pointer to the allocated node's user space.
*
* Description: Allocates the memory required for a node, adding a small
* header at the start of the node. We return a reference to
* the user space of the node, as if it had been allocated via
* malloc().
*
****************************************************************************/
{
PHP_DLST_BUCKET *node;
if ( !(node = (PHP_DLST_BUCKET*)malloc(size + sizeof(PHP_DLST_BUCKET))) ) {
fprintf(stderr,"Not enough memory to allocate list node.\n");
/* raise(SIGABRT);*/
return NULL;
}
return PHP_DLST_USERSPACE(node); /* Return pointer to user space */
}
PUBLIC void dlst_freenode(void *node)
/****************************************************************************
*
* Function: dlst_freenode
* Parameters: node - Node to free.
*
* Description: Frees a node previously allocated with lst_newnode().
*
****************************************************************************/
{
free(PHP_DLST_HEADER(node));
}
PUBLIC DLIST *dlst_init(void)
/****************************************************************************
*
* Function: dlst_init
* Returns: Pointer to a newly created list.
*
* Description: Initialises a list and returns a pointer to it.
*
****************************************************************************/
{
DLIST *l;
if ((l = (DLIST*)malloc(sizeof(DLIST))) != NULL) {
l->count = 0;
l->head = &(l->hz[0]);
l->z = &(l->hz[1]);
l->head->next = l->z->next = l->z;
l->z->prev = l->head->prev = l->head;
}
else {
fprintf(stderr,"Insufficient memory to allocate list\n");
/*raise(SIGABRT);*/
return NULL;
}
return l;
}
PUBLIC void dlst_kill(DLIST *l,void (*freeNode)(void *node))
/****************************************************************************
*
* Function: dlst_kill
* Parameters: l - List to kill
* freeNode - Pointer to user routine to free a node
*
* Description: Kills the list l, by deleting all of the elements contained
* within the list one by one and then deleting the list
* itself. Note that we call the user supplied routine
* (*freeNode)() to free each list node. This allows the user
* program to perform any extra processing needed to kill each
* node (if each node contains pointers to other items on the
* heap for example). If no extra processing is required, just
* pass the address of dlst_freenode(), ie:
*
* dlst_kill(myList,dlst_freenode);
*
****************************************************************************/
{
PHP_DLST_BUCKET *n,*p;
n = l->head->next;
while (n != l->z) { /* Free all nodes in list */
p = n;
n = n->next;
(*freeNode)(PHP_DLST_USERSPACE(p));
}
free(l); /* Free the list itself */
}
PUBLIC void dlst_insertafter(DLIST *l,void *node,void *after)
/****************************************************************************
*
* Function: lst_insertafter
* Parameters: l - List to insert node into
* node - Pointer to user space of node to insert
* after - Pointer to user space of node to insert node after
*
* Description: Inserts a new node into the list after the node 'after'. To
* insert a new node at the beginning of the list, user the
* macro PHP_DLST_HEAD in place of 'after'. ie:
*
* dlst_insertafter(mylist,node,PHP_DLST_HEAD(mylist));
*
****************************************************************************/
{
PHP_DLST_BUCKET *n = PHP_DLST_HEADER(node),*a = PHP_DLST_HEADER(after);
n->next = a->next;
a->next = n;
n->prev = a;
n->next->prev = n;
l->count++;
}
PUBLIC void *dlst_deletenext(DLIST *l,void *node)
/****************************************************************************
*
* Function: lst_deletenext
* Parameters: l - List to delete node from.
* node - Node to delete the next node from
* Returns: Pointer to the deleted node's userspace.
*
* Description: Removes the node AFTER 'node' from the list l.
*
****************************************************************************/
{
PHP_DLST_BUCKET *n = PHP_DLST_HEADER(node);
node = PHP_DLST_USERSPACE(n->next);
n->next->next->prev = n;
n->next = n->next->next;
l->count--;
return node;
}
PUBLIC void *dlst_first(DLIST *l)
/****************************************************************************
*
* Function: dlst_first
* Parameters: l - List to obtain first node from
* Returns: Pointer to first node in list, NULL if list is empty.
*
* Description: Returns a pointer to the user space of the first node in
* the list. If the list is empty, we return NULL.
*
****************************************************************************/
{
PHP_DLST_BUCKET *n;
n = l->head->next;
return (n == l->z ? NULL : PHP_DLST_USERSPACE(n));
}
PUBLIC void *dlst_last(DLIST *l)
/****************************************************************************
*
* Function: dlst_last
* Parameters: l - List to obtain last node from
* Returns: Pointer to last node in list, NULL if list is empty.
*
* Description: Returns a pointer to the user space of the last node in
* the list. If the list is empty, we return NULL.
*
****************************************************************************/
{
PHP_DLST_BUCKET *n;
n = l->z->prev;
return (n == l->head ? NULL : PHP_DLST_USERSPACE(n));
}
PUBLIC void *dlst_next(void *prev)
/****************************************************************************
*
* Function: dlst_next
* Parameters: prev - Previous node in list to obtain next node from
* Returns: Pointer to the next node in the list, NULL at end of list.
*
* Description: Returns a pointer to the user space of the next node in the
* list given a pointer to the user space of the previous node.
* If we have reached the end of the list, we return NULL. The
* end of the list is detected when the next pointer of a node
* points back to itself, as does the dummy last node's next
* pointer. This enables us to detect the end of the list
* without needed access to the list data structure itself.
*
* NOTE: We do no checking to ensure that 'prev' is NOT a
* NULL pointer.
*
****************************************************************************/
{
PHP_DLST_BUCKET *n = PHP_DLST_HEADER(prev);
n = n->next;
return (n == n->next ? NULL : PHP_DLST_USERSPACE(n));
}
PUBLIC void *dlst_prev(void *next)
/****************************************************************************
*
* Function: dlst_prev
* Parameters: next - Next node in list to obtain previous node from
* Returns: Pointer to the previous node in the list, NULL at start list.
*
* Description: Returns a pointer to the user space of the prev node in the
* list given a pointer to the user space of the next node.
* If we have reached the start of the list, we return NULL. The
* start of the list is detected when the prev pointer of a node
* points back to itself, as does the dummy head node's prev
* pointer. This enables us to detect the start of the list
* without needed access to the list data structure itself.
*
* NOTE: We do no checking to ensure that 'next' is NOT a
* NULL pointer.
*
****************************************************************************/
{
PHP_DLST_BUCKET *n = PHP_DLST_HEADER(next);
n = n->prev;
return (n == n->prev ? NULL : PHP_DLST_USERSPACE(n));
}
/* Static globals required by merge() */
static PHP_DLST_BUCKET *z;
static int (*cmp)(void*,void*);
PRIVATE PHP_DLST_BUCKET *merge(PHP_DLST_BUCKET *a,PHP_DLST_BUCKET *b,PHP_DLST_BUCKET **end)
/****************************************************************************
*
* Function: merge
* Parameters: a,b - Sublist's to merge
* Returns: Pointer to the merged sublists.
*
* Description: Merges two sorted lists of nodes together into a single
* sorted list.
*
****************************************************************************/
{
PHP_DLST_BUCKET *c;
/* Go through the lists, merging them together in sorted order */
c = z;
while (a != z && b != z) {
if ((*cmp)(PHP_DLST_USERSPACE(a),PHP_DLST_USERSPACE(b)) <= 0) {
c->next = a; c = a; a = a->next;
}
else {
c->next = b; c = b; b = b->next;
}
};
/* If one of the lists is not exhausted, then re-attach it to the end
* of the newly merged list
*/
if (a != z) c->next = a;
if (b != z) c->next = b;
/* Set *end to point to the end of the newly merged list */
while (c->next != z) c = c->next;
*end = c;
/* Determine the start of the merged lists, and reset z to point to
* itself
*/
c = z->next; z->next = z;
return c;
}
PUBLIC void dlst_mergesort(DLIST *l,int (*cmp_func)(void*,void*))
/****************************************************************************
*
* Function: dlst_mergesort
* Parameters: l - List to merge sort
* cmp_func - Function to compare two user spaces
*
* Description: Mergesort's all the nodes in the list. 'cmp' must point to
* a comparison function that can compare the user spaces of
* two different nodes. 'cmp' should work the same as
* strcmp(), in terms of the values it returns. Rather than
* waste processing time keeping the previous pointers up to
* date while performing the mergesort, we simply run through
* the list at the end of the sort to fix the previous pointers.
*
****************************************************************************/
{
int i,N;
PHP_DLST_BUCKET *a,*b; /* Pointers to sublists to merge */
PHP_DLST_BUCKET *c; /* Pointer to end of sorted sublists */
PHP_DLST_BUCKET *head; /* Pointer to dummy head node for list */
PHP_DLST_BUCKET *todo; /* Pointer to sublists yet to be sorted */
PHP_DLST_BUCKET *t; /* Temporary */
/* Set up globals required by merge() and pointer to head */
z = l->z; cmp = cmp_func; head = l->head;
for (N = 1,a = z; a != head->next; N = N + N) {
todo = head->next; c = head;
while (todo != z) {
/* Build first sublist to be merged, and splice from main list
*/
a = t = todo;
for (i = 1; i < N; i++) t = t->next;
b = t->next; t->next = z; t = b;
/* Build second sublist to be merged and splice from main list
*/
for (i = 1; i < N; i++) t = t->next;
todo = t->next; t->next = z;
/* Merge the two sublists created, and set 'c' to point to the
* end of the newly merged sublists.
*/
c->next = merge(a,b,&t); c = t;
}
}
/* Fix the previous pointers for the list */
a = b = l->head;
b = b->next;
while (1) {
b->prev = a;
if (b == z)
break;
a = a->next;
b = b->next;
}
}
-137
View File
@@ -1,137 +0,0 @@
/****************************************************************************
*
* Copyright (C) 1991 Kendall Bennett.
* All rights reserved.
*
* Filename: $RCSfile$
* Version: $Revision$
*
* Language: ANSI C
* Environment: any
*
* Description: Header file for doubly linked list routines.
*
* $Id$
*
* Revision History:
* -----------------
*
* $Log$
* Revision 1.1 1999/04/21 23:11:20 ssb
* moved apache, com and hyperwave into ext/
*
* Revision 1.1.1.1 1999/04/07 21:03:20 zeev
* PHP 4.0
*
* Revision 1.1.1.1 1999/03/17 04:29:11 andi
* PHP4
*
* Revision 1.1.1.1 1998/12/21 07:56:22 andi
* Trying to start the zend CVS tree
*
* Revision 1.2 1998/08/14 15:51:12 shane
* Some work on getting hyperwave to work on windows. hg_comm needs a lot of work.
*
* Mainly, signals, fnctl, bzero, bcopy, etc are not portable functions. Most of this
* will have to be rewriten for windows.
*
* Revision 1.1 1998/08/12 09:29:16 steinm
* First version of Hyperwave module.
*
* Revision 1.5 91/12/31 19:40:54 kjb
*
* Modified include files directories.
*
* Revision 1.4 91/09/27 03:10:41 kjb
* Added compatibility with C++.
*
* Revision 1.3 91/09/26 10:07:16 kjb
* Took out extern references
*
* Revision 1.2 91/09/01 19:37:20 ROOT_DOS
* Changed DLST_TAIL macro so that it returns a pointer to the REAL last
* node of the list, not the dummy last node (l->z).
*
* Revision 1.1 91/09/01 18:38:23 ROOT_DOS
* Initial revision
*
****************************************************************************/
#ifndef __DLIST_H
#define __DLIST_H
#ifndef __DEBUG_H
/*#include "debug.h"*/
#endif
/*---------------------- Macros and type definitions ----------------------*/
typedef struct PHP_DLST_BUCKET {
struct PHP_DLST_BUCKET *next;
struct PHP_DLST_BUCKET *prev;
} PHP_DLST_BUCKET;
/* necessary for AIX 4.2.x */
#ifdef hz
#undef hz
#endif
typedef struct {
int count; /* Number of elements currently in list */
PHP_DLST_BUCKET *head; /* Pointer to head element of list */
PHP_DLST_BUCKET *z; /* Pointer to last node of list */
PHP_DLST_BUCKET hz[2]; /* Space for head and z nodes */
} DLIST;
/* Return a pointer to the user space given the address of the header of
* a node.
*/
#define PHP_DLST_USERSPACE(h) ((void*)((PHP_DLST_BUCKET*)(h) + 1))
/* Return a pointer to the header of a node, given the address of the
* user space.
*/
#define PHP_DLST_HEADER(n) ((PHP_DLST_BUCKET*)(n) - 1)
/* Return a pointer to the user space of the list's head node. This user
* space does not actually exist, but it is useful to be able to address
* it to enable insertion at the start of the list.
*/
#define PHP_DLST_HEAD(l) PHP_DLST_USERSPACE((l)->head)
/* Return a pointer to the user space of the last node in list. */
#define PHP_DLST_TAIL(l) PHP_DLST_USERSPACE((l)->z->prev)
/* Determine if a list is empty
*/
#define PHP_DLST_EMPTY(l) ((l)->count == 0)
/*-------------------------- Function Prototypes --------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
void *dlst_newnode(int size);
void dlst_freenode(void *node);
DLIST *dlst_init(void);
void dlst_kill(DLIST *l,void (*freeNode)(void *node));
void dlst_insertafter(DLIST *l,void *node,void *after);
void *dlst_deletenext(DLIST *l,void *node);
void *dlst_first(DLIST *l);
void *dlst_last(DLIST *l);
void *dlst_next(void *prev);
void *dlst_prev(void *next);
void dlst_mergesort(DLIST *l,int (*cmp_func)(void*,void*));
#ifdef __cplusplus
}
#endif
#endif
+4 -4
View File
@@ -5,7 +5,7 @@ AC_DEFUN(LIB_SHARED_CONVENIENCE,[
lib_target="\$(LTLIBRARY_NAME)"
cat >>$1<<EOF
\$(LTLIBRARY_NAME): \$(LTLIBRARY_SHARED_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
\$(SHARED_LIBTOOL) --mode=link \$(CCLD) \$(CFLAGS) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \[$]@ \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_SHARED_LIBADD)
\$(SHARED_LIBTOOL) --mode=link \$(COMPILE) \$(LDFLAGS) -o \[$]@ \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_SHARED_LIBADD)
EOF
])
@@ -14,7 +14,7 @@ AC_DEFUN(LIB_SHARED_MODULE,[
lib_target="\$(LTLIBRARY_SHARED_NAME)"
cat >>$1<<EOF
\$(LTLIBRARY_SHARED_NAME): \$(LTLIBRARY_SHARED_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
\$(SHARED_LIBTOOL) --mode=link \$(CCLD) \$(CFLAGS) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \[$]@ -avoid-version -module -rpath \$(phplibdir) \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_SHARED_LIBADD)
\$(SHARED_LIBTOOL) --mode=link \$(COMPILE) \$(LDFLAGS) -o \[$]@ -avoid-version -module -rpath \$(phplibdir) \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_SHARED_LIBADD)
\$(SHARED_LIBTOOL) --mode=install cp \[$]@ \$(phplibdir)
EOF
@@ -35,9 +35,9 @@ AC_DEFUN(LIB_BUILD,[
lib_makefile="$1/libs.mk"
lib_target=""
test -d $1 || $php_shtool mkdir -p $1
$php_shtool mkdir -p $1
cat >$lib_makefile<<EOF
LTLIBRARY_OBJECTS = \$(LTLIBRARY_SOURCES:.c=.lo)
LTLIBRARY_OBJECTS = \$(LTLIBRARY_SOURCES:.c=.lo) \$(LTLIBRARY_OBJECTS_X)
LTLIBRARY_SHARED_OBJECTS = \$(LTLIBRARY_OBJECTS:.lo=.slo)
EOF
+8 -8
View File
@@ -4,10 +4,10 @@
+----------------------------------------------------------------------+
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.01 of the PHP license, |
| 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_01.txt. |
| 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. |
@@ -20,7 +20,7 @@
#include "php.h"
#if defined(COMPILE_DL) || defined(COMPILE_DL_ASPELL)
#ifdef COMPILE_DL_ASPELL
#include "phpdl.h"
#endif
#include <stdlib.h>
@@ -48,7 +48,7 @@ zend_module_entry aspell_module_entry = {
};
#if defined(COMPILE_DL) || defined(COMPILE_DL_ASPELL)
#ifdef COMPILE_DL_ASPELL
ZEND_GET_MODULE(aspell)
#endif
@@ -74,7 +74,7 @@ PHP_FUNCTION(aspell_new)
aspell *sc;
int ind;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc < 1 || argc > 2 || zend_get_parameters_ex(argc,&master,&personal) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -105,7 +105,7 @@ PHP_FUNCTION(aspell_suggest)
size_t i;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc != 2 || zend_get_parameters_ex(argc, &scin,&word) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -139,7 +139,7 @@ PHP_FUNCTION(aspell_check)
aspell *sc;
int argc;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc != 2 || zend_get_parameters_ex(argc, &scin,&word) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -171,7 +171,7 @@ PHP_FUNCTION(aspell_check_raw)
int argc;
aspell *sc;
argc = ARG_COUNT(ht);
argc = ZEND_NUM_ARGS();
if (argc != 2 || zend_get_parameters_ex(argc, &scin,&word) == FAILURE) {
WRONG_PARAM_COUNT;
}
+13 -25
View File
@@ -1,37 +1,25 @@
/*
+----------------------------------------------------------------------+
| PHP HTML Embedded Scripting Language Version 3.0 |
| PHP version 4.0 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-1999 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: Rasmus Lerdorf <rasmus@lerdorf.on.ca> |
+----------------------------------------------------------------------+
*/
*/
/* $Id$ */
#ifndef _ASPELL_H
#define _ASPELL_H
#ifndef PHP_ASPELL_H
#define PHP_ASPELL_H
#if HAVE_ASPELL
extern zend_module_entry aspell_module_entry;
#define aspell_module_ptr &aspell_module_entry
@@ -50,4 +38,4 @@ PHP_FUNCTION(aspell_suggest);
#define phpext_aspell_ptr aspell_module_ptr
#endif /* _ASPELL_H */
#endif /* PHP_ASPELL_H */
+15 -13
View File
@@ -4,17 +4,19 @@
+----------------------------------------------------------------------+
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.01 of the PHP license, |
| 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_01.txt. |
| 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: Andi Gutmans <andi@zend.com> |
+----------------------------------------------------------------------+
*/
*/
/* $Id$ */
#include "php.h"
@@ -40,7 +42,7 @@ zend_module_entry bcmath_module_entry = {
"bcmath", bcmath_functions, NULL, NULL, PHP_RINIT(bcmath), PHP_RSHUTDOWN(bcmath), NULL, STANDARD_MODULE_PROPERTIES
};
#if defined(COMPILE_DL) || defined(COMPILE_DL_BCMATH)
#ifdef COMPILE_DL_BCMATH
ZEND_GET_MODULE(bcmath)
#endif
@@ -71,7 +73,7 @@ PHP_FUNCTION(bcadd)
bc_num first, second, result;
int scale=bc_precision;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &left,&right) == FAILURE) {
WRONG_PARAM_COUNT;
@@ -114,7 +116,7 @@ PHP_FUNCTION(bcsub)
bc_num first, second, result;
int scale=bc_precision;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &left,&right) == FAILURE) {
WRONG_PARAM_COUNT;
@@ -157,7 +159,7 @@ PHP_FUNCTION(bcmul)
bc_num first, second, result;
int scale=bc_precision;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &left,&right) == FAILURE) {
WRONG_PARAM_COUNT;
@@ -200,7 +202,7 @@ PHP_FUNCTION(bcdiv)
bc_num first, second, result;
int scale=bc_precision;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &left,&right) == FAILURE) {
WRONG_PARAM_COUNT;
@@ -248,7 +250,7 @@ PHP_FUNCTION(bcmod)
pval **left, **right;
bc_num first, second, result;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &left,&right) == FAILURE) {
WRONG_PARAM_COUNT;
@@ -290,7 +292,7 @@ PHP_FUNCTION(bcpow)
bc_num first, second, result;
int scale=bc_precision;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &left,&right) == FAILURE) {
WRONG_PARAM_COUNT;
@@ -333,7 +335,7 @@ PHP_FUNCTION(bcsqrt)
bc_num result;
int scale=bc_precision;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &left)== FAILURE) {
WRONG_PARAM_COUNT;
@@ -373,7 +375,7 @@ PHP_FUNCTION(bccomp)
bc_num first, second;
int scale=bc_precision;
switch (ARG_COUNT(ht)) {
switch (ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &left,&right) == FAILURE) {
WRONG_PARAM_COUNT;
@@ -413,7 +415,7 @@ PHP_FUNCTION(bcscale)
{
pval **new_scale;
if (ARG_COUNT(ht)!=1 || zend_get_parameters_ex(1,&new_scale)==FAILURE) {
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1,&new_scale)==FAILURE) {
WRONG_PARAM_COUNT;
}
+13 -30
View File
@@ -1,42 +1,25 @@
/*
+----------------------------------------------------------------------+
| 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: Andi Gutmans <andi@zend.com> |
+----------------------------------------------------------------------+
*/
*/
/* $Id$ */
#ifndef _PHP_BCMATH_H
#define _PHP_BCMATH_H
#if COMPILE_DL
#undef WITH_BCMATH
#define WITH_BCMATH 1
#endif
#ifndef PHP_BCMATH_H
#define PHP_BCMATH_H
#if WITH_BCMATH
@@ -61,4 +44,4 @@ PHP_FUNCTION(bcscale);
#endif
#endif /* _PHP_BCMATH_H */
#endif /* PHP_BCMATH_H */
+4 -4
View File
@@ -4,10 +4,10 @@
+----------------------------------------------------------------------+
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.01 of the PHP license, |
| 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_01.txt. |
| 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. |
@@ -32,7 +32,7 @@ PHP_FUNCTION(unixtojd)
long jdate;
time_t t;
struct tm *ta, tmbuf;
int myargc=ARG_COUNT(ht);
int myargc=ZEND_NUM_ARGS();
if ((myargc > 1) || (zend_get_parameters(ht,myargc, &timestamp) != SUCCESS)) {
WRONG_PARAM_COUNT;
@@ -59,7 +59,7 @@ PHP_FUNCTION(jdtounix)
pval *jday;
long uday;
if ((ARG_COUNT(ht)!= 1) || (zend_get_parameters(ht,1, &jday) != SUCCESS)) {
if ((ZEND_NUM_ARGS()!= 1) || (zend_get_parameters(ht,1, &jday) != SUCCESS)) {
WRONG_PARAM_COUNT;
}
+3 -3
View File
@@ -4,10 +4,10 @@
+----------------------------------------------------------------------+
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.01 of the PHP license, |
| 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_01.txt. |
| 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. |
@@ -249,7 +249,7 @@ PHP_FUNCTION(jdtogregorian)
pval *julday, *mode;
int day;
char *daynamel, *daynames;
int myargc=ARG_COUNT(ht),mymode=0;
int myargc=ZEND_NUM_ARGS(),mymode=0;
if ((myargc < 1) || (myargc > 2) || (zend_get_parameters(ht,myargc, &julday, &mode) != SUCCESS)) {
WRONG_PARAM_COUNT;
+4 -4
View File
@@ -43,8 +43,8 @@ RSC=rc.exe
# PROP Intermediate_Dir "Release_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MSSQL_EXPORTS" /D "COMPILE_DL" /D "DBNTWIN32" /D ZTS=1 /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALENDAR_EXPORTS" /D "COMPILE_DL" /D ZTS=1 /D ZEND_WIN32=1 /D PHP_WIN32=1 /D ZEND_DEBUG=0 /YX /FD /c
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MSSQL_EXPORTS" /D "COMPILE_DL_CALENDAR" /D "DBNTWIN32" /D ZTS=1 /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALENDAR_EXPORTS" /D "COMPILE_DL_CALENDAR" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_CALENDAR=1 /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x406 /d "NDEBUG"
@@ -70,8 +70,8 @@ LINK32=link.exe
# PROP Intermediate_Dir "Debug_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "mssql-70" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MSSQL_EXPORTS" /D "COMPILE_DL" /D "DBNTWIN32" /D ZTS=1 /D MSSQL70=1 /YX /FD /c
# ADD CPP /nologo /MDd /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALENDAR_EXPORTS" /D "COMPILE_DL" /D ZTS=1 /D ZEND_WIN32=1 /D PHP_WIN32=1 /D ZEND_DEBUG=1 /YX /FD /c
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /I "mssql-70" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MSSQL_EXPORTS" /D "COMPILE_DL_CALENDAR" /D "DBNTWIN32" /D ZTS=1 /D MSSQL70=1 /YX /FD /c
# ADD CPP /nologo /MDd /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\..\bindlib_w32" /I "..\..\TSRM" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CALENDAR_EXPORTS" /D "COMPILE_DL_CALENDAR" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_CALENDAR=1 /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x406 /d "NDEBUG"
+3 -3
View File
@@ -4,10 +4,10 @@
+----------------------------------------------------------------------+
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.01 of the PHP license, |
| 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_01.txt. |
| 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. |
@@ -34,7 +34,7 @@ static void _cal_easter(INTERNAL_FUNCTION_PARAMETERS, int gm)
time_t the_time;
long year, golden, solar, lunar, pfm, dom, tmp, easter;
switch(ARG_COUNT(ht)) {
switch(ZEND_NUM_ARGS()) {
case 0:
the_time = time(NULL);
ta = localtime(&the_time);
Loaded 100 of 619 files, more files were not shown because too many files have changed in this diff. Show more