Compare commits

..
2015 Commits
Author SHA1 Message Date
SVN Migration 078bcec099 This commit was manufactured by cvs2svn to create branch 'PHP_5'. 2003-02-27 17:43:39 +00:00
Wez Furlong fd61f69077 Another big commit (tm).
Main Changes:
- Implement a socket transport layer for use by all code that needs to open
  some kind of "special" socket for network or IPC.
- Extensions can register (and override) transports.
- Implement ftruncate() on streams via the ioctl-alike option interface.
- Implement mmap() on streams via the ioctl-alike option interface.
- Implement generic crypto API via the ioctl-alike option interface.
  (currently only supports OpenSSL, but could support other SSL toolkits,
  and other crypto transport protocols).

Impact:
- tcp sockets can be overloaded by the openssl capable sockets at runtime,
  removing the link-time requirement for ssl:// and https:// sockets and
  streams.
- checking stream types using PHP_STREAM_IS_SOCKET is deprecated, since
  there are now a range of possible socket-type streams.

Working towards:
- socket servers using the new transport layer
- mmap support under win32
- Cleaner code.

# I will be updating the win32 build to add the new files shortly
# after this commit.
2003-02-27 17:43:38 +00:00
Ilia Alshanetsky 560e33968d Fixed bug #21410 (fixed handling of NULL or "" files on Win32) 2003-02-27 16:41:23 +00:00
foobar 4cac01352d ..if only all lakes were kossu.. 2003-02-27 15:52:38 +00:00
Hartmut Holzgraefe 52ca521b40 changed from strncpy to strlcpy on request 2003-02-27 10:21:32 +00:00
Sascha Schumann 60dcebd71a rename macro argument so that it does not partially match the string.
fixes a warning on unixware
2003-02-27 10:07:12 +00:00
Corne' Cornelius 5e09029ba7 - Changed maxmsglen in ifx_errormsg() back to normal 255 instead of 10 2003-02-27 08:59:16 +00:00
Corne' Cornelius 8a7822cf24 - Fixed possible Segfault in ifx_errormsg() using malloc() instead of emalloc() 2003-02-27 08:56:15 +00:00
4fbdee3c26 NEWS update 2003-02-27 01:44:34 +00:00
10fb8dadd8 ChangeLog update 2003-02-27 01:42:36 +00:00
Rasmus Lerdorf 0b5ffc4f1c MFB: We know ini file scanning will never be interactive, so speed it up a
bit.  Need a dynamic check for the language scanner.
2003-02-27 00:11:43 +00:00
Pierre Joye 972c04e50b add imagesavealpha wrapper (Jukka Holappa <jukkaho@mail.student.oulu.fi>,
2 Pierre-Alain Joye)
2003-02-26 23:22:09 +00:00
Pierre Joye fbd867184c add imagesavealpha wrapper (Jukka Holappa <jukkaho@mail.student.oulu.fi>,
Pierre-Alain Joye)
2003-02-26 23:21:44 +00:00
Rasmus Lerdorf ca2a28774a MFB: Get rid of a redundant syscall on non-Windows 2003-02-26 22:19:01 +00:00
Ilia Alshanetsky 695ae92c97 1) Make the output of system() binary safe
2) Solved a memory leak when the return_value variable passed by reference is
   not an integer in system()/exec()/passthru().
3) Solved a bug in exec(), which would make it append to the 2nd parameter
   (passed by reference) if the parameter is an array instead of overwriting it.
4) Changed the code to use the streams code, resulting in a smaller code base.
5) Various cleanups resulting in reduction of overall code base inside the file
   by ~ 1/3.
6) Speed improvements of ~2.5 times compared to previous performance (based on
   attached PHP script).
2003-02-26 22:11:12 +00:00
Marcus Boerger d737741329 allow keys as array(group, name) for handler inifile 2003-02-26 22:07:50 +00:00
Marcus Boerger ce04e8a91a ws 2003-02-26 22:05:32 +00:00
Marcus Boerger cdcb86a4da make it faster 2003-02-26 22:03:55 +00:00
Marcus Boerger 6fd9c32346 if skip param of dba_fetch is -1 stop do not restart search after last element 2003-02-26 22:03:00 +00:00
Derick Rethans 424c41a72e - Added an extra ini setting with which extra commands can be forced to
the sendmail deamon on a per-vhost base. The value in this ini setting
  will override all extra commands passed as the 5th parameter to mail()
  and will work in Safe Mode.
@- Added an extra ini setting (mail_force_extra_paramaters) which forces
@  the addition of the specified parameters to be passed as extra
@  parameters to the sendmail binary. These parameters will always replace
@  the value of the 5th parameter to mail(), even in safe mode. (Derick)
2003-02-26 20:04:16 +00:00
Derick Rethans 17acc55ad0 - Fix proto 2003-02-26 19:34:16 +00:00
Derick Rethans bc11c47ce6 - Whitespace 2003-02-26 19:25:24 +00:00
Hartmut Holzgraefe 499a97a9b2 changed to emalloc just to be safe 2003-02-26 16:06:07 +00:00
Hartmut Holzgraefe f7490c405b forgot to add these two on my last commit :( 2003-02-26 10:06:47 +00:00
Sebastian Bergmann 189d29061e Syntactic sugar is sweet. 2003-02-26 08:27:14 +00:00
Brad LaFountain 2c1b3b74b2 changes in the past shouldn't have compiled. 2003-02-26 03:04:00 +00:00
fd40b6d3f5 ChangeLog update 2003-02-26 02:03:08 +00:00
Ilia Alshanetsky aee0c18bde Made shell_exec() use streams, this simplifies the code and in some cases
makes it a little faster too.
2003-02-25 23:52:34 +00:00
Ilia Alshanetsky bce8bfdae4 MFH (forgot to put this fix into the 5.X tree). 2003-02-25 23:39:57 +00:00
Moriyoshi Koizumi e0ec5871d9 NEWS update 2003-02-25 20:41:07 +00:00
Moriyoshi Koizumi 991da29849 Set fgetss() free from the length parameter 2003-02-25 20:12:18 +00:00
Ilia Alshanetsky 503e49feae Fixed test. 2003-02-25 16:27:51 +00:00
Ilia Alshanetsky f29964e2ba Fixed bug #22414 and added a test case for it. 2003-02-25 16:21:00 +00:00
foobar 400f466040 Cleanup 2003-02-25 11:48:50 +00:00
foobar 7bd710a658 - Fixed bug #21224 (apache configure fails when using --enable-versioning) 2003-02-25 11:23:09 +00:00
Zeev Suraski 5793784c93 Get the bits right - final/private fix 2003-02-25 10:03:26 +00:00
foobar 411478e1f6 Fixed bug #20256 (snprintf() not defined) 2003-02-25 09:44:12 +00:00
Adam Dickmeiss 79a3618b36 Tabify 2003-02-25 08:34:33 +00:00
Adam Dickmeiss 45214b2340 yaz_search supports query type cql 2003-02-25 08:31:53 +00:00
foobar 5132f3cb54 Do not redefine zend_isnan if it is already defined. 2003-02-25 07:46:15 +00:00
foobar 3efd2b1317 typofix 2003-02-25 07:40:51 +00:00
foobar afc69728a8 (hope) fix some win32 build errors 2003-02-25 07:19:44 +00:00
Corne' Cornelius 086b317448 - Added Corne' Cornelius to CREDITS/Authors 2003-02-25 06:59:15 +00:00
foobar 43c4c6913e Another win32 build fix. 2003-02-25 06:54:04 +00:00
foobar c7a40ac1ff (hopefully) fix the build.. 2003-02-25 06:49:59 +00:00
foobar e9b5e34005 - Fixed bug #14245 ('make install' fails on AIX when using --with-apxs). 2003-02-25 06:35:43 +00:00
Corne' Cornelius 9f48874675 - Changed IFX_VERSION to work with Major versions with more then one digit 2003-02-25 05:33:28 +00:00
foobar 14f98fca45 fix bug #22324, libjdbcoci8.so is not necessarily needed.. 2003-02-25 04:36:54 +00:00
Ilia Alshanetsky e8823a205a Fixed bug #22402 (opening of ftp for read/write could fail due to invalid
return code handling).
Solution suggested by jan@jancm.org
2003-02-25 04:20:22 +00:00
Ilia Alshanetsky 348200b54d Fixed a crash in gdImageCopyMergeGray(). 2003-02-25 03:49:26 +00:00
Stig Bakken 04870428ab * fixed <provides> generation, provides elements are now included for
every non-private class, function and method
2003-02-25 02:44:10 +00:00
Stig Bakken d4dff9e92a * add new ZE2 tokens 2003-02-25 02:08:49 +00:00
Ilia Alshanetsky 5e118977cd Fixed various compiler warnings. 2003-02-25 01:44:57 +00:00
Ilia Alshanetsky 9e0fb1a33c Use native flock() whenever possible. 2003-02-25 01:41:58 +00:00
Ilia Alshanetsky 862634ffa5 Added locking to streams.
Allow PHP to automatically release locks on files when terminating the
stream.
Fixed bugs in the handling of the 3rd optional parameter to flock().
2003-02-25 01:39:06 +00:00
96563ce34f ChangeLog update 2003-02-25 01:33:26 +00:00
Moriyoshi Koizumi 4759048194 Removed unnecessary asserts 2003-02-24 23:13:40 +00:00
Moriyoshi Koizumi 14db9ea88d Fixed string.strip_tags filter so it reflects the change on php_strip_tags 2003-02-24 22:41:55 +00:00
Moriyoshi Koizumi b44b0b80e0 Made fgetss() binary safe too 2003-02-24 22:39:47 +00:00
Moriyoshi Koizumi 8f341f6a19 Fixed possible buffer overflow of php_strip_tags 2003-02-24 22:19:36 +00:00
Moriyoshi Koizumi 385a809694 Made strip_tags() binary safe 2003-02-24 22:01:12 +00:00
Sara Golemon 85a5ef3ec9 Initial re-implementation of userfilters after filterchain redesign by wez. More userspace API to come. 2003-02-24 21:56:19 +00:00
Wez Furlong 088e2692c3 MFB: Bunch of streams related fixes. 2003-02-24 21:40:23 +00:00
Ilia Alshanetsky 4474f9225a Fixed bug #22355 (PHP would remove folding from Subject & To fields). 2003-02-24 19:41:18 +00:00
Moriyoshi Koizumi a628a6a2de Added test case for bug #22367 2003-02-24 19:37:27 +00:00
Moriyoshi Koizumi 93b6d05bb8 Forgot to fix this part 2003-02-24 16:54:21 +00:00
Moriyoshi Koizumi a67e4dac8f Fixed the test as the result is just considered to be expected 2003-02-24 16:50:35 +00:00
Moriyoshi Koizumi f73f94f258 Fixed a signed / unsigned issue.
# imagine the case like "\\\xfe" where walk[1] takes a value that is greater
# than 127 in integer...
2003-02-24 16:29:00 +00:00
foobar 73bae37f26 Possible fix for #22259 + part 1/2 for fixing one AIX bug.. 2003-02-24 16:16:11 +00:00
Moriyoshi Koizumi 171fd93840 Style fix 2003-02-24 16:13:13 +00:00
foobar 75d6810d2c BFN 2003-02-24 16:01:38 +00:00
foobar 866fb82484 fix quotes 2003-02-24 15:11:54 +00:00
Zeev Suraski 80d0fa7aad (possibly) fix Win32 builds of the Apache 2 filter 2003-02-24 15:10:36 +00:00
Stanislav Malyshev 3cf20f86db fix exception handling 2003-02-24 13:35:47 +00:00
Hartmut Holzgraefe cfb377ce33 "key" has to be zero-delimited 2003-02-24 13:35:07 +00:00
Zeev Suraski 535aa63293 Add 'final' 2003-02-24 12:05:58 +00:00
Hartmut Holzgraefe edbc369721 - code generation: resources and phpinfo logo
- duplicate code elimination for prototype parsing
- improved phpinfo block (incl. logo)
- some input error checking
- documentation generation for ini-directives, constants
  and resources
2003-02-24 10:57:48 +00:00
Sebastian Bergmann 37d529f100 Remove obsolete not on redeclaring protected members. 2003-02-24 10:38:43 +00:00
Sebastian Bergmann 99c358c7cb Leftover. 2003-02-24 10:37:45 +00:00
Sebastian Bergmann 57ae4a5ac4 Initial documentation of namespace {}. 2003-02-24 10:35:39 +00:00
foobar cf72bfbae1 no c++ comments 2003-02-24 08:27:24 +00:00
Corne' Cornelius 7afe50fc5c (PHP ifx_errormsg) Fixed Informix bug where ifx_errormsg() would Segfault
on an unopened connecection and with an errorcode supplied
2003-02-24 06:34:37 +00:00
foobar a7132f74fd Always use the libtool which is build in the top_builddir. 2003-02-24 04:37:04 +00:00
foobar 6ed8720fa2 fix compile warning 2003-02-24 03:27:00 +00:00
Ilia Alshanetsky a3cb589b71 Fixed bug #22382 (fgetcsv did not handle \" correctly). 2003-02-24 03:13:25 +00:00
424636f0dc ChangeLog update 2003-02-24 01:32:18 +00:00
George Schlossnagle e49bc59a79 ws fix 2003-02-24 01:25:30 +00:00
George Schlossnagle f5fb75f390 hopefully a fix for 19919 2003-02-24 01:19:08 +00:00
foobar c87c4c7bd7 Extra paranoia checks if dn_skipname/dn_expand exist or not 2003-02-24 00:09:18 +00:00
foobar 8c3cd0344d MFB: Fix for open_basedir error message 2003-02-23 22:30:02 +00:00
Zeev Suraski 731a55ad52 Move abstract inheritance logic to the right spot 2003-02-23 13:58:48 +00:00
Zeev Suraski bb956372a5 Fixed abstract handling in inheritence 2003-02-23 12:51:40 +00:00
Stig Bakken 52ce358bde * upgrading XML_Parser to 1.0.1 2003-02-23 11:03:38 +00:00
foobar 58e4503942 Added missing headers and $Id$ tags. 2003-02-23 09:50:43 +00:00
foobar 406340713d MFB: Fixed bug #22356 (Do not add empty -I flags). 2003-02-23 09:37:13 +00:00
foobar de54cd0a08 Fix for bug #22353 2003-02-23 08:14:25 +00:00
foobar 6000c7b46c - Fixed bug #22376 (wrong httpd.conf modified when using INSTALL_ROOT) 2003-02-23 07:32:03 +00:00
Marcus Boerger 5f1975a432 New test which currently fails 2003-02-23 03:03:09 +00:00
Marcus Boerger 8e62295a5f Fix the name
# but yes Jani your sentence has better style
2003-02-23 02:45:10 +00:00
foobar 35f3f3ecc6 These both are experimental still. (there has been a note in config.m4
all the time but these marker files were missing)
2003-02-23 02:39:51 +00:00
foobar b1a1012a72 Style 2003-02-23 02:24:51 +00:00
1162d7b797 NEWS update 2003-02-23 01:32:03 +00:00
339031846e ChangeLog update 2003-02-23 01:31:45 +00:00
Marcus Boerger fbe7e1d977 Dropped optimization
# It is impossible to combine skip=-1 searches with firstkey/nextkey results
2003-02-22 23:47:09 +00:00
Marcus Boerger c0e9bd0830 INI files are case insensitive 2003-02-22 20:49:07 +00:00
Ilia Alshanetsky 8908faa47f Revent previous patch, adding of file_write_content() was premature. 2003-02-22 20:35:22 +00:00
Ilia Alshanetsky d2e2fbcc5b int/long change. 2003-02-22 20:33:11 +00:00
Marcus Boerger fef5b7c3a1 Remove testcode 2003-02-22 17:37:27 +00:00
Marcus Boerger 8ab1924ca3 @Added dba handler inifiles to support ini files. (Marcus) 2003-02-22 17:20:06 +00:00
Andrey Hristov 8c2dbd5f0f additional speedup for array_shift(). No need to rehash if the removed element's
key is not scalar and elements with scalar keys are already well numbered
(sequentially from 0) for some reason. This is the case if the leading
elements have no scalar indexes.
2003-02-22 13:55:11 +00:00
Andrey Hristov 94040a28ce rehash only in case something is changed.
#lowers the execution time in half on my machine on array with 1000 elements
#with nonscalar keys. Maybe it can be optimized further.
2003-02-22 10:54:26 +00:00
Georg Richter 0133377fba removed some comments 2003-02-22 07:47:46 +00:00
Georg Richter b63fbf2763 Fixed bug with stmt_close (libmysql bk version 1.1477 required)
Fixed bug with mysql_execute and float values
2003-02-22 07:31:01 +00:00
Justin Erenkrantz a7df9995cc Add xbithack support to apache2handler SAPI.
(configuration doesn't work, but that's not something new apparently.)
2003-02-22 04:42:34 +00:00
aac74c71d8 ChangeLog update 2003-02-22 01:31:43 +00:00
Wez Furlong c1bdf163ed Add comment about thread-safety of gethostbyname on win32.
Set the correct path to the win32 config.h file in the .dsp file.
2003-02-21 14:06:55 +00:00
foobar 7d256c1ae1 MFB 2003-02-21 10:43:32 +00:00
foobar b420beba61 - Fixed bug: #22339
# No NEWS, this was bug introduced by Marcus a while ago..
# Not present in php4.3.x branch
2003-02-21 08:45:58 +00:00
foobar 12ce594f64 MFB 2003-02-21 06:50:25 +00:00
foobar 161d31c8bc ZTS fixes 2003-02-21 06:46:12 +00:00
7884793dcb ChangeLog update 2003-02-21 01:32:23 +00:00
David Viner 1cf1e31acc this tiny change adds the location of apache includes and libraries that
are installed when you use the Apache Windows Installer
(C:\Program Files\Apache Group\Apache\*).  With this patch,
a windows developer who has used the Apache Windows Installer should be
able to compile the Apache sapi module without any modifications to his/her
installed tree.  It should have no effect whatsoever on anyone else.

--dviner
2003-02-21 00:14:33 +00:00
Rasmus Lerdorf d08a0e99c8 An input filter might not simply strip stuff, it might also turn things
into entities or use some other mechanism which causes the filtered data
to be longer than the original data.  Ergo, pass in the address of the
buffer instead so the filter is free to reallocate it.
2003-02-20 22:21:49 +00:00
Justin Erenkrantz 9d89ef3295 Remove C++-style comment. (Breaks Sun Forte compiler.) 2003-02-20 21:48:58 +00:00
Wez Furlong f8e414ef70 *cough*
Fix another stupid mistake.
2003-02-20 21:48:46 +00:00
Sara Golemon 2002ca0203 Reduce unnecessary filter applications when stream is (read|write) only 2003-02-20 20:05:31 +00:00
Stanislav Malyshev e645f20d07 Allow namespaces to have a number of parts. I.e., now you can do:
namespace foo {
	function abc() {}
}
...
namespace foo {
	functio def() {}
}
2003-02-20 19:01:53 +00:00
Justin Erenkrantz 9729930343 Clean up apache2handler SAPI.
Key improvements:
- Be streamy
- Re-enable virtual() support
- Set content_type correctly
- Remove unnecessary code and reintroduce some missing code
- Change signature from PhP to PHP
2003-02-20 18:20:03 +00:00
Moriyoshi Koizumi 63291af120 Fixed bug #22330 (overloaded strrpos() gives wrong results)
Patch by david at santinoli dot com. Thanks!
2003-02-20 17:52:42 +00:00
Derick Rethans 2bff9cae27 - Fixed testcase... you can never trust on RFCs it seems 2003-02-20 16:15:41 +00:00
Hartmut Holzgraefe 30212544c3 put constants into C output
do not limit int constants to numbers, C #defines are ok as strings
foobar(void) needs special treatment in code generation
2003-02-20 15:19:14 +00:00
foobar fa68f3c276 style 2003-02-20 13:42:29 +00:00
Derick Rethans 91766d4b9a - Fixed copy and paste bug 2003-02-20 10:33:55 +00:00
Derick Rethans b4b33b11ef - Also add the optional raw output parameter to md5_file and sha1_file. 2003-02-20 10:32:35 +00:00
foobar b7885999cb This is added in 4.3.2 2003-02-20 07:13:59 +00:00
foobar 0f593f899f Fixed bug: #22306 (pg_lo_seek($h, 0, PGSQL_SEEK_SET) succeeds but returns false) 2003-02-20 07:10:07 +00:00
Sascha Schumann 57d244c93d update 2003-02-20 06:57:42 +00:00
Derick Rethans ead7521e4d - No need to add the \0 ourselves, the estrndup in STRINGL takes care of
that for us.
2003-02-20 06:56:37 +00:00
Sascha Schumann 7ac81c2fbe update 2003-02-20 06:56:18 +00:00
Sascha Schumann 6f5b46c118 generally urlencode parameters 2003-02-20 06:18:16 +00:00
foobar 8a316d5f69 VCWD_LSTAT is not available on win32/netware 2003-02-20 06:16:37 +00:00
foobar 6043ee22e8 - Fixed bug #22299 (gethostbyname() crash with non-existing domain on MacOSX) 2003-02-20 05:34:58 +00:00
1c0f919af0 NEWS update 2003-02-20 01:33:17 +00:00
43b857b9b2 ChangeLog update 2003-02-20 01:33:00 +00:00
Ilia Alshanetsky 69094da0e8 Revert accidental commit. 2003-02-20 00:34:03 +00:00
Ilia Alshanetsky 3bff5c0419 Fixed bug #22308 (optimized passthru, code is now ~40 times faster). 2003-02-20 00:32:51 +00:00
foobar ea80f71214 consistent with the used style 2003-02-20 00:19:04 +00:00
Jon Parise 370c0cbf91 Add folding markers and editor directive blocks. 2003-02-19 21:36:00 +00:00
Rasmus Lerdorf afb8842cea Fix mbstring input_filter 2003-02-19 20:56:47 +00:00
Rasmus Lerdorf 7429c2dc3f Input Filter support. See README.input_filter for details.
@- Input Filter support added. See  README.input_filter. (Rasmus)
2003-02-19 19:41:09 +00:00
foobar 0458bb5e2b MFB 2003-02-19 18:45:51 +00:00
Harald Radi 53d70b2c14 prevent xdebug from crashing 2003-02-19 16:17:15 +00:00
Hartmut Holzgraefe 843e3449cf code for the special functions MINIT, MSHUTDOWN, RINIT, RSHUTDOWN, MINFO
and for private internal C helper functions may now be embedded into
the XML specification
2003-02-19 16:02:45 +00:00
Wez Furlong 397785bdcd typo.. 2003-02-19 15:07:45 +00:00
Wez Furlong c127eb74aa News about the ZE stream thing 2003-02-19 14:59:26 +00:00
Wez Furlong e88da9728f Fix stupid mistake that only affected interactive mode. 2003-02-19 14:52:56 +00:00
Hartmut Holzgraefe f7d6212b9c test specifications for MINIT and friends 2003-02-19 14:50:43 +00:00
Hartmut Holzgraefe 714a6d727e <code> inside <function> was supported but missing from the DTD,
added "role" attribute to support "internal" functions like
MINIT and stuff, "private" C functions not to be published as
PHP functions and "public" implemenations of PHP functions
2003-02-19 14:48:17 +00:00
Marc Boeren 85f81c6006 Fix for bug #22221: pgsql version for dbx_query suppressed a warning that
was trappable by using a user-defined error-handler. A different use of
pgsql_getrow removed the warning and thus the need for suppressing it.
2003-02-19 13:32:27 +00:00
Sascha Schumann fb6c60c46c some improvements 2003-02-19 10:57:21 +00:00
Hartmut Holzgraefe 889bb70a3f Microsoft Developer Studio project file (.dsp) generation added
for now both config.m4 and .dsp files are generated for the simples
case only (one .c file, one .h file, no external dependencies)
2003-02-19 10:12:28 +00:00
Hartmut Holzgraefe 1dc3726ff2 next generation ext_skel script - initial checkin 2003-02-19 10:07:22 +00:00
Corne' Cornelius 71e6110bc8 - Revert latest commit 2003-02-19 09:52:52 +00:00
foobar 7e3b50896c ws/style fixes 2003-02-19 09:38:11 +00:00
Corne' Cornelius ad56bbe4a4 - Added Input Descriptor Binding to be used by blobs. This fixed a bug
where ESQL/C would cause a Segmentation fault if the first blob in a
  result is NULL or '' as soon as it gets a result with blob != NULL
- Fixed leaks where blobs resources weren't always freed
2003-02-19 09:29:26 +00:00
foobar 2b90480fa9 scandir -> php_scandir, alphasort -> php_alphasort 2003-02-19 09:27:29 +00:00
foobar ec11fe04e9 Fix the possible conflicts with other libs (like libc-client) 2003-02-19 09:25:16 +00:00
foobar 8e3f23e3c0 ws fixes + missing $Id$ tags, headers added 2003-02-19 08:40:19 +00:00
Corne' Cornelius 48e5c1dae7 Updated IFX_VERSION entry to work with new Version output of ESQL/C
@- Updated IFX_VERSION entry to work with new Version output of ESQL/C (Corne')
2003-02-19 07:16:01 +00:00
foobar 4205e66f63 cleanup, documentation belongs elsewhere 2003-02-19 06:33:43 +00:00
6119fef3a3 NEWS update 2003-02-19 01:32:20 +00:00
b66dd24323 ChangeLog update 2003-02-19 01:32:10 +00:00
Ilia Alshanetsky a6ef609a37 Fixed bug #22283 (possible crash when opening relative URLs). 2003-02-19 00:49:31 +00:00
Moriyoshi Koizumi 69113a3099 Added string.strip_tags filter. 2003-02-19 00:12:23 +00:00
Moriyoshi Koizumi 6389a79ea5 Fixed memory leaks on conversion failure. 2003-02-18 23:30:36 +00:00
Moriyoshi Koizumi 8793a78fee Revived convert filter codes 2003-02-18 23:22:49 +00:00
Jon Parise 40dacff24a Remove a stray COM reference. 2003-02-18 23:22:15 +00:00
Rasmus Lerdorf 891835e7aa fileno() needs a FILE * here, and at least on FreeBSD with gcc-2.95.3
it is unable to figure out that this is indeed a FILE * and hence it
won't compile without this cast.
2003-02-18 22:29:27 +00:00
Marcus Boerger b8f518a451 - wrong use of sizeof(char)
- use define for block size
- a bit faster
2003-02-18 22:19:18 +00:00
Marcus Boerger 7b6fb4b7b3 coding style 2003-02-18 20:49:52 +00:00
Marcus Boerger 3db2b2bc7c avoiding problems 2003-02-18 20:48:05 +00:00
Moriyoshi Koizumi 816a9017be BFN 2003-02-18 20:34:35 +00:00
Derick Rethans d95c41eddb - Added new parameter to sha1() and md5() which return the digest as
binary data. (Original patch by Michael Bretterklieber <mbretter@jawa.at>)
- Added test cases for sha1() and md5() based on the testvectors in RFC 1321
  and RFC 3174.
@- Added new parameter to sha1() and md5() which return the digest as
@  binary data. (Michael Bretterklieber <mbretter@jawa.at>, Derick)
2003-02-18 20:31:19 +00:00
Moriyoshi Koizumi dd0462c78f Added description for the hand-made finite state machine. 2003-02-18 20:31:04 +00:00
Derick Rethans 0799d2db84 - Add check for proc_open() being available 2003-02-18 20:07:59 +00:00
Sascha Schumann 4ec77cfbb5 Refactor new-session-id code 2003-02-18 19:29:38 +00:00
Sascha Schumann 2699c26f42 Remember whether to send a cookie, so that we send out the correct
session id.  Also improve check for active session
2003-02-18 19:13:49 +00:00
Wez Furlong 4c4d77d23e Fix incorrect TSRMLS_CC usage.
Fix com_create_guid()
2003-02-18 19:03:44 +00:00
Sascha Schumann 32e0c8161c add session_regenerate_id() 2003-02-18 18:50:44 +00:00
Moriyoshi Koizumi bcd49d63c3 Fixed mb_send_mail() so that Content-Type and Content-Transfer-Encoding
headers are overridable by additional header parameters.
This patch fixes bug #21985 and bug #22064.
2003-02-18 18:49:47 +00:00
Moriyoshi Koizumi 89caaeb87c Fixed bug #21708 (ucfirst() trouble again)
# this bug is related to bug #21689
2003-02-18 18:11:34 +00:00
Zeev Suraski 955636af69 Avoid using a C++ reserved word 2003-02-18 17:18:28 +00:00
Moriyoshi Koizumi d4e9d48b18 Fixed bug #21689 (fgetcsv suppresses some characters before a separator)
The fix is suggested by Masahiro Nakayama <masa@sfc.wide.ad.jp>

# is* functions expect their argument to be an integer in range of 0-255
2003-02-18 15:15:22 +00:00
Zeev Suraski 7240050243 Commit missing stuff 2003-02-18 13:34:52 +00:00
Wez Furlong a5860e6e28 Fixup build for win32 2003-02-18 09:51:21 +00:00
Wez Furlong aad491817c Implement com_create_guid().
Add a special case for RETVAL_VARIANT when a variant is of type VT_DISPATCH but has a NULL dispatch pointer.
This kind of variant is returned by the WindowsInstaller automation interface.
2003-02-18 09:46:19 +00:00
Wez Furlong e52aac940f Implement simple stream support in the ZE scanners. 2003-02-18 09:37:54 +00:00
Georg Richter 500dfcfd62 added new function mysqli_stmt_store_result 2003-02-18 08:49:00 +00:00
Georg Richter 05d10452ba test for mysqli_stmt_store_result 2003-02-18 08:41:16 +00:00
Wez Furlong 2003d8eeb6 Implement com_indexed_prop_set() which allows setting of array-like indexed properties on COM objects.
It is expected that this function will be transient, waiting for engine-level and then rpc-level support to be implemented so that this can be integrated more completely.
I'm committing this now so that others can help develop the msi installer scripts that require this feature.
2003-02-18 07:36:31 +00:00
Sara Golemon 73c78270b6 Introduce //filter target to php: wrapper to allow inline application of filters during fopen() style opperations 2003-02-18 06:10:14 +00:00
foobar ffe0f52be6 style polizei 2003-02-18 03:27:55 +00:00
foobar 25a7332e9b getpriority() and setpriority() are in libc.. 2003-02-18 03:25:33 +00:00
foobar 28f4cb18ec nice() is part of libc, use AC_CHECK_FUNCS instead 2003-02-18 03:22:47 +00:00
Ilia Alshanetsky 5b858c9e94 Fixed compiler warning. 2003-02-18 03:12:38 +00:00
Sara Golemon 6fe4ab41f0 Fix stream_filter_(ap|pre)pend to allow attaching on the read and/or write chains. Automagically decide what to do if noone tells us. 2003-02-18 02:53:24 +00:00
Ilia Alshanetsky 02ea3ab085 New function news. 2003-02-18 01:44:53 +00:00
Ilia Alshanetsky 0503336ede Added pcntl_setpriority & pcntl_getpriority(). These functions can be used
to fetch and alter the priority of a process.
2003-02-18 01:41:06 +00:00
Wez Furlong 952d5f548e TSRMLS! 2003-02-18 01:39:26 +00:00
abcd236386 ChangeLog update 2003-02-18 01:34:00 +00:00
Wez Furlong 1e34a6bffc Add basic test of read filters and read filter chain. 2003-02-18 01:24:41 +00:00
Ilia Alshanetsky 0ad5cac954 By popular demand nice() is renamed to proc_nice().
A better error message for proc_nice() failure.
2003-02-18 01:23:51 +00:00
Wez Furlong 32165a5546 Implement new filter API, stage 1.
This breaks user-space filters (for the time being), and those
weird convert.* filters in ext/standard/filters.c

The filters stack has been separated into one chain for read and one chain
for write.

The user-space stream_filter_append() type functions currently only operate
on the read chain. They need extending to work with the write chain too.
2003-02-18 01:22:21 +00:00
Ilia Alshanetsky 0fd1009fcc Added nice() function, which allows changing of priority for the current
process.
2003-02-18 01:07:57 +00:00
Georg Richter 19a9b4f310 new test (class which extends mysqli. currently this test fails :( ) 2003-02-18 00:42:38 +00:00
Georg Richter 2f604f67e8 removed duplicate code 2003-02-18 00:32:47 +00:00
Georg Richter bc5eb4b3b4 fixed some leaks when mysql_close will be called before all stmts are freed. 2003-02-18 00:00:51 +00:00
Georg Richter bf348326bd additional tests for non freed objects 2003-02-17 23:29:58 +00:00
foobar 5c63fad55c MFB: Sanity check. 2003-02-17 22:45:50 +00:00
foobar b4ae3249fe Update 2003-02-17 18:10:53 +00:00
Georg Richter 3686b61548 test for mysql_fetch_row (oo-style) 2003-02-17 16:19:49 +00:00
Zeev Suraski 827434c2a3 Whitespace & minor renames 2003-02-17 15:07:57 +00:00
Zeev Suraski 76c6d7e721 whitespace 2003-02-17 15:04:29 +00:00
Zeev Suraski d22cc2f329 Improve handling of static member variables 2003-02-17 14:06:39 +00:00
Zeev Suraski 4934744b93 Win32 build improvements 2003-02-17 13:29:59 +00:00
Zeev Suraski fb607799cc More Win32 build improvements 2003-02-17 13:27:15 +00:00
Zeev Suraski 566e41226f Improve Win32 build performance 2003-02-17 13:20:41 +00:00
Wez Furlong cc66d8abaa Fix build under win32 2003-02-17 13:11:22 +00:00
Georg Richter 1f188f6554 added close method/alias for result object (for compatibility with statement and
link objects)
2003-02-17 09:38:32 +00:00
Georg Richter 1076328edb test for OO-Implementation (bind_result) 2003-02-17 08:54:23 +00:00
Shane Caraveo 216d1d00a5 you know it's time to get away from the keyboard when you do this.
fix my last fix
2003-02-17 06:45:37 +00:00
Derick Rethans 738d4f401f - Style polizei 2003-02-17 06:35:13 +00:00
foobar 7e9fb9f21f - Cleaned this mess a bit:
. Centralized the functions sunrise/sunset to php_sunrise_sunset
    to lessen duplicate code.
  . Made wrapper function php_do_date_sunrise_sunset() to lessen
    duplicate code.
  . Coding style fixes.
  . renamed sunfuncs.h -> php_sunfuncs.h
2003-02-17 06:28:07 +00:00
foobar d3e006eafd - These results were obviously got with TZ=GMT
# also prefixed the test results with the tested option
# so it's easier to see which one fails..
2003-02-17 06:23:22 +00:00
foobar 6b7a822cec Assuming the results were created in system with Asia/Jerusalem as TZ 2003-02-17 05:51:03 +00:00
Shane Caraveo eb6b7e80be fix it the right way 2003-02-17 05:47:56 +00:00
foobar 1c89652590 override precision ini setting 2003-02-17 05:02:05 +00:00
Shane Caraveo 8c73b6ab70 prevent possible crash if used in combo with mod_gzip
fix command line
2003-02-17 03:39:58 +00:00
Shane Caraveo 354a7d804b If you pass NULL, you do not get a NULL value, make sure it is. 2003-02-17 03:26:16 +00:00
foobar 4e3d4e4329 - Let's be consistent with these.. 2003-02-17 03:07:33 +00:00
774900c809 NEWS update 2003-02-17 01:31:54 +00:00
f303085465 ChangeLog update 2003-02-17 01:31:42 +00:00
Wez Furlong 6e296c5cbb Move some of the streams header into supplementary files
# Just when you thought you had learned your way around the streams code;
# I like to keep you all on your toes!
2003-02-17 00:20:38 +00:00
Shane Caraveo 9b997896b3 bring up to date with change in run-tests 2003-02-17 00:19:16 +00:00
Wez Furlong f871a58783 Fix compile warning 2003-02-17 00:01:31 +00:00
Wez Furlong f0b8f6dcfb Some additional sanity. 2003-02-16 23:46:45 +00:00
Wez Furlong 83f399fed0 Add the sunfuncs to the .dsp file for Moshe. 2003-02-16 22:39:01 +00:00
Wez Furlong 8305254fe6 Update win32 project for streams juggling. 2003-02-16 22:34:40 +00:00
Wez Furlong 63c95db648 Remove unused vars 2003-02-16 22:33:29 +00:00
Moshe Doron ea8d11cc87 @ new idate() function.
@ new date_sunrise() function.
@ new date_sunset() function.
#since i have no premission updating the win32 project file, i'm sending patch on the list.
2003-02-16 22:28:01 +00:00
Wez Furlong 2cc68ad7ad Move streams files around a bit, to ease maintenance.
I will update the win32 .dsp in a moment.
2003-02-16 22:19:28 +00:00
Georg Richter fe9a33a002 fixed output 2003-02-16 21:19:32 +00:00
Zeev Suraski ac0f7d9ed0 Fix complex cases of self-assignments (bugs #21600, #22231) 2003-02-16 19:18:23 +00:00
Zeev Suraski f079bb65ff Make EG(This) and EG(scope) available to internal methods 2003-02-16 19:10:27 +00:00
Zeev Suraski 004947221e Revert patches - they weren't ready yet! 2003-02-16 18:34:48 +00:00
Zeev Suraski 372e08772d Fix initialization 2003-02-16 18:17:19 +00:00
Georg Richter 60d1b378ed fixed compiler warning 2003-02-16 18:04:29 +00:00
Ilia Alshanetsky 148fdce82d Reverted lld -> lld patch and added explanation as to why it should not be
done.
2003-02-16 17:59:30 +00:00
Georg Richter c08bfd2e3f tested patch from Zeev (fixes oo-bug in ext/mysqli) 2003-02-16 17:47:23 +00:00
Ilia Alshanetsky ad1972fae9 Moved longlong conversion to a macro. 2003-02-16 15:56:57 +00:00
Ilia Alshanetsky 2ac79528c9 better skip condition. 2003-02-16 15:47:22 +00:00
Wez Furlong 32c1eafe85 Remove bogus test.
Append mode always causes written data to go to the end of the file,
regardless of the current seek position.
2003-02-16 15:42:14 +00:00
Wez Furlong 7e92f636ef Integrate Shanes patch that allows specifying the cwd and environment
for the child process created by proc_open().
2003-02-16 15:38:54 +00:00
Georg Richter c40eff35da test for mysqli_prepare_result 2003-02-16 13:48:00 +00:00
Stanislav Malyshev 3e45b23799 add support for ::foo syntax meaning "global one" 2003-02-16 13:27:33 +00:00
Wez Furlong ce432004be Fix bcmath build under win32.
# These problems occur because winsock2.h MUST be included before
#  windows.h.
2003-02-16 12:46:16 +00:00
Stanislav Malyshev c9b2ec7be7 remove debug prints 2003-02-16 12:04:41 +00:00
Georg Richter ffe43821d0 test for mysqli_stmt_affected_rows (delete command) 2003-02-16 12:04:21 +00:00
Georg Richter 6997d50ff0 added new function mysqli_stmt_affected_rows
added bigint support for mysqli_affected_rows
fixed memleak in mysqli_prepare (stmt->is_null)
fixed return type for mysqli_connect
2003-02-16 12:03:37 +00:00
Sebastian Bergmann 6d300baf84 ZTS fixes 2003-02-16 11:34:49 +00:00
Stanislav Malyshev e77eca7568 namespace patch - static variable access 2003-02-16 11:15:30 +00:00
Stanislav Malyshev a4c3b2ce80 Namespace patch. Big changes:
1. Nested classes are gone.
2. New syntax for namespaces:
namespace foo {
	class X { ... }
	function bar { ... }
	var x = 1;
	const ZZ = 2;
}
3. Namespaced symbol access: $x = new foo::X; - etc.
For now, namespaces are case insensitive, just like classes.
Also, there can be no global class and namespace with the same name
(to avoid ambiguities in :: resolution).
2003-02-16 11:12:43 +00:00
Wez Furlong 0a18a9d744 A add much more useful select(2) implementation than is provided by
windows sockets.  The winsock implementation will only work with sockets;
our implementation works with sockets and file descriptors.
By association, stream_select() will now operate correctly with files, pipes and sockets.

This change required linking against the winsock2 library.  In terms of
compatibility, only older versions of windows 95 do not have winsock2
installed by default.  It is available as a redistributable file, and is most likely installed by any OS patches (eg: Internet Explorer) applied by the user.

Also, add a win32 compatible pipe test when opening a stream from a pipe.  This test will only work on NT, win2k and XP platforms.  Without this test, interleaved fread() and select() calls would cause the read buffer to be clobbered.  I will be working on a fix for this issue for win9x.
2003-02-16 03:48:49 +00:00
5edec2a910 ChangeLog update 2003-02-16 01:32:24 +00:00
Anil Madhavapeddy ee3e64267c fix error msg typo 2003-02-16 01:31:46 +00:00
Marcus Boerger d4fd1c07b1 - Allow long option names
- Update CLI's manpage

@Added support for long options in CLI & CGI (e.g. --version). (Marcus)

# In contrast to the preliminary patch this should work now completely.
# If all long option names are accepted we may even think about MFHing.
2003-02-16 01:23:11 +00:00
Ilia Alshanetsky 824baa0384 New feature news. 2003-02-15 22:07:49 +00:00
Ilia Alshanetsky 616578d1d1 Added feature #19645 (ini parser can now handle quoted multi-line values). 2003-02-15 22:06:45 +00:00
foobar 3a94aeae72 - Fix unsetting of open_basedir, safe_mode_exec_dir and user_dir with
"php_admin_value <ini option> none"
- Fixes bug #22220
2003-02-15 20:22:19 +00:00
Ilia Alshanetsky 9f7fbaf5c2 Proper lib detection. 2003-02-15 20:09:49 +00:00
Moriyoshi Koizumi 22517ce0de Fixed bug #22234 2003-02-15 19:56:12 +00:00
Wez Furlong e035fe14e0 If a test does not have any data after 60 seconds of waiting, assume that
it died a horrible death and kill it.
This is useful on windows when a message box is popped-up during an automated
test-run.
2003-02-15 18:09:52 +00:00
Wez Furlong 27e3d6477f Add optional signal parameter to proc_terminate. 2003-02-15 17:33:11 +00:00
Wez Furlong c3c24054e8 Add proc_terminate() function to forcibly kill off a process created
with proc_open().
2003-02-15 17:18:57 +00:00
Ilia Alshanetsky 8a07cc45cf Fixed skip condition. 2003-02-15 17:06:35 +00:00
Georg Richter e671a8c3e4 added skipif section (innodb-support) 2003-02-15 16:21:35 +00:00
Moriyoshi Koizumi b069f35022 Fixed bug #22227
Added test case for bug #22227
2003-02-15 15:57:31 +00:00
Marcus Boerger ecaeb3004a fix parameter string (-R & -H) 2003-02-15 15:20:17 +00:00
Moriyoshi Koizumi 1b79da954c Added test case for bug #22231 2003-02-15 15:15:14 +00:00
Sebastian Bergmann 3b547e6fc4 Add .cvsignore for tests. 2003-02-15 07:12:09 +00:00
8764c02ce8 ChangeLog update 2003-02-15 01:35:51 +00:00
Ilia Alshanetsky f8e0290cd6 Allow mysqli to be built when imap (c-client) is used. 2003-02-14 21:27:13 +00:00
Ilia Alshanetsky c59240d599 CS fixes. 2003-02-14 20:15:11 +00:00
Ilia Alshanetsky 43eda85d5a Fixed compile warnings. 2003-02-14 20:14:44 +00:00
Georg Richter e8fd6662ae test for bind_result with show 2003-02-14 19:49:35 +00:00
Marcus Boerger c34fde086b a little bit slower but somewhat tricky and more flexible and it does not
allocate static buffers anymore
2003-02-14 19:43:06 +00:00
Moriyoshi Koizumi 9b49146dc1 Fixed a str_replace() bug similar to bug #22224 2003-02-14 18:59:50 +00:00
Moriyoshi Koizumi b3a8349191 Fixed bug #22224 (implode changes object references in array)
Added test case for the bug
2003-02-14 18:42:36 +00:00
Ilia Alshanetsky f6e4904759 CS fixes. 2003-02-14 18:35:30 +00:00
Ilia Alshanetsky 410dd6abaf Fixed a typo. 2003-02-14 18:27:20 +00:00
Georg Richter 2841d94f02 fixed compiler warning 2003-02-14 18:18:12 +00:00
Georg Richter c544a77836 fixed a bug in mysqli_fetch
removed c++ comment (thx to Jani :)
fixed compiler warning
2003-02-14 18:17:25 +00:00
Ilia Alshanetsky 031dd997fb Missing portion of the previous patch. 2003-02-14 16:49:09 +00:00
Ilia Alshanetsky 4f1b6364f9 Buncha Fixes.
* Fixed a number of memory leaks.
 * Fixed some php_error_docref() calls that tried to print non-existent
   arguments.
 * Fixed some signed/unsigned problems.
 * Fixed the MYSQLI_FETCH_RESOURCE macro so that compilers do not complain
   about un-initialized variables.
 * CS fixes.
2003-02-14 16:45:31 +00:00
Georg Richter 14bc73defe bind_result fix 2003-02-14 16:31:51 +00:00
Georg Richter 1a7a41cf9f fixed a bug in prepare/bind 2003-02-14 16:31:22 +00:00
foobar 92279e5e06 MFB 2003-02-14 14:38:20 +00:00
Thies C. Arntzen e62f37c804 init current_execute_data befor we start executing 2003-02-14 12:25:09 +00:00
Thies C. Arntzen 52fb0d7bce ups 2003-02-14 12:05:16 +00:00
Thies C. Arntzen c1706b50bf add really nice dump_bt function for debugging in gdb 2003-02-14 12:04:03 +00:00
801210d60c ChangeLog update 2003-02-14 01:33:16 +00:00
foobar f9f4644a84 - Don't add libcrypt if the crypt() function is provided already.
(by libc, like in HP-UX)
2003-02-14 01:27:15 +00:00
Zeev Suraski 884419044b Fix error handling in illegal property access 2003-02-13 22:47:25 +00:00
Sara Golemon a9e1b5f641 MFB(r-1.68.2.5) Bug 22052 2003-02-13 22:20:21 +00:00
Marcus Boerger 0b2216e03d pass tsrmls instead of fetching it always 2003-02-13 21:41:00 +00:00
Wez Furlong f98f27ffa9 MFB: Fix for bug #22199 2003-02-13 21:08:04 +00:00
Sara Golemon d1d0d0b71a Bug #22059. ftp_chdir() causes segfault. efree(ftp->pwd) was being called without knowing for certain that ftp->pwd
actually pointed anywhere.
2003-02-13 19:48:49 +00:00
Marcus Boerger aa8dfa0b74 fix non FCGI build 2003-02-13 19:46:40 +00:00
Ilia Alshanetsky 2443adb8b5 Added test case for bug #22187. 2003-02-13 19:07:20 +00:00
Ilia Alshanetsky f9669f6c49 Modified fix for bug #22187 so that it does not affect handling of numbers
represented in scientific notation.
2003-02-13 19:02:34 +00:00
foobar e6841d6c35 Added test for those different crypt() methods. Hopefully I got the results right. 2003-02-13 18:49:57 +00:00
Georg Richter bad0ab1576 include file for test 2003-02-13 18:21:37 +00:00
Shane Caraveo a13ef6ec42 There is *absolutely no* definitive way to know if argv0 is the
actual php script, or if it is the beginning of a query string.
Additionaly, passing parameters on the command line is
not part of CGI spec, and is not required by either
Apache or IIS.  So I have removed that code altogether,
and done some further cleanup.  Also fix pre4.3 behaviour if fix_pathinfo=0.
I've tested with IIS and Apache 1.3.27 on w2k and RH 7.3.
2003-02-13 18:21:12 +00:00
Ilia Alshanetsky 55840914cb Fixed warnings. 2003-02-13 17:39:18 +00:00
Wez Furlong cddcaf737f Another IS_SLASH fix. 2003-02-13 17:36:35 +00:00
Ilia Alshanetsky 7fffe4338a Fixed bug #22207 (e notation in *printf would be missing a 0 when there is
no exponent).
Added a test case for the bug.
2003-02-13 17:25:31 +00:00
Wez Furlong cd7d762b79 A probable cure for many getcwd/relative include related problems for win32. 2003-02-13 17:20:20 +00:00
Ilia Alshanetsky 586672fd16 PAD() macro didn't increase the buffer size resulting in loss of the
padding.
2003-02-13 17:17:03 +00:00
Edin Kadribasic f0e7b24e60 Use my_ulonglong instead of unsigned long long to make msvc++ happy. 2003-02-13 17:15:22 +00:00
foobar 19dc5e03a0 change history 2003-02-13 17:01:28 +00:00
Harald Radi 3341568c09 MFB PHP_4_3 2003-02-13 16:46:53 +00:00
Edin Kadribasic fc6543e905 Adding missing .cvsignore 2003-02-13 16:38:28 +00:00
Ilia Alshanetsky 343b92e66e Fixed a typo. 2003-02-13 16:22:03 +00:00
Ilia Alshanetsky c28753de76 Simplified the mode validation code & added support for read+write mode to
'x' mode.
2003-02-13 15:09:39 +00:00
Ilia Alshanetsky f9457bf842 Added missing header needed for rpc_error(). 2003-02-13 14:54:43 +00:00
Wez Furlong 2953892df3 Clarify error message. 2003-02-13 14:52:54 +00:00
Edin Kadribasic ab4bbd51ff Initial windows project file 2003-02-13 14:46:11 +00:00
Ilia Alshanetsky f8eba6ded2 Added 'x' mode for fopen() used on local files. This mode will create a new
file only if a file does not already exist (O_CREAT|O_EXCL).
2003-02-13 14:40:17 +00:00
Wez Furlong 77b98f8615 Potential fixes for #21809 and #22099. 2003-02-13 14:35:47 +00:00
Wez Furlong 95e7c2e9ed Use FILE*-less implementation for php://(stdin|stdout|stderr) 2003-02-13 13:43:37 +00:00
Wez Furlong 35878992d8 Moving away from ANSI stdio for plain files. 2003-02-13 13:40:34 +00:00
Wez Furlong 1c3de808b9 Avoid problems with chunk_size and auto_detect_line_endings. 2003-02-13 13:38:20 +00:00
Wez Furlong b81ea669a0 cli should be allowed to have the chroot() function. 2003-02-13 13:35:55 +00:00
Wez Furlong 068c90bd1d Whitespace-fix these goto labels. 2003-02-13 11:12:56 +00:00
Wez Furlong b6c008305f Update installer so that no extensions are enabled by default. 2003-02-13 10:25:30 +00:00
Georg Richter 124f76c557 removed warnings (unused vars) 2003-02-13 08:54:46 +00:00
Uwe Steinmann 1b46eeb1cf - added more missing strcmp() 2003-02-13 07:59:24 +00:00
foobar 2f2f6739b4 Added HAVE_APACHE define. 2003-02-13 07:47:21 +00:00
foobar 7c989710a8 Merged these to 4.3.x branch 2003-02-13 07:16:19 +00:00
foobar a91a14ab16 ws fix 2003-02-13 07:02:53 +00:00
Sascha Schumann 778378dcc6 include limits.h for portability 2003-02-13 02:30:10 +00:00
Sascha Schumann 6ab6ad12a0 portability work 2003-02-13 02:24:38 +00:00
b0dd1b0eb0 ChangeLog update 2003-02-13 01:33:15 +00:00
Georg Richter 6bddc36966 new tests 2003-02-13 01:23:28 +00:00
Wez Furlong b2b3596257 Fix for Bug #21815 (fpassthru ignored buffered data but then complained anyway) 2003-02-13 01:17:45 +00:00
Georg Richter 44559a18f9 added new function int mysql_get_server_version
this function is available since libmysql change set 1.1450 (2002-02-13)
2003-02-13 00:11:17 +00:00
Georg Richter ef086ad82d changed function entries for statements 2003-02-12 21:07:28 +00:00
Ilia Alshanetsky 24a86f2064 Fixed bug #22191 (frontbase build was broken for people using older
versions).
2003-02-12 20:44:00 +00:00
Ilia Alshanetsky f924aaf647 Fixed bug #22187 (spprintf function did not handle floats correctly). 2003-02-12 20:41:53 +00:00
Sascha Schumann 0cb1ff3bda - trims +100 lines of code from spprintf.c
- introduces an overflow detection in STR_TO_DEC
    - eliminates dead code (e.g. assert(foo); if (foo) {..})
    - removes unused macros from the original code
    - simplifies code (e.g. cc was completely dropped)
    - improves run-time performance

      The max_len feature is never used in our code base.
      Nevertheless, cpu cycles were spent on each string
      operation to check the current length against max_len which
      is quite inefficient.  Thus, I've moved the check to
      vspprintf where it is applied only once per call.
2003-02-12 19:38:10 +00:00
Mark L. Woodward 8fee867865 Fix for GCC 3 2003-02-12 18:34:21 +00:00
foobar e337c5d1c6 Fixed the "member fd in BUFF" test for --with-apxs builds 2003-02-12 17:09:31 +00:00
Ilia Alshanetsky a2bd043e7b Removed zend_get_module(), this function is not used by anything and more
importantly. it does not work. It tries to find data based on numeric keys
in hash table using string keys.
2003-02-12 16:50:51 +00:00
Zeev Suraski 3c2a1255cd Fix declaration of class members that don't have an explicit access modifier 2003-02-12 16:28:34 +00:00
Derick Rethans b8ad8c9f83 - Let's add the config.m4 file too :-) 2003-02-12 16:24:41 +00:00
foobar d85cf5f1b5 added missing entry 2003-02-12 16:18:59 +00:00
Ilia Alshanetsky e1802d7228 Fixed bug #22048 (incorrect insertion of session id when tabs are used to
separate tag elements).
2003-02-12 14:56:13 +00:00
Uwe Steinmann 8c5ece1637 - Fixed compile errors and some oddities like missing strcmp 2003-02-12 11:18:43 +00:00
Georg Richter 91eeae5e1d added new tests 2003-02-12 10:40:19 +00:00
Georg Richter 2706394076 removed function mysql_num_warnings (libmysql change). 2003-02-12 10:39:06 +00:00
foobar 7788cefdd3 "Generate" the man page so that it gets correct version always. 2003-02-12 04:38:30 +00:00
foobar cd7260537a Man page is added in 4.3.1, moved this entry to branch 2003-02-12 04:08:29 +00:00
foobar 5896410c81 - Added the man page installation 2003-02-12 04:04:36 +00:00
foobar de3b1acfc3 Fix obvious errors.. 2003-02-12 03:05:28 +00:00
foobar 96a6cc11a3 news news news.. 2003-02-12 02:58:13 +00:00
405e10f6ce ChangeLog update 2003-02-12 01:31:55 +00:00
Georg Richter ff8f0eb7da adding a few tests 2003-02-12 00:46:29 +00:00
Georg Richter 7d7c07a77c initial upload 2003-02-12 00:45:53 +00:00
Sascha Schumann 1fc7f0d937 supply mandir to makefile 2003-02-11 23:46:39 +00:00
Ilia Alshanetsky 246a075624 Fixed bug #22048 (crash in imap_headers when the e-mail contains an
abnormally large number of special characters).
2003-02-11 22:57:22 +00:00
Ilia Alshanetsky 8c14bf2429 New function news. 2003-02-11 22:49:22 +00:00
Ilia Alshanetsky 53f96c8b02 Added strpbrk(), which is essentially a wrapper around C's strpbrk function
that allows searching through a string for a character list.
2003-02-11 22:47:26 +00:00
Stefan Esser a0873a8f7d size matters not. 2003-02-11 21:44:02 +00:00
Stefan Esser d2c550e991 8 + 20 + 1 + 1 = 30
There was no Bufferoverflow on 64bit systems.

And the "fix" broke the header code on systems with old style snprintf.
2003-02-11 21:41:32 +00:00
foobar fdba676769 - Fixed some weird crashes causd by the new default behaviour
of libtool 1.4.3
- Require libtool 1.4.3 or newer from now on.
2003-02-11 21:11:42 +00:00
Marcus Boerger c681320471 Make that clear 2003-02-11 20:34:24 +00:00
Marcus Boerger 7fec2a3856 Document -H added by Ilia 2003-02-11 20:31:34 +00:00
Marcus Boerger e92f8f64e3 speed up 2003-02-11 20:30:37 +00:00
Melvyn Sopacua e4a08fb43d Update time 2003-02-11 20:26:27 +00:00
Ian Holsman ec68ed4aee initial checkin of the apache2 SAPI using a handler instead of filters.
TBD: src highlighting
     better post handling
2003-02-11 17:40:11 +00:00
Ilia Alshanetsky f3ac7fc9c6 Added -H option to CLI binary. This option can be used to hide any arguments
including the script name passed to the CLI binary.
2003-02-11 16:18:42 +00:00
Zeev Suraski beaf84ea17 Fix require() handling - that's an old bug! 2003-02-11 15:41:46 +00:00
Zeev Suraski f983e13e4e Fix random crashes 2003-02-11 13:46:30 +00:00
Zeev Suraski 2814504143 Improve parser handling of 'abstract' 2003-02-11 09:48:37 +00:00
Moriyoshi Koizumi 1068156252 Fixed ZTS build 2003-02-11 03:55:08 +00:00
foobar fccbb1431b - There's no point in allowing using both --with-readline and --with-libedit
the same time. Prefer --with-readline.
- Use PHP_ADD_LIBRARY when there is no path available.
2003-02-11 03:24:30 +00:00
foobar 50fd2d5745 moved entry to branch NEWS 2003-02-11 03:07:39 +00:00
foobar 08f3bb094a - Fixed bug: #21549 (problem with Ingres II persistent connections) 2003-02-11 02:42:59 +00:00
Sascha Schumann fa6d2d48c5 move check to proper place 2003-02-11 02:34:52 +00:00
Sascha Schumann 67f18fcf6c Detect whether BUFFs contain a fd element. IBM is hiding the actual
descriptor behind a void *, so we just disable this for IBM servers
2003-02-11 02:23:29 +00:00
90ade25ad0 ChangeLog update 2003-02-11 01:31:35 +00:00
Frank M. Kromann 08b788dd44 Bug #20426. Convert SMALLDATETIME correct 2003-02-11 01:24:07 +00:00
Stig Bakken 710b20a528 * clean up so Jani is not so confused 2003-02-11 01:17:20 +00:00
Sascha Schumann e3831c2ef5 Add "log to stdout" feature 2003-02-11 00:58:54 +00:00
Harald Radi c7de5d15b7 clean up source and improve hashing for implicitly
created objects (aka return values)
2003-02-11 00:55:27 +00:00
Harald Radi be950d9c51 improved reverse lookup of ProgID based on an IDispatch pointer 2003-02-11 00:54:27 +00:00
Sascha Schumann 2393b5bfc5 update regarding session.save_path 2003-02-11 00:50:00 +00:00
Sascha Schumann a10f0830e6 support setting the filemode using session.save_path 2003-02-11 00:42:54 +00:00
Sascha Schumann 5e601732a3 use appropiate prefixes in the ps_module structure so we don't clash
with syscalls
2003-02-11 00:42:14 +00:00
foobar 5336e06016 fix news entry per for file() parameter.. 2003-02-11 00:34:35 +00:00
foobar 21390a83f0 Blah 2003-02-11 00:09:03 +00:00
foobar c68961cc7b krhm.. 2003-02-11 00:08:51 +00:00
Wez Furlong 0c70df4907 fix rpc_error call 2003-02-10 23:22:49 +00:00
Ilia Alshanetsky 53b7b0eb8c Merged the flags for the file() function into a single flag. 2003-02-10 22:26:53 +00:00
Harald Radi 5066caef31 a bunch of fixes 2003-02-10 20:59:11 +00:00
Harald Radi ef9bc6eaad s/com/skeleton/ is not always a good idea 2003-02-10 20:58:30 +00:00
Wez Furlong 0ff83111c7 byref really means that we want the zval... 2003-02-10 20:30:24 +00:00
Moriyoshi Koizumi 6d95ea199d Fixed possible snprintf problem
# besides snprintf returns int value, not uint / size_t...
2003-02-10 20:18:08 +00:00
Moriyoshi Koizumi 9450b1e4b0 Fixed possible buffer overflow in 64bit systems 2003-02-10 20:11:10 +00:00
Moriyoshi Koizumi 4fc819b9e8 dot dot dot.. 2003-02-10 19:55:18 +00:00
Moriyoshi Koizumi 57fa382b4e MFB: Fixed typo 2003-02-10 19:53:13 +00:00
Moriyoshi Koizumi 9d5811c1f0 Jani happification 2003-02-10 19:45:34 +00:00
Moriyoshi Koizumi a143bed5d8 New function
# "deprecate me!"
2003-02-10 19:39:43 +00:00
Moriyoshi Koizumi 59be236a8e Removed unnecessary code 2003-02-10 19:12:02 +00:00
Moriyoshi Koizumi 21f766b7a4 Fixed zlib.output_compression so it can work even if zlib extension is built as shared 2003-02-10 19:04:44 +00:00
Melvyn Sopacua 63aa8acf02 MFB: disable output buffering 2003-02-10 18:58:49 +00:00
Wez Furlong 447976d8ee Implement com_describe 2003-02-10 18:37:28 +00:00
foobar 011229ef15 - Updated libtool to 1.4.3 which has test for the sed problem.. 2003-02-10 17:09:48 +00:00
Zeev Suraski f196e11f42 Fix zend_initialize_class_data() 2003-02-10 16:46:05 +00:00
Zeev Suraski c17c7a2bfa Centralize class initialization 2003-02-10 16:11:24 +00:00
Jon Parise 1b8755994e Correct the spelling of 'supported'. 2003-02-10 15:46:47 +00:00
Stig Bakken 983dd29a7e * update PEAR::isError phpdoc 2003-02-10 14:27:21 +00:00
Stig Bakken 4ef53806f4 * PEAR::isError accepts second parameter that will be matched against
the error code.  PEAR::isError($obj, FOO) will return true if $obj
  is an error object, and $obj->getCode() returns FOO.
2003-02-10 14:26:19 +00:00
Stig Bakken cab18bc2de * the "a" in "pear" is "application" now 2003-02-10 14:17:32 +00:00
Wez Furlong 35639435c9 Error reporting clean up 2003-02-10 13:13:28 +00:00
Zeev Suraski 6317e26576 - Treat $this->foo inside class X as an implicit 'public $foo' if X::$foo
is not explicitly declared
- Forbid multiple declaration of the same variable
2003-02-10 12:46:58 +00:00
Wez Furlong 81795c7f11 Newly created objects should use a separate function_table from the global class entry table.
For objects instantiated via new, make sure that intern->function_table uses the newly created table when the class is registered.
For generic per-object hashing, copy the ce->function_table into intern->function_table.
2003-02-10 12:36:07 +00:00
Wez Furlong b0894e7eba Error reporting leaks and cleanup 2003-02-10 12:33:15 +00:00
Zeev Suraski 778ce2495d whitespace 2003-02-10 11:49:21 +00:00
Zeev Suraski 5e12de9510 Add missing destructors 2003-02-10 11:03:22 +00:00
Zeev Suraski 8713fdd102 Fix the test 2003-02-10 10:58:56 +00:00
Stanislav Malyshev 10b6a84b74 update static constants too 2003-02-10 10:57:14 +00:00
Zeev Suraski 3661930f14 Fix get_parent_class() 2003-02-10 10:04:08 +00:00
Zeev Suraski 029abf8c51 Restore missing check 2003-02-10 10:03:19 +00:00
Wez Furlong 79c046d8a8 Add additional optional parameter to openssl_pkcs7_encrypt to specify the
cipher.  The cipher can be one of the constants listed below.

Based on a patch from:
stefan at cuba dot ionum dot ch

 	OPENSSL_CIPHER_RC2_40,   (the default)
 	OPENSSL_CIPHER_RC2_128,
 	OPENSSL_CIPHER_RC2_64,
 	OPENSSL_CIPHER_DES,
 	OPENSSL_CIPHER_3DES,

proto bool openssl_pkcs7_encrypt(string infile, string outfile,
   mixed recipcerts, array headers [, long flags [, long cipher]])
2003-02-10 09:49:31 +00:00
Zeev Suraski dbb73d8f1e Add ability to reference self:: and parent:: in constant initializers
(bug #21849)
2003-02-10 09:45:27 +00:00
Zeev Suraski edc8e67e3b Remove redundant code 2003-02-10 08:32:44 +00:00
324ff14366 ChangeLog update 2003-02-10 01:32:53 +00:00
Hartmut Holzgraefe 769cb03c35 proto fixes 2003-02-10 00:47:45 +00:00
foobar 885a1a4d08 some win32 fixes by Kai 2003-02-10 00:21:51 +00:00
Wez Furlong 1e9eeafe21 Fix php.ini customization.
Apparently, it seems that running the php script with output captured to
the log prevented it from working correctly.

Also, deletes the php.ini when uninstalled.

TODO: The defaults install and activate all extensions.  This is a problem
for those extension that require non-bundled .dlls (such as OCI).
2003-02-10 00:20:53 +00:00
foobar b69d4c004d style, ws 2003-02-09 23:48:22 +00:00
foobar 8c596d1394 Some compilers puke on these.. 2003-02-09 23:29:56 +00:00
Harald Radi b0fb007f0f fix a memleak 2003-02-09 23:17:42 +00:00
Wez Furlong eefe0f1bb0 ZTS fix 2003-02-09 23:11:23 +00:00
foobar b30256e28b We move, fix, change or add stuff 2003-02-09 23:09:23 +00:00
Kai Schroeder eb8bccee56 fix for #17928 2003-02-09 21:44:51 +00:00
Wez Furlong 03e22793ff Fix various little leaks and segfaults.
Fix scripts like this:
$obj = new COM('Foo');
$obj2 = $obj->get_object();
$obj2->method();  // <-- would segfault here
2003-02-09 21:40:13 +00:00
Wez Furlong 9ef5cc7ef9 Add get_class_name handler so that the current var_dump implementation does not segfault.
Add a generic rpc_object_from_data() function for generating rpc objects from C code (as discussed with Harald).
2003-02-09 21:37:41 +00:00
Wez Furlong 47922a6996 Fix some warnings 2003-02-09 21:35:31 +00:00
Sascha Schumann ba32a619ae use SUCCESS/FAILURE instead of 0/-1 2003-02-09 21:15:55 +00:00
Ilia Alshanetsky 2549b1b638 New features. 2003-02-09 20:47:32 +00:00
Ilia Alshanetsky f98ea4c46d Added feature request #9173 (added stream_get_line(), this function will
read either the specified number of bytes or until the ending string is
found).
2003-02-09 20:43:05 +00:00
Ilia Alshanetsky 8b5bc3ecd3 Added feature request #17983 (optional parameter to mkdir() that makes
directory creation recursive).
Fixed prototype for file() function.
2003-02-09 20:35:54 +00:00
foobar 6a539ee3f2 order, style.. 2003-02-09 20:07:22 +00:00
Ilia Alshanetsky 4eae41915f Added feature request #14097 (option allowing file() command not to include
line endings in it's output. As well as another option, which allows blank
lines to be excluded from the output).
2003-02-09 20:05:13 +00:00
foobar 83403958ed break: First one not needed, second missing. 2003-02-09 19:57:50 +00:00
Shane Caraveo a2a014fc46 news entry for previous commit 2003-02-09 19:52:43 +00:00
foobar a09e1397c7 Fixed compile failures when ZLIB / PCRE are compiled as shared
extensions in same build.
2003-02-09 19:09:52 +00:00
foobar 7d46becbb2 Let this compile even if PCRE is compiled as shared in same build. 2003-02-09 18:47:21 +00:00
Zeev Suraski 55a66b1cb2 Fix the array() problem (and probably some other problems too) 2003-02-09 17:30:50 +00:00
foobar 8678f51835 Fixed bug #22131, enable use of shared lib with pcre. 2003-02-09 14:59:07 +00:00
Marcus Boerger 8d183b7ccc Kill some warnings
# the remainig is not easy to solve: float_var = float_cast(extpression)
# This cannot be fixed by simply casting again to float because some
# compilers may ignore the double casting.
2003-02-09 14:17:05 +00:00
Marcus Boerger 547509d546 XBM for win 2003-02-09 14:05:23 +00:00
Kai Schroeder e42339a6b4 shane added is_executable() for windows last night 2003-02-09 13:54:01 +00:00
Kai Schroeder d1338ff914 reverting to version 1.5; shane added is_executable() for windows last night 2003-02-09 13:52:46 +00:00
Kai Schroeder 390799592d newlines changed 2003-02-09 13:25:23 +00:00
Kai Schroeder f93b09b2db getopt() is currently not available on Windows 2003-02-09 13:23:50 +00:00
Kai Schroeder 11e81f89fd there are no symlinks on Windows 2003-02-09 13:20:17 +00:00
Kai Schroeder ea9101135f is_executable() does not exist on Windows 2003-02-09 13:19:23 +00:00
Kai Schroeder 6fa2536252 die() to skip second message 2003-02-09 12:34:55 +00:00
Kai Schroeder 1e24498461 MSVC's mktime() does not examine the existence of a daylight-saving-time zone 2003-02-09 12:28:01 +00:00
Kai Schroeder 745bec1c48 Windows doesn't know timezone CET 2003-02-09 12:22:18 +00:00
Kai Schroeder 93d4e6e5ed skip for Windows (does not support dates prior to midnight, January 1, 1970) 2003-02-09 12:21:47 +00:00
Kai Schroeder d6567abbf4 Windows does not support dates prior to midnight, January 1, 1970 2003-02-09 12:20:54 +00:00
Kai Schroeder 8e14c4a89f test for mktime() 2003-02-09 12:19:02 +00:00
Derick Rethans f35f5f56c4 - Whitespace fixes 2003-02-09 12:15:05 +00:00
Frank M. Kromann da56457eec cleanup variable initializations 2003-02-09 09:39:53 +00:00
Frank M. Kromann 9c161984a8 Fixing coredump when no php.ini file is used 2003-02-09 08:33:40 +00:00
Frank M. Kromann eca4eb4522 MFB 2003-02-09 07:50:56 +00:00
Yasuo Ohgaki 7f81a4a62f Fixed one more improper row offset handling. 2003-02-09 07:50:16 +00:00
Yasuo Ohgaki ac16adae0a Fixed improper result offset handling.
Prevent error when connection is broken. (optional)
2003-02-09 07:24:18 +00:00
Frank M. Kromann 62d42c2425 Bug #21707 problem with real 2003-02-09 07:18:02 +00:00
Frank M. Kromann c62983b1ec Syncronize with branch 2003-02-09 06:27:38 +00:00
Shane Caraveo 5048f8c60e is_executable() now available on win32
stats can now get information provided by access()
2003-02-09 03:49:43 +00:00
086cb15f43 ChangeLog update 2003-02-09 01:31:33 +00:00
Shane Caraveo 13c4361b97 whitespace changes 2003-02-09 00:30:49 +00:00
Georg Richter 325f9edb07 fixed zend_parse_method_param 2003-02-08 20:54:02 +00:00
Andrey Hristov f8656a71bb adding a note. 2003-02-08 19:13:04 +00:00
Andrey Hristov 550def56d5 making it compilable under ZE2 (PHP5).
NOTE : Even it is compilable there is an compilation warning because of that
handle_function_call is deprecated in ZE2 (#if 0). Look like there will is
a problem with __call().
2003-02-08 19:11:04 +00:00
Sascha Schumann a0d1331137 Fix segfault in bindtextdomain when first parameter was empty.
The Linux man page states: domainname must be a non-empty string.

Noticed by: Nils Meyer
2003-02-08 18:58:34 +00:00
Marcus Boerger 0bce257947 Style corrections
See also: Stig's intro
Version info
2003-02-08 15:29:35 +00:00
foobar b7a9ef8d80 style & ws fixes 2003-02-08 15:26:17 +00:00
Pierre Joye a5f35ef94a Add gdImageEllipse
Replace gdImageFilledEllipse by a new function (backported from
the new phpgd)
the new gdImageFilledEllipse fix bug bug #22103 (ellipse part)
2003-02-08 08:41:43 +00:00
Sebastian Bergmann e7b5c21ded zend_config.h (and its Win32 version) is already included by zend.h 2003-02-08 08:11:21 +00:00
a9181bde0c ChangeLog update 2003-02-08 01:33:01 +00:00
Ilia Alshanetsky df3662f436 The string.h is already avaliable through zend.h, so the manual inclusion
is not necessary.
2003-02-08 01:32:09 +00:00
Sara Golemon 3631b28f44 chunk_size should always be reduced to 1 while scanning response headers to avoid buffering the actual stream prior to any read calls. 2003-02-07 23:44:58 +00:00
Ilia Alshanetsky a592f3cc56 Added missing definitions. 2003-02-07 22:49:21 +00:00
Marcus Boerger 9e780033c2 Adding some text and some backslashes which are needed sometimes
somewhere...
2003-02-07 22:12:02 +00:00
Marcus Boerger 383aa3c2d1 Define STDIN/OUT/ERR for -B -R -F -E (works as expected).
Enable exit in same switches.
2003-02-07 21:55:51 +00:00
Ilia Alshanetsky d66bba099b New function news. 2003-02-07 21:45:02 +00:00
Ilia Alshanetsky 67b19b08e3 Added str_split() function. This function can be used to break down a
string into an array.
2003-02-07 21:36:18 +00:00
Ilia Alshanetsky b1a6778fe5 Added get_browser() function. This function can be used to fetch the headers
sent by the server when a request is made for a given URL.
2003-02-07 21:33:35 +00:00
Marcus Boerger 598e82751d No more maximum line size for -R and -F 2003-02-07 20:53:05 +00:00
Ilia Alshanetsky 957aeb83e3 Added a check to ensure that string.h is avaliable before trying to use it.
Thanks Andi.
2003-02-07 19:26:49 +00:00
Uwe Schindler 738b662b72 (NSAPI SAPI) Fixed _SERVER[] variables (all headers included) to be now similar to apache SAPI; with this new file the memory leaks (webserver eats up memory during a few days running) are also disappeared (all by NSAPI allocated strings are freed). 2003-02-07 18:57:40 +00:00
Ilia Alshanetsky 419108f805 Added missing header. 2003-02-07 15:39:02 +00:00
Zeev Suraski fce275eb41 Improve PPP handling of properties 2003-02-07 10:05:36 +00:00
Zeev Suraski 021d1b684b Fixlet 2003-02-07 09:39:39 +00:00
Zeev Suraski 6257d01a91 Better fix 2003-02-07 09:39:29 +00:00
Zeev Suraski ecbde70159 Fix Windows build 2003-02-07 09:32:19 +00:00
Ilia Alshanetsky ae6cc1a238 Fixed bug #15734 (Added an optional parameter to get_defined_constants(),
which if passed, will include information regarding who created the constant).
2003-02-07 03:04:26 +00:00
Dan Kalowsky cba812ef5c MFB 2003-02-07 02:59:16 +00:00
3f70695a41 ChangeLog update 2003-02-07 01:31:42 +00:00
James Cox 3d042cd923 adding news about moved ext 2003-02-06 22:38:09 +00:00
Tal Peer 724aeb8bac Moving fribidi to PECL 2003-02-06 22:23:21 +00:00
Sara Golemon 874661a66e bc_raise() can return a scale lower than that passed into it. While most other bcmath calls won't, it's safest to do a quick check that we're only
reducing n_scale, not increasing it.
2003-02-06 22:18:41 +00:00
Ilia Alshanetsky dc052fe0e5 Fixed bug #19506 (get_extension_funcs() can now retrieve a list of built-in
Zend Engine functions, if "zend" is specified as the module name).
Made get_extension_funcs() on failure.
2003-02-06 20:21:02 +00:00
Marcus Boerger fb44f1e0fb Rewrite/add some stuff 2003-02-06 20:10:52 +00:00
foobar 20f9b6d02c - Fixed bug #22088 (array_shift() leaves next index to be +1 too much) 2003-02-06 15:27:53 +00:00
foobar 073a80fbcc fix the test 2003-02-06 15:22:41 +00:00
foobar 102f8cf4c1 Added testcase for bug #22088 2003-02-06 15:04:53 +00:00
e0f41c9fda NEWS update 2003-02-06 01:33:12 +00:00
b43dd52dae ChangeLog update 2003-02-06 01:32:53 +00:00
Zeev Suraski b39b33c4c5 Fix the 2nd buglet in the error message :) 2003-02-06 00:39:58 +00:00
Zeev Suraski fc591167ad Fix check 2003-02-06 00:15:02 +00:00
Zeev Suraski 45c12359a9 Fix prototype (may have caused stack corruption) 2003-02-06 00:14:49 +00:00
Marcus Boerger 984cde3123 Add PPP method tests 2003-02-05 23:07:24 +00:00
Ilia Alshanetsky edde957038 New function news. 2003-02-05 17:57:31 +00:00
Ilia Alshanetsky f12a6b7663 Added array_walk_recursive() function that can apply array_walk recursively
to an array.
2003-02-05 17:56:08 +00:00
Zeev Suraski f660d28143 - read_property cleanup
- Implement unset/isset/empty for PPP
2003-02-05 14:27:30 +00:00
Zeev Suraski 17439aa9c4 Rework static class properties - now supports access restrictions 2003-02-05 13:35:52 +00:00
Zeev Suraski 376d63170b Add quick_exists() 2003-02-05 13:19:59 +00:00
Zeev Suraski da12870c68 Add PPP support for arrays 2003-02-05 09:41:31 +00:00
Wez Furlong 20d886da50 Credits for iconv 2003-02-05 08:15:07 +00:00
Wez Furlong f70cf60a16 Mark activescript sapi as experimental, so that the installer can
categorize it appropriately.
2003-02-05 08:12:58 +00:00
Zeev Suraski ef77e582f5 Fix buglet in error message 2003-02-05 07:46:13 +00:00
Wez Furlong 3449f4f104 Check in the prototype PHP installer for win32.
# Besides looking nice and pretty, the installer is actually smaller
# than the .zip distro:
#   PHP 4.3.0 .zip distro:  5,950,222 bytes
#   PHP 4.3.0 installer:    5,426,242 bytes
2003-02-05 07:32:22 +00:00
1b63f56e0d ChangeLog update 2003-02-05 01:33:13 +00:00
Ilia Alshanetsky acc9c13c36 Build Fix. 2003-02-05 00:41:40 +00:00
Marcus Boerger ad7facdf2b # RTFM .. and then it goes better :-) 2003-02-05 00:35:20 +00:00
Marcus Boerger c1f0159d63 First step - abrief version.
@Added man page for CLI version of PHP. (marcus)
# I was also thinking about an author section with
# The PHP Group, Edin Kadribasic, Marcus Boerger, Rasmus Lerdorf,
# Stig Bakken and Zeev Suraski beeing mentioned. Group of corse and
# the rest is listed in php_cli.c.
2003-02-05 00:12:46 +00:00
Stig Bakken fdd9735359 * replace @bin_dir@ in pear.bat 2003-02-04 22:46:40 +00:00
Andi Gutmans 8603feb6fa - Please follow coding standards (this isn't java :) 2003-02-04 21:07:40 +00:00
Marcus Boerger 1af77be5fd fix ZTS build 2003-02-04 21:01:54 +00:00
Ilia Alshanetsky 13f8b211c4 Fixed compilation of Apache & Apache Hooks SAPIs. 2003-02-04 20:54:17 +00:00
Marcus Boerger afc673b61d remove it then....this forces to put work in man page ... 2003-02-04 20:52:13 +00:00
Sara Golemon 3eab32163c Bug#13551 bcmath functions should not apply scale to arguments, only to result 2003-02-04 19:03:30 +00:00
Ilia Alshanetsky a89a651a46 Made the row parameter in pg_result_seek() non-optional, the current
implementation would result in random behavior if the 2nd argument is not
passed.
Fixed bug #22042 (pg_result_seek() would never seek to the 1st row in the
result due to always seeking to row next to the one requested).
Removed dead code from pg_result_seek().
2003-02-04 18:34:00 +00:00
Zeev Suraski e1179a4d40 Missing update 2003-02-04 14:12:59 +00:00
Zeev Suraski 3a1a209baf Updates reflecting infrastructure changes 2003-02-04 13:12:48 +00:00
Zeev Suraski 471947b188 Reimplement PPP properties 2003-02-04 12:12:34 +00:00
Uwe Steinmann be3908cc8e - fixed some prototypes and folding 2003-02-04 10:57:35 +00:00
Uwe Steinmann e27c4c622e - fixed prototype of pdf_get_buffer() 2003-02-04 10:23:12 +00:00
foobar b070348672 NEWS ordering.. 2003-02-04 10:08:41 +00:00
a54609dc05 NEWS update 2003-02-04 01:32:24 +00:00
ccb1235482 ChangeLog update 2003-02-04 01:32:15 +00:00
Hartmut Holzgraefe 2546f09b08 proto-fix 2003-02-03 23:36:19 +00:00
Ilia Alshanetsky 0d2368554a Fixed bug #22017 (non descriptive error to appear when timestamp passed to
date() has value < 0. Win32 does not support timestamps prior to midnight
(00:00:00), January 1, 1970).
2003-02-03 22:48:26 +00:00
Ilia Alshanetsky d89c38961b Make putenv() return a proper error rather then NULL when invalid argument
is passed.
2003-02-03 21:48:36 +00:00
Ilia Alshanetsky 065e4d6550 Fixed bug #22022 (Crash in imap_mail_compose() if the body is an empty array). 2003-02-03 21:24:32 +00:00
Ilia Alshanetsky b0924da0cf Fixed bug #22031 (Made curl_write() & curl_write_header() binary safe). 2003-02-03 20:56:23 +00:00
Moriyoshi Koizumi 47f6ed8dbb Trivial test adjustment 2003-02-03 20:29:07 +00:00
Moriyoshi Koizumi 0ae9394c39 zend_get_parameters_* => zend_parse_parameters 2003-02-03 20:25:25 +00:00
foobar 591c485045 Fix bug: #22035 (EXTRA_LDFLAGS for AIX not correct) 2003-02-03 17:35:10 +00:00
foobar 07a9729071 - Fixed bug: #21998 (array_pop() did not reset the current array position)
# This behaves now same as in PHP 4.2.3
2003-02-03 16:57:02 +00:00
foobar 7147949a4e Correct description of the problem 2003-02-03 16:52:04 +00:00
Moriyoshi Koizumi a4fe845aba Really fixed proto.
# sorry for messing
2003-02-03 16:46:45 +00:00
Moriyoshi Koizumi 2a92efdaf9 Oops! wrong commit. Reverting... 2003-02-03 16:45:56 +00:00
Moriyoshi Koizumi e58e11743a Fixed proto 2003-02-03 16:44:28 +00:00
Moriyoshi Koizumi e2c4dffae0 Modified the test so it will be skipped under ZE1.
Thanks Kai
2003-02-03 16:38:22 +00:00
Moriyoshi Koizumi 0eb1c407b2 Added missing "?>" 2003-02-03 16:33:13 +00:00
Moriyoshi Koizumi e5a4b5b2dc Fixed test case for mb_strpos().
# the third parameter should specify an offset but an encoding name
2003-02-03 16:16:37 +00:00
foobar 8040659c00 Make these configure messages differ from the regular apache configure 2003-02-03 15:42:11 +00:00
Moriyoshi Koizumi aded4d818a Added test case for bug #21961 2003-02-03 14:02:21 +00:00
foobar be83a02b8c This cause some warning/error in AIX 2003-02-03 13:08:08 +00:00
foobar 173b9493e2 Fixed bug: #22011 (-n must ignore all ini files) 2003-02-03 12:25:28 +00:00
Derick Rethans db0897161c - Make VIM highlighting happy 2003-02-03 12:14:13 +00:00
foobar 8e673a3fa0 Test that libgds actually exists. 2003-02-03 11:45:44 +00:00
foobar 1887456484 ws 2003-02-03 09:55:09 +00:00
Sebastian Bergmann 0026239c6a Build fix. 2003-02-03 09:42:53 +00:00
Sebastian Bergmann b4cfff0403 Fix ZTS build. 2003-02-03 07:41:05 +00:00
foobar bb97dfaccb Added test for bug #21998 2003-02-03 06:43:08 +00:00
Stig Bakken 427fafaac0 * 1.1 release notes update
* added some <provides> elements
2003-02-03 02:55:47 +00:00
Stig Bakken e756a253d9 * start using the source tokenizer 2003-02-03 02:54:39 +00:00
95613086e1 NEWS update 2003-02-03 02:21:52 +00:00
c1ca3a801f ChangeLog update 2003-02-03 02:19:31 +00:00
Stig Bakken 1e14f2de8b * substitute @php_dir@ in pear.in 2003-02-03 01:00:10 +00:00
Marcus Boerger 63d4f31604 - Added -B, -F, -R, -E for line by line std in processing.
- Added some error messages.
- Added more -h info.
@Added command line parameters -B, -F, -R and -E which allow to process
@stdin line by line (See php -h for more). (marcus)
#This allows to simply complex command line constructs...
2003-02-03 00:22:28 +00:00
Harald Radi c4528f82a0 extend the parameter parsing API by two functions
for parsing method parameters with automatic
detection if the function was called as such or as
a class method (with a valid this ptr).
if called as a function the first parameter has to be
the object it is operating on, if called as a method
this is used.

#not yet testet, only commiting so that georg can
#continue working on ext/mysqli
2003-02-02 23:30:14 +00:00
Ilia Alshanetsky ccf8365baa Fixed bug #22021. 2003-02-02 23:09:24 +00:00
Ilia Alshanetsky 923ae6ca3e Gave the user the ability to specify encoding of the request.
Patch by jens@mermaidconsulting.dk.
2003-02-02 20:56:51 +00:00
Ilia Alshanetsky 87a113f5c1 Fixed build on Solaris (patch by Melvyn Sopacua). 2003-02-02 20:26:46 +00:00
Sebastian Bergmann 7ed0972683 Fix warning. 2003-02-02 18:50:42 +00:00
Zeev Suraski 31196cf679 whitespace 2003-02-02 16:29:42 +00:00
Zeev Suraski 61bd944b32 Core rearrangements - move Zend Objects specific code to their
specific implementation file
2003-02-02 16:17:25 +00:00
Zeev Suraski 53060ef869 Fix phpinfo() display of Zend extensions 2003-02-02 15:53:04 +00:00
Andi Gutmans 87f4472afb - Fix warning 2003-02-02 05:20:31 +00:00
Marcus Boerger 1d9477f386 - new xbm support
@Added XBM support for bundled gd library. (marcus)

# It was enabled by the last commit and fixed by this one.
2003-02-02 01:34:54 +00:00
28f76a2a4d NEWS update 2003-02-02 01:34:05 +00:00
af2bfa03bf ChangeLog update 2003-02-02 01:33:42 +00:00
Marcus Boerger 3e675c1cf4 avoid warnings 2003-02-01 23:38:29 +00:00
Marcus Boerger 07246c2f99 Bundled version has XBM support as well as external.
# Now fix the shit behind it...
2003-02-01 23:25:14 +00:00
Marcus Boerger 129bd74b45 Show if XPM support is available & Set availability bit only when available. 2003-02-01 23:23:59 +00:00
Marcus Boerger 27ccc66518 @Added XBM support for GetImageSize(). (helly) 2003-02-01 23:14:13 +00:00
Marcus Boerger 895c27d3fc Change DBM detection order 2003-02-01 22:19:04 +00:00
Marcus Boerger 0319e63775 - unify configure mechanisms (include file handling)
- fix dbm
- allow dbm to be based on gdbm
2003-02-01 18:59:59 +00:00
Melvyn Sopacua c4eecf9199 Make it easier to diff results of several runs in one day. 2003-02-01 13:28:32 +00:00
foobar 9cff741d04 Correct required mcrypt version 2003-02-01 12:49:35 +00:00
Melvyn Sopacua 6f20f44712 Fix Bug #21892 (links to apache2 install instructions missing)
# and stop nicos from bitching
2003-02-01 11:18:53 +00:00
Martin Jansen 447bd814a2 * displayLine() is deprecated, so better use displayError() here. 2003-02-01 09:36:17 +00:00
Sebastian Bergmann 729e470ced Fix build. 2003-02-01 07:32:09 +00:00
Wez Furlong 84f83e8559 Don't assume that objects have class entries (in the ZE1 sense) when
determining the class name.
Additionally, don't assume that objects have a properties hash either.
2003-02-01 03:52:31 +00:00
foobar 333406bdc2 - Added some missing CVS $Id$ tags, headers and footers. 2003-02-01 01:49:15 +00:00
bdb1c0cf86 ChangeLog update 2003-02-01 01:32:52 +00:00
Melvyn Sopacua f20d394e2d Require 2.5.6+
MFB: Be -ltdl aware
2003-01-31 23:01:36 +00:00
Ilia Alshanetsky 31a3135014 Fixed bug #21986 (openssl test failure). 2003-01-31 22:15:56 +00:00
Marcus Boerger 0629bdb061 Shared dba requires at least db-3.3 2003-01-31 20:06:44 +00:00
Marcus Boerger 037986db20 Fix proto 2003-01-31 19:12:23 +00:00
Frank M. Kromann b079cc2af5 Rename script.
Add check for CLI version
2003-01-31 18:51:28 +00:00
Sascha Schumann bea6ff5183 Unbreak $Id tag 2003-01-31 16:24:12 +00:00
foobar 190db955ba Moved these entries to PHP_4_3 branch NEWS (for 4.3.1) 2003-01-31 14:23:18 +00:00
foobar e9a132f223 No c++ comments.. 2003-01-31 14:18:50 +00:00
Moriyoshi Koizumi b00cc4f2bb Fixed a mb_send_mail() bug that has been reported in php-i18n@lists.php.net
See http://lists.php.net/article.php?group=php.i18n&article=427
2003-01-31 14:15:49 +00:00
Sascha Schumann 9233627887 Remove obsolete warning 2003-01-31 07:44:17 +00:00
Sara Golemon 81797baed4 Add ftp_raw() to send raw command strings to an FTP server. 2003-01-31 04:54:57 +00:00
Frank M. Kromann ff605d071f Use platform specific extension. 2003-01-31 03:45:13 +00:00
Frank M. Kromann 04abd3af69 Dtandard visual studio project for ext_skel 2003-01-31 03:44:55 +00:00
Frank M. Kromann 941dc7260d Wrapper script to use ext_skel on Win32 2003-01-31 03:44:20 +00:00
9e95db3769 ChangeLog update 2003-01-31 01:33:19 +00:00
Ilia Alshanetsky 7a3c54fc36 Fixed compiler warning regarding signed/unsigned int comparisons. 2003-01-30 23:36:08 +00:00
Ilia Alshanetsky 242a9a47c7 Fix compiler warning. 2003-01-30 22:37:50 +00:00
Marcus Boerger 302f97abbc Revert this part, the new one adds more problems than it solves. 2003-01-30 21:36:05 +00:00
Sascha Schumann 4cf174cbd4 Fix sticky EOF problem
Sometimes streams signal a temporary EOF, because all current data
has been consumed. But that does not preclude the possibility that
more data will become available later.

Thus we must not treat eof in the read path as final.

Now, "tail -f" like scripts work again.
2003-01-30 21:06:34 +00:00
Sara Golemon 65146ceb26 Unify str_replace and str_ireplace using INTERNAL_FUNCTION_PARAM_PASSTHRU -- reduce codebase/maintenance complexity 2003-01-30 20:09:19 +00:00
foobar 21803056b5 fix bug: #21945 (zts build failed) 2003-01-30 19:30:13 +00:00
Marcus Boerger f2ff4678cd Allow to link against chosen modules correctly 2003-01-30 18:28:42 +00:00
Sara Golemon 37ff98978b Feature Request # 5919 - Addition of str_ireplace()
Also removed deprecated BM str replace menthod
Also rewrote php_str_to_str to use more processor/memory efficient method (ilia)
2003-01-30 05:00:41 +00:00
Harald Radi 54c73d1ccb fix non-zts build for wez 2003-01-30 03:15:52 +00:00
Ilia Alshanetsky 453368afdf Removed pointless checks. 2003-01-30 02:33:16 +00:00
e3672e49fc ChangeLog update 2003-01-30 01:32:27 +00:00
Ilia Alshanetsky 62db0b4854 Fix ZTS build. 2003-01-30 00:44:56 +00:00
Stig Bakken 9c5ff64992 * Windows fix (thanks to paj) 2003-01-29 21:42:54 +00:00
Ilia Alshanetsky ebf13bc940 Added sanity checks. 2003-01-29 19:33:38 +00:00
Maxim Maletsky 808cb3ad74 Added myself to the maintainers list. 2003-01-29 18:31:48 +00:00
Stanislav Malyshev 03f88ac2b2 Add additional stage to post-session cleanup.
We need separate cleanup stage because of the following problem:
Suppose we destroy class X, which destroys function table,
and in function table we have function foo() that has static $bar. Now if
object of class X was assigned to $bar, its destructor will be called and will
fail since X's function table is in mid-destruction.
So we want first of all to clean up all data and then move to tables
destruction.
Note that only run-time accessed data need to be cleaned up, pre-defined
data can not contain objects and thus are not probelmatic.
# Looks like we are having a lots of pain in the various parts of the body
# because of the destructors...
2003-01-29 17:54:48 +00:00
Edin Kadribasic 6b203c70a3 Be more consistent with the sapi internal name. 2003-01-29 15:41:42 +00:00
Edin Kadribasic ca0b63e420 Enable embedded code using sapi/embed to use dl(). 2003-01-29 15:39:10 +00:00
Zeev Suraski 4b97a8dffd Code rearrangements 2003-01-29 15:02:57 +00:00
Stanislav Malyshev f73def91ed Fix object destructors:
zend_objects_store_call_destructors is not used anymore, we rely on
symbol tables cleaners to destroy all objects.
2003-01-29 14:33:18 +00:00
Stanislav Malyshev 683cf733bd extra safety 2003-01-29 14:27:40 +00:00
Stanislav Malyshev 123d8f782f fix memory leak 2003-01-29 14:25:53 +00:00
Zeev Suraski 8f52bf6835 Fix assignments to $this.
Fixes the 'make install' problem reported on php-dev
2003-01-29 08:55:12 +00:00
foobar 5c81fcfe70 NEWS police is back. 2003-01-29 07:50:09 +00:00
b98d46baf2 ChangeLog update 2003-01-29 01:31:55 +00:00
Harald Radi f8e014b228 MFPHP_4_3 2003-01-29 00:49:09 +00:00
Ilia Alshanetsky e6170c0b30 Added part of strpos commit that never made it in for some reason.
# Thanks Pollita.
2003-01-29 00:07:01 +00:00
Ilia Alshanetsky 835e6481e4 Fixed bug #17868 (more then the <!--include--> directive used to include
a PHP file would result in a crash).
2003-01-28 16:34:21 +00:00
Derick Rethans 1ca8d7d4c3 - Fix includes 2003-01-28 16:05:34 +00:00
Ilia Alshanetsky 4fe6fc8b0b Fixed compiler warning. 2003-01-28 16:04:10 +00:00
Edin Kadribasic 5b387760de Call correct module startup function (not a hard coded one) allowing
startup override.
2003-01-28 13:54:42 +00:00
Zeev Suraski 49fd225238 Fix a ticks related crash 2003-01-28 11:34:24 +00:00
Zeev Suraski 9f1516f556 Get rid of php4ts.dsw - replaced by php5ts.dsw 2003-01-28 11:22:44 +00:00
foobar 20c43285f7 - Fixed bug: #13561 (--without-pear prevents install of phpize, php-config) 2003-01-28 10:59:12 +00:00
foobar 41d6e9af8d Fix configure. (typo?) 2003-01-28 10:55:36 +00:00
Edin Kadribasic c8eb148368 Expose php_embed_module struct (and make Wez happy). 2003-01-28 10:49:56 +00:00
Melvyn Sopacua ac3dc9d95e Fix parse error and edink's fear of bison errors 2003-01-28 10:04:17 +00:00
Zeev Suraski 6155a1fa24 Allow methods in parent classes to call protected methods in derived
classes
2003-01-28 09:44:18 +00:00
foobar 68ffe71a12 fix some typos 2003-01-28 06:56:32 +00:00
foobar c96fe825b8 fix typo 2003-01-28 06:52:09 +00:00
Marcus Boerger 1ab64d2b96 - fix this: els is optional but may not be empty 2003-01-28 06:27:01 +00:00
Frank M. Kromann 0e38fedcd7 Fix the setting of computer name and processor type for php_uname() on Win32 2003-01-28 05:02:12 +00:00
foobar 9a0f98869c - Removed unnecessary makedist.ZendEngine2
- Modified makedist to use php5 CVS module (alias)
2003-01-28 02:49:35 +00:00
Ilia Alshanetsky 2d0f432490 Added scandir() function, which allows quick retrieval of all files &
directories within the specified path and sort the output in alphabetical
or reverse alphabetical order.
2003-01-28 01:48:57 +00:00
38a3f33625 NEWS update 2003-01-28 01:34:15 +00:00
90f9f62665 ChangeLog update 2003-01-28 01:33:49 +00:00
Ilia Alshanetsky d92a1f4dc1 Fixed win32 build (bug #21506).
Fixed a bug that would cause garbage data to appear at the end of the
loaded apache modules list in phpinfo().
2003-01-28 01:25:34 +00:00
foobar 946032f40b - Cleaned up and made less error-prone
- Changed --enable-mime-magic -> --with-mime-magic[=FILE] to allow
  specifying of the file during configure.
2003-01-28 01:00:15 +00:00
Ilia Alshanetsky b9a7918c43 2nd part of Sebastian's patch. 2003-01-28 00:42:54 +00:00
Edin Kadribasic 7c283f80be Adding new files to the project.
# First half of Sebastian's patch, Ilia will commit the second part shortly
2003-01-28 00:32:15 +00:00
Marcus Boerger 2b5a5ca669 - fix "--without-flatfile"
- simplify Berkley DB verison check
2003-01-28 00:10:05 +00:00
Ilia Alshanetsky d59d500af7 Moved the scandir code into it's own files so that it can be used by other
OSes where libc does not have a native scandir() implementation.
2003-01-27 20:39:31 +00:00
Maxim Maletsky e4ec7372e9 This fixes "warning C4101: 'charsetid' : unreferenced local variable" on VC6 2003-01-27 20:05:48 +00:00
Maxim Maletsky 897a708c87 @- Fixed bug #17448 (Print the message when OCI_SUCCESS_WITH_INFO is returned).
(Maxim)
2003-01-27 19:52:11 +00:00
Sara Golemon d0cb097c52 Fix potential buffer overflow. 2003-01-27 19:51:50 +00:00
Ilia Alshanetsky 9bb3dc6903 Removed pointless checks. 2003-01-27 17:22:22 +00:00
Edin Kadribasic c7441b2379 Fixed bug #21597 (made glob() understand windows paths) 2003-01-27 16:29:47 +00:00
Stanislav Malyshev 3a4ace13b4 Replace MAKE_VAR opcode with special 'data' opcode
This opcode is not executeable but only holds data for opcodes
that need more than two arguments (presently only ASSIGN_OBJ and the ilk but
in the future also ASSIGN_DIM)
2003-01-27 15:13:01 +00:00
Uwe Steinmann c375b0b05c - fixed several bugs in hw_document_xx() functions. The macro to access
the document was the same as for a link to the sever.
2003-01-27 09:11:17 +00:00
Sara Golemon 761fa96412 Feature Request #21748. Added function ftp_chmod(). 2003-01-27 02:54:12 +00:00
e9833ff497 ChangeLog update 2003-01-27 01:31:58 +00:00
Moriyoshi Koizumi 6174d2b446 Updated test so it describes the problem more clearly. 2003-01-27 01:15:14 +00:00
Stig Bakken d250e7ba9d * whoops, heritage shows through :) 2003-01-26 23:54:19 +00:00
Sascha Schumann 0ceb4a93b2 Replace snprintf() call using zend_error's capabilities 2003-01-26 23:15:30 +00:00
Marcus Boerger 494bec466b Simplify 2003-01-26 17:17:44 +00:00
Sander Roobol e9d0a58cb0 Fix build 2003-01-26 09:13:31 +00:00
Shane Caraveo 33ad63ef8c normalize CGI variables to the CGI spec
PATH_INFO and PATH_TRANSLATED are correct now
SCRIPT_FILENAME now contains the full path to the script
2003-01-26 03:39:50 +00:00
Shane Caraveo 82f6cef483 Fix broken build by adding scandir and alphasort for win32 2003-01-26 01:39:18 +00:00
436ad07b98 ChangeLog update 2003-01-26 01:32:24 +00:00
Sara Golemon 3ad9839f2f Feature Request #21784 Added: imagecolorallocatealpha (pollita@php.net,jasper@pointless.net) 2003-01-26 01:15:02 +00:00
Shane Caraveo 1a4c82e014 fix bug 21261
putenv on some platforms requires we provide the memory
    cleanup env parsing logic
fix bug 21367
    missed optargs in a previous patch
2003-01-25 22:01:53 +00:00
Ilia Alshanetsky 8d352d2dd6 Fixed bug #21625 (When scanning a directory for ini files, do so in
alphabetical order. This gives a user a way to control the order in which
the ini files are loaded).
Fixed a bug that would make the code try to read files without an extension
as ini files.
2003-01-25 21:13:00 +00:00
Marcus Boerger 564788b6f5 The builtin version was always used even if configured otherwise. 2003-01-25 19:46:58 +00:00
Marcus Boerger a7d10f8aa4 Bug #21751: Part one never let this happen again... 2003-01-25 19:45:11 +00:00
Ilia Alshanetsky ef021e8964 Removed unneeded code. 2003-01-25 18:55:07 +00:00
Hartmut Holzgraefe 974ff24e80 - mime file parser messages only with mime_magic.debug=On (default: off)
- fix docref URL in startup error messages
- show status in php info, either "enabled" or "..., disabled"
2003-01-25 16:25:37 +00:00
Hartmut Holzgraefe 6a4a858294 preparations for making magic file parser silent 2003-01-25 13:33:29 +00:00
Hartmut Holzgraefe f95759b36a suggesting a plain magic file insteat of a mime one is a bad idea 2003-01-25 10:51:04 +00:00
32d7d07c0e ChangeLog update 2003-01-25 01:31:13 +00:00
Stig Bakken dd22d65e2f * not a real test, just a script for displaying OS_Guess output 2003-01-25 00:45:13 +00:00
Stig Bakken d19bd6f12c * add glibc version detection for Linux 2003-01-25 00:44:41 +00:00
Stig Bakken a46aac36ec * typo 2003-01-25 00:38:00 +00:00
Ilia Alshanetsky efae1b9ace Fixed a typo. 2003-01-25 00:25:32 +00:00
Ilia Alshanetsky 758ea308a9 Fixed compiler warning. 2003-01-25 00:23:03 +00:00
Sascha Schumann 330740f7cd Remove ugly netware hacks from the code 2003-01-24 23:57:32 +00:00
Ilia Alshanetsky e10f20924e Removed unnecessary checks. 2003-01-24 22:58:46 +00:00
Dan Kalowsky b48d709746 Patch for bug #21844 2003-01-24 22:40:38 +00:00
Ilia Alshanetsky 383171b11b Fixed bug #21533 (a rare condition where error can remain undefined and
result in undefined behavior when it is used without being initialized).
2003-01-24 19:23:53 +00:00
Ilia Alshanetsky 417ba55c1f Fixed bug #21865. 2003-01-24 19:15:54 +00:00
foobar 142da0ed58 Fix bug #21795, Undeclared statement in oci8.c (OCI_ATTR_STATEMENT) 2003-01-24 17:51:19 +00:00
Ilia Alshanetsky 6efe008598 Fixed compile warning. 2003-01-24 16:45:34 +00:00
Ilia Alshanetsky d2162b32b1 Fixed compile warning. 2003-01-24 16:39:49 +00:00
Ilia Alshanetsky f163a4d16b Fixed a memory leak.
zend_error -> php_error_docref.
2003-01-24 16:34:20 +00:00
Ilia Alshanetsky 38ad0e9104 zend_error -> php_error_docref. 2003-01-24 16:29:40 +00:00
Ilia Alshanetsky 95bfbfe1c1 Fixed compile warning. 2003-01-24 16:23:11 +00:00
Andrey Hristov 600fce5890 Resolving problem on OSF1 and probably other
64 bit platforms. Thanks for the feedback of Magnus (novell kiruna se).
2003-01-24 13:18:08 +00:00
Andrey Hristov 1d0214bee4 Adding cast. 2003-01-24 12:19:59 +00:00
foobar 4dfc7cc87c - Fixed stupid typo..
# I will test before commit, I will test before commit...
2003-01-24 10:12:55 +00:00
foobar e771bdb23d Fixed bug: #20857, snmpset() fails 2003-01-24 09:52:46 +00:00
foobar 45f1f1711d ws fixes 2003-01-24 09:40:53 +00:00
foobar 84e5fcb5de MFB, removed unused GET/POST entries 2003-01-24 05:56:55 +00:00
Ilia Alshanetsky 4fde1b8de1 zend_error() -> php_error_docref(). 2003-01-24 05:21:08 +00:00
d3319d1b07 ChangeLog update 2003-01-24 01:32:58 +00:00
Moriyoshi Koizumi ad86154d90 Added test case for bug21849.phpt 2003-01-23 23:22:23 +00:00
Sebastian Bergmann 459fb4f319 TODO for PHP 5. 2003-01-23 23:22:01 +00:00
Moriyoshi Koizumi cfbd0bb58a Really fixed the mb issue of mb_ereg_replace()
# my previous patch is somewhat wrong
2003-01-23 20:38:44 +00:00
Moriyoshi Koizumi 3e7b832895 Fixed a mb_ereg_replace() bug; the function was not completely multibyte-safe. 2003-01-23 20:07:39 +00:00
Moriyoshi Koizumi d4f59af5be Fixed typo 2003-01-23 19:31:02 +00:00
Moriyoshi Koizumi 4199484313 Changed the test's file name as per the convention 2003-01-23 19:28:39 +00:00
Moriyoshi Koizumi 8dfb2df649 Renamed the test name as per the convension 2003-01-23 19:21:51 +00:00
Moriyoshi Koizumi 6fc22aa5d9 Test name formatting 2003-01-23 19:07:25 +00:00
Moriyoshi Koizumi 7abc6e4338 Made the test's name more descriptive 2003-01-23 19:00:06 +00:00
Moriyoshi Koizumi 0344311bde Removed pointless checks 2003-01-23 18:48:43 +00:00
Moriyoshi Koizumi 24ae309037 Added test case for bug #21732 2003-01-23 18:22:55 +00:00
Zeev Suraski 76c93412d3 Let the scope propagate to internal functions 2003-01-23 16:40:30 +00:00
foobar e1c985d9a7 Fix bug: #21817 (only enable this if --with-kerberos is used) 2003-01-23 16:29:49 +00:00
Zeev Suraski cee6216c4f Fix .dsp 2003-01-23 09:35:02 +00:00
foobar 9b2525f96e remove this stupid highlight which causes trouble. 2003-01-23 06:42:43 +00:00
foobar 04eca7536c MFB 2003-01-23 06:23:08 +00:00
foobar 895a3a109f Correct default path 2003-01-23 05:33:11 +00:00
foobar 7a93625e4c Fixed bug: #14542, register_shutdown_function() timeout problem 2003-01-23 05:15:42 +00:00
foobar 80923f933d Added test for bug: #21513 2003-01-23 03:28:41 +00:00
ae55ffe7bf ChangeLog update 2003-01-23 01:33:39 +00:00
Ilia Alshanetsky 6bf2ce3429 Removed non-needed code. 2003-01-22 22:07:22 +00:00
Anil Madhavapeddy dea44dfc9a typo 2003-01-22 20:41:28 +00:00
Frank M. Kromann 66ee5dfac2 adding missing zlib.lib and path to bindlib 2003-01-22 20:13:11 +00:00
Ilia Alshanetsky d24148f3d0 Fixed a crash when invalid color is passed to imagepstext(). 2003-01-22 19:53:29 +00:00
Stanislav Malyshev d433a62ef4 some small refinements for get_class_* 2003-01-22 14:55:01 +00:00
Ilia Alshanetsky 72cd67b3ca Fixed bug #21814 (Allow booleans to be used as array keys). 2003-01-22 14:48:30 +00:00
d4d46ac352 ChangeLog update 2003-01-22 01:33:11 +00:00
Moriyoshi Koizumi 812a419019 Oops! wrong patch. Reverted. 2003-01-21 22:09:09 +00:00
Moriyoshi Koizumi ce5df6d949 Fixed mb_ereg_replace() bug (the function has ignored the default option) 2003-01-21 22:03:29 +00:00
Moriyoshi Koizumi da45161bd2 Added test case for bug #21800 2003-01-21 19:38:08 +00:00
Moriyoshi Koizumi 9a723fcb4e Fixed mb_ereg_search() segfault that occurs when the function is called
before a string to be searched is passed by mb_ereg_search_init()
2003-01-21 19:31:07 +00:00
Andrey Hristov bd55130077 increasing readability. 2003-01-21 17:37:59 +00:00
Ilia Alshanetsky dc150fd2ea getParameters -> zend_get_parameters_ex. 2003-01-21 15:27:39 +00:00
Ilia Alshanetsky 8a9e09a44a ARG_COUNT(ht) -> ZEND_NUM_ARGS(). 2003-01-21 14:56:40 +00:00
Stig Bakken 832545d97f * PEAR_Error now supports exceptions when using Zend Engine 2. Set the
error mode to PEAR_ERROR_EXCEPTION to make PEAR_Error throw itself
  as an exception (invoke PEAR errors with raiseError() or throwError()
  just like before).
2003-01-21 13:32:34 +00:00
Sascha Schumann 294e776d95 add sapi_get_target_uid/_gid for obtaining information about the
non-privileged user the web server is running as.  this is useful
for creating shared memory segments which need to be accessed by
the child processes/threads.
2003-01-21 11:03:58 +00:00
foobar 961c9856ef Fixed bug: #21698, httpd.conf not modified with "make install" 2003-01-21 06:02:19 +00:00
Edin Kadribasic ceb597ea1a Added missing warning about experimental nature of sapi/embed. 2003-01-21 02:46:07 +00:00
Pierre Joye 9ad850637e Remove the (c), in the future, can we add PHP Licence terms for the new
functions ?
2003-01-21 02:10:19 +00:00
Pierre Joye 81c68ab8d5 Add credits to my functions (thx for the advice Wez&Ilia :) 2003-01-21 01:49:34 +00:00
88e5482def ChangeLog update 2003-01-21 01:33:07 +00:00
Sterling Hughes d3f04d8ecc fix by phanto to the cloning 2003-01-21 00:00:38 +00:00
Ilia Alshanetsky 053023a71e quota function fixes. Thanks Wez. 2003-01-20 21:28:09 +00:00
Ilia Alshanetsky 20925f97b9 Changed php_error to php_error_docref.
Removed pointless memory allocation checks.
Memory leak fix inside quota functions.
2003-01-20 19:41:58 +00:00
Moriyoshi Koizumi e3e364f77b Fixed bug #21758 2003-01-20 16:45:21 +00:00
Ilia Alshanetsky aa8b1d6db3 Restore php_error -> php_error_docref patch. 2003-01-20 16:15:18 +00:00
Sascha Schumann aca939a0ab test commit 2003-01-20 15:07:20 +00:00
Derick Rethans f1ba2137c0 - Add credits for Magnus 2003-01-20 12:34:07 +00:00
foobar f6cee90129 Add test for png.h 2003-01-20 10:39:29 +00:00
Mark L. Woodward 7eeea7e55d Updated for Msession 1.2.
Includes new APIs
2003-01-20 03:16:24 +00:00
11aebf74bb ChangeLog update 2003-01-20 01:32:16 +00:00
Ilia Alshanetsky 2292a652a6 ZTS fix. 2003-01-19 23:32:22 +00:00
Zeev Suraski 4c8473d619 relabel 2003-01-19 21:37:40 +00:00
Stanislav Malyshev dce8267f35 Restore for now old statics behaviour (so that indirect $$var references would work again). Comprehensive fix will follow later. 2003-01-19 17:25:39 +00:00
Moriyoshi Koizumi dfbfa1a36f Improved the patched part to prevent further potential bugs 2003-01-19 17:23:48 +00:00
Ilia Alshanetsky 2efab7a22a fixed typos 2003-01-19 15:01:34 +00:00
Derick Rethans 5eb912554d - Moved to http://qa.php.net/write-test.php 2003-01-19 14:22:19 +00:00
Harald Radi b51b6f0fbf ini patch to allow 'entry[] = value' entries 2003-01-19 12:18:46 +00:00
Harald Radi 697398e18e ini patch to allow 'entry[] = value' entries 2003-01-19 12:01:38 +00:00
Moriyoshi Koizumi a1e6457561 Fixed bug #21744(21741)
Added test case for the bug
2003-01-19 11:32:54 +00:00
Ilia Alshanetsky 1fe4990bc0 ZTS fixes. 2003-01-19 08:32:26 +00:00
Ilia Alshanetsky 2500199ae3 ZTS fixes. 2003-01-19 04:09:32 +00:00
309697edb2 ChangeLog update 2003-01-19 01:50:24 +00:00
Ilia Alshanetsky fec2af82b8 Changed php_error to php_error_docref.
Make mcal compile with ZE2.
2003-01-19 00:47:03 +00:00
Ilia Alshanetsky 3d8e54f3a2 Changed php_error to php_error_docref. 2003-01-19 00:45:53 +00:00
Derick Rethans add3ec4e0b s/4.4/5.0 2003-01-18 22:33:56 +00:00
Ilia Alshanetsky aebb39b014 Changed php_error to php_error_docref.
Thanks to Marcus Börger for writing a script that significantly simplifies
this process.
2003-01-18 21:31:11 +00:00
Ilia Alshanetsky b2ecf47755 Fixed bug #21732 (Added a sanity check, that prevents parameter mismatch). 2003-01-18 20:48:52 +00:00
Ilia Alshanetsky c794f2c710 Removed pointless memory allocation checks. 2003-01-18 20:27:05 +00:00
Ilia Alshanetsky 984c0918ab Removed pointless memory allocation checks. 2003-01-18 20:10:23 +00:00
Ilia Alshanetsky 71e9f8cdd5 Removed pointless memory allocation checks. 2003-01-18 20:01:46 +00:00
Ilia Alshanetsky 60af5507a5 Changed php_error to php_error_docref. 2003-01-18 19:57:25 +00:00
Ilia Alshanetsky 1ae3c0e66e Removed pointless memory allocation checks.
Changed php_error to php_error_docref.
2003-01-18 19:53:35 +00:00
Ilia Alshanetsky 7cc28802af Changed php_error to php_error_docref. 2003-01-18 19:51:21 +00:00
Ilia Alshanetsky a7b91019e9 Removed pointless memory allocation checks. 2003-01-18 19:49:28 +00:00
Moriyoshi Koizumi a395304c72 Added test case for bug #21094 2003-01-18 19:44:12 +00:00
Ilia Alshanetsky e2868b5788 Removed pointless memory allocation checks. 2003-01-18 19:41:56 +00:00
Ilia Alshanetsky 72b356c1bc Removed pointless memory allocation checks. 2003-01-18 19:28:10 +00:00
Moriyoshi Koizumi 94c25df592 WS 2003-01-18 19:26:01 +00:00
Ilia Alshanetsky b566ad5d1b Changed php_error to php_error_docref. 2003-01-18 19:20:02 +00:00
Marcus Boerger 9d02c2bd56 correct my fault here and documnet the sense of the test 2003-01-18 19:06:29 +00:00
Moriyoshi Koizumi 310397f2ee Fixed typo 2003-01-18 19:02:21 +00:00
Moriyoshi Koizumi 2aa7bf8d8b Added test case for bug #21730 2003-01-18 18:59:27 +00:00
Ilia Alshanetsky a3daf3bbe8 Additional memory allocation fixes by Marcus Börger. 2003-01-18 18:51:12 +00:00
Moriyoshi Koizumi e23fead99f Tons of WS fixes 2003-01-18 18:49:47 +00:00
Ilia Alshanetsky e0654de590 Removed the no longer needed memory allocation checks. 2003-01-18 18:32:19 +00:00
Moriyoshi Koizumi 21b4499953 Fixed bug #21726 and #21730 2003-01-18 18:31:13 +00:00
Andrey Hristov 309ef518fc Renamed get_memory_usage() to memory_get_usage() (per Andi's advice)
This doesn't break any BC.
2003-01-18 15:03:01 +00:00
Wez Furlong 7002a39f97 Fix potential problem for 64-bit architectures. 2003-01-18 14:10:22 +00:00
Derick Rethans 39aa3a5d98 - Fixed memleak in fscanf(). 2003-01-18 13:55:58 +00:00
Derick Rethans a50e9acd8e - Skip test if the function to test is not available
#- Perhaps we need some infrastructure for this...
2003-01-18 13:53:25 +00:00
foobar 83e9f23182 Fix bug: #21687, imap extension does not include gss authentication mechanism 2003-01-18 07:00:47 +00:00
aba4c07be1 ChangeLog update 2003-01-18 01:33:47 +00:00
Harald Radi 46306a3212 export zend_objects_destroy_object()
static inline was meaningless anyways as the function
was only used as a callback handler and was never
called directly
2003-01-17 23:59:15 +00:00
Ilia Alshanetsky 054826b192 Added missing test result. 2003-01-17 23:57:43 +00:00
Moriyoshi Koizumi 0f714bc700 Bump year. 2003-01-17 22:54:47 +00:00
Moriyoshi Koizumi dc4cdaaf1b WS fix 2003-01-17 22:45:23 +00:00
Ilia Alshanetsky 833473d1de Removed pointless checks of array_init() return value. 2003-01-17 21:37:56 +00:00
Harald Radi 5795ed62f4 make std_object_handlers struct available for shared modules 2003-01-17 21:16:12 +00:00
Moriyoshi Koizumi f71ef5e091 Fixed a quoted printable decoder so that it would conform to RFC2045. 2003-01-17 20:00:31 +00:00
Andrey Hristov 6c843d1431 Moved to C style comments.
Last time forgot to convert the header files.
2003-01-17 19:35:13 +00:00
Sascha Schumann ebedf060a5 Fix POST handling once and for all. The daemon now never blocks and handles
uploads of up to 2GB on 32 bit platforms.

Uploads >16KB are put into a file-backed mmap area.

SG(request_info).content_type got corrupted somewhere. As a workaround,
we provide SAPI with a duplicate of the original string.
2003-01-17 18:53:22 +00:00
Marcus Boerger 973c5fa1ec fix jp2 detection and add testfile 2003-01-17 18:51:30 +00:00
Ilia Alshanetsky 169eb85e0a Syncronize bundled GD library with latest GD (2.0.11). 2003-01-17 18:34:07 +00:00
Derick Rethans cce2ffed8a - Fixed a bug that made that no newline was displayed when there was no value
for a row.
2003-01-17 18:07:10 +00:00
Andrey Hristov 7dd7b03aa8 Removed pointless checks around array_init(). 2003-01-17 16:33:01 +00:00
Ilia Alshanetsky fb6517e8ab Fixed memory leaks in imap_get_quota & imap_get_quotaroot.
Removed pointless checks around array_init().
2003-01-17 16:07:39 +00:00
Moriyoshi Koizumi f94cbfe52b Significant speed enhancements. I was underestimating the power of recent
CPUs :)
2003-01-17 09:04:02 +00:00
Sebastian Bergmann 0e178230b2 Move ZEND_ENGINE_2 check to where it is defined. 2003-01-17 06:15:24 +00:00
fc8d5c784d NEWS update 2003-01-17 01:37:02 +00:00
08c11f2931 ChangeLog update 2003-01-17 01:36:11 +00:00
Harald Radi 914cf3c0f8 move the ZE2 check into internal_functions_win32.c 2003-01-16 22:09:58 +00:00
Harald Radi 77f7ae3814 revert previous commit 2003-01-16 22:08:00 +00:00
Harald Radi 76adb58b7a unbreak the build 2003-01-16 21:52:06 +00:00
Ilia Alshanetsky 41092dbd8a Fixed bug #21651 (crash in pdf_open_memory_image() when inserting a
non truecolor image).
2003-01-16 21:18:49 +00:00
Moriyoshi Koizumi 93481ce9b8 Finally fixed a qp encoder bug that line break characters that appear exactly
at the end of the chunk lost in the output.
# I bet no more problems will occur in quoted-printable encoder.
# But I recognised the counterpart is still buggy due to RFC2045-incompliance.
2003-01-16 20:59:07 +00:00
Marcus Boerger 1dabcd4dad - JPEG 2000 support 2003-01-16 19:46:12 +00:00
Marcus Boerger 8958762de6 - corrected error in file detection for very small files
- JPEG 2000 support, mostly Adam Wright <adam@elysium.ltd.uk>
@Enhanced jpeg 2000 support for GetImageSize(). (marcus, Adam Wright)
2003-01-16 19:45:26 +00:00
Harald Radi b1613e16f2 change library name 2003-01-16 18:53:45 +00:00
Harald Radi f390fbb92a update skeleton 2003-01-16 18:46:59 +00:00
Harald Radi 4024425e8e fix path to config.w32.h 2003-01-16 18:25:59 +00:00
Harald Radi dd67c075bc add COM 2003-01-16 18:17:48 +00:00
Harald Radi 7c0e7b4fe8 prevent HEAD + ZE1 builds and add COM 2003-01-16 18:16:50 +00:00
Harald Radi 5aae306f96 for those who prefer to have com as a shared lib 2003-01-16 18:15:44 +00:00
Harald Radi 7f127a22df make layers loadable as self-sustaining php extension
which registeres itself in the rpc framework.
2003-01-16 17:49:22 +00:00
Dan Kalowsky dacf98c86f typo corrected 2003-01-16 16:42:25 +00:00
Dan Kalowsky ae8f64e325 Adding in test ability for WIndows to fetch_objects 2003-01-16 16:27:31 +00:00
Edin Kadribasic d4e143b8be Fixed bug #21648 2003-01-16 13:19:50 +00:00
Sascha Schumann db8b4c6762 Add INI setting session.hash_bits_per_character which enables developers
to choose how session ids are represented, regardless of the hash algorithm.
2003-01-16 07:21:49 +00:00
Ilia Alshanetsky 4e53357e9b Fixed bug #20079 (made ora_logoff return TRUE on success). 2003-01-16 02:53:44 +00:00
7f3b79adc5 ChangeLog update 2003-01-16 01:33:30 +00:00
Ilia Alshanetsky 12d2b01a25 Fixed bug #20933 (isset/empty didn't work when used on string offsets). 2003-01-16 00:44:17 +00:00
Edin Kadribasic 46303d75be Added some missing modules. Removed some that are built in or moved to
ext/rpc.
2003-01-15 22:19:46 +00:00
Sascha Schumann 6f4333c7ae scrap STANDARD_SAPI_MODULE_PROPERTIES; it is causing more harm than good 2003-01-15 21:13:01 +00:00
Andi Gutmans e5afca38b6 - Revert int -> unsigned int change for str.len 2003-01-15 20:35:06 +00:00
Ilia Alshanetsky 1351f42efc More build fixes. 2003-01-15 19:36:13 +00:00
Sascha Schumann 7431b52291 Revert commit which turned the lengths of strings into zend_uint. 2003-01-15 19:10:14 +00:00
Wez Furlong a3a2dcd8a9 Relieve scripts of the burden of ensuring that all pipes are closed prior
to calling proc_close().
Implement proc_get_status(resource $process) which returns an array of
information about a process created with proc_open().
The information includes:
array(
	"command" => string "name of the command",
	"pid" => long process identifier,
	"running" => bool true if the process is still running
	"exitcode" => long exitcode if the process exited
	"signaled" => bool true if the process was signaled
	"termsig" => long signal number if signaled
	"stopped" => bool true if the process is stopped
	"stopsig" => long signal number if stopped
);
2003-01-15 18:54:03 +00:00
Ilia Alshanetsky d4f73f8da6 Fixed a typo. 2003-01-15 17:22:03 +00:00
Sebastian Bergmann be3427e4f0 Define PHP_CAN_SUPPORT_PROC_OPEN. 2003-01-15 16:53:49 +00:00
Sebastian Bergmann 003ea0717e Add proc_open.c to project. 2003-01-15 16:48:46 +00:00
Wez Furlong 1a314027d3 - Move proc_open code to a source file of it's own.
- Tidy up that netware mess by performing a configure check which will
  define the symbol PHP_CAN_SUPPORT_PROC_OPEN if PHP can support proc_open.
- Protected the proc_open specific code with #ifdef PHP_CAN_SUPPORT_PROC_OPEN
  so that user-space scripts can use function_exists and react accordingly.

** Heads Up Win32: You need to add ext/standard/proc_open.c to the DSP and
** #define PHP_CAN_SUPPORT_PROC_OPEN in the w32 config header.
2003-01-15 16:29:00 +00:00
Ilia Alshanetsky ea0f37fc76 Build fixes. 2003-01-15 15:36:28 +00:00
Moriyoshi Koizumi fdf0768d4e Fixed a qp encoder bug that the constructor sometimes fails if
line-breaking mode is off.
2003-01-15 15:05:17 +00:00
Ilia Alshanetsky 475125ac25 Typo fixes. 2003-01-15 14:05:41 +00:00
Ilia Alshanetsky f704ac13a8 Fixed typo. 2003-01-15 14:02:11 +00:00
Ilia Alshanetsky 2b121d0b37 Various corrections. 2003-01-15 13:55:34 +00:00
Ilia Alshanetsky dbe5972a0d Fixed typos. 2003-01-15 13:50:54 +00:00
Ilia Alshanetsky e0e77d7d02 Typo corrections. 2003-01-15 13:48:07 +00:00
Sascha Schumann 0855c0b603 whitespace 2003-01-15 11:30:39 +00:00
Sascha Schumann 4668b7130b whitespace 2003-01-15 11:22:04 +00:00
Yasuo Ohgaki 345ada81c8 Fixed proto 2003-01-15 10:21:15 +00:00
Adam Dickmeiss f8b55fabc5 Fix functions comments (connection resource rather than connection id).
New functions yaz_set_option and yaz_get_option.
Cleanup in yaz_connect.
2003-01-15 08:00:44 +00:00
Adam Dickmeiss 701ab27de7 Fix lib config for the case where YAZ depends on multiple libraries 2003-01-15 07:57:52 +00:00
Ilia Alshanetsky fc9282c183 Kill compile warning. 2003-01-15 03:37:11 +00:00
Ilia Alshanetsky 299614ae16 Newer parameter parsing API. 2003-01-15 03:01:17 +00:00
Ilia Alshanetsky a354531144 Getting rid of the old API parsing code. 2003-01-15 02:54:54 +00:00
Ilia Alshanetsky c2d66fa8bf Changed php_error to php_error_docref.
Made use of the more recent parameter parsing API, zend_get_parameters*.
2003-01-15 02:49:38 +00:00
Ilia Alshanetsky ad42fba9fa Removed pointless checks around array_init() & ZE memory allocation macros.
Changed php_error to php_error_docref.
Dropped getParam* parameter parsing API in favor of zend_get_parameters*.
2003-01-15 02:31:16 +00:00
a34d4dc30e ChangeLog update 2003-01-15 01:34:55 +00:00
Ilia Alshanetsky a63b47cae0 This patch allows cpdf to be compiled in conjunction with ncurses, which was
not possible before due to conflicting defines.
2003-01-15 00:52:06 +00:00
Andi Gutmans c073b76aac - Change "is" to "instanceof" as it explains better what the operator means.
- "is_a" was also appropriate but ugly.
2003-01-14 21:29:23 +00:00
Ilia Alshanetsky e37aee1a34 Porting of patch applied to ext/xmlrpc. 2003-01-14 21:04:47 +00:00
Ilia Alshanetsky a0b3f822f7 Made the code use php_error_docref().
Removed pointless checks around array_init() and emalloc().
Switched to zend_get_parameters_ex() argument parsing API.
2003-01-14 21:02:14 +00:00
Andrey Hristov 05ff5da32b Migrated to C style comments. 2003-01-14 20:24:40 +00:00
Ilia Alshanetsky 74e34d1657 Changed getParameters() to zend_get_parameters_ex(). 2003-01-14 20:07:52 +00:00
Ilia Alshanetsky 1dbf11e1ba Fixed compile warnings. 2003-01-14 20:05:38 +00:00
Ilia Alshanetsky f12a4164a5 One more typo. 2003-01-14 20:02:42 +00:00
Ilia Alshanetsky 44c8927daf Fixed typos. 2003-01-14 19:59:48 +00:00
Moriyoshi Koizumi 3ae7d13bc9 Appended my name to the list of authors 2003-01-14 19:26:00 +00:00
Moriyoshi Koizumi ac66d4481e Test update for new feature 2003-01-14 19:25:10 +00:00
Ilia Alshanetsky cd267a3df4 Switched from old getParse* argument parsing API to a more recent
zend_get_parameters*.
2003-01-14 18:54:44 +00:00
Andrey Hristov 7866f02260 added function get_memory_usage(). available only when PHP is compiled
with --enable-memory-limit
2003-01-14 18:26:47 +00:00
Ilia Alshanetsky 62f7e27141 Fixed compile warning & removed useless variable. 2003-01-14 17:45:31 +00:00
Ilia Alshanetsky 7d14dae0bb Changed php_error to php_error_docref.
Got rid off the ancient getParameters* parameter parsing API.
2003-01-14 17:44:56 +00:00
Moriyoshi Koizumi e5c5412777 Added a new option "force-encode-first" to the quoted-printable encoder
as per Wez's request. If enabled, the encoder forcefully does qp
tranformation on every first character of lines in incoming stream.
2003-01-14 16:42:18 +00:00
Ilia Alshanetsky 4bc247553a Changed php_error() to php_error_docref().
Made pdfdoc retrieval a macro.
2003-01-14 15:15:53 +00:00
Moriyoshi Koizumi bde6801add Made php_quot_print_decode() RFC2045-compliant
# this function is only used in iconv extension and the corresponding
# userland function doesn't use it, so I don't see any BC issue here.
2003-01-14 15:14:11 +00:00
Stanislav Malyshev 5340b204ca fix memory leaks and key size 2003-01-14 15:12:35 +00:00
Edin Kadribasic 45e9f594bb MFB: bind_textdomain_codeset() availability on windows 2003-01-14 14:46:33 +00:00
Ilia Alshanetsky dff55752aa MFZE2 2003-01-14 14:21:45 +00:00
Derick Rethans 4ff9267143 s/gd/gd2 2003-01-14 13:55:00 +00:00
Stanislav Malyshev 67c50ee22a fix warning 2003-01-14 12:27:07 +00:00
Stanislav Malyshev eccc536883 Make add_property_ functions work via write_property handler 2003-01-14 12:15:09 +00:00
Stanislav Malyshev f30f3590a1 ws 2003-01-14 12:13:51 +00:00
Ilia Alshanetsky ad3b2ccec9 Reverting previous patch. 2003-01-14 02:41:47 +00:00
Ilia Alshanetsky 6fb507b53e Changed php_error to php_error_docref().
Removed pointless checks around array_init().
2003-01-14 02:39:10 +00:00
062942c4e9 ChangeLog update 2003-01-14 01:35:54 +00:00
Moriyoshi Koizumi a0be48c109 Fixed small memory leak that occurs when the invalid line length is passed
to the qprint ctor.
2003-01-14 01:27:57 +00:00
Moriyoshi Koizumi 121e625977 Fixed quoted-printable encoder so that it produces RFC2045 complicant
output. As per this specification requirement, the constructor now accepts
three options: binary (boolean), line-len (uint), line-break-chars (string).
2003-01-14 01:23:35 +00:00
foobar cabee3635f Fixed bug: #21543, Informix version detection fails 2003-01-13 23:31:13 +00:00
Frank M. Kromann d07dc0fc4c false should be VT_FALSE 2003-01-13 19:33:10 +00:00
Moriyoshi Koizumi e89bace72c Fixed typoFixed typoFixed typoFixed typoFixed typoFixed typoFixed typoFixed typo 2003-01-13 19:18:18 +00:00
Andrey Hristov 1cdc956637 added array_combine().
Creates an array by using the elements of the first parameter as keys and
the elements of the second as correspoding keys. Error is thrown in case
the arrays has different number of elements. Number of elements 0 is not
valid for both parameters.
2003-01-13 18:12:23 +00:00
Andrey Hristov ffeb57afb5 Modifying TS build.
Migrating to _ex API for hash traversal.
2003-01-13 16:39:16 +00:00
Ilia Alshanetsky 8e7df3fbf1 MFZE2 2003-01-13 16:34:19 +00:00
Edin Kadribasic 60cac99a71 Adjust paths for the new location of ext/rpc/java 2003-01-13 16:07:45 +00:00
Edin Kadribasic f09be34dd3 Adjust paths to the new location java.dsp 2003-01-13 15:15:24 +00:00
Edin Kadribasic 8dbbddfb54 Fix ZTS build here too.
#
# What is the correct location of XMLRPC extension?
# Can the reduntand one be removed then and the build system fixed
# to acommodate that.
2003-01-13 13:39:29 +00:00
Edin Kadribasic 8ef5a3d48e Fixed ZTS build. 2003-01-13 13:36:23 +00:00
Moriyoshi Koizumi 78f527e2b7 Fixed a silly segfault bug caused by lack of strict type checking 2003-01-13 11:00:22 +00:00
Sascha Schumann 726eb90bd5 which is not portable. use our bundled shtool instead. 2003-01-13 10:27:50 +00:00
Moriyoshi Koizumi ab71e2cbaa . Implemented a common filter parameter parsing function.
# For example "base64-encode.line-break-chars=--,base64-decode.blah=foobar"
# will be parsed and splitted into a zval array as
# array(2) {
#   ["base64-encode"]=>
#   array(1) {
#     ["line-break-chars"]=>
#     string(2) "--"
#   }
#   ["base64-decode"]=>
#   array(1) {
#     ["blah"] =>
#     string(6) "foobar"
#   }
# }
. Added automatic line-breaking feature for base64 encode filter. This
  can be turned on by putting a option entry "base64-encode.line-length"
  to the filter parameters.
2003-01-13 10:21:40 +00:00
Derick Rethans 2cbcb743d8 - Fix ZTS build 2003-01-13 08:19:50 +00:00
Andi Gutmans 94e6eb06dd - Don't check if the handle is bogus. We should crash. 2003-01-13 04:55:34 +00:00
aec08c6052 ChangeLog update 2003-01-13 01:34:00 +00:00
Moriyoshi Koizumi 22a6b8f1a4 Added test case for bug #21600 2003-01-12 23:56:04 +00:00
Harald Radi 58d3451c75 fix wrong dereferenciation 2003-01-12 21:59:57 +00:00
Moriyoshi Koizumi 1fec8e3d13 Fixed a bug of the base64 decoder that a sequence of intervening
characters that are supposed to be ignored by the decoder cause output
corruption.
2003-01-12 21:05:22 +00:00
Stanislav Malyshev 33b67ab868 fix inheritance 2003-01-12 18:57:18 +00:00
Stanislav Malyshev 98175957a7 ZE2 compatibility 2003-01-12 18:42:16 +00:00
Stanislav Malyshev 2ae8d124ce Remove handle_property from here too 2003-01-12 17:22:35 +00:00
Stanislav Malyshev d48ffd97d6 RIP handle_* functions. ZE2 will use __ handlers instead.
# Yes, I know this will break some things. I will fix those I can find shortly.
2003-01-12 17:16:07 +00:00
Sebastian Bergmann f37cb1c617 ZTS fixes. 2003-01-12 14:47:18 +00:00
Stanislav Malyshev a7e14749e7 Disable ZE2-incompatible parts
# This should be rewritten for ZE2 anyway...
2003-01-12 14:43:04 +00:00
Stanislav Malyshev 1b355e119e Move Z_OBJ_P here. 2003-01-12 14:39:45 +00:00
Stanislav Malyshev d27b3d3ad9 Remove Z_OBJ - it's internal to Zend objects, no generic function except
those in zend_object_handlers.c should use it.
Add Z_OBJ_HANDLER macro for easy access to handlers
2003-01-12 14:38:54 +00:00
Sebastian Bergmann 24db7f182a ZTS fixes. 2003-01-12 14:25:58 +00:00
Stanislav Malyshev 6cc7ee265c add get_class_name handler 2003-01-12 13:56:51 +00:00
Stanislav Malyshev bcc1e5a74e remove unneeded var 2003-01-12 13:50:17 +00:00
Moriyoshi Koizumi a88173bf86 Fixed infinite loop bug when an invalid quoted-printable escape sequence
appears in the streem.
2003-01-12 13:46:11 +00:00
Stanislav Malyshev 9bba373a17 Use generic handlers instead of Z_OBJ 2003-01-12 13:45:50 +00:00
Moriyoshi Koizumi b1e8631986 Fixed error msg format so it correctly reports the actual filter name 2003-01-12 13:41:35 +00:00
Sascha Schumann c79e780f5c recommending SHA-1 as hash function 2003-01-12 13:26:47 +00:00
Harald Radi 2f7f1dd1b8 #@!$$grml*$% 2003-01-12 13:18:05 +00:00
Harald Radi 13c2254e21 partially revert previous commit and
change zend_modules.h to include
a forward declaration to zend_ini_entry
2003-01-12 13:14:23 +00:00
Sascha Schumann 5a468ce877 sync entries 2003-01-12 13:09:54 +00:00
Sascha Schumann f2f1f94e36 add INI setting session.hash_function
add support for creating session ids using SHA-1
source more entropy for session ids
2003-01-12 13:07:14 +00:00
Sascha Schumann 0b8401bf27 handle ERANGE from strtol properly 2003-01-12 13:05:32 +00:00
Harald Radi 814045bba6 added zend_ini_entry to zend_modules_entry as
discussed with zeev
2003-01-12 13:00:28 +00:00
Harald Radi c37ee2a12a fix 'use of uninitialized variable' warning 2003-01-12 12:57:20 +00:00
Stanislav Malyshev 0ccbd37df7 validate handle 2003-01-12 12:56:04 +00:00
Moriyoshi Koizumi aa41ab285a . Updated quoted-printable filter by a neater implementation.
. Changed emalloc family functions to pemalloc ones for persistent filters.
. Changed base64 and quoted-printable filter names to "convert.base64-encode",
  "convert.base64-decode", "convert.quoted-printable-encode", and
  "convert.quoted-printable-decode" respectively for the consistency that
  may be requested later.
2003-01-12 12:48:13 +00:00
Derick Rethans 46a5371ecd - Update NEWS to show 5.0.0 2003-01-12 12:45:19 +00:00
Zeev Suraski 424e98f4e2 Implemented compatibility mode
To enable - zend2.implicit_clone = on in php.ini or using ini_set()
2003-01-12 12:39:06 +00:00
Jan Lehnardt c98f4e9f32 - fix typo 2003-01-12 11:42:29 +00:00
Sebastian Bergmann 17c1518792 Patch by Giuseppe Tanzilli <g.tanzilli@gruppocsf.com>. 2003-01-12 08:03:18 +00:00
Sebastian Bergmann a142ce729f Patch by Giuseppe Tanzilli <g.tanzilli@gruppocsf.com>. 2003-01-12 08:01:42 +00:00
Frank M. Kromann 874cddd4ae Release skiped results. This will free memory on the server.
Make mssql_execute work for stored procedures with and without returning result sets
2003-01-12 06:28:41 +00:00
091609d661 ChangeLog update 2003-01-12 01:31:51 +00:00
Ilia Alshanetsky c4088ce25b Do not 'convert' double columns to integers after the 1st row in the result
set.
2003-01-11 23:50:37 +00:00
Ilia Alshanetsky 48f2ad4703 Fixed handling of NUMERIC type, when it contains numbers that could
potentially exceed the interger limit.
2003-01-11 23:06:35 +00:00
Moriyoshi Koizumi 7fa0970567 Reverted because correct decision has not been made yet. 2003-01-11 23:05:19 +00:00
Moriyoshi Koizumi dd9b7f25cf This patch is likely to fix win32 build 2003-01-11 22:36:38 +00:00
Moriyoshi Koizumi b66b92e996 Reduced warnings in ZE2 build 2003-01-11 22:32:19 +00:00
Moriyoshi Koizumi dd2ad168e1 Reduced compiler warnings in ZE2 build 2003-01-11 22:17:37 +00:00
Andrey Hristov cd2ce96e03 reverting 2003-01-11 19:37:23 +00:00
Ilia Alshanetsky 8facc65202 Added stripos() & strripos() functions.
Added 3rd parameter (offset) to strrpos().
2003-01-11 17:52:38 +00:00
Andi Gutmans 76c663b321 - Fix typo and whitespace 2003-01-11 17:04:16 +00:00
Derick Rethans 2c44fab3a0 - Ported the zend_execute_internal hook to ZendEngine2. 2003-01-11 16:12:44 +00:00
Derick Rethans 6b7eaaa2c4 - Moving java and dotnet extensions to ext/rpc 2003-01-11 12:23:45 +00:00
Harald Radi c8d19858ac freed reader twice instead of writer and reader 2003-01-11 11:34:43 +00:00
Sebastian Bergmann 213b5abd06 Add missing ,. 2003-01-11 09:51:53 +00:00
Harald Radi 656ccddfce fix build 2003-01-11 08:59:37 +00:00
Sebastian Bergmann 02c1b1d8d2 Leftover. 2003-01-11 06:08:55 +00:00
a0055ba2e5 NEWS update 2003-01-11 01:34:56 +00:00
c5153b24c8 ChangeLog update 2003-01-11 01:34:28 +00:00
Ilia Alshanetsky 973937e7aa Fix the line numbering when the 1st line in the script is #!. 2003-01-11 00:20:50 +00:00
Harald Radi 5fc6842817 this is now implemented by the engine itself 2003-01-10 23:40:12 +00:00
Harald Radi fff34aa3be ext/com is not compatible with ZE2, the ZE2 version is located in
ext/rpc/com
2003-01-10 23:39:09 +00:00
Harald Radi c3867a7c8e HEAD defaults to build with ZE2 now 2003-01-10 23:36:18 +00:00
Frank M. Kromann 16cda12728 Fixing copy and paste errors 2003-01-10 19:33:31 +00:00
Frank M. Kromann c2e7158712 Avoid warnings when running stored procedures returning multiple results
before setting output and return values.
Additional results can be skipped by the optional parameter to mssql_execute
2003-01-10 19:23:36 +00:00
Ilia Alshanetsky 8c3b8d4fe6 MFZE2 2003-01-10 19:18:20 +00:00
Christian Stocker 9234916fc8 Throw error if object is not a XML_DOCUMENT_NODE in domxml_dump_node() 2003-01-10 18:07:36 +00:00
Andrey Hristov 53656f196b skipping unneeded copy 2003-01-10 17:39:10 +00:00
Andrei Zmievski efaa31e940 Automatically register constructor, destructor, and clone function when
class methods are registered.
2003-01-10 14:41:53 +00:00
Wez Furlong cf9f784ecd Fix the number format fix when the number of decimal places is 0.
# Thanks to Edin for his telepathy!
2003-01-10 13:32:24 +00:00
Derick Rethans 0988bc2ee6 - Fixed bug #20155: xmlrpc compile problem with zendengine2 (Path by Jan
Schneider)
@- Fixed bug #20155: xmlrpc compile problem with zendengine2 (Derick, Jan
@  Schneider)
2003-01-10 08:24:55 +00:00
Moriyoshi Koizumi 380928e6bf Reduced compiler warnings 2003-01-10 04:44:21 +00:00
Moriyoshi Koizumi 7ecd3ff91a Reduced compiler warnings 2003-01-10 04:37:26 +00:00
Moriyoshi Koizumi 6a1d69d4ba Added missing cast operators 2003-01-10 04:32:25 +00:00
Ilia Alshanetsky dee2d7fed7 Fixed ImageRotate when rotation angle is 90 degrees, patch by
leon@leonatkinson.com.
2003-01-10 02:00:39 +00:00
dd277cf2c7 ChangeLog update 2003-01-10 01:33:11 +00:00
Stig Bakken 3f09044ba6 * prepare 1.0.1 release 2003-01-10 01:24:56 +00:00
Stig Bakken 4a723721b9 * obey PHP_PEAR_INSTALL_DIR and PHP_PEAR_PHP_BIN environment variables 2003-01-10 01:16:23 +00:00
Stig Bakken 4cf28eb0fc * verbosity fix for cvstag and cvsdiff commands 2003-01-10 01:15:40 +00:00
Stig Bakken 26a472f767 * TODO item 2003-01-10 01:12:23 +00:00
Stig Bakken eaf21d230e * add "cvsdiff" command 2003-01-10 01:11:30 +00:00
Stig Bakken 95255fe5e1 * use getenv() instead of $_ENV[] 2003-01-10 01:11:00 +00:00
Ilia Alshanetsky 5413a66cbb CS fixes 2003-01-09 23:23:32 +00:00
Ilia Alshanetsky 3e5bbba351 Fixed a memory corruption that occurs when an unterminated " is encountered
this bug maybe be related to #21556.
2003-01-09 22:49:18 +00:00
Frank M. Kromann 8e0535bcd5 Adding extended checks for where FreeTDS is installed 2003-01-09 22:35:16 +00:00
Ilia Alshanetsky 9b560970f8 Fixed compiler warnings. 2003-01-09 22:33:43 +00:00
Sara Golemon 4d789b593f Bug #21531 file_exists() and other filestat functions throw errors when in safe mode and file/directory does not exist.
Extended php_checkuid function to add "flags" field via rename to php_checkuid_ex with alias for BC in functions that do want safe mode errors thrown.
2003-01-09 21:57:45 +00:00
Moriyoshi Koizumi 82c6d54517 Fixed typo 2003-01-09 20:23:36 +00:00
Wez Furlong 59e4fdcc10 Implement fprintf() and vfprintf().
Add a couple of tests.
2003-01-09 17:29:31 +00:00
foobar 32eb31719a Fix bug: #21511, config.status warning 2003-01-09 16:37:45 +00:00
Zeev Suraski 66d30a4966 Found some more occurences of that elusive bug... 2003-01-09 16:16:57 +00:00
Zeev Suraski ef6a44d15c Fix one lousy, annoying lurking bug (memory corruption)
Sebastian - try coWiki again please...
2003-01-09 16:10:33 +00:00
Wez Furlong d8fbd1acef Fix Bug #21523 - number_format could cause a memory allocation for a
negative memory size in situations where the sprintf implementation of the
host system generated less decimal places than were requested.

Resolved this issue by making number_format examine the string returned
by spprintf and have it pad to the correct number of decimal places.

Added a test-case based on the bug report; the length of decimal places
required to trigger this bug is sprintf implementation dependent; as the
implementation is now using spprintf (provided by PHP), that number is
78 digits (NDIG - 2).

# I played with the idea of enhancing sprintf to do the equivalent, but
# it was too much effort considering that the precision of floats/doubles
# is not good enough to warrant it.

# This fix could do with some QA from someone else to make sure there are
# no memory bounds problems and then MFH it to PHP_4_3
2003-01-09 15:44:49 +00:00
Zeev Suraski ace55f3251 Unify and make it easy to add code into the broken-string error handler 2003-01-09 15:32:22 +00:00
Stig Bakken f39c0ad2b6 * added debug_backtrace() support to PEAR errors 2003-01-09 15:14:23 +00:00
Stig Bakken 796083b936 * System::which() now checks .exe .bat .cmd and .com on Windows 2003-01-09 15:11:27 +00:00
Stig Bakken 239d203e4a * cleanups 2003-01-09 15:06:14 +00:00
Zeev Suraski 4bab4a7b55 Fix writability checks 2003-01-09 14:46:46 +00:00
Zeev Suraski d35ddb740e Time for an update 2003-01-09 10:03:26 +00:00
Zeev Suraski b817dab206 Fix leak 2003-01-09 09:22:44 +00:00
Frank M. Kromann b33fe2b2c6 Use the correct link when checking for more results on stored procedures 2003-01-09 08:19:41 +00:00
Frank M. Kromann 6660f8ae4e Restire BC for mssql_execute(). This will not break the new feature for handling
multiple results from a single stired procedure.
Adding mssql_free_statement()
2003-01-09 08:00:07 +00:00
Ilia Alshanetsky ef9ba94c8b Fixed bug #21529 (memory corruption by fsockopen()). 2003-01-09 03:33:15 +00:00
Frank M. Kromann 392e5013b4 changed from LVAL to RESVAL macro 2003-01-09 02:44:44 +00:00
7faaf86d3a ChangeLog update 2003-01-09 01:33:21 +00:00
Yasuo Ohgaki ae8db8c608 Adjust config.m4 for new build system and improve lib detection a little 2003-01-09 01:19:26 +00:00
foobar 66fd5008ab Fix the ZTS build. 2003-01-09 00:15:33 +00:00
Moriyoshi Koizumi 59393ef3ad Reimplemented base64 filter to use iconv()-like facility for flexibility.
# I'm leaving the code dirty & ugly prior to the discussion.
2003-01-08 23:44:38 +00:00
Frank M. Kromann 7cd7cad1b5 Changed global data type to avoid problems with initialization 2003-01-08 23:19:54 +00:00
Ilia Alshanetsky 072be90d6f Added support for WBMP images. 2003-01-08 20:36:03 +00:00
Ilia Alshanetsky 17e51c5946 Fixed bug #21518.
Fixed memory in leak ImageCreateFromString().
Fixed a bug that prevented proper identification of WBMP images and thus
prevented ImageCreateFromString() from working on those images.
2003-01-08 18:11:40 +00:00
James Cox 24d034251d cvs is dev not alpha. 2003-01-08 17:30:49 +00:00
Ilia Alshanetsky efcd8a7094 MFZE2 2003-01-08 16:41:47 +00:00
Zeev Suraski ada5c4009e Fix UMR 2003-01-08 13:28:16 +00:00
Georg Richter 5312594a27 fixed bug #21498 2003-01-08 11:00:06 +00:00
Ilia Alshanetsky 2d4a4a99d3 Removed unused variable. 2003-01-08 03:33:00 +00:00
Ilia Alshanetsky a7ac507ade Fixed bug #21499 (more descriptive message in the event of require/include
failure).
2003-01-08 02:44:09 +00:00
72479b90b3 NEWS update 2003-01-08 01:38:00 +00:00
87660b06f4 ChangeLog update 2003-01-08 01:34:57 +00:00
Ilia Alshanetsky 5de9962d50 Fixed bug #21297. The fix also fixes miscalculation of lines numbers by 1
due the previously mentioned bug.
2003-01-08 00:41:53 +00:00
Ilia Alshanetsky ac3e8601ae Version is char ;). 2003-01-08 00:38:36 +00:00
Christian Dickmann 26e393c69f fix default umask(); (thx to Mirco MEEBEY Bauer for bringing this behavior to my attention and testing the patch) 2003-01-07 23:12:06 +00:00
Dan Kalowsky 19b25ca5d2 Version tag for future move to PECL 2003-01-07 23:00:11 +00:00
Dan Kalowsky b89d9db706 Reverting last change as it really doesn't fix longreadlen problems in all
cases.
2003-01-07 22:56:58 +00:00
Moriyoshi Koizumi b064810550 Instances should not be freed in dtor()... 2003-01-07 22:53:42 +00:00
Moriyoshi Koizumi b86a4edeed Made error msg format more consistent 2003-01-07 22:52:24 +00:00
Pierre Joye a9999190c6 Fix line drawed twice (L. Atkinson) 2003-01-07 22:34:00 +00:00
Sara Golemon f4f313ff40 Backout changes between 1.6 and 1.7 2003-01-07 16:43:26 +00:00
Zeev Suraski 6591b9c826 Add missing call 2003-01-07 16:33:28 +00:00
Levi Dixon beb7476ba9 Added support for Shared Data Mode for OCI8_VERSION >= 8.1, which will provide memory savings by sharing common statement data 2003-01-07 15:55:59 +00:00
Edin Kadribasic 0c80cc9d20 #17098 was MFH'ed 2003-01-07 15:27:27 +00:00
Ilia Alshanetsky b1fab873c2 Added a check for availability of PCRE extension needed by test-suite. 2003-01-07 15:21:34 +00:00
Vincent Blavet 7121150e5f * Synchronize with /pear/Archive_Tar/Tar.php 1.5 :
- Add support for long filenames (greater than 99 characters)
  - Add private methods _readLongHeader() and _writeLongHeader()
2003-01-07 15:04:42 +00:00
Ilia Alshanetsky f7513855b3 Fixed ZTS build with ZE2. 2003-01-07 14:34:41 +00:00
Ilia Alshanetsky 928c260c57 ZTS cleanup. 2003-01-07 13:02:43 +00:00
Zeev Suraski e8de102cd6 Fix leaks 2003-01-07 12:11:40 +00:00
Zeev Suraski 651cea08f0 whitespace 2003-01-07 11:37:09 +00:00
Edin Kadribasic 6d55e3456f MFB:
Fixed bug #21442 (Crash of mail() on Windows when the first parameter
is empty).
2003-01-07 11:24:17 +00:00
Zeev Suraski efb9fdf0e6 call dtors on shutdown 2003-01-07 10:33:22 +00:00
Sascha Schumann e180f20e63 tell user which header files could not be found 2003-01-07 09:49:08 +00:00
Moriyoshi Koizumi 346fa499ca Fixed small leak 2003-01-07 08:57:27 +00:00
Frank M. Kromann 1638ddd4c2 Making the mssql extension work when build as a shared object 2003-01-07 05:19:48 +00:00
Ilia Alshanetsky f0de896ed2 Fixed ZTS build. 2003-01-07 03:44:12 +00:00
Ilia Alshanetsky 34e868d451 MFB + CS 2003-01-07 02:47:24 +00:00
Moriyoshi Koizumi b7740a0351 Trivial grammer fix 2003-01-07 01:46:38 +00:00
Moriyoshi Koizumi eed5a6bed0 Implemented quoted-printable stream filter 2003-01-07 01:41:18 +00:00
f8075804a5 NEWS update 2003-01-07 01:36:37 +00:00
0f6db9ef82 ChangeLog update 2003-01-07 01:34:32 +00:00
Sara Golemon 35b1635c81 Add option to stream_get_filters() user-defined fiters vs. all filters, default to user only 2003-01-07 01:02:29 +00:00
Moriyoshi Koizumi 00a36a09e1 Implemented string.base64 stream filter
@- Implemented string.base64 stream filter. (Moriyoshi)
2003-01-07 00:03:25 +00:00
Stefan Esser 58d65abbcb Adding support for anonymous fileuploads (#21450) 2003-01-06 23:51:28 +00:00
Wez Furlong 39848ce35c Fix for Bug #20827: where stat is a macro on Tru64.
Patch from <julien.soula@free.fr>
2003-01-06 23:27:03 +00:00
Ilia Alshanetsky 97dd1e8abf Fixed bug #21453 (improper handling of non-terminated <). 2003-01-06 22:13:03 +00:00
Ilia Alshanetsky 15f7c2c332 Fixed Bug #21443 and related bug #21468. 2003-01-06 21:43:28 +00:00
Dan Kalowsky 86b99ffcf6 Patch for bug #19349 2003-01-06 18:23:55 +00:00
Dan Kalowsky b588e10553 Correction for bug #21279 2003-01-06 18:10:06 +00:00
Moriyoshi Koizumi 4c2d6cfea8 Moved php_quot_print_decode() to quot_print.c so that it can be used
outside the iconv module
2003-01-06 15:47:25 +00:00
Moriyoshi Koizumi d0570815af Added more RFC2047-compliancy check in iconv_mime_decode() 2003-01-06 15:40:22 +00:00
Moriyoshi Koizumi 6f44489b68 Fixed iconv_mime_decode() so that it comforms to RFC2231 2003-01-06 15:35:42 +00:00
Georg Richter 8aeb7f35bc fixed missing & (Thx to Sebastian Bergmann) 2003-01-06 14:13:47 +00:00
Wez Furlong d23d4b366d Make it slightly more obvious that the return value is relative to the length
of the input data.
2003-01-06 14:04:23 +00:00
Wez Furlong 52a3c29e22 Fix for bug #21406; infinite loop during filter flushing. 2003-01-06 14:00:57 +00:00
Edin Kadribasic 3d9c3c6662 MFB:
Fixed bug #20503 (imagesetbrush() availability on windows).
2003-01-06 10:49:52 +00:00
Anantha Kesari H Y b3d80fe441 Removed #ifdef NetWare and made the necessary changes in the directory structure of NetWare. 2003-01-06 10:28:34 +00:00
Anantha Kesari H Y dc8b2e6ddd Header file for PostgreSQL. Moved from netware directory to netware/libpq directory. 2003-01-06 10:27:33 +00:00
Anantha Kesari H Y 4196f7d0c3 This file moved to netware/libpq directory. 2003-01-06 10:24:36 +00:00
Christian Stocker 413053aa75 - get_path forgotten in .h file
- fix crash in domxml_node_insert_before() (by Lukas Schröder)
2003-01-06 09:59:53 +00:00
Anantha Kesari H Y 159f0bcdd8 Added symbols to build PostgreSQL extension for NetWare. 2003-01-06 09:08:55 +00:00
Anantha Kesari H Y 303f888a09 Changes for NetWare makefile. 2003-01-06 09:05:59 +00:00
Anantha Kesari H Y f58016b348 Makefile added newly and modified the header file for NetWare. 2003-01-06 09:05:03 +00:00
Christian Stocker cafc0b2e59 @- Added domxml_node_get_path() (Lukas Schröder)
- Fixed segfault, when trying to add a node to itself.
2003-01-06 08:47:35 +00:00
Anantha Kesari H Y 509b4d39b5 Added #ifdef HAVE_SYSLOG_H around syslog function in the whole file to avoid link failure. 2003-01-06 05:59:17 +00:00
Anantha Kesari H Y e6003eba60 Modified for Netware. 2003-01-06 05:55:46 +00:00
Sara Golemon 999d989aa9 Added string.toupper and string.tolower filters and generalized non-op filter methods 2003-01-06 05:22:06 +00:00
Frank M. Kromann 6b0b7e3f42 Nuke warning, on Win32 build 2003-01-06 04:29:33 +00:00
Frank M. Kromann 01f5c5d6fe enable imageftbbox() and imagefttext() on WIn32 2003-01-06 04:28:49 +00:00
Sara Golemon 42e912da79 Expose stream_filters_hash so that it can be searched by stream_get_filters() 2003-01-06 04:06:40 +00:00
Edin Kadribasic e0ed7e9057 Complete gif readonly support addition by adding missing gd_gif_in.c
file to the project.
2003-01-06 01:39:08 +00:00
b38f1e162c ChangeLog update 2003-01-06 01:34:25 +00:00
Edin Kadribasic 6113d95433 Comment out non ANSI C standard comliant code. Fixes win32 build. 2003-01-06 01:26:14 +00:00
Edin Kadribasic 59b37a5ce4 Fixed win32 build. 2003-01-06 01:08:59 +00:00
Ilia Alshanetsky b52eb8f14a Fixed bug #21445. 2003-01-06 00:47:40 +00:00
Sara Golemon 7dae400063 Fixes to stream_get_wrappers() and stream_get_filters() handle hash table layouts better, plus some picune whitespace fixes 2003-01-05 22:24:49 +00:00
Georg Richter 2fbb9a5247 fixed bug #21435 2003-01-05 20:53:06 +00:00
Sebastian Bergmann c9d9e053f3 Define HAVE_GD_GIF_READ. 2003-01-05 16:32:01 +00:00
Zeev Suraski 968f3f9a12 Remove unnnecessary initialization 2003-01-05 16:11:10 +00:00
Zeev Suraski 19d47d9f6e Initialize lineno using the new infrastructure 2003-01-05 16:10:35 +00:00
Zeev Suraski cf05f34c66 MFZE1 - lineno fix 2003-01-05 16:09:59 +00:00
Sebastian Bergmann b5d97e5ddb Revert config.w32.h.in -> config.w32.h build step per discussion with Zeev. 2003-01-05 15:58:29 +00:00
Zeev Suraski a2b58500b4 Make the .dsp use the php4build build directories 2003-01-05 15:09:11 +00:00
Edin Kadribasic fc03762871 MFB:
Made xslt_set_encoding() available on windows (bug #20640).
2003-01-05 13:54:30 +00:00
Ilia Alshanetsky d5a8bb2d0b Fixed a memory leak in setlocale() & localeconv(). 2003-01-05 04:29:14 +00:00
Sara Golemon 43630e2ac0 Added stream_get_filters(); to list registered filters 2003-01-05 03:24:38 +00:00
baabdbd1ee ChangeLog update 2003-01-05 01:33:04 +00:00
Derick Rethans b816089fbf - Fix some of the netware crap 2003-01-05 00:56:17 +00:00
Derick Rethans e58c221204 - Change Warnings to Notices 2003-01-04 23:55:57 +00:00
Ilia Alshanetsky 5f36ce398e CS fixes. 2003-01-04 23:31:55 +00:00
Marcus Boerger fff1c67b56 Fix ZTS-ZE2 build 2003-01-04 20:06:32 +00:00
Marcus Boerger 6a75a52ad8 better to check for existance first 2003-01-04 19:19:59 +00:00
Marcus Boerger 2705070dd8 Fix ZTS-ZE2 build 2003-01-04 19:18:43 +00:00
Moriyoshi Koizumi 69bb505750 Forgot to include these functions in the list 2003-01-04 18:49:48 +00:00
Derick Rethans 1b5caf3b67 - Fix typo 2003-01-04 18:35:37 +00:00
Moriyoshi Koizumi 0d0127fbfb Fixed cut'n'paste failure 2003-01-04 13:52:54 +00:00
Moriyoshi Koizumi 94ad85107c NEWS update for new iconv functions 2003-01-04 13:45:03 +00:00
Moriyoshi Koizumi b13a6276e1 Added test case for iconv_mime_encode() 2003-01-04 13:39:59 +00:00
Derick Rethans 6439ad7640 - Fixed bug #21232 (Unresolved references to PQsetnonblocking). (Patch by
Floyd <floyd@studiodust.com>)
2003-01-04 12:33:46 +00:00
Martin Jansen 4343df9de2 * Update copyright year to 2003. 2003-01-04 11:56:35 +00:00
a9c558c6d3 NEWS update 2003-01-04 01:34:30 +00:00
c8b2431522 ChangeLog update 2003-01-04 01:32:59 +00:00
Alex Waugh ef8d954a0d Provide alternative for glibc brokenness test when cross compiling 2003-01-03 22:05:12 +00:00
Derick Rethans c175f3545c - Fix docrefs 2003-01-03 21:33:31 +00:00
Derick Rethans 0127c07e45 - Fix typo (patch by Joseph Tate) 2003-01-03 21:30:49 +00:00
Moriyoshi Koizumi cd2b0fe706 Added test case for iconv_mime_decode() 2003-01-03 20:33:53 +00:00
Moriyoshi Koizumi 07dcab60f0 Added test cases for iconv_strpos() and iconv_strrpos() 2003-01-03 20:02:23 +00:00
Moriyoshi Koizumi 006b455c6a Fixed an iconv_strrpos() bug that the function doesn't return accurate
position of last occurrence
2003-01-03 20:01:13 +00:00
Derick Rethans 4d3c4ab45d - Update todo 2003-01-03 19:50:41 +00:00
Derick Rethans 419af9f12a - Removed support for libmcrypt 2.2.x to allow cleaner code. Another reason
to upgrade libmcrypt to a 2.5.x series as the older ones have too much bugs
  to be safely used with PHP.
- Updated macro's, php_errors and parameter parsing.
@- Removed support for libmcrypt 2.2.x to allow cleaner code. Another reason
@  to upgrade libmcrypt to a 2.5.x series as the older ones have too much bugs
@  to be safely used with PHP. (Derick)
2003-01-03 19:49:44 +00:00
Ilia Alshanetsky f99fa7170e Fixed a bug that would cause flock() to never set the 3rd argument.
CS fixes & switched to new parameter parsing API.
2003-01-03 18:33:28 +00:00
Ilia Alshanetsky 71ab7dfccc Fixed a memory leak that occurs if the location specified by redirect header
cannot be opened.
2003-01-03 17:12:35 +00:00
Ilia Alshanetsky c52cdad25a Further fixes related to bug #21267. 2003-01-03 17:05:16 +00:00
Anantha Kesari H Y 2e52c112df Modified for NetWare. 2003-01-03 16:06:02 +00:00
Anantha Kesari H Y c1498d7a15 Modifications for NetWare. 2003-01-03 15:59:02 +00:00
Anantha Kesari H Y 38a319e3c6 New file added for NetWare. 2003-01-03 15:39:43 +00:00
Anantha Kesari H Y 2a8abc7de5 Some existing files modified and a couple of files removed for NetWare. 2003-01-03 15:21:33 +00:00
Anantha Kesari H Y a53ff6ff54 NetWare related changes/modifications. 2003-01-03 15:17:43 +00:00
Anantha Kesari H Y 830298beb8 Modified for NetWare. 2003-01-03 14:37:42 +00:00
Anantha Kesari H Y 32ef849171 Modified for NetWare. 2003-01-03 14:31:31 +00:00
Moriyoshi Koizumi 3149fc7c40 Added offset validity check for iconv_strpos() 2003-01-03 14:29:49 +00:00
Anantha Kesari H Y 9c3f39a074 New file added for NetWare. 2003-01-03 14:24:34 +00:00
Anantha Kesari H Y 90ba724072 Modified for NetWare. 2003-01-03 14:24:07 +00:00
Anantha Kesari H Y 3e2f1526bc A new file added and some old files modified for NetWare. 2003-01-03 12:48:14 +00:00
Edin Kadribasic a1402eebf1 Checking in files for Ananth Kesari <hyanantha@novell.com> 2003-01-03 12:15:36 +00:00
Anantha Kesari H Y ee5884ef39 File modified for NetWare. 2003-01-03 11:53:09 +00:00
Anantha Kesari H Y ad7aa57e27 A few New files added and some old files modified for NetWare. 2003-01-03 11:46:20 +00:00
Anantha Kesari H Y 452389df71 New files added for NetWare. 2003-01-03 11:40:52 +00:00
Anantha Kesari H Y 72a35f8a4b New file added for NetWare. 2003-01-03 11:36:57 +00:00
Anantha Kesari H Y afaf7cc24e File modified for NetWare. 2003-01-03 11:36:24 +00:00
Anantha Kesari H Y f4543e57f4 New file added for NetWare. 2003-01-03 11:12:40 +00:00
Derick Rethans 8f82834a79 - Update this one as well 2003-01-03 10:52:23 +00:00
Derick Rethans 32254e0938 - Remove double "Win32 COM" functions line 2003-01-03 10:48:38 +00:00
Derick Rethans 530e7120b2 - Whitespace 2003-01-03 10:39:22 +00:00
Anantha Kesari H Y 12192da2c4 Modified for NetWare. 2003-01-03 08:34:34 +00:00
Sara Golemon 7b37272381 Added stream_get_wrappers() 2003-01-03 08:02:36 +00:00
Moriyoshi Koizumi f76df0ba1b Added test cases for iconv_strlen() and iconv_substr() 2003-01-03 05:48:51 +00:00
Moriyoshi Koizumi a3330b5ab3 Fixed iconv_mime_decode() so it would give more awareness to stateful codesets 2003-01-03 05:38:50 +00:00
Moriyoshi Koizumi e1dd919204 Fixed infinite loop of iconv_mime_encode() in case the specified line length is too short to contain a proper mime-encoded string 2003-01-03 05:34:05 +00:00
Moriyoshi Koizumi c703ad78d0 Give mo' shift-sequence awareness to iconv_mime_encode 2003-01-03 05:32:13 +00:00
Moriyoshi Koizumi 354a42fd5f More shift-sequence awareness for iconv_substr() 2003-01-03 05:28:25 +00:00
Moriyoshi Koizumi 1f8cee7666 Added missing casting operators 2003-01-03 05:26:44 +00:00
Moriyoshi Koizumi bf48e7bc9f MFB 2003-01-03 05:16:12 +00:00
Moriyoshi Koizumi 6144a7288e MFB: fixed shift-out sequence unawareness issue 2003-01-03 05:14:34 +00:00
Moriyoshi Koizumi f962ba6abb Fixed small leaks in array_map() in case the first parameter is NULL like
array_map(NULL, array(...));
2003-01-03 05:05:12 +00:00
449029d2df ChangeLog update 2003-01-03 01:37:02 +00:00
Harald Radi f1f96c86d1 fixing typo 2003-01-03 00:17:41 +00:00
foobar c74f56611b - Removed entries that are going to 4.3.1
- Grouped the entries a bit.
2003-01-03 00:06:23 +00:00
Stig Bakken 7f41f5d586 * allways fall back to PHP_SYSCONFDIR 2003-01-02 23:48:32 +00:00
Ilia Alshanetsky f65e8488d7 Fixed a small memory leak when a NULL variable is passed to
openssl_csr_sign() as the first argument.
2003-01-02 21:18:59 +00:00
d4f9701392 ChangeLog update 2003-01-02 20:00:47 +00:00
Ilia Alshanetsky 0ff59a1353 Fixed bug #21338 (crash inside html_entity_decode() when "" is passed).
Added test case for the bug.
2003-01-02 19:49:30 +00:00
Ilia Alshanetsky b46352043c Raise required OpenSSL version to 0.9.6. 2003-01-02 19:20:57 +00:00
174f6b6f88 rotate changelog 2003-01-02 18:48:06 +00:00
Derick Rethans b9e54cb693 - Fixed bug #21169: Compile Failure, and lots of warnings on UnixWare 2003-01-02 18:01:10 +00:00
Anantha Kesari H Y 455257974b NetWare related changes/modifications. 2003-01-02 14:29:00 +00:00
Zeev Suraski 895b5fc2b6 Fix .dsp 2003-01-02 14:19:29 +00:00
Zeev Suraski 77208ec4d6 Fix incorrect linkage of access-levels, when using private methods 2003-01-02 13:58:08 +00:00
Derick Rethans da9eb594c6 - Fix warnings on UnixWare 2003-01-02 13:31:10 +00:00
Derick Rethans 19ae16a693 - Fix "make test" when CC was set to something with a parameter 2003-01-02 13:01:33 +00:00
Frank M. Kromann 4da2e804e0 Allow base64 functions to be called from an extension buils as .so/.dll (iconv) 2003-01-01 18:11:18 +00:00
Zeev Suraski 70446a6416 build fixes 2003-01-01 13:26:17 +00:00
Derick Rethans 6197460836 - Fix tests if Zend Optimizer is loaded 2003-01-01 12:43:59 +00:00
Zeev Suraski 9b09ba614d Win32 build fix 2003-01-01 12:38:55 +00:00
Sebastian Bergmann a5f58cd6e5 Add filter.c, user_filters.c. Group stream related sources. 2003-01-01 12:36:43 +00:00
Sebastian Bergmann 0ab3a13612 Fix warnings. 2003-01-01 12:36:06 +00:00
Wez Furlong 97a0102b81 Tidy up 2003-01-01 11:21:40 +00:00
Wez Furlong f58628ca4d Move rot13 filter into a new filters.c source file.
Tidy up some other filter related code.

# win32 -> someone please add user_filters.c and filters.c to the .dsp
2003-01-01 11:04:44 +00:00
Stanislav Malyshev 30dafe2f42 use handler for Z_OBJPROP 2003-01-01 10:57:35 +00:00
Wez Furlong a28eaf64d0 Workaround for glibc 2.2.9x and later "a+" bug that does not seek to EOF for
files fopen()ed with that mode.
2003-01-01 09:58:17 +00:00
Zeev Suraski 57b9b0112d Fix Wez's problem 2003-01-01 09:34:39 +00:00
Moriyoshi Koizumi c4e8b2baab Added various functions that relies on the iconv facility:
iconv_strlen(), iconv_substr(), iconv_strpos(), iconv_strrpos(),
iconv_mime_encode(), iconv_mime_decode()

# hope this be a new year gift for you. Happy new year!
2002-12-31 19:13:16 +00:00
Wez Furlong 350b0bbeac Implement user-space filters.
See ext/standard/tests/file/userfilters.phpt for an example of their use.
2002-12-31 18:39:36 +00:00
Sebastian Bergmann 61ce6bc8f1 Bump year. 2002-12-31 16:18:29 +00:00
Sebastian Bergmann b506f5c8f8 Bump year. 2002-12-31 16:08:15 +00:00
Sebastian Bergmann 2c5d4b8c23 Bump year. 2002-12-31 15:59:15 +00:00
Rasmus Lerdorf f88e29bc0d Fix for bug #21311 2002-12-31 15:18:52 +00:00
Wez Furlong abc4b4bb99 Fix for #21304 (gzopen did not report errors on open; "a" mode broken) 2002-12-31 11:42:15 +00:00
Stanislav Malyshev 8814f36692 fix level of indirection 2002-12-31 09:42:28 +00:00
a6abc8f812 NEWS update 2002-12-31 01:33:05 +00:00
Ilia Alshanetsky 87e598e835 Changed ifdef to if. 2002-12-31 00:10:57 +00:00
Ilia Alshanetsky 87a8b04051 Fix ZTS build. 2002-12-31 00:04:52 +00:00
Ilia Alshanetsky 6f6bc82de7 Fixed bug #21045 (Apache 2 SAPI now supports the mod_php_memory_usage
log variable that allows users to log the memory usage of their PHP scripts).
2002-12-30 23:45:18 +00:00
Ilia Alshanetsky bfea989d21 Bug fixing news. 2002-12-30 19:48:24 +00:00
Ilia Alshanetsky 0acb52fc3b Fixed bug #21228 (broken check for ob_gzhandler).
Fixed a bug that made ob_start return incorrect return value.
2002-12-30 19:39:31 +00:00
Marcus Boerger 67f0a6f6c0 testing default handler should be a separate test 2002-12-30 19:20:11 +00:00
Marcus Boerger 9c2871a673 missing dba entry 2002-12-30 19:18:52 +00:00
Andrei Zmievski 4f8c44b091 Adjust the error message. 2002-12-30 18:30:50 +00:00
Marcus Boerger 33f364b5fc update dba NEWS 2002-12-30 17:58:15 +00:00
Marcus Boerger aa8e5cdde7 -disallow using db-<n> with libraries of different major versions
-disallow using db-4.1 with patch level < 25
-fix db-4.1
-added undocumented DB_FCNTL_LOCKING flag for version 3 and 4
# wow the sleepycat guys answered *very* fast
2002-12-30 17:42:55 +00:00
Stanislav Malyshev 0af3b5a692 Oops, fix it indeed 2002-12-30 17:19:32 +00:00
Stanislav Malyshev 37571334d9 Better check 2002-12-30 17:17:41 +00:00
a5ad437af8 Update. 2002-12-30 16:47:04 +00:00
Ilia Alshanetsky bd19dabefe Fixed bug #21226 (parse_url handling of urls without a path). 2002-12-30 16:42:49 +00:00
Derick Rethans d454becda8 - Whitespace 2002-12-30 15:03:50 +00:00
Derick Rethans eb8b1ac923 - euch 2002-12-30 14:08:25 +00:00
Marcus Boerger 32dda8b0cb ws 2002-12-30 13:09:03 +00:00
Marcus Boerger 4d2f7207c0 Add info function to handlers and return handler info when dba_handlers is
called with optional parameter full_info set true.
2002-12-30 13:07:30 +00:00
Marcus Boerger 426cf8eb57 fix state-machine in cases T_AAAA is not available 2002-12-30 11:59:22 +00:00
Marcus Boerger a213c71735 2nd part of the patch 2002-12-30 11:43:18 +00:00
Marcus Boerger 4b9e8fc899 -better parameter names for DBA_HND macros
-remove unnecessary notice
2002-12-30 11:32:37 +00:00
Derick Rethans e76d0043da - Align mssql comment and clarify DBA handler selection 2002-12-30 08:55:21 +00:00
Ilia Alshanetsky 1f50681813 Fixed bug #21149 (fixed handling of unterminated '['). 2002-12-29 21:02:17 +00:00
Ilia Alshanetsky 88d26985b8 Fixed bug #21267 (opening URLs that result in redirection to a relative
path was failing).
2002-12-29 20:01:33 +00:00
Ilia Alshanetsky c731daeda7 Fixed bug #21268 (session_decode() returned FALSE on success). 2002-12-29 18:50:55 +00:00
Zeev Suraski ac1133d364 Remove bogus ignores 2002-12-29 15:42:55 +00:00
Zeev Suraski 758caa9ba2 Update .dsp's 2002-12-29 15:41:44 +00:00
Marcus Boerger c69d034a87 Added support for db3/db4 error handling/information 2002-12-29 15:32:38 +00:00
Marcus Boerger 9b22813c4d Add a default handler that makes handler parameter to open functions
optional.
@Improved dba extension (Marcus)
@-Made handler parameter of dba_(p)open() optional.
@-Added php.ini option 'dba.default_handler' to specify a default handler.
2002-12-29 15:31:00 +00:00
Sara Golemon 45ff90cb18 Typo. 2002-12-28 19:40:03 +00:00
Sara Golemon 072d5c2575 When scanning for cc: headers, make sure the header is JUST cc: and not bcc: or original-cc: or <anything-printable>cc:
See Bugs # 21036 and # 20707
2002-12-28 19:32:45 +00:00
Sascha Schumann 955b27cd64 Fix order of library additions, so that the imap extension now builds
successfully with static imap/ssl libs.  configure was already failing
before.
2002-12-28 15:33:25 +00:00
Ilia Alshanetsky 8315a525ca Fixed bug #21229 (missing 3rd argument to php_module_startup). 2002-12-28 06:59:24 +00:00
Ilia Alshanetsky 097055a862 Make the version code get the version from the current Apache, rather then
the Apache PHP was compiled against.
2002-12-27 23:05:15 +00:00
Ilia Alshanetsky 648dd88b42 Added apache_get_version() & apache_get_modules() to Apache 1.X & Apache
Hooks sapis.
Made the module listing in Apache 2 not show the '.c' portion, to be
consistent with Apache 1.X.
2002-12-27 22:47:06 +00:00
Ilia Alshanetsky 572394db74 Added MINFO() to Apache 2, which displays the Apache version & all of the
loaded Apache modules.
Added apache_get_version() & apache_get_modules() functions.
2002-12-27 22:02:17 +00:00
Ilia Alshanetsky c955910ea0 Bug fixing news. 2002-12-27 20:23:29 +00:00
Ilia Alshanetsky 967d64ade5 Fixed bug #17098 (make Apache aware that PHP scripts represent dynamic data
and should not be cached). Fix suggested by daniel.eckl@gmx.de.
2002-12-27 19:59:09 +00:00
Stig Bakken ff8adda7c6 * 1.0 release notes 2002-12-27 19:31:56 +00:00
Stig Bakken 25684764cc * added "clear-cache" command 2002-12-27 19:31:37 +00:00
Stig Bakken 1d42e34c1b * 1.0 release 2002-12-27 19:01:19 +00:00
Stig Bakken d63ef03d7b * 1.0 version 2002-12-27 17:19:31 +00:00
Ilia Alshanetsky 22a2636d9d Made DBA tests not dependant on error reporting settings. 2002-12-27 04:46:40 +00:00
c9b374f8e0 Update. 2002-12-27 04:03:10 +00:00
Edin Kadribasic 586f68d820 Mention the fact that zlib extension is now built-in in win32 distro. 2002-12-27 03:16:01 +00:00
Edin Kadribasic a3c2f80d72 Resolved apperent cvs commit confict. 2002-12-27 02:55:37 +00:00
ebe402a9c3 NEWS update 2002-12-27 01:32:47 +00:00
c52bcebc09 ChangeLog update 2002-12-27 01:32:29 +00:00
Ilia Alshanetsky 3283752055 Bug fixing news. 2002-12-27 00:09:13 +00:00
Derick Rethans f3d3dd5bc8 - MFB 2002-12-26 23:45:05 +00:00
Georg Richter 4abcff7631 added Wez, Ilia & myself 2002-12-26 23:38:18 +00:00
Wez Furlong bb640840c3 Remove cruft that opened a stream that was never closed in get_meta_tags().
(probably my fault).
Noticed by Philip Olson
2002-12-26 22:35:00 +00:00
Sterling Hughes 457f22c198 if needle is empty free allocated memory 2002-12-26 20:52:42 +00:00
Sterling Hughes ca67d27fb2 remove memleak 2002-12-26 19:56:44 +00:00
Marcus Boerger 4041d4faed Add missing test for db4 handler 2002-12-26 19:55:06 +00:00
Andrei Zmievski 4121057117 do_inherit_method_check() is supposed to return 0 or 1, not SUCCESS or
FAILURE.
2002-12-26 16:27:59 +00:00
Edin Kadribasic 46219c714d MFB:
Made ZLIB extension built in on Windows. Fixes #21139.
2002-12-26 13:40:32 +00:00
03132bff12 ChangeLog update 2002-12-26 01:33:49 +00:00
George Schlossnagle 190867c800 fixed ws 2002-12-25 21:18:37 +00:00
George Schlossnagle abbf745211 fix for 21177 2002-12-25 20:38:37 +00:00
Derick Rethans b996b32031 - Add test for bug #21182 2002-12-25 20:08:36 +00:00
Ilia Alshanetsky fbcee73c8c Make range operate on the copies of the parameters rather then modify the
actual parameters.
2002-12-25 20:02:03 +00:00
33bdabbee2 ChangeLog update 2002-12-25 01:34:22 +00:00
Stefan Esser 66ebbb5ae1 fix compile warning 2002-12-24 23:46:17 +00:00
Stefan Esser e900f8c97b do correct casting 2002-12-24 23:28:05 +00:00
Ilia Alshanetsky 2e6e0f87dc Removed pointless assignment. 2002-12-24 23:19:54 +00:00
Ilia Alshanetsky 0a2d473df0 The -1 is no longer needed, since it is done automatically by strlcpy(). 2002-12-24 17:33:33 +00:00
Ilia Alshanetsky a747d1f864 Changed strncpy() to strlcpy(). 2002-12-24 17:30:48 +00:00
Ilia Alshanetsky 59b6ffee1e A variety of CS style fixes, which include:
* Changed all argument parsing to use the new zend_parse_parameters()
 * If a function is unavailable due to lack of support for a certain feature,
   do not make the function avaliable, rather then making it print an error
   saying that the functionality offered by the function is not avaliable.
 * Lots of WS fixes all over the file.
 * Change strcpy() to strncpy() to prevent possible buffer overflows.
Fixed a bug in ncurses_pair_content(), 1st parameter was wrong.
Fixed several function prototypes that failed to indicate that functions
accepted arguments by reference.
2002-12-24 17:20:33 +00:00
eb668bcd9b ChangeLog update 2002-12-24 01:31:43 +00:00
Melvyn Sopacua 0764c3101b Verify if gl_pathv is not NULL, which it is, when GLOB_NOMATCH isn't
supported and there are no matches.

# BSDi/Mac OSX are affected.
2002-12-23 18:33:46 +00:00
Stefan Esser 0bb1ff71d6 fix compile error on IRIX 2002-12-23 08:50:05 +00:00
Edin Kadribasic f13ecb9832 MFB:
Ignore the new name of the binary built. Allows cvsclean to work again
in sapi/cgi.
2002-12-23 03:35:38 +00:00
Wez Furlong 05ea039144 MFB: fpos_t -> off_t 2002-12-23 02:56:46 +00:00
d5b8ef54e9 ChangeLog update 2002-12-23 01:33:10 +00:00
Ilia Alshanetsky af55703d52 Fixed various memory leaks.
# Should this be MFHed?
2002-12-22 20:16:37 +00:00
Moriyoshi Koizumi 45f67837e6 Removed "%s" from format strings 2002-12-22 19:51:49 +00:00
Ilia Alshanetsky 0ae3050aa5 Fixed bug #21146. 2002-12-22 19:44:01 +00:00
Moriyoshi Koizumi d70f96550c php_error => php_error_docref 2002-12-22 19:16:09 +00:00
Moriyoshi Koizumi 9b3f810564 WS fix 2002-12-22 19:05:06 +00:00
Moriyoshi Koizumi dcc030f5ef Fixed bug #21144 2002-12-22 19:01:44 +00:00
Wez Furlong c5091eedf1 Forgot to include this in my previous commit for #21131 fix. 2002-12-22 18:06:27 +00:00
Wez Furlong efea12fec5 Fix for Bug #21131: fopen($file, 'a+') would incorrectly assume that
the stream position was at offset 0.
This corrects that assumption by querying the stream for it's position
when it detects the 'a' "flag" in the mode parameter to fopen.
Also added a test for plain files and amended the userstreams test to
take this into account.
2002-12-22 18:05:36 +00:00
Sascha Schumann 20e8bc31f0 (char *) vptr += expr; is refused by the IRIX compiler, so we use
vptr = (char *) vptr + expr; instead.
2002-12-22 16:34:13 +00:00
Sascha Schumann 280f4a4373 'index' is a function name in the C library, do not use it as variable name.
also, cast the 'void *' correctly to a 'char *' for manipulation
instead of an 'int'.
2002-12-22 16:03:28 +00:00
Wez Furlong 90c478664a A Simple fix for Bug #12360 (fsockopen timeout doesn't work).
Analysis:
On systems with HAVE_GETADDRINFO and IPV6 support, php_hostconnect would
attempt to connect to each possible address that matched the requested IP.

If the remote host:port combination are dropping packets this would cause the
first connection to timeout (after waiting for the full timeout duration).

PHP would then attempt the second address and wait the full duration again.

Solution:
If the first connection attempt times out, abort the connection loop.
2002-12-22 13:55:45 +00:00
Melvyn Sopacua e03bccb1ad Delete some security related env variables 2002-12-22 12:48:49 +00:00
f023f6f8fc ChangeLog update 2002-12-22 01:33:28 +00:00
Stig Bakken aded559898 * Windows fix from Edin 2002-12-22 01:32:01 +00:00
Stig Bakken c4ddda3e23 * set default xml-rpc cache ttl to 1 hour 2002-12-22 01:31:13 +00:00
Frank M. Kromann ca4a0cdb8a Create php.exe in cli directory to avoid conflict with the cgi version 2002-12-21 22:43:47 +00:00
Edin Kadribasic 17687a4fff MFB:
Updated list of bundled windows extensions compiled by
Christoph Grottolo <cg@gordimer.net>
2002-12-21 22:19:51 +00:00
Edin Kadribasic 473366d6e7 MFB: Reflect recent changes to the build process. 2002-12-21 22:05:55 +00:00
Moriyoshi Koizumi 9dc6f0c5f2 Made auth information inaccessible under safe mode as discussed in the list 2002-12-21 21:50:28 +00:00
Melvyn Sopacua 2169eb2ccc MFB: There won't be a warning/fix on this, so remove the test 2002-12-21 21:01:52 +00:00
Ilia Alshanetsky 29d507d224 Moved the bug fix news entry to 4.3.0 section, to indicate that it has been
MFHed.
2002-12-21 20:37:17 +00:00
Andrei Zmievski 2feb1cf6d7 MFB. 2002-12-21 20:12:08 +00:00
Ilia Alshanetsky da498edd5e Bug fixing news & range() changes. 2002-12-21 18:06:04 +00:00
Ilia Alshanetsky 98e85ae80b Fixed bug #20987 (no handling for client certificates). 2002-12-21 18:03:46 +00:00
Derick Rethans 16e5459f94 MFB: Fix typo 2002-12-21 17:48:37 +00:00
Melvyn Sopacua 9dc1412e46 MFB: Skip the test, until a proper descision is made 2002-12-21 16:58:23 +00:00
Moriyoshi Koizumi 4456b3274f WS 2002-12-21 06:34:31 +00:00
Moriyoshi Koizumi f4883b916c Added some notes about the brigade bug detection 2002-12-21 06:33:19 +00:00
550aedb63d ChangeLog update 2002-12-21 01:34:00 +00:00
Andrei Zmievski 64ab75c206 *** empty log message *** 2002-12-21 01:11:44 +00:00
Andrei Zmievski ddea2a190f Alias dba_popen() to dba_open() until persistent STDIO streams are
implemented.
2002-12-21 01:09:27 +00:00
Sascha Schumann 76a158a336 test commit 2002-12-20 20:53:10 +00:00
Stefan Esser e4e299614e need more space 2002-12-20 19:37:07 +00:00
Georg Richter d5f02c553b fixed some warning when using external 4.x libs 2002-12-20 18:52:27 +00:00
Frank M. Kromann ad69583ba1 Fixing Win32 build by adding missing libraries 2002-12-20 18:40:31 +00:00
Sara Golemon 13308b5a94 Minor clarification in meaning of bitmask constants
/* PHP_DNS_xx = 1<<(T_xx-1) */
T_CNAME = 5 ergo PHP_DNS_CNAME should be 0x00000010.
T_SOA = 6 ergo PHP_DNS_CNAME should be 0x00000020.
2002-12-20 18:34:56 +00:00
Marcus Boerger efd314e767 -Fix memory handling of persistent dba connections.
-Update tests.
# cdb and flatfile still FAIL for dba_popen since the known streams problem
2002-12-20 17:47:58 +00:00
Frank M. Kromann 710e49a30b Make sure the debug version is created in the right directory 2002-12-20 17:34:34 +00:00
Ilia Alshanetsky 3a4bf3f904 When low & high are the same return an array containing the low value.
Added support for float values and handling of numeric values being passed
as strings.
Added a test case for range().
2002-12-20 17:16:31 +00:00
Marcus Boerger d795243db3 @Make uniqid() parameters optional and allow any prefix length. (Marcus) 2002-12-20 17:06:25 +00:00
Marcus Boerger 8652e8ac27 MFB 2002-12-20 17:04:33 +00:00
Andrei Zmievski c45f76112f At least this problem exposed some leaks.. 2002-12-20 16:45:34 +00:00
Marcus Boerger 26038795f8 -disable uniqid() when required lib functions not available
-emit an error when uniqid() will fail
-make more_entropy parameter default to true for CYGWIN
2002-12-20 16:34:42 +00:00
Moriyoshi Koizumi 740ee5df1c Recommited the patch 2002-12-20 15:51:35 +00:00
Sterling Hughes 3cb16973ef silly error, will MFH 2002-12-20 15:44:51 +00:00
Edin Kadribasic 3c94150191 MFB: Make sure cli install dir is created before trying to install in it. 2002-12-20 10:12:15 +00:00
Andi Gutmans a58e6cc8ad - Add comment in macro and remove some now unneeded code 2002-12-20 08:42:50 +00:00
James Cox 6f6631ad14 testing cvs commit.. 2002-12-20 07:08:47 +00:00
84b107924d ChangeLog update 2002-12-20 01:34:57 +00:00
Ilia Alshanetsky 709681e085 Make IS_ABSOLUTE_PATH use the IS_UNC_PATH macro rather then duplicate the
code in the IS_UNC_PATH macro.
2002-12-20 00:41:41 +00:00
Melvyn Sopacua a4d56067e2 MFB: libtool detection 2002-12-20 00:28:08 +00:00
Wez Furlong 602734c7d9 Correct mistake introduced by my last commit on these files;
*_from_pipe() is for process-pipes created by fopen, not generic pipes
created from proc_open().
Correctly implemented the fifo/pipe check for *_from_file() and it seems
to be working correctly now.
2002-12-19 20:23:50 +00:00
Edin Kadribasic 183ebe3e14 MFB:
Making windows build system changes according to proposal:
http://news.php.net/article.php?group=php.dev&article=92682
2002-12-19 18:30:14 +00:00
Ilia Alshanetsky 594c3808d4 Fixed bug #21098. 2002-12-19 17:06:36 +00:00
Edin Kadribasic d29309eb68 MFB:
Making build system changes according to proposal:
http://news.php.net/article.php?group=php.dev&article=92682
2002-12-19 17:02:40 +00:00
Moriyoshi Koizumi 58037935f6 Appended "\n" as suggested by Derick. 2002-12-19 15:29:09 +00:00
Anantha Kesari H Y c93d64375d NetWare related files added and changes/modifications done for the existing ones. 2002-12-19 11:24:45 +00:00
Anantha Kesari H Y 854721d723 NetWare related changes/modifications. 2002-12-19 11:23:58 +00:00
Anantha Kesari H Y e46b0bfa79 Netware related changes/modifications. 2002-12-19 11:12:04 +00:00
Edin Kadribasic 2fc8358e3a MFB: Remove dependancy on libtool library which is no longer needed. 2002-12-19 10:49:05 +00:00
1a30bfd76c ChangeLog update 2002-12-19 01:33:16 +00:00
Edin Kadribasic ff54f76f71 MFB: Reverted previous patches as suggested by Andi. 2002-12-19 00:13:43 +00:00
Moriyoshi Koizumi d2fa4670dc Prevented test failure caused by LF code variety 2002-12-18 23:06:27 +00:00
Moriyoshi Koizumi fdded38816 Added a test case for bug #20539 2002-12-18 22:54:34 +00:00
Pierre Joye baea3414a3 Fix a crash while using an invalid color with imagesetstyle, see the sample
script in the manual to reproduce it :)
2002-12-18 21:13:21 +00:00
Moriyoshi Koizumi 978340cfa5 An intuitive attempt to hunt the bug. 2002-12-18 19:32:44 +00:00
Moriyoshi Koizumi 1bfa8be474 Added entry for the new feature of array_search() 2002-12-18 16:38:36 +00:00
9e4d2d4594 Update 2002-12-17 19:52:24 +00:00
532ed0edf3 Finally put the changelog back online. 2002-12-17 19:48:17 +00:00
Derick Rethans 8507eb00f6 - Also send reports when there are no failed tests 2002-12-17 19:07:15 +00:00
Frank M. Kromann e93a1a92ec Fixing WIn32 build after adding support for FreeTDS 2002-12-16 22:44:08 +00:00
Frank M. Kromann 5664a358fa Allow the native MSSQL extension to be compiled with FreeTDS on *nix platforms.
This will make the whole MSSAL API available on these platforms.
@Allow compilation of mssql extension on *nix.
2002-12-16 22:26:49 +00:00
Stig Bakken 24975495a7 * fix one missing DIRECTORY_SEPARATOR and a typo 2002-12-16 20:44:50 +00:00
Sergey Kartashoff afa0e1e03e - mnogosearch extension updated to compile with mnogosearch-3.2.8 2002-12-16 19:17:10 +00:00
Marcus Boerger 59656cc706 fix compiler definition tests 2002-12-16 17:52:43 +00:00
Marcus Boerger 50af908f01 fix compiler definition tests 2002-12-16 15:53:46 +00:00
Ilia Alshanetsky 5bad812dad A better, strtok() free implementaion of php_disable_functions(). 2002-12-16 15:43:52 +00:00
Marcus Boerger 2d3b3fd97f fix test 2002-12-16 15:19:57 +00:00
Marcus Boerger 9042a9ddbd Add version check since this will be available since php 4.4. 2002-12-16 15:04:12 +00:00
Marcus Boerger da1a617f6b forgot to remove that dot 2002-12-16 14:54:35 +00:00
Marcus Boerger 5dc4d38204 -Add constant that shows whether or not exif uses mbstring.
-Fix tests
2002-12-16 14:48:00 +00:00
Sascha Schumann e5b86174af CFLAGS_CLEAN was not properly defined 2002-12-16 13:39:27 +00:00
Marcus Boerger 6e055f9a77 change mbstring detection 2002-12-16 09:58:49 +00:00
Derick Rethans d8f86e725a - MFB 2002-12-16 09:11:00 +00:00
Ilia Alshanetsky f620fdbed3 A better memory leak patch. 2002-12-16 07:46:36 +00:00
Marcus Boerger c1be81a84e ws 2002-12-15 18:49:07 +00:00
Marcus Boerger 05436b1378 MFB: gd uses float instead of double 2002-12-15 18:16:11 +00:00
Ilia Alshanetsky cc4748139c Close log file on shutdown. 2002-12-15 07:03:32 +00:00
Ilia Alshanetsky 078dfe8d57 Fixed a memory leak. 2002-12-15 06:44:30 +00:00
Ilia Alshanetsky 11dbaa39d6 MFZE2 2002-12-14 23:56:44 +00:00
Marcus Boerger 16694d3500 Fix build when mbstring is a shared module or dll under windows 2002-12-14 19:53:20 +00:00
Pierre Joye 137beb12ca Do not allow AA if not trueColor (imageantialias does nothing) 2002-12-14 19:23:29 +00:00
Marcus Boerger 9455657a7a Bugfix: #21010 (Here it's maker (manufacturer) instead of marker) 2002-12-14 17:49:19 +00:00
Stefan Esser 75d8056e11 cleanup 2002-12-14 10:45:25 +00:00
foobar c07f7c8df8 MFB: Fix bug #20995 2002-12-14 09:33:37 +00:00
Melvyn Sopacua 43202b5b95 Add testcase for bug #20993 2002-12-13 18:40:39 +00:00
Marcus Boerger ac96f76730 Add missing entry 2002-12-13 12:04:30 +00:00
Marcus Boerger c633abdc7f Fix cli build for cygwin 2002-12-13 10:32:03 +00:00
Marcus Boerger 95c701d328 MFB: ZTS fix by Ilia 2002-12-13 09:17:04 +00:00
Vlad Krupin e969d788bf Fix for bug 19727. dBase5 (at least for windows) seems to allow 1024 fields 2002-12-13 03:09:52 +00:00
Stig Bakken 854b9b9ac1 * update release notes, remove warning 2002-12-13 02:20:33 +00:00
Stig Bakken 3396ace7cb * fix version/date 2002-12-13 02:11:23 +00:00
Stig Bakken 976aef1ccf * introduce php_bin config parameter
* use PHP_PEAR_<PARAM_NAME> environment variables for defaults
  (for example PHP_PEAR_PHP_DIR)
* Windows cleanups
2002-12-13 02:10:23 +00:00
Stig Bakken e5dd8161e6 * _parseArgs bugfix 2002-12-13 02:07:22 +00:00
Moriyoshi Koizumi 92d5faca60 MFB 2002-12-12 21:44:53 +00:00
Moriyoshi Koizumi d679e5d2aa Added a test case for bug #20934 2002-12-12 21:42:17 +00:00
Stefan Esser 7924bf8705 remove extra char in case of binary/money fields 2002-12-12 21:30:39 +00:00
Ilia Alshanetsky 7a282ddcfd Fixed bug #20974 (added missing sanity check). 2002-12-12 21:17:36 +00:00
Melvyn Sopacua 44b7c16b03 Fix for BSD's (possibly others):
Accept system default, for the index. Don't initialize it.
2002-12-12 18:50:26 +00:00
Wez Furlong c5d4e4b321 MFB: popen/pclose and proc_open/proc_close fixes. 2002-12-12 17:51:25 +00:00
Ilia Alshanetsky 2d8945247b Fix a possible E_NOTICE warning message. 2002-12-12 16:14:32 +00:00
Wez Furlong 81c02040f0 Attempt to add more entropy for key generation. 2002-12-12 15:50:11 +00:00
Wez Furlong 3591c3b8e9 MFB streams news 2002-12-12 15:24:00 +00:00
Ilia Alshanetsky 53b333d153 Fixed misspelling of the Greek letter lambda,
noticed by jmartin-php@notamusica.com.
2002-12-12 14:50:58 +00:00
Marcus Boerger c2078cdabf php_error -> php_error_docref conversion fix (noticed by derick) 2002-12-12 14:12:42 +00:00
Ilia Alshanetsky e27f3fc7e1 Bug fixing news. 2002-12-12 13:52:26 +00:00
Moriyoshi Koizumi d0c781cc84 Jani happification 2002-12-12 13:44:18 +00:00
Wez Furlong 1ef74a4f79 Patch for #20936 (openssl: public key handling was broken).
Thanks to <jeroen@derks.it> for the patch.
2002-12-12 13:42:23 +00:00
Ilia Alshanetsky 75c180f242 Fixed bug #20927 and updated the test case for the bug. 2002-12-12 13:38:19 +00:00
Moriyoshi Koizumi 131c47b75d Bug fixing news 2002-12-12 13:31:19 +00:00
Moriyoshi Koizumi 3bbcb0d0dd Fixed bug #20934 (htmlspecialchars returns latin1 from UTF-8) 2002-12-12 13:25:51 +00:00
Marcus Boerger a40ccefd32 php_error -> php_error_docref 2002-12-12 13:08:59 +00:00
Marcus Boerger 53309aace0 SIGIOT may not be defined in cygwin 2002-12-12 12:23:32 +00:00
Marcus Boerger 835c4dedbb typeconversion is needed here for cygwin 2002-12-12 12:18:44 +00:00
Marcus Boerger 26b101dd1b O_ASYNC is not defined in cygwin 2002-12-12 12:15:10 +00:00
Edin Kadribasic 8eb1791790 MFB: DOM/XSLT support in win32 build (bug #20485). 2002-12-12 10:56:33 +00:00
Ilia Alshanetsky 8227141218 GD library news. 2002-12-11 23:11:31 +00:00
Ilia Alshanetsky 20bc6a09e0 Added check for availability of jpeg support. 2002-12-11 22:37:05 +00:00
Ilia Alshanetsky 67aca57c3b Fixed build with non-bundled GD. Hidden the anti-alias functions when
non-bundled GD is used and made imagecreatefromxpm() unavailable because
of a bug in the external GD library.
2002-12-11 22:25:23 +00:00
Pierre Joye 5acfdf3ca1 Fix brightness filter (argument ingnored) 2002-12-11 22:23:51 +00:00
Ilia Alshanetsky a88a99fb9d White space fixes. 2002-12-11 21:55:45 +00:00
Ilia Alshanetsky f4b5f0904b Syncronize bundled gd sources with that of gd 2.0.9, affected functions
are: gdImageBrushApply() & gdImageCopyResized().
2002-12-11 21:52:29 +00:00
Pierre Joye 983d8e5efd Add antialias flag to image structure
Add AA support
2002-12-11 20:47:26 +00:00
Pierre Joye 7ec74f64f9 Add gdImageAAline (antialiased line)
Add AA support for gdImagePolygon
2002-12-11 20:46:52 +00:00
Pierre Joye 221413e5ef Remove double definition of imagesettile
Add imageantiallias
2002-12-11 20:45:47 +00:00
Pierre Joye 4d522e3686 Add imageantialias(im, flag)
Add AA support for bundled imageline
2002-12-11 20:44:44 +00:00
Melvyn Sopacua 4b3b409b48 Add testcase for reported wordwrap bug 2002-12-11 20:22:42 +00:00
Derick Rethans c4342de561 - MFB 2002-12-11 20:13:43 +00:00
Ilia Alshanetsky 2ab549c5f2 Added missing &. 2002-12-11 20:04:23 +00:00
Ilia Alshanetsky c194d9333d Added getopt() test. 2002-12-11 17:38:28 +00:00
Ilia Alshanetsky 30f83207fe Ask the user for their e-mail address so that we can contact them if need be. 2002-12-11 16:49:00 +00:00
Sara Golemon 04d6f6ab50 Renamed bc_powmod to bcpowmod to keep it inline with existing module
functions.  Fixed whitespace problem.
2002-12-11 16:28:16 +00:00
Ilia Alshanetsky 5f9681ff80 Added missing variable to parameter retrieval. 2002-12-11 15:32:35 +00:00
foobar 3fc83fd8e3 - ws fixes
- // -> /* */ (No C++ comments in c code!)
- #if / #else / etc. have to start from first column.
2002-12-11 15:25:39 +00:00
foobar 210effe877 - Some more missing .cvsignore files. 2002-12-11 15:16:05 +00:00
foobar f059f21e96 missing entry 2002-12-11 14:45:42 +00:00
foobar cbb2c5a073 missing file 2002-12-11 14:43:33 +00:00
Rui Hirokawa 3d324676a5 fixed lack of variable initialization bug. 2002-12-11 14:39:37 +00:00
Abdul-Kareem Abo-Namous 089f1b5771 fixed string comparison which brought up a gcc warning. 2002-12-11 14:18:40 +00:00
Marcus Boerger e0c983a013 Warnings and Notices when lock modifiers for dba_(p)open are used wrong.
This finally closes bug #20828 (and i hope it must not be reopened)
2002-12-11 10:37:38 +00:00
Edin Kadribasic f84aff8f5c Fix for #20539 (patch by Moriyoshi Koizumi). 2002-12-11 10:24:02 +00:00
foobar d1d73b1b06 snow..not again.. 2002-12-11 08:54:04 +00:00
foobar 8635af07d5 Fixed bug #20298: LDFLAGS were not passed to the static apache module build 2002-12-11 08:41:45 +00:00
Georg Richter 19a13f29b0 fixed security bug in libmysql 2002-12-11 08:31:56 +00:00
Georg Richter 230f4ebb06 Security fix (merged from 3.23.54) 2002-12-11 08:28:41 +00:00
Ilia Alshanetsky 52d0f1c143 decode variable is only used when mbstring is avaliable. 2002-12-11 07:37:30 +00:00
Ilia Alshanetsky 08e020a870 ZTS fix. 2002-12-11 07:29:51 +00:00
Ilia Alshanetsky dc391673d0 Fixed compiler warning. 2002-12-11 02:51:06 +00:00
Ilia Alshanetsky 533d3273bd Fix ZTS build 2002-12-11 02:30:00 +00:00
Ilia Alshanetsky 9a24983487 On Win32 make PHP treat UNC paths as absolute paths, this should solve bugs
such as #20831. Thanks to Wez Furlong for isolating the problem.
2002-12-11 00:32:33 +00:00
Marcus Boerger a6e9674bfd add missing comment 2002-12-10 22:51:09 +00:00
Marcus Boerger b94e0d9eac LOCK_EX is not allowed in read mode -> try using existing .lck file in read
only mode only when in read mode.
2002-12-10 22:49:33 +00:00
Wez Furlong ac8469bd55 No longer experimental 2002-12-10 22:21:34 +00:00
Wez Furlong 9746be4779 use php_error_docref and tidy up some WS/coding standards. 2002-12-10 22:18:58 +00:00
Marcus Boerger 17117063ce -remove second attempt to close lock file
-default to lock on db file instead on .lck file.
-try to use existing .lck file and only create it on failure (allows ro access)
2002-12-10 22:02:52 +00:00
Marcus Boerger dbf4bcc08b stick to "check <what> <result>" scheme, do not repeat messages and
align messages correctly.
2002-12-10 21:53:02 +00:00
Stefan Esser e5dbcb0890 fixing cut&paste bug 2002-12-10 20:18:25 +00:00
Ilia Alshanetsky 60a5aeef43 Fixed a few compile warnings and one compile error. 2002-12-10 20:16:30 +00:00
Marcus Boerger d1c70a6417 directory values are optional 2002-12-10 20:11:41 +00:00
Marcus Boerger 644bd60d29 remove not wanted skeleton comment and align configure message 2002-12-10 20:09:35 +00:00
Ilia Alshanetsky 2b063828e0 Fixed build with GD 1.8.4 2002-12-10 19:45:58 +00:00
Frank M. Kromann 62fb872a4d Fixing ZTS Build 2002-12-10 19:28:04 +00:00
Sara Golemon 51c9f2c64b Added support for libbcmath's bc_raisemod function as bc_powmod() 2002-12-10 19:04:27 +00:00
Ilia Alshanetsky 91a6272972 Fixed win32 build. 2002-12-10 18:00:47 +00:00
Ilia Alshanetsky 99f2b9674f Fixed build with GD 1.8.4 2002-12-10 17:57:41 +00:00
Edin Kadribasic 28c32e1fc8 MFB: Fix ZTS build. 2002-12-10 17:07:40 +00:00
Ilia Alshanetsky e982d5c7f0 MFB 2002-12-10 16:39:59 +00:00
foobar 8416a0433a This extension requires cyrus-imap >= 2.0.8 2002-12-10 16:34:20 +00:00
Ilia Alshanetsky 3c9a6a8890 Removed one more unneeded check. 2002-12-10 15:58:31 +00:00
Ilia Alshanetsky ecc9c539d2 Removed a pointless check. Thanks Stefan. 2002-12-10 15:36:26 +00:00
Stefan Esser f481a209b7 fixing crashbug
patch by freddy77@angelfire.com
2002-12-10 15:18:01 +00:00
Marcus Boerger 26c5c323ab -make those debug messages 2002-12-10 14:35:13 +00:00
Marcus Boerger 922ce573cf -when required haeder was not found --with-cdpf was simply ignored. I
changed this to be an error.
-cpdf did not check for --with-jpeg-dir and --with-tiff-dir
2002-12-10 14:31:00 +00:00
Marcus Boerger cbab922570 "of cause" should have been "of course" but is not needed anyway
#noticed by Zeev
2002-12-10 11:21:30 +00:00
Zeev Suraski 66aba3c568 Fix check to allow for static+access level modifiers 2002-12-10 09:04:12 +00:00
Ilia Alshanetsky aa4c85dda1 Fixed bug #20907, patch by m-arai@sco.bekkoame.ne.jp. 2002-12-10 00:10:27 +00:00
Ilia Alshanetsky 04a16f914c Replaced deprecated APR_BRIGADE_FOREACH macro. 2002-12-09 18:45:32 +00:00
foobar 8a8041befe fix typos 2002-12-09 18:30:50 +00:00
foobar 31415ad2b5 Make this actually work too. 2002-12-09 18:29:22 +00:00
Wez Furlong 58210f9232 Centralize fopencookie test 2002-12-09 18:29:07 +00:00
foobar 44aec93861 Fix the build with new cyrus and sasl2 libs 2002-12-09 18:05:37 +00:00
Marcus Boerger 85f1caeb14 Recheckin as unix
# *** sorry ** a new diff tool converted it to dos before last comit *** sorry ***
2002-12-09 18:03:00 +00:00
Marcus Boerger ba534ac7c8 Added open modifier '-' to skip/ignore locking. See bug #20828, #20858 2002-12-09 17:54:13 +00:00
Melvyn Sopacua 2421e79b60 Fix make install target on Cygwin, bug #20807 2002-12-09 17:02:38 +00:00
Wez Furlong ca6b002e4c MFB: zlib stream tests 2002-12-09 16:43:15 +00:00
Wez Furlong 5029c73096 Emulate fopencookie on *BSD systems.
Patch mostly from Melvyn Sopacua <msopacua@idg.nl>
2002-12-09 16:14:28 +00:00
Moriyoshi Koizumi 4974f268a6 @- Let array_search() accept objects as a needle under ZendEngine2. (Moriyoshi) 2002-12-09 15:54:38 +00:00
Sascha Schumann 7b2fd2c6c9 Use $(INSTALL) rather than cp to install modules.
$(INSTALL) will usually unlink the target file first, so that in-memory
instances of the old file don't get simply overwritten (and crash and burn).
2002-12-09 15:32:17 +00:00
Edin Kadribasic 3994fbbc86 MFB: Fix for #20894. 2002-12-09 13:35:57 +00:00
Zeev Suraski 32b100e6cb - Allow variables to have both 'static' modifier and an access level.
NOTE:  This only works at the syntax level right now (parser).  It
         doesn't actually work as of yet - all statics are considered
         public for now
- Prevent users from putting more restrictions on methods in derived classes
  (i.e., you cannot make a public method private in a derived class, etc.)
2002-12-09 12:10:17 +00:00
foobar 085f362ae3 T_AAAA is not always available. 2002-12-09 11:50:15 +00:00
Sebastian Bergmann ba5764ab39 Fix build. 2002-12-09 11:45:46 +00:00
Wez Furlong f4ca743d66 MFB zlib related fixes
(sorry I didn't get around to doing this sooner)
2002-12-09 10:54:20 +00:00
Wez Furlong 164130ed22 MFB: #20831 fix 2002-12-09 10:38:35 +00:00
Andi Gutmans 9283ff3ab6 - Fix a bug which I just introduced. 2002-12-09 08:36:36 +00:00
Andi Gutmans 60a4fa66cf - Fix typo 2002-12-09 08:31:44 +00:00
Andi Gutmans 757cd19aff - Improvements 2002-12-09 08:27:23 +00:00
Christian Stocker bda98029b4 PHP_FALIAS for doc_get_elements_by_tagname got lost 2002-12-09 08:14:15 +00:00
Andi Gutmans 671c6bb4c3 - First attempt to improve memory manager during realloc()'s 2002-12-09 08:14:00 +00:00
Ilia Alshanetsky 8f6d5dc775 Fixed a color mixup in gdImageCopyResampled() when dealing with true-color
images & brought the code up to PHP coding standards.
2002-12-08 21:07:13 +00:00
Harald Radi 0c4dc0afdf update todo 2002-12-08 19:05:43 +00:00
Harald Radi 3be2fdd14a initial checkin 2002-12-08 19:05:02 +00:00
Zeev Suraski 8f491470a1 Remove comment 2002-12-08 14:10:58 +00:00
Zeev Suraski dc5c790a49 Treat the absence of an access type just as if 'public' was supplied 2002-12-08 14:09:43 +00:00
Moriyoshi Koizumi 93ee146d0e Fixed stream leaks 2002-12-08 10:23:50 +00:00
Moriyoshi Koizumi 8d1b2bf8a5 Prevented return_value from being freed() twice 2002-12-08 09:54:30 +00:00
Sara Golemon a4d6863ee5 Bug #17174 Added IPv6 (AAAA record) support to dns_check_record() also added support to dns_get_record 2002-12-08 08:14:43 +00:00
Marcus Boerger 90d9299e51 Updated error message 2002-12-07 23:33:41 +00:00
Marcus Boerger f01fa3e02e Updated error message 2002-12-07 23:21:50 +00:00
Zeev Suraski 68aa19445b Simplify/fix inheritance checks 2002-12-07 21:46:12 +00:00
Zeev Suraski ce69b6f6ee Support private/protected constructors 2002-12-07 21:37:09 +00:00
Timm Friebe b9fa1813b2 - Fixed three memory leaks
- Fixed segfault with sybase_unbuffered_query() and unfetched resultsets
2002-12-07 19:49:31 +00:00
Sebastian Bergmann 81b1ed9ff3 Update. 2002-12-07 16:47:44 +00:00
Ilia Alshanetsky 66e40c013d Bug fixing news. 2002-12-07 16:15:46 +00:00
Ilia Alshanetsky 683251eba3 Fixed bug #20796. $_GET/$_POST/$_COOKIE data can get overwritten when
register_globals are on and input contains arrays.
2002-12-07 16:05:27 +00:00
Zeev Suraski c087d9e9e4 Fix error messages 2002-12-07 15:53:37 +00:00
Zeev Suraski e156edb1d0 Remove unintentional code 2002-12-07 15:52:08 +00:00
Andi Gutmans 1d1a796b58 - Dissallow using parent, self and main as class names 2002-12-07 15:51:25 +00:00
Marcus Boerger 8e268d2816 Adding a test for abstract class instanciation 2002-12-07 14:27:29 +00:00
foobar 495f544d4b sync 2002-12-07 12:14:42 +00:00
Sander Roobol 63519faca0 sync with branch 2002-12-07 11:27:59 +00:00
Sander Roobol 29529daebd Forgot to add this entry... 2002-12-07 11:21:44 +00:00
Frank M. Kromann 7f3783ec15 fixing code style 2002-12-07 06:05:06 +00:00
Ilia Alshanetsky 8425dbd0bc Fixed bugs #20725 & #20860. Post form variables get lost if the uploaded
files cannot be written to disk.
2002-12-07 00:48:13 +00:00
Frank M. Kromann ac2f1624d7 Removing unused code and making sure headers are send when called from imap_mail() 2002-12-06 22:56:57 +00:00
Frank M. Kromann 0d812352be Fixing a possible strcat on a NULL pointer 2002-12-06 22:52:31 +00:00
Moriyoshi Koizumi 3500c239a0 Fixed build with autoconf-2.54 2002-12-06 18:25:39 +00:00
Ilia Alshanetsky 3bc8512cf0 Added test case for bug #20865. 2002-12-06 17:46:26 +00:00
Ilia Alshanetsky ed7c3bfe0e Fixed bug #20865, array_key_exists() could not locate NULL keys. 2002-12-06 17:35:52 +00:00
Zeev Suraski e062dffe6c - Implement public/protected/private methods.
- Prevent instantiation of classes with abstract methods.
Based in part on Marcus's patch.
2002-12-06 17:09:44 +00:00
Marcus Boerger e0a972c061 cpdf + bundled gd
#maybe someone finds a better solution (perhaps in config) and comitts it
2002-12-06 16:33:57 +00:00
Abdul-Kareem Abo-Namous 646c4747b4 added support for multiple character sets.
OCILogon now has a forth optional parameter, which is the character set requested by the string (i.e. we8iso8859p1). when left blank, NLS_LANG or default is used.

config.m4 was changed to identify Oracle 9+ which is needed for this feature. all other oracle versions (lesser) fall back to the old behaviour.
2002-12-06 13:44:35 +00:00
Sebastian Bergmann b3d0cca0e6 A bit of an update for the sapi/servlet installation guide. 2002-12-06 06:44:29 +00:00
Sebastian Bergmann 27ff466cbc Deprecate sapi/fastcgi. 2002-12-06 06:08:17 +00:00
Ilia Alshanetsky 33de9befa1 Fixed bug #20812, ftp_get returned NULL on success instead of TRUE. 2002-12-06 06:07:40 +00:00
Pierre Joye dda7acaad5 Add imageistruecolor 2002-12-06 02:16:06 +00:00
Stig Bakken 1ef49991ff * fix upgrade-all output 2002-12-06 00:10:10 +00:00
Marcus Boerger ae35c4731f php_error -> php_error_docref 2002-12-05 23:18:28 +00:00
James Cox 2cca05a32a more rain 2002-12-05 23:17:59 +00:00
James Cox 0704182de1 rainy and cold here. 2002-12-05 23:06:40 +00:00
James Cox 1d5ee6f74d touch again. 2002-12-05 22:55:25 +00:00
Ilia Alshanetsky d6c29c781e Fixed a memory leak inside heb_number_to_chars(). 2002-12-05 22:46:54 +00:00
James Cox a43d2960ec touch2. 2002-12-05 22:35:11 +00:00
James Cox e93f60e651 touch 2002-12-05 22:31:18 +00:00
Ilia Alshanetsky c668055159 Remove pointless checks for array_init() return values. 2002-12-05 22:28:02 +00:00
Marcus Boerger 4ce4a1c32c php_error -> php_error_docref 2002-12-05 21:53:25 +00:00
Marcus Boerger 8ed84254cd -php_error -> php_error_docref 2002-12-05 21:46:08 +00:00
Sara Golemon ad65d01cbe Bug #20746. Renamed aggregation_info() to aggregate_info() per naming conventions and created alias for BC. 2002-12-05 21:20:47 +00:00
Marcus Boerger 49a99a98f4 -php_error -> php_error_docref
-removed some cases where emalloc result was tested
2002-12-05 20:59:49 +00:00
Marcus Boerger 3cf581b1b3 correct code that is guarded by "#if 0" 2002-12-05 20:41:55 +00:00
Marcus Boerger 9a04528061 fix ZTS build 2002-12-05 20:39:43 +00:00
Marcus Boerger dcfe988820 php_error -> php_error_docref 2002-12-05 20:13:35 +00:00
Marcus Boerger 47b0e79b1a -fix a warning that was an error
-php_error -> php_error_docref
2002-12-05 20:01:31 +00:00
Ilia Alshanetsky 7364e3b771 Fixed bug #12556, updated the test for this bug. 2002-12-05 20:01:19 +00:00
Marcus Boerger cf5d2e79b9 fix debug only 2002-12-05 19:49:12 +00:00
Derick Rethans 83741be445 - Renamed snmpv3_* to snmp3_*
- Conversion to php_error_docref
- Whitespace fixes
2002-12-05 19:33:03 +00:00
Melvyn Sopacua bd06d48e56 Test data 2002-12-05 19:30:28 +00:00
Melvyn Sopacua 76436b8820 Add a testcase for this bug 2002-12-05 19:29:45 +00:00
Marcus Boerger 19d5e535c0 Remove unnecessary code here 2002-12-05 15:52:20 +00:00
foobar f8c050395c ws fix (bug: #20808) 2002-12-05 15:44:27 +00:00
Marcus Boerger 373361d9c4 Return FALSE on error as mentioned by John Coggeshall.
See Bug #20822
2002-12-05 12:39:00 +00:00
Rasmus Lerdorf 4c749f08c0 Fix build 2002-12-04 23:21:30 +00:00
Ilia Alshanetsky 8d4b717518 Added GD image conversion tests. 2002-12-04 21:04:07 +00:00
Ilia Alshanetsky 5779f9bb0f Made imagecreatefromxpm() work once again. 2002-12-04 20:58:04 +00:00
Ilia Alshanetsky f3a253a4a0 Fixed a typo. 2002-12-04 17:31:35 +00:00
Ilia Alshanetsky 30724f6291 Bug fixing news. 2002-12-04 17:29:48 +00:00
Ilia Alshanetsky 1e8ec47a99 Fixed a memory leak inside gdImageTrueColorToPalette(). 2002-12-04 17:16:19 +00:00
Moriyoshi Koizumi cf0a0f0967 Added a test for bug #12776 2002-12-04 17:01:07 +00:00
Moriyoshi Koizumi 7b56bfae46 Bug fix news 2002-12-04 16:49:59 +00:00
Moriyoshi Koizumi 7bf4090efb Fixed segfaults of array_walk() when keys are passed to cb by reference.
Fixed bug #12776.
2002-12-04 16:41:28 +00:00
Ilia Alshanetsky 143e46ae28 WS fixes. 2002-12-04 16:29:48 +00:00
Sebastian Bergmann 196b3f581f Fix bugs #20270, #15702, #18600 (segfaults in ext/java). (Tony J. White) 2002-12-04 08:31:43 +00:00
Sebastian Bergmann 49f05c470a Fix bugs #20270, #15702, #18600. Patch by Tony J. White <tjw@tjw.org>. 2002-12-04 08:18:02 +00:00
Pierre Joye 00881ea504 Fix imagegd stdoutput
Typo 256 colors
2002-12-04 02:48:23 +00:00
Pierre Joye e8e2420042 Fix imagegd crashes when used with truecolor image (from jpeg,png, or imagecreatetruecolor)
may we add parameters to imagegd to let user specify the palette size and dither (set to 256 and true) ?
2002-12-04 02:37:21 +00:00
Christian Dickmann 910a03a835 silence some possible warnings 2002-12-03 20:51:36 +00:00
Frank M. Kromann 956d63899c Changed php_error() to php_error_docref() 2002-12-03 19:39:25 +00:00
Ilia Alshanetsky e1b9a77725 Fixed a bug that caused a crash in pdf_open_memory_image(), when a truecolor
image was loaded, it now checks if the image is truecolor and performs the
appropriate calculations (fixed bug #20785).
Changed E_WARNING back to E_ERROR.
2002-12-03 19:25:17 +00:00
Frank M. Kromann 686010e050 Changed php_error() to php_error_docref() 2002-12-03 19:19:15 +00:00
Frank M. Kromann 13b6390df7 Bug #19370
Allow stored procedures to return multiple results.
2002-12-03 18:57:04 +00:00
Frank M. Kromann 5eaf2d10e7 Bug #17593
Make sure any pending data is released from the server when freeing the result
2002-12-03 18:04:35 +00:00
Harald Radi 8529f3ba95 damn milter api:
"Furthermore, since there is not a one-to-one correspondence between
 threads and connections (N connections mapped onto M threads,
 M <= N), connection-specific data must be accessed through the handles
 provided by the Milter library."

which in other words means php_request_startup() and the corresponding
php_request_shutdown() will never be called for the same thread
2002-12-03 16:26:57 +00:00
Ilia Alshanetsky b08f247f32 Fixed a crash that occurs during the last step of png/jpeg -> gd2 -> png/jpeg
conversion. The same crash still occures with png/jpeg -> gd -> png/jpeg, because
apparently gd format cannot handle truecolor images.
Turned off debug messages inside gd_gd2.c.
2002-12-03 15:43:17 +00:00
Moriyoshi Koizumi 242ddba326 Fixed leaks in array_walk() 2002-12-03 15:02:06 +00:00
Harald Radi bf16a54f5a fix typos and make example more useful 2002-12-03 14:43:43 +00:00
foobar 7d744c54b4 - Need these libraries for static build 2002-12-03 11:34:12 +00:00
foobar 68eaf6391a - Fixed the build with iPlanet LDAP SDK 5.x 2002-12-03 09:35:42 +00:00
Frank M. Kromann 679d645738 Allocating enough memory to hold values.
Fix crash when certan stored procedures was called. This caused the free_result function to free memory not yet allocated.
2002-12-03 05:56:39 +00:00
Moriyoshi Koizumi e7f1bbf0f2 Iconv extension is no longer experimental 2002-12-02 21:29:06 +00:00
Moriyoshi Koizumi de79a4e9d8 Reverted the changes because the problem was elsewhere. 2002-12-02 21:10:37 +00:00
Moriyoshi Koizumi c7a0b0d262 Reverted wrong part of the commit made in 1.24 2002-12-02 20:11:59 +00:00
Frank M. Kromann b2a648f5b5 Fixing the Win32 compilation of mbstring with mbregex enabled. 2002-12-02 19:18:23 +00:00
Frank M. Kromann a7f3ad42a4 Fixing build on WIn32
MBREGEX is disabled for now. 5 mbre_* functions are undefined on WIn32
2002-12-02 18:19:17 +00:00
Sterling Hughes 7fd0c8b593 apparently this isn't finished 2002-12-02 16:38:22 +00:00
Ilia Alshanetsky 467a5f44ec Fixed flex version check. Some lex scanners like Sun's SGU do not appear
to support -V flag, so by passing them data on stdin we prevent them from
sitting idle waiting for stdin data. I've also added some common version
retrieval flags, that may be supported by various lex scanners.
2002-12-02 07:03:00 +00:00
Ilia Alshanetsky 057e87e6e5 Repositioned CoInitialize and CoUninitialize that apparetly makes it more
correct according to MS docs. Patch (+5) by Michael Sisolak
<msisolak@yahoo.com>.
2002-12-02 06:43:54 +00:00
Ilia Alshanetsky a6e02dc45d Fixed a crash bug that can occur due to PDF_delete() being called more then
once and E_ERROR occurring during the shutdown sequence.
2002-12-02 06:35:29 +00:00
Jason Greene 5e1741fd48 Revert patch that should have been reverted a long time ago.
There was a memory leak in the error handling system on win32, that this patch
circumvented (by preventing the errors (EAGAIN mesages) from being generated).
# I must have forgotten to remove this when I fixed the leak
2002-12-02 05:45:13 +00:00
Shane Caraveo 76e09401ab aparently did not add these on head
removed ssize_t which was causing problems, and not in libfcgi anyway
2002-12-02 05:24:54 +00:00
Shane Caraveo 75cbbfacb1 fix use of Alias under apache by defaulting script_name to redirect_url
dont lstat, stat.
2002-12-02 02:16:38 +00:00
Jon Parise 6be496f44e Correct the punctuation of these error messages. 2002-12-02 00:21:15 +00:00
Sterling Hughes 065104b8fe TODO: Cleanup elements that have happened, or most likely won't happen. There
is probably more that should be gone, but its still a move in the right
direction.

Other stuff is ws/formatting changes
2002-12-01 22:15:39 +00:00
Shane Caraveo 9bc3f72d8e build support for cgi fixes previously commited 2002-12-01 21:50:35 +00:00
Shane Caraveo a3bd39429c Fix CGI to match cgi spec.
This patch properly fixes support for CGI in PHP.  For backwards compatible
broken behaviour, cgi.fix_pathinfo can be set to zero in php.ini.
CGI failed to work under apache at all, either using the cgi-script directive
or as a ScriptAlias setup. Typicaly it would try to parse itself.  This will
still happen if you dissable fix_pathinfo, and set DISCARD_PATH.
This also fixes PATH_INFO, and finally we can run pres2 under cgi or fastcgi.
This patch has been tested under Apache 1.3, 2.0, IIS, as both cgi and fastcgi,
on Windows and OSX.  A followup patch with build stuff for linux will follow.
2002-12-01 21:37:14 +00:00
Shane Caraveo 529762a21a php_error_docref aborts cgi. This broke using php as cgi under
apache/mod_cgi with the cgi-script directive and bang lines in php scripts.
removing it allows this to work again.
2002-12-01 21:28:27 +00:00
Harald Radi 3fb36b0c56 example 2002-12-01 20:29:14 +00:00
Harald Radi e25b194525 rename callbacks to fit the original name 2002-12-01 20:28:54 +00:00
Andi Gutmans 9f361fc0f8 - Allow enabling of memory cache with zend_mm 2002-12-01 20:15:09 +00:00
Harald Radi b460dfc042 initial checkin 2002-12-01 19:55:48 +00:00
Harald Radi 9d5e55f790 if the api functions are called, check if they're valid in that context
reopen file per request, so milter doesn't hang. PHPA or APC can be used to speed the milter up
added a milter_init callback to init the milter before it is registered
added protos to make sniper happy
2002-12-01 19:50:07 +00:00
Andi Gutmans 27de54b0df - MFZE1 2002-12-01 19:47:02 +00:00
Andi Gutmans f222884e2d - Revert as the patch doesn't compile 2002-12-01 19:22:30 +00:00
Andi Gutmans b6ecd6704c - MFZE1 2002-12-01 19:07:07 +00:00
Stefan Roehrich e50dc16b21 Comment about maximal length now matches code. 2002-12-01 18:48:51 +00:00
foobar cef45338c9 fix build.. 2002-12-01 17:24:00 +00:00
Harald Radi 8c19b754f9 first working version 2002-12-01 16:37:59 +00:00
Harald Radi db93856c07 check for libmilter path 2002-12-01 13:44:22 +00:00
Derick Rethans 7fbcf76973 -fix typo 2002-12-01 13:43:17 +00:00
Harald Radi e4bc32fbe2 no message 2002-12-01 13:36:53 +00:00
Stanislav Malyshev 2c7d6f9a74 improve username/password detection for IIS 2002-12-01 12:48:08 +00:00
Harald Radi 1356e60fa3 no message 2002-12-01 12:23:47 +00:00
Marcus Boerger fa38a6af6f No more (f)printf for errors and warnings instead use php_error_docref. 2002-12-01 11:43:54 +00:00
foobar e178bdc1ee Fix build 2002-12-01 05:14:56 +00:00
Harald Radi 0244ca1d97 it finally compiles now
tests will follow tomorrow
2002-12-01 03:37:49 +00:00
Sascha Schumann 2b95b3c83b add a "force HTTP/1.0 response" facility to the SAPI layer
this is necessary, when you want to take over control of a connection
and the web server is doing stupid things by default (like enabling
chunked transfer encoding for no reason).
2002-12-01 03:28:21 +00:00
Sterling Hughes b9447c2f49 remove dos line endings 2002-12-01 03:13:03 +00:00
Harald Radi b7b5ca519f fix build 2002-12-01 02:45:30 +00:00
Moriyoshi Koizumi aeb6a6c458 Fixed possible buffer overflow in php_base64_decode();
# This bug doesn't appear to be harmful for now,
# so I won't merge it into branches...
2002-12-01 02:44:50 +00:00
Harald Radi 39e03b580b todo or not todo 2002-12-01 01:36:26 +00:00
Harald Radi 3a0a2411c7 added remaining functions, still untested, still having problems with config.m4 2002-12-01 01:18:48 +00:00
Marcus Boerger 38f5812191 Skip overload for ZE2
Bug #20156
2002-12-01 00:38:30 +00:00
Harald Radi ad6333654e Sendmail Milter SAPI
initial version
2002-12-01 00:21:10 +00:00
Frank M. Kromann 32d7284c52 Dont scan headers for cc abd bcc if extra parameters are used for these 2002-11-30 21:50:17 +00:00
Frank M. Kromann 7afd92792b Fix the use of "personal" information in To and Cc headers 2002-11-30 21:49:20 +00:00
Ilia Alshanetsky cc13af6a07 Fixed bug #20716. 2002-11-30 19:12:48 +00:00
Marcus Boerger 0d7957bc15 Bug #20433 2002-11-30 18:36:17 +00:00
Andi Gutmans 671fff2fde h WHitespace 2002-11-30 11:20:25 +00:00
Christian Stocker 3429e3313b fixed big bad memory leak in xpath objects. 2002-11-30 10:38:17 +00:00
Jason Greene 5d554c20d2 Sockets is no longer experimental 2002-11-29 23:44:06 +00:00
Moriyoshi Koizumi b9687bea65 Prevented the result from being affected by function overloading 2002-11-29 18:32:50 +00:00
Sander Roobol 348b429b5b Remove all traces of _bc_Free_list - it's not used anymore 2002-11-29 17:59:30 +00:00
Yasuo Ohgaki e4be6b3ac2 Fixed problem with PostgreSQL 7.3 2002-11-29 17:18:01 +00:00
Andi Gutmans 2de45bec65 - Initialize constants_updated (by Marcus) 2002-11-29 16:35:46 +00:00
Christian Stocker 71235e4140 removed unused variable 2002-11-29 16:31:41 +00:00
foobar 7f48a6f13b MFB 2002-11-29 14:48:17 +00:00
foobar 6fb3b26796 - MFB 2002-11-29 14:46:06 +00:00
Christian Stocker 55ee8af808 fix for bug #20389 (no trailing slash in configure option) 2002-11-29 13:30:29 +00:00
Sascha Schumann 95fead0b9f add missing line 2002-11-29 11:34:08 +00:00
Christian Stocker a2ccb29a97 @- Added xpath_register_ns_auto([contextnode]) for automatically registering
@  namespace definitions (chregu)

changed my mind. Automatic namesapce registration is not done within
xpath_eval() anymore, but in a seperate function.
2002-11-29 11:22:06 +00:00
Christian Stocker eed5b11b5f do some kind of automatic namespace registration in xpath_eval(). This
works only for namespaces defined in the context node (eg docroot if
no second argument is given. If one wants to use namespaces defined
elsewhere or with different prefixes, you still have to use
xpath_ns_register()
2002-11-29 10:24:44 +00:00
Christian Stocker b1dab29214 relative xpath queries are already possible
(use $ctx->xpath_eval($xpath,$contextnode) )
2002-11-29 08:28:53 +00:00
Christian Stocker cac5d670b3 get_element_by_id does not need LIBXML_XPATH support 2002-11-29 07:50:37 +00:00
Marcus Boerger 65eb0d8125 Conversion fixes 2002-11-29 01:44:19 +00:00
Marcus Boerger 0a7487e32d Conversion fixes 2002-11-28 22:48:20 +00:00
Marcus Boerger e7f5b801be Do not instanciate an abstract class 2002-11-28 17:07:50 +00:00
Ilia Alshanetsky 398ff4fe82 Fixed mhash tests, apparently the TIGER algorithm was updated (fixed?) in
later mhash releases and consequently returns a different hash. I've updated
the hash to the one generated by latter releases.
Removed useless \r from ext/mhash/tests/003.phpt.
2002-11-28 14:13:44 +00:00
Martin Kraemer 966f75d4fb Portability: avoid <malloc.h> warnings on FreeBSD 2002-11-28 09:19:16 +00:00
Martin Kraemer f3845c3ae0 Portability: The header contains the declaration; while the source ext/bcmath/libbcmath/src/init.c has the definition
(otherwise some compilers complain about 'duplicate symbols')
2002-11-28 08:26:14 +00:00
Martin Kraemer c5a7a522a1 Portability: Use 0 if the platform does not define EX_OK 2002-11-28 08:23:36 +00:00
Andi Gutmans c6502fa225 - Nuke use of deprecated macro 2002-11-27 20:09:36 +00:00
Sterling Hughes 52a451ccd2 no more need for this either 2002-11-27 20:06:01 +00:00
Sterling Hughes 5c96f91123 don't use stupid constants, be smart, just read the line 2002-11-27 20:05:20 +00:00
Frank M. Kromann 7abdf90a0e free alocated mem.
minor changes in the layout
2002-11-27 18:52:31 +00:00
Tal Peer 1d768548cd jdtojewish() test 2002-11-27 15:54:32 +00:00
Tal Peer 8aac1ce2ee Added an additional (optional) argument to jdtojewish() to keep BC
with 4.3 (and let users getdates in Hebrew without further formatting)
2002-11-27 15:52:25 +00:00
Ilia Alshanetsky e195b10ede Fixed bug #20664. 2002-11-27 06:20:19 +00:00
Marcus Boerger 28c10e29d0 -Code completley rewritten 2002-11-27 02:42:41 +00:00
Marcus Boerger 569c69ba36 -Add test for exif_read_data and magic_quotes_runtime 2002-11-27 02:31:26 +00:00
Marcus Boerger 57f41b1a90 -Forgot to correct length 2002-11-27 02:28:29 +00:00
Marcus Boerger 3ff08b91a6 -Add magic_quotes_runtime support
-Fix Canon Markernote
2002-11-27 01:46:36 +00:00
Frank M. Kromann f9b3452c6a Convert 0D 0D 0A line breaks to 0D 0A 2002-11-27 00:49:24 +00:00
Stig Bakken 441a3e3612 * fix typo 2002-11-26 23:17:22 +00:00
Frank M. Kromann 9f927c1a2e time is a function. Use the name of the variable 'timestamp' 2002-11-26 23:03:07 +00:00
Frank M. Kromann 863962d5cf Adding missing header file on Win32 2002-11-26 23:02:09 +00:00
Frank M. Kromann 0cddc5b4eb removing unused variables 2002-11-26 23:01:17 +00:00
Stig Bakken b066da4e65 * lose obsolete tags: libfile, libname, sources, includes, libadd 2002-11-26 22:52:34 +00:00
Frank M. Kromann 2ac7c4f2de Adding missing ; 2002-11-26 22:44:16 +00:00
Moriyoshi Koizumi 98dace883e Improved the error reporting portion of array_walk() as suggested by Markus 2002-11-26 22:12:40 +00:00
Moriyoshi Koizumi 3fd513f32a Prevent too many error reports from being displayed 2002-11-26 21:51:37 +00:00
Stig Bakken 7e21663cb5 * ws/folding 2002-11-26 21:49:55 +00:00
Moriyoshi Koizumi 61b3d5ccb5 Fixed incorrect error messages of array_walk() in case the callback is
specified in an array form
2002-11-26 21:21:32 +00:00
Stig Bakken 397b35f891 * changed "info" shortcut to "in" 2002-11-26 18:23:58 +00:00
Christian Stocker 20688a30ab Fix for Bug #20639 DomElement->get_elements_by_tagname() doesn't work 2002-11-26 15:37:54 +00:00
Wez Furlong b1a5434537 Update to use new parameter parsing API.
Updates to Jewish/Hebrew calendar code.
Patch from Moshe Doron, amended by Tal Peer,
reviewed by me.
# Maybe Tal and/or Moshe could comment on whether this should
# also be commited to the 4_3 branch (it completes some earlier work
# started prior to the branch).
2002-11-26 14:52:00 +00:00
Marcus Boerger 579e3ca96b Add Berkeley db4 support 2002-11-26 12:05:59 +00:00
Marcus Boerger 197fd585bd -Disallow combining db2 with db3 which are conflicting.
-Stop searching for headers and libraries when found.
-Check version for Berkeley DB library headers.
2002-11-26 12:00:25 +00:00
Marcus Boerger f88aa8045a Highlight "Thank you" 2002-11-26 11:30:08 +00:00
Frank M. Kromann a2bf03ccea Avoid , at the end of each string (to, cc and bcc) 2002-11-26 07:04:31 +00:00
Shane Caraveo 17cce37a72 fix windows build of cgi/fastcgi 2002-11-26 06:51:44 +00:00
foobar dd53efc196 - Made the STANDARD_SAPI_MODULE_PROPERTIES be what it says it is. 2002-11-26 05:57:06 +00:00
Shane Caraveo 95b4045f48 configure now supports building the cgi-fcgi module
configure --enable-fastcgi
2002-11-26 05:51:16 +00:00
Sascha Schumann 09f463ddae Add sapi_get_fd() and implement it for the Apache/thttpd SAPIs. 2002-11-26 05:15:55 +00:00
Yasuo Ohgaki f0b6f5450c Remove a warning 2002-11-26 02:13:35 +00:00
Stig Bakken 693204265e * a little more "windows robust" when looking for package.xml 2002-11-26 01:38:48 +00:00
Stig Bakken ad2618b8eb * forgot to set release date 2002-11-26 01:34:14 +00:00
Stig Bakken df158fa5cf * added --ignore-errors option, --force no longer ignores errors 2002-11-26 01:32:47 +00:00
Stig Bakken 58c57d43ab * added sig_keyid config param 2002-11-26 00:05:21 +00:00
Ilia Alshanetsky 9497ba9d49 MFH (test failure if session.serialize_handler is not set to php). 2002-11-25 23:20:05 +00:00
Stig Bakken e617da5aae * more accurate description of "makerpm" command 2002-11-25 23:16:16 +00:00
Stig Bakken 6f1c21aea2 * silence some notices 2002-11-25 23:15:31 +00:00
Stefan Esser ababfedb66 tmp_line was possible uninitialised, resulting in crap error messages. 2002-11-25 22:53:57 +00:00
Ilia Alshanetsky 693fd4a36b Added a check to determine if the file can be retrieved or sent.
This check also prevents incorrect error reporting in the event the retrieval
or the sending of the file cannot be accomplished.
2002-11-25 22:00:52 +00:00
Maxim Maletsky d9cf3c2a0e Bug# 16798. Tests appreciated by someone with Oracle 8.0 2002-11-25 18:14:45 +00:00
Moriyoshi Koizumi 53fba5f8a6 @- Enabled mbregex by default when mbstring is also enabled (Moriyoshi) 2002-11-25 17:44:14 +00:00
Moriyoshi Koizumi 12d4a19fce Forgot to adjust this one 2002-11-25 17:21:50 +00:00
Moriyoshi Koizumi 76b218cb6e Renamed several internal functions for consistency 2002-11-25 17:20:20 +00:00
Rui Hirokawa b3cfda6389 simplified korean encoding conversion table. 2002-11-25 15:21:04 +00:00
Ilia Alshanetsky c330fdc1a1 Removed un-needed zlib check. 2002-11-25 14:25:52 +00:00
Hartmut Holzgraefe 8bd550825f email address change 2002-11-25 12:30:28 +00:00
Ilia Alshanetsky 9251486567 Synchronized bundled gd library with the latest stable GD, 2.0.6
Fixed a configuration problem with xpm.
Fixed 2 possible memory leaks in fontFetch().
2002-11-25 01:51:53 +00:00
Yasuo Ohgaki 5c851cba19 Cleanup state=4 and avoid using sscanf() 2002-11-25 01:38:29 +00:00
Andi Gutmans 6aa90a75bd - FN_IS_STATIC -> FN_STATIC 2002-11-24 20:32:49 +00:00
Andi Gutmans 5cb8fabb7d - Fix crash 2002-11-24 20:15:56 +00:00
Moriyoshi Koizumi 436bc265e6 MFB 2002-11-24 19:48:58 +00:00
Sergey Kartashoff dab1bb005a - Header file update for new mnogosearch functions 2002-11-24 19:39:47 +00:00
Sergey Kartashoff 319f286562 @- A new functions have been added: udm_set_agent_param_ex and
udm_get_res_field_ex
- A new functions have been added: udm_set_agent_param_ex and
  udm_get_res_field_ex
2002-11-24 19:36:46 +00:00
Sascha Schumann 3f6b470770 Use proper form of NUL
Drop superfluous checks for NULL results
2002-11-24 16:23:37 +00:00
Marcus Boerger 2ddbee008f Better naming 2002-11-24 16:07:34 +00:00
Marcus Boerger c4272645ce Add test against redeclaring an overloaded method abstract 2002-11-24 15:51:57 +00:00
Marcus Boerger 622b45e2a9 Add test against mixing static/non static methods 2002-11-24 15:50:28 +00:00
Sterling Hughes 490903da5a null after the erealloc() 2002-11-24 15:11:43 +00:00
Christian Dickmann 51f5b6debb remove the check, cause i don't really know, if content has to be an array everytime 2002-11-24 10:15:25 +00:00
Christian Dickmann 0228cfcf4a add some checks to increase cache integrity 2002-11-24 10:13:57 +00:00
Christian Dickmann 7dd3e5e683 add errormessage, but that does not fix the problem 2002-11-24 10:06:54 +00:00
Yasuo Ohgaki 5c2fda30b2 Added missing '\0' 2002-11-24 07:45:26 +00:00
foobar bad0d653a1 MFB: ; instead of : 2002-11-24 05:15:10 +00:00
Moriyoshi Koizumi c7c7132a66 Renamed the file because this is actually a test for gdImageStringFt(). 2002-11-24 01:32:15 +00:00
Ilia Alshanetsky ef1d4e1dcf Fix compile warning, MIN/MAX macros may already be defined by param.h 2002-11-24 01:30:51 +00:00
Ilia Alshanetsky 67e25fcbd8 Added gdPEstrdup macro. 2002-11-24 01:20:13 +00:00
Ilia Alshanetsky ef26e2d1f8 Fixed 3 memory leaks.
Formatted the code to meet PHP's coding standards, which makes it MUCH easier
to understand.
2002-11-24 01:15:34 +00:00
Moriyoshi Koizumi 9db2512418 Fixed the macro so this can be compiled with ft1 2002-11-24 00:59:41 +00:00
Moriyoshi Koizumi fe23fcab12 Sorry, wrong commit. 2002-11-23 23:35:57 +00:00
Moriyoshi Koizumi 0f8916e37c Dismissed the second part of the test 2002-11-23 23:34:38 +00:00
Frank M. Kromann ecd975550b Adding mb_gpc files to project 2002-11-23 22:59:24 +00:00
Moriyoshi Koizumi 4124672edf Fixed leaks. Other leaks are originated in libgd. 2002-11-23 22:11:59 +00:00
Derick Rethans 1019b2ea94 - Adjust tests for removed old_function() in Zend Engine 2 2002-11-23 22:08:05 +00:00
Moriyoshi Koizumi 57e4b81d13 Fixed segfaults 2002-11-23 21:33:31 +00:00
Marcus Boerger 1827a58de0 Allow db4.0 & db4.1 here. Patch by Ralf Engelschall (rse@engelschall.com) 2002-11-23 21:11:12 +00:00
Andi Gutmans 01e853c2ce - My personal cleanups 2002-11-23 20:46:39 +00:00
Andi Gutmans e8214a3384 - Commit Marcus' cleanup of abstract and static inheritance and improve
- error messages
2002-11-23 20:44:12 +00:00
Moriyoshi Koizumi f920e5d068 Forgot this one. Updated license information 2002-11-23 20:17:46 +00:00
Moriyoshi Koizumi 7f1f056f16 Updated license information headers 2002-11-23 20:14:33 +00:00
Moriyoshi Koizumi 22a9d7ad25 Separated GPC related part from mbstring.c 2002-11-23 20:08:44 +00:00
foobar 5e429447b1 ws fix 2002-11-23 19:20:44 +00:00
Derick Rethans 36e82c84ae - Make it compile on IRIX again
#- Tested with Linux/FreeBSD and IRIX
2002-11-23 19:03:21 +00:00
Marcus Boerger c7dc6c0e00 Move up general tests
# if MFH is needed should be decided by QA team: because the output # sequence changes
2002-11-23 16:57:25 +00:00
Moriyoshi Koizumi 44c98c7e3f Fixed some odd behaviours of range() 2002-11-23 11:27:56 +00:00
Moriyoshi Koizumi 715ad2730c Fixed tab positions. 2002-11-23 11:20:51 +00:00
Moriyoshi Koizumi 40d605a385 Test for mb_send_mail() under language=Korean 2002-11-23 05:26:18 +00:00
Marcus Boerger 517af84b0a MFB: Fix memleak in debug mode 2002-11-23 01:24:08 +00:00
Sara Golemon e9047df607 New function dns_get_record(): close resolver socket after use.
fix to internal func php_parserr(): correct bug in return state.
2002-11-23 01:09:07 +00:00
Marcus Boerger 318e561905 Testing default behaviour 2002-11-23 00:54:04 +00:00
Rui Hirokawa c38db57f3c fixed some bugs in korean encoding conversion. 2002-11-22 23:34:55 +00:00
Rasmus Lerdorf 761bcbd751 Applied imagedeallocate() fix 2002-11-22 23:25:14 +00:00
Ilia Alshanetsky 962e4864a1 Fixed bug #20560. 2002-11-22 21:51:38 +00:00
Stefan Esser 9dae1475ef little fix 2002-11-22 19:34:17 +00:00
Marcus Boerger e7d20a0422 Make magic_quotes_runtime work bidirectional for dba 2002-11-22 15:47:48 +00:00
Edin Kadribasic 81711ba621 Avoid possible buffer overflow. 2002-11-22 15:47:39 +00:00
Marcus Boerger d33ff48608 Show which algorythm fails and do not fail when we have new algos.
#for me TIGER fails anybody else?
2002-11-22 14:07:29 +00:00
Edin Kadribasic fd47c5bb32 MFB: Don't send default http status (200). 2002-11-22 13:55:27 +00:00
Jan Kneschke b4ced28d7c - protect the function against a non-xml document
- initializing variables reduces the number of seg-faults
2002-11-22 13:41:51 +00:00
Jan Kneschke 3598fbcef9 - fixed a buffer under run
- initializing variables is a good thing
  - in case of a invalid response we don't seg-fault here anymore
2002-11-22 13:39:06 +00:00
Andrey Hristov 850586cfe7 typo fix. 2002-11-22 11:11:31 +00:00
Derick Rethans 2a9f250ec7 - Initialize all functions to non-static (patch by Marcus Börger
<marcus.boerger@t-online.de>.
2002-11-22 10:49:46 +00:00
Marcus Boerger 4e78286eaf Update error message and say 'method' instead of 'function' 2002-11-22 10:44:36 +00:00
Edin Kadribasic 714a5be6cc Fixed bug #19207 by adding cgi.rfc2616_headers configuration directive. 2002-11-22 10:15:47 +00:00
Sander Roobol f200f739d8 Made bcmath extension thread safe.
@Made bcmath extension thread safe. (Sander)
2002-11-22 09:25:29 +00:00
Stig Bakken 64a75d6d77 * fix config-show output 2002-11-22 07:03:46 +00:00
Sebastian Bergmann ba1f645030 Show class name as well. Patch by Marcus Börger. 2002-11-22 06:19:04 +00:00
Ilia Alshanetsky 489b0f2115 Added missing header (fixed bug #20555). 2002-11-22 02:38:03 +00:00
Ilia Alshanetsky 2ca45412ed Added a test case for bug #20528. 2002-11-22 00:08:57 +00:00
Ilia Alshanetsky c7dd366c1a Fixed bug #20528. 2002-11-21 23:51:52 +00:00
Melvyn Sopacua 7732ce7fe3 Fix bug #20518 2002-11-21 23:28:26 +00:00
Melvyn Sopacua 8d42dd7a8b test for bug #20518 2002-11-21 23:27:38 +00:00
Maxim Maletsky e20121e6c7 Added E_WARNING to OCIPasswordChage() when Safe Mode is in effect 2002-11-21 21:26:18 +00:00
Maxim Maletsky b5ae4adde1 @- Added OCIPasswordChange() which allows the password of an Oracle account to be changed. (Maxim) 2002-11-21 20:49:33 +00:00
Maxim Maletsky 1f73196bf9 comment typo 2002-11-21 20:32:56 +00:00
Maxim Maletsky 8338d8bfce Disabled OCIPasswordChange() in safe mode. Possible security risks. 2002-11-21 20:28:11 +00:00
Moriyoshi Koizumi 1748935997 Added missing mb_internal_encoding() 2002-11-21 18:12:53 +00:00
Moriyoshi Koizumi adfcb09190 Removed unnecessary "\n" 2002-11-21 17:36:16 +00:00
Moriyoshi Koizumi 9762403c26 Added a test case for imagettftext() 2002-11-21 17:26:18 +00:00
Marcus Boerger d3e095004c Revert that unwanted debug thing - thanks to Sander Robol 2002-11-21 16:48:39 +00:00
Sander Roobol b8cf1a369f Hardcode the bcmath.scale ini-entry 2002-11-21 16:16:38 +00:00
Rui Hirokawa 13a51b8f20 mbstring is supporting CJK + some other encodings. 2002-11-21 16:12:49 +00:00
Rui Hirokawa 8a2b5991d6 fixed incorrect encoding conversion in korean. 2002-11-21 16:05:38 +00:00
Sander Roobol f4ffead6fa Adding tests for the bcmath extension 2002-11-21 15:24:45 +00:00
Marcus Boerger 64e45b1287 Force showing the question 2002-11-21 15:09:45 +00:00
Marcus Boerger b66a39eb6e Test: An abstract function can be overwritten but not called 2002-11-21 15:06:54 +00:00
Marcus Boerger b7cd48efdd Make it possible to test language features like newly introduced 'abstract'
independantly from debug mode.
2002-11-21 14:56:06 +00:00
Sebastian Bergmann da0e29e92f Show the name of the abstract method in the error. 2002-11-21 14:20:25 +00:00
Sebastian Bergmann 9726e74da5 Fix prototype. 2002-11-21 14:16:57 +00:00
Hartmut Holzgraefe fb5ac5d286 the apache 1.x sapi read_posts tests for SG(read_post_bytes) being
counted up, so lets make it happy although this value is not really
needed in these cases ...
2002-11-21 10:29:11 +00:00
James Cox 5d0f205df8 grr.. 2002-11-20 21:21:35 +00:00
James Cox 418f53c647 remove number.c from the win32 build..
# did this on unix... shouldn't cause a problem, but vc can get picky.
2002-11-20 21:20:10 +00:00
Andi Gutmans 32fcc74395 - CVS nuked number.* so we'll nuke it from the build:) 2002-11-20 21:16:39 +00:00
Frank M. Kromann 392ea5529f Adding generated files to ignore list 2002-11-20 20:29:21 +00:00
Andi Gutmans b0528dbe5e - Revert previous patch 2002-11-20 20:03:01 +00:00
Andi Gutmans e6b7ab9db8 - Intermediate commit which works on making bcmath thread-safe. 2002-11-20 19:48:12 +00:00
Derick Rethans 33d0e4e1fb - MFZE1: Disable leak() and crash() when not using debug mode 2002-11-20 19:44:37 +00:00
Andi Gutmans 7ce4bc76bf - Add abstract methods 2002-11-20 19:15:36 +00:00
Frank M. Kromann c77d276997 Adding path to resolv.lib 2002-11-20 18:53:14 +00:00
Frank M. Kromann a4bcf9bb60 Changing line endings to CRLF. This allows the extension to build again. 2002-11-20 18:39:39 +00:00
Andi Gutmans 227f7838d6 - Fix build (thanks Marcus)
- Implement abstract methods, syntax:
-    abstract function foo($vars);
- I don't see any reason why modifiers such as static/public need to be
- used with abstract. PHP is weakly typed and there would be no meaning to
- this anyway. People who want a strictly typed compiled language are
- looking in the wrong place.
2002-11-20 18:00:23 +00:00
Sascha Schumann a257d758a5 Add an error message to the ini handlers 2002-11-20 17:15:00 +00:00
Sascha Schumann e9ed065afc add protective checks to ini updates
Noticed by: Derick Rethans <d.rethans@jdimedia.nl>
PR: #20284
2002-11-20 16:06:29 +00:00
Ilia Alshanetsky 7908cffab4 Switched to a new parameter parsing API, which simplifies the code.
Made error reporting use php_error_docref().
Fixed a memory leak in shmop_open() when an invalid flag is specified.
Added tests for shmop() extension.
2002-11-20 15:56:56 +00:00
Sander Roobol e532b24d82 One Apache 1.3 line is enough 2002-11-20 12:53:40 +00:00
Stig Bakken 713d0e8966 * convert to english 2002-11-20 06:51:23 +00:00
Stig Bakken 0cc15ba4b9 * fix doc for config-{set,get} 2002-11-20 06:50:33 +00:00
Ilia Alshanetsky 96b562ae29 Added .cvsignore file. 2002-11-20 06:48:58 +00:00
Ilia Alshanetsky d7d2b6ef50 Switched to a new parameter parsing API, which simplifies the code a great deal.
Made error reporting use php_error_docref()
Fixed a bug in mhash_keygen_s2k() that caused non \0 terminated data to be returned.
Added tests of all mhash functions.
2002-11-20 06:48:39 +00:00
Stefan Esser 63a50e500d Adding SHA1 tests. 2002-11-19 23:25:57 +00:00
Ilia Alshanetsky 7751c4f549 Do not register IMAGETYPE_SWC if zlib, which is needed for parsing of swc
files is not available.
2002-11-19 21:24:47 +00:00
Ilia Alshanetsky 11e7f6278d Addressed the issue of persistant allocation.
Fixed bug #20470.
Fixed a memory leak in gdttf.c that would happen when an error during
processing occures.
2002-11-19 19:55:54 +00:00
George Schlossnagle 010fd97aa5 brief v1 documentation 2002-11-19 19:03:20 +00:00
George Schlossnagle 3bdfbd6d1e Props to Lukas as well 2002-11-19 18:57:38 +00:00
foobar dad428b49e Add George to the credits and add note about it being different than the real Apache SAPI 2002-11-19 18:02:36 +00:00
foobar 5df80a262b Fix the configure.. 2002-11-19 17:58:10 +00:00
Zeev Suraski 4be862b02c MFZE1 - error_reporting fix 2002-11-19 17:51:30 +00:00
Moriyoshi Koizumi 72f0be09c0 Function renamings: s/php_mbstr_/php_mb/.
# all of which are static so I don't see any problem for now.
2002-11-19 17:23:41 +00:00
Moriyoshi Koizumi 41ef851eb5 Unified the duplicated portions.
# No need to merge this patch to the branch
2002-11-19 17:02:06 +00:00
Moriyoshi Koizumi 65677445b4 Added a test to check whether mb_parse_str() works properly 2002-11-19 16:56:43 +00:00
Moriyoshi Koizumi 18089ce360 Modified the test so it wouldn't be affected by ini settings. 2002-11-19 16:55:34 +00:00
Edin Kadribasic 543c383302 Update Credits 2002-11-19 15:11:27 +00:00
Derick Rethans 8011c17fd3 - Add test for bison weirdness as some people experienced (seems fixed
now though)
2002-11-19 14:53:31 +00:00
Derick Rethans 96c054f775 - MFB: Safemode install problem 2002-11-19 14:45:13 +00:00
Marcus Boerger c41b6b2967 Allow error_prepend and error_append being empty as used in run-test.php 2002-11-19 14:11:50 +00:00
Derick Rethans 0b2d775d3d - Already moved to PECL, but forgot to remove it from php4 2002-11-19 09:51:50 +00:00
Derick Rethans a8e7b5b6a1 - Committing patch by Philip Olson <philip@cornado.com>. 2002-11-19 08:20:18 +00:00
Marcus Boerger 3ca6344e57 -rename checkdnsrr to dns_check_record, keep old name as alias
-rename getmxrr to dns_get_mx, keep old name as alias
-added dns_get_record
@Added dns_get_record() which allows to retrieve DNS information about
@a host. (Marcus, Pollita)
2002-11-19 02:34:13 +00:00
Stig Bakken bfae20f404 * allow config-get in the default layer 2002-11-19 02:18:30 +00:00
George Schlossnagle c598b3ac16 now this works (thanks Rasmus)
Note:  the correct line is --with-apache-hooks
2002-11-19 01:20:42 +00:00
Edin Kadribasic ff55850562 No need to declare functions used internally by DBA as PHPAPI. This
fixes windows build.
2002-11-19 01:06:42 +00:00
Moriyoshi Koizumi b75f2df3d4 We have to use binary mode here. 2002-11-18 21:20:45 +00:00
Moriyoshi Koizumi a9d7509036 Fixed possible leaks 2002-11-18 21:15:41 +00:00
George Schlossnagle 0ad980c667 fixed recurrent entrance to add_cgi_vars 2002-11-18 19:07:37 +00:00
Thies C. Arntzen 6aaa7bc345 use FREE_ZVAL when freeing zvals 2002-11-18 17:34:55 +00:00
Marcus Boerger f0daa5c6d9 Fix warning as discussed with Wez. 2002-11-18 17:23:21 +00:00
Sascha Schumann 58b26398de Add FAM support for LGPLed libfam.
FAM, the File Alteration Monitor, provides an API that applications can use to
be notified when specific files or directories are changed.

FAM is being used in Enlightenment, GNOME/Nautilus, and KDE.

# Yes, this will be moved to PECL once that is fully usable. Emails about
# this issue will likely be redirected to /dev/null. :-)
2002-11-18 17:06:05 +00:00
Marcus Boerger 301330ff88 -Added colordepth for png
-Added tests for width/heidth for unsigned/signed problems
2002-11-18 16:51:02 +00:00
Marcus Boerger a3d821c695 Added colordepth for png 2002-11-18 16:50:10 +00:00
Sascha Schumann 52f1135c8f add missing backslash 2002-11-18 15:55:07 +00:00
Edin Kadribasic b8d3c75a6c Nuke one more win32 linking warning. 2002-11-18 15:53:00 +00:00
Marcus Boerger 25456939b3 Fixing unsigned/signed problems (and i thought about it before...) 2002-11-18 15:49:06 +00:00
Derick Rethans e93f1c00c6 - Remove outdated GPL clause; the file was totally rewritten 2002-11-18 15:45:27 +00:00
Edin Kadribasic d40c5e2624 Really nuke win32 linking warnings. 2002-11-18 14:33:34 +00:00
Ilia Alshanetsky 6e99ecdb01 Hopefully fix win32 linker warnings. 2002-11-18 13:17:14 +00:00
Edin Kadribasic 03fc9eb415 Initial attempt to get apache_hooks api to compile on windows.
Still getting link errors with
undefined symbol: 'php_request_startup_for_hook'.
2002-11-18 12:52:57 +00:00
Wez Furlong 039d6a1668 wb -> r+b 2002-11-18 12:40:12 +00:00
Ilia Alshanetsky d9ecd30cc4 Changed memory allocation wrappers to macros, so that it is possible to see
where the memory leak is happening.
2002-11-18 12:31:39 +00:00
Edin Kadribasic f8026b7453 Updated windows build file. 2002-11-18 12:30:08 +00:00
Edin Kadribasic f876916381 Added .cvsignore file. 2002-11-18 12:29:29 +00:00
Edin Kadribasic 5b292d5348 Remove fribidi from the NEWS item about extensions available on windows
for now. This is because I'm unable to get fribidi library to compile
on windows.
2002-11-18 12:16:12 +00:00
Wez Furlong bceb56b2ba Re-enable the curlwrappers configure option.
I still don't recommend it's use unless you are hacking both curl and PHP
to make it work.
2002-11-18 12:00:21 +00:00
Wez Furlong 110fd64bbd Amend news about mbstring enabled by default 2002-11-18 11:55:11 +00:00
Wez Furlong 5b7537ecd2 Merge the temp file mode fix from the branch,
add missing Id tag.
2002-11-18 11:49:06 +00:00
Wez Furlong ca58966a0d Merge streams changes from branch. 2002-11-18 11:39:42 +00:00
Rasmus Lerdorf a94a226691 Fix a few warnings - compiles nicely now 2002-11-18 06:14:10 +00:00
George Schlossnagle 2c34ea1be4 #defined offsetof, for systems that can't find it 2002-11-18 06:09:23 +00:00
Sebastian Bergmann 51e4dbaba0 Fix ZTS build. 2002-11-18 06:04:06 +00:00
Andi Gutmans 6d8a643edb - MFZE1 2002-11-18 05:27:46 +00:00
foobar 6987855e95 Fixed bug: #20458 (--with-qtdom=shared broken) 2002-11-18 05:06:02 +00:00
foobar 43584058e9 Added error message if browscap location is not set in php.ini 2002-11-18 03:23:51 +00:00
Ilia Alshanetsky c7fa1fa99f Fixed bug #20462. 2002-11-18 03:16:13 +00:00
Ilia Alshanetsky c5107b8989 Removed duplicate php_compat.h include. 2002-11-18 02:30:27 +00:00
George Schlossnagle 824fdad6c1 initial import of all these files. This was previously the apache_hooks
branch of the apache sapi.  Now it lives on its own.  General functionality
seems to be working, though there may be a problem with some
output buffering, most likely due to the way that sapi_deactivate needs
to be mangled with here.
2002-11-18 01:01:21 +00:00
George Schlossnagle 99c7ddc3a8 added support functions for the apache_hooks SAPI 2002-11-18 00:59:23 +00:00
foobar a3e9ae20d9 Fix the test. (and indented it for easier bug spotting :) 2002-11-18 00:41:27 +00:00
Ilia Alshanetsky f14b742392 Fixed bug #20466. 2002-11-17 22:52:47 +00:00
Ilia Alshanetsky 8d00d54f2f Fixed gd 2.0.4 check 2002-11-17 21:57:43 +00:00
Sebastian Bergmann 9229918fd7 Fix warning. HAVE_MEMMOVE is already defined in config.w32.h. 2002-11-17 21:50:00 +00:00
Sebastian Bergmann b4e42dd43f Fix Win32 build. (Lots of linkage warnings remain!) 2002-11-17 21:29:16 +00:00
Ilia Alshanetsky a10e0b6d8e A better gd >=2.0.4 version check for non-bundled gd library. 2002-11-17 20:18:44 +00:00
Derick Rethans 8c86784cae - MFB 2002-11-17 19:45:10 +00:00
Ilia Alshanetsky 06d94f2169 Expat upgrade news. 2002-11-17 18:57:21 +00:00
Ilia Alshanetsky cea2419529 Upgraded the bundled expat library to 1.95.5 (latest stable, atm).
Fixed bug #20442.
2002-11-17 18:37:48 +00:00
Stanislav Malyshev 29695934ed fix the leak 2002-11-17 17:57:57 +00:00
Derick Rethans 1a5037de1a - Fix compile problems for mips pro 2002-11-17 14:25:50 +00:00
Zeev Suraski d372861f03 Unify handling of error_reporting - fix bug #16137 2002-11-17 13:26:38 +00:00
Derick Rethans c3fe54dfab - MFB: Fix memory allocation problem in bundled GD (reported by Brian Havard) 2002-11-17 13:11:46 +00:00
Marcus Boerger 24726b0c64 Conversion fix by Michael Mauch 2002-11-17 09:27:48 +00:00
Ilia Alshanetsky 3bef247fcc Fixed a problem that would cause include/require("/dir/file") to fail on
Windows.
2002-11-17 00:06:50 +00:00
Marcus Boerger 2442adabe5 Force float for the float test 2002-11-16 23:45:58 +00:00
Marcus Boerger 4f747e80f0 Show module used in test 2002-11-16 19:43:53 +00:00
Marcus Boerger 015c117e37 -Do not rely on a side effect of 32bit platforms (patch by Michael Mauch)
-remove unused sections
2002-11-16 17:28:04 +00:00
Marcus Boerger 31e1cd13e2 removed unused sections 2002-11-16 17:26:52 +00:00
Ilia Alshanetsky 47596de32f Fixed the test so it works properly on both 32 and 64 bit platforms. 2002-11-16 17:26:26 +00:00
Marcus Boerger a3157908a8 Make getimagesize more robust against corrupt files 2002-11-16 17:02:07 +00:00
Georg Richter 208a3a3717 forgot to decrement result_allocated :( 2002-11-16 16:07:54 +00:00
Sebastian Bergmann 47388f2121 Fix Win32 build. 2002-11-16 08:30:31 +00:00
Andi Gutmans ce06e7ba77 - MFZE1 2002-11-16 07:37:03 +00:00
Andi Gutmans e1725b26fa - MFZE1 2002-11-16 07:32:53 +00:00
Stig Bakken 7547238723 no longer in use 2002-11-15 23:19:41 +00:00
Marcus Boerger dbf8593b5b When --enable-dba is used then include builtin modules unless --without-xxx
is not used.
2002-11-15 21:28:42 +00:00
Ilia Alshanetsky 2306c0e9d7 Removed the md5 checks since the files may be slightly different due to
float -> int conversion inconsistencies on various architectures.
2002-11-15 18:53:07 +00:00
Maxim Maletsky 9e3788864b WS 2002-11-15 18:20:59 +00:00
Maxim Maletsky 336e559718 Tons of WS fixes all over the file 2002-11-15 17:59:19 +00:00
Ilia Alshanetsky f0e2c04582 Revert of previous patch ad requested by Andi. 2002-11-15 16:36:55 +00:00
Ilia Alshanetsky 8193641d2d With ZTS on, we need to resolve the full paths before making symlinks.
If a chdir() call occurs before the symlink operation, the symlink is
created in the current directory rather then directory we've chdired to
because in ZTS we don't actually chdir but store the new path internally.

For an example of this problem consider the ext/standard/tests/file/001.phpt
test under ZTS.
2002-11-15 16:34:16 +00:00
Marcus Boerger 7ba0d505af Use eregi is better (noticed by Jon) 2002-11-15 16:33:05 +00:00
Moriyoshi Koizumi 90317cbc5d Always use binary mode for magic files 2002-11-15 16:25:31 +00:00
Moriyoshi Koizumi 7222abda70 Include php_config.h for HAVE_MBSTRING 2002-11-15 16:13:36 +00:00
Marcus Boerger 93769053cc Use flatfile if available.
# This way we are using the internal library which we know about most.
2002-11-15 16:11:51 +00:00
Moriyoshi Koizumi 003be7fe32 Divided the overload test into two so as to handle the case mbregex is
not enabled
2002-11-15 15:59:07 +00:00
Marcus Boerger 7d03dc004e Show which handler was used in the test 2002-11-15 15:58:09 +00:00
Marcus Boerger 0f66b352e9 -Allow skip in upper letters.
-Add 'info' result to --SKIPIF-- -> see following dba commits
2002-11-15 15:57:00 +00:00
Marcus Boerger 483502fe10 Speling (found by Andi) 2002-11-15 15:35:11 +00:00
Moriyoshi Koizumi b62afe783d %s/SKIP/skip/g 2002-11-15 15:34:57 +00:00
Marcus Boerger 5841e290ac Simplify and show skip reason 2002-11-15 15:22:07 +00:00
Marcus Boerger 16af3f7d11 Update to new syntax suggestion 2002-11-15 15:19:02 +00:00
Marcus Boerger adffe9fba6 Show correct result 2002-11-15 15:17:39 +00:00
Moriyoshi Koizumi 3ecc71a099 Fixed segfault in case the specified magic file cannot be read. 2002-11-15 15:13:30 +00:00
Moriyoshi Koizumi 1391f774cf Bug fixing news 2002-11-15 15:07:24 +00:00
Moriyoshi Koizumi 46b4abc08b Removed unnecessary ?> 2002-11-15 14:53:58 +00:00
Moriyoshi Koizumi b23d2c8beb Fixed bogus SKIPIF conditions. 2002-11-15 14:49:57 +00:00
Marcus Boerger 8c598f8bff Only show the first results 2002-11-15 14:46:52 +00:00
Andi Gutmans 5c12ee2474 - MFZE1 2002-11-15 14:30:40 +00:00
Moriyoshi Koizumi f0a7db1c7e Added some skipif conditions to handle the case mbstring is enabled but mbregex is disabled. 2002-11-15 14:26:33 +00:00
Andi Gutmans 55e127a6d5 - Commit fix for bug #19566 (I think it's by Marcus :) 2002-11-15 14:25:44 +00:00
Marcus Boerger ea971db849 Show Zend version 2002-11-15 14:23:40 +00:00
Moriyoshi Koizumi 57ca42e10f Bug fixing news 2002-11-15 13:36:49 +00:00
Marcus Boerger 66ec203e70 Showing memleaks for a memleak test is a good idea 2002-11-15 11:55:57 +00:00
Marcus Boerger 4ef6a3af03 db is deprecated now 2002-11-15 11:49:58 +00:00
Marcus Boerger b030a7a140 Fix segfaults (check ext/domxml/tests/domxml002.phpt) 2002-11-15 11:06:13 +00:00
Sander Roobol 8fb395bb9e Move the build-environment stuff down or the test results up, so you
don't need to scroll down to see the failed tests.
2002-11-15 10:37:41 +00:00
Georg Richter d46bd1cd63 removed restore_connection_defaults for pconnects (discussed on php-dev@)
bug #19529 closed
bug #12513 reopened
2002-11-15 10:35:10 +00:00
foobar dadfd6e94a ws fix 2002-11-15 07:21:33 +00:00
Moriyoshi Koizumi fb20eae7fc Fixed bug #20381 2002-11-15 02:16:41 +00:00
Moriyoshi Koizumi ac209557dd Added a test case for bug #20381 2002-11-15 02:11:23 +00:00
Maxim Maletsky cd9b495663 I mean - todo typo :) 2002-11-15 02:06:11 +00:00
Maxim Maletsky 05f07d2eba todo typo 2002-11-15 02:05:06 +00:00
Moriyoshi Koizumi ee37386183 Use C comments 2002-11-15 01:45:23 +00:00
Andrei Zmievski ca332dfc96 Oops. 2002-11-15 00:32:42 +00:00
Andrei Zmievski 3e8a800a96 Fix function prototype. 2002-11-15 00:31:10 +00:00
Sascha Schumann 04e564dec5 use grep -E instead of egrep. the latter is not defined by POSIX anymore 2002-11-15 00:20:17 +00:00
Stig Bakken 40ac4a2d68 Added error codes for the PEAR_Dependency class
Changed the dependency API to have a reference to an error message
string as first arg to all check methods
2002-11-14 23:23:21 +00:00
Moriyoshi Koizumi 5ca953b10f Fixed a problem that ICONV_IMPL doesn't give a correct value in win32 build. 2002-11-14 23:07:53 +00:00
Stig Bakken bdeb45b335 Added PATH_SEPARATOR constant 2002-11-14 22:50:01 +00:00
Stig Bakken 9f39cc0626 * a little bit of internal refactoring 2002-11-14 22:41:56 +00:00
Moriyoshi Koizumi 9efefc742b Added a test for zend-multibyte extension 2002-11-14 22:38:43 +00:00
Marcus Boerger 25641a7e96 Minor test corrections 2002-11-14 21:45:01 +00:00
Marcus Boerger 37e64f38ac Test is affected by mbstring 2002-11-14 21:43:49 +00:00
Andrei Zmievski cbec84d93d MFZE1 2002-11-14 21:36:07 +00:00
Moriyoshi Koizumi e40416ebf6 Fixed possible buffer over run in php_mb_safe_strrchr_ex() 2002-11-14 21:33:36 +00:00
Maxim Maletsky 7890b6fc87 Added function OCIPasswordChange() that allows renewal of an expired Oracle password.
# Tested, but still considered experimental...
2002-11-14 21:26:57 +00:00
Andrei Zmievski 26bd73fec6 Sort the modules for info output as well. 2002-11-14 21:15:42 +00:00
Marcus Boerger dbb95f338e file() is affected by magic_quotes_runtime 2002-11-14 21:15:31 +00:00
Marcus Boerger a81fe09722 Add info: Add magic_quotes_runtime support 2002-11-14 21:11:40 +00:00
Marcus Boerger a14bc7685d Add magic_quotes_runtime support 2002-11-14 21:09:41 +00:00
Marcus Boerger 5ad332f846 Add magic_quotes_runtime which affects several tests 2002-11-14 21:02:24 +00:00
Melvyn Sopacua 8298f6f982 typo 2002-11-14 20:57:48 +00:00
Andrei Zmievski e09d62c435 Sort the modules and extensions before printing them when -m switch is used. 2002-11-14 20:32:28 +00:00
Marcus Boerger 8579756c05 Test for bug #14383 2002-11-14 20:30:53 +00:00
Marcus Boerger 6048db9005 Only set the overwrites once 2002-11-14 20:12:36 +00:00
Melvyn Sopacua 87e3b97057 Add a note about the mime-type 2002-11-14 19:44:26 +00:00
Moriyoshi Koizumi 6841184abc Fix build 2002-11-14 19:04:29 +00:00
Moriyoshi Koizumi dac0b6fc4f Moved some mbregex related portions from mbstring.c to php_mbregex.c
# No need to merge this change to PHP_4_3 branch
2002-11-14 18:54:42 +00:00
Moriyoshi Koizumi db6efcf7e5 Prevent warnings under safe mode 2002-11-14 18:38:38 +00:00
Ilia Alshanetsky eef51c3d6b Disable safe_mode as it interferes with just about every test that needs
to access the file system, set enviroment variables or execute commands.
2002-11-14 18:38:19 +00:00
Marcus Boerger 29a40a1909 Missed that 2002-11-14 17:20:50 +00:00
Ilia Alshanetsky 4e1d684027 Fixed ZTS compile warning. 2002-11-14 16:32:30 +00:00
Stefan Esser 658fd1ba8d Fixing possible remote overflow due to mbstring translation. 2002-11-14 16:30:07 +00:00
Ilia Alshanetsky 5f7de8bf5b Fixed bug #20423. 2002-11-14 16:20:23 +00:00
Marcus Boerger f986cb84f3 Fix TSRM build 2002-11-14 15:09:53 +00:00
Marcus Boerger a391c4b12b Fix warnings (Marcus & Pierre-Alain Joye) 2002-11-14 15:08:39 +00:00
Marcus Boerger 9669932516 Info about gd changes 2002-11-14 14:58:01 +00:00
Wez Furlong f921ea9f7d Add a test case for this "bug" # 20134.
I'm not sure that this test is actually useful, so I'm not adding
it to the branch.
2002-11-14 14:56:35 +00:00
Marcus Boerger da20e867f3 Info about closed bugs 2002-11-14 14:38:20 +00:00
Marcus Boerger 5ec9375760 Fix locking behaviour: On some systems read during write is permitted but
most libraries are not capable of that. GDBM is system dependant so there
we only test  that we do not deadlock.
2002-11-14 14:32:39 +00:00
Wez Furlong 4e85935386 MFB 2002-11-14 14:26:15 +00:00
Ilia Alshanetsky 8bfe7d76ea Fix bug 19689, solution suggested by dmitry@koteroff.ru. 2002-11-14 13:45:08 +00:00
Ilia Alshanetsky 6b7d77a7a0 Fixed bug #20420 and added partial urls to the test of the function. 2002-11-14 13:40:14 +00:00
Wez Furlong b01add793c Add this test to make sure that fopencookie is detected and working
correctly (or that the less efficient tmpfile casting is working).
More details in the test itself.
2002-11-14 12:20:36 +00:00
Wez Furlong 08362f90d9 Fix build for unix.
Not sure if this needs merging to the branch (haven't got that far yet today).
2002-11-14 12:06:01 +00:00
Wez Furlong 9ae3c2f7bd Commit these before Sterling renames the files again :-)
When curlstreams are enabled, registers a each supported protocol
with PHP.
"More Correctly" implement eof for curlstreams.
Still not ready for anything like primetime.
2002-11-14 11:41:24 +00:00
Derick Rethans bab4957d1c - MFB: Fixed bug #20484 (stream_get_meta_data crashes on a normal file
stream). (Derick, Wez)
2002-11-14 10:56:35 +00:00
Jon Parise 92df58dab6 @- Added an optional "step" parameter to range(). (Jon) 2002-11-14 05:46:10 +00:00
Sterling Hughes 89ea16ffaa remove C++ comments 2002-11-14 04:07:51 +00:00
James Cox ad9788d853 changing..
#also, i think the qa and web team needs updating -- i'd like to see web change to a more general infrastructure category... anyone care to volunteer? :)
2002-11-14 02:05:53 +00:00
James Cox d3663f76b5 englishify 2002-11-14 01:54:38 +00:00
Sascha Schumann 1585ad97ff Fix "make install" in vpath env 2002-11-14 01:35:20 +00:00
Sascha Schumann 46a99e9022 - Remove PHP_DISABLE_CLI
- Streamline ircg build: thttpd-dependent part moved into separate source
  file, so that it can be added to the SAPI-only object list.
2002-11-14 01:09:46 +00:00
Sascha Schumann f7c6d9fb2a upgrade files to libtool 1.4.3 shipped ones
# should be safe to upgrade these to the 1.5.x ones
2002-11-14 00:41:53 +00:00
foobar 8efbeb68a1 MFB: Fix for bug: #20412 2002-11-14 00:21:14 +00:00
Edin Kadribasic 1eddce79dd MFB (made mbstring compile on windows again). 2002-11-13 23:11:14 +00:00
Sterling Hughes 9d04acdaaa curl_multi_info_read is unimplemented... 2002-11-13 22:43:31 +00:00
Ilia Alshanetsky c7da0b117e Moved news entry about imagefilter() to proper location. 2002-11-13 22:35:16 +00:00
Sterling Hughes 537284418c add multi support and reorganize things a bit... 2002-11-13 22:25:33 +00:00
foobar ae1fcb4542 Welcome 4.4.0 2002-11-13 22:24:49 +00:00
Edin Kadribasic 7cdffea872 Really remove mbstring from the build.
# mbstring is gone completely as it does not build currently on win32
# as a separate module
2002-11-13 21:29:55 +00:00
Edin Kadribasic f15420b3e1 Allow mbstring defines to be somewhere else without warnings. 2002-11-13 21:28:16 +00:00
Ilia Alshanetsky d183eb1e31 New gd function. 2002-11-13 20:07:12 +00:00
Ilia Alshanetsky 4522738188 Added tests for imagefilter() function. 2002-11-13 20:03:59 +00:00
Ilia Alshanetsky 901980b3ab Added imagefilter() function by Pierre-Alain Joye (paj@pearfr.org). This
function allows negate, grayscale, brightness, contrast, colorize, selective blur,
Gaussian blur, edge detect, smooth, sharpen and emboss filters to be applied
on an image.
2002-11-13 20:02:58 +00:00
Stig Bakken fb179417ef * remove debug output 2002-11-13 19:49:28 +00:00
Derick Rethans 315927cc9b - Moved cybermut to PECL 2002-11-13 19:40:10 +00:00
Andrei Zmievski 0eea23a4f8 Change version to 4.4.0-dev. 2002-11-13 19:19:05 +00:00
foobar d3d7c3d486 moved this entry under correct version 2002-11-13 18:28:50 +00:00
Ilia Alshanetsky a7487bb4f8 Compile warning fix. 2002-11-13 17:17:32 +00:00
Ilia Alshanetsky 0cb9c53033 Added a skip condition for when mail() function is not avaliable. 2002-11-13 17:16:33 +00:00
Ilia Alshanetsky b0d519f730 Added a skip condition for when the encoding needed for the test is not
available or supported.
2002-11-13 16:52:48 +00:00
2497 changed files with 10 additions and 666021 deletions

No files matched your search

-285
View File
@@ -1,285 +0,0 @@
define dump_bt
set $t = $arg0
while $t
printf "[0x%08x] ", $t
if $t->function_state.function->common.function_name
printf "%s() ", $t->function_state.function->common.function_name
else
printf "??? "
end
if $t->op_array != 0
printf "%s:%d ", $t->op_array->filename, $t->opline->lineno
end
set $t = $t->prev_execute_data
printf "\n"
end
end
document dump_bt
dumps the current execution stack. usage: dump_bt executor_globals.current_execute_data
end
define printzv
set $ind = 0
____printzv $arg0 0
end
document printzv
prints content of zval
end
define ____printzv
set $zvalue = $arg0
if $zvalue->type == 0
set $typename = "NULL"
end
if $zvalue->type == 1
set $typename = "long"
end
if $zvalue->type == 2
set $typename = "double"
end
if $zvalue->type == 3
set $typename = "string"
end
if $zvalue->type == 4
set $typename = "array"
end
if $zvalue->type == 5
set $typename = "object"
end
if $zvalue->type == 6
set $typename = "bool"
end
if $zvalue->type == 7
set $typename = "resource"
end
if $zvalue->type == 8
set $typename = "constant"
end
if $zvalue->type == 9
set $typename = "const_array"
end
printf "[0x%08x] ", $zvalue
if $zvalue == executor_globals.uninitialized_zval_ptr
printf "*uninitialized* "
end
printf "(refcount=%d) %s: ", $zvalue->refcount, $typename
if $zvalue->type == 1
printf "%ld", $zvalue->value.lval
end
if $zvalue->type == 2
printf "%lf", $zvalue->value.dval
end
if $zvalue->type == 3
printf "\"%s\"(%d)", $zvalue->value.str.val, $zvalue->value.str.len
end
if $zvalue->type == 4
if ! $arg1
printf "{\n"
set $ind = $ind + 1
____print_ht $zvalue->value.ht
set $ind = $ind - 1
set $i = $ind
while $i > 0
printf " "
set $i = $i - 1
end
printf "}"
end
end
if $zvalue->type == 5
if ! $arg1
printf "(prop examination disabled due to a gdb bug)"
# set $ht = $zvalue->value.obj.handlers->get_properties($zvalue)
# printf "{\n"
# set $ind = $ind + 1
# ____print_ht $ht
# set $ind = $ind - 1
# set $i = $ind
# while $i > 0
# printf " "
# set $i = $i - 1
# end
# printf "}"
end
end
if $zvalue->type == 6
if $zvalue->lval
printf "true"
else
printf "false"
end
end
if $zvalue->type == 7
printf "#%d", $zvalue->value.lval
end
printf "\n"
end
define ____print_ht
set $ht = $arg0
set $p = $ht->pListHead
while $p != 0
set $zval = *(struct _zval_struct **)$p->pData
set $i = $ind
while $i > 0
printf " "
set $i = $i - 1
end
if $p->nKeyLength > 0
printf "\"%s\" => ", $p->arKey
else
printf "%d => ", $p->h
end
____printzv $zval 1
set $p = $p->pListNext
end
end
define print_ht
set $ind = 1
printf "[0x%08x] {\n", $arg0
____print_ht $arg0
printf "}\n"
end
document print_ht
dumps elements of HashTable made of zval
end
define printzn
set $ind = 0
set $znode = $arg0
if $znode->op_type == 1
set $optype = "IS_CONST"
end
if $znode->op_type == 2
set $optype = "IS_TMP_VAR"
end
if $znode->op_type == 4
set $optype = "IS_VAR"
end
if $znode->op_type == 8
set $optype = "IS_UNUSED"
end
printf "[0x%08x] %s", $znode, $optype
if $znode->op_type == 1
printf ": "
____printzv &$znode->u.constant
end
if $znode->op_type == 2
printf ": "
set $tvar = (union _temp_variable *)((char *)executor_globals.current_execute_data->Ts + $znode->u.var)
____printzv ((union _temp_variable *)$tvar)->tmp_var
end
if $znode->op_type == 4
printf ": "
set $tvar = (union _temp_variable *)((char *)executor_globals.current_execute_data->Ts + $znode->u.var)
____printzv *$tvar->var.ptr_ptr
end
if $znode->op_type == 8
printf "\n"
end
end
document printzn
print type and content of znode.
usage: printzn &opline->op1
end
define printzops
printf "op1 => "
printzn &execute_data->opline.op1
printf "op2 => "
printzn &execute_data->opline.op2
printf "result => "
printzn &execute_data->opline.result
end
document printzops
dump operands of the current opline
end
define zmemcheck
set $p = alloc_globals.head
set $stat = "?"
set $total_size = 0
if $arg0 != 0
set $not_found = 1
else
set $not_found = 0
end
printf " block size status file:line\n"
printf "-------------------------------------------------------------------------------\n"
while $p
set $aptr = $p + sizeof(struct _zend_mem_header) + sizeof(align_test)
if $arg0 == 0 || (void *)$aptr == (void *)$arg0
if $p->magic == 0x7312f8dc
set $stat = "OK"
end
if $p->magic == 0x99954317
set $stat = "FREED"
end
if $p->magic == 0xfb8277dc
set $stat = "CACHED"
end
set $filename = strrchr($p->filename, '/')
if !$filename
set $filename = $p->filename
else
set $filename = $filename + 1
end
printf " 0x%08x ", $aptr
if $p->size == sizeof(struct _zval_struct) && ((struct _zval_struct *)$aptr)->type >= 0 && ((struct _zval_struct *)$aptr)->type < 10
printf "ZVAL?(%-2d) ", $p->size
else
printf "%-9d ", $p->size
end
set $total_size = $total_size + $p->size
printf "%-06s %s:%d", $stat, $filename, $p->lineno
if $p->orig_filename
set $orig_filename = strrchr($p->orig_filename, '/')
if !$orig_filename
set $orig_filename = $p->orig_filename
else
set $orig_filename = $orig_filename + 1
end
printf " <= %s:%d\n", $orig_filename, $p->orig_lineno
else
printf "\n"
end
if $arg0 != 0
set $p = 0
set $not_found = 0
else
set $p = $p->pNext
end
else
set $p = $p->pNext
end
end
if $not_found
printf "no such block that begins at 0x%08x.\n", $aptr
end
if $arg0 == 0
printf "-------------------------------------------------------------------------------\n"
printf " total: %d bytes\n", $total_size
end
end
document zmemcheck
show status of a memory block.
usage: zmemcheck [ptr].
if ptr is 0, all blocks will be listed.
end
-294
View File
@@ -1,294 +0,0 @@
PHP Coding Standards
====================
This file lists several standards that any programmer, adding or changing
code in PHP, should follow. Since this file was added at a very late
stage of the development of PHP v3.0, the code base does not (yet) fully
follow it, but it's going in that general direction. Since we are now
well into the version 4 releases, many sections have been recoded to use
these rules.
Code Implementation
-------------------
[0] Document your code in source files and the manual. [tm]
[1] Functions that are given pointers to resources should not free them
For instance, function int mail(char *to, char *from) should NOT free
to and/or from.
Exceptions:
- The function's designated behavior is freeing that resource. E.g. efree()
- The function is given a boolean argument, that controls whether or not
the function may free its arguments (if true - the function must free its
arguments, if false - it must not)
- Low-level parser routines, that are tightly integrated with the token
cache and the bison code for minimum memory copying overhead.
[2] Functions that are tightly integrated with other functions within the
same module, and rely on each other non-trivial behavior, should be
documented as such and declared 'static'. They should be avoided if
possible.
[3] Use definitions and macros whenever possible, so that constants have
meaningful names and can be easily manipulated. The only exceptions
to this rule are 0 and 1, when used as false and true (respectively).
Any other use of a numeric constant to specify different behavior
or actions should be done through a #define.
[4] When writing functions that deal with strings, be sure to remember
that PHP holds the length property of each string, and that it
shouldn't be calculated with strlen(). Write your functions in a such
a way so that they'll take advantage of the length property, both
for efficiency and in order for them to be binary-safe.
Functions that change strings and obtain their new lengths while
doing so, should return that new length, so it doesn't have to be
recalculated with strlen() (e.g. php_addslashes())
[5] Use php_error_docref() group of functions to report any errors/warnings
during code execution. Use descriptive error messages, and try to avoid
using identical error strings for different stages of an error. For
example, if in order to obtain a URL you have to parse the URL, connect,
and retreive the text, assuming something can go wrong at each of these
stages, don't report an error "Unable to get URL" on all of them, but
instead, write something like "Unable to parse URL", "Unable to connect
to URL server" and "Unable to fetch URL text", respectively.
It has been silently agreed to prefix every php_error() message with the
name of the current function if applicable:
php_error(E_WHATEVER, "%s(): Desc.", get_active_function_name(TSRMLS_C));
This can be done automatically using php_error_docref(). The first
parameter, docref, is either NULL or the URL of a page describing the
error in detail. In most cases you will pass NULL, to generate the URL
from the name of the function being executed:
php_error_docref(NULL TSRMLS_CC, E_WHATEVER, "Desc.");
If you pass a URL, it can either be a full URL beginning with "http://":
php_error_docref("http://externalsite.tld/page.ext#error"
TSRMLS_CC, E_WHATEVER, "Desc.");
Or the name of a manual page without file extension, but with an optional
target anchor. Or simply the anchor within the manual page of the current
function. When using function names you must replace '_' by '-':
php_error_docref("function.ext-func#error" TSRMLS_CC, E_WHATEVER, "Desc.");
To display one or two important parameters after the function name, use
php_error_docref1() or php_error_docref2(). For example, file functions
should display the name of the file opened:
php_error_docref1("function.fopen" TSRMLS_CC, filename,
E_WHATEVER, "Desc.");
php_error_docref2("function.fopen" TSRMLS_CC, filename, openmode,
E_WHATEVER, "Desc.");
Fixing ("unifying") existing php_error() message is a good thing [tm].
[6] NEVER USE strncat(). If you're absolutely sure you know what you're doing,
check its man page again, and only then, consider using it, and even then,
try avoiding it.
[7] Use PHP_* macros in the PHP source, and ZEND_* macros in the Zend
part of the source. Although the PHP_* macro's are mostly aliased to the
ZEND_* macros it gives a better understanding on what kind of macro you're
calling.
[8] Use assert(). assert.h is included in php.h if it is available. Not only
does good assertion catch bugs, but it also helps with code readability.
- Do not use assert for error handling. Use assert only for the
condition that must be always true.
- Do not use assignments in assert conditions. If you assign inside an
assert condition, you risk an elusive bug that would be very difficult
to spot in a debug build, due to the side effect of the assignment.
Function calls in assert conditions may also cause this problem, if
they modify one of their arguments or global variables.
[9] When commenting out code using a #if statement, do NOT use 0 only. Instead
use "<cvs username here>_0". For example, #if FOO_0, where FOO is your
cvs user foo. This allows easier tracking of why code was commented out,
especially in bundled libraries.
[10] Do not define functions that are not available. For instance, if a
library is missing a function, do not define the PHP version of the
function, and do not raise a run-time error about the function not
existing. End users should use function_exists() to test for the
existence of a function
[11] Prefer emalloc(), efree(), estrdup(), etc. to their standard C library
counterparts. These functions implement an internal "safety-net"
mechanism that ensures the deallocation of any unfreed memory at the
end of a request. They also provide useful allocation and overflow
information while running in debug mode.
In almost all cases, memory returned to the engine must be allocated
using emalloc().
The use of malloc() should be limited to cases where a third-party
library may need to control or free the memory, or when the memory in
question needs to survive between multiple requests.
Naming Conventions
------------------
[1] Function names for user-level functions should be enclosed with in
the PHP_FUNCTION() macro. They should be in lowercase, with words
underscore delimited, with care taken to minimize the letter count.
Abbreviations should not be used when they greatly decrease the
readability of the function name itself.
Good:
'mcrypt_enc_self_test'
'mysql_list_fields'
Ok:
'mcrypt_module_get_algo_supported_key_sizes'
(could be 'mcrypt_mod_get_algo_sup_key_sizes'?)
'get_html_translation_table'
(could be 'html_get_trans_table'?)
Bad:
'hw_GetObjectByQueryCollObj'
'pg_setclientencoding'
'jf_n_s_i'
[2] If they are part of a "parent set" of functions, that parent should
be included in the user function name, and should be clearly related
to the parent program or function family. This should be in the form
of parent_*.
A family of 'foo' functions, for example:
Good:
'foo_select_bar'
'foo_insert_baz'
'foo_delete_baz'
Bad:
'fooselect_bar'
'fooinsertbaz'
'delete_foo_baz'
[3] Function names used by user functions should be prefixed
with "_php_", and followed by a word or an underscore-delimited list of
words, in lowercase letters, that describes the function. If applicable,
they should be declared 'static'.
[4] Variable names must be meaningful. One letter variable names must be
avoided, except for places where the variable has no real meaning or
a trivial meaning (e.g. for (i=0; i<100; i++) ...).
[5] Variable names should be in lowercase. Use underscores to separate
between words.
Syntax and indentation
----------------------
[1] Never use C++ style comments (i.e. // comment). Always use C-style
comments instead. PHP is written in C, and is aimed at compiling
under any ANSI-C compliant compiler. Even though many compilers
accept C++-style comments in C code, you have to ensure that your
code would compile with other compilers as well.
The only exception to this rule is code that is Win32-specific,
because the Win32 port is MS-Visual C++ specific, and this compiler
is known to accept C++-style comments in C code.
[2] Use K&R-style. Of course, we can't and don't want to
force anybody to use a style he or she is not used to, but,
at the very least, when you write code that goes into the core
of PHP or one of its standard modules, please maintain the K&R
style. This applies to just about everything, starting with
indentation and comment styles and up to function declaration
syntax.
(see also http://www.tuxedo.org/~esr/jargon/html/entry/indent-style.html)
[3] Be generous with whitespace and braces. Always prefer:
if (foo) {
bar;
}
to:
if(foo)bar;
Keep one empty line between the variable declaration section and
the statements in a block, as well as between logical statement
groups in a block. Maintain at least one empty line between
two functions, preferably two.
[4] When indenting, use the tab character. A tab is expected to represent
four spaces. It is important to maintain consistency in indenture so
that definitions, comments, and control structures line up correctly.
Documentation and Folding Hooks
-------------------------------
In order to make sure that the online documentation stays in line with
the code, each user-level function should have its user-level function
prototype before it along with a brief one-line description of what the
function does. It would look like this:
/* {{{ proto int abs(int number)
Returns the absolute value of the number */
PHP_FUNCTION(abs)
{
...
}
/* }}} */
The {{{ symbols are the default folding symbols for the folding mode in
Emacs and vim (set fdm=marker). Folding is very useful when dealing with
large files because you can scroll through the file quickly and just unfold
the function you wish to work on. The }}} at the end of each function marks
the end of the fold, and should be on a separate line.
The "proto" keyword there is just a helper for the doc/genfuncsummary script
which generates a full function summary. Having this keyword in front of the
function prototypes allows us to put folds elsewhere in the code without
messing up the function summary.
Optional arguments are written like this:
/* {{{ proto object imap_header(int stream_id, int msg_no [, int from_length [, int subject_length [, string default_host]]])
Returns a header object with the defined parameters */
And yes, please keep the prototype on a single line, even if that line
is massive.
New and Experimental Functions
-----------------------------------
To reduce the problems normally associated with the first public
implementation of a new set of functions, it has been suggested
that the first implementation include a file labeled 'EXPERIMENTAL'
in the function directory, and that the functions follow the
standard prefixing conventions during their initial implementation.
The file labelled 'EXPERIMENTAL' should include the following
information:
Any authoring information (known bugs, future directions of the module).
Ongoing status notes which may not be appropriate for CVS comments.
Aliases & Legacy Documentation
-----------------------------------
You may also have some deprecated aliases with close to duplicate
names, for example, somedb_select_result and somedb_selectresult. For
documentation purposes, these will only be documented by the most
current name, with the aliases listed in the documentation for
the parent function. For ease of reference, user-functions with
completely different names, that alias to the same function (such as
highlight_file and show_source), will be separately documented. The
proto should still be included, describing which function is aliased.
Backwards compatible functions and names should be maintained as long
as the code can be reasonably be kept as part of the codebase. See
/phpdoc/README for more information on documentation.
-2
View File
@@ -1,2 +0,0 @@
For the list of people who've put work into PHP, please see
http://www.php.net/credits.php
-34690
View File
File diff suppressed because it is too large. Load diff
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
-527
View File
@@ -1,527 +0,0 @@
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: activescript
COMMENT: See http://pecl.php.net/package/PHPScript
-------------------------------------------------------------------------------
EXTENSION: aolserver
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: apache
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: apache2filter
PRIMARY MAINTAINER: Aaron Bannert <aaron@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: apache2handler
PRIMARY MAINTAINER: Aaron Bannert <aaron@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: caudium
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: cgi
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: cli
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: embed
PRIMARY MAINTAINER: Edin Kadribasic <edink@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: isapi
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: nsapi
PRIMARY MAINTAINER: Uwe Schindler <thetaphi@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: phttpd
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: pi3web
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: roxen
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: servlet
PRIMARY MAINTAINER: Sam Ruby <rubys@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: thttpd
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: tux
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: webjames
PRIMARY MAINTAINER: Alex Waugh <alexwaugh@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
-------------------------------------------------------------------------------
== Database extensions ==
-------------------------------------------------------------------------------
EXTENSION: db
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: dba
PRIMARY MAINTAINER: Marcus Börger <helly@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: dbase
PRIMARY MAINTAINER: Jim Winstead <jimw@php.net>
MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: dbx
PRIMARY MAINTAINER: Marc Boeren <mboeren@php.net>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 4.0.6
COMMENT: DB abstraction for odbc, mysql, pgsql, mssql, fbsql and more, see documentation
-------------------------------------------------------------------------------
EXTENSION: fbsql
PRIMARY MAINTAINER: Frank M. Kromann <fmk@php.net>
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: informix
PRIMARY MAINTAINER: Danny Heijl <danny@php.net>
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@php.net>, Ard Biesheuvel <abies@php.net>
MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: msql
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: mssql
PRIMARY MAINTAINER: Frank M. Kromann <fmk@php.net>
MAINTENANCE: Maintained
STATUS: Working
COMMENT: Tested on phpts and isapi versions
-------------------------------------------------------------------------------
EXTENSION: mysql
PRIMARY MAINTAINER: Zak Greant <zak@php.net>, Georg Richter <georg@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: oci8
PRIMARY MAINTAINER: Antony Dovgal <tony2001@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: odbc
PRIMARY MAINTAINER: Dan Kalowsky <kalowsky@php.net>
MAINTENANCE: Maintained
STATUS: Working
COMMENT: Working
-------------------------------------------------------------------------------
EXTENSION: oracle
MAINTENANCE: Orphaned
STATUS: Working
COMMENT: Using the new OCI8 driver is encouraged where possible.
-------------------------------------------------------------------------------
EXTENSION: ovrimos
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: pgsql
PRIMARY MAINTAINER: Yasuo Ohgaki <yohgaki@php.net>
MAINTENANCE: Maintained
STATUS: Working
COMMENT: Use PostgreSQL 7.0.x or later. PostgreSQL 6.5.3 or less have fatal bug.
-------------------------------------------------------------------------------
EXTENSION: sybase
MAINTENANCE: Unknown
STATUS: Not Working
-------------------------------------------------------------------------------
EXTENSION: sybase_ct
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
== Other extensions ==
-------------------------------------------------------------------------------
EXTENSION: bcmath
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: bz2
COMMENT: See http://pecl.php.net/package/bz2
-------------------------------------------------------------------------------
EXTENSION: calendar
PRIMARY MAINTAINER: Hartmut Holzgraefe <hholzgra@php.net>
MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: com
PRIMARY MAINTAINER: Harald Radi <phanto@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: cpdf
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: crack
COMMENT: See http://pecl.php.net/package/crack
-------------------------------------------------------------------------------
EXTENSION: ctype
PRIMARY MAINTAINER: Hartmut Holzgraefe <hholzgra@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: curl
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: cyrus
COMMENT: See http://pecl.php.net/package/cyrus
-------------------------------------------------------------------------------
EXTENSION: dio
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
MAINTENANCE: Orphaned
STATUS: Working
SINCE: 4.0.6
-------------------------------------------------------------------------------
EXTENSION: domxml
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: dotnet
PRIMARY MAINTAINER: Sam Ruby <rubys@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: exif
PRIMARY MAINTAINER: Marcus Börger <helly@php.net>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 4.2
-------------------------------------------------------------------------------
EXTENSION: fdf
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
MAINTENANCE: Maintained
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: filepro
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: fribidi
COMMENT: See http://pecl.php.net/package/fribidi
-------------------------------------------------------------------------------
EXTENSION: ftp
PRIMARY MAINTAINER: Stefan Esser <sesser@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: gd
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: gettext
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: gmp
MAINTENANCE: Unknown
STATUS: Unknown
SINCE: 4.0.4
-------------------------------------------------------------------------------
EXTENSION: hwapi
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: hyperwave
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: iconv
PRIMARY MAINTAINER: Moriyoshi Koizumi <moriyoshi@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: imap
PRIMARY MAINTAINER: Chuck Hagenbuch <chagenbu@php.net>
MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: ircg
PRIMARY MAINTAINER: Sascha Schumann <sas@php.net>
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: java
PRIMARY MAINTAINER: Sam Ruby <rubys@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: ldap
PRIMARY MAINTAINER: Stig Venaas <venaas@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: mbstring
PRIMARY MAINTAINER: Rui Hirokawa <hirokawa@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: mcal
PRIMARY MAINTAINER: Chuck Hagenbuch <chagenbu@php.net>
MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: mcrypt
PRIMARY MAINTAINER: Derick Rethans <derick@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: mhash
PRIMARY MAINTAINER: Sascha Schumann <sas@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: mime_magic
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Unknown
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: ming
PRIMARY MAINTAINER: Frank M. Kromann <fmk@php.net>
MAINTENANCE: Unknown
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: mnogosearch
PRIMARY MAINTAINER: Sergey Kartashoff <gluke@php.net>
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: msession
PRIMARY MAINTAINER Mark L. Woodward <mlwmohawk@php.net>
MAINTENANCE: Maintained
STATUS: Working/Experimental
COMMENT: Tested on Linux, should work on other UNIX platforms. Backend server code can compile under Windows.
-------------------------------------------------------------------------------
EXTENSION: notes
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: ncurses
PRIMARY MAINTAINER Ilia Alshanetsky <iliaa@php.net>, Wez Furlong <wez@php.net>, Hartmut Holzgraefe <hholzgra@php.net>, Georg Richter <georg@php.net>
MAINTENANCE: Unknown
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: openssl
PRIMARY MAINTAINER: Wez Furlong <wez@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
SINCE: 4.0.4
-------------------------------------------------------------------------------
EXTENSION: overload
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: pcntl
MAINTENANCE: Unknown
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: pcre
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: pdf
PRIMARY MAINTAINER: Uwe Steinmann <steinm@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: pfpro
PRIMARY MAINTAINER: David Croft <david@php.net>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: posix
PRIMARY MAINTAINER: Kristian Köhntopp <kk@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: pspell
PRIMARY MAINTAINER: Vlad Krupin <vlad@php.net>
MAINTENANCE: Unknown
STATUS: Unknown
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: qtdom
MAINTENANCE: Unknown
STATUS: Experimental
SINCE: 4.0.4
-------------------------------------------------------------------------------
EXTENSION: readline
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: recode
PRIMARY MAINTAINER: Kristian Köhntopp <kk@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: session
PRIMARY MAINTAINER: Sascha Schumann <sas@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: shmop
PRIMARY MAINTAINER: Ilia Alshanetsky <iliaa@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
SINCE: 4.0.3
-------------------------------------------------------------------------------
EXTENSION: snmp
PRIMARY MAINTAINER: Rasmus Lerdorf <rasmus@php.net>
MAINTENANCE: Odd Fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: sockets
PRIMARY MAINTAINER: Chris Vandomelen <chrisv@php.net>
MAINTENANCE: Maintained
STATUS: Experimental
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: swf
PRIMARY MAINTAINER: Sterling Hughes <sterling@php.net>
MAINTENANCE: Orphaned
STATUS: Deprecated (Use the ming swf extension instead)
COMMENT: Only for Unix (won't change)
-------------------------------------------------------------------------------
EXTENSION: sysvmsg
MAINTENANCE: Unknown
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: sysvsem
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: sysvshm
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: tokenizer
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: w32api
MAINTENANCE: Unknown
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: wddx
PRIMARY MAINTAINER: Andrei Zmievski <andrei@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: xml
PRIMARY MAINTAINER: Thies C. Arntzen <thies@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: xmlrpc
MAINTENANCE: Unknown
STATUS: Experimental
-------------------------------------------------------------------------------
EXTENSION: xslt
PRIMARY MAINTAINER: Hartmut Holzgraefe <hholzgra@php.net>
MAINTENANCE: Odd Fixes
STATUS: Working (mostly)
-------------------------------------------------------------------------------
EXTENSION: yaz
COMMENT: See http://pecl.php.net/package/yaz
-------------------------------------------------------------------------------
EXTENSION: yp
MAINTENANCE: Unknown
STATUS: Unknown
-------------------------------------------------------------------------------
EXTENSION: zip
COMMENT: See http://pecl.php.net/package/zip
-------------------------------------------------------------------------------
EXTENSION: zlib
PRIMARY MAINTAINER: Stefan Roehrich <sr@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
-1525
View File
File diff suppressed because it is too large. Load diff
-68
View File
@@ -1,68 +0,0 @@
--------------------------------------------------------------------
The PHP License, version 3.0
Copyright (c) 1999 - 2002 The PHP Group. All rights reserved.
--------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
modification, is permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. The name "PHP" must not be used to endorse or promote products
derived from this software without prior written permission. For
written permission, please contact group@php.net.
4. Products derived from this software may not be called "PHP", nor
may "PHP" appear in their name, without prior written permission
from group@php.net. You may indicate that your software works in
conjunction with PHP by saying "Foo for PHP" instead of calling
it "PHP Foo" or "phpfoo"
5. The PHP Group may publish revised and/or new versions of the
license from time to time. Each version will be given a
distinguishing version number.
Once covered code has been published under a particular version
of the license, you may always continue to use it under the terms
of that version. You may also choose to use such covered code
under the terms of any subsequent version of the license
published by the PHP Group. No one other than the PHP Group has
the right to modify the terms applicable to covered code created
under this License.
6. Redistributions of any form whatsoever must retain the following
acknowledgment:
"This product includes PHP, freely available from
<http://www.php.net/>".
THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP
DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------
This software consists of voluntary contributions made by many
individuals on behalf of the PHP Group.
The PHP Group can be contacted via Email at group@php.net.
For more information on the PHP Group and the PHP project,
please see <http://www.php.net>.
This product includes the Zend Engine, freely available at
<http://www.zend.com>.
-23
View File
@@ -1,23 +0,0 @@
#
# Zend
#
$(builddir)/zend_language_scanner.lo: $(builddir)/zend_language_parser.h
$(builddir)/zend_ini_scanner.lo: $(builddir)/zend_ini_parser.h
$(builddir)/zend_language_scanner.c: $(srcdir)/zend_language_scanner.l
$(LEX) -Pzend -S$(srcdir)/flex.skl -o$@ -i $(srcdir)/zend_language_scanner.l
$(builddir)/zend_language_parser.h: $(builddir)/zend_language_parser.c
$(builddir)/zend_language_parser.c: $(srcdir)/zend_language_parser.y
$(YACC) -p zend -v -d $(srcdir)/zend_language_parser.y -o $@
$(builddir)/zend_ini_parser.h: $(builddir)/zend_ini_parser.c
$(builddir)/zend_ini_parser.c: $(srcdir)/zend_ini_parser.y
$(YACC) -p ini_ -v -d $(srcdir)/zend_ini_parser.y -o $@
$(builddir)/zend_ini_scanner.c: $(srcdir)/zend_ini_scanner.l
$(LEX) -Pini_ -S$(srcdir)/flex.skl -o$@ -i $(srcdir)/zend_ini_scanner.l
$(builddir)/zend_indent.lo $(builddir)/zend_highlight.lo $(builddir)/zend_compile.lo: $(builddir)/zend_language_parser.h
-78
View File
@@ -1,78 +0,0 @@
mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p
INSTALL = $(top_srcdir)/build/shtool install -c
INSTALL_DATA = $(INSTALL) -m 644
DEFS = -DPHP_ATOM_INC -I$(top_builddir)/include -I$(top_builddir)/main -I$(top_srcdir)
COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(PHP_FRAMEWORKPATH)
all: $(all_targets)
@echo
@echo "Build complete."
@echo "(It is safe to ignore warnings about tempnam and tmpnam)."
@echo
build-modules: $(PHP_MODULES)
libphp4.la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
-@$(LIBTOOL) --silent --mode=install cp libphp4.la $(phptempdir)/libphp4.la >/dev/null 2>&1
libs/libphp4.bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp4.so
install: $(all_targets) $(install_targets)
install-sapi: $(OVERALL_TARGET)
@echo "Installing PHP SAPI module: $(PHP_SAPI)"
-@$(mkinstalldirs) $(INSTALL_ROOT)$(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: build-modules
@test -d modules && \
$(mkinstalldirs) $(INSTALL_ROOT)$(EXTENSION_DIR)
@echo "Installing shared extensions: $(INSTALL_ROOT)$(EXTENSION_DIR)/"
@rm -f modules/*.la >/dev/null 2>&1
@$(INSTALL) modules/* $(INSTALL_ROOT)$(EXTENSION_DIR)
install-tester:
@echo "Installing regression tester: $(INSTALL_ROOT)$(PEAR_INSTALLDIR)/"
@$(mkinstalldirs) $(INSTALL_ROOT)$(PEAR_INSTALLDIR)
@$(INSTALL) -m 755 $(top_srcdir)/run-tests.php $(INSTALL_ROOT)$(PEAR_INSTALLDIR)
install-su: install-pear install-tester
test:
-@if test -x $(SAPI_CLI_PATH) && test ! -z $(SAPI_CLI_PATH); then \
TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
TEST_PHP_SRCDIR=$(top_srcdir) \
CC="$(CC)" \
$(top_builddir)/$(SAPI_CLI_PATH) -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' $(top_srcdir)/run-tests.php $(TESTS); \
else \
echo "ERROR: Cannot run tests without CLI sapi."; \
fi
clean:
find . -name \*.lo | xargs rm -f
find . -name \*.o | xargs rm -f
find . -name \*.la | xargs rm -f
find . -name \*.a | xargs rm -f
find . -name \*.so | xargs rm -f
find . -name .libs -a -type d|xargs rm -rf
rm -f libphp4.la $(SAPI_CLI_PATH) $(OVERALL_TARGET) modules/* libs/*
distclean: clean
rm -f config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h php4.spec sapi/apache/libphp4.module buildmk.stamp
egrep define'.*include/php' configure|sed 's/.*>//'|xargs rm -f
find . -name Makefile | xargs rm -f
.PHONY: all clean install distclean test
.NOEXPORT:
-3564
View File
File diff suppressed because it is too large. Load diff
-115
View File
@@ -1,115 +0,0 @@
This is the first file you should be reading after you get your CVS account.
We'll assume you're basically familiar with CVS, but feel free to post
your questions on the mailing list. Please have a look at
http://cvsbook.red-bean.com/ for more detailed information on CVS.
PHP is developed through the efforts of a large number of people.
Collaboration is a Good Thing(tm), and CVS lets us do this. Thus, following
some basic rules with regards to CVS usage will:
a. Make everybody happier, especially those responsible for maintaining
the CVS itself.
b. Keep the changes consistently well documented and easily trackable.
c. Prevent some of those 'Oops' moments.
d. Increase the general level of good will on planet Earth.
Having said that, here are the organizational rules:
1. Respect other people working on the project.
2. Discuss any significant changes on the list before committing.
3. Look at 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
start fighting publicly - take it up in private email.
5. If you don't know how to do something, ask first!
6. Test your changes before committing them. We mean it. Really.
Currently we have the following branches in use:
HEAD Will become PHP 5.1. This CVS branch is for active development.
PHP_5_0 Is used to release the PHP 5.0.x series. Only minor feature
enhancements may go in here, but please keep that as infrequent as
possible.
PHP_4_3 Is used to release the PHP 4.3.x series. Only bugfixes are permitted
on this branch.
The next few rules are more of a technical nature.
1. DO NOT TOUCH ChangeLog! It is automagically updated from the commit
messages every day. Woe be to those who attempt to mess with it.
2. All news updates intended for public viewing, such as new features,
bug fixes, improvements, etc., should go into the NEWS file.
NB! Lines, starting with @ will go automagically into NEWS file, but
this is NOT recommended, though. Please, add news entries directly to
NEWS file and don't forget to keep them adjusted and sorted.
3. Do not commit multiple file and dump all messages in one commit. If you
modified several unrelated files, commit each group separately and
provide a nice commit message for each one. See example below.
4. Do write your commit message in such a way that it makes sense even
without the corresponding diff. One should be able to look at it, and
immediately know what was modified. Definitely include the function name
in the message as shown below.
5. In your commit messages, keep each line shorter than 80 characters. And
try to align your lines vertically, if they wrap. It looks bad otherwise.
6. If you modified a function that is callable from PHP, prepend PHP to
the function name as shown below.
The format of the commit messages is pretty simple.
Use a - to start a new item in your commit message.
If a line begins with #, it is taken to be a comment and will not appear
in the ChangeLog. Everything else goes into the ChangeLog.
It is important to note that if your comment or news logline spans multiple
lines, you have to put # at the beginning of _every_ such line.
Example. Say you modified two files, datetime.c and string.c. In datetime.c you
added a new format option for the date() function, and in string.c you fixed a
memory leak in php_trim(). Don't commit both of these at once. Commit them
separately and try to make sure your commit messages look something like the
following.
For datetime.c:
- Added new 'K' format modifier to date() for printing out number of days until
New Year's Eve.
For string.c:
- Fixed a memory leak in php_trim() resulting from improper use of zval_dtor().
#- Man, that thing was leaking all over the place!
The # lines will be omitted from the ChangeLog automagically.
If you fix some bugs, you should note the bug ID numbers in your
commit message. Bug ID should be prefixed by "#" for easier access to
bug report when developers are browsing CVS via. LXR or Bonsai.
Example:
Fixed bug #14016 (pgsql notice handler double free crash bug.)
If you don't see your messages in ChangeLog right away, don't worry!
These files are updated once a day, so your stuff will not show up until
somewhat later.
You can use LXR (http://lxr.php.net/) and Bonsai (http://bonsai.php.net/)
to look at PHP CVS repository in various ways.
To receive daily updates to ChangeLog and NEWS, send an empty message to
php-cvs-daily-subscribe@lists.php.net.
Happy hacking,
PHP Team
-39
View File
@@ -1,39 +0,0 @@
Between PHP 4.0.6 and 4.1.0, the Zend module struct changed in a way
that broke both source and binary compatibility. If you are
maintaining a third party extension, here's how to update it:
If this was your old module entry:
zend_module_entry foo_module_entry = {
"foo", /* extension name */
foo_functions, /* extension function list */
NULL, /* extension-wide startup function */
NULL, /* extension-wide shutdown function */
PHP_RINIT(foo), /* per-request startup function */
PHP_RSHUTDOWN(foo), /* per-request shutdown function */
PHP_MINFO(foo), /* information function */
STANDARD_MODULE_PROPERTIES
};
Here's how it should look if you want your code to build with PHP
4.1.0 and up:
zend_module_entry foo_module_entry = {
#if ZEND_MODULE_API_NO >= 20010901
STANDARD_MODULE_HEADER,
#endif
"foo", /* extension name */
foo_functions, /* extension function list */
NULL, /* extension-wide startup function */
NULL, /* extension-wide shutdown function */
PHP_RINIT(foo), /* per-request startup function */
PHP_RSHUTDOWN(foo), /* per-request shutdown function */
PHP_MINFO(foo), /* information function */
#if ZEND_MODULE_API_NO >= 20010901
FOO_VERSION, /* extension version number (string) */
#endif
STANDARD_MODULE_PROPERTIES
};
If you don't care about source compatibility with earlier PHP releases
than 4.1.0, you can drop the #if/#endif lines.
-189
View File
@@ -1,189 +0,0 @@
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, change to the ext/ directory of the 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.
[ Note that GNU awk is likely required for this script to work. Debian
systems seem to default to using mawk, so you may need to change the
#! line in skeleton/create_stubs to use gawk explicitly. ]
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,
change 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, e.g.
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 additional short description may be added after the parameters.
If present it will be filled into the 'proto' header comments in the stubs
code and the <refpurpose> tag in the XML documentation.
An example:
my_function(int arg1, int arg2 [, int arg3 [, int arg4]]) this is my 1st
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 the generated code too much. It tries to be useful in most of
the situations you might encounter, but automatic code generation 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;
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, "???", ???_rsrc_id);
ZEND_FETCH_RESOURCE(???, ???, font, font_id, "???", ???_rsrc_id);
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");
}
/* }}} */
-127
View File
@@ -1,127 +0,0 @@
New parameter parsing functions
===============================
It should be easier to parse input parameters to an extension function.
Hence, borrowing from Python's example, there are now a set of functions
that given the string of type specifiers, can parse the input parameters
and store the results in the user specified variables. This avoids most
of the IS_* checks and convert_to_* conversions. The functions also
check for the appropriate number of parameters, and try to output
meaningful error messages.
Prototypes
----------
/* Implemented. */
int zend_parse_parameters(int num_args TSRMLS_DC, char *type_spec, ...);
int zend_parse_parameters_ex(int flags, int num_args TSRMLS_DC, char *type_spec, ...);
The zend_parse_parameters() function takes the number of parameters
passed to the extension function, the type specifier string, and the
list of pointers to variables to store the results in. The _ex() version
also takes 'flags' argument -- current only ZEND_PARSE_PARAMS_QUIET can
be used as 'flags' to specify that the function should operate quietly
and not output any error messages.
Both functions return SUCCESS or FAILURE depending on the result.
The auto-conversions are performed as necessary. Arrays, objects, and
resources cannot be auto-converted.
Type specifiers
---------------
l - long
d - double
s - string (with possible null bytes) and its length
b - boolean, stored in zend_bool
r - resource (stored in zval)
a - array
o - object (of any type)
O - object (of specific type, specified by class entry)
z - the actual zval
The following characters also have a meaning in the specifier string:
| - indicates that the remaining parameters are optional, they
should be initialized to default values by the extension since they
will not be touched by the parsing function if they are not
passed to it.
/ - use SEPARATE_ZVAL_IF_NOT_REF() on the parameter it follows
! - the parameter it follows can be of specified type or NULL (only applies
to 'a', 'o', 'O', 'r', and 'z'). If NULL is passed, the results
pointer is set to NULL as well.
Examples
--------
/* Gets a long, a string and its length, and a zval */
long l;
char *s;
int s_len;
zval *param;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lsz",
&l, &s, &s_len, &param) == FAILURE) {
return;
}
/* Gets an object of class specified by my_ce, and an optional double. */
zval *obj;
double d = 0.5;
zend_class_entry my_ce;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|d",
&obj, my_ce, &d) == FAILURE) {
return;
}
/* Gets an object or null, and an array.
If null is passed for object, obj will be set to NULL. */
zval *obj;
zval *arr;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o!a",
&obj, &arr) == FAILURE) {
return;
}
/* Gets a separated array which can also be null. */
zval *arr;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a/!",
&arr) == FAILURE) {
return;
}
/* Get only the first three parameters (useful for varargs functions). */
zval *z;
zend_bool b;
zval *r;
if (zend_parse_parameters(3 TSRMLS_CC, "zbr!",
&z, &b, &r) == FAILURE) {
return;
}
/* Get either a set of 3 longs or a string. */
long l1, l2, l3;
char *s;
/*
* The function expects a pointer to a integer in this case, not a long
* or any other type. If you specify a type which is larger
* than a 'int', the upper bits might not be initialized
* properly, leading to random crashes on platforms like
* Tru64 or Linux/Alpha.
*/
int length;
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC,
"lll", &l1, &l2, &l3) == SUCCESS) {
/* manipulate longs */
} else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC,
"s", &s, &length) == SUCCESS) {
/* manipulate string */
} else {
/* output error */
return;
}
-57
View File
@@ -1,57 +0,0 @@
QNX4 Installation Notes
-----------------------
NOTE: General installation instructions are in the INSTALL file
1. To compile and test PHP3 you have to grab, compile and install:
- GNU dbm library or another db library;
- GNU bison (1.25 or later; 1.25 tested);
- GNU flex (any version supporting -o and -P options; 2.5.4 tested);
- GNU diffutils (any version supporting -w option; 2.7 tested);
2. To use CVS version you may need also:
- GNU CVS (1.9 tested);
- GNU autoconf (2.12 tested);
- GNU m4 (1.3 or later preferable; 1.4 tested);
3. To run configure define -lunix in command line:
LDFLAGS=-lunix ./configure
4. To use Sybase SQL Anywhere define ODBC_QNX and CUSTOM_ODBC_LIBS in
command line and run configure with --with-custom-odbc:
CFLAGS=-DODBC_QNX LDFLAGS=-lunix CUSTOM_ODBC_LIBS="-ldblib -lodbc" ./configure --with-custom-odbc=/usr/lib/sqlany50
If you have SQL Anywhere version 5.5.00, then you have to add
CFLAGS=-DSQLANY_BUG
to workaround its SQLFreeEnv() bug. Other versions has not been tested,
so try without this flag first.
5. To build the Apache module, you may have to hardcode an include path for
alloc.h in your Apache base directory:
- APACHE_DIRECTORY/src/httpd.h:
change #include "alloc.h"
to #include "APACHE_DIRECTORY/src/alloc.h"
Unless you want to use system regex library, you have to hardcode also
a path to regex.h:
- APACHE_DIRECTORY/src/conf.h:
change #include <regex.h>
to #include "APACHE_DIRECTORY/src/regex/regex.h"
I don't know so far why this required for QNX, may be it is Watcom
compiler problem.
If you building Apache module with SQL Anywhere support, you'll get
symbol conflict with BOOL. It is defined in Apache (httpd.h) and in
SQL Anywhere (odbc.h). This has nothing to do with PHP, so you have to
fix it yourself someway.
6. With above precautions, it should compile as is and pass regression
tests completely:
make
make check
make install
Don't bother me unless you really sure you made that all but it
still doesn't work.
June 28, 1998
Igor Kovalenko -- owl@infomarket.ru
-155
View File
@@ -1,155 +0,0 @@
$Id$
=============================================================================
HOW TO CREATE A SELF-CONTAINED PHP EXTENSION
A self-contained extension can be distributed independently of
the PHP source. To create such an extension, two things are
required:
- Configuration file (config.m4)
- Source code for your module
We will describe now how to create these and how to put things
together.
PREPARING YOUR SYSTEM
While the result will run on any system, a developer's setup needs these
tools:
GNU autoconf
GNU automake
GNU libtool
GNU m4
All of these are available from
ftp://ftp.gnu.org/pub/gnu/
CONVERTING AN EXISTING EXTENSION
Just to show you how easy it is to create a self-contained
extension, we will convert an embedded extension into a
self-contained one. Install PHP and execute the following
commands.
$ mkdir /tmp/newext
$ cd /tmp/newext
You now have an empty directory. We will copy the files from
the mysql extension:
$ cp -rp php-4.0.X/ext/mysql/* .
It is time to finish the module. Run:
$ phpize
You can now ship the contents of the directory - the extension
can live completely on its own.
The user instructions boil down to
$ ./configure \
[--with-php-config=/path/to/php-config] \
[--with-mysql=MYSQL-DIR]
$ make install
The MySQL module will either use the embedded MySQL client
library or the MySQL installation in MYSQL-DIR.
DEFINING THE NEW EXTENSION
Our demo extension is called "foobar".
It consists of two source files "foo.c" and "bar.c"
(and any arbitrary amount of header files, but that is not
important here).
The demo extension does not reference any external
libraries (that is important, because the user does not
need to specify anything).
LTLIBRARY_SOURCES specifies the names of the sources files. You can
name an arbitrary number of source files here.
CREATING THE M4 CONFIGURATION FILE
The m4 configuration can perform additional checks. For a
self-contained extension, you do not need more than a few
macro calls.
------------------------------------------------------------------------------
PHP_ARG_ENABLE(foobar,whether to enable foobar,
[ --enable-foobar Enable foobar])
if test "$PHP_FOOBAR" != "no"; then
PHP_NEW_EXTENSION(foobar, foo.c bar.c, $ext_shared)
fi
------------------------------------------------------------------------------
PHP_ARG_ENABLE will automatically set the correct variables, so
that the extension will be enabled by PHP_NEW_EXTENSION in shared mode.
The first argument of PHP_NEW_EXTENSION describes the name of the
extension. The second names the source-code files. The third passes
$ext_shared which is set by PHP_ARG_ENABLE/WITH to PHP_NEW_EXTENSION.
Please use always PHP_ARG_ENABLE or PHP_ARG_WITH. Even if you do not
plan to distribute your module with PHP, these facilities allow you
to integrate your module easily into the main PHP module framework.
CREATING SOURCE FILES
ext_skel can be of great help when creating the common code for all modules
in PHP for you and also writing basic function definitions and C code for
handling arguments passed to your functions. See README.EXT_SKEL for further
information.
As for the rest, you are currently alone here. There are a lot of existing
modules, use a simple module as a starting point and add your own code.
CREATING THE SELF-CONTAINED EXTENSION
Put config.m4 and the source files into one directory. Then, run phpize
(this is installed during make install by PHP 4.0).
For example, if you configured PHP with --prefix=/php, you would run
$ /php/bin/phpize
This will automatically copy the necessary build files and create
configure from your config.m4.
And that's it. You now have a self-contained extension.
INSTALLING A SELF-CONTAINED EXTENSION
An extension can be installed by running:
$ ./configure \
[--with-php-config=/path/to/php-config]
$ make install
ADDING SHARED MODULE SUPPORT TO A MODULE
In order to be useful, a self-contained extension must be loadable
as a shared module. I will explain now how you can add shared module
support to an existing module called foo.
1. In config.m4, use PHP_ARG_WITH/PHP_ARG_ENABLE. Then you will
automatically be able to use --with-foo=shared[,..] or
--enable-foo=shared[,..].
2. In config.m4, use PHP_NEW_EXTENSION(foo,.., $ext_shared) to enable
building the extension.
3. Add the following lines to your C source file:
#ifdef COMPILE_DL_FOO
ZEND_GET_MODULE(foo)
#endif
-373
View File
@@ -1,373 +0,0 @@
An Overview of the PHP Streams abstraction
==========================================
$Id$
WARNING: some prototypes in this file are out of date.
The information contained here is being integrated into
the PHP manual - stay tuned...
Please send comments to: Wez Furlong <wez@thebrainroom.com>
Why Streams?
============
You may have noticed a shed-load of issock parameters flying around the PHP
code; we don't want them - they are ugly and cumbersome and force you to
special case sockets and files every time you need to work with a "user-level"
PHP file pointer.
Streams take care of that and present the PHP extension coder with an ANSI
stdio-alike API that looks much nicer and can be extended to support non file
based data sources.
Using Streams
=============
Streams use a php_stream* parameter just as ANSI stdio (fread etc.) use a
FILE* parameter.
The main functions are:
PHPAPI size_t php_stream_read(php_stream * stream, char * buf, size_t count);
PHPAPI size_t php_stream_write(php_stream * stream, const char * buf, size_t
count);
PHPAPI size_t php_stream_printf(php_stream * stream TSRMLS_DC,
const char * fmt, ...);
PHPAPI int php_stream_eof(php_stream * stream);
PHPAPI int php_stream_getc(php_stream * stream);
PHPAPI char *php_stream_gets(php_stream * stream, char *buf, size_t maxlen);
PHPAPI int php_stream_close(php_stream * stream);
PHPAPI int php_stream_flush(php_stream * stream);
PHPAPI int php_stream_seek(php_stream * stream, off_t offset, int whence);
PHPAPI off_t php_stream_tell(php_stream * stream);
These (should) behave in the same way as the ANSI stdio functions with similar
names: fread, fwrite, fprintf, feof, fgetc, fgets, fclose, fflush, fseek, ftell.
Opening Streams
===============
In most cases, you should use this API:
PHPAPI php_stream *php_stream_open_wrapper(char *path, char *mode,
int options, char **opened_path TSRMLS_DC);
Where:
path is the file or resource to open.
mode is the stdio compatible mode eg: "wb", "rb" etc.
options is a combination of the following values:
IGNORE_PATH (default) - don't use include path to search for the file
USE_PATH - use include path to search for the file
IGNORE_URL - do not use plugin wrappers
REPORT_ERRORS - show errors in a standard format if something
goes wrong.
STREAM_MUST_SEEK - If you really need to be able to seek the stream
and don't need to be able to write to the original
file/URL, use this option to arrange for the stream
to be copied (if needed) into a stream that can
be seek()ed.
opened_path is used to return the path of the actual file opened,
but if you used STREAM_MUST_SEEK, may not be valid. You are
responsible for efree()ing opened_path. opened_path may be (and usually
is) NULL.
If you need to open a specific stream, or convert standard resources into
streams there are a range of functions to do this defined in php_streams.h.
A brief list of the most commonly used functions:
PHPAPI php_stream *php_stream_fopen_from_file(FILE *file, const char *mode);
Convert a FILE * into a stream.
PHPAPI php_stream *php_stream_fopen_tmpfile(void);
Open a FILE * with tmpfile() and convert into a stream.
PHPAPI php_stream *php_stream_fopen_temporary_file(const char *dir,
const char *pfx, char **opened_path TSRMLS_DC);
Generate a temporary file name and open it.
There are some network enabled relatives in php_network.h:
PHPAPI php_stream *php_stream_sock_open_from_socket(int socket, int persistent);
Convert a socket into a stream.
PHPAPI php_stream *php_stream_sock_open_host(const char *host, unsigned short port,
int socktype, int timeout, int persistent);
Open a connection to a host and return a stream.
PHPAPI php_stream *php_stream_sock_open_unix(const char *path, int persistent,
struct timeval *timeout);
Open a UNIX domain socket.
Stream Utilities
================
If you need to copy some data from one stream to another, you will be please
to know that the streams API provides a standard way to do this:
PHPAPI size_t php_stream_copy_to_stream(php_stream *src,
php_stream *dest, size_t maxlen);
If you want to copy all remaining data from the src stream, pass
PHP_STREAM_COPY_ALL as the maxlen parameter, otherwise maxlen indicates the
number of bytes to copy.
This function will try to use mmap where available to make the copying more
efficient.
If you want to read the contents of a stream into an allocated memory buffer,
you should use:
PHPAPI size_t php_stream_copy_to_mem(php_stream *src, char **buf,
size_t maxlen, int persistent);
This function will set buf to the address of the buffer that it allocated,
which will be maxlen bytes in length, or will be the entire length of the
data remaining on the stream if you set maxlen to PHP_STREAM_COPY_ALL.
The buffer is allocated using pemalloc(); you need to call pefree() to
release the memory when you are done.
As with copy_to_stream, this function will try use mmap where it can.
If you have an existing stream and need to be able to seek() it, you
can use this function to copy the contents into a new stream that can
be seek()ed:
PHPAPI int php_stream_make_seekable(php_stream *origstream, php_stream **newstream);
It returns one of the following values:
#define PHP_STREAM_UNCHANGED 0 /* orig stream was seekable anyway */
#define PHP_STREAM_RELEASED 1 /* newstream should be used; origstream is no longer valid */
#define PHP_STREAM_FAILED 2 /* an error occurred while attempting conversion */
#define PHP_STREAM_CRITICAL 3 /* an error occurred; origstream is in an unknown state; you should close origstream */
make_seekable will always set newstream to be the stream that is valid
if the function succeeds.
When you have finished, remember to close the stream.
NOTE: If you only need to seek forward, there is no need to call this
function, as the php_stream_seek can emulate forward seeking when the
whence parameter is SEEK_CUR.
NOTE: Writing to the stream may not affect the original source, so it
only makes sense to use this for read-only use.
NOTE: If the origstream is network based, this function will block
until the whole contents have been downloaded.
NOTE: Never call this function with an origstream that is referenced
as a resource! It will close the origstream on success, and this
can lead to a crash when the resource is later used/released.
NOTE: If you are opening a stream and need it to be seekable, use the
STREAM_MUST_SEEK option to php_stream_open_wrapper();
Casting Streams
===============
What if your extension needs to access the FILE* of a user level file pointer?
You need to "cast" the stream into a FILE*, and this is how you do it:
FILE * fp;
php_stream * stream; /* already opened */
if (php_stream_cast(stream, PHP_STREAM_AS_STDIO, (void*)&fp, REPORT_ERRORS) == FAILURE) {
RETURN_FALSE;
}
The prototype is:
PHPAPI int php_stream_cast(php_stream * stream, int castas, void ** ret, int
show_err);
The show_err parameter, if non-zero, will cause the function to display an
appropriate error message of type E_WARNING if the cast fails.
castas can be one of the following values:
PHP_STREAM_AS_STDIO - a stdio FILE*
PHP_STREAM_AS_FD - a generic file descriptor
PHP_STREAM_AS_SOCKETD - a socket descriptor
If you ask a socket stream for a FILE*, the abstraction will use fdopen to
create it for you. Be warned that doing so may cause buffered data to be lost
if you mix ANSI stdio calls on the FILE* with php stream calls on the stream.
If your system has the fopencookie function, php streams can synthesize a
FILE* on top of any stream, which is useful for SSL sockets, memory based
streams, data base streams etc. etc.
In situations where this is not desirable, you should query the stream
to see if it naturally supports FILE *. You can use this code snippet
for this purpose:
if (php_stream_is(stream, PHP_STREAM_IS_STDIO)) {
/* can safely cast to FILE* with no adverse side effects */
}
You can use:
PHPAPI int php_stream_can_cast(php_stream * stream, int castas)
to find out if a stream can be cast, without actually performing the cast, so
to check if a stream is a socket you might use:
if (php_stream_can_cast(stream, PHP_STREAM_AS_SOCKETD) == SUCCESS) {
/* it can be a socket */
}
Please note the difference between php_stream_is and php_stream_can_cast;
stream_is tells you if the stream is a particular type of stream, whereas
can_cast tells you if the stream can be forced into the form you request.
The former doesn't change anything, while the later *might* change some
state in the stream.
Stream Internals
================
There are two main structures associated with a stream - the php_stream
itself, which holds some state information (and possibly a buffer) and a
php_stream_ops structure, which holds the "virtual method table" for the
underlying implementation.
The php_streams ops struct consists of pointers to methods that implement
read, write, close, flush, seek, gets and cast operations. Of these, an
implementation need only implement write, read, close and flush. The gets
method is intended to be used for streams if there is an underlying method
that can efficiently behave as fgets. The ops struct also contains a label
for the implementation that will be used when printing error messages - the
stdio implementation has a label of "STDIO" for example.
The idea is that a stream implementation defines a php_stream_ops struct, and
associates it with a php_stream using php_stream_alloc.
As an example, the php_stream_fopen() function looks like this:
PHPAPI php_stream * php_stream_fopen(const char * filename, const char * mode)
{
FILE * fp = fopen(filename, mode);
php_stream * ret;
if (fp) {
ret = php_stream_alloc(&php_stream_stdio_ops, fp, 0, 0, mode);
if (ret)
return ret;
fclose(fp);
}
return NULL;
}
php_stream_stdio_ops is a php_stream_ops structure that can be used to handle
FILE* based streams.
A socket based stream would use code similar to that above to create a stream
to be passed back to fopen_wrapper (or it's yet to be implemented successor).
The prototype for php_stream_alloc is this:
PHPAPI php_stream * php_stream_alloc(php_stream_ops * ops, void * abstract,
size_t bufsize, int persistent, const char * mode)
ops is a pointer to the implementation,
abstract holds implementation specific data that is relevant to this instance
of the stream,
bufsize is the size of the buffer to use - if 0, then buffering at the stream
level will be disabled (recommended for underlying sources that implement
their own buffering - such a FILE*),
persistent controls how the memory is to be allocated - persistently so that
it lasts across requests, or non-persistently so that it is freed at the end
of a request (it uses pemalloc),
mode is the stdio-like mode of operation - php streams places no real meaning
in the mode parameter, except that it checks for a 'w' in the string when
attempting to write (this may change).
The mode parameter is passed on to fdopen/fopencookie when the stream is cast
into a FILE*, so it should be compatible with the mode parameter of fopen().
Writing your own stream implementation
======================================
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
RULE #1: when writing your own streams: make sure you have configured PHP with
--enable-debug.
I've taken some great pains to hook into the Zend memory manager to help track
down allocation problems. It will also help you spot incorrect use of the
STREAMS_DC, STREAMS_CC and the semi-private STREAMS_REL_CC macros for function
definitions.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
RULE #2: Please use the stdio stream as a reference; it will help you
understand the semantics of the stream operations, and it will always
be more up to date than these docs :-)
First, you need to figure out what data you need to associate with the
php_stream. For example, you might need a pointer to some memory for memory
based streams, or if you were making a stream to read data from an RDBMS like
MySQL, you might want to store the connection and rowset handles.
The stream has a field called abstract that you can use to hold this data.
If you need to store more than a single field of data, define a structure to
hold it, allocate it (use pemalloc with the persistent flag set
appropriately), and use the abstract pointer to refer to it.
For structured state you might have this:
struct my_state {
MYSQL conn;
MYSQL_RES * result;
};
struct my_state * state = pemalloc(sizeof(struct my_state), persistent);
/* initialize the connection, and run a query, using the fields in state to
* hold the results */
state->result = mysql_use_result(&state->conn);
/* now allocate the stream itself */
stream = php_stream_alloc(&my_ops, state, 0, persistent, "r");
/* now stream->abstract == state */
Once you have that part figured out, you can write your implementation and
define the your own php_stream_ops struct (we called it my_ops in the above
example).
For example, for reading from this weird MySQL stream:
static size_t php_mysqlop_read(php_stream * stream, char * buf, size_t count)
{
struct my_state * state = (struct my_state*)stream->abstract;
if (buf == NULL && count == 0) {
/* in this special case, php_streams is asking if we have reached the
* end of file */
if (... at end of file ...)
return EOF;
else
return 0;
}
/* pull out some data from the stream and put it in buf */
... mysql_fetch_row(state->result) ...
/* we could do something strange, like format the data as XML here,
and place that in the buf, but that brings in some complexities,
such as coping with a buffer size too small to hold the data,
so I won't even go in to how to do that here */
}
Implement the other operations - remember that write, read, close and flush
are all mandatory. The rest are optional. Declare your stream ops struct:
php_stream_ops my_ops = {
php_mysqlop_write, php_mysqlop_read, php_mysqlop_close,
php_mysqlop_flush, NULL, NULL, NULL,
"Strange MySQL example"
}
Thats it!
Take a look at the STDIO implementation in streams.c for more information
about how these operations work.
The main thing to remember is that in your close operation you need to release
and free the resources you allocated for the abstract field. In the case of
the example above, you need to use mysql_free_result on the rowset, close the
connection and then use pefree to dispose of the struct you allocated.
You may read the stream->persistent field to determine if your struct was
allocated in persistent mode or not.
vim:tw=78:et
-127
View File
@@ -1,127 +0,0 @@
Submitting Patch for PHP
========================
This document describes how to submit a patch for PHP. Since you are
reading this document, you are willing to submit a patch for PHP.
Please keep reading! Submitting a patch for PHP is easy. The hard
part is making it acceptable for inclusion into our repository. :-)
How to create patch?
--------------------
We are working with CVS. You need to get CVS source to create a patch
that we accept. Visit http://www.php.net/anoncvs.php to get CVS
source. You can check out older versions, but make sure you get
the default branch (i.e. Do not use -r option when you check out the
CVS source)
Read CODING_STANDARDS file before you start working.
Now you are ready to create a patch. Modify source to fix a bug in PHP or
add a new feature to PHP. After you finished editing, please test your
patch. Read README.TESTING for testing.
After you finish testing your patch, take diff file using
"cvs diff > your.patch" command.
Read README.TESTING for submitting a test script for your patch. This is
not strictly required, but it is preferred to submit a test script along
with your patch. Making new test script is very easy. It also helps us
to understand what you have been fixed or added to PHP.
Tips for creating patch
-----------------------
If you would like to fix multiple bugs. It is easier for us if you
could create 1 patch for 1 bug, but this is not strictly required.
Note though that you might get little response, if your patch is
too hard to review.
If you would like change/add many lines, it is better to ask module
maintainer and/or internals@lists.php.net, or pear-dev@lists.php.net if
you are patching PEAR. Official module maintainers can be found in
EXTENSIONS file in PHP source.
If you are new to CVS (Concurrent Versions System), visit
http://cvshome.org/ for details.
Recommended CVS client settings for creating patch file
------------------------------------------------------
Recommended ~/.cvsrc file setting is:
------
cvs -z3
update -d -P
checkout -P
diff -u
------
diff -u means:
-u Use the unified output format.
With this CVS setting, you don't have to worry about adding/deleting
newlines and spaces.
Check list for submitting patch
-------------------------------
- Did you run "make test" to check if your patch didn't break
other features?
- Did you compile PHP with --enable-debug and check the PHP and
web server error logs when you test your patch?
- Did you build PHP for multi-threaded web servers. (Optional)
- Did you create test script for "make test"? (Recommended)
- Did you check your patch is unified format and it does not
contain white space changes? (If you are not using recommended
cvs setting)
- Did you update CVS source before you take final patch?
- Did you read the patch again?
Where to send your patch?
-------------------------
If you are patching C source, send the patch to internals@lists.php.net.
If you are patching a module, you should also send the patch to the
maintainer. Official module maintainers are listed in EXTENSION file
in source.
If you are patching PEAR, send the patch to pear-dev@lists.php.net.
Please add the prefix "[PATCH]" to your email subject and make sure
to include the patch as a MIME attachment even if it is short.
NOTE: only MIME attachments of type 'text/*' are accepted. The
easiest way to acclomplish this, is to make the extension
'.txt'.
Test scripts should be included in the same email.
Explain what has been fixed/added/changed by your patch.
Finally, add the bug Id(s) which can be closed by your patch, if any.
What happens after you submit your patch
--------------------------------------
If your patch is easy to review and has obviously no side-effects,
it might take up to a few hours until someone commits it.
Because this is a volunteer-driven effort, more complex patches will
require more patience on your side.
If you did not receive any feedback in a few days, please consider
resubmitting the description of your patch, along-side with
these questions:
- Is my patch too hard to review? Because of which factors?
- Should I split it up in multiple parts?
- Are there any unwanted whitespace changes?
What happens when your patch is applied?
----------------------------------------
Your name will be included together with your email address in the CVS
commit log. If your patch affects end-users, a brief description
and your name might be added to the NEWS file.
Thank you for submitting patch for PHP!
-307
View File
@@ -1,307 +0,0 @@
[IMPORTANT NOTICE]
------------------
Do _not_ ask to developers why some or all tests are failed under
your environment! Let us know if you find why it fails. Thank you.
[Testing Basics]
----------------
To execute test scripts, you must build PHP with some SAPI, then you
type "make test" to execute all or some test scripts saved under
"tests" directory under source root directory.
Usage:
make test
"make test" basically executes "run-tests.php" script
under the source root (parallel builds will not work). Therefore you
can execute the script as follows:
TEST_PHP_EXECUTABLE=sapi/cli/php \
sapi/cli/php [-c /path/to/php.ini] run-tests.php [ext/foo/tests/GLOB]
[Which "php" executable "make test" look for]
---------------------------------------------
You must use TEST_PHP_EXECUTABLE environment variable to explicitly
select the php executable to be used to run the tests. That can either
be the CLI or CGI executable.
"make test" executes "run-tests.php" script with "php" binary. Some
test scripts such as session must be executed by CGI SAPI. Therefore,
you must build PHP with CGI SAPI to perform all tests.
NOTE: PHP binary executing "run-tests.php" and php binary used for
executing test scripts may differ. If you use different PHP binary for
executing "run-tests.php" script, you may get errors.
[Which php.ini is used]
-----------------------
"make test" uses the same php.ini file as it would once installed.
The tests have been written to be independent of that php.ini file,
so if you find a test that is affected by a setting, please report
this, so we can address the issue.
[Which test scripts are executed]
---------------------------------
"run-tests.php" ("make test"), without any arguments executes all
test scripts by extracting all directories named "tests"
from the source root and any subdirectories below. If there are files,
which have a "phpt" extension, "run-tests.php" looks at the sections
in these files, determines whether it should run it, by evaluating
the 'SKIP' section. If the test is eligible for execution, the 'FILE'
section is extracted into a ".php" file (with the same name besides
the extension) and gets executed.
When an argument is given or TESTS environment variable is set, the
GLOB is expanded by the shell and any file with extension "*.phpt" is
regarded as a test file.
Tester can easily execute tests selectively with as follows.
Examples:
./sapi/cli/php run-tests.php ext/mbstring/*
./sapi/cli/php run-tests.php ext/mbstring/020.phpt
[Test results]
--------------
Test results are printed to standard output. If there is a failed test,
the "run-tests.php" script saves the result, the expected result and the
code executed to the test script directory. For example, if
ext/myext/tests/myext.phpt fails to pass, the following files are created:
ext/myext/tests/myext.php - actual test file executed
ext/myext/tests/myext.log - log of test execution (L)
ext/myext/tests/myext.exp - expected output (E)
ext/myext/tests/myext.out - output from test script (O)
ext/myext/tests/myext.diff - diff of .out and .exp (D)
Failed tests are always bugs. Either the test is bugged or not considering
factors applying to the tester's environment, or there is a bug in PHP.
If this is a known bug, we strive to provide bug numbers, in either the
test name or the file name. You can check the status of such a bug, by
going to: http://bugs.php.net/12345 where 12345 is the bug number.
For clarity and automated processing, bug numbers are prefixed by a hash
sign '#' in test names and/or test cases are named bug12345.phpt.
NOTE: The files generated by tests can be selected by setting the
environment variable TEST_PHP_LOG_FORMAT. For each file you want to be
generated use the character in brackets as shown above (default is LEOD).
The php file will be generated always.
NOTE: You can set environment variable TEST_PHP_DETAILED to enable
detailed test information.
[Automated testing]
If you like to keep up to speed, with latest developments and quality
assurance, setting the environment variable NO_INTERACTION to 1, will not
prompt the tester for any user input.
Normally, the exit status of "make test" is zero, regardless of the results
of independent tests. Set the environment variable REPORT_EXIT_STATUS to 1,
and "make test" will set the exit status ("$?") to non-zero, when an
individual test has failed.
Example script to be run by cron(1):
========== qa-test.sh =============
#!/bin/sh
CO_DIR=$HOME/cvs/php4
MYMAIL=qa-test@domain.com
TMPDIR=/var/tmp
TODAY=`date +"%Y%m%d"`
# Make sure compilation enviroment is correct
CONFIGURE_OPTS='--disable-all --enable-cli --with-pcre'
export MAKE=gmake
export CC=gcc
# Set test environment
export NO_INTERACTIVITY=1
export REPORT_EXIT_STATUS=1
cd $CO_DIR
cvs update . >>$TMPDIR/phpqatest.$TODAY
./cvsclean ; ./buildconf ; ./configure $CONFIGURE_OPTS ; $MAKE
$MAKE test >>$TMPDIR/phpqatest.$TODAY 2>&1
if test $? -gt 0
then
cat $TMPDIR/phpqatest.$TODAY | mail -s"PHP-QA Test Failed for $TODAY" $MYMAIL
fi
========== end of qa-test.sh =============
NOTE: the exit status of run-tests.php will be 1 when
REPORT_EXIT_STATUS is set. The result of "make test" may be higher
than that. At present, gmake 3.79.1 returns 2, so it is
advised to test for non-zero, rather then a specific value.
[Creating new test files]
-------------------------
Writing test file is very easy if you are used to PHP.
Here is an actual test file from standard module.
===== ext/standard/tests/strings/strtr.phpt =======
--TEST--
strtr() function
--FILE--
<?php
/* Do not change this test it is a REATME.TESTING example. */
$trans = array("hello"=>"hi", "hi"=>"hello", "a"=>"A", "world"=>"planet");
var_dump(strtr("# hi all, I said hello world! #", $trans));
?>
--EXPECT--
string(32) "# hello All, I sAid hi planet! #"
===== ext/standard/tests/strings/strtr.phpt =======
As you can see the file is devided into several sections. Below is a
list of all possible sections:
"--TEST--" is title of the test (required).
"--SKIPIF--" is condition when to skip this test (optional).
"--POST--" is POST variable passed to test script (optional).
"--GET--" is GET variable passed to test script (optional).
"--INI--" each line contains an ini setting e.g. foo=bar (optional).
"--FILE--" is the test script (required).
"--EXPECT--" is the expected output from the test script (required).
"--EXPECTF--" is an alternative of --EXPECT--. The difference is that
this form uses sscanf for output validation (alternative).
"--EXPECTREGEX--" is an alternative of --EXPECT--. This form allows the tester
to specify the result in a regular expression (alternative).
A test must at least contain the sections TEST, FILE and either EXPECT
or EXPECTF. When a test is called run-test.php takes the name from the
TEST section and writes the FILE section into a ".php" file with the
same name as the ".phpt" file. This ".php" file will then be executed
and its output compared to the contents of the EXPECT section. It is a
good idea to generate output with var_dump() calls.
/ext/standard/tests/strings/str_shuffle.phpt is a good example for using
EXPECTF instead of EXPECT. From time to time the algorithm used for shuffle
changed and sometimes the machine used to execute the code has influence
on the result of shuffle. But it always returns a three character string
detectable by %s. Other scan-able forms are %i for integers, %d for numbers
only, %f for floating point values, %c for single characters and %x for
hexadecimal values.
==== /ext/standard/tests/strings/str_shuffle.phpt ===
--TEST--
Testing str_shuffle.
--FILE--
<?php
/* Do not change this test it is a REATME.TESTING example. */
$s = '123';
var_dump(str_shuffle($s));
var_dump($s);
?>
--EXPECTF--
string(3) %s
string(3) "123"
==== end of /ext/standard/tests/strings/str_shuffle.phpt ===
/ext/standard/tests/strings/strings001.phpt is a good example for using
EXPECTREGEX instead of EXPECT. This test also shows that in EXPECTREGEX
some characters need to be escaped since otherwise they would be
interpreted as a regular expression.
==== /ext/standard/tests/strings/strings001.phpt ===
--TEST--
Test whether strstr() and strrchr() are binary safe.
--FILE--
<?php
/* Do not change this test it is a REATME.TESTING example. */
$s = "alabala nica".chr(0)."turska panica";
var_dump(strstr($s, "nic"));
var_dump(strrchr($s," nic"));
?>
--EXPECTREGEX--
string\(18\) \"nica\x00turska panica\"
string\(19\) \" nica\x00turska panica\"
==== end of /ext/standard/tests/strings/strings001.phpt ===
Some tests depend on modules or functions available only in certain versions
or they even require minimum version of php or zend. These tests should be
skipped when the requirement cannot be fullfilled. To achieve this you can
use the SKIPIF section. To tell run-test.php that your test should be skipped
the SKIPIF section must print out the word "skip" followed by a reason why
the test should skip.
==== /ext/exif/tests/exif005.phpt ===
--TEST--
Check for exif_read_data, unusual IFD start
--SKIPIF--
<?php
if (!extension_loaded('exif')) print 'skip exif extension not available';
?>
--FILE--
<?php
/* Do not change this test it is a REATME.TESTING example.
* test5.jpg is a 1*1 image that contains an Exif section with ifd = 00000009h
*/
$image = exif_read_data('./ext/exif/tests/test5.jpg','',true,false);
var_dump($image['IFD0']);
?>
--EXPECT--
array(2) {
["ImageDescription"]=>
string(11) "Ifd00000009"
["DateTime"]=>
string(19) "2002:10:18 20:06:00"
}
==== end of /ext/exif/tests/exif005.phpt ===
Test script and SKIPIF code should be directly written into *.phpt. However,
it is recommended to use include files when more test scripts depend on the
same SKIPIF code or when certain test files need the same values for some
input. But no file used by any test should have one of the following
extensions: ".php", ".log", ".exp", ".out" or ".diff".
Tests should be named according to the following list:
Class: Name: Example:
Tests for bugs bug<bugid>.phpt bug17123.phpt
Tests for functions <functionname>.phpt dba_open.phpt
General tests for extensions <extname><no>.phpt dba3.phpt
When you use an include file for the SKIPIF section it should be named
"skipif.inc" and an include file used in the FILE section of many tests
should be named "test.inc".
NOTE: All tests should run correctly with error_reporting(E_ALL) and
display_errors=1. This is the default when called from run-test.php.
If you have a good reason for lowering the error reporting, use --INI--
section and comment this in your testcode.
NOTE: If your test intentionally generates a PHP warning message use
$php_errormsg variable, which you can then output. This will result
in a consistent error message output across all platforms and PHP
configurations, preventing your test from failing due inconsistencies
in the error message content.
[How to help us]
----------------
If you find bug in PHP, you can submit bug report AND test script
for us. You don't have to write complete script, just give us test
script with following format. Please test the script and make sure
you write the correct ACTUAL OUTPUT and EXPECTED OUTPUT before you
submit.
<?php
/*
Bug #12345
substr() bug. Do not return expected string.
ACTUAL OUTPUT
XYXA
EXPECTED OUTPUT
ABCD
*/
$str = "XYZABCD";
echo substr($str,3,7);
?>
-123
View File
@@ -1,123 +0,0 @@
PHP Build System V5 Overview
- supports Makefile.ins during transition phase
- not-really-portable Makefile includes have been eliminated
- supports separate build directories without VPATH by using
explicit rules only
- does not waste disk-space/CPU-time for building temporary libraries
=> especially noticeable on slower systems
- slow recursive make replaced with one global Makefile
- eases integration of proper dependencies
- adds PHP_DEFINE(what[, value]) which creates a single include-file
per what. This will allow more fine-grained dependencies.
- abandoning the "one library per directory" concept
- improved integration of the CLI
- several new targets
build-modules: builds and copies dynamic modules into modules/
install-cli: installs the CLI only, so that the install-sapi
target does only what its name says
- finally abandoned automake (still requires aclocal at this time)
- changed some configure-time constructs to run at buildconf-time
- upgraded shtool to 1.5.4
- removed $(moduledir) (use EXTENSION_DIR)
The Reason For a New System
It became more and more apparent that there is a severe need
for addressing the portability concerns and improving the chance
that your build is correct (how often have you been told to
"make clean"? When this is done, you won't need to anymore).
If You Build PHP on a Unix System
You, as a user of PHP, will notice no changes. Of course, the build
system will be faster, look better and work smarter.
If You Are Developing PHP
Extension developers:
Makefile.ins are abandoned. The files which are to be compiled
are specified in the config.m4 now using the following macro:
PHP_NEW_EXTENSION(foo, foo.c bar.c baz.cpp, $ext_shared)
E.g. this enables the extension foo which consists of three source-code
modules, two in C and one in C++. And, depending on the user's wishes,
the extension will even be built as a dynamic module.
The full syntax:
PHP_NEW_EXTENSION(extname, sources [, shared [,sapi_class[, extra-cflags]]])
Please have a look at acinclude.m4 for the gory details and meanings
of the other parameters.
And that's basically it for the extension side.
If you previously built sub-libraries for this module, add
the source-code files here as well. If you need to specify
separate include directories, do it this way:
PHP_NEW_EXTENSION(foo, foo.c mylib/bar.c mylib/gregor.c,,,-I@ext_srcdir@/lib)
E.g. this builds the three files which are located relative to the
extension source directory and compiles all three files with the
special include directive (@ext_srcdir@ is automatically replaced).
Now, you need to tell the build system that you want to build files
in a directory called $ext_builddir/lib:
PHP_ADD_BUILD_DIR($ext_builddir/lib)
Make sure to call this after PHP_NEW_EXTENSION, because $ext_builddir
is only set by the latter.
If you have a complex extension, you might to need add special
Make rules. You can do this by calling PHP_ADD_MAKEFILE_FRAGMENT
in your config.m4 after PHP_NEW_EXTENSION.
This will read a file in the source-dir of your extension called
Makefile.frag. In this file, $(builddir) and $(srcdir) will be
replaced by the values which are correct for your extension
and which are again determined by the PHP_NEW_EXTENSION macro.
Make sure to prefix *all* relative paths correctly with either
$(builddir) or $(srcdir). Because the build system does not
change the working directory anymore, we must use either
absolute paths or relative ones to the top build-directory.
Correct prefixing ensures that.
SAPI developers:
Instead of using PHP_SAPI=foo/PHP_BUILD_XYZ, you will need to type
PHP_SELECT_SAPI(name, type, sources.c)
I.e. specify the source-code files as above and also pass the
information regarding how PHP is supposed to be built (shared
module, program, etc).
For example for APXS:
PHP_SELECT_SAPI(apache, shared, sapi_apache.c mod_php4.c php_apache.c)
General info
The foundation for the new system is the flexible handling of
sources and their contexts. With the help of macros you
can define special flags for each source-file, where it is
located, in which target context it can work, etc.
Have a look at the well documented macros
PHP_ADD_SOURCES(_X) in acinclude.m4.
-126
View File
@@ -1,126 +0,0 @@
Using PHP4 with the Zeus Web Server
-----------------------------------
Zeus fully supports running PHP in combination with our
webserver. There are three different interfaces that can be used to
enable PHP:
* CGI
* ISAPI
* FastCGI
Of the three, we recommend using FastCGI, which has been tested and
benchmarked as providing the best performance and reliability.
Full details of how to install PHP are available from our
website, at:
http://support.zeus.com/products/php.html
If you have any problems, please check the support site for more
up-to-date information and advice.
Quick guide to installing FastCGI with Zeus
-------------------------------------------
Step 1 - obtain and install FastCGI development kit.
Grab the package from:
http://www.fastcgi.com/dist/devkit_2.2.0.tar.gz
Extract the package and follow the instructions:
./configure
make
make export
(run the last as root)
This will install to /usr/local/lib/libfcgi.a
and /usr/local/include/*fcgi*
Step 2 - Compile PHP as FastCGI.
Compile as follows:
./configure --with-fastcgi
make
Note that PHP has many options to the configure script -
e.g. --with-mysql. You will probably want to select your usual options
before compiling; the above is just a bare minimum, for illustration.
After compilation finishes, you will be left with an executable
program called 'php'. Copy this into your document root, under a
dedicated FastCGI directory (e.g. $DOCROOT/fcgi-bin/php)
Step 3 - configure Zeus
Four stages:
- enable FastCGI
- configure FastCGI
- setup alias for FastCGI
- setup alias for PHP
1) Using the admin server, go to the 'module configuration' page for
your virtual server, and ensure that 'fastcgi' is enabled (select the
tickbox to the left).
2) While we can run FastCGI's locally, there are known problems with
some OS's (specifically, the communication between web server and
FastCGI happens over a unix domain socket, and some OS's have trouble
sustaining high connection rates over these sockets). So instead, we
are going to set up the PHP FastCGI to run 'remotely' over localhost
(this uses TCP sockets, which do not suffer this problem). Go to the
'fastcgi configuration' page, and under 'add remote fastcgi':
Add Remote FastCGI
Docroot path /fcgi-bin/php
Remote machine localhost:8002
The first entry is where you saved PHP, above.
The second entry is localhost:<any unused port>
We will start the FastCGI listening on this port shortly.
Click 'update' to commit these changes.
3) Go to the path mapping module and add an alias for FastCGI:
Add Alias
Docroot path /fcgi-bin
Filesystem directory /path/to/docroot/fcgi-bin
Alias type fastcgi
Click 'update' to commit these changes
4) Also on the path mapping module, add a handler for PHP:
Add handler
File extension php
Handler /fcgi-bin/php
Click 'update' to commit these changes
Finally restart your virtual server for these changes to take effect.
Step 4 - start PHP as a FastCGI runner
When you start PHP, it will pre-fork a given number of child processes
to handle incoming PHP requests. Each process will handle a given
number of requests before exiting (and being replaced by a newly
forked process). You can control these two parameters by setting the
following environment variables BEFORE starting the FastCGI runner:
PHP_FCGI_CHILDREN - the number of child processes to pre-fork. If not
set, defaults to 8.
PHP_FCGI_MAX_REQUESTS - the number of requests each PHP child process
handles before exiting. If not set, defaults to 500.
To start the FastCGI runner, execute '$ZEUSHOME/web/bin/fcgirunner
8002 $DOCROOT/fcgi-bin/php'. Substitute the appropriate values for
$ZEUSHOME and $DOCROOT; also substitute for 8002 the port you chose,
above.
To stop the runner (e.g. to experiment with the above environment
variables) you will need to manually stop and running PHP
processes. (Use 'ps' and 'kill'). As it is PHP which is forking lots
of children and not the runner, Zeus unfortunately cannot keep track
of what processes are running, sorry. A typical command line may look
like 'ps -efl | grep $DOCROOT/fcgi-bin/php | grep -v grep | awk
'{print $4}' | xargs kill'
-172
View File
@@ -1,172 +0,0 @@
Things to do or at least think about doing in the future. Name in
parenthesis means that person has taken on this project.
Zend
----
For PHP 4.3.0:
* Allow foreach ($array as $k => &$val) syntax. right now we cannot
traverse an array without copying each element.
* Allow foreach ($array as $k => list($a, $b)) syntax for multi
dimensional arrays.
* Look at replacing c-lib call tolower().
* Make hash API functions work with HASH_OF() to save time.
* Allow to set a default value for call-by-reference-parameters.
eg: function hello (&$pallo = NULL) {}
* Disallow function(method) redefinition in class.
For PHP 5.0.0:
* Native large number support (probably with GNU GMP)
* Const'ify APIs. Right now, many functions leave parameters untouched,
but don't declare those as const. This makes interaction with other
interfaces difficult which pass const parameters to us.
global
------
For PHP 4.3.0:
* Add aliases to functions to conform to new naming conventions, e.g.
str_to_upper().
* Make all extensions thread-safe.
* Make everything on the language-level independent of your locale
settings.
* Change PHP error messages, so that they point to pages or sections
in the PHP Manual.
* Make sure that all ZTS globals get destructed. Most ts_allocate_id()
calls should have a dtor entry.
* Activate all extensions by default that don't rely on external
dependencies. (eg ftp) (DONE?)
* on some platforms unimplemented function will just do nothing
(e.g. symlink) they should print a warning or not even be defined!
(DONE ?)
* Use arg_separator.input to implode args in the CGI sapi extension
and arg_separator.input to explode in php_build_argv(). (DONE?)
For PHP 5.0.0
* bundle and use curl lib for fopen wrapper.
* --enable-all in configure. (--enable-shared=max ...)
* make configure print out a summary when it's done (like XEmacs)
* replace standard functions which work on static data with
reentrancy-safe functions (DONE?).
* make SAPI conform to CGI/1.1. Currently, all SAPI modules
define REMOTE_ADDR etc. themselves and reach only various level
of compliance.
* see what functions might need to be changed to use HashPosition, so
that the internal array pointer is not affected.
* Move most extensions and PEAR packages out of the PHP CVS tree,
include them again during release packaging.
Other
* use thread-safe resolver functions (either require BIND 8 or adns).
* implement javadoc based function docs template system.
* provide optional IPv6 support.
* find a better way to implement script timeouts. SIGVTALRM is used
by some POSIX threads implementations (i.e. OpenBSD) and is not
available in ZTS mode.
* Implement flush feature suitable for nested output buffers.
documentation
-------------
* Add remarks in the documentation which functions are not implemented
on win32.
* Add remarks in the documentation which functions are not binary-safe.
* Update curl documentation (DONE?)
* Add developer documentation.
* Add detailed documentation for Java extension.
ext/bz2
-------
* Add an ini directive to specify the size of decompression buffer.
The default 4k is too small for large files and also requires much time
for decompression. 40k is suitable for such files, however it may be too
much under certain environments. There should be appropriate default
settings for the various SAPI modules (e.g. apache and cli).
ext/curl
--------
* Have a warning scheme for when people use unsupported features.
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.
* For additional todo information, see oci8.c, in ext/oci8
ext/odbc
--------
For PHP 4.3.0:
* update all php_error calls to php_error_docref where valid
* integrate EXPERIMENTAL ODBC update for use in PHP 5.0, use for
testing purposes only.
For PHP 5.0.0
* Activate EXPERIMENTAL ODBC codebase update
ext/pcre
--------
* Allow user to set PCRE_NOTEMPTY, PCRE_ANCHORED at execution time, maybe
ext/pcntl
---------
* Change internal callback handler to use TICKS
* Remove all zend_extension code
* Add object callback support to pcntl_signal()
ext/pgsql
---------
For PHP 4.3.0:
* Add pg_metadata() with metadata cache feature.
* Add pg_convert() to check and convert array value for query.
* Add pg_insert/pg_update/pg_delete/pg_select for simple query.
ext/session
-----------
For PHP 4.3.0:
* session_abort() to abort session. ie: Do not save session data.
* Allow unset($_SESSION) or unset($HTTP_SESSION_VARS) to unset
session vars regardless of register_globals setting.
Other:
* Maybe implement finer-grained session variables that could be
locked individually.
* Write a network-transparent storage back-end with fallover
facilities
* Provide a callback facility which is executed upon encountering
an unknown class name during deserialization
ext/sockets
-----------
* Implement IPv6
* Review/Fix vectors
ext/standard
------------
* Add a version number to data serialized via serialize().
* Possibly modify parsing of GPC data to automatically create arrays if
variable name is seen more than once.
* Implement regex-cache for url-functions.
* stri_replace(). (Andrei)
* Move socket related functions to fsock.c.
* NOT binary safe:
strtok()
basename()
dirname()
strrpos()
ext/wddx
--------
* See if we can support the remaining data types:
dateTime
binary
http://www.wddx.org/WDDX_SDK_10a/7__References/WDDX_DTD.htm
(Andrei)
* implement wddx_packet_as_javascript(). (Andrei)
other cool stuff
----------------
* PVM extension
-112
View File
@@ -1,112 +0,0 @@
This is an overview over existing segfaults in the current PHP source
tree.
Fixed:
mb_convert_encoding (Moriyoshi)
socket_iovec_alloc (Rasmus)
exif_imagetype,exif_thumbnail (Rasmus)
dbase_open (Rasmus)
array_pad (Rasmus)
setlocale (Rasmus)
unregister_tick_function (Rasmus)
bcsub (Rasmus)
str_repeat (Ilia)
imagecopyresized (Ilia)
mhash_keygen_s2k (Ilia)
bundled gd (Ilia)
mb_ereg, mb_ereg_match, mb_eregi, mb_split (Moriyoshi)
xml_parser_create (Moriyoshi)
ob_start (Sascha)
imagecreate/-truecolor (Sascha)
flock (Sascha)
register_shutdown_function (Sascha)
mb_strcut('', [number greater than the length of first arg]) (Moriyoshi)
ext/exif, ext/dba (Marcus)
php_base64_encode (Moriyoshi)
pack (Ilia)
Open:
the dbase extension (1)
socket_select (2)
(1) heap corruption, mostly visible in malloc-related calls. Whether you see
this or not might depend on your libc/compiler. Hard to track down,
because the result of the corruption might be quite delayed.
Reproducable with glibc-2.3/gcc 3.2.2 by:
cat <<X | php do_crash
dbase_add_record
dbase_close
dbase_create
dbase_delete_record
dbase_get_record
dbase_get_record_with_names
dbase_numfields
dbase_numrecords
dbase_open
X
(2) heap corruption, dies in efree()/execute()
Methodology
1. Use a plain PHP_4_3 tree
2. Use the config.nice from ammendment 1.
3. Download the test script from:
<URL:http://schumann.cx/do_crash.txt>
4a. Use the scripts funcparse.awk/genfunclist.sh from phpdoc/scripts
for creating a plain text function list. Feed that list to
the script. Avoid calls like pcntl_fork. Manually remove functions
which take too long to finish/eat up all memory.
4b. For testing a single function, echo the name of the function to
the script like this:
echo dbase_open | php do_crash.txt
Amendment 1.
CFLAGS='-O0 -g' \
'../src/php4/configure' \
'--enable-pcntl' \
'--enable-shmop' \
'--enable-sysvsem' \
'--enable-sysvshm' \
'--enable-wddx' \
'--enable-yp' \
'--enable-filepro' \
'--enable-ftp' \
'--enable-dba' \
'--enable-dbase' \
'--enable-dio' \
'--enable-exif' \
'--enable-mbstring' \
'--enable-mbregex' \
'--enable-sockets' \
'--enable-bcmath' \
'--enable-calendar' \
'--enable-pcntl' \
'--enable-shmop' \
'--enable-sysvsem' \
'--enable-sysvshm' \
'--enable-wddx' \
'--enable-yp' \
'--enable-filepro' \
'--enable-ftp' \
'--enable-dba' \
'--enable-dbase' \
'--enable-dio' \
'--enable-exif' \
'--enable-mbstring' \
'--enable-mbregex' \
'--enable-sockets' \
'--enable-bcmath' \
'--enable-calendar' \
"$@"
-26
View File
@@ -1,26 +0,0 @@
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.
-6
View File
@@ -1,6 +0,0 @@
## process this file with automake to produce Makefile.am
AUTOMAKE_OPTIONS=foreign
noinst_LTLIBRARIES=libtsrm.la
libtsrm_la_SOURCES = TSRM.c tsrm_strtok_r.c tsrm_virtual_cwd.c
depend:
-2
View File
@@ -1,2 +0,0 @@
- Improve the lock in ts_resource_ex() in order to cover less code.
This can probably be done by more careful hash table access
-637
View File
@@ -1,637 +0,0 @@
/*
+----------------------------------------------------------------------+
| Thread Safe Resource Manager |
+----------------------------------------------------------------------+
| Copyright (c) 1999, 2000, Andi Gutmans, Sascha Schumann, Zeev Suraski|
| This source file is subject to the TSRM license, that is bundled |
| with this package in the file LICENSE |
+----------------------------------------------------------------------+
| Authors: Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#include "TSRM.h"
#ifdef ZTS
#include <stdio.h>
#if HAVE_STDARG_H
#include <stdarg.h>
#endif
typedef struct _tsrm_tls_entry tsrm_tls_entry;
struct _tsrm_tls_entry {
void **storage;
int count;
THREAD_T thread_id;
tsrm_tls_entry *next;
};
typedef struct {
size_t size;
ts_allocate_ctor ctor;
ts_allocate_dtor dtor;
} tsrm_resource_type;
/* The memory manager table */
static tsrm_tls_entry **tsrm_tls_table=NULL;
static int tsrm_tls_table_size;
static ts_rsrc_id id_count;
/* The resource sizes table */
static tsrm_resource_type *resource_types_table=NULL;
static int resource_types_table_size;
static MUTEX_T tsmm_mutex; /* thread-safe memory manager mutex */
/* New thread handlers */
static tsrm_thread_begin_func_t tsrm_new_thread_begin_handler;
static tsrm_thread_end_func_t tsrm_new_thread_end_handler;
/* Debug support */
int tsrm_error(int level, const char *format, ...);
/* Read a resource from a thread's resource storage */
static int tsrm_error_level;
static FILE *tsrm_error_file;
#if TSRM_DEBUG
#define TSRM_ERROR(args) tsrm_error args
#define TSRM_SAFE_RETURN_RSRC(array, offset, range) \
{ \
int unshuffled_offset = TSRM_UNSHUFFLE_RSRC_ID(offset); \
\
if (offset==0) { \
return &array; \
} else if ((unshuffled_offset)>=0 && (unshuffled_offset)<(range)) { \
TSRM_ERROR((TSRM_ERROR_LEVEL_INFO, "Successfully fetched resource id %d for thread id %ld - 0x%0.8X", \
unshuffled_offset, (long) thread_resources->thread_id, array[unshuffled_offset])); \
return array[unshuffled_offset]; \
} else { \
TSRM_ERROR((TSRM_ERROR_LEVEL_ERROR, "Resource id %d is out of range (%d..%d)", \
unshuffled_offset, TSRM_SHUFFLE_RSRC_ID(0), TSRM_SHUFFLE_RSRC_ID(thread_resources->count-1))); \
return NULL; \
} \
}
#else
#define TSRM_ERROR(args)
#define TSRM_SAFE_RETURN_RSRC(array, offset, range) \
if (offset==0) { \
return &array; \
} else { \
return array[TSRM_UNSHUFFLE_RSRC_ID(offset)]; \
}
#endif
#if defined(PTHREADS)
/* Thread local storage */
static pthread_key_t tls_key;
#elif defined(TSRM_ST)
static int tls_key;
#elif defined(TSRM_WIN32)
static DWORD tls_key;
#elif defined(BETHREADS)
static int32 tls_key;
#endif
/* Startup TSRM (call once for the entire process) */
TSRM_API int tsrm_startup(int expected_threads, int expected_resources, int debug_level, char *debug_filename)
{
#if defined(GNUPTH)
pth_init();
#elif defined(PTHREADS)
pthread_key_create( &tls_key, 0 );
#elif defined(TSRM_ST)
st_init();
st_key_create(&tls_key, 0);
#elif defined(TSRM_WIN32)
tls_key = TlsAlloc();
#elif defined(BETHREADS)
tls_key = tls_allocate();
#endif
tsrm_error_file = stderr;
tsrm_error_set(debug_level, debug_filename);
tsrm_tls_table_size = expected_threads;
tsrm_tls_table = (tsrm_tls_entry **) calloc(tsrm_tls_table_size, sizeof(tsrm_tls_entry *));
if (!tsrm_tls_table) {
TSRM_ERROR((TSRM_ERROR_LEVEL_ERROR, "Unable to allocate TLS table"));
return 0;
}
id_count=0;
resource_types_table_size = expected_resources;
resource_types_table = (tsrm_resource_type *) calloc(resource_types_table_size, sizeof(tsrm_resource_type));
if (!resource_types_table) {
TSRM_ERROR((TSRM_ERROR_LEVEL_ERROR, "Unable to allocate resource types table"));
free(tsrm_tls_table);
tsrm_tls_table = NULL;
return 0;
}
tsmm_mutex = tsrm_mutex_alloc();
tsrm_new_thread_begin_handler = tsrm_new_thread_end_handler = NULL;
TSRM_ERROR((TSRM_ERROR_LEVEL_CORE, "Started up TSRM, %d expected threads, %d expected resources", expected_threads, expected_resources));
return 1;
}
/* Shutdown TSRM (call once for the entire process) */
TSRM_API void tsrm_shutdown(void)
{
int i;
if (tsrm_tls_table) {
for (i=0; i<tsrm_tls_table_size; i++) {
tsrm_tls_entry *p = tsrm_tls_table[i], *next_p;
while (p) {
int j;
next_p = p->next;
for (j=0; j<p->count; j++) {
/* Disabled - calling dtors in tsrm_shutdown makes
modules registering TSRM ids to crash, if they have
dtors, since the module is unloaded before tsrm_shutdown
is called. Can be re-enabled after tsrm_free_id is
implemented.
if (resource_types_table && resource_types_table[j].dtor) {
resource_types_table[j].dtor(p->storage[j], &p->storage);
}
*/
free(p->storage[j]);
}
free(p->storage);
free(p);
p = next_p;
}
}
free(tsrm_tls_table);
tsrm_tls_table = NULL;
}
if (resource_types_table) {
free(resource_types_table);
resource_types_table=NULL;
}
tsrm_mutex_free(tsmm_mutex);
tsmm_mutex = NULL;
TSRM_ERROR((TSRM_ERROR_LEVEL_CORE, "Shutdown TSRM"));
if (tsrm_error_file!=stderr) {
fclose(tsrm_error_file);
}
#if defined(GNUPTH)
pth_kill();
#elif defined(PTHREADS)
pthread_setspecific(tls_key, 0);
pthread_key_delete(tls_key);
#elif defined(TSRM_WIN32)
TlsFree(tls_key);
#endif
}
/* allocates a new thread-safe-resource id */
TSRM_API ts_rsrc_id ts_allocate_id(ts_rsrc_id *rsrc_id, size_t size, ts_allocate_ctor ctor, ts_allocate_dtor dtor)
{
int i;
TSRM_ERROR((TSRM_ERROR_LEVEL_CORE, "Obtaining a new resource id, %d bytes", size));
tsrm_mutex_lock(tsmm_mutex);
/* obtain a resource id */
*rsrc_id = TSRM_SHUFFLE_RSRC_ID(id_count++);
TSRM_ERROR((TSRM_ERROR_LEVEL_CORE, "Obtained resource id %d", *rsrc_id));
/* store the new resource type in the resource sizes table */
if (resource_types_table_size < id_count) {
resource_types_table = (tsrm_resource_type *) realloc(resource_types_table, sizeof(tsrm_resource_type)*id_count);
if (!resource_types_table) {
tsrm_mutex_unlock(tsmm_mutex);
TSRM_ERROR((TSRM_ERROR_LEVEL_ERROR, "Unable to allocate storage for resource"));
*rsrc_id = 0;
return 0;
}
resource_types_table_size = id_count;
}
resource_types_table[TSRM_UNSHUFFLE_RSRC_ID(*rsrc_id)].size = size;
resource_types_table[TSRM_UNSHUFFLE_RSRC_ID(*rsrc_id)].ctor = ctor;
resource_types_table[TSRM_UNSHUFFLE_RSRC_ID(*rsrc_id)].dtor = dtor;
/* enlarge the arrays for the already active threads */
for (i=0; i<tsrm_tls_table_size; i++) {
tsrm_tls_entry *p = tsrm_tls_table[i];
while (p) {
if (p->count < id_count) {
int j;
p->storage = (void *) realloc(p->storage, sizeof(void *)*id_count);
for (j=p->count; j<id_count; j++) {
p->storage[j] = (void *) malloc(resource_types_table[j].size);
if (resource_types_table[j].ctor) {
resource_types_table[j].ctor(p->storage[j], &p->storage);
}
}
p->count = id_count;
}
p = p->next;
}
}
tsrm_mutex_unlock(tsmm_mutex);
TSRM_ERROR((TSRM_ERROR_LEVEL_CORE, "Successfully allocated new resource id %d", *rsrc_id));
return *rsrc_id;
}
static void allocate_new_resource(tsrm_tls_entry **thread_resources_ptr, THREAD_T thread_id)
{
int i;
TSRM_ERROR((TSRM_ERROR_LEVEL_CORE, "Creating data structures for thread %x", thread_id));
(*thread_resources_ptr) = (tsrm_tls_entry *) malloc(sizeof(tsrm_tls_entry));
(*thread_resources_ptr)->storage = (void **) malloc(sizeof(void *)*id_count);
(*thread_resources_ptr)->count = id_count;
(*thread_resources_ptr)->thread_id = thread_id;
(*thread_resources_ptr)->next = NULL;
#if defined(PTHREADS)
/* Set thread local storage to this new thread resources structure */
pthread_setspecific(tls_key, (void *) *thread_resources_ptr);
#elif defined(TSRM_ST)
st_thread_setspecific(tls_key, (void *) *thread_resources_ptr);
#elif defined(TSRM_WIN32)
TlsSetValue(tls_key, (void *) *thread_resources_ptr);
#elif defined(BETHREADS)
tls_set(tls_key, (void*) *thread_resources_ptr);
#endif
if (tsrm_new_thread_begin_handler) {
tsrm_new_thread_begin_handler(thread_id, &((*thread_resources_ptr)->storage));
}
for (i=0; i<id_count; i++) {
(*thread_resources_ptr)->storage[i] = (void *) malloc(resource_types_table[i].size);
if (resource_types_table[i].ctor) {
resource_types_table[i].ctor((*thread_resources_ptr)->storage[i], &(*thread_resources_ptr)->storage);
}
}
if (tsrm_new_thread_end_handler) {
tsrm_new_thread_end_handler(thread_id, &((*thread_resources_ptr)->storage));
}
tsrm_mutex_unlock(tsmm_mutex);
}
/* fetches the requested resource for the current thread */
TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
{
THREAD_T thread_id;
int hash_value;
tsrm_tls_entry *thread_resources;
if (!th_id) {
#if defined(PTHREADS)
/* Fast path for looking up the resources for the current
* thread. Its used by just about every call to
* ts_resource_ex(). This avoids the need for a mutex lock
* and our hashtable lookup.
*/
thread_resources = pthread_getspecific(tls_key);
#elif defined(TSRM_ST)
thread_resources = st_thread_getspecific(tls_key);
#elif defined(TSRM_WIN32)
thread_resources = TlsGetValue(tls_key);
#elif defined(BETHREADS)
thread_resources = (tsrm_tls_entry*)tls_get(tls_key);
#else
thread_resources = NULL;
#endif
if (thread_resources) {
TSRM_ERROR((TSRM_ERROR_LEVEL_INFO, "Fetching resource id %d for current thread %d", id, (long) thread_resources->thread_id));
/* Read a specific resource from the thread's resources.
* This is called outside of a mutex, so have to be aware about external
* changes to the structure as we read it.
*/
TSRM_SAFE_RETURN_RSRC(thread_resources->storage, id, thread_resources->count);
}
thread_id = tsrm_thread_id();
} else {
thread_id = *th_id;
}
TSRM_ERROR((TSRM_ERROR_LEVEL_INFO, "Fetching resource id %d for thread %ld", id, (long) thread_id));
tsrm_mutex_lock(tsmm_mutex);
hash_value = THREAD_HASH_OF(thread_id, tsrm_tls_table_size);
thread_resources = tsrm_tls_table[hash_value];
if (!thread_resources) {
allocate_new_resource(&tsrm_tls_table[hash_value], thread_id);
return ts_resource_ex(id, &thread_id);
} else {
do {
if (thread_resources->thread_id == thread_id) {
break;
}
if (thread_resources->next) {
thread_resources = thread_resources->next;
} else {
allocate_new_resource(&thread_resources->next, thread_id);
return ts_resource_ex(id, &thread_id);
/*
* thread_resources = thread_resources->next;
* break;
*/
}
} while (thread_resources);
}
tsrm_mutex_unlock(tsmm_mutex);
/* Read a specific resource from the thread's resources.
* This is called outside of a mutex, so have to be aware about external
* changes to the structure as we read it.
*/
TSRM_SAFE_RETURN_RSRC(thread_resources->storage, id, thread_resources->count);
}
/* frees all resources allocated for the current thread */
void ts_free_thread(void)
{
tsrm_tls_entry *thread_resources;
int i;
THREAD_T thread_id = tsrm_thread_id();
int hash_value;
tsrm_tls_entry *last=NULL;
tsrm_mutex_lock(tsmm_mutex);
hash_value = THREAD_HASH_OF(thread_id, tsrm_tls_table_size);
thread_resources = tsrm_tls_table[hash_value];
while (thread_resources) {
if (thread_resources->thread_id == thread_id) {
for (i=0; i<thread_resources->count; i++) {
if (resource_types_table[i].dtor) {
resource_types_table[i].dtor(thread_resources->storage[i], &thread_resources->storage);
}
}
for (i=0; i<thread_resources->count; i++) {
free(thread_resources->storage[i]);
}
free(thread_resources->storage);
if (last) {
last->next = thread_resources->next;
} else {
tsrm_tls_table[hash_value] = thread_resources->next;
}
#if defined(PTHREADS)
pthread_setspecific(tls_key, 0);
#elif defined(TSRM_WIN32)
TlsSetValue(tls_key, 0);
#endif
free(thread_resources);
break;
}
if (thread_resources->next) {
last = thread_resources;
}
thread_resources = thread_resources->next;
}
tsrm_mutex_unlock(tsmm_mutex);
}
/* deallocates all occurrences of a given id */
void ts_free_id(ts_rsrc_id id)
{
}
/*
* Utility Functions
*/
/* Obtain the current thread id */
TSRM_API THREAD_T tsrm_thread_id(void)
{
#ifdef TSRM_WIN32
return GetCurrentThreadId();
#elif defined(NETWARE)
return NXThreadGetId();
#elif defined(GNUPTH)
return pth_self();
#elif defined(PTHREADS)
return pthread_self();
#elif defined(NSAPI)
return systhread_current();
#elif defined(PI3WEB)
return PIThread_getCurrent();
#elif defined(TSRM_ST)
return st_thread_self();
#elif defined(BETHREADS)
return find_thread(NULL);
#endif
}
/* Allocate a mutex */
TSRM_API MUTEX_T tsrm_mutex_alloc(void)
{
MUTEX_T mutexp;
#ifdef NETWARE
long flags = 0; /* Don't require NX_MUTEX_RECURSIVE, I guess */
NXHierarchy_t order = 0;
NX_LOCK_INFO_ALLOC (lockInfo, "PHP-TSRM", 0);
#endif
#ifdef TSRM_WIN32
mutexp = malloc(sizeof(CRITICAL_SECTION));
InitializeCriticalSection(mutexp);
#elif defined(NETWARE)
mutexp = NXMutexAlloc(flags, order, &lockInfo); /* return value ignored for now */
#elif defined(GNUPTH)
mutexp = (MUTEX_T) malloc(sizeof(*mutexp));
pth_mutex_init(mutexp);
#elif defined(PTHREADS)
mutexp = (pthread_mutex_t *)malloc(sizeof(pthread_mutex_t));
pthread_mutex_init(mutexp,NULL);
#elif defined(NSAPI)
mutexp = crit_init();
#elif defined(PI3WEB)
mutexp = PIPlatform_allocLocalMutex();
#elif defined(TSRM_ST)
mutexp = st_mutex_new();
#elif defined(BETHREADS)
mutexp = (beos_ben*)malloc(sizeof(beos_ben));
mutexp->ben = 0;
mutexp->sem = create_sem(1, "PHP sempahore");
#endif
#ifdef THR_DEBUG
printf("Mutex created thread: %d\n",mythreadid());
#endif
return( mutexp );
}
/* Free a mutex */
TSRM_API void tsrm_mutex_free(MUTEX_T mutexp)
{
if (mutexp) {
#ifdef TSRM_WIN32
DeleteCriticalSection(mutexp);
free(mutexp);
#elif defined(NETWARE)
NXMutexFree(mutexp);
#elif defined(GNUPTH)
free(mutexp);
#elif defined(PTHREADS)
pthread_mutex_destroy(mutexp);
free(mutexp);
#elif defined(NSAPI)
crit_terminate(mutexp);
#elif defined(PI3WEB)
PISync_delete(mutexp);
#elif defined(TSRM_ST)
st_mutex_destroy(mutexp);
#elif defined(BETHREADS)
delete_sem(mutexp->sem);
free(mutexp);
#endif
}
#ifdef THR_DEBUG
printf("Mutex freed thread: %d\n",mythreadid());
#endif
}
/* Lock a mutex */
TSRM_API int tsrm_mutex_lock(MUTEX_T mutexp)
{
TSRM_ERROR((TSRM_ERROR_LEVEL_INFO, "Mutex locked thread: %ld", tsrm_thread_id()));
#ifdef TSRM_WIN32
EnterCriticalSection(mutexp);
return 1;
#elif defined(NETWARE)
return NXLock(mutexp);
#elif defined(GNUPTH)
return pth_mutex_acquire(mutexp, 0, NULL);
#elif defined(PTHREADS)
return pthread_mutex_lock(mutexp);
#elif defined(NSAPI)
return crit_enter(mutexp);
#elif defined(PI3WEB)
return PISync_lock(mutexp);
#elif defined(TSRM_ST)
return st_mutex_lock(mutexp);
#elif defined(BETHREADS)
if (atomic_add(&mutexp->ben, 1) != 0)
return acquire_sem(mutexp->sem);
return 0;
#endif
}
/* Unlock a mutex */
TSRM_API int tsrm_mutex_unlock(MUTEX_T mutexp)
{
TSRM_ERROR((TSRM_ERROR_LEVEL_INFO, "Mutex unlocked thread: %ld", tsrm_thread_id()));
#ifdef TSRM_WIN32
LeaveCriticalSection(mutexp);
return 1;
#elif defined(NETWARE)
return NXUnlock(mutexp);
#elif defined(GNUPTH)
return pth_mutex_release(mutexp);
#elif defined(PTHREADS)
return pthread_mutex_unlock(mutexp);
#elif defined(NSAPI)
return crit_exit(mutexp);
#elif defined(PI3WEB)
return PISync_unlock(mutexp);
#elif defined(TSRM_ST)
return st_mutex_unlock(mutexp);
#elif defined(BETHREADS)
if (atomic_add(&mutexp->ben, -1) != 1)
return release_sem(mutexp->sem);
return 0;
#endif
}
TSRM_API void *tsrm_set_new_thread_begin_handler(tsrm_thread_begin_func_t new_thread_begin_handler)
{
void *retval = (void *) tsrm_new_thread_begin_handler;
tsrm_new_thread_begin_handler = new_thread_begin_handler;
return retval;
}
TSRM_API void *tsrm_set_new_thread_end_handler(tsrm_thread_end_func_t new_thread_end_handler)
{
void *retval = (void *) tsrm_new_thread_end_handler;
tsrm_new_thread_end_handler = new_thread_end_handler;
return retval;
}
/*
* Debug support
*/
#if TSRM_DEBUG
int tsrm_error(int level, const char *format, ...)
{
if (level<=tsrm_error_level) {
va_list args;
int size;
fprintf(tsrm_error_file, "TSRM: ");
va_start(args, format);
size = vfprintf(tsrm_error_file, format, args);
va_end(args);
fprintf(tsrm_error_file, "\n");
fflush(tsrm_error_file);
return size;
} else {
return 0;
}
}
#endif
void tsrm_error_set(int level, char *debug_filename)
{
tsrm_error_level = level;
#if TSRM_DEBUG
if (tsrm_error_file!=stderr) { /* close files opened earlier */
fclose(tsrm_error_file);
}
if (debug_filename) {
tsrm_error_file = fopen(debug_filename, "w");
if (!tsrm_error_file) {
tsrm_error_file = stderr;
}
} else {
tsrm_error_file = stderr;
}
#endif
}
#endif /* ZTS */
-186
View File
@@ -1,186 +0,0 @@
# Microsoft Developer Studio Project File - Name="TSRM" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=TSRM - Win32 Debug_TS
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "TSRM.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "TSRM.mak" CFG="TSRM - Win32 Debug_TS"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "TSRM - Win32 Debug_TS" (based on "Win32 (x86) Static Library")
!MESSAGE "TSRM - Win32 Release_TS" (based on "Win32 (x86) Static Library")
!MESSAGE "TSRM - Win32 Release_TS_inline" (based on "Win32 (x86) Static Library")
!MESSAGE "TSRM - Win32 Release_TSDbg" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "TSRM - Win32 Debug_TS"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "TSRM___Win32_Debug_TS"
# PROP BASE Intermediate_Dir "TSRM___Win32_Debug_TS"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug_TS"
# PROP Intermediate_Dir "Debug_TS"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "C:\Projects\TSRM" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_DEBUG" /D "ZTS" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D TSRM_DEBUG=1 /YX /FD /GZ /c
# ADD BASE RSC /l 0x40d /d "_DEBUG"
# ADD RSC /l 0x40d /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "TSRM - Win32 Release_TS"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "TSRM___Win32_Release_TS"
# PROP BASE Intermediate_Dir "TSRM___Win32_Release_TS"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release_TS"
# PROP Intermediate_Dir "Release_TS"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "ZTS" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D TSRM_DEBUG=0 /YX /FD /c
# ADD BASE RSC /l 0x40d /d "NDEBUG"
# ADD RSC /l 0x40d /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "TSRM - Win32 Release_TS_inline"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "TSRM___Win32_Release_TS_inline"
# PROP BASE Intermediate_Dir "TSRM___Win32_Release_TS_inline"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release_TS_inline"
# PROP Intermediate_Dir "Release_TS_inline"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "TSRM_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "ZTS" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D TSRM_DEBUG=0 /YX /FD /c
# ADD BASE RSC /l 0x40d /d "NDEBUG"
# ADD RSC /l 0x40d /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "TSRM - Win32 Release_TSDbg"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "TSRM___Win32_Release_TSDbg"
# PROP BASE Intermediate_Dir "TSRM___Win32_Release_TSDbg"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release_TSDbg"
# PROP Intermediate_Dir "Release_TSDbg"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDEBUG" /D "ZTS" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D TSRM_DEBUG=0 /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /Zi /Od /I "." /D "NDEBUG" /D "ZTS" /D "_LIB" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D TSRM_DEBUG=0 /YX /FD /c
# ADD BASE RSC /l 0x40d /d "NDEBUG"
# ADD RSC /l 0x40d /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ENDIF
# Begin Target
# Name "TSRM - Win32 Debug_TS"
# Name "TSRM - Win32 Release_TS"
# Name "TSRM - Win32 Release_TS_inline"
# Name "TSRM - Win32 Release_TSDbg"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\TSRM.c
# End Source File
# Begin Source File
SOURCE=.\tsrm_strtok_r.c
# End Source File
# Begin Source File
SOURCE=.\tsrm_virtual_cwd.c
# End Source File
# Begin Source File
SOURCE=.\tsrm_win32.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\readdir.h
# End Source File
# Begin Source File
SOURCE=.\TSRM.h
# End Source File
# Begin Source File
SOURCE=.\tsrm_config.w32.h
# End Source File
# Begin Source File
SOURCE=.\tsrm_config_common.h
# End Source File
# Begin Source File
SOURCE=.\tsrm_strtok_r.h
# End Source File
# Begin Source File
SOURCE=.\tsrm_virtual_cwd.h
# End Source File
# Begin Source File
SOURCE=.\tsrm_win32.h
# End Source File
# End Group
# End Target
# End Project
-161
View File
@@ -1,161 +0,0 @@
/*
+----------------------------------------------------------------------+
| Thread Safe Resource Manager |
+----------------------------------------------------------------------+
| Copyright (c) 1999, 2000, Andi Gutmans, Sascha Schumann, Zeev Suraski|
| This source file is subject to the TSRM license, that is bundled |
| with this package in the file LICENSE |
+----------------------------------------------------------------------+
| Authors: Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
#ifndef TSRM_H
#define TSRM_H
/* #ifndef WIN32 */
#if !defined(WIN32) && !defined(NETWARE)
# include <tsrm_config.h>
#endif
#ifdef WIN32
# define TSRM_WIN32
# include "tsrm_config.w32.h"
#endif
#ifdef TSRM_WIN32
# ifdef TSRM_EXPORTS
# define TSRM_API __declspec(dllexport)
# else
# define TSRM_API __declspec(dllimport)
# endif
#else
# define TSRM_API
#endif
/* Only compile multi-threading functions if we're in ZTS mode */
#ifdef ZTS
#ifdef TSRM_WIN32
# include <windows.h>
#elif defined(NETWARE)
# include <nks/thread.h>
# include <nks/synch.h>
#elif defined(GNUPTH)
# include <pth.h>
#elif defined(PTHREADS)
# include <pthread.h>
#elif defined(TSRM_ST)
# include <st.h>
#elif defined(BETHREADS)
#include <kernel/OS.h>
#include <TLS.h>
#endif
typedef int ts_rsrc_id;
/* Define THREAD_T and MUTEX_T */
#ifdef TSRM_WIN32
# define THREAD_T DWORD
# define MUTEX_T CRITICAL_SECTION *
#elif defined(NETWARE)
# define THREAD_T NXThreadId_t
# define MUTEX_T NXMutex_t *
#elif defined(GNUPTH)
# define THREAD_T pth_t
# define MUTEX_T pth_mutex_t *
#elif defined(PTHREADS)
# define THREAD_T pthread_t
# define MUTEX_T pthread_mutex_t *
#elif defined(NSAPI)
# define THREAD_T SYS_THREAD
# define MUTEX_T CRITICAL
#elif defined(PI3WEB)
# define THREAD_T PIThread *
# define MUTEX_T PISync *
#elif defined(TSRM_ST)
# define THREAD_T st_thread_t
# define MUTEX_T st_mutex_t
#elif defined(BETHREADS)
# define THREAD_T thread_id
typedef struct {
sem_id sem;
int32 ben;
} beos_ben;
# define MUTEX_T beos_ben *
#endif
typedef void (*ts_allocate_ctor)(void *, void ***);
typedef void (*ts_allocate_dtor)(void *, void ***);
#define THREAD_HASH_OF(thr,ts) (unsigned long)thr%(unsigned long)ts
#ifdef __cplusplus
extern "C" {
#endif
/* startup/shutdown */
TSRM_API int tsrm_startup(int expected_threads, int expected_resources, int debug_level, char *debug_filename);
TSRM_API void tsrm_shutdown(void);
/* allocates a new thread-safe-resource id */
TSRM_API ts_rsrc_id ts_allocate_id(ts_rsrc_id *rsrc_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_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);
/* deallocates all occurrences of a given id */
TSRM_API void ts_free_id(ts_rsrc_id id);
/* Debug support */
#define TSRM_ERROR_LEVEL_ERROR 1
#define TSRM_ERROR_LEVEL_CORE 2
#define TSRM_ERROR_LEVEL_INFO 3
typedef void (*tsrm_thread_begin_func_t)(THREAD_T thread_id, void ***tsrm_ls);
typedef void (*tsrm_thread_end_func_t)(THREAD_T thread_id, void ***tsrm_ls);
TSRM_API int tsrm_error(int level, const char *format, ...);
TSRM_API void tsrm_error_set(int level, char *debug_filename);
/* utility functions */
TSRM_API THREAD_T tsrm_thread_id(void);
TSRM_API MUTEX_T tsrm_mutex_alloc(void);
TSRM_API void tsrm_mutex_free(MUTEX_T mutexp);
TSRM_API int tsrm_mutex_lock(MUTEX_T mutexp);
TSRM_API int tsrm_mutex_unlock(MUTEX_T mutexp);
TSRM_API void *tsrm_set_new_thread_begin_handler(tsrm_thread_begin_func_t new_thread_begin_handler);
TSRM_API void *tsrm_set_new_thread_end_handler(tsrm_thread_end_func_t new_thread_end_handler);
#define TSRM_SHUFFLE_RSRC_ID(rsrc_id) ((rsrc_id)+1)
#define TSRM_UNSHUFFLE_RSRC_ID(rsrc_id) ((rsrc_id)-1)
#define TSRMLS_FETCH() void ***tsrm_ls = (void ***) ts_resource_ex(0, NULL)
#define TSRMG(id, type, element) (((type) (*((void ***) tsrm_ls))[TSRM_UNSHUFFLE_RSRC_ID(id)])->element)
#define TSRMLS_D void ***tsrm_ls
#define TSRMLS_DC , TSRMLS_D
#define TSRMLS_C tsrm_ls
#define TSRMLS_CC , TSRMLS_C
#ifdef __cplusplus
}
#endif
#else /* non ZTS */
#define TSRMLS_FETCH()
#define TSRMLS_D void
#define TSRMLS_DC
#define TSRMLS_C
#define TSRMLS_CC
#endif /* ZTS */
#endif /* TSRM_H */
-1
View File
@@ -1 +0,0 @@
#undef PTHREADS
-5
View File
@@ -1,5 +0,0 @@
AC_DEFUN([AM_SET_LIBTOOL_VARIABLE],[
LIBTOOL='$(SHELL) $(top_builddir)/libtool $1'
])
-43
View File
@@ -1,43 +0,0 @@
# Makefile to generate build tools
#
# Standard usage:
# make -f build.mk
#
# Written by Sascha Schumann
#
# $Id$
LT_TARGETS = ltmain.sh ltconfig
config_h_in = tsrm_config.h.in
makefile_am_files = Makefile.am
makefile_in_files = $(makefile_am_files:.am=.in)
makefile_files = $(makefile_am_files:e.am=e)
targets = $(makefile_in_files) $(LT_TARGETS) configure $(config_h_in)
all: $(targets)
clean:
rm -f $(targets)
$(LT_TARGETS):
rm -f $(LT_TARGETS)
libtoolize --automake $(AMFLAGS) -f
$(makefile_in_files): $(makefile_am_files)
automake -a -i $(AMFLAGS) $(makefile_files)
aclocal.m4: configure.in acinclude.m4
aclocal
$(config_h_in): configure.in acconfig.h
# explicitly remove target since autoheader does not seem to work
# correctly otherwise (timestamps are not updated)
@rm -f $@
autoheader
configure: aclocal.m4 configure.in
autoconf
-33
View File
@@ -1,33 +0,0 @@
#!/bin/sh
case "$1" in
--copy)
automake_flags=--copy
shift
;;
esac
libtoolize --force --automake $automake_flags
mv aclocal.m4 aclocal.m4.old 2>/dev/null
aclocal
if cmp aclocal.m4.old aclocal.m4 > /dev/null 2>&1; then
echo "buildconf: keeping ${1}aclocal.m4"
mv aclocal.m4.old aclocal.m4
else
echo "buildconf: created or modified ${1}aclocal.m4"
fi
autoheader
automake --add-missing --include-deps $automake_flags
mv configure configure.old 2>/dev/null
autoconf
if cmp configure.old configure > /dev/null 2>&1; then
echo "buildconf: keeping ${1}configure"
mv configure.old configure
else
echo "buildconf: created or modified ${1}configure"
fi
-31
View File
@@ -1,31 +0,0 @@
dnl $Id$
dnl
dnl Minimalistic configure.in for TSRM.
dnl
AC_INIT(TSRM.c)
AM_INIT_AUTOMAKE(TSRM, 1.0, nodefine)
AM_CONFIG_HEADER(tsrm_config.h)
sinclude(tsrm.m4)
TSRM_BASIC_CHECKS
TSRM_THREADS_CHECKS
AM_PROG_LIBTOOL
if test "$enable_debug" != "yes"; then
AM_SET_LIBTOOL_VARIABLE([--silent])
fi
dnl TSRM_PTHREAD
AC_CHECK_HEADERS(
utime.h \
dirent.h \
stdarg.h \
alloca.h \
unistd.h \
limits.h
)
AC_OUTPUT(Makefile)
-44
View File
@@ -1,44 +0,0 @@
#ifndef READDIR_H
#define READDIR_H
/*
* Structures and types used to implement opendir/readdir/closedir
* on Windows 95/NT.
*/
#include <io.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
/* struct dirent - same as Unix */
struct dirent {
long d_ino; /* inode (always 1 in WIN32) */
off_t d_off; /* offset to this dirent */
unsigned short d_reclen; /* length of d_name */
char d_name[_MAX_FNAME + 1]; /* filename (null terminated) */
};
/* typedef DIR - not the same as Unix */
typedef struct {
long handle; /* _findfirst/_findnext handle */
short offset; /* offset into directory */
short finished; /* 1 if there are not more files */
struct _finddata_t fileinfo; /* from _findfirst/_findnext */
char *dir; /* the dir we are reading */
struct dirent dent; /* the dirent to return */
} DIR;
/* Function prototypes */
DIR *opendir(const char *);
struct dirent *readdir(DIR *);
int readdir_r(DIR *, struct dirent *, struct dirent **);
int closedir(DIR *);
void rewinddir(DIR *);
#endif /* READDIR_H */
-165
View File
@@ -1,165 +0,0 @@
dnl Copyright (c) 1999, 2000 Sascha Schumann. All rights reserved.
dnl
dnl Redistribution and use in source and binary forms, with or without
dnl modification, are permitted provided that the following conditions
dnl are met:
dnl
dnl 1. Redistributions of source code must retain the above copyright
dnl notice, this list of conditions and the following disclaimer.
dnl
dnl 2. Redistributions in binary form must reproduce the above copyright
dnl notice, this list of conditions and the following disclaimer in
dnl the documentation and/or other materials provided with the
dnl distribution.
dnl
dnl THIS SOFTWARE IS PROVIDED BY SASCHA SCHUMANN ``AS IS'' AND ANY
dnl EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
dnl PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SASCHA SCHUMANN OR
dnl HIS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
dnl SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
dnl NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
dnl LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
dnl HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
dnl STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
dnl ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
dnl OF THE POSSIBILITY OF SUCH DAMAGE.
dnl
dnl PTHREADS_FLAGS
dnl
dnl Set some magic defines to achieve POSIX threads conformance
dnl
AC_DEFUN([PTHREADS_FLAGS],[
if test -z "$host_alias" && test -n "$host"; then
host_alias=$host
fi
if test -z "$host_alias"; then
AC_MSG_ERROR(host_alias is not set. Make sure to run config.guess)
fi
case $host_alias in
*solaris*)
PTHREAD_FLAGS="-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT";;
*freebsd*)
PTHREAD_FLAGS="-D_REENTRANT -D_THREAD_SAFE";;
*linux*)
PTHREAD_FLAGS=-D_REENTRANT;;
*aix*)
PTHREAD_FLAGS=-D_THREAD_SAFE;;
*irix*)
PTHREAD_FLAGS=-D_POSIX_THREAD_SAFE_FUNCTIONS;;
*hpux*)
PTHREAD_FLAGS=-D_REENTRANT;;
*sco*)
PTHREAD_FLAGS=-D_REENTRANT;;
dnl Solves sigwait() problem, creates problems with u_long etc.
dnl PTHREAD_FLAGS="-D_REENTRANT -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=199506 -D_XOPEN_SOURCE_EXTENDED=1";;
esac
if test -n "$PTHREAD_FLAGS"; then
CPPFLAGS="$CPPFLAGS $PTHREAD_FLAGS"
fi
])dnl
dnl
dnl PTHREADS_CHECK_COMPILE
dnl
dnl Check whether the current setup can use POSIX threads calls
dnl
AC_DEFUN([PTHREADS_CHECK_COMPILE], [
AC_TRY_RUN( [
#include <pthread.h>
#include <stddef.h>
void *thread_routine(void *data) {
return data;
}
int main() {
pthread_t thd;
pthread_mutexattr_t mattr;
int data = 1;
pthread_mutexattr_init(&mattr);
return pthread_create(&thd, NULL, thread_routine, &data);
} ], [
pthreads_working=yes
], [
pthreads_working=no
], pthreads_working=no ) ] )dnl
dnl
dnl PTHREADS_CHECK()
dnl
dnl Try to find a way to enable POSIX threads
dnl
dnl Magic flags
dnl -kthread gcc (FreeBSD)
dnl -Kthread UDK cc (UnixWare)
dnl -mt WorkShop cc (Solaris)
dnl -mthreads gcc (AIX)
dnl -pthread gcc (Linux, FreeBSD, NetBSD, OpenBSD)
dnl -pthreads gcc (Solaris)
dnl -qthreaded AIX cc V5
dnl -threads gcc (HP-UX)
dnl
AC_DEFUN([PTHREADS_CHECK],[
if test "$beos_threads" = "1"; then
pthreads_working="yes"
ac_cv_pthreads_cflags=""
else
save_CFLAGS=$CFLAGS
save_LIBS=$LIBS
PTHREADS_ASSIGN_VARS
PTHREADS_CHECK_COMPILE
LIBS=$save_LIBS
CFLAGS=$save_CFLAGS
AC_CACHE_CHECK(for pthreads_cflags,ac_cv_pthreads_cflags,[
ac_cv_pthreads_cflags=
if test "$pthreads_working" != "yes"; then
for flag in -kthread -pthread -pthreads -mthreads -Kthread -threads -mt -qthreaded; do
ac_save=$CFLAGS
CFLAGS="$CFLAGS $flag"
PTHREADS_CHECK_COMPILE
CFLAGS=$ac_save
if test "$pthreads_working" = "yes"; then
ac_cv_pthreads_cflags=$flag
break
fi
done
fi
fi
])
AC_CACHE_CHECK(for pthreads_lib, ac_cv_pthreads_lib,[
ac_cv_pthreads_lib=
if test "$pthreads_working" != "yes"; then
for lib in pthread pthreads c_r; do
ac_save=$LIBS
LIBS="$LIBS -l$lib"
PTHREADS_CHECK_COMPILE
LIBS=$ac_save
if test "$pthreads_working" = "yes"; then
ac_cv_pthreads_lib=$lib
break
fi
done
fi
])
if test "$pthreads_working" = "yes"; then
threads_result="POSIX-Threads found"
else
threads_result="POSIX-Threads not found"
fi
])dnl
dnl
dnl
AC_DEFUN([PTHREADS_ASSIGN_VARS],[
if test -n "$ac_cv_pthreads_lib"; then
LIBS="$LIBS -l$ac_cv_pthreads_lib"
fi
if test -n "$ac_cv_pthreads_cflags"; then
CFLAGS="$CFLAGS $ac_cv_pthreads_cflags"
fi
])dnl
-129
View File
@@ -1,129 +0,0 @@
dnl TSRM_CHECK_GCC_ARG(ARG, ACTION-IF-FOUND, ACTION-IF-NOT_FOUND)
AC_DEFUN([TSRM_CHECK_GCC_ARG],[
gcc_arg_name=[ac_cv_gcc_arg]translit($1,A-Z-,a-z_)
AC_CACHE_CHECK([whether $CC supports $1], [ac_cv_gcc_arg]translit($1,A-Z-,a-z_), [
echo 'void somefunc() { };' > conftest.c
cmd='$CC $1 -c conftest.c'
if eval $cmd 2>&1 | egrep -e $1 >/dev/null ; then
ac_result=no
else
ac_result=yes
fi
eval $gcc_arg_name=$ac_result
rm -f conftest.*
])
if eval test "\$$gcc_arg_name" = "yes"; then
$2
else
:
$3
fi
])
AC_DEFUN([TSRM_BASIC_CHECKS],[
AC_REQUIRE([AC_PROG_CC])dnl
dnl AC_REQUIRE([AM_PROG_CC_STDC])dnl
AC_REQUIRE([AC_PROG_CC_C_O])dnl
AC_REQUIRE([AC_PROG_RANLIB])dnl
AC_CHECK_HEADERS(stdarg.h)
])
AC_DEFUN([TSRM_CHECK_PTH],[
AC_MSG_CHECKING(for GNU Pth)
PTH_PREFIX="`$1 --prefix`"
if test -z "$PTH_PREFIX"; then
AC_MSG_RESULT(Please check your Pth installation)
fi
CPPFLAGS="$CPPFLAGS `$1 --cflags`"
LDFLAGS="$LDFLAGS `$1 --ldflags`"
LIBS="$LIBS `$1 --libs`"
AC_DEFINE(GNUPTH, 1, [Whether you use GNU Pth])
AC_MSG_RESULT(yes - installed in $PTH_PREFIX)
])
AC_DEFUN([TSRM_CHECK_ST],[
if test -r "$1/include/st.h"; then
CPPFLAGS="$CPPFLAGS -I$1/include"
LDFLAGS="$LDFLAGS -L$1/lib"
elif test -r "$1/st.h"; then
CPPFLAGS="$CPPFLAGS -I$1"
LDFLAGS="$LDFLAGS -L$1"
fi
AC_CHECK_HEADERS(st.h,[],[
AC_MSG_ERROR([Sorry[,] I was unable to locate the State Threads header file. Please specify the prefix using --with-tsrm-st=/prefix])
])
LIBS="$LIBS -lst"
AC_MSG_CHECKING(for SGI's State Threads)
AC_MSG_RESULT(yes)
AC_DEFINE(TSRM_ST, 1, [ ])
])
sinclude(threads.m4)
sinclude(TSRM/threads.m4)
AC_DEFUN([TSRM_CHECK_PTHREADS],[
PTHREADS_CHECK
if test "$beos_threads" = "1"; then
AC_DEFINE(BETHREADS, 1, Whether to use native BeOS threads)
else
if test "$pthreads_working" != "yes"; then
AC_MSG_ERROR(Your system seems to lack POSIX threads.)
fi
AC_DEFINE(PTHREADS, 1, Whether to use Pthreads)
AC_MSG_CHECKING(for POSIX threads)
AC_MSG_RESULT(yes)
fi
])
AC_DEFUN([TSRM_THREADS_CHECKS],[
dnl For the thread implementations, we always use --with-*
dnl to maintain consistency
AC_ARG_WITH(tsrm-pth,
[ --with-tsrm-pth[=pth-config]
Use GNU Pth.],[
TSRM_PTH=$withval
],[
TSRM_PTH=no
])
AC_ARG_WITH(tsrm-st,
[ --with-tsrm-st Use SGI's State Threads],[
TSRM_ST=$withval
],[
TSRM_ST=no
])
AC_ARG_WITH(tsrm-pthreads,
[ --with-tsrm-pthreads Use POSIX threads (default)],[
TSRM_PTHREADS=$withval
],[
TSRM_PTHREADS=yes
])
test "$TSRM_PTH" = "yes" && TSRM_PTH=pth-config
if test "$TSRM_PTH" != "no"; then
TSRM_CHECK_PTH($TSRM_PTH)
elif test "$TSRM_ST" != "no"; then
TSRM_CHECK_ST($TSRM_ST)
elif test "$TSRM_PTHREADS" != "no"; then
TSRM_CHECK_PTHREADS
fi
])
-9
View File
@@ -1,9 +0,0 @@
#ifndef TSRM_CONFIG_NW_H
#define TSRM_CONFIG_NW_H
#define HAVE_UTIME 1
/* Though we have alloca(), this seems to be causing some problem with the stack pointer -- hence not using it */
/* #define HAVE_ALLOCA 1 */
#endif
-20
View File
@@ -1,20 +0,0 @@
#ifndef TSRM_CONFIG_W32_H
#define TSRM_CONFIG_W32_H
#define HAVE_UTIME 1
#define HAVE_ALLOCA 1
#define HAVE_REALPATH 1
#include <malloc.h>
#include <stdlib.h>
#include <crtdbg.h>
#undef inline
#ifdef ZEND_WIN32_FORCE_INLINE
# define inline __forceinline
#else
# define inline
#endif
#endif
-58
View File
@@ -1,58 +0,0 @@
#ifndef TSRM_CONFIG_COMMON_H
#define TSRM_CONFIG_COMMON_H
#if WINNT|WIN32
# define TSRM_WIN32
#endif
#ifdef TSRM_WIN32
# include "tsrm_config.w32.h"
#elif defined(NETWARE)
# include "tsrm_config.nw.h"
#else
# include <tsrm_config.h>
# include <sys/param.h>
#endif
#if HAVE_ALLOCA_H && !defined(_ALLOCA_H)
# include <alloca.h>
#endif
/* AIX requires this to be the first thing in the file. */
#ifndef __GNUC__
# ifndef HAVE_ALLOCA_H
# ifdef _AIX
#pragma alloca
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
# endif
# endif
# endif
#endif
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#if HAVE_LIMITS_H
#include <limits.h>
#endif
#ifndef MAXPATHLEN
# ifdef PATH_MAX
# define MAXPATHLEN PATH_MAX
# else
# define MAXPATHLEN 256
# endif
#endif
#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2))
# define tsrm_do_alloca(p) alloca(p)
# define tsrm_free_alloca(p)
#else
# define tsrm_do_alloca(p) malloc(p)
# define tsrm_free_alloca(p) free(p)
#endif
#endif /* TSRM_CONFIG_COMMON_H */
-260
View File
@@ -1,260 +0,0 @@
/*
+----------------------------------------------------------------------+
| PHP Version 4 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2003 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Venkat Raghavan S <rvenkat@novell.com> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include "TSRM.h"
#ifdef NETWARE
#ifdef USE_MKFIFO
#include <sys/stat.h>
#elif !defined(USE_PIPE_OPEN) /* NXFifoOpen */
#include <nks/fsio.h>
#endif
#include <nks/vm.h>
#include <nks/memory.h>
#include <string.h>
#include "mktemp.h"
/* strtok() call in LibC is abending when used in a different address space -- hence using
PHP's version itself for now : Venkat (30/4/02) */
#include "tsrm_strtok_r.h"
#define tsrm_strtok_r(a,b,c) strtok((a),(b))
#define WHITESPACE " \t"
#define MAX_ARGS 10
TSRM_API FILE* popen(const char *commandline, const char *type)
{
char *command = NULL, *argv[MAX_ARGS] = {'\0'}, **env = NULL;
char *tempName = "sys:/php/temp/phpXXXXXX.tmp";
char *filePath = NULL;
char *ptr = NULL;
int ptrLen = 0, argc = 0, i = 0, envCount = 0, err = 0;
FILE *stream = NULL;
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
int pipe_handle;
int mode = O_RDONLY;
#else
NXHandle_t pipe_handle;
NXMode_t mode = NX_O_RDONLY;
#endif
NXExecEnvSpec_t envSpec;
NXNameSpec_t nameSpec;
NXVmId_t newVM = 0;
/* Check for validity of input parameters */
if (!commandline || !type)
return NULL;
/* Get temporary file name */
filePath = mktemp(tempName);
/*consoleprintf ("PHP | popen: file path = %s, mode = %s\n", filePath, type);*/
if (!filePath)
return NULL;
/* Set pipe mode according to type -- for now allow only "r" or "w" */
if (strcmp(type, "r") == 0)
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
mode = O_RDONLY;
#else
mode = NX_O_RDONLY;
#endif
else if (strcmp(type, "w") == 0)
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
mode = O_WRONLY;
#else
mode = NX_O_WRONLY;
#endif
else
return NULL;
#ifdef USE_PIPE_OPEN
pipe_handle = pipe_open(filePath, mode);
/*consoleprintf ("PHP | popen: pipe_open() returned %d\n", pipe_handle);*/
if (pipe_handle == -1)
return NULL;
#elif defined(USE_MKFIFO)
pipe_handle = mkfifo(filePath, mode);
consoleprintf ("PHP | popen: mkfifo() returned %d\n", pipe_handle);
if (pipe_handle == -1)
return NULL;
#else
/*
- NetWare doesn't require first parameter
- Allowing LibC to choose the buffer size for now
*/
err = NXFifoOpen(0, filePath, mode, 0, &pipe_handle);
/*consoleprintf ("PHP | popen: NXFifoOpen() returned %d\n", err);*/
if (err)
return NULL;
#endif
/* Copy the environment variables in preparation for the spawn call */
envCount = NXGetEnvCount() + 1; /* add one for NULL */
env = (char**)NXMemAlloc(sizeof(char*) * envCount, 0);
if (!env)
return NULL;
err = NXCopyEnv(env, envCount);
consoleprintf ("PHP | popen: NXCopyEnv() returned %d\n", err);
if (err)
{
NXMemFree (env);
return NULL;
}
/* Separate commandline string into words */
consoleprintf ("PHP | popen: commandline = %s\n", commandline);
ptr = tsrm_strtok_r((char*)commandline, WHITESPACE, NULL);
ptrLen = strlen(ptr);
command = (char*)malloc(ptrLen + 1);
if (!command)
{
NXMemFree (env);
return NULL;
}
strcpy (command, ptr);
ptr = tsrm_strtok_r(NULL, WHITESPACE, NULL);
while (ptr && (argc < MAX_ARGS))
{
ptrLen = strlen(ptr);
argv[argc] = (char*)malloc(ptrLen + 1);
if (!argv[argc])
{
NXMemFree (env);
if (command)
free (command);
for (i = 0; i < argc; i++)
{
if (argv[i])
free (argv[i]);
}
return NULL;
}
strcpy (argv[argc], ptr);
argc++;
ptr = tsrm_strtok_r(NULL, WHITESPACE, NULL);
}
consoleprintf ("PHP | popen: commandline string parsed into tokens\n");
/* Setup the execution environment and spawn new process */
envSpec.esFlags = 0; /* Not used */
envSpec.esArgc = argc;
envSpec.esArgv = (void**)argv;
envSpec.esEnv = (void**)env;
envSpec.esStdin.ssType =
envSpec.esStdout.ssType = NX_OBJ_FIFO;
envSpec.esStderr.ssType = NX_OBJ_FILE;
/*
envSpec.esStdin.ssHandle =
envSpec.esStdout.ssHandle =
envSpec.esStderr.ssHandle = -1;
*/
envSpec.esStdin.ssPathCtx =
envSpec.esStdout.ssPathCtx =
envSpec.esStderr.ssPathCtx = NULL;
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
if (mode == O_RDONLY)
#else
if (mode == NX_O_RDONLY)
#endif
{
envSpec.esStdin.ssPath = filePath;
envSpec.esStdout.ssPath = stdout;
}
else /* Write Only */
{
envSpec.esStdin.ssPath = stdin;
envSpec.esStdout.ssPath = filePath;
}
envSpec.esStderr.ssPath = stdout;
nameSpec.ssType = NX_OBJ_FIFO;
/* nameSpec.ssHandle = 0; */ /* Not used */
nameSpec.ssPathCtx = NULL; /* Not used */
nameSpec.ssPath = argv[0];
consoleprintf ("PHP | popen: environment setup\n");
err = NXVmSpawn(&nameSpec, &envSpec, 0, &newVM);
consoleprintf ("PHP | popen: NXVmSpawn() returned %d\n", err);
if (!err)
/* Get file pointer corresponding to the pipe (file) opened */
stream = fdopen(pipe_handle, type);
/* Clean-up */
if (env)
NXMemFree (env);
if (pipe_handle)
#if defined(USE_PIPE_OPEN) || defined(USE_MKFIFO)
close(pipe_handle);
#else
NXClose(pipe_handle);
#endif
if (command)
free (command);
for (i = 0; i < argc; i++)
{
if (argv[i])
free (argv[i]);
}
consoleprintf ("PHP | popen: all clean-up done, returning...\n");
return stream;
}
TSRM_API int pclose(FILE* stream)
{
int err = 0;
NXHandle_t fd = 0;
/* Get the process associated with this pipe (file) handle and terminate it */
fd = fileno(stream);
NXClose (fd);
err = fclose(stream);
return err;
}
#endif
-28
View File
@@ -1,28 +0,0 @@
/*
+----------------------------------------------------------------------+
| PHP Version 4 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2003 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Venkat Raghavan S <rvenkat@novell.com> |
+----------------------------------------------------------------------+
*/
#ifndef TSRM_NW_H
#define TSRM_NW_H
#include "TSRM.h"
TSRM_API FILE* popen(const char *command, const char *type);
TSRM_API int pclose(FILE* stream);
#endif
-63
View File
@@ -1,63 +0,0 @@
#include <stdio.h>
#include "tsrm_config_common.h"
#include "tsrm_strtok_r.h"
static inline int in_character_class(char ch, const char *delim)
{
while (*delim) {
if (*delim == ch) {
return 1;
}
delim++;
}
return 0;
}
char *tsrm_strtok_r(char *s, const char *delim, char **last)
{
char *token;
if (s == NULL) {
s = *last;
}
while (*s && in_character_class(*s, delim)) {
s++;
}
if (!*s) {
return NULL;
}
token = s;
while (*s && !in_character_class(*s, delim)) {
s++;
}
if (!*s) {
*last = s;
} else {
*s = '\0';
*last = s + 1;
}
return token;
}
#if 0
main()
{
char foo[] = "/foo/bar//\\barbara";
char *last;
char *token;
token = tsrm_strtok_r(foo, "/\\", &last);
while (token) {
printf ("Token = '%s'\n", token);
token = tsrm_strtok_r(NULL, "/\\", &last);
}
return 0;
}
#endif
-6
View File
@@ -1,6 +0,0 @@
#ifndef TSRM_STRTOK_R
#define TSRM_STRTOK_R
char *tsrm_strtok_r(char *s, const char *delim, char **last);
#endif
-901
View File
@@ -1,901 +0,0 @@
/*
+----------------------------------------------------------------------+
| PHP Version 4 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2003 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Sascha Schumann <sascha@schumann.cx> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
#include <stdio.h>
#include <limits.h>
#include <errno.h>
#include <stdlib.h>
#include <fcntl.h>
#include "tsrm_virtual_cwd.h"
#include "tsrm_strtok_r.h"
#ifdef TSRM_WIN32
#include <io.h>
#include "tsrm_win32.h"
#endif
#ifdef NETWARE
/*#include "pipe.h"*/
#include "tsrm_nw.h"
#endif
#ifndef HAVE_REALPATH
#define realpath(x,y) strcpy(y,x)
#endif
#define VIRTUAL_CWD_DEBUG 0
#include "TSRM.h"
/* Only need mutex for popen() in Windows and NetWare, because it doesn't chdir() on UNIX */
#if (defined(TSRM_WIN32) || defined(NETWARE)) && defined(ZTS)
MUTEX_T cwd_mutex;
#endif
#ifdef ZTS
static ts_rsrc_id cwd_globals_id;
#else
static virtual_cwd_globals cwd_globals;
#endif
cwd_state main_cwd_state; /* True global */
#ifndef TSRM_WIN32
#include <unistd.h>
#else
#include <direct.h>
#endif
#ifndef S_ISDIR
#define S_ISDIR(mode) ((mode) & _S_IFDIR)
#endif
#ifndef S_ISREG
#define S_ISREG(mode) ((mode) & _S_IFREG)
#endif
#ifdef TSRM_WIN32
#include <tchar.h>
#define tsrm_strtok_r(a,b,c) _tcstok((a),(b))
#define TOKENIZER_STRING "/\\"
static int php_check_dots(const char *element, int n)
{
while (n-- > 0) if (element[n] != '.') break;
return (n != -1);
}
#define IS_DIRECTORY_UP(element, len) \
(len >= 2 && !php_check_dots(element, len))
#define IS_DIRECTORY_CURRENT(element, len) \
(len == 1 && element[0] == '.')
#elif defined(NETWARE)
/* NetWare has strtok() (in LibC) and allows both slashes in paths, like Windows --
but rest of the stuff is like Unix */
/* strtok() call in LibC is abending when used in a different address space -- hence using
PHP's version itself for now */
/*#define tsrm_strtok_r(a,b,c) strtok((a),(b))*/
#define TOKENIZER_STRING "/\\"
#else
#define TOKENIZER_STRING "/"
#endif
/* default macros */
#ifndef IS_DIRECTORY_UP
#define IS_DIRECTORY_UP(element, len) \
(len == 2 && element[0] == '.' && element[1] == '.')
#endif
#ifndef IS_DIRECTORY_CURRENT
#define IS_DIRECTORY_CURRENT(element, len) \
(len == 1 && element[0] == '.')
#endif
/* define this to check semantics */
#define IS_DIR_OK(s) (1)
#ifndef IS_DIR_OK
#define IS_DIR_OK(state) (php_is_dir_ok(state) == 0)
#endif
#define CWD_STATE_COPY(d, s) \
(d)->cwd_length = (s)->cwd_length; \
(d)->cwd = (char *) malloc((s)->cwd_length+1); \
memcpy((d)->cwd, (s)->cwd, (s)->cwd_length+1);
#define CWD_STATE_FREE(s) \
free((s)->cwd);
static int php_is_dir_ok(const cwd_state *state)
{
#if !(defined(NETWARE) && defined(CLIB_STAT_PATCH))
struct stat buf;
if (stat(state->cwd, &buf) == 0 && S_ISDIR(buf.st_mode))
#else
struct stat_libc buf;
if (stat(state->cwd, (struct stat*)(&buf)) == 0 && S_ISDIR(buf.st_mode))
#endif
return (0);
return (1);
}
static int php_is_file_ok(const cwd_state *state)
{
#if !(defined(NETWARE) && defined(CLIB_STAT_PATCH))
struct stat buf;
if (stat(state->cwd, &buf) == 0 && S_ISREG(buf.st_mode))
#else
struct stat_libc buf;
if (stat(state->cwd, (struct stat*)(&buf)) == 0 && S_ISREG(buf.st_mode))
#endif
return (0);
return (1);
}
static void cwd_globals_ctor(virtual_cwd_globals *cwd_globals TSRMLS_DC)
{
CWD_STATE_COPY(&cwd_globals->cwd, &main_cwd_state);
}
static void cwd_globals_dtor(virtual_cwd_globals *cwd_globals TSRMLS_DC)
{
CWD_STATE_FREE(&cwd_globals->cwd);
}
static char *tsrm_strndup(const char *s, size_t length)
{
char *p;
p = (char *) malloc(length+1);
if (!p) {
return (char *)NULL;
}
if (length) {
memcpy(p,s,length);
}
p[length]=0;
return p;
}
CWD_API void virtual_cwd_startup(void)
{
char cwd[MAXPATHLEN];
char *result;
result = getcwd(cwd, sizeof(cwd));
if (!result) {
cwd[0] = '\0';
}
main_cwd_state.cwd = strdup(cwd);
main_cwd_state.cwd_length = strlen(cwd);
#ifdef ZTS
ts_allocate_id(&cwd_globals_id, sizeof(virtual_cwd_globals), (ts_allocate_ctor) cwd_globals_ctor, (ts_allocate_dtor) cwd_globals_dtor);
#else
cwd_globals_ctor(&cwd_globals TSRMLS_CC);
#endif
#if defined(TSRM_WIN32) && defined(ZTS)
cwd_mutex = tsrm_mutex_alloc();
#endif
}
CWD_API void virtual_cwd_shutdown(void)
{
#ifndef ZTS
cwd_globals_dtor(&cwd_globals TSRMLS_CC);
#endif
#if defined(TSRM_WIN32) && defined(ZTS)
tsrm_mutex_free(cwd_mutex);
#endif
free(main_cwd_state.cwd); /* Don't use CWD_STATE_FREE because the non global states will probably use emalloc()/efree() */
}
CWD_API char *virtual_getcwd_ex(size_t *length TSRMLS_DC)
{
cwd_state *state;
state = &CWDG(cwd);
if (state->cwd_length == 0) {
char *retval;
*length = 1;
retval = (char *) malloc(2);
retval[0] = DEFAULT_SLASH;
retval[1] = '\0';
return retval;
}
#ifdef TSRM_WIN32
/* If we have something like C: */
if (state->cwd_length == 2 && state->cwd[state->cwd_length-1] == ':') {
char *retval;
*length = state->cwd_length+1;
retval = (char *) malloc(*length+1);
memcpy(retval, state->cwd, *length);
retval[*length-1] = DEFAULT_SLASH;
retval[*length] = '\0';
return retval;
}
#endif
*length = state->cwd_length;
return strdup(state->cwd);
}
/* Same semantics as UNIX getcwd() */
CWD_API char *virtual_getcwd(char *buf, size_t size TSRMLS_DC)
{
size_t length;
char *cwd;
cwd = virtual_getcwd_ex(&length TSRMLS_CC);
if (buf == NULL) {
return cwd;
}
if (length > size-1) {
free(cwd);
errno = ERANGE; /* Is this OK? */
return NULL;
}
memcpy(buf, cwd, length+1);
free(cwd);
return buf;
}
/* Resolve path relatively to state and put the real path into state */
/* returns 0 for ok, 1 for error */
CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func verify_path, int use_realpath)
{
int path_length = strlen(path);
char *ptr, *path_copy;
char *tok = NULL;
int ptr_length;
cwd_state *old_state;
int ret = 0;
int copy_amount = -1;
char *free_path;
unsigned char is_absolute = 0;
#ifndef TSRM_WIN32
char resolved_path[MAXPATHLEN];
#endif
if (path_length == 0)
return (0);
if (path_length >= MAXPATHLEN)
return (1);
#if !defined(TSRM_WIN32) && !defined(NETWARE)
/* cwd_length can be 0 when getcwd() fails.
* This can happen under solaris when a dir does not have read permissions
* but *does* have execute permissions */
if (IS_ABSOLUTE_PATH(path, path_length) || (state->cwd_length < 1)) {
if (use_realpath) {
if (realpath(path, resolved_path)) {
path = resolved_path;
path_length = strlen(path);
} else {
/* disable for now
return 1; */
}
}
} else { /* Concat current directory with relative path and then run realpath() on it */
char *tmp;
char *ptr;
ptr = tmp = (char *) malloc(state->cwd_length+path_length+sizeof("/"));
if (!tmp) {
return 1;
}
memcpy(ptr, state->cwd, state->cwd_length);
ptr += state->cwd_length;
*ptr++ = DEFAULT_SLASH;
memcpy(ptr, path, path_length);
ptr += path_length;
*ptr = '\0';
if (strlen(tmp) >= MAXPATHLEN) {
free(tmp);
return 1;
}
if (use_realpath) {
if (realpath(tmp, resolved_path)) {
path = resolved_path;
path_length = strlen(path);
} else {
/* disable for now
free(tmp);
return 1; */
}
}
free(tmp);
}
#endif
free_path = path_copy = tsrm_strndup(path, path_length);
old_state = (cwd_state *) malloc(sizeof(cwd_state));
CWD_STATE_COPY(old_state, state);
#if VIRTUAL_CWD_DEBUG
fprintf(stderr,"cwd = %s path = %s\n", state->cwd, path);
#endif
if (IS_ABSOLUTE_PATH(path_copy, path_length)) {
copy_amount = COPY_WHEN_ABSOLUTE(path_copy);
is_absolute = 1;
#ifdef TSRM_WIN32
} else if (IS_UNC_PATH(path_copy, path_length)) {
copy_amount = 2;
is_absolute = 1;
} else if (IS_SLASH(path_copy[0])) {
copy_amount = 2;
#endif
}
if (copy_amount != -1) {
state->cwd = (char *) realloc(state->cwd, copy_amount + 1);
if (copy_amount) {
if (is_absolute) {
memcpy(state->cwd, path_copy, copy_amount);
path_copy += copy_amount;
} else {
memcpy(state->cwd, old_state->cwd, copy_amount);
}
}
state->cwd[copy_amount] = '\0';
state->cwd_length = copy_amount;
}
if (state->cwd_length > 0 || IS_ABSOLUTE_PATH(path, path_length)) {
ptr = tsrm_strtok_r(path_copy, TOKENIZER_STRING, &tok);
while (ptr) {
ptr_length = strlen(ptr);
if (IS_DIRECTORY_UP(ptr, ptr_length)) {
char save;
save = DEFAULT_SLASH;
#define PREVIOUS state->cwd[state->cwd_length - 1]
while (IS_ABSOLUTE_PATH(state->cwd, state->cwd_length) &&
!IS_SLASH(PREVIOUS)) {
save = PREVIOUS;
PREVIOUS = '\0';
state->cwd_length--;
}
if (!IS_ABSOLUTE_PATH(state->cwd, state->cwd_length)) {
state->cwd[state->cwd_length++] = save;
state->cwd[state->cwd_length] = '\0';
} else {
PREVIOUS = '\0';
state->cwd_length--;
}
} else if (!IS_DIRECTORY_CURRENT(ptr, ptr_length)) {
state->cwd = (char *) realloc(state->cwd, state->cwd_length+ptr_length+1+1);
#ifdef TSRM_WIN32
/* Windows 9x will consider C:\\Foo as a network path. Avoid it. */
if ((state->cwd[state->cwd_length-1]!='\\' && state->cwd[state->cwd_length-1]!='/') ||
IsDBCSLeadByte(state->cwd[state->cwd_length-2])) {
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
}
#elif defined(NETWARE)
/* If the token is a volume name, it will have colon at the end -- so, no slash before it */
if (ptr[ptr_length-1] != ':') {
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
}
#else
state->cwd[state->cwd_length++] = DEFAULT_SLASH;
#endif
memcpy(&state->cwd[state->cwd_length], ptr, ptr_length+1);
state->cwd_length += ptr_length;
}
ptr = tsrm_strtok_r(NULL, TOKENIZER_STRING, &tok);
}
if (state->cwd_length == COPY_WHEN_ABSOLUTE(state->cwd)) {
state->cwd = (char *) realloc(state->cwd, state->cwd_length+1+1);
state->cwd[state->cwd_length] = DEFAULT_SLASH;
state->cwd[state->cwd_length+1] = '\0';
state->cwd_length++;
}
} else {
state->cwd = (char *) realloc(state->cwd, path_length+1);
memcpy(state->cwd, path, path_length+1);
state->cwd_length = path_length;
}
if (verify_path && verify_path(state)) {
CWD_STATE_FREE(state);
*state = *old_state;
ret = 1;
} else {
CWD_STATE_FREE(old_state);
ret = 0;
}
free(old_state);
free(free_path);
#if VIRTUAL_CWD_DEBUG
fprintf (stderr, "virtual_file_ex() = %s\n",state->cwd);
#endif
return (ret);
}
CWD_API int virtual_chdir(const char *path TSRMLS_DC)
{
return virtual_file_ex(&CWDG(cwd), path, php_is_dir_ok, 1)?-1:0;
}
CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path TSRMLS_DC) TSRMLS_DC)
{
int length = strlen(path);
char *temp;
int retval;
if (length == 0) {
return 1; /* Can't cd to empty string */
}
while(--length >= 0 && !IS_SLASH(path[length])) {
}
if (length == -1) {
/* No directory only file name */
errno = ENOENT;
return -1;
}
if (length == COPY_WHEN_ABSOLUTE(path) && IS_ABSOLUTE_PATH(path, length+1)) { /* Also use trailing slash if this is absolute */
length++;
}
temp = (char *) tsrm_do_alloca(length+1);
memcpy(temp, path, length);
temp[length] = 0;
#if VIRTUAL_CWD_DEBUG
fprintf (stderr, "Changing directory to %s\n", temp);
#endif
retval = p_chdir(temp TSRMLS_CC);
tsrm_free_alloca(temp);
return retval;
}
CWD_API char *virtual_realpath(const char *path, char *real_path TSRMLS_DC)
{
cwd_state new_state;
char *retval;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
if (virtual_file_ex(&new_state, path, NULL, 1)==0) {
int len = new_state.cwd_length>MAXPATHLEN-1?MAXPATHLEN-1:new_state.cwd_length;
memcpy(real_path, new_state.cwd, len);
real_path[len] = '\0';
retval = real_path;
} else {
retval = NULL;
}
CWD_STATE_FREE(&new_state);
return retval;
}
CWD_API int virtual_filepath_ex(const char *path, char **filepath, verify_path_func verify_path TSRMLS_DC)
{
cwd_state new_state;
int retval;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
retval = virtual_file_ex(&new_state, path, verify_path, 1);
*filepath = new_state.cwd;
return retval;
}
CWD_API int virtual_filepath(const char *path, char **filepath TSRMLS_DC)
{
return virtual_filepath_ex(path, filepath, php_is_file_ok TSRMLS_CC);
}
CWD_API FILE *virtual_fopen(const char *path, const char *mode TSRMLS_DC)
{
cwd_state new_state;
FILE *f;
if (path[0] == '\0') { /* Fail to open empty path */
return NULL;
}
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, path, NULL, 1);
f = fopen(new_state.cwd, mode);
CWD_STATE_FREE(&new_state);
return f;
}
#if !defined(TSRM_WIN32)
CWD_API int virtual_access(const char *pathname, int mode TSRMLS_DC)
{
cwd_state new_state;
int ret;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, pathname, NULL, 1);
ret = access(new_state.cwd, mode);
CWD_STATE_FREE(&new_state);
return ret;
}
#endif
#if HAVE_UTIME
CWD_API int virtual_utime(const char *filename, struct utimbuf *buf TSRMLS_DC)
{
cwd_state new_state;
int ret;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, filename, NULL, 0);
ret = utime(new_state.cwd, buf);
CWD_STATE_FREE(&new_state);
return ret;
}
#endif
CWD_API int virtual_chmod(const char *filename, mode_t mode TSRMLS_DC)
{
cwd_state new_state;
int ret;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, filename, NULL, 1);
ret = chmod(new_state.cwd, mode);
CWD_STATE_FREE(&new_state);
return ret;
}
#if !defined(TSRM_WIN32) && !defined(NETWARE)
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group TSRMLS_DC)
{
cwd_state new_state;
int ret;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, filename, NULL, 0);
ret = chown(new_state.cwd, owner, group);
CWD_STATE_FREE(&new_state);
return ret;
}
#endif
CWD_API int virtual_open(const char *path TSRMLS_DC, int flags, ...)
{
cwd_state new_state;
int f;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, path, NULL, 1);
if (flags & O_CREAT) {
mode_t mode;
va_list arg;
va_start(arg, flags);
mode = (mode_t) va_arg(arg, int);
va_end(arg);
f = open(new_state.cwd, flags, mode);
} else {
f = open(new_state.cwd, flags);
}
CWD_STATE_FREE(&new_state);
return f;
}
CWD_API int virtual_creat(const char *path, mode_t mode TSRMLS_DC)
{
cwd_state new_state;
int f;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, path, NULL, 1);
f = creat(new_state.cwd, mode);
CWD_STATE_FREE(&new_state);
return f;
}
CWD_API int virtual_rename(char *oldname, char *newname TSRMLS_DC)
{
cwd_state old_state;
cwd_state new_state;
int retval;
CWD_STATE_COPY(&old_state, &CWDG(cwd));
virtual_file_ex(&old_state, oldname, NULL, 0);
oldname = old_state.cwd;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, newname, NULL, 0);
newname = new_state.cwd;
retval = rename(oldname, newname);
CWD_STATE_FREE(&old_state);
CWD_STATE_FREE(&new_state);
return retval;
}
#if !(defined(NETWARE) && defined(CLIB_STAT_PATCH))
CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC)
{
cwd_state new_state;
int retval;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, path, NULL, 1);
retval = stat(new_state.cwd, buf);
CWD_STATE_FREE(&new_state);
return retval;
}
#else
CWD_API int virtual_stat(const char *path, struct stat_libc *buf TSRMLS_DC)
{
cwd_state new_state;
int retval;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, path, NULL, 1);
retval = stat(new_state.cwd, (struct stat*)buf);
CWD_STATE_FREE(&new_state);
return retval;
}
#endif
#if !defined(TSRM_WIN32) && !defined(NETWARE)
CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC)
{
cwd_state new_state;
int retval;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, path, NULL, 0);
retval = lstat(new_state.cwd, buf);
CWD_STATE_FREE(&new_state);
return retval;
}
#endif
CWD_API int virtual_unlink(const char *path TSRMLS_DC)
{
cwd_state new_state;
int retval;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, path, NULL, 0);
retval = unlink(new_state.cwd);
CWD_STATE_FREE(&new_state);
return retval;
}
CWD_API int virtual_mkdir(const char *pathname, mode_t mode TSRMLS_DC)
{
cwd_state new_state;
int retval;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, pathname, NULL, 1);
#ifdef TSRM_WIN32
retval = mkdir(new_state.cwd);
#else
retval = mkdir(new_state.cwd, mode);
#endif
CWD_STATE_FREE(&new_state);
return retval;
}
CWD_API int virtual_rmdir(const char *pathname TSRMLS_DC)
{
cwd_state new_state;
int retval;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, pathname, NULL, 0);
retval = rmdir(new_state.cwd);
CWD_STATE_FREE(&new_state);
return retval;
}
#ifdef TSRM_WIN32
DIR *opendir(const char *name);
#endif
CWD_API DIR *virtual_opendir(const char *pathname TSRMLS_DC)
{
cwd_state new_state;
DIR *retval;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
virtual_file_ex(&new_state, pathname, NULL, 1);
retval = opendir(new_state.cwd);
CWD_STATE_FREE(&new_state);
return retval;
}
#ifdef TSRM_WIN32
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
{
return popen_ex(command, type, CWDG(cwd).cwd, NULL);
}
#elif defined(NETWARE)
/* On NetWare, the trick of prepending "cd cwd; " doesn't work so we need to perform
a VCWD_CHDIR() and mutex it
*/
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
{
char prev_cwd[MAXPATHLEN];
char *getcwd_result;
FILE *retval;
getcwd_result = VCWD_GETCWD(prev_cwd, MAXPATHLEN);
if (!getcwd_result) {
return NULL;
}
#ifdef ZTS
tsrm_mutex_lock(cwd_mutex);
#endif
VCWD_CHDIR(CWDG(cwd).cwd);
retval = popen(command, type);
VCWD_CHDIR(prev_cwd);
#ifdef ZTS
tsrm_mutex_unlock(cwd_mutex);
#endif
return retval;
}
#else /* Unix */
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
{
int command_length;
int dir_length, extra = 0;
char *command_line;
char *ptr, *dir;
FILE *retval;
command_length = strlen(command);
dir_length = CWDG(cwd).cwd_length;
dir = CWDG(cwd).cwd;
while (dir_length > 0) {
if (*dir == '\'') extra+=3;
dir++;
dir_length--;
}
dir_length = CWDG(cwd).cwd_length;
dir = CWDG(cwd).cwd;
ptr = command_line = (char *) malloc(command_length + sizeof("cd '' ; ") + dir_length +extra+1+1);
if (!command_line) {
return NULL;
}
memcpy(ptr, "cd ", sizeof("cd ")-1);
ptr += sizeof("cd ")-1;
if (CWDG(cwd).cwd_length == 0) {
*ptr++ = DEFAULT_SLASH;
} else {
*ptr++ = '\'';
while (dir_length > 0) {
switch (*dir) {
case '\'':
*ptr++ = '\'';
*ptr++ = '\\';
*ptr++ = '\'';
/* fall-through */
default:
*ptr++ = *dir;
}
dir++;
dir_length--;
}
*ptr++ = '\'';
}
*ptr++ = ' ';
*ptr++ = ';';
*ptr++ = ' ';
memcpy(ptr, command, command_length+1);
retval = popen(command_line, type);
free(command_line);
return retval;
}
#endif
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
-277
View File
@@ -1,277 +0,0 @@
/*
+----------------------------------------------------------------------+
| PHP Version 4 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2003 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Sascha Schumann <sascha@schumann.cx> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#ifndef VIRTUAL_CWD_H
#define VIRTUAL_CWD_H
#include "TSRM.h"
#include "tsrm_config_common.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <ctype.h>
#ifdef HAVE_UTIME_H
#include <utime.h>
#endif
#ifdef HAVE_STDARG_H
#include <stdarg.h>
#endif
#ifndef TSRM_WIN32
#include <unistd.h>
#endif
#if defined(__osf__) || defined(_AIX)
#include <errno.h>
#endif
#ifdef TSRM_WIN32
#include "readdir.h"
#include <sys/utime.h>
/* mode_t isn't defined on Windows */
typedef unsigned short mode_t;
#define DEFAULT_SLASH '\\'
#define DEFAULT_DIR_SEPARATOR ';'
#define IS_SLASH(c) ((c) == '/' || (c) == '\\')
#define IS_SLASH_P(c) (*(c) == '/' || \
(*(c) == '\\' && !IsDBCSLeadByte(*(c-1))))
/* COPY_WHEN_ABSOLUTE also takes path as argument because netware needs it
* to account for volume name that is unique to NetWare absolute paths
*/
#define COPY_WHEN_ABSOLUTE(path) 2
#define IS_UNC_PATH(path, len) \
(len >= 2 && IS_SLASH(path[0]) && IS_SLASH(path[1]))
#define IS_ABSOLUTE_PATH(path, len) \
(len >= 2 && ((isalpha(path[0]) && path[1] == ':') || IS_UNC_PATH(path, len)))
#elif defined(NETWARE)
#ifdef HAVE_DIRENT_H
#include <dirent.h>
#endif
#define DEFAULT_SLASH '/'
#define DEFAULT_DIR_SEPARATOR ';'
#define IS_SLASH(c) ((c) == '/' || (c) == '\\')
#define COPY_WHEN_ABSOLUTE(path) \
(strchr(path, ':') - path + 1) /* Take the volume name which ends with a colon */
#define IS_ABSOLUTE_PATH(path, len) \
(strchr(path, ':') != NULL) /* Colon indicates volume name */
#else
#ifdef HAVE_DIRENT_H
#include <dirent.h>
#endif
#define DEFAULT_SLASH '/'
#ifdef __riscos__
#define DEFAULT_DIR_SEPARATOR ';'
#else
#define DEFAULT_DIR_SEPARATOR ':'
#endif
#define IS_SLASH(c) ((c) == '/')
#define IS_SLASH_P(c) (*(c) == '/')
#endif
#ifndef COPY_WHEN_ABSOLUTE
#define COPY_WHEN_ABSOLUTE(path) 0
#endif
#ifndef IS_ABSOLUTE_PATH
#define IS_ABSOLUTE_PATH(path, len) \
(IS_SLASH(path[0]))
#endif
#ifdef TSRM_EXPORTS
#define CWD_EXPORTS
#endif
#ifdef TSRM_WIN32
# ifdef CWD_EXPORTS
# define CWD_API __declspec(dllexport)
# else
# define CWD_API __declspec(dllimport)
# endif
#else
#define CWD_API
#endif
typedef struct _cwd_state {
char *cwd;
int cwd_length;
} cwd_state;
typedef int (*verify_path_func)(const cwd_state *);
CWD_API void virtual_cwd_startup(void);
CWD_API void virtual_cwd_shutdown(void);
CWD_API char *virtual_getcwd_ex(size_t *length TSRMLS_DC);
CWD_API char *virtual_getcwd(char *buf, size_t size TSRMLS_DC);
CWD_API int virtual_chdir(const char *path TSRMLS_DC);
CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path TSRMLS_DC) TSRMLS_DC);
CWD_API int virtual_filepath(const char *path, char **filepath TSRMLS_DC);
CWD_API int virtual_filepath_ex(const char *path, char **filepath, verify_path_func verify_path TSRMLS_DC);
CWD_API char *virtual_realpath(const char *path, char *real_path TSRMLS_DC);
CWD_API FILE *virtual_fopen(const char *path, const char *mode TSRMLS_DC);
CWD_API int virtual_open(const char *path TSRMLS_DC, int flags, ...);
CWD_API int virtual_creat(const char *path, mode_t mode TSRMLS_DC);
CWD_API int virtual_rename(char *oldname, char *newname TSRMLS_DC);
#if !(defined(NETWARE) && defined(CLIB_STAT_PATCH))
CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC);
#else
CWD_API int virtual_stat(const char *path, struct stat_libc *buf TSRMLS_DC);
#endif
#if !defined(TSRM_WIN32) && !defined(NETWARE)
CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC);
#endif
CWD_API int virtual_unlink(const char *path TSRMLS_DC);
CWD_API int virtual_mkdir(const char *pathname, mode_t mode TSRMLS_DC);
CWD_API int virtual_rmdir(const char *pathname TSRMLS_DC);
CWD_API DIR *virtual_opendir(const char *pathname TSRMLS_DC);
CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC);
#if !defined(TSRM_WIN32)
CWD_API int virtual_access(const char *pathname, int mode TSRMLS_DC);
#endif
/* On AIX & Tru64 when a file does not exist realpath() returns
* NULL, and sets errno to ENOENT. Unlike in other libc implementations
* the destination is not filled and remains undefined. Therefor, we
* must populate it manually using strcpy as done on systems with no
* realpath() function.
*/
#if defined(__osf__) || defined(_AIX)
static char *php_realpath_hack(char *src, char *dest)
{
char *ret;
if ((ret = realpath(src, dest)) == NULL && errno == ENOENT) {
return strcpy(dest, src);
} else {
return ret;
}
}
#endif
#if HAVE_UTIME
CWD_API int virtual_utime(const char *filename, struct utimbuf *buf TSRMLS_DC);
#endif
CWD_API int virtual_chmod(const char *filename, mode_t mode TSRMLS_DC);
#if !defined(TSRM_WIN32) && !defined(NETWARE)
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group TSRMLS_DC);
#endif
CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func verify_path, int use_realpath);
typedef struct _virtual_cwd_globals {
cwd_state cwd;
} virtual_cwd_globals;
#ifdef ZTS
# define CWDG(v) TSRMG(cwd_globals_id, virtual_cwd_globals *, v)
#else
# define CWDG(v) (cwd_globals.v)
#endif
/* The actual macros to be used in programs using TSRM
* If the program defines VIRTUAL_DIR it will use the
* virtual_* functions
*/
#ifdef VIRTUAL_DIR
#define VCWD_GETCWD(buff, size) virtual_getcwd(buff, size TSRMLS_CC)
#define VCWD_FOPEN(path, mode) virtual_fopen(path, mode TSRMLS_CC)
/* Because open() has two modes, we have to macros to replace it */
#define VCWD_OPEN(path, flags) virtual_open(path TSRMLS_CC, flags)
#define VCWD_OPEN_MODE(path, flags, mode) virtual_open(path TSRMLS_CC, flags, mode)
#define VCWD_CREAT(path, mode) virtual_creat(path, mode TSRMLS_CC)
#define VCWD_CHDIR(path) virtual_chdir(path TSRMLS_CC)
#define VCWD_CHDIR_FILE(path) virtual_chdir_file(path, virtual_chdir TSRMLS_CC)
#define VCWD_GETWD(buf)
#define VCWD_REALPATH(path, real_path) virtual_realpath(path, real_path TSRMLS_CC)
#define VCWD_RENAME(oldname, newname) virtual_rename(oldname, newname TSRMLS_CC)
#define VCWD_STAT(path, buff) virtual_stat(path, buff TSRMLS_CC)
#if !defined(TSRM_WIN32) && !defined(NETWARE)
#define VCWD_LSTAT(path, buff) virtual_lstat(path, buff TSRMLS_CC)
#endif
#define VCWD_UNLINK(path) virtual_unlink(path TSRMLS_CC)
#define VCWD_MKDIR(pathname, mode) virtual_mkdir(pathname, mode TSRMLS_CC)
#define VCWD_RMDIR(pathname) virtual_rmdir(pathname TSRMLS_CC)
#define VCWD_OPENDIR(pathname) virtual_opendir(pathname TSRMLS_CC)
#define VCWD_POPEN(command, type) virtual_popen(command, type TSRMLS_CC)
#define VCWD_ACCESS(pathname, mode) virtual_access(pathname, mode TSRMLS_CC)
#if HAVE_UTIME
#define VCWD_UTIME(path, time) virtual_utime(path, time TSRMLS_CC)
#endif
#define VCWD_CHMOD(path, mode) virtual_chmod(path, mode TSRMLS_CC)
#if !defined(TSRM_WIN32) && !defined(NETWARE)
#define VCWD_CHOWN(path, owner, group) virtual_chown(path, owner, group TSRMLS_CC)
#endif
#else
#define VCWD_GETCWD(buff, size) getcwd(buff, size)
#define VCWD_FOPEN(path, mode) fopen(path, mode)
#define VCWD_OPEN(path, flags) open(path, flags)
#define VCWD_OPEN_MODE(path, flags, mode) open(path, flags, mode)
#define VCWD_CREAT(path, mode) creat(path, mode)
#define VCWD_RENAME(oldname, newname) rename(oldname, newname)
#define VCWD_CHDIR(path) chdir(path)
#define VCWD_CHDIR_FILE(path) virtual_chdir_file(path, chdir)
#define VCWD_GETWD(buf) getwd(buf)
#define VCWD_STAT(path, buff) stat(path, buff)
#define VCWD_LSTAT(path, buff) lstat(path, buff)
#define VCWD_UNLINK(path) unlink(path)
#define VCWD_MKDIR(pathname, mode) mkdir(pathname, mode)
#define VCWD_RMDIR(pathname) rmdir(pathname)
#define VCWD_OPENDIR(pathname) opendir(pathname)
#define VCWD_POPEN(command, type) popen(command, type)
#define VCWD_ACCESS(pathname, mode) access(pathname, mode)
#ifdef HAVE_REALPATH
#if defined(__osf__) || defined(_AIX)
#define VCWD_REALPATH(path, real_path) php_realpath_hack(path, real_path)
#else
#define VCWD_REALPATH(path, real_path) realpath(path, real_path)
#endif
#else
#define VCWD_REALPATH(path, real_path) strcpy(real_path, path)
#endif
#if HAVE_UTIME
#define VCWD_UTIME(path, time) utime(path, time)
#endif
#define VCWD_CHMOD(path, mode) chmod(path, mode)
#if !defined(TSRM_WIN32) && !defined(NETWARE)
#define VCWD_CHOWN(path, owner, group) chown(path, owner, group)
#endif
#endif
#endif /* VIRTUAL_CWD_H */
-371
View File
@@ -1,371 +0,0 @@
/*
+----------------------------------------------------------------------+
| PHP Version 4 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2003 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Daniel Beulshausen <daniel@php4win.de> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#include <stdio.h>
#include <fcntl.h>
#include <io.h>
#include <process.h>
#include <time.h>
#include "TSRM.h"
#ifdef TSRM_WIN32
#include "tsrm_win32.h"
#ifdef ZTS
static ts_rsrc_id win32_globals_id;
#else
static tsrm_win32_globals win32_globals;
#endif
static void tsrm_win32_ctor(tsrm_win32_globals *globals TSRMLS_DC)
{
globals->process = NULL;
globals->shm = NULL;
globals->process_size = 0;
globals->shm_size = 0;
globals->comspec = _strdup((GetVersion()<0x80000000)?"cmd.exe":"command.com");
}
static void tsrm_win32_dtor(tsrm_win32_globals *globals TSRMLS_DC)
{
shm_pair *ptr;
if (globals->process) {
free(globals->process);
}
if (globals->shm) {
for (ptr = globals->shm; ptr < (globals->shm + globals->shm_size); ptr++) {
UnmapViewOfFile(ptr->addr);
CloseHandle(ptr->segment);
UnmapViewOfFile(ptr->descriptor);
CloseHandle(ptr->info);
}
free(globals->shm);
}
free(globals->comspec);
}
TSRM_API void tsrm_win32_startup(void)
{
#ifdef ZTS
ts_allocate_id(&win32_globals_id, sizeof(tsrm_win32_globals), (ts_allocate_ctor)tsrm_win32_ctor, (ts_allocate_ctor)tsrm_win32_dtor);
#else
tsrm_win32_ctor(&win32_globals TSRMLS_CC);
#endif
}
TSRM_API void tsrm_win32_shutdown(void)
{
#ifndef ZTS
tsrm_win32_dtor(&win32_globals TSRMLS_CC);
#endif
}
static process_pair *process_get(FILE *stream TSRMLS_DC)
{
process_pair *ptr;
process_pair *newptr;
for (ptr = TWG(process); ptr < (TWG(process) + TWG(process_size)); ptr++) {
if (ptr->stream == stream) {
break;
}
}
if (ptr < (TWG(process) + TWG(process_size))) {
return ptr;
}
newptr = (process_pair*)realloc((void*)TWG(process), (TWG(process_size)+1)*sizeof(process_pair));
if (newptr == NULL) {
return NULL;
}
TWG(process) = newptr;
ptr = newptr + TWG(process_size);
TWG(process_size)++;
return ptr;
}
static shm_pair *shm_get(int key, void *addr)
{
shm_pair *ptr;
shm_pair *newptr;
TSRMLS_FETCH();
for (ptr = TWG(shm); ptr < (TWG(shm) + TWG(shm_size)); ptr++) {
if (!ptr->descriptor) {
continue;
}
if (!addr && ptr->descriptor->shm_perm.key == key) {
break;
} else if (ptr->addr == addr) {
break;
}
}
if (ptr < (TWG(shm) + TWG(shm_size))) {
return ptr;
}
newptr = (shm_pair*)realloc((void*)TWG(shm), (TWG(shm_size)+1)*sizeof(shm_pair));
if (newptr == NULL) {
return NULL;
}
TWG(shm) = newptr;
ptr = newptr + TWG(shm_size);
TWG(shm_size)++;
return ptr;
}
static HANDLE dupHandle(HANDLE fh, BOOL inherit) {
HANDLE copy, self = GetCurrentProcess();
if (!DuplicateHandle(self, fh, self, &copy, 0, inherit, DUPLICATE_SAME_ACCESS|DUPLICATE_CLOSE_SOURCE)) {
return NULL;
}
return copy;
}
TSRM_API FILE *popen(const char *command, const char *type)
{
return popen_ex(command, type, NULL, NULL);
}
TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, char *env)
{
FILE *stream = NULL;
int fno, str_len = strlen(type), read, mode;
STARTUPINFO startup;
PROCESS_INFORMATION process;
SECURITY_ATTRIBUTES security;
HANDLE in, out;
char *cmd;
process_pair *proc;
TSRMLS_FETCH();
security.nLength = sizeof(SECURITY_ATTRIBUTES);
security.bInheritHandle = TRUE;
security.lpSecurityDescriptor = NULL;
if (!str_len || !CreatePipe(&in, &out, &security, 2048L)) {
return NULL;
}
memset(&startup, 0, sizeof(STARTUPINFO));
memset(&process, 0, sizeof(PROCESS_INFORMATION));
startup.cb = sizeof(STARTUPINFO);
startup.dwFlags = STARTF_USESTDHANDLES;
startup.hStdError = GetStdHandle(STD_ERROR_HANDLE);
read = (type[0] == 'r') ? TRUE : FALSE;
mode = ((str_len == 2) && (type[1] == 'b')) ? O_BINARY : O_TEXT;
if (read) {
in = dupHandle(in, FALSE);
startup.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
startup.hStdOutput = out;
} else {
out = dupHandle(out, FALSE);
startup.hStdInput = in;
startup.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
}
cmd = (char*)malloc(strlen(command)+strlen(TWG(comspec))+sizeof(" /c "));
sprintf(cmd, "%s /c %s", TWG(comspec), command);
if (!CreateProcess(NULL, cmd, &security, &security, security.bInheritHandle, NORMAL_PRIORITY_CLASS, env, cwd, &startup, &process)) {
return NULL;
}
free(cmd);
CloseHandle(process.hThread);
proc = process_get(NULL TSRMLS_CC);
if (read) {
fno = _open_osfhandle((long)in, _O_RDONLY | mode);
CloseHandle(out);
} else {
fno = _open_osfhandle((long)out, _O_WRONLY | mode);
CloseHandle(in);
}
stream = _fdopen(fno, type);
proc->prochnd = process.hProcess;
proc->stream = stream;
return stream;
}
TSRM_API int pclose(FILE *stream)
{
DWORD termstat = 0;
process_pair *process;
TSRMLS_FETCH();
if ((process = process_get(stream TSRMLS_CC)) == NULL) {
return 0;
}
fflush(process->stream);
fclose(process->stream);
WaitForSingleObject(process->prochnd, INFINITE);
GetExitCodeProcess(process->prochnd, &termstat);
process->stream = NULL;
CloseHandle(process->prochnd);
return termstat;
}
TSRM_API int shmget(int key, int size, int flags)
{
shm_pair *shm;
char shm_segment[26], shm_info[29];
HANDLE shm_handle, info_handle;
BOOL created = FALSE;
if (size < 0) {
return -1;
}
sprintf(shm_segment, "TSRM_SHM_SEGMENT:%d", key);
sprintf(shm_info, "TSRM_SHM_DESCRIPTOR:%d", key);
shm_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_segment);
info_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_info);
if ((!shm_handle && !info_handle)) {
if (flags & IPC_EXCL) {
return -1;
}
if (flags & IPC_CREAT) {
shm_handle = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, size, shm_segment);
info_handle = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(shm->descriptor), shm_info);
created = TRUE;
}
if ((!shm_handle || !info_handle)) {
return -1;
}
}
shm = shm_get(key, NULL);
shm->segment = shm_handle;
shm->info = info_handle;
shm->descriptor = MapViewOfFileEx(shm->info, FILE_MAP_ALL_ACCESS, 0, 0, 0, NULL);
if (created) {
shm->descriptor->shm_perm.key = key;
shm->descriptor->shm_segsz = size;
shm->descriptor->shm_ctime = time(NULL);
shm->descriptor->shm_cpid = getpid();
shm->descriptor->shm_perm.mode = flags;
shm->descriptor->shm_perm.cuid = shm->descriptor->shm_perm.cgid= 0;
shm->descriptor->shm_perm.gid = shm->descriptor->shm_perm.uid = 0;
shm->descriptor->shm_atime = shm->descriptor->shm_dtime = 0;
shm->descriptor->shm_lpid = shm->descriptor->shm_nattch = 0;
shm->descriptor->shm_perm.mode = shm->descriptor->shm_perm.seq = 0;
}
if (shm->descriptor->shm_perm.key != key || size > shm->descriptor->shm_segsz ) {
CloseHandle(shm->segment);
UnmapViewOfFile(shm->descriptor);
CloseHandle(shm->info);
return -1;
}
return key;
}
TSRM_API void *shmat(int key, const void *shmaddr, int flags)
{
shm_pair *shm = shm_get(key, NULL);
if (!shm->segment) {
return (void*)-1;
}
shm->descriptor->shm_atime = time(NULL);
shm->descriptor->shm_lpid = getpid();
shm->descriptor->shm_nattch++;
shm->addr = MapViewOfFileEx(shm->segment, FILE_MAP_ALL_ACCESS, 0, 0, 0, NULL);
return shm->addr;
}
TSRM_API int shmdt(const void *shmaddr)
{
shm_pair *shm = shm_get(0, (void*)shmaddr);
if (!shm->segment) {
return -1;
}
shm->descriptor->shm_dtime = time(NULL);
shm->descriptor->shm_lpid = getpid();
shm->descriptor->shm_nattch--;
return UnmapViewOfFile(shm->addr) ? 0 : -1;
}
TSRM_API int shmctl(int key, int cmd, struct shmid_ds *buf) {
shm_pair *shm = shm_get(key, NULL);
if (!shm->segment) {
return -1;
}
switch (cmd) {
case IPC_STAT:
memcpy(buf, shm->descriptor, sizeof(struct shmid_ds));
return 0;
case IPC_SET:
shm->descriptor->shm_ctime = time(NULL);
shm->descriptor->shm_perm.uid = buf->shm_perm.uid;
shm->descriptor->shm_perm.gid = buf->shm_perm.gid;
shm->descriptor->shm_perm.mode = buf->shm_perm.mode;
return 0;
case IPC_RMID:
if (shm->descriptor->shm_nattch < 1) {
shm->descriptor->shm_perm.key = -1;
}
return 0;
default:
return -1;
}
}
TSRM_API char *realpath(char *orig_path, char *buffer)
{
int ret = GetFullPathName(orig_path, _MAX_PATH, buffer, NULL);
if(!ret || ret > _MAX_PATH) {
return NULL;
}
return buffer;
}
#endif
-105
View File
@@ -1,105 +0,0 @@
/*
+----------------------------------------------------------------------+
| PHP Version 4 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2003 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Daniel Beulshausen <daniel@php4win.de> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#ifndef TSRM_WIN32_H
#define TSRM_WIN32_H
#include "TSRM.h"
#include <windows.h>
struct ipc_perm {
int key;
unsigned short uid;
unsigned short gid;
unsigned short cuid;
unsigned short cgid;
unsigned short mode;
unsigned short seq;
};
struct shmid_ds {
struct ipc_perm shm_perm;
int shm_segsz;
time_t shm_atime;
time_t shm_dtime;
time_t shm_ctime;
unsigned short shm_cpid;
unsigned short shm_lpid;
short shm_nattch;
};
typedef struct {
FILE *stream;
HANDLE prochnd;
} process_pair;
typedef struct {
void *addr;
HANDLE info;
HANDLE segment;
struct shmid_ds *descriptor;
} shm_pair;
typedef struct {
process_pair *process;
shm_pair *shm;
int process_size;
int shm_size;
char *comspec;
} tsrm_win32_globals;
#ifdef ZTS
# define TWG(v) TSRMG(win32_globals_id, tsrm_win32_globals *, v)
#else
# define TWG(v) (win32_globals.v)
#endif
#define IPC_PRIVATE 0
#define IPC_CREAT 00001000
#define IPC_EXCL 00002000
#define IPC_NOWAIT 00004000
#define IPC_RMID 0
#define IPC_SET 1
#define IPC_STAT 2
#define IPC_INFO 3
#define SHM_R PAGE_READONLY
#define SHM_W PAGE_READWRITE
#define SHM_RDONLY FILE_MAP_READ
#define SHM_RND FILE_MAP_WRITE
#define SHM_REMAP FILE_MAP_COPY
TSRM_API void tsrm_win32_startup(void);
TSRM_API void tsrm_win32_shutdown(void);
TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, char *env);
TSRM_API FILE *popen(const char *command, const char *type);
TSRM_API int pclose(FILE *stream);
TSRM_API int shmget(int key, int size, int flags);
TSRM_API void *shmat(int key, const void *shmaddr, int flags);
TSRM_API int shmdt(const void *shmaddr);
TSRM_API int shmctl(int key, int cmd, struct shmid_ds *buf);
TSRM_API char *realpath(char *orig_path, char *buffer);
#endif
-1
View File
@@ -1 +0,0 @@
/* Leave this file alone */
-1989
View File
File diff suppressed because it is too large. Load diff
-73
View File
@@ -1,73 +0,0 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | 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. |
# +----------------------------------------------------------------------+
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id$
#
#
# Makefile to generate build tools
#
ZENDDIR = Zend
SUBDIRS = $(ZENDDIR) TSRM
STAMP = buildmk.stamp
ALWAYS = generated_lists
all: $(STAMP) $(ALWAYS)
@$(MAKE) AMFLAGS=$(AMFLAGS) -s -f build/build2.mk
generated_lists:
@echo makefile_am_files = $(ZENDDIR)/Makefile.am \
TSRM/Makefile.am > $@
@echo config_h_files = $(ZENDDIR)/acconfig.h TSRM/acconfig.h >> $@
@echo config_m4_files = $(ZENDDIR)/Zend.m4 TSRM/tsrm.m4 TSRM/threads.m4 \
$(ZENDDIR)/acinclude.m4 ext/*/config*.m4 sapi/*/config.m4 >> $@
$(STAMP): build/buildcheck.sh
@build/buildcheck.sh $(STAMP)
snapshot:
distname='$(DISTNAME)'; \
if test -z "$$distname"; then \
distname='php4-snapshot'; \
fi; \
myname=`basename \`pwd\`` ; \
cd .. && cp -rp $$myname $$distname; \
cd $$distname; \
rm -f $(SUBDIRS) 2>/dev/null || true; \
for i in $(SUBDIRS); do \
test -d $$i || (test -d ../$$i && cp -rp ../$$i $$i); \
done; \
find . -type l -exec rm {} \; ; \
$(MAKE) AMFLAGS=--copy -f build/build.mk; \
cd ..; \
tar cf $$distname.tar $$distname; \
rm -rf $$distname $$distname.tar.*; \
bzip2 -9 $$distname.tar; \
md5sum $$distname.tar.bz2; \
sync; sleep 2; \
md5sum $$distname.tar.bz2; \
bzip2 -t $$distname.tar.bz2
cvsclean-work:
@for i in `find . -name .cvsignore`; do \
(cd `dirname $$i` 2>/dev/null && rm -rf `cat .cvsignore | grep -v config.nice` *.o *.a .libs || true); \
done
.PHONY: $(ALWAYS) snapshot cvsclean
-60
View File
@@ -1,60 +0,0 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | 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. |
# +----------------------------------------------------------------------+
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id$
#
include generated_lists
TOUCH_FILES = mkinstalldirs install-sh missing
LT_TARGETS = ltmain.sh config.guess config.sub
makefile_in_files = $(makefile_am_files:.am=.in)
makefile_files = $(makefile_am_files:e.am=e)
config_h_in = main/php_config.h.in
acconfig_h_SOURCES = acconfig.h.in $(config_h_files)
targets = $(TOUCH_FILES) configure $(config_h_in)
SUPPRESS_WARNINGS ?= 2>&1 | (egrep -v '(AC_TRY_RUN called without default to allow cross compiling|AC_PROG_CXXCPP was called before AC_PROG_CXX|defined in acinclude.m4 but never used|AC_PROG_LEX invoked multiple times|AC_DECL_YYTEXT is expanded from...|the top level)'||true)
all: $(targets)
acconfig.h: $(acconfig_h_SOURCES)
@echo rebuilding $@
cat $(acconfig_h_SOURCES) > $@
$(config_h_in): configure acconfig.h
# explicitly remove target since autoheader does not seem to work
# correctly otherwise (timestamps are not updated)
@echo rebuilding $@
@rm -f $@
autoheader $(SUPPRESS_WARNINGS)
$(TOUCH_FILES):
touch $(TOUCH_FILES)
aclocal.m4: configure.in acinclude.m4
@echo rebuilding $@
cat acinclude.m4 ./build/libtool.m4 > $@
configure: aclocal.m4 configure.in $(config_m4_files)
@echo rebuilding $@
autoconf $(SUPPRESS_WARNINGS)
-52
View File
@@ -1,52 +0,0 @@
#! /bin/sh
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | 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 Bakken <ssb@php.net> |
# | Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id: buildcheck.sh,v 1.21.2.11 2005-01-20 01:43:18 sniper Exp $
#
echo "buildconf: checking installation..."
stamp=$1
# autoconf 2.13 or newer
ac_version=`autoconf --version 2>/dev/null|head -n 1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
if test -z "$ac_version"; then
echo "buildconf: autoconf not found."
echo " You need autoconf version 2.13 or newer installed"
echo " to build PHP from CVS."
exit 1
fi
IFS=.; set $ac_version; IFS=' '
if test "$1" = "2" -a "$2" -lt "13" || test "$1" -lt "2"; then
echo "buildconf: autoconf version $ac_version found."
echo " You need autoconf version 2.13 or newer installed"
echo " to build PHP from CVS."
exit 1
else
echo "buildconf: autoconf version $ac_version (ok)"
fi
if test "$1" = "2" && test "$2" -ge "50"; then
echo "buildconf: running cvsclean."
./cvsclean
stamp=
fi
test -n "$stamp" && touch $stamp
exit 0
-8
View File
@@ -1,8 +0,0 @@
#!/bin/sh
#
# $Id$
dir=$1; shift
for stubfile in $dir/*/config0.m4 $dir/*/config.m4 $dir/*/config9.m4; do
echo "sinclude($stubfile)"
done
-41
View File
@@ -1,41 +0,0 @@
#! /bin/sh
# $Id: genif.sh,v 1.3 2002-03-22 10:22:41 sas Exp $
# replacement for genif.pl
infile=$1
shift
srcdir=$1
shift
extra_module_ptrs=$1
shift
awk=$1
shift
if test -z "$infile" || test -z "$srcdir"; then
echo "please supply infile and srcdir"
exit 1
fi
module_ptrs=$extra_module_ptrs
header_list=
olddir=`pwd`
cd $srcdir
for ext in ${1+"$@"} ; do
module_ptrs=" phpext_${ext}_ptr,@NEWLINE@$module_ptrs"
header_list="$header_list ext/$ext/*.h"
done
includes=`$awk -f ./build/print_include.awk $header_list`
cd $olddir
cat $infile | \
sed \
-e "s'@EXT_INCLUDE_CODE@'$includes'" \
-e "s'@EXT_MODULE_PTRS@'$module_ptrs'" \
-e 's/@NEWLINE@/\
/g'
-3713
View File
File diff suppressed because it is too large. Load diff
-75
View File
@@ -1,75 +0,0 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 2000 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id$
#
# Usage:
#
# echo top_srcdir top_builddir srcdir CPP [CPP-ARGS] filenames | \
# awk -f mkdep.awk > dependencies
{
top_srcdir=$1
top_builddir=$2
srcdir=$3
cmd=$4
for (i = 5; i <= NF; i++) {
if (match($i, "^-[A-Z]") == 0)
break;
cmd=cmd " " $i
}
dif=i-1
for (; i <= NF; i++)
filenames[i-dif]=$i
no_files=NF-dif
for(i = 1; i <= no_files; i++) {
if (system("test -r " filenames[i]) != 0)
continue
target=filenames[i]
sub(srcdir "/", "", target)
target2=target
sub("\.(c|cpp)$", ".lo", target);
sub("\.(c|cpp)$", ".slo", target2);
for (e in used)
delete used[e]
cmdx=cmd " " filenames[i]
done=0
while ((cmdx | getline) > 0) {
if (match($0, "^# [0-9]* \".*\.h\"") != 0) {
if (sub(top_srcdir, "$(top_srcdir)", $3) == 0)
sub(top_builddir, "$(top_builddir)", $3)
if (substr($3,2,1) != "/" && used[$3] != 1) {
if (done == 0)
printf(target " " target2 ":")
done=1
printf(" \\\n\t" substr($3,2,length($3)-2))
used[$3] = 1;
}
}
}
if (done == 1)
print "\n"
}
}
-6
View File
@@ -1,6 +0,0 @@
/phpext_/ {
if (old_filename != FILENAME) {
printf "#include \"" FILENAME "\"@NEWLINE@"
old_filename = FILENAME
}
}
-32
View File
@@ -1,32 +0,0 @@
BEGIN {
mode=0
sources=""
}
mode == 0 && /^LTLIBRARY_SOURCES.*\\$/ {
if (match($0, "[^=]*$")) {
sources=substr($0, RSTART, RLENGTH-1)
}
mode=1
next
}
mode == 0 && /^LTLIBRARY_SOURCES.*/ {
if (match($0, "[^=]*$")) {
sources=substr($0, RSTART, RLENGTH)
}
}
mode == 1 && /.*\\$/ {
sources=sources substr($0, 0, length - 1)
next
}
mode == 1 {
sources=sources $0
mode=0
}
END {
print sources
}
-1046
View File
File diff suppressed because it is too large. Load diff
-73
View File
@@ -1,73 +0,0 @@
#!/bin/sh
# $Id$
eval `grep '^EXTRA_VERSION=' configure.in`
case "$EXTRA_VERSION" in
*-dev)
dev=1
;;
*)
dev=0
;;
esac
devok=0
debug=no
while test $# -gt 0; do
if test "$1" = "--copy"; then
automake_flags=--copy
fi
if test "$1" = "--force"; then
devok=1
echo "Forcing buildconf"
fi
if test "$1" = "--debug"; then
debug=yes
fi
shift
done
if test "$dev" = "0" -a "$devok" = "0"; then
echo "You should not run buildconf in a release package."
echo "use buildconf --force to override this check."
exit 1
fi
if test -z "$ZENDDIR"; then
if grep "PHP_MAJOR_VERSION 5" main/php_version.h >/dev/null; then
v=5
else
v=4
fi
if test "$v" = "5"; then
if test -r "Zend/OBJECTS2_HOWTO"; then
:
else
mv Zend ZendEngine1 2>/dev/null
mv ZendEngine2 Zend
fi
else
if test -r "Zend/zend_execute_globals.h"; then
:
else
mv Zend ZendEngine2 2>/dev/null
mv ZendEngine1 Zend
fi
fi
ZENDDIR=Zend
echo "using default Zend directory"
fi
rm -f generated_lists
if test "$debug" = "yes"; then
${MAKE:-make} -s -f build/build.mk AMFLAGS="$automake_flags" ZENDDIR="$ZENDDIR" SUPPRESS_WARNINGS=""
else
${MAKE:-make} -s -f build/build.mk AMFLAGS="$automake_flags" ZENDDIR="$ZENDDIR"
fi
-1409
View File
File diff suppressed because it is too large. Load diff
Vendored
-1469
View File
File diff suppressed because it is too large. Load diff
-1450
View File
File diff suppressed because it is too large. Load diff
-3
View File
@@ -1,3 +0,0 @@
#! /bin/sh
${MAKE:-make} -f build/build.mk cvsclean-work
-2
View File
@@ -1,2 +0,0 @@
BC Math
Andi Gutmans
-511
View File
@@ -1,511 +0,0 @@
/*
+----------------------------------------------------------------------+
| PHP Version 4 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2003 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Andi Gutmans <andi@zend.com> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "php.h"
#if WITH_BCMATH
#include "ext/standard/info.h"
#include "php_bcmath.h"
#include "libbcmath/src/bcmath.h"
ZEND_DECLARE_MODULE_GLOBALS(bcmath);
function_entry bcmath_functions[] = {
PHP_FE(bcadd, NULL)
PHP_FE(bcsub, NULL)
PHP_FE(bcmul, NULL)
PHP_FE(bcdiv, NULL)
PHP_FE(bcmod, NULL)
PHP_FE(bcpow, NULL)
PHP_FE(bcsqrt, NULL)
PHP_FE(bcscale, NULL)
PHP_FE(bccomp, NULL)
{NULL, NULL, NULL}
};
zend_module_entry bcmath_module_entry = {
STANDARD_MODULE_HEADER,
"bcmath",
bcmath_functions,
#if ZTS
PHP_MODULE_STARTUP_N(bcmath),
#else
NULL,
#endif
NULL,
PHP_RINIT(bcmath),
PHP_RSHUTDOWN(bcmath),
PHP_MINFO(bcmath),
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
#ifdef COMPILE_DL_BCMATH
ZEND_GET_MODULE(bcmath)
#endif
#ifndef THREAD_SAFE
static long bc_precision;
#endif
#if ZTS
PHP_MODULE_STARTUP_D(bcmath)
{
zend_bcmath_globals *bcmath_globals;
ts_allocate_id(&bcmath_globals_id, sizeof(zend_bcmath_globals), NULL, NULL);
bcmath_globals = ts_resource(bcmath_globals_id);
return SUCCESS;
}
#endif
PHP_RSHUTDOWN_FUNCTION(bcmath)
{
bc_free_num(&BCG(_zero_));
bc_free_num(&BCG(_one_));
bc_free_num(&BCG(_two_));
return SUCCESS;
}
PHP_RINIT_FUNCTION(bcmath)
{
if (cfg_get_long("bcmath.scale", &bc_precision)==FAILURE) {
bc_precision=0;
}
if(bc_precision<0) bc_precision=0;
bc_init_numbers(TSRMLS_C);
return SUCCESS;
}
PHP_MINFO_FUNCTION(bcmath)
{
php_info_print_table_start();
php_info_print_table_row(2, "BCMath support", "enabled");
php_info_print_table_end();
}
/* {{{ php_str2num
Convert to bc_num detecting scale */
static void php_str2num(bc_num *num, char *str TSRMLS_DC)
{
char *p;
if (!(p = strchr(str, '.'))) {
bc_str2num(num, str, 0 TSRMLS_CC);
return;
}
bc_str2num(num, str, strlen(p+1) TSRMLS_CC);
}
/* }}} */
/* {{{ proto string bcadd(string left_operand, string right_operand [, int scale])
Returns the sum of two arbitrary precision numbers */
PHP_FUNCTION(bcadd)
{
pval **left, **right, **scale_param;
bc_num first, second, result;
int scale=bc_precision;
switch (ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &left, &right) == FAILURE) {
WRONG_PARAM_COUNT;
}
break;
case 3:
if (zend_get_parameters_ex(3, &left, &right, &scale_param) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(scale_param);
scale = (int) (Z_LVAL_PP(scale_param)<0) ? 0:Z_LVAL_PP(scale_param);
break;
default:
WRONG_PARAM_COUNT;
break;
}
convert_to_string_ex(left);
convert_to_string_ex(right);
bc_init_num(&first TSRMLS_CC);
bc_init_num(&second TSRMLS_CC);
bc_init_num(&result TSRMLS_CC);
php_str2num(&first, Z_STRVAL_PP(left) TSRMLS_CC);
php_str2num(&second, Z_STRVAL_PP(right) TSRMLS_CC);
bc_add (first, second, &result, scale);
if (result->n_scale > scale)
result->n_scale = scale;
Z_STRVAL_P(return_value) = bc_num2str(result);
Z_STRLEN_P(return_value) = strlen(Z_STRVAL_P(return_value));
Z_TYPE_P(return_value) = IS_STRING;
bc_free_num(&first);
bc_free_num(&second);
bc_free_num(&result);
return;
}
/* }}} */
/* {{{ proto string bcsub(string left_operand, string right_operand [, int scale])
Returns the difference between two arbitrary precision numbers */
PHP_FUNCTION(bcsub)
{
pval **left, **right, **scale_param;
bc_num first, second, result;
int scale=bc_precision;
switch (ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &left, &right) == FAILURE) {
WRONG_PARAM_COUNT;
}
break;
case 3:
if (zend_get_parameters_ex(3, &left, &right, &scale_param) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(scale_param);
scale = (int) (Z_LVAL_PP(scale_param)<0) ? 0:Z_LVAL_PP(scale_param);
break;
default:
WRONG_PARAM_COUNT;
break;
}
convert_to_string_ex(left);
convert_to_string_ex(right);
bc_init_num(&first TSRMLS_CC);
bc_init_num(&second TSRMLS_CC);
bc_init_num(&result TSRMLS_CC);
php_str2num(&first, Z_STRVAL_PP(left) TSRMLS_CC);
php_str2num(&second, Z_STRVAL_PP(right) TSRMLS_CC);
bc_sub (first, second, &result, scale);
if (result->n_scale > scale)
result->n_scale = scale;
Z_STRVAL_P(return_value) = bc_num2str(result);
Z_STRLEN_P(return_value) = strlen(Z_STRVAL_P(return_value));
Z_TYPE_P(return_value) = IS_STRING;
bc_free_num(&first);
bc_free_num(&second);
bc_free_num(&result);
return;
}
/* }}} */
/* {{{ proto string bcmul(string left_operand, string right_operand [, int scale])
Returns the multiplication of two arbitrary precision numbers */
PHP_FUNCTION(bcmul)
{
pval **left, **right, **scale_param;
bc_num first, second, result;
int scale=bc_precision;
switch (ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &left, &right) == FAILURE) {
WRONG_PARAM_COUNT;
}
break;
case 3:
if (zend_get_parameters_ex(3, &left, &right, &scale_param) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(scale_param);
scale = (int) (Z_LVAL_PP(scale_param)<0) ? 0:Z_LVAL_PP(scale_param);
break;
default:
WRONG_PARAM_COUNT;
break;
}
convert_to_string_ex(left);
convert_to_string_ex(right);
bc_init_num(&first TSRMLS_CC);
bc_init_num(&second TSRMLS_CC);
bc_init_num(&result TSRMLS_CC);
php_str2num(&first, Z_STRVAL_PP(left) TSRMLS_CC);
php_str2num(&second, Z_STRVAL_PP(right) TSRMLS_CC);
bc_multiply (first, second, &result, scale TSRMLS_CC);
if (result->n_scale > scale)
result->n_scale = scale;
Z_STRVAL_P(return_value) = bc_num2str(result);
Z_STRLEN_P(return_value) = strlen(Z_STRVAL_P(return_value));
Z_TYPE_P(return_value) = IS_STRING;
bc_free_num(&first);
bc_free_num(&second);
bc_free_num(&result);
return;
}
/* }}} */
/* {{{ proto string bcdiv(string left_operand, string right_operand [, int scale])
Returns the quotient of two arbitrary precision numbers (division) */
PHP_FUNCTION(bcdiv)
{
pval **left, **right, **scale_param;
bc_num first, second, result;
int scale=bc_precision;
switch (ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &left, &right) == FAILURE) {
WRONG_PARAM_COUNT;
}
break;
case 3:
if (zend_get_parameters_ex(3, &left, &right, &scale_param) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(scale_param);
scale = (int) (Z_LVAL_PP(scale_param)<0) ? 0:Z_LVAL_PP(scale_param);
break;
default:
WRONG_PARAM_COUNT;
break;
}
convert_to_string_ex(left);
convert_to_string_ex(right);
bc_init_num(&first TSRMLS_CC);
bc_init_num(&second TSRMLS_CC);
bc_init_num(&result TSRMLS_CC);
php_str2num(&first, Z_STRVAL_PP(left) TSRMLS_CC);
php_str2num(&second, Z_STRVAL_PP(right) TSRMLS_CC);
switch (bc_divide (first, second, &result, scale TSRMLS_CC)) {
case 0: /* OK */
if (result->n_scale > scale)
result->n_scale = scale;
Z_STRVAL_P(return_value) = bc_num2str(result);
Z_STRLEN_P(return_value) = strlen(Z_STRVAL_P(return_value));
Z_TYPE_P(return_value) = IS_STRING;
break;
case -1: /* division by zero */
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Division by zero");
break;
}
bc_free_num(&first);
bc_free_num(&second);
bc_free_num(&result);
return;
}
/* }}} */
/* {{{ proto string bcmod(string left_operand, string right_operand)
Returns the modulus of the two arbitrary precision operands */
PHP_FUNCTION(bcmod)
{
pval **left, **right;
bc_num first, second, result;
switch (ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &left, &right) == FAILURE) {
WRONG_PARAM_COUNT;
}
break;
default:
WRONG_PARAM_COUNT;
break;
}
convert_to_string_ex(left);
convert_to_string_ex(right);
bc_init_num(&first TSRMLS_CC);
bc_init_num(&second TSRMLS_CC);
bc_init_num(&result TSRMLS_CC);
bc_str2num(&first, Z_STRVAL_PP(left), 0 TSRMLS_CC);
bc_str2num(&second, Z_STRVAL_PP(right), 0 TSRMLS_CC);
switch (bc_modulo(first, second, &result, 0 TSRMLS_CC)) {
case 0:
Z_STRVAL_P(return_value) = bc_num2str(result);
Z_STRLEN_P(return_value) = strlen(Z_STRVAL_P(return_value));
Z_TYPE_P(return_value) = IS_STRING;
break;
case -1:
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Division by zero");
break;
}
bc_free_num(&first);
bc_free_num(&second);
bc_free_num(&result);
return;
}
/* }}} */
/* {{{ proto string bcpow(string x, string y [, int scale])
Returns the value of an arbitrary precision number raised to the power of another */
PHP_FUNCTION(bcpow)
{
pval **left, **right, **scale_param;
bc_num first, second, result;
int scale=bc_precision;
switch (ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &left, &right) == FAILURE) {
WRONG_PARAM_COUNT;
}
break;
case 3:
if (zend_get_parameters_ex(3, &left, &right, &scale_param) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(scale_param);
scale = (int) (Z_LVAL_PP(scale_param)<0) ? 0:Z_LVAL_PP(scale_param);
break;
default:
WRONG_PARAM_COUNT;
break;
}
convert_to_string_ex(left);
convert_to_string_ex(right);
bc_init_num(&first TSRMLS_CC);
bc_init_num(&second TSRMLS_CC);
bc_init_num(&result TSRMLS_CC);
php_str2num(&first, Z_STRVAL_PP(left) TSRMLS_CC);
php_str2num(&second, Z_STRVAL_PP(right) TSRMLS_CC);
bc_raise (first, second, &result, scale TSRMLS_CC);
if (result->n_scale > scale)
result->n_scale = scale;
Z_STRVAL_P(return_value) = bc_num2str(result);
Z_STRLEN_P(return_value) = strlen(Z_STRVAL_P(return_value));
Z_TYPE_P(return_value) = IS_STRING;
bc_free_num(&first);
bc_free_num(&second);
bc_free_num(&result);
return;
}
/* }}} */
/* {{{ proto string bcsqrt(string operand [, int scale])
Returns the square root of an arbitray precision number */
PHP_FUNCTION(bcsqrt)
{
pval **left, **scale_param;
bc_num result;
int scale=bc_precision;
switch (ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &left)== FAILURE) {
WRONG_PARAM_COUNT;
}
break;
case 2:
if (zend_get_parameters_ex(2, &left, &scale_param) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(scale_param);
scale = (int) (Z_LVAL_PP(scale_param)<0) ? 0:Z_LVAL_PP(scale_param);
break;
default:
WRONG_PARAM_COUNT;
break;
}
convert_to_string_ex(left);
bc_init_num(&result TSRMLS_CC);
php_str2num(&result, Z_STRVAL_PP(left) TSRMLS_CC);
if (bc_sqrt (&result, scale TSRMLS_CC) != 0) {
if (result->n_scale > scale)
result->n_scale = scale;
Z_STRVAL_P(return_value) = bc_num2str(result);
Z_STRLEN_P(return_value) = strlen(Z_STRVAL_P(return_value));
Z_TYPE_P(return_value) = IS_STRING;
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Square root of negative number");
}
bc_free_num(&result);
return;
}
/* }}} */
/* {{{ proto int bccomp(string left_operand, string right_operand [, int scale])
Compares two arbitrary precision numbers */
PHP_FUNCTION(bccomp)
{
pval **left, **right, **scale_param;
bc_num first, second;
int scale=bc_precision;
switch (ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &left, &right) == FAILURE) {
WRONG_PARAM_COUNT;
}
break;
case 3:
if (zend_get_parameters_ex(3, &left, &right, &scale_param) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(scale_param);
scale = (int) (Z_LVAL_PP(scale_param)<0) ? 0:Z_LVAL_PP(scale_param);
break;
default:
WRONG_PARAM_COUNT;
break;
}
convert_to_string_ex(left);
convert_to_string_ex(right);
bc_init_num(&first TSRMLS_CC);
bc_init_num(&second TSRMLS_CC);
bc_str2num(&first, Z_STRVAL_PP(left), scale TSRMLS_CC);
bc_str2num(&second, Z_STRVAL_PP(right), scale TSRMLS_CC);
Z_LVAL_P(return_value) = bc_compare(first, second);
Z_TYPE_P(return_value) = IS_LONG;
bc_free_num(&first);
bc_free_num(&second);
return;
}
/* }}} */
/* {{{ proto bool bcscale(int scale)
Sets default scale parameter for all bc math functions */
PHP_FUNCTION(bcscale)
{
pval **new_scale;
if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &new_scale)==FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long_ex(new_scale);
bc_precision = (Z_LVAL_PP(new_scale)<0) ? 0 : Z_LVAL_PP(new_scale);
RETURN_TRUE;
}
/* }}} */
#endif
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
-17
View File
@@ -1,17 +0,0 @@
dnl
dnl $Id$
dnl
PHP_ARG_ENABLE(bcmath, whether to enable bc style precision math functions,
[ --enable-bcmath Enable bc style precision math functions.])
if test "$PHP_BCMATH" != "no"; then
AC_DEFINE(WITH_BCMATH, 1, [Whether you have bcmath])
PHP_NEW_EXTENSION(bcmath, bcmath.c \
libbcmath/src/add.c libbcmath/src/div.c libbcmath/src/init.c libbcmath/src/neg.c libbcmath/src/outofmem.c libbcmath/src/raisemod.c libbcmath/src/rt.c libbcmath/src/sub.c \
libbcmath/src/compare.c libbcmath/src/divmod.c libbcmath/src/int2num.c libbcmath/src/num2long.c libbcmath/src/output.c libbcmath/src/recmul.c \
libbcmath/src/sqrt.c libbcmath/src/zero.c libbcmath/src/debug.c libbcmath/src/doaddsub.c libbcmath/src/nearzero.c libbcmath/src/num2str.c libbcmath/src/raise.c \
libbcmath/src/rmzero.c libbcmath/src/str2num.c,
$ext_shared,,-I@ext_srcdir@/libbcmath/src)
PHP_ADD_BUILD_DIR($ext_builddir/libbcmath/src)
fi
-3
View File
@@ -1,3 +0,0 @@
Phil Nelson <philnelson@acm.org> wrote bcmath library.
-515
View File
@@ -1,515 +0,0 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations
below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
^L
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it
becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
^L
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control
compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
^L
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
^L
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
^L
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
^L
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply, and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License
may add an explicit geographical distribution limitation excluding those
countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
^L
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
^L
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms
of the ordinary General Public License).
To apply these terms, attach the following notices to the library.
It is safest to attach them to the start of each source file to most
effectively convey the exclusion of warranty; and each file should
have at least the "copyright" line and a pointer to where the full
notice is found.
<one line to give the library's name and a brief idea of what it
does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper
mail.
You should also get your employer (if you work as a programmer) or
your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James
Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
-10
View File
@@ -1,10 +0,0 @@
Wed Jun 7 09:39:02 2000 Phil Nelson <phil@cs.wwu.edu>
* configure.in and many others: version number now at 0.2.
Many other changes/additions for getting a distribution
to work.
2000-05-21 Phil Nelson <phil@cs.wwu.edu>
* Initial setup of bcmath library., calling it version 0.1.
-21
View File
@@ -1,21 +0,0 @@
BCMATH FAQ:
1) Why BCMATH?
The math routines of GNU bc become more generally useful in a
library form. By separating the BCMATH library from GNU bc,
GNU bc can be under the GPL and BCMATH can be under the LGPL.
2) Why BCMATH when GMP exists?
GMP has "integers" (no digits after a decimal), "rational numbers"
(stored as 2 integers) and "floats". None of these will correctly
represent a POSIX BC number. Floats are the closest, but will not
behave correctly for many computations. For example, BC numbers have
a "scale" that represent the number of digits to represent after the
decimal point. The multiplying two of these numbers requires one to
calculate an exact number of digits after the decimal point regardless
of the number of digits in the integer part. GMP floats have a
"fixed, but arbitrary" mantissa and so multiplying two floats will end
up dropping digits BC must calculate.
-9
View File
@@ -1,9 +0,0 @@
Currently, only libbcmath.a is built. To build and install it, do
configure
make
make install
Typical configure parameters are available. (e.g. PREFIX)
Bugs and comments to philnelson@acm.org.
-12
View File
@@ -1,12 +0,0 @@
## Process this file with automake to produce Makefile.in
SUBDIRS= src doc
MAINTAINERCLEANFILES = aclocal.m4 config.h.in configure Makefile.in \
stamp-h.in *~
dist-hook:
cp $(srcdir)/doc/bcmath.1 $(distdir)/doc
cp $(srcdir)/src/private.h $(distdir)/src
cp $(srcdir)/FAQ $(distdir)
-3
View File
@@ -1,3 +0,0 @@
NEWS for bcmath library:
May 2000: The library is created.
-9
View File
@@ -1,9 +0,0 @@
This is bcmath, a library of arbitrary precision math routines.
These routines, in a different form, are the routines that to
the arbitrary precision calculations for GNU bc and GNU dc.
This library is provided to make these routines useful in a
larger context with less restrictions on the use of them.
These routines do not duplicate functionality of the GNU gmp
library. gmp is similar, but the actual computation is different.
-9
View File
@@ -1,9 +0,0 @@
/* PACKAGE name */
#undef PACKAGE
/* Package VERSION number */
#undef VERSION
/* Define to `size_t' if <sys/types.h> and <stddef.h> don't define. */
#undef ptrdiff_t
-127
View File
@@ -1,127 +0,0 @@
dnl aclocal.m4 generated automatically by aclocal 1.4
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
dnl PARTICULAR PURPOSE.
# Do all the work for Automake. This macro actually does too much --
# some checks are only needed if your package does certain things.
# But this isn't really a big deal.
# serial 1
dnl Usage:
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_REQUIRE([AC_PROG_INSTALL])
PACKAGE=[$1]
AC_SUBST(PACKAGE)
VERSION=[$2]
AC_SUBST(VERSION)
dnl test to see if srcdir already configured
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
fi
ifelse([$3],,
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
AC_REQUIRE([AM_SANITY_CHECK])
AC_REQUIRE([AC_ARG_PROGRAM])
dnl FIXME This is truly gross.
missing_dir=`cd $ac_aux_dir && pwd`
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
AC_REQUIRE([AC_PROG_MAKE_SET])])
#
# Check to make sure that the build environment is sane.
#
AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane])
# Just in case
sleep 1
echo timestamp > conftestfile
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
if test "[$]*" = "X"; then
# -L didn't work.
set X `ls -t $srcdir/configure conftestfile`
fi
if test "[$]*" != "X $srcdir/configure conftestfile" \
&& test "[$]*" != "X conftestfile $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
alias in your environment])
fi
test "[$]2" = conftestfile
)
then
# Ok.
:
else
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
rm -f conftest*
AC_MSG_RESULT(yes)])
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
dnl The program must properly implement --version.
AC_DEFUN([AM_MISSING_PROG],
[AC_MSG_CHECKING(for working $2)
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
if ($2 --version) < /dev/null > /dev/null 2>&1; then
$1=$2
AC_MSG_RESULT(found)
else
$1="$3/missing $2"
AC_MSG_RESULT(missing)
fi
AC_SUBST($1)])
# Like AC_CONFIG_HEADER, but automatically create stamp file.
AC_DEFUN([AM_CONFIG_HEADER],
[AC_PREREQ([2.12])
AC_CONFIG_HEADER([$1])
dnl When config.status generates a header, we must update the stamp-h file.
dnl This file resides in the same directory as the config header
dnl that is generated. We must strip everything past the first ":",
dnl and everything past the last "/".
AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
<<am_indx=1
for am_file in <<$1>>; do
case " <<$>>CONFIG_HEADERS " in
*" <<$>>am_file "*<<)>>
echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
;;
esac
am_indx=`expr "<<$>>am_indx" + 1`
done<<>>dnl>>)
changequote([,]))])
-41
View File
@@ -1,41 +0,0 @@
/* config.h.in. Generated automatically from configure.in by autoheader. */
/* Define to empty if the keyword does not work. */
#undef const
/* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef size_t
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define to `size_t' if <sys/types.h> and <stddef.h> don't define. */
#undef ptrdiff_t
/* Define if you have the <lib.h> header file. */
#undef HAVE_LIB_H
/* Define if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
/* Define if you have the <stdarg.h> header file. */
#undef HAVE_STDARG_H
/* Define if you have the <stddef.h> header file. */
#undef HAVE_STDDEF_H
/* Define if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Name of package */
#undef PACKAGE
/* Version number of package */
#undef VERSION
-1859
View File
File diff suppressed because it is too large. Load diff
-18
View File
@@ -1,18 +0,0 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(doc/bcmath.1)
AM_INIT_AUTOMAKE("bcmath", "0.2")
AM_CONFIG_HEADER(config.h)
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_RANLIB
AC_PROG_MAKE_SET
AC_CHECK_HEADERS(stdarg.h stddef.h stdlib.h string.h limits.h unistd.h lib.h)
AC_C_CONST
AC_TYPE_SIZE_T
AC_CHECK_TYPE(ptrdiff_t, size_t)
AC_OUTPUT(Makefile src/Makefile doc/Makefile)
-238
View File
@@ -1,238 +0,0 @@
#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
#
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
tranformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "install: no input file specified"
exit 1
else
true
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d $dst ]; then
instcmd=:
else
instcmd=mkdir
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f $src -o -d $src ]
then
true
else
echo "install: $src does not exist"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
exit 1
else
true
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d $dst ]
then
dst="$dst"/`basename $src`
else
true
fi
fi
## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-${defaultIFS}}"
oIFS="${IFS}"
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS="${oIFS}"
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp="${pathcomp}${1}"
shift
if [ ! -d "${pathcomp}" ] ;
then
$mkdirprog "${pathcomp}"
else
true
fi
pathcomp="${pathcomp}/"
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd $dst &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
else
dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
else
true
fi
# Make a temp file name in the proper directory.
dsttmp=$dstdir/#inst.$$#
# Move or copy the file name to the temp name
$doit $instcmd $src $dsttmp &&
trap "rm -f ${dsttmp}" 0 &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
# Now rename the file to the real destination.
$doit $rmcmd -f $dstdir/$dstfile &&
$doit $mvcmd $dsttmp $dstdir/$dstfile
fi &&
exit 0
-134
View File
@@ -1,134 +0,0 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
case "$1" in
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
automake touch all \`Makefile.in' files
bison touch file \`y.tab.c'
makeinfo touch the output file
yacc touch file \`y.tab.c'"
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing - GNU libit 0.0"
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
aclocal)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. It should be needed only if
you modified \`acinclude.m4' or \`configure.in'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. It should be needed only if
you modified \`configure.in'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. It should be needed only if
you modified \`acconfig.h' or \`configure.in'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
touch config.h.in
;;
automake)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. It should be needed only if
you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print \
| sed 's/^\(.*\).am$/touch \1.in/' \
| sh
;;
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. It should be needed only if
your modified any \`.y' file. For being effective, your
modifications might require the \`Bison' package. Grab it from
any GNU archive site."
touch y.tab.c
;;
makeinfo)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. It should be needed only if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
fi
touch $file
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequirements for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
;;
esac
exit 0
-36
View File
@@ -1,36 +0,0 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Last modified: 1994-03-25
# Public domain
errstatus=0
for file in ${1+"$@"} ; do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d in ${1+"$@"} ; do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp" 1>&2
mkdir "$pathcomp" > /dev/null 2>&1 || lasterr=$?
fi
if test ! -d "$pathcomp"; then
errstatus=$lasterr
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# mkinstalldirs ends here
-22
View File
@@ -1,22 +0,0 @@
# Makefile for bcmath library
lib_LIBRARIES = libbcmath.a
include_HEADERS = bcmath.h
libbcmath_a_SOURCES= add.c compare.c debug.c div.c divmod.c doaddsub.c \
init.c int2num.c nearzero.c neg.c num2long.c num2str.c output.c \
raise.c raisemod.c recmul.c rmzero.c sqrt.c str2num.c sub.c zero.c \
outofmem.c rt.c
INCLUDES = -I$(srcdir) -I..
CFLAGS = @CFLAGS@
CPPFLAGS = $(INCLUDES) -Wall
MAINTAINERCLEANFILES= Makefile.in $(libbcmath_a_SOURCES) private.h bcmath.h
all: $(bin_LIBRARIES)
clean:
rm -f $(OBJS) $(LIB) *~
-88
View File
@@ -1,88 +0,0 @@
/* add.c: bcmath library file. */
/*
Copyright (C) 1991, 1992, 1993, 1994, 1997 Free Software Foundation, Inc.
Copyright (C) 2000 Philip A. Nelson
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details. (COPYING.LIB)
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to:
The Free Software Foundation, Inc.
59 Temple Place, Suite 330
Boston, MA 02111-1307 USA.
You may contact the author by:
e-mail: philnelson@acm.org
us-mail: Philip A. Nelson
Computer Science Department, 9062
Western Washington University
Bellingham, WA 98226-9062
*************************************************************************/
#include <config.h>
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdarg.h>
#include "bcmath.h"
#include "private.h"
/* Here is the full add routine that takes care of negative numbers.
N1 is added to N2 and the result placed into RESULT. SCALE_MIN
is the minimum scale for the result. */
void
bc_add (n1, n2, result, scale_min)
bc_num n1, n2, *result;
int scale_min;
{
bc_num sum = NULL;
int cmp_res;
int res_scale;
if (n1->n_sign == n2->n_sign)
{
sum = _bc_do_add (n1, n2, scale_min);
sum->n_sign = n1->n_sign;
}
else
{
/* subtraction must be done. */
cmp_res = _bc_do_compare (n1, n2, FALSE, FALSE); /* Compare magnitudes. */
switch (cmp_res)
{
case -1:
/* n1 is less than n2, subtract n1 from n2. */
sum = _bc_do_sub (n2, n1, scale_min);
sum->n_sign = n2->n_sign;
break;
case 0:
/* They are equal! return zero with the correct scale! */
res_scale = MAX (scale_min, MAX(n1->n_scale, n2->n_scale));
sum = bc_new_num (1, res_scale);
memset (sum->n_value, 0, res_scale+1);
break;
case 1:
/* n2 is less than n1, subtract n2 from n1. */
sum = _bc_do_sub (n1, n2, scale_min);
sum->n_sign = n1->n_sign;
}
}
/* Clean up and return. */
bc_free_num (result);
*result = sum;
}
-158
View File
@@ -1,158 +0,0 @@
/* bcmath.h: bcmath library header. */
/*
Copyright (C) 1991, 1992, 1993, 1994, 1997 Free Software Foundation, Inc.
Copyright (C) 2000 Philip A. Nelson
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details. (COPYING.LIB)
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to:
The Free Software Foundation, Inc.
59 Temple Place, Suite 330
Boston, MA 02111-1307 USA.
You may contact the author by:
e-mail: philnelson@acm.org
us-mail: Philip A. Nelson
Computer Science Department, 9062
Western Washington University
Bellingham, WA 98226-9062
*************************************************************************/
#ifndef _BCMATH_H_
#define _BCMATH_H_
typedef enum {PLUS, MINUS} sign;
typedef struct bc_struct *bc_num;
typedef struct bc_struct
{
sign n_sign;
int n_len; /* The number of digits before the decimal point. */
int n_scale; /* The number of digits after the decimal point. */
int n_refs; /* The number of pointers to this number. */
bc_num n_next; /* Linked list for available list. */
char *n_ptr; /* The pointer to the actual storage.
If NULL, n_value points to the inside of
another number (bc_multiply...) and should
not be "freed." */
char *n_value; /* The number. Not zero char terminated.
May not point to the same place as n_ptr as
in the case of leading zeros generated. */
} bc_struct;
#ifdef HAVE_CONFIG_H
#include "../../config.h"
#endif
#include "php.h"
#include "../../php_bcmath.h"
/* The base used in storing the numbers in n_value above.
Currently this MUST be 10. */
#define BASE 10
/* Some useful macros and constants. */
#define CH_VAL(c) (c - '0')
#define BCD_CHAR(d) (d + '0')
#ifdef MIN
#undef MIN
#undef MAX
#endif
#define MAX(a, b) ((a)>(b)?(a):(b))
#define MIN(a, b) ((a)>(b)?(b):(a))
#define ODD(a) ((a)&1)
#ifndef TRUE
#define TRUE 1
#define FALSE 0
#endif
#ifndef LONG_MAX
#define LONG_MAX 0x7ffffff
#endif
/* Function Prototypes */
/* Define the _PROTOTYPE macro if it is needed. */
#ifndef _PROTOTYPE
#ifdef __STDC__
#define _PROTOTYPE(func, args) func args
#else
#define _PROTOTYPE(func, args) func()
#endif
#endif
_PROTOTYPE(void bc_init_numbers, (TSRMLS_D));
_PROTOTYPE(bc_num bc_new_num, (int length, int scale));
_PROTOTYPE(void bc_free_num, (bc_num *num));
_PROTOTYPE(bc_num bc_copy_num, (bc_num num));
_PROTOTYPE(void bc_init_num, (bc_num *num TSRMLS_DC));
_PROTOTYPE(void bc_str2num, (bc_num *num, char *str, int scale TSRMLS_DC));
_PROTOTYPE(char *bc_num2str, (bc_num num));
_PROTOTYPE(void bc_int2num, (bc_num *num, int val));
_PROTOTYPE(long bc_num2long, (bc_num num));
_PROTOTYPE(int bc_compare, (bc_num n1, bc_num n2));
_PROTOTYPE(char bc_is_zero, (bc_num num TSRMLS_DC));
_PROTOTYPE(char bc_is_near_zero, (bc_num num, int scale));
_PROTOTYPE(char bc_is_neg, (bc_num num));
_PROTOTYPE(void bc_add, (bc_num n1, bc_num n2, bc_num *result, int scale_min));
_PROTOTYPE(void bc_sub, (bc_num n1, bc_num n2, bc_num *result, int scale_min));
_PROTOTYPE(void bc_multiply, (bc_num n1, bc_num n2, bc_num *prod, int scale TSRMLS_DC));
_PROTOTYPE(int bc_divide, (bc_num n1, bc_num n2, bc_num *quot, int scale TSRMLS_DC));
_PROTOTYPE(int bc_modulo, (bc_num num1, bc_num num2, bc_num *result,
int scale TSRMLS_DC));
_PROTOTYPE(int bc_divmod, (bc_num num1, bc_num num2, bc_num *quot,
bc_num *rem, int scale TSRMLS_DC));
_PROTOTYPE(int bc_raisemod, (bc_num base, bc_num expo, bc_num mod,
bc_num *result, int scale TSRMLS_DC));
_PROTOTYPE(void bc_raise, (bc_num num1, bc_num num2, bc_num *result,
int scale TSRMLS_DC));
_PROTOTYPE(int bc_sqrt, (bc_num *num, int scale TSRMLS_DC));
_PROTOTYPE(void bc_out_num, (bc_num num, int o_base, void (* out_char)(int),
int leading_zero TSRMLS_DC));
/* Prototypes needed for external utility routines. */
_PROTOTYPE(void bc_rt_warn, (char *mesg ,...));
_PROTOTYPE(void bc_rt_error, (char *mesg ,...));
_PROTOTYPE(void bc_out_of_memory, (void));
#endif
-161
View File
@@ -1,161 +0,0 @@
/* compare.c: bcmath library file. */
/*
Copyright (C) 1991, 1992, 1993, 1994, 1997 Free Software Foundation, Inc.
Copyright (C) 2000 Philip A. Nelson
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details. (COPYING.LIB)
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to:
The Free Software Foundation, Inc.
59 Temple Place, Suite 330
Boston, MA 02111-1307 USA.
You may contact the author by:
e-mail: philnelson@acm.org
us-mail: Philip A. Nelson
Computer Science Department, 9062
Western Washington University
Bellingham, WA 98226-9062
*************************************************************************/
#include <config.h>
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdarg.h>
#include "bcmath.h"
#include "private.h"
/* Compare two bc numbers. Return value is 0 if equal, -1 if N1 is less
than N2 and +1 if N1 is greater than N2. If USE_SIGN is false, just
compare the magnitudes. */
int
_bc_do_compare (n1, n2, use_sign, ignore_last)
bc_num n1, n2;
int use_sign;
int ignore_last;
{
char *n1ptr, *n2ptr;
int count;
/* First, compare signs. */
if (use_sign && n1->n_sign != n2->n_sign)
{
if (n1->n_sign == PLUS)
return (1); /* Positive N1 > Negative N2 */
else
return (-1); /* Negative N1 < Positive N1 */
}
/* Now compare the magnitude. */
if (n1->n_len != n2->n_len)
{
if (n1->n_len > n2->n_len)
{
/* Magnitude of n1 > n2. */
if (!use_sign || n1->n_sign == PLUS)
return (1);
else
return (-1);
}
else
{
/* Magnitude of n1 < n2. */
if (!use_sign || n1->n_sign == PLUS)
return (-1);
else
return (1);
}
}
/* If we get here, they have the same number of integer digits.
check the integer part and the equal length part of the fraction. */
count = n1->n_len + MIN (n1->n_scale, n2->n_scale);
n1ptr = n1->n_value;
n2ptr = n2->n_value;
while ((count > 0) && (*n1ptr == *n2ptr))
{
n1ptr++;
n2ptr++;
count--;
}
if (ignore_last && count == 1 && n1->n_scale == n2->n_scale)
return (0);
if (count != 0)
{
if (*n1ptr > *n2ptr)
{
/* Magnitude of n1 > n2. */
if (!use_sign || n1->n_sign == PLUS)
return (1);
else
return (-1);
}
else
{
/* Magnitude of n1 < n2. */
if (!use_sign || n1->n_sign == PLUS)
return (-1);
else
return (1);
}
}
/* They are equal up to the last part of the equal part of the fraction. */
if (n1->n_scale != n2->n_scale)
{
if (n1->n_scale > n2->n_scale)
{
for (count = n1->n_scale-n2->n_scale; count>0; count--)
if (*n1ptr++ != 0)
{
/* Magnitude of n1 > n2. */
if (!use_sign || n1->n_sign == PLUS)
return (1);
else
return (-1);
}
}
else
{
for (count = n2->n_scale-n1->n_scale; count>0; count--)
if (*n2ptr++ != 0)
{
/* Magnitude of n1 < n2. */
if (!use_sign || n1->n_sign == PLUS)
return (-1);
else
return (1);
}
}
}
/* They must be equal! */
return (0);
}
/* This is the "user callable" routine to compare numbers N1 and N2. */
int
bc_compare (n1, n2)
bc_num n1, n2;
{
return _bc_do_compare (n1, n2, TRUE, FALSE);
}
-11
View File
@@ -1,11 +0,0 @@
#if PHP_WIN32
#include "../../../../main/config.w32.h"
#elif defined(NETWARE)
#include "config.nw.h"
#else
#include <php_config.h>
#endif
#include <string.h>
#include "zend.h"
#include "zend_alloc.h"
-69
View File
@@ -1,69 +0,0 @@
/* debug.c: bcmath library file. */
/*
Copyright (C) 1991, 1992, 1993, 1994, 1997 Free Software Foundation, Inc.
Copyright (C) 2000 Philip A. Nelson
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details. (COPYING.LIB)
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to:
The Free Software Foundation, Inc.
59 Temple Place, Suite 330
Boston, MA 02111-1307 USA.
You may contact the author by:
e-mail: philnelson@acm.org
us-mail: Philip A. Nelson
Computer Science Department, 9062
Western Washington University
Bellingham, WA 98226-9062
*************************************************************************/
#include <config.h>
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdarg.h>
#include "bcmath.h"
#include "private.h"
/* pn prints the number NUM in base 10. */
static void
out_char (int c)
{
putchar(c);
}
void
pn (bc_num num TSRMLS_DC)
{
bc_out_num (num, 10, out_char, 0 TSRMLS_CC);
out_char ('\n');
}
/* pv prints a character array as if it was a string of bcd digits. */
void
pv (name, num, len)
char *name;
unsigned char *num;
int len;
{
int i;
printf ("%s=", name);
for (i=0; i<len; i++) printf ("%c",BCD_CHAR(num[i]));
printf ("\n");
}
-274
View File
@@ -1,274 +0,0 @@
/* div.c: bcmath library file. */
/*
Copyright (C) 1991, 1992, 1993, 1994, 1997 Free Software Foundation, Inc.
Copyright (C) 2000 Philip A. Nelson
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details. (COPYING.LIB)
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to:
The Free Software Foundation, Inc.
59 Temple Place, Suite 330
Boston, MA 02111-1307 USA.
You may contact the author by:
e-mail: philnelson@acm.org
us-mail: Philip A. Nelson
Computer Science Department, 9062
Western Washington University
Bellingham, WA 98226-9062
*************************************************************************/
#include <config.h>
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdarg.h>
#include "bcmath.h"
#include "private.h"
/* Some utility routines for the divide: First a one digit multiply.
NUM (with SIZE digits) is multiplied by DIGIT and the result is
placed into RESULT. It is written so that NUM and RESULT can be
the same pointers. */
static void
_one_mult (num, size, digit, result)
unsigned char *num;
int size, digit;
unsigned char *result;
{
int carry, value;
unsigned char *nptr, *rptr;
if (digit == 0)
memset (result, 0, size);
else
{
if (digit == 1)
memcpy (result, num, size);
else
{
/* Initialize */
nptr = (unsigned char *) (num+size-1);
rptr = (unsigned char *) (result+size-1);
carry = 0;
while (size-- > 0)
{
value = *nptr-- * digit + carry;
*rptr-- = value % BASE;
carry = value / BASE;
}
if (carry != 0) *rptr = carry;
}
}
}
/* The full division routine. This computes N1 / N2. It returns
0 if the division is ok and the result is in QUOT. The number of
digits after the decimal point is SCALE. It returns -1 if division
by zero is tried. The algorithm is found in Knuth Vol 2. p237. */
int
bc_divide (bc_num n1, bc_num n2, bc_num *quot, int scale TSRMLS_DC)
{
bc_num qval;
unsigned char *num1, *num2;
unsigned char *ptr1, *ptr2, *n2ptr, *qptr;
int scale1, val;
unsigned int len1, len2, scale2, qdigits, extra, count;
unsigned int qdig, qguess, borrow, carry;
unsigned char *mval;
char zero;
unsigned int norm;
/* Test for divide by zero. */
if (bc_is_zero (n2 TSRMLS_CC)) return -1;
/* Test for divide by 1. If it is we must truncate. */
if (n2->n_scale == 0)
{
if (n2->n_len == 1 && *n2->n_value == 1)
{
qval = bc_new_num (n1->n_len, scale);
qval->n_sign = (n1->n_sign == n2->n_sign ? PLUS : MINUS);
memset (&qval->n_value[n1->n_len],0,scale);
memcpy (qval->n_value, n1->n_value,
n1->n_len + MIN(n1->n_scale,scale));
bc_free_num (quot);
*quot = qval;
}
}
/* Set up the divide. Move the decimal point on n1 by n2's scale.
Remember, zeros on the end of num2 are wasted effort for dividing. */
scale2 = n2->n_scale;
n2ptr = (unsigned char *) n2->n_value+n2->n_len+scale2-1;
while ((scale2 > 0) && (*n2ptr-- == 0)) scale2--;
len1 = n1->n_len + scale2;
scale1 = n1->n_scale - scale2;
if (scale1 < scale)
extra = scale - scale1;
else
extra = 0;
num1 = (unsigned char *) emalloc (n1->n_len+n1->n_scale+extra+2);
if (num1 == NULL) bc_out_of_memory();
memset (num1, 0, n1->n_len+n1->n_scale+extra+2);
memcpy (num1+1, n1->n_value, n1->n_len+n1->n_scale);
len2 = n2->n_len + scale2;
num2 = (unsigned char *) emalloc (len2+1);
if (num2 == NULL) bc_out_of_memory();
memcpy (num2, n2->n_value, len2);
*(num2+len2) = 0;
n2ptr = num2;
while (*n2ptr == 0)
{
n2ptr++;
len2--;
}
/* Calculate the number of quotient digits. */
if (len2 > len1+scale)
{
qdigits = scale+1;
zero = TRUE;
}
else
{
zero = FALSE;
if (len2>len1)
qdigits = scale+1; /* One for the zero integer part. */
else
qdigits = len1-len2+scale+1;
}
/* Allocate and zero the storage for the quotient. */
qval = bc_new_num (qdigits-scale,scale);
memset (qval->n_value, 0, qdigits);
/* Allocate storage for the temporary storage mval. */
mval = (unsigned char *) emalloc (len2+1);
if (mval == NULL) bc_out_of_memory ();
/* Now for the full divide algorithm. */
if (!zero)
{
/* Normalize */
norm = 10 / ((int)*n2ptr + 1);
if (norm != 1)
{
_one_mult (num1, len1+scale1+extra+1, norm, num1);
_one_mult (n2ptr, len2, norm, n2ptr);
}
/* Initialize divide loop. */
qdig = 0;
if (len2 > len1)
qptr = (unsigned char *) qval->n_value+len2-len1;
else
qptr = (unsigned char *) qval->n_value;
/* Loop */
while (qdig <= len1+scale-len2)
{
/* Calculate the quotient digit guess. */
if (*n2ptr == num1[qdig])
qguess = 9;
else
qguess = (num1[qdig]*10 + num1[qdig+1]) / *n2ptr;
/* Test qguess. */
if (n2ptr[1]*qguess >
(num1[qdig]*10 + num1[qdig+1] - *n2ptr*qguess)*10
+ num1[qdig+2])
{
qguess--;
/* And again. */
if (n2ptr[1]*qguess >
(num1[qdig]*10 + num1[qdig+1] - *n2ptr*qguess)*10
+ num1[qdig+2])
qguess--;
}
/* Multiply and subtract. */
borrow = 0;
if (qguess != 0)
{
*mval = 0;
_one_mult (n2ptr, len2, qguess, mval+1);
ptr1 = (unsigned char *) num1+qdig+len2;
ptr2 = (unsigned char *) mval+len2;
for (count = 0; count < len2+1; count++)
{
val = (int) *ptr1 - (int) *ptr2-- - borrow;
if (val < 0)
{
val += 10;
borrow = 1;
}
else
borrow = 0;
*ptr1-- = val;
}
}
/* Test for negative result. */
if (borrow == 1)
{
qguess--;
ptr1 = (unsigned char *) num1+qdig+len2;
ptr2 = (unsigned char *) n2ptr+len2-1;
carry = 0;
for (count = 0; count < len2; count++)
{
val = (int) *ptr1 + (int) *ptr2-- + carry;
if (val > 9)
{
val -= 10;
carry = 1;
}
else
carry = 0;
*ptr1-- = val;
}
if (carry == 1) *ptr1 = (*ptr1 + 1) % 10;
}
/* We now know the quotient digit. */
*qptr++ = qguess;
qdig++;
}
}
/* Clean up and return the number. */
qval->n_sign = ( n1->n_sign == n2->n_sign ? PLUS : MINUS );
if (bc_is_zero (qval TSRMLS_CC)) qval->n_sign = PLUS;
_bc_rm_leading_zeros (qval);
bc_free_num (quot);
*quot = qval;
/* Clean up temporary storage. */
efree (mval);
efree (num1);
efree (num2);
return 0; /* Everything is OK. */
}
-87
View File
@@ -1,87 +0,0 @@
/* divmod.c: bcmath library file. */
/*
Copyright (C) 1991, 1992, 1993, 1994, 1997 Free Software Foundation, Inc.
Copyright (C) 2000 Philip A. Nelson
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details. (COPYING.LIB)
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to:
The Free Software Foundation, Inc.
59 Temple Place, Suite 330
Boston, MA 02111-1307 USA.
You may contact the author by:
e-mail: philnelson@acm.org
us-mail: Philip A. Nelson
Computer Science Department, 9062
Western Washington University
Bellingham, WA 98226-9062
*************************************************************************/
#include <config.h>
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdarg.h>
#include "bcmath.h"
#include "private.h"
/* Division *and* modulo for numbers. This computes both NUM1 / NUM2 and
NUM1 % NUM2 and puts the results in QUOT and REM, except that if QUOT
is NULL then that store will be omitted.
*/
int
bc_divmod (bc_num num1, bc_num num2, bc_num *quot, bc_num *rem, int scale TSRMLS_DC)
{
bc_num quotient = NULL;
bc_num temp;
int rscale;
/* Check for correct numbers. */
if (bc_is_zero (num2 TSRMLS_CC)) return -1;
/* Calculate final scale. */
rscale = MAX (num1->n_scale, num2->n_scale+scale);
bc_init_num(&temp TSRMLS_CC);
/* Calculate it. */
bc_divide (num1, num2, &temp, scale TSRMLS_CC);
if (quot)
quotient = bc_copy_num (temp);
bc_multiply (temp, num2, &temp, rscale TSRMLS_CC);
bc_sub (num1, temp, rem, rscale);
bc_free_num (&temp);
if (quot)
{
bc_free_num (quot);
*quot = quotient;
}
return 0; /* Everything is OK. */
}
/* Modulo for numbers. This computes NUM1 % NUM2 and puts the
result in RESULT. */
int
bc_modulo (bc_num num1, bc_num num2, bc_num *result, int scale TSRMLS_DC)
{
return bc_divmod (num1, num2, NULL, result, scale TSRMLS_CC);
}
-232
View File
@@ -1,232 +0,0 @@
/* doaddsub.c: bcmath library file. */
/*
Copyright (C) 1991, 1992, 1993, 1994, 1997 Free Software Foundation, Inc.
Copyright (C) 2000 Philip A. Nelson
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details. (COPYING.LIB)
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to:
The Free Software Foundation, Inc.
59 Temple Place, Suite 330
Boston, MA 02111-1307 USA.
You may contact the author by:
e-mail: philnelson@acm.org
us-mail: Philip A. Nelson
Computer Science Department, 9062
Western Washington University
Bellingham, WA 98226-9062
*************************************************************************/
#include <config.h>
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdarg.h>
#include "bcmath.h"
#include "private.h"
/* Perform addition: N1 is added to N2 and the value is
returned. The signs of N1 and N2 are ignored.
SCALE_MIN is to set the minimum scale of the result. */
bc_num
_bc_do_add (n1, n2, scale_min)
bc_num n1, n2;
int scale_min;
{
bc_num sum;
int sum_scale, sum_digits;
char *n1ptr, *n2ptr, *sumptr;
int carry, n1bytes, n2bytes;
int count;
/* Prepare sum. */
sum_scale = MAX (n1->n_scale, n2->n_scale);
sum_digits = MAX (n1->n_len, n2->n_len) + 1;
sum = bc_new_num (sum_digits, MAX(sum_scale, scale_min));
/* Zero extra digits made by scale_min. */
if (scale_min > sum_scale)
{
sumptr = (char *) (sum->n_value + sum_scale + sum_digits);
for (count = scale_min - sum_scale; count > 0; count--)
*sumptr++ = 0;
}
/* Start with the fraction part. Initialize the pointers. */
n1bytes = n1->n_scale;
n2bytes = n2->n_scale;
n1ptr = (char *) (n1->n_value + n1->n_len + n1bytes - 1);
n2ptr = (char *) (n2->n_value + n2->n_len + n2bytes - 1);
sumptr = (char *) (sum->n_value + sum_scale + sum_digits - 1);
/* Add the fraction part. First copy the longer fraction.*/
if (n1bytes != n2bytes)
{
if (n1bytes > n2bytes)
while (n1bytes>n2bytes)
{ *sumptr-- = *n1ptr--; n1bytes--;}
else
while (n2bytes>n1bytes)
{ *sumptr-- = *n2ptr--; n2bytes--;}
}
/* Now add the remaining fraction part and equal size integer parts. */
n1bytes += n1->n_len;
n2bytes += n2->n_len;
carry = 0;
while ((n1bytes > 0) && (n2bytes > 0))
{
*sumptr = *n1ptr-- + *n2ptr-- + carry;
if (*sumptr > (BASE-1))
{
carry = 1;
*sumptr -= BASE;
}
else
carry = 0;
sumptr--;
n1bytes--;
n2bytes--;
}
/* Now add carry the longer integer part. */
if (n1bytes == 0)
{ n1bytes = n2bytes; n1ptr = n2ptr; }
while (n1bytes-- > 0)
{
*sumptr = *n1ptr-- + carry;
if (*sumptr > (BASE-1))
{
carry = 1;
*sumptr -= BASE;
}
else
carry = 0;
sumptr--;
}
/* Set final carry. */
if (carry == 1)
*sumptr += 1;
/* Adjust sum and return. */
_bc_rm_leading_zeros (sum);
return sum;
}
/* Perform subtraction: N2 is subtracted from N1 and the value is
returned. The signs of N1 and N2 are ignored. Also, N1 is
assumed to be larger than N2. SCALE_MIN is the minimum scale
of the result. */
bc_num
_bc_do_sub (n1, n2, scale_min)
bc_num n1, n2;
int scale_min;
{
bc_num diff;
int diff_scale, diff_len;
int min_scale, min_len;
char *n1ptr, *n2ptr, *diffptr;
int borrow, count, val;
/* Allocate temporary storage. */
diff_len = MAX (n1->n_len, n2->n_len);
diff_scale = MAX (n1->n_scale, n2->n_scale);
min_len = MIN (n1->n_len, n2->n_len);
min_scale = MIN (n1->n_scale, n2->n_scale);
diff = bc_new_num (diff_len, MAX(diff_scale, scale_min));
/* Zero extra digits made by scale_min. */
if (scale_min > diff_scale)
{
diffptr = (char *) (diff->n_value + diff_len + diff_scale);
for (count = scale_min - diff_scale; count > 0; count--)
*diffptr++ = 0;
}
/* Initialize the subtract. */
n1ptr = (char *) (n1->n_value + n1->n_len + n1->n_scale -1);
n2ptr = (char *) (n2->n_value + n2->n_len + n2->n_scale -1);
diffptr = (char *) (diff->n_value + diff_len + diff_scale -1);
/* Subtract the numbers. */
borrow = 0;
/* Take care of the longer scaled number. */
if (n1->n_scale != min_scale)
{
/* n1 has the longer scale */
for (count = n1->n_scale - min_scale; count > 0; count--)
*diffptr-- = *n1ptr--;
}
else
{
/* n2 has the longer scale */
for (count = n2->n_scale - min_scale; count > 0; count--)
{
val = - *n2ptr-- - borrow;
if (val < 0)
{
val += BASE;
borrow = 1;
}
else
borrow = 0;
*diffptr-- = val;
}
}
/* Now do the equal length scale and integer parts. */
for (count = 0; count < min_len + min_scale; count++)
{
val = *n1ptr-- - *n2ptr-- - borrow;
if (val < 0)
{
val += BASE;
borrow = 1;
}
else
borrow = 0;
*diffptr-- = val;
}
/* If n1 has more digits then n2, we now do that subtract. */
if (diff_len != min_len)
{
for (count = diff_len - min_len; count > 0; count--)
{
val = *n1ptr-- - borrow;
if (val < 0)
{
val += BASE;
borrow = 1;
}
else
borrow = 0;
*diffptr-- = val;
}
}
/* Clean up and return. */
_bc_rm_leading_zeros (diff);
return diff;
}
-130
View File
@@ -1,130 +0,0 @@
/* init.c: bcmath library file. */
/*
Copyright (C) 1991, 1992, 1993, 1994, 1997 Free Software Foundation, Inc.
Copyright (C) 2000 Philip A. Nelson
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details. (COPYING.LIB)
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to:
The Free Software Foundation, Inc.
59 Temple Place, Suite 330
Boston, MA 02111-1307 USA.
You may contact the author by:
e-mail: philnelson@acm.org
us-mail: Philip A. Nelson
Computer Science Department, 9062
Western Washington University
Bellingham, WA 98226-9062
*************************************************************************/
#include <config.h>
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdarg.h>
#include "bcmath.h"
#include "private.h"
#ifdef SANDER_0
bc_num _bc_Free_list = NULL;
#endif
/* new_num allocates a number and sets fields to known values. */
bc_num
bc_new_num (length, scale)
int length, scale;
{
bc_num temp;
/* PHP Change: malloc() -> emalloc(), removed free_list code */
temp = (bc_num) emalloc (sizeof(bc_struct)+length+scale);
#if 0
if (_bc_Free_list != NULL) {
temp = _bc_Free_list;
_bc_Free_list = temp->n_next;
} else {
temp = (bc_num) emalloc (sizeof(bc_struct));
if (temp == NULL) bc_out_of_memory ();
}
#endif
temp->n_sign = PLUS;
temp->n_len = length;
temp->n_scale = scale;
temp->n_refs = 1;
/* PHP Change: malloc() -> emalloc() */
temp->n_ptr = (char *) emalloc (length+scale);
if (temp->n_ptr == NULL) bc_out_of_memory();
temp->n_value = temp->n_ptr;
memset (temp->n_ptr, 0, length+scale);
return temp;
}
/* "Frees" a bc_num NUM. Actually decreases reference count and only
frees the storage if reference count is zero. */
void
bc_free_num (num)
bc_num *num;
{
if (*num == NULL) return;
(*num)->n_refs--;
if ((*num)->n_refs == 0) {
if ((*num)->n_ptr)
/* PHP Change: free() -> efree(), removed free_list code */
efree ((*num)->n_ptr);
efree(*num);
#if 0
(*num)->n_next = _bc_Free_list;
_bc_Free_list = *num;
#endif
}
*num = NULL;
}
/* Intitialize the number package! */
void
bc_init_numbers (TSRMLS_D)
{
BCG(_zero_) = bc_new_num (1,0);
BCG(_one_) = bc_new_num (1,0);
BCG(_one_)->n_value[0] = 1;
BCG(_two_) = bc_new_num (1,0);
BCG(_two_)->n_value[0] = 2;
}
/* Make a copy of a number! Just increments the reference count! */
bc_num
bc_copy_num (bc_num num)
{
num->n_refs++;
return num;
}
/* Initialize a number NUM by making it a copy of zero. */
void
bc_init_num (bc_num *num TSRMLS_DC)
{
*num = bc_copy_num (BCG(_zero_));
}
-84
View File
@@ -1,84 +0,0 @@
/* int2num.c: bcmath library file. */
/*
Copyright (C) 1991, 1992, 1993, 1994, 1997 Free Software Foundation, Inc.
Copyright (C) 2000 Philip A. Nelson
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details. (COPYING.LIB)
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to:
The Free Software Foundation, Inc.
59 Temple Place, Suite 330
Boston, MA 02111-1307 USA.
You may contact the author by:
e-mail: philnelson@acm.org
us-mail: Philip A. Nelson
Computer Science Department, 9062
Western Washington University
Bellingham, WA 98226-9062
*************************************************************************/
#include <config.h>
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdarg.h>
#include "bcmath.h"
#include "private.h"
/* Convert an integer VAL to a bc number NUM. */
void
bc_int2num (num, val)
bc_num *num;
int val;
{
char buffer[30];
char *bptr, *vptr;
int ix = 1;
char neg = 0;
/* Sign. */
if (val < 0)
{
neg = 1;
val = -val;
}
/* Get things going. */
bptr = buffer;
*bptr++ = val % BASE;
val = val / BASE;
/* Extract remaining digits. */
while (val != 0)
{
*bptr++ = val % BASE;
val = val / BASE;
ix++; /* Count the digits. */
}
/* Make the number. */
bc_free_num (num);
*num = bc_new_num (ix, 0);
if (neg) (*num)->n_sign = MINUS;
/* Assign the digits. */
vptr = (*num)->n_value;
while (ix-- > 0)
*vptr++ = *--bptr;
}
-69
View File
@@ -1,69 +0,0 @@
/* nearzero.c: bcmath library file. */
/*
Copyright (C) 1991, 1992, 1993, 1994, 1997 Free Software Foundation, Inc.
Copyright (C) 2000 Philip A. Nelson
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details. (COPYING.LIB)
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to:
The Free Software Foundation, Inc.
59 Temple Place, Suite 330
Boston, MA 02111-1307 USA.
You may contact the author by:
e-mail: philnelson@acm.org
us-mail: Philip A. Nelson
Computer Science Department, 9062
Western Washington University
Bellingham, WA 98226-9062
*************************************************************************/
#include <config.h>
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdarg.h>
#include "bcmath.h"
#include "private.h"
/* In some places we need to check if the number NUM is almost zero.
Specifically, all but the last digit is 0 and the last digit is 1.
Last digit is defined by scale. */
char
bc_is_near_zero (num, scale)
bc_num num;
int scale;
{
int count;
char *nptr;
/* Error checking */
if (scale > num->n_scale)
scale = num->n_scale;
/* Initialize */
count = num->n_len + scale;
nptr = num->n_value;
/* The check */
while ((count > 0) && (*nptr++ == 0)) count--;
if (count != 0 && (count != 1 || *--nptr != 1))
return FALSE;
else
return TRUE;
}
-49
View File
@@ -1,49 +0,0 @@
/* neg.c: bcmath library file. */
/*
Copyright (C) 1991, 1992, 1993, 1994, 1997 Free Software Foundation, Inc.
Copyright (C) 2000 Philip A. Nelson
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details. (COPYING.LIB)
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to:
The Free Software Foundation, Inc.
59 Temple Place, Suite 330
Boston, MA 02111-1307 USA.
You may contact the author by:
e-mail: philnelson@acm.org
us-mail: Philip A. Nelson
Computer Science Department, 9062
Western Washington University
Bellingham, WA 98226-9062
*************************************************************************/
#include <config.h>
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdarg.h>
#include "bcmath.h"
#include "private.h"
/* In some places we need to check if the number is negative. */
char
bc_is_neg (num)
bc_num num;
{
return num->n_sign == MINUS;
}
Loaded 100 of 2497 files, more files were not shown because too many files have changed in this diff. Show more