Compare commits

..
Author SHA1 Message Date
SVN Migration c8a60f5c03 This commit was manufactured by cvs2svn to create tag 'php_4_1_0'. 2001-12-10 15:21:44 +00:00
Zeev Suraski cbce251dab Go with 4.1.0 2001-12-10 15:21:43 +00:00
Zeev Suraski c939250414 Go with 4.1.0 2001-12-09 23:02:07 +00:00
Zeev Suraski a36c434dbb MFH - fix unbuffered queries 2001-12-09 13:53:56 +00:00
Thies C. Arntzen 8e46600166 fix #13801 (imap_rfc822_parse_adrlist changes arg1) 2001-12-07 16:47:59 +00:00
Derick Rethans d07a60c3d0 - MFH for the session fix 2001-12-06 14:23:29 +00:00
Zeev Suraski 0858af07ec Here we go again 2001-12-03 10:56:13 +00:00
Sterling Hughes a096235f8f MFH 2001-12-03 09:26:02 +00:00
Sterling Hughes 8244f0f628 No need to create this, automatically done (automagically even) by
call_user_function_ex()
2001-12-03 08:12:18 +00:00
SVN Migration 3cdc24790e This commit was manufactured by cvs2svn to create branch 'PHP_4_0_7'. 2001-12-02 21:17:56 +00:00
Thies C. Arntzen 80df8e6b0a MFH
fix for $_SESSION
!!! please TEST, TEST, TEST !!!
2001-12-02 12:21:54 +00:00
Thies C. Arntzen b228115b64 fix problem when __sleep() returned non-existant variables 2001-12-01 15:22:24 +00:00
Stig Venaas cdedea01c1 Fixing ldap_first/next_attribute() 2001-12-01 14:17:43 +00:00
Thies C. Arntzen c0e263c1a1 MFH - make sockets extension usable 2001-11-30 18:18:01 +00:00
Zeev Suraski 91889eeb93 go with RC4 2001-11-30 14:44:56 +00:00
Sterling Hughes 5c74aa0f0f Cleanup the function entries a tidbit 2001-11-30 09:04:49 +00:00
Zeev Suraski 501aa09789 Prepare 4.1.0 2001-11-25 22:47:50 +00:00
Rui Hirokawa 16d5e9f108 restriction is relaxed because output handler couldn't be used even if zlib.output_compression is set to off. 2001-11-23 02:37:27 +00:00
Derick Rethans 195a756477 - MFH crash bug in shm_remove (not critical enough to include in the release,
but critical enough to MFH)
2001-11-22 14:35:55 +00:00
Derick Rethans 09fb81a8f3 - MFH for crash bug #14169
#- IMO, this should be included in the release. The fix has little impact
#  on the release in a whole.
2001-11-22 07:49:46 +00:00
Sebastian Bergmann 21ff8ec819 MFH (Remove sablot from php_modules.dsw, its no longer in repository) 2001-11-20 18:18:57 +00:00
Sterling Hughes 6d1374480e Temporary fix not for the HEAD branch, this is the only way to avoid the
segfault and *really* not fuck up the release cycle
2001-11-20 11:55:34 +00:00
Sterling Hughes 7e33f0b17b MFH latest cURL fixes, these are tested and important 2001-11-20 11:32:50 +00:00
Zeev Suraski 0be29a4861 Go with final RC 2001-11-19 20:53:26 +00:00
Derick Rethans bcf3204bd3 - Add bugfix 2001-11-19 15:19:39 +00:00
Zeev Suraski dee465139f MFH 2001-11-19 15:00:42 +00:00
foobar f5b7714238 MFH 2001-11-19 00:52:02 +00:00
foobar 747258e34f MFH 2001-11-18 23:54:57 +00:00
Derick Rethans 66c1d632c1 - Fix typo 2001-11-18 13:52:08 +00:00
Derick Rethans b9d6136a28 - Updated NEWS to reflect removal of ext/sablotron 2001-11-18 13:50:56 +00:00
Sterling Hughes aaa9baa57f Remove the sablotron extension from the release branch 2001-11-18 13:27:32 +00:00
Derick Rethans 549164e1fe - MFH (fix build under FreeBSD) 2001-11-18 12:02:34 +00:00
foobar 36f572a5b9 Some typos.. 2001-11-18 03:11:06 +00:00
Andrei Zmievski 2a985b94e0 MFH 2001-11-18 01:23:14 +00:00
Derick Rethans 3f783ff20b - MFH 2001-11-18 00:33:19 +00:00
Zeev Suraski 43a661c2ac MFH 2001-11-17 21:15:57 +00:00
Rasmus Lerdorf 958a5a1311 MFH
(I wish people would stop committing whitespace fixes to code that has
 been around forever.  It really makes merging and checking diffs a pain
 in the ass as real changes end up hidden within a sea of useless
 whitespace fixes)
2001-11-16 12:02:30 +00:00
Derick Rethans 0aca2443d7 - MFH name change
#- This is to minimize BBC
2001-11-15 07:28:35 +00:00
Stig Bakken 032765f467 * install Archive_Tar 2001-11-14 15:01:37 +00:00
Christian Stocker ef3912a195 adding PEAR/Registry.php 2001-11-14 09:54:46 +00:00
Christian Stocker 0a862aff6f checking if package.xml.gz exists, before checking if it's writeable 2001-11-14 09:20:49 +00:00
foobar 38cd9d70d5 Added missing .cvsignore files and added *.reg into pear/tests/.cvsignore 2001-11-13 14:01:03 +00:00
Rasmus Lerdorf 5031e0dab8 MFH 2001-11-13 13:54:20 +00:00
Rasmus Lerdorf 40b988316b MFH 2001-11-13 13:13:26 +00:00
Rasmus Lerdorf bca8ddd083 Let's just use the quicktester from HEAD since it seems to work and the
one in this branch is quite broken.  Still plenty of failing tests we need
to work through here.
2001-11-13 12:57:26 +00:00
foobar 6d47a2d60f Partial MFH. 2001-11-13 12:42:11 +00:00
Rasmus Lerdorf 96c421553f MFH 2001-11-13 12:39:35 +00:00
foobar 30f0fa9262 MFH 2001-11-13 12:21:03 +00:00
foobar 2a1ac78a9d MFH 2001-11-13 12:07:25 +00:00
foobar 6b702ced00 MFH (the use of strings for locale setting is deprecated) 2001-11-13 11:54:13 +00:00
Derick Rethans edc32c8faa - Check for cURL >= 7.8.1 2001-11-13 11:53:01 +00:00
Zeev Suraski 18e7796470 Fix name 2001-11-13 11:48:28 +00:00
Zeev Suraski 4e7c35b1e2 Improve OpenSSL compatibility 2001-11-13 11:46:33 +00:00
foobar 5d1e3b81d4 MFH 2001-11-13 11:38:56 +00:00
James Moore e8a7dbe010 Lets cast this explicitly. 2001-11-13 11:27:42 +00:00
Derick Rethans d205634a58 - Fixed scheme/sax handlers (patch by Lenar Lõhmus <lenar@vision.ee>) 2001-11-13 09:53:18 +00:00
Derick Rethans 91f27074fc - MFH 2001-11-13 08:19:43 +00:00
57 changed files with 740 additions and 2624 deletions

No files matched your search

+12 -4
View File
@@ -1,10 +1,18 @@
PHP 4.0 NEWS
PHP 4 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 200?, Version 4.1.0
10 Dec 2001, Version 4.1.0
- Worked around a bug in the MySQL client library that could cause PHP to hang
when using unbuffered queries. (Zeev)
- Fixed a bug which caused set_time_limit() to affect all subsequent requests
to running Apache child process. (Zeev)
- Removed the sablotron extension in favor of the new XSLT extension.
(Sterling)
- Fixed a bug in WDDX deserialization that would sometimes corrupt the root
element if it was a scalar one. (Andrei)
- Make ImageColorAt() and ImageColorsForIndex() work with TrueColor images.
(Rasmus)
- Fixed a bug preg_match_all() that would return results under improper indices
in certain cases. (Andrei)
- Fixed a bug in preg_match_all() that would return results under improper
indices in certain cases. (Andrei)
- Fixed a crash in str_replace() that would happen if search parameter was an
array and one of the replacements resulted in subject string being empty.
(Andrei)
+1 -1
View File
@@ -553,7 +553,7 @@ CWD_API int virtual_open(const char *path TSRMLS_DC, int flags, ...)
va_list arg;
va_start(arg, flags);
mode = va_arg(arg, mode_t);
mode = (mode_t) va_arg(arg, int);
va_end(arg);
f = open(new_state.cwd, flags, mode);
-6
View File
@@ -928,12 +928,6 @@ dnl ---------------------------------------------- Shared module
PHP_FAST_OUTPUT($ext_builddir/Makefile)
])
PHP_SUBST(EXT_SUBDIRS)
PHP_SUBST(EXT_STATIC)
PHP_SUBST(EXT_SHARED)
PHP_SUBST(EXT_LIBS)
PHP_SUBST(EXT_LTLIBS)
dnl
dnl Solaris requires main code to be position independent in order
dnl to let shared objects find symbols. Weird. Ugly.
+142 -205
View File
@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
timestamp='2001-04-20'
timestamp='2001-11-08'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -24,8 +24,9 @@ timestamp='2001-04-20'
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Written by Per Bothner <bothner@cygnus.com>.
# Please send patches to <config-patches@gnu.org>.
# Originally written by Per Bothner <bothner@cygnus.com>.
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
#
# This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and
@@ -52,7 +53,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
@@ -95,25 +96,25 @@ trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
# use `HOST_CC' if defined, but it is deprecated.
case $CC_FOR_BUILD,$HOST_CC,$CC in
,,) echo "int dummy(){}" > $dummy.c
set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
,,) echo "int dummy(){}" > $dummy.c ;
for c in cc gcc c89 ; do
($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1
($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
if test $? = 0 ; then
CC_FOR_BUILD="$c"; break
fi
done
rm -f $dummy.c $dummy.o $dummy.rel
CC_FOR_BUILD="$c"; break ;
fi ;
done ;
rm -f $dummy.c $dummy.o $dummy.rel ;
if test x"$CC_FOR_BUILD" = x ; then
CC_FOR_BUILD=no_compiler_found
CC_FOR_BUILD=no_compiler_found ;
fi
;;
,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;;
esac
esac'
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 8/24/94.)
# (ghazi@noc.rutgers.edu 1994-08-24)
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
PATH=$PATH:/.attbin ; export PATH
fi
@@ -127,7 +128,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*)
# Netbsd (nbsd) targets should (where applicable) match one or
# NetBSD (nbsd) targets should (where applicable) match one or
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
@@ -144,12 +145,14 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
macppc) machine=powerpc-apple ;;
hp3[0-9][05]) machine=m68k-hp ;;
ibmrt|romp-ibm) machine=romp-ibm ;;
sparc*) machine=`uname -p`-unknown ;;
*) machine=${UNAME_MACHINE}-unknown ;;
esac
# The Operating System including object format, if it has switched
# to ELF recently, or will in the future.
case "${UNAME_MACHINE}" in
i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep __ELF__ >/dev/null
then
@@ -171,6 +174,45 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit 0 ;;
amiga:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
arc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
hp300:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mac68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
macppc:OpenBSD:*:*)
echo powerpc-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvme68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvme88k:OpenBSD:*:*)
echo m88k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvmeppc:OpenBSD:*:*)
echo powerpc-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
pmax:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sgi:OpenBSD:*:*)
echo mipseb-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sun3:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
wgrisc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
*:OpenBSD:*:*)
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
alpha:OSF1:*:*)
if test $UNAME_RELEASE = "V4.0"; then
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
@@ -204,6 +246,7 @@ main:
jsr \$26,exit
.end main
EOF
eval $set_cc_for_build
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
if test "$?" = 0 ; then
case `./$dummy` in
@@ -225,6 +268,9 @@ EOF
2-307)
UNAME_MACHINE="alphaev67"
;;
2-1307)
UNAME_MACHINE="alphaev68"
;;
esac
fi
rm -f $dummy.s $dummy
@@ -242,30 +288,9 @@ EOF
Amiga*:UNIX_System_V:4.0:*)
echo m68k-unknown-sysv4
exit 0;;
amiga:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
*:[Aa]miga[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-amigaos
exit 0 ;;
arc64:OpenBSD:*:*)
echo mips64el-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
arc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
hkmips:OpenBSD:*:*)
echo mips-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
pmax:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sgi:OpenBSD:*:*)
echo mips-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
wgrisc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
*:OS/390:*:*)
echo i370-ibm-openedition
exit 0 ;;
@@ -328,9 +353,6 @@ EOF
aushp:SunOS:*:*)
echo sparc-auspex-sunos${UNAME_RELEASE}
exit 0 ;;
atari*:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
# The situation for MiNT is a little confusing. The machine name
# can be virtually everything (everything which is not
# "atarist" or "atariste" at least should have a processor
@@ -357,18 +379,6 @@ EOF
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE}
exit 0 ;;
sun3*:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mac68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvme68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvme88k:OpenBSD:*:*)
echo m88k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
exit 0 ;;
@@ -385,6 +395,7 @@ EOF
echo clipper-intergraph-clix${UNAME_RELEASE}
exit 0 ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */
@@ -475,6 +486,7 @@ EOF
exit 0 ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include <sys/systemcfg.h>
@@ -536,10 +548,8 @@ EOF
9000/31? ) HP_ARCH=m68000 ;;
9000/[34]?? ) HP_ARCH=m68k ;;
9000/[678][0-9][0-9])
case "${HPUX_REV}" in
11.[0-9][0-9])
if [ -x /usr/bin/getconf ]; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
if [ -x /usr/bin/getconf ]; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
case "${sc_cpu_version}" in
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
@@ -548,12 +558,13 @@ EOF
case "${sc_kernel_bits}" in
32) HP_ARCH="hppa2.0n" ;;
64) HP_ARCH="hppa2.0w" ;;
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
esac ;;
esac
fi ;;
esac
if [ "${HP_ARCH}" = "" ]; then
sed 's/^ //' << EOF >$dummy.c
fi
if [ "${HP_ARCH}" = "" ]; then
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#define _HPUX_SOURCE
#include <stdlib.h>
@@ -586,10 +597,10 @@ EOF
exit (0);
}
EOF
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
rm -f $dummy.c $dummy
fi ;;
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy`
if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
rm -f $dummy.c $dummy
fi ;;
esac
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit 0 ;;
@@ -598,6 +609,7 @@ EOF
echo ia64-hp-hpux${HPUX_REV}
exit 0 ;;
3050*:HI-UX:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include <unistd.h>
int
@@ -633,7 +645,7 @@ EOF
9000/8??:4.3bsd:*:*)
echo hppa1.0-hp-bsd
exit 0 ;;
*9??*:MPE/iX:*:*)
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
echo hppa1.0-hp-mpeix
exit 0 ;;
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
@@ -652,9 +664,6 @@ EOF
parisc*:Lites*:*:*)
echo hppa1.1-hp-lites
exit 0 ;;
hppa*:OpenBSD:*:*)
echo hppa-unknown-openbsd
exit 0 ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
exit 0 ;;
@@ -677,12 +686,13 @@ EOF
echo xmp-cray-unicos
exit 0 ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE}
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY*[A-Z]90:*:*:*)
echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
@@ -705,9 +715,6 @@ EOF
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit 0 ;;
hp300:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit 0 ;;
@@ -720,9 +727,6 @@ EOF
*:FreeBSD:*:*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit 0 ;;
*:OpenBSD:*:*)
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit 0 ;;
@@ -763,97 +767,29 @@ EOF
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
mips:Linux:*:*)
cat >$dummy.c <<EOF
#ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */
int main (int argc, char *argv[]) {
#else
int main (argc, argv) int argc; char *argv[]; {
#endif
#ifdef __MIPSEB__
printf ("%s-unknown-linux-gnu\n", argv[1]);
#endif
#ifdef __MIPSEL__
printf ("%sel-unknown-linux-gnu\n", argv[1]);
#endif
return 0;
}
EOF
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in
big) echo mips-unknown-linux-gnu && exit 0 ;;
little) echo mipsel-unknown-linux-gnu && exit 0 ;;
esac
;;
ppc:Linux:*:*)
# Determine Lib Version
cat >$dummy.c <<EOF
#include <features.h>
#if defined(__GLIBC__)
extern char __libc_version[];
extern char __libc_release[];
#endif
main(argc, argv)
int argc;
char *argv[];
{
#if defined(__GLIBC__)
printf("%s %s\n", __libc_version, __libc_release);
#else
printf("unknown\n");
#endif
return 0;
}
EOF
LIBC=""
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
if test "$?" = 0 ; then
./$dummy | grep 1\.99 > /dev/null
if test "$?" = 0 ; then LIBC="libc1" ; fi
fi
rm -f $dummy.c $dummy
echo powerpc-unknown-linux-gnu${LIBC}
echo powerpc-unknown-linux-gnu
exit 0 ;;
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-gnu
exit 0 ;;
alpha:Linux:*:*)
cat <<EOF >$dummy.s
.data
\$Lformat:
.byte 37,100,45,37,120,10,0 # "%d-%x\n"
.text
.globl main
.align 4
.ent main
main:
.frame \$30,16,\$26,0
ldgp \$29,0(\$27)
.prologue 1
.long 0x47e03d80 # implver \$0
lda \$2,-1
.long 0x47e20c21 # amask \$2,\$1
lda \$16,\$Lformat
mov \$0,\$17
not \$1,\$18
jsr \$26,printf
ldgp \$29,0(\$26)
mov 0,\$16
jsr \$26,exit
.end main
EOF
LIBC=""
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
if test "$?" = 0 ; then
case `./$dummy` in
0-0) UNAME_MACHINE="alpha" ;;
1-0) UNAME_MACHINE="alphaev5" ;;
1-1) UNAME_MACHINE="alphaev56" ;;
1-101) UNAME_MACHINE="alphapca56" ;;
2-303) UNAME_MACHINE="alphaev6" ;;
2-307) UNAME_MACHINE="alphaev67" ;;
esac
objdump --private-headers $dummy | \
grep ld.so.1 > /dev/null
if test "$?" = 0 ; then
LIBC="libc1"
fi
fi
rm -f $dummy.s $dummy
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
EV56) UNAME_MACHINE=alphaev56 ;;
PCA56) UNAME_MACHINE=alphapca56 ;;
PCA57) UNAME_MACHINE=alphapca56 ;;
EV6) UNAME_MACHINE=alphaev6 ;;
EV67) UNAME_MACHINE=alphaev67 ;;
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
exit 0 ;;
parisc:Linux:*:* | hppa:Linux:*:*)
@@ -883,40 +819,30 @@ EOF
# The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent
# problems with other programs or directories called `ld' in the path.
ld_supported_emulations=`cd /; ld --help 2>&1 \
| sed -ne '/supported emulations:/!d
ld_supported_targets=`cd /; ld --help 2>&1 \
| sed -ne '/supported targets:/!d
s/[ ][ ]*/ /g
s/.*supported emulations: *//
s/.*supported targets: *//
s/ .*//
p'`
case "$ld_supported_emulations" in
i*86linux)
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
exit 0
;;
elf_i*86)
case "$ld_supported_targets" in
elf32-i386)
TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
;;
i*86coff)
a.out-i386-linux)
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
exit 0 ;;
coff-i386)
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
exit 0
;;
esac
# Either a pre-BFD a.out linker (linux-gnuoldld)
# or one that does not give us useful --help.
# GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
# If ld does not provide *any* "supported emulations:"
# that means it is gnuoldld.
test -z "$ld_supported_emulations" && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
case "${UNAME_MACHINE}" in
i*86)
VENDOR=pc;
;;
*)
VENDOR=unknown;
;;
exit 0 ;;
"")
# Either a pre-BFD a.out linker (linux-gnuoldld) or
# one that does not give us useful --help.
echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
exit 0 ;;
esac
# Determine whether the default compiler is a.out or elf
eval $set_cc_for_build
cat >$dummy.c <<EOF
#include <features.h>
#ifdef __cplusplus
@@ -928,15 +854,15 @@ EOF
#ifdef __ELF__
# ifdef __GLIBC__
# if __GLIBC__ >= 2
printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
printf ("%s-pc-linux-gnu\n", argv[1]);
# else
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
printf ("%s-pc-linux-gnulibc1\n", argv[1]);
# endif
# else
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
printf ("%s-pc-linux-gnulibc1\n", argv[1]);
# endif
#else
printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
printf ("%s-pc-linux-gnuaout\n", argv[1]);
#endif
return 0;
}
@@ -945,9 +871,10 @@ EOF
rm -f $dummy.c $dummy
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
;;
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
# are messed up and put the nodename in both sysname and nodename.
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
# earlier versions are messed up and put the nodename in both
# sysname and nodename.
echo i386-sequent-sysv4
exit 0 ;;
i*86:UNIX_SV:4.2MP:2.*)
@@ -966,14 +893,13 @@ EOF
echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
fi
exit 0 ;;
i*86:*:5:7*)
# Fixed at (any) Pentium or better
UNAME_MACHINE=i586
if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
else
echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
fi
i*86:*:5:[78]*)
case `/bin/uname -X | grep "^Machine"` in
*486*) UNAME_MACHINE=i486 ;;
*Pentium) UNAME_MACHINE=i586 ;;
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
esac
echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
exit 0 ;;
i*86:*:3.2:*)
if test -f /usr/options/cb.name; then
@@ -1021,7 +947,7 @@ EOF
exit 0 ;;
M68*:*:R3V[567]*:*)
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -1067,8 +993,8 @@ EOF
echo ns32k-sni-sysv
fi
exit 0 ;;
PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel@ccMail.Census.GOV>
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel@ccMail.Census.GOV>
echo i586-unisys-sysv4
exit 0 ;;
*:UNIX_System_V:4*:FTX*)
@@ -1080,6 +1006,10 @@ EOF
# From seanf@swdc.stratus.com.
echo i860-stratus-sysv4
exit 0 ;;
*:VOS:*:*)
# From Paul.Green@stratus.com.
echo hppa1.1-stratus-vos
exit 0 ;;
mc68*:A/UX:*:*)
echo m68k-apple-aux${UNAME_RELEASE}
exit 0 ;;
@@ -1172,11 +1102,18 @@ EOF
*:ITS:*:*)
echo pdp10-unknown-its
exit 0 ;;
i*86:XTS-300:*:STOP)
echo ${UNAME_MACHINE}-unknown-stop
exit 0 ;;
i*86:atheos:*:*)
echo ${UNAME_MACHINE}-unknown-atheos
exit 0 ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
eval $set_cc_for_build
cat >$dummy.c <<EOF
#ifdef _SEQUENT_
# include <sys/types.h>
Vendored
+109 -54
View File
@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
timestamp='2001-04-20'
timestamp='2001-11-08'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -29,7 +29,8 @@ timestamp='2001-04-20'
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Please send patches to <config-patches@gnu.org>.
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
@@ -117,7 +118,7 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | storm-chaos* | os2-emx*)
nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -157,6 +158,14 @@ case $os in
os=-vxworks
basic_machine=$1
;;
-chorusos*)
os=-chorusos
basic_machine=$1
;;
-chorusrdb)
os=-chorusrdb
basic_machine=$1
;;
-hiux*)
os=-hiuxwe2
;;
@@ -215,26 +224,35 @@ esac
case $basic_machine in
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \
| arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \
| pyramid | mn10200 | mn10300 | tron | a29k \
| 580 | i960 | h8300 \
| x86 | ppcbe | mipsbe | mipsle | shbe | shle \
| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
| hppa64 \
| alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
| alphaev6[78] \
| we32k | ns16k | clipper | i370 | sh | sh[34] \
| powerpc | powerpcle \
| 1750a | dsp16xx | pdp10 | pdp11 \
| mips16 | mips64 | mipsel | mips64el \
| mips64orion | mips64orionel | mipstx39 | mipstx39el \
| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
| mips64vr5000 | miprs64vr5000el | mcore | s390 | s390x \
| sparc | sparclet | sparclite | sparc64 | sparcv9 | sparcv9b \
| v850 | c4x \
| thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \
| pj | pjl | h8500)
1750a | 580 \
| a29k \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| c4x | clipper \
| d10v | d30v | dsp16xx \
| fr30 \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| m32r | m68000 | m68k | m88k | mcore \
| mips16 | mips64 | mips64el | mips64orion | mips64orionel \
| mips64vr4100 | mips64vr4100el | mips64vr4300 \
| mips64vr4300el | mips64vr5000 | mips64vr5000el \
| mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
| mipsisa32 \
| mn10200 | mn10300 \
| ns16k | ns32k \
| openrisc \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
| sh | sh[34] | sh[34]eb | shbe | shle \
| sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \
| strongarm \
| tahoe | thumb | tic80 | tron \
| v850 \
| we32k \
| x86 | xscale | xstormy16 \
| z8k)
basic_machine=$basic_machine-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12)
@@ -242,7 +260,7 @@ case $basic_machine in
basic_machine=$basic_machine-unknown
os=-none
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | w65)
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
;;
# We use `pc' rather than `unknown'
@@ -257,31 +275,43 @@ case $basic_machine in
exit 1
;;
# Recognize the basic CPU types with company name.
# FIXME: clean up the formatting here.
vax-* | tahoe-* | i*86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \
| arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
| power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
| xmp-* | ymp-* \
| x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \
| hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
| hppa2.0n-* | hppa64-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
| alphaev6[78]-* \
| we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
| clipper-* | orion-* \
| sparclite-* | pdp10-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
| sparc64-* | sparcv9-* | sparcv9b-* | sparc86x-* \
| mips16-* | mips64-* | mipsel-* \
| mips64el-* | mips64orion-* | mips64orionel-* \
| mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
| mipstx39-* | mipstx39el-* | mcore-* \
| f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \
| [cjt]90-* \
| m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
| thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \
| bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*)
580-* \
| a29k-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alphapca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armv*-* \
| avr-* \
| bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c54x-* \
| clipper-* | cray2-* | cydra-* \
| d10v-* | d30v-* \
| elxsi-* \
| f30[01]-* | f700-* | fr30-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| m32r-* \
| m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | mcore-* \
| mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
| mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \
| mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
| sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \
| sparc-* | sparc64-* | sparc86x-* | sparclite-* \
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* \
| t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
| v850-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xmp-* | xps100-* | xscale-* | xstormy16-* \
| ymp-* \
| z8k-*)
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
@@ -694,7 +724,7 @@ case $basic_machine in
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pentium | p5 | k5 | k6 | nexgen)
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
pentiumpro | p6 | 6x86 | athlon)
@@ -703,7 +733,7 @@ case $basic_machine in
pentiumii | pentium2)
basic_machine=i686-pc
;;
pentium-* | p5-* | k5-* | k6-* | nexgen-*)
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
@@ -727,6 +757,16 @@ case $basic_machine in
ppcle-* | powerpclittle-*)
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64) basic_machine=powerpc64-unknown
;;
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
basic_machine=powerpc64le-unknown
;;
ppc64le-* | powerpc64little-*)
basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ps2)
basic_machine=i386-ibm
;;
@@ -744,6 +784,12 @@ case $basic_machine in
rtpc | rtpc-*)
basic_machine=romp-ibm
;;
s390 | s390-*)
basic_machine=s390-ibm
;;
s390x | s390x-*)
basic_machine=s390x-ibm
;;
sa29200)
basic_machine=a29k-amd
os=-udi
@@ -755,7 +801,7 @@ case $basic_machine in
basic_machine=sh-hitachi
os=-hms
;;
sparclite-wrs)
sparclite-wrs | simso-wrs)
basic_machine=sparclite-wrs
os=-vxworks
;;
@@ -881,6 +927,10 @@ case $basic_machine in
basic_machine=hppa1.1-winbond
os=-proelf
;;
windows32)
basic_machine=i386-pc
os=-windows32-msvcrt
;;
xmp)
basic_machine=xmp-cray
os=-unicos
@@ -934,7 +984,7 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
sh3 | sh4)
sh3 | sh4 | sh3eb | sh4eb)
basic_machine=sh-unknown
;;
sparc | sparcv9 | sparcv9b)
@@ -1018,11 +1068,13 @@ case $os in
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*)
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1346,6 +1398,9 @@ case $basic_machine in
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
vendor=atari
;;
-vos*)
vendor=stratus
;;
esac
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
;;
+7 -1
View File
@@ -51,7 +51,7 @@ dnl ## All of these are normally in the extension directories.
dnl ## Diversion 5 is the last one. Here we generate files and clean up.
dnl ## This is where the version number is changed from now on!
AM_INIT_AUTOMAKE(php, 4.1.0RC2, nodefine)
AM_INIT_AUTOMAKE(php, 4.1.0, nodefine)
PHP_VERSION=$VERSION
echo "/* automatically generated by configure */" > php_version.h.new
@@ -823,6 +823,12 @@ PHP_OS=`uname`
AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS",[uname output])
PHP_SUBST(EXT_SUBDIRS)
PHP_SUBST(EXT_STATIC)
PHP_SUBST(EXT_SHARED)
PHP_SUBST(EXT_LIBS)
PHP_SUBST(EXT_LTLIBS)
PHP_SUBST_OLD(abs_builddir)
PHP_SUBST_OLD(abs_srcdir)
PHP_SUBST(bindir)
+3 -3
View File
@@ -5,11 +5,11 @@ PHP_ARG_WITH(crack, whether to include crack support,
if test "$PHP_CRACK" != "no"; then
for i in /usr/local/lib /usr/lib $PHP_CRACK $PHP_CRACK/cracklib; do
test -f $i/lib/libcrack.$SHLIB_SUFFIX_NAME -o -f $i/lib/libcrack.a && CRACK_LIBDIR=$i
for i in /usr/local/lib /usr/lib $PHP_CRACK/lib $PHP_CRACK/cracklib; do
test -f $i/lib/libcrack.$SHLIB_SUFFIX_NAME -o -f $i/libcrack.a && CRACK_LIBDIR=$i
done
for i in /usr/local/include /usr/include $PHP_CRACK $PHP_CRACK/cracklib; do
for i in /usr/local/include /usr/include $PHP_CRACK/include $PHP_CRACK/cracklib; do
test -f $i/packer.h && CRACK_INCLUDEDIR=$i
done
+1 -1
View File
@@ -6,7 +6,7 @@ ctype on integers
--GET--
--FILE--
<?php
setlocale("LC_ALL","C");
setlocale(LC_ALL,"C");
function ctype_test_001($function) {
$n=0;
+1 -1
View File
@@ -6,7 +6,7 @@ ctype on strings
--GET--
--FILE--
<?php
setlocale("LC_ALL","C");
setlocale(LC_ALL,"C");
function ctype_test_002($function) {
$n=0; $m=0;
+3 -3
View File
@@ -24,7 +24,7 @@ if test "$PHP_CURL" != "no"; then
fi
CURL_CONFIG="curl-config"
AC_MSG_CHECKING(for cURL greater than 7.7.3)
AC_MSG_CHECKING(for cURL greater than 7.8.1)
if ${CURL_DIR}/bin/curl-config --libs print > /dev/null 2>&1; then
CURL_CONFIG=${CURL_DIR}/bin/curl-config
@@ -32,11 +32,11 @@ if test "$PHP_CURL" != "no"; then
curl_version_full=`$CURL_CONFIG --version`
curl_version=`echo ${curl_version_full} | sed -e 's/libcurl //' | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
if test "$curl_version" -ge 7007003; then
if test "$curl_version" -ge 7008001; then
AC_MSG_RESULT($curl_version_full)
CURL_LIBS=`$CURL_CONFIG --libs`
else
AC_MSG_ERROR(cURL version 7.7.3 or later is required to compile php with cURL support)
AC_MSG_ERROR(cURL version 7.8.1 or later is required to compile php with cURL support)
fi
PHP_ADD_INCLUDE($CURL_DIR/include)
+239 -178
View File
@@ -73,7 +73,7 @@ zend_module_entry curl_module_entry = {
"curl",
curl_functions,
PHP_MINIT(curl),
NULL,
PHP_MSHUTDOWN(curl),
NULL,
NULL,
PHP_MINFO(curl),
@@ -97,157 +97,185 @@ PHP_MINFO_FUNCTION(curl)
}
/* }}} */
#define REGISTER_CURL_CONSTANT(name, value) REGISTER_LONG_CONSTANT(name, value, CONST_CS | CONST_PERSISTENT)
#define REGISTER_CURL_CONSTANT(__c) REGISTER_LONG_CONSTANT(#__c, __c, CONST_CS | CONST_PERSISTENT)
/* {{{ PHP_MINIT_FUNCTION
*/
PHP_MINIT_FUNCTION(curl)
{
int startup_options;
le_curl = zend_register_list_destructors_ex(_php_curl_close, NULL, "curl", module_number);
/* Constants for curl_setopt() */
REGISTER_CURL_CONSTANT("CURLOPT_PORT", CURLOPT_PORT);
REGISTER_CURL_CONSTANT("CURLOPT_FILE", CURLOPT_FILE);
REGISTER_CURL_CONSTANT("CURLOPT_INFILE", CURLOPT_INFILE);
REGISTER_CURL_CONSTANT("CURLOPT_INFILESIZE", CURLOPT_INFILESIZE);
REGISTER_CURL_CONSTANT("CURLOPT_URL", CURLOPT_URL);
REGISTER_CURL_CONSTANT("CURLOPT_PROXY", CURLOPT_PROXY);
REGISTER_CURL_CONSTANT("CURLOPT_VERBOSE", CURLOPT_VERBOSE);
REGISTER_CURL_CONSTANT("CURLOPT_HEADER", CURLOPT_HEADER);
REGISTER_CURL_CONSTANT("CURLOPT_HTTPHEADER", CURLOPT_HTTPHEADER);
REGISTER_CURL_CONSTANT("CURLOPT_NOPROGRESS", CURLOPT_NOPROGRESS);
REGISTER_CURL_CONSTANT("CURLOPT_NOBODY", CURLOPT_NOBODY);
REGISTER_CURL_CONSTANT("CURLOPT_FAILONERROR", CURLOPT_FAILONERROR);
REGISTER_CURL_CONSTANT("CURLOPT_UPLOAD", CURLOPT_UPLOAD);
REGISTER_CURL_CONSTANT("CURLOPT_POST", CURLOPT_POST);
REGISTER_CURL_CONSTANT("CURLOPT_FTPLISTONLY", CURLOPT_FTPLISTONLY);
REGISTER_CURL_CONSTANT("CURLOPT_FTPAPPEND", CURLOPT_FTPAPPEND);
REGISTER_CURL_CONSTANT("CURLOPT_NETRC", CURLOPT_NETRC);
REGISTER_CURL_CONSTANT("CURLOPT_FOLLOWLOCATION", CURLOPT_FOLLOWLOCATION);
REGISTER_CURL_CONSTANT("CURLOPT_FTPASCII", CURLOPT_FTPASCII);
REGISTER_CURL_CONSTANT("CURLOPT_PUT", CURLOPT_PUT);
REGISTER_CURL_CONSTANT("CURLOPT_MUTE", CURLOPT_MUTE);
REGISTER_CURL_CONSTANT("CURLOPT_USERPWD", CURLOPT_USERPWD);
REGISTER_CURL_CONSTANT("CURLOPT_PROXYUSERPWD", CURLOPT_PROXYUSERPWD);
REGISTER_CURL_CONSTANT("CURLOPT_RANGE", CURLOPT_RANGE);
REGISTER_CURL_CONSTANT("CURLOPT_TIMEOUT", CURLOPT_TIMEOUT);
REGISTER_CURL_CONSTANT("CURLOPT_POSTFIELDS", CURLOPT_POSTFIELDS);
REGISTER_CURL_CONSTANT("CURLOPT_REFERER", CURLOPT_REFERER);
REGISTER_CURL_CONSTANT("CURLOPT_USERAGENT", CURLOPT_USERAGENT);
REGISTER_CURL_CONSTANT("CURLOPT_FTPPORT", CURLOPT_FTPPORT);
REGISTER_CURL_CONSTANT("CURLOPT_LOW_SPEED_LIMIT", CURLOPT_LOW_SPEED_LIMIT);
REGISTER_CURL_CONSTANT("CURLOPT_LOW_SPEED_TIME", CURLOPT_LOW_SPEED_TIME);
REGISTER_CURL_CONSTANT("CURLOPT_RESUME_FROM", CURLOPT_RESUME_FROM);
REGISTER_CURL_CONSTANT("CURLOPT_COOKIE", CURLOPT_COOKIE);
REGISTER_CURL_CONSTANT("CURLOPT_SSLCERT", CURLOPT_SSLCERT);
REGISTER_CURL_CONSTANT("CURLOPT_SSLCERTPASSWD", CURLOPT_SSLCERTPASSWD);
REGISTER_CURL_CONSTANT("CURLOPT_WRITEHEADER", CURLOPT_WRITEHEADER);
REGISTER_CURL_CONSTANT("CURLOPT_SSL_VERIFYHOST", CURLOPT_SSL_VERIFYHOST);
REGISTER_CURL_CONSTANT("CURLOPT_COOKIEFILE", CURLOPT_COOKIEFILE);
REGISTER_CURL_CONSTANT("CURLOPT_SSLVERSION", CURLOPT_SSLVERSION);
REGISTER_CURL_CONSTANT("CURLOPT_TIMECONDITION", CURLOPT_TIMECONDITION);
REGISTER_CURL_CONSTANT("CURLOPT_TIMEVALUE", CURLOPT_TIMEVALUE);
REGISTER_CURL_CONSTANT("CURLOPT_CUSTOMREQUEST", CURLOPT_CUSTOMREQUEST);
REGISTER_CURL_CONSTANT("CURLOPT_STDERR", CURLOPT_STDERR);
REGISTER_CURL_CONSTANT("CURLOPT_TRANSFERTEXT", CURLOPT_TRANSFERTEXT);
REGISTER_CURL_CONSTANT("CURLOPT_RETURNTRANSFER", CURLOPT_RETURNTRANSFER);
REGISTER_CURL_CONSTANT("CURLOPT_QUOTE", CURLOPT_QUOTE);
REGISTER_CURL_CONSTANT("CURLOPT_POSTQUOTE", CURLOPT_POSTQUOTE);
REGISTER_CURL_CONSTANT("CURLOPT_INTERFACE", CURLOPT_INTERFACE);
REGISTER_CURL_CONSTANT("CURLOPT_KRB4LEVEL", CURLOPT_KRB4LEVEL);
REGISTER_CURL_CONSTANT("CURLOPT_HTTPPROXYTUNNEL", CURLOPT_HTTPPROXYTUNNEL);
REGISTER_CURL_CONSTANT("CURLOPT_FILETIME", CURLOPT_FILETIME);
REGISTER_CURL_CONSTANT("CURLOPT_WRITEFUNCTION", CURLOPT_WRITEFUNCTION);
REGISTER_CURL_CONSTANT("CURLOPT_READFUNCTION", CURLOPT_READFUNCTION);
REGISTER_CURL_CONSTANT("CURLOPT_PASSWDFUNCTION", CURLOPT_PASSWDFUNCTION);
REGISTER_CURL_CONSTANT("CURLOPT_HEADERFUNCTION", CURLOPT_HEADERFUNCTION);
REGISTER_CURL_CONSTANT("CURLOPT_MAXREDIRS", CURLOPT_MAXREDIRS);
REGISTER_CURL_CONSTANT("CURLOPT_MAXCONNECTS", CURLOPT_MAXCONNECTS);
REGISTER_CURL_CONSTANT("CURLOPT_CLOSEPOLICY", CURLOPT_CLOSEPOLICY);
REGISTER_CURL_CONSTANT("CURLOPT_FRESH_CONNECT", CURLOPT_FRESH_CONNECT);
REGISTER_CURL_CONSTANT("CURLOPT_FORBID_REUSE", CURLOPT_FORBID_REUSE);
REGISTER_CURL_CONSTANT("CURLOPT_RANDOM_FILE", CURLOPT_RANDOM_FILE);
REGISTER_CURL_CONSTANT("CURLOPT_EGDSOCKET", CURLOPT_EGDSOCKET);
REGISTER_CURL_CONSTANT("CURLOPT_CONNECTTIMEOUT", CURLOPT_CONNECTTIMEOUT);
REGISTER_CURL_CONSTANT("CURLOPT_SSL_VERIFYPEER", CURLOPT_SSL_VERIFYPEER);
REGISTER_CURL_CONSTANT("CURLOPT_CAINFO", CURLOPT_CAINFO);
REGISTER_CURL_CONSTANT("CURLOPT_BINARYTRANSFER", CURLOPT_BINARYTRANSFER);
REGISTER_CURL_CONSTANT(CURLOPT_PORT);
REGISTER_CURL_CONSTANT(CURLOPT_FILE);
REGISTER_CURL_CONSTANT(CURLOPT_INFILE);
REGISTER_CURL_CONSTANT(CURLOPT_INFILESIZE);
REGISTER_CURL_CONSTANT(CURLOPT_URL);
REGISTER_CURL_CONSTANT(CURLOPT_PROXY);
REGISTER_CURL_CONSTANT(CURLOPT_VERBOSE);
REGISTER_CURL_CONSTANT(CURLOPT_HEADER);
REGISTER_CURL_CONSTANT(CURLOPT_HTTPHEADER);
REGISTER_CURL_CONSTANT(CURLOPT_NOPROGRESS);
REGISTER_CURL_CONSTANT(CURLOPT_NOBODY);
REGISTER_CURL_CONSTANT(CURLOPT_FAILONERROR);
REGISTER_CURL_CONSTANT(CURLOPT_UPLOAD);
REGISTER_CURL_CONSTANT(CURLOPT_POST);
REGISTER_CURL_CONSTANT(CURLOPT_FTPLISTONLY);
REGISTER_CURL_CONSTANT(CURLOPT_FTPAPPEND);
REGISTER_CURL_CONSTANT(CURLOPT_NETRC);
REGISTER_CURL_CONSTANT(CURLOPT_FOLLOWLOCATION);
REGISTER_CURL_CONSTANT(CURLOPT_FTPASCII);
REGISTER_CURL_CONSTANT(CURLOPT_PUT);
REGISTER_CURL_CONSTANT(CURLOPT_MUTE);
REGISTER_CURL_CONSTANT(CURLOPT_USERPWD);
REGISTER_CURL_CONSTANT(CURLOPT_PROXYUSERPWD);
REGISTER_CURL_CONSTANT(CURLOPT_RANGE);
REGISTER_CURL_CONSTANT(CURLOPT_TIMEOUT);
REGISTER_CURL_CONSTANT(CURLOPT_POSTFIELDS);
REGISTER_CURL_CONSTANT(CURLOPT_REFERER);
REGISTER_CURL_CONSTANT(CURLOPT_USERAGENT);
REGISTER_CURL_CONSTANT(CURLOPT_FTPPORT);
REGISTER_CURL_CONSTANT(CURLOPT_LOW_SPEED_LIMIT);
REGISTER_CURL_CONSTANT(CURLOPT_LOW_SPEED_TIME);
REGISTER_CURL_CONSTANT(CURLOPT_RESUME_FROM);
REGISTER_CURL_CONSTANT(CURLOPT_COOKIE);
REGISTER_CURL_CONSTANT(CURLOPT_SSLCERT);
REGISTER_CURL_CONSTANT(CURLOPT_SSLCERTPASSWD);
REGISTER_CURL_CONSTANT(CURLOPT_WRITEHEADER);
REGISTER_CURL_CONSTANT(CURLOPT_SSL_VERIFYHOST);
REGISTER_CURL_CONSTANT(CURLOPT_COOKIEFILE);
REGISTER_CURL_CONSTANT(CURLOPT_SSLVERSION);
REGISTER_CURL_CONSTANT(CURLOPT_TIMECONDITION);
REGISTER_CURL_CONSTANT(CURLOPT_TIMEVALUE);
REGISTER_CURL_CONSTANT(CURLOPT_CUSTOMREQUEST);
REGISTER_CURL_CONSTANT(CURLOPT_STDERR);
REGISTER_CURL_CONSTANT(CURLOPT_TRANSFERTEXT);
REGISTER_CURL_CONSTANT(CURLOPT_RETURNTRANSFER);
REGISTER_CURL_CONSTANT(CURLOPT_QUOTE);
REGISTER_CURL_CONSTANT(CURLOPT_POSTQUOTE);
REGISTER_CURL_CONSTANT(CURLOPT_INTERFACE);
REGISTER_CURL_CONSTANT(CURLOPT_KRB4LEVEL);
REGISTER_CURL_CONSTANT(CURLOPT_HTTPPROXYTUNNEL);
REGISTER_CURL_CONSTANT(CURLOPT_FILETIME);
REGISTER_CURL_CONSTANT(CURLOPT_WRITEFUNCTION);
REGISTER_CURL_CONSTANT(CURLOPT_READFUNCTION);
REGISTER_CURL_CONSTANT(CURLOPT_PASSWDFUNCTION);
REGISTER_CURL_CONSTANT(CURLOPT_HEADERFUNCTION);
REGISTER_CURL_CONSTANT(CURLOPT_MAXREDIRS);
REGISTER_CURL_CONSTANT(CURLOPT_MAXCONNECTS);
REGISTER_CURL_CONSTANT(CURLOPT_CLOSEPOLICY);
REGISTER_CURL_CONSTANT(CURLOPT_FRESH_CONNECT);
REGISTER_CURL_CONSTANT(CURLOPT_FORBID_REUSE);
REGISTER_CURL_CONSTANT(CURLOPT_RANDOM_FILE);
REGISTER_CURL_CONSTANT(CURLOPT_EGDSOCKET);
REGISTER_CURL_CONSTANT(CURLOPT_CONNECTTIMEOUT);
REGISTER_CURL_CONSTANT(CURLOPT_SSL_VERIFYPEER);
REGISTER_CURL_CONSTANT(CURLOPT_CAINFO);
REGISTER_CURL_CONSTANT(CURLOPT_COOKIEJAR);
REGISTER_CURL_CONSTANT(CURLOPT_SSL_CIPHER_LIST);
REGISTER_CURL_CONSTANT(CURLOPT_BINARYTRANSFER);
/* Constants effecting the way CURLOPT_CLOSEPOLICY works */
REGISTER_CURL_CONSTANT("CURLCLOSEPOLICY_LEAST_RECENTLY_USED", CURLCLOSEPOLICY_LEAST_RECENTLY_USED);
REGISTER_CURL_CONSTANT("CURLCLOSEPOLICY_OLDEST", CURLCLOSEPOLICY_OLDEST);
REGISTER_CURL_CONSTANT(CURLCLOSEPOLICY_LEAST_RECENTLY_USED);
REGISTER_CURL_CONSTANT(CURLCLOSEPOLICY_LEAST_TRAFFIC);
REGISTER_CURL_CONSTANT(CURLCLOSEPOLICY_SLOWEST);
REGISTER_CURL_CONSTANT(CURLCLOSEPOLICY_CALLBACK);
REGISTER_CURL_CONSTANT(CURLCLOSEPOLICY_OLDEST);
/* Info constants */
REGISTER_CURL_CONSTANT("CURLINFO_EFFECTIVE_URL", CURLINFO_EFFECTIVE_URL);
REGISTER_CURL_CONSTANT("CURLINFO_HTTP_CODE", CURLINFO_HTTP_CODE);
REGISTER_CURL_CONSTANT("CURLINFO_HEADER_SIZE", CURLINFO_HEADER_SIZE);
REGISTER_CURL_CONSTANT("CURLINFO_REQUEST_SIZE", CURLINFO_REQUEST_SIZE);
REGISTER_CURL_CONSTANT("CURLINFO_TOTAL_TIME", CURLINFO_TOTAL_TIME);
REGISTER_CURL_CONSTANT("CURLINFO_NAMELOOKUP_TIME", CURLINFO_NAMELOOKUP_TIME);
REGISTER_CURL_CONSTANT("CURLINFO_CONNECT_TIME", CURLINFO_CONNECT_TIME);
REGISTER_CURL_CONSTANT("CURLINFO_PRETRANSFER_TIME", CURLINFO_PRETRANSFER_TIME);
REGISTER_CURL_CONSTANT("CURLINFO_SIZE_UPLOAD", CURLINFO_SIZE_UPLOAD);
REGISTER_CURL_CONSTANT("CURLINFO_SIZE_DOWNLOAD", CURLINFO_SIZE_DOWNLOAD);
REGISTER_CURL_CONSTANT("CURLINFO_SPEED_DOWNLOAD", CURLINFO_SPEED_DOWNLOAD);
REGISTER_CURL_CONSTANT("CURLINFO_SPEED_UPLOAD", CURLINFO_SPEED_UPLOAD);
REGISTER_CURL_CONSTANT("CURLINFO_FILETIME", CURLINFO_FILETIME);
REGISTER_CURL_CONSTANT(CURLINFO_EFFECTIVE_URL);
REGISTER_CURL_CONSTANT(CURLINFO_HTTP_CODE);
REGISTER_CURL_CONSTANT(CURLINFO_HEADER_SIZE);
REGISTER_CURL_CONSTANT(CURLINFO_REQUEST_SIZE);
REGISTER_CURL_CONSTANT(CURLINFO_TOTAL_TIME);
REGISTER_CURL_CONSTANT(CURLINFO_NAMELOOKUP_TIME);
REGISTER_CURL_CONSTANT(CURLINFO_CONNECT_TIME);
REGISTER_CURL_CONSTANT(CURLINFO_PRETRANSFER_TIME);
REGISTER_CURL_CONSTANT(CURLINFO_SIZE_UPLOAD);
REGISTER_CURL_CONSTANT(CURLINFO_SIZE_DOWNLOAD);
REGISTER_CURL_CONSTANT(CURLINFO_SPEED_DOWNLOAD);
REGISTER_CURL_CONSTANT(CURLINFO_SPEED_UPLOAD);
REGISTER_CURL_CONSTANT(CURLINFO_FILETIME);
REGISTER_CURL_CONSTANT(CURLINFO_SSL_VERIFYRESULT);
REGISTER_CURL_CONSTANT(CURLINFO_CONTENT_LENGTH_DOWNLOAD);
REGISTER_CURL_CONSTANT(CURLINFO_CONTENT_LENGTH_UPLOAD);
/* Error Constants */
REGISTER_CURL_CONSTANT("CURLE_OK", CURLE_OK);
REGISTER_CURL_CONSTANT("CURLE_UNSUPPORTED_PROTOCOL", CURLE_UNSUPPORTED_PROTOCOL);
REGISTER_CURL_CONSTANT("CURLE_FAILED_INIT", CURLE_FAILED_INIT);
REGISTER_CURL_CONSTANT("CURLE_URL_MALFORMAT", CURLE_URL_MALFORMAT);
REGISTER_CURL_CONSTANT("CURLE_URL_MALFORMAT_USER", CURLE_URL_MALFORMAT_USER);
REGISTER_CURL_CONSTANT("CURLE_COULDNT_RESOLVE_PROXY", CURLE_COULDNT_RESOLVE_PROXY);
REGISTER_CURL_CONSTANT("CURLE_COULDNT_RESOLVE_HOST", CURLE_COULDNT_RESOLVE_HOST);
REGISTER_CURL_CONSTANT("CURLE_COULDNT_CONNECT", CURLE_COULDNT_CONNECT);
REGISTER_CURL_CONSTANT("CURLE_FTP_WEIRD_SERVER_REPLY", CURLE_FTP_WEIRD_SERVER_REPLY);
REGISTER_CURL_CONSTANT("CURLE_FTP_ACCESS_DENIED", CURLE_FTP_ACCESS_DENIED);
REGISTER_CURL_CONSTANT("CURLE_FTP_USER_PASSWORD_INCORRECT", CURLE_FTP_USER_PASSWORD_INCORRECT);
REGISTER_CURL_CONSTANT("CURLE_FTP_WEIRD_PASS_REPLY", CURLE_FTP_WEIRD_PASS_REPLY);
REGISTER_CURL_CONSTANT("CURLE_FTP_WEIRD_USER_REPLY", CURLE_FTP_WEIRD_USER_REPLY);
REGISTER_CURL_CONSTANT("CURLE_FTP_WEIRD_PASV_REPLY", CURLE_FTP_WEIRD_PASV_REPLY);
REGISTER_CURL_CONSTANT("CURLE_FTP_WEIRD_227_FORMAT", CURLE_FTP_WEIRD_227_FORMAT);
REGISTER_CURL_CONSTANT("CURLE_FTP_CANT_GET_HOST", CURLE_FTP_CANT_GET_HOST);
REGISTER_CURL_CONSTANT("CURLE_FTP_CANT_RECONNECT", CURLE_FTP_CANT_RECONNECT);
REGISTER_CURL_CONSTANT("CURLE_FTP_COULDNT_SET_BINARY", CURLE_FTP_COULDNT_SET_BINARY);
REGISTER_CURL_CONSTANT("CURLE_PARTIAL_FILE", CURLE_PARTIAL_FILE);
REGISTER_CURL_CONSTANT("CURLE_FTP_COULDNT_RETR_FILE", CURLE_FTP_COULDNT_RETR_FILE);
REGISTER_CURL_CONSTANT("CURLE_FTP_WRITE_ERROR", CURLE_FTP_WRITE_ERROR);
REGISTER_CURL_CONSTANT("CURLE_FTP_QUOTE_ERROR", CURLE_FTP_QUOTE_ERROR);
REGISTER_CURL_CONSTANT("CURLE_HTTP_NOT_FOUND", CURLE_HTTP_NOT_FOUND);
REGISTER_CURL_CONSTANT("CURLE_WRITE_ERROR", CURLE_WRITE_ERROR);
REGISTER_CURL_CONSTANT("CURLE_MALFORMAT_USER", CURLE_MALFORMAT_USER);
REGISTER_CURL_CONSTANT("CURLE_FTP_COULDNT_STOR_FILE", CURLE_FTP_COULDNT_STOR_FILE);
REGISTER_CURL_CONSTANT("CURLE_READ_ERROR", CURLE_READ_ERROR);
REGISTER_CURL_CONSTANT("CURLE_OUT_OF_MEMORY", CURLE_OUT_OF_MEMORY);
REGISTER_CURL_CONSTANT("CURLE_OPERATION_TIMEOUTED", CURLE_OPERATION_TIMEOUTED);
REGISTER_CURL_CONSTANT("CURLE_FTP_COULDNT_SET_ASCII", CURLE_FTP_COULDNT_SET_ASCII);
REGISTER_CURL_CONSTANT("CURLE_FTP_PORT_FAILED", CURLE_FTP_PORT_FAILED);
REGISTER_CURL_CONSTANT("CURLE_FTP_COULDNT_USE_REST", CURLE_FTP_COULDNT_USE_REST);
REGISTER_CURL_CONSTANT("CURLE_FTP_COULDNT_GET_SIZE", CURLE_FTP_COULDNT_GET_SIZE);
REGISTER_CURL_CONSTANT("CURLE_HTTP_RANGE_ERROR", CURLE_HTTP_RANGE_ERROR);
REGISTER_CURL_CONSTANT("CURLE_HTTP_POST_ERROR", CURLE_HTTP_POST_ERROR);
REGISTER_CURL_CONSTANT("CURLE_SSL_CONNECT_ERROR", CURLE_SSL_CONNECT_ERROR);
REGISTER_CURL_CONSTANT("CURLE_FTP_BAD_DOWNLOAD_RESUME", CURLE_FTP_BAD_DOWNLOAD_RESUME);
REGISTER_CURL_CONSTANT("CURLE_FILE_COULDNT_READ_FILE", CURLE_FILE_COULDNT_READ_FILE);
REGISTER_CURL_CONSTANT("CURLE_LDAP_CANNOT_BIND", CURLE_LDAP_CANNOT_BIND);
REGISTER_CURL_CONSTANT("CURLE_LDAP_SEARCH_FAILED", CURLE_LDAP_SEARCH_FAILED);
REGISTER_CURL_CONSTANT("CURLE_LIBRARY_NOT_FOUND", CURLE_LIBRARY_NOT_FOUND);
REGISTER_CURL_CONSTANT("CURLE_FUNCTION_NOT_FOUND", CURLE_FUNCTION_NOT_FOUND);
REGISTER_CURL_CONSTANT("CURLE_ABORTED_BY_CALLBACK", CURLE_ABORTED_BY_CALLBACK);
REGISTER_CURL_CONSTANT("CURLE_BAD_FUNCTION_ARGUMENT", CURLE_BAD_FUNCTION_ARGUMENT);
REGISTER_CURL_CONSTANT("CURLE_BAD_CALLING_ORDER", CURLE_BAD_CALLING_ORDER);
REGISTER_CURL_CONSTANT("CURLE_HTTP_PORT_FAILED", CURLE_HTTP_PORT_FAILED);
REGISTER_CURL_CONSTANT("CURLE_BAD_PASSWORD_ENTERED", CURLE_BAD_PASSWORD_ENTERED);
REGISTER_CURL_CONSTANT("CURLE_TOO_MANY_REDIRECTS", CURLE_TOO_MANY_REDIRECTS);
REGISTER_CURL_CONSTANT("CURLE_UNKOWN_TELNET_OPTION", CURLE_UNKNOWN_TELNET_OPTION);
REGISTER_CURL_CONSTANT("CURLE_TELNET_OPTION_SYNTAX", CURLE_TELNET_OPTION_SYNTAX);
REGISTER_CURL_CONSTANT("CURLE_ALREADY_COMPLETE", CURLE_ALREADY_COMPLETE);
REGISTER_CURL_CONSTANT(CURLE_OK);
REGISTER_CURL_CONSTANT(CURLE_UNSUPPORTED_PROTOCOL);
REGISTER_CURL_CONSTANT(CURLE_FAILED_INIT);
REGISTER_CURL_CONSTANT(CURLE_URL_MALFORMAT);
REGISTER_CURL_CONSTANT(CURLE_URL_MALFORMAT_USER);
REGISTER_CURL_CONSTANT(CURLE_COULDNT_RESOLVE_PROXY);
REGISTER_CURL_CONSTANT(CURLE_COULDNT_RESOLVE_HOST);
REGISTER_CURL_CONSTANT(CURLE_COULDNT_CONNECT);
REGISTER_CURL_CONSTANT(CURLE_FTP_WEIRD_SERVER_REPLY);
REGISTER_CURL_CONSTANT(CURLE_FTP_ACCESS_DENIED);
REGISTER_CURL_CONSTANT(CURLE_FTP_USER_PASSWORD_INCORRECT);
REGISTER_CURL_CONSTANT(CURLE_FTP_WEIRD_PASS_REPLY);
REGISTER_CURL_CONSTANT(CURLE_FTP_WEIRD_USER_REPLY);
REGISTER_CURL_CONSTANT(CURLE_FTP_WEIRD_PASV_REPLY);
REGISTER_CURL_CONSTANT(CURLE_FTP_WEIRD_227_FORMAT);
REGISTER_CURL_CONSTANT(CURLE_FTP_CANT_GET_HOST);
REGISTER_CURL_CONSTANT(CURLE_FTP_CANT_RECONNECT);
REGISTER_CURL_CONSTANT(CURLE_FTP_COULDNT_SET_BINARY);
REGISTER_CURL_CONSTANT(CURLE_PARTIAL_FILE);
REGISTER_CURL_CONSTANT(CURLE_FTP_COULDNT_RETR_FILE);
REGISTER_CURL_CONSTANT(CURLE_FTP_WRITE_ERROR);
REGISTER_CURL_CONSTANT(CURLE_FTP_QUOTE_ERROR);
REGISTER_CURL_CONSTANT(CURLE_HTTP_NOT_FOUND);
REGISTER_CURL_CONSTANT(CURLE_WRITE_ERROR);
REGISTER_CURL_CONSTANT(CURLE_MALFORMAT_USER);
REGISTER_CURL_CONSTANT(CURLE_FTP_COULDNT_STOR_FILE);
REGISTER_CURL_CONSTANT(CURLE_READ_ERROR);
REGISTER_CURL_CONSTANT(CURLE_OUT_OF_MEMORY);
REGISTER_CURL_CONSTANT(CURLE_OPERATION_TIMEOUTED);
REGISTER_CURL_CONSTANT(CURLE_FTP_COULDNT_SET_ASCII);
REGISTER_CURL_CONSTANT(CURLE_FTP_PORT_FAILED);
REGISTER_CURL_CONSTANT(CURLE_FTP_COULDNT_USE_REST);
REGISTER_CURL_CONSTANT(CURLE_FTP_COULDNT_GET_SIZE);
REGISTER_CURL_CONSTANT(CURLE_HTTP_RANGE_ERROR);
REGISTER_CURL_CONSTANT(CURLE_HTTP_POST_ERROR);
REGISTER_CURL_CONSTANT(CURLE_SSL_CONNECT_ERROR);
REGISTER_CURL_CONSTANT(CURLE_FTP_BAD_DOWNLOAD_RESUME);
REGISTER_CURL_CONSTANT(CURLE_FILE_COULDNT_READ_FILE);
REGISTER_CURL_CONSTANT(CURLE_LDAP_CANNOT_BIND);
REGISTER_CURL_CONSTANT(CURLE_LDAP_SEARCH_FAILED);
REGISTER_CURL_CONSTANT(CURLE_LIBRARY_NOT_FOUND);
REGISTER_CURL_CONSTANT(CURLE_FUNCTION_NOT_FOUND);
REGISTER_CURL_CONSTANT(CURLE_ABORTED_BY_CALLBACK);
REGISTER_CURL_CONSTANT(CURLE_BAD_FUNCTION_ARGUMENT);
REGISTER_CURL_CONSTANT(CURLE_BAD_CALLING_ORDER);
REGISTER_CURL_CONSTANT(CURLE_HTTP_PORT_FAILED);
REGISTER_CURL_CONSTANT(CURLE_BAD_PASSWORD_ENTERED);
REGISTER_CURL_CONSTANT(CURLE_TOO_MANY_REDIRECTS);
REGISTER_CURL_CONSTANT(CURLE_UNKNOWN_TELNET_OPTION);
REGISTER_CURL_CONSTANT(CURLE_TELNET_OPTION_SYNTAX);
REGISTER_CURL_CONSTANT(CURLE_OBSOLETE);
REGISTER_CURL_CONSTANT(CURLE_SSL_PEER_CERTIFICATE);
#if HAVE_OPENSSL_EXT /* OpenSSL already takes care of initialization */
startup_options = CURL_GLOBAL_NOTHING;
#else
startup_options = CURL_GLOBAL_ALL;
#endif
if (curl_global_init(startup_options) != CURLE_OK) {
return FAILURE;
}
return SUCCESS;
}
/* }}} */
/* {{{ PHP_MSHUTDOWN_FUNCTION
*/
PHP_MSHUTDOWN_FUNCTION(curl)
{
curl_global_cleanup();
if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
return FAILURE;
}
return SUCCESS;
}
/* }}} */
@@ -283,6 +311,7 @@ static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
zval *argv[2];
zval *retval;
int error;
TSRMLS_FETCH();
MAKE_STD_ZVAL(argv[0]);
MAKE_STD_ZVAL(argv[1]);
@@ -297,7 +326,7 @@ static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
t->func,
retval, 2, argv TSRMLS_CC);
if (error == FAILURE) {
php_error(E_WARNING, "Cannot call the CURLOPT_WRITEFUNCTION");
php_error(E_WARNING, "Couldn't call the CURLOPT_WRITEFUNCTION");
length = -1;
}
else {
@@ -323,7 +352,6 @@ static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
php_curl *ch = (php_curl *) ctx;
php_curl_read *t = ch->handlers->read;
int length = -1;
TSRMLS_FETCH();
switch (t->method) {
case PHP_CURL_DIRECT:
@@ -334,6 +362,7 @@ static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
zval *retval;
int length;
int error;
TSRMLS_FETCH();
MAKE_STD_ZVAL(argv[0]);
MAKE_STD_ZVAL(argv[1]);
@@ -399,6 +428,7 @@ static size_t curl_write_header(char *data, size_t size, size_t nmemb, void *ctx
case PHP_CURL_USER: {
zval *argv[2];
zval *retval;
TSRMLS_FETCH();
MAKE_STD_ZVAL(argv[0]);
MAKE_STD_ZVAL(argv[1]);
@@ -441,7 +471,7 @@ static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
php_curl *ch = (php_curl *) ctx;
zval *func = ch->handlers->passwd;
zval *argv[3];
zval *retval;
zval *retval = NULL;
int error;
int ret = 0;
TSRMLS_FETCH();
@@ -527,6 +557,7 @@ static void alloc_curl_handle(php_curl **ch)
(*ch)->handlers->write = ecalloc(1, sizeof(php_curl_write));
(*ch)->handlers->write_header = ecalloc(1, sizeof(php_curl_write));
(*ch)->handlers->read = ecalloc(1, sizeof(php_curl_read));
(*ch)->performed = 0;
memset(&(*ch)->err, 0, sizeof((*ch)->err));
zend_llist_init(&(*ch)->to_free.str, sizeof(char *),
@@ -659,7 +690,9 @@ PHP_FUNCTION(curl_setopt)
case CURLOPT_KRB4LEVEL:
case CURLOPT_RANDOM_FILE:
case CURLOPT_EGDSOCKET:
case CURLOPT_CAINFO: {
case CURLOPT_CAINFO:
case CURLOPT_COOKIEJAR:
case CURLOPT_SSL_CIPHER_LIST: {
char *copystr = NULL;
convert_to_string_ex(zvalue);
@@ -674,9 +707,12 @@ PHP_FUNCTION(curl_setopt)
case CURLOPT_INFILE:
case CURLOPT_WRITEHEADER:
case CURLOPT_STDERR: {
FILE *fp;
FILE *fp = NULL;
ZEND_FETCH_RESOURCE(fp, FILE *, zvalue, -1, "File-Handle", php_file_le_fopen());
if (!fp) {
RETURN_FALSE;
}
error = CURLE_OK;
switch (option) {
case CURLOPT_FILE:
@@ -737,7 +773,11 @@ PHP_FUNCTION(curl_setopt)
HashTable *postfields;
struct HttpPost *first = NULL;
struct HttpPost *last = NULL;
char *postval;
char *string_key = NULL;
ulong num_key;
uint string_key_len;
postfields = HASH_OF(*zvalue);
if (! postfields) {
php_error(E_WARNING, "Couldn't get HashTable in CURLOPT_POSTFIELDS");
@@ -747,19 +787,20 @@ PHP_FUNCTION(curl_setopt)
for (zend_hash_internal_pointer_reset(postfields);
zend_hash_get_current_data(postfields, (void **) &current) == SUCCESS;
zend_hash_move_forward(postfields)) {
char *string_key = NULL;
char *postval = NULL;
ulong num_key;
SEPARATE_ZVAL(current);
convert_to_string_ex(current);
zend_hash_get_current_key(postfields, &string_key, &num_key, 0);
postval = emalloc(strlen(string_key) + Z_STRLEN_PP(current) + 1);
sprintf(postval, "%s=%s", string_key, Z_STRVAL_PP(current));
error = curl_formparse(postval, &first, &last);
zend_hash_get_current_key_ex(postfields, &string_key, &string_key_len, &num_key, 0, NULL);
postval = Z_STRVAL_PP(current);
if (*postval == '@') {
error = curl_formadd(&first, &last, CURLFORM_COPYNAME, string_key,
CURLFORM_FILE, ++postval, CURLFORM_END);
}
else {
error = curl_formadd(&first, &last, CURLFORM_COPYNAME, string_key,
CURLFORM_PTRCONTENTS, postval, CURLFORM_END);
}
}
if (error != CURLE_OK) {
@@ -786,26 +827,26 @@ PHP_FUNCTION(curl_setopt)
case CURLOPT_QUOTE:
case CURLOPT_POSTQUOTE: {
zval **current;
HashTable *hash;
HashTable *ph;
struct curl_slist *slist = NULL;
hash = HASH_OF(*zvalue);
if (! hash) {
ph = HASH_OF(*zvalue);
if (! ph) {
php_error(E_WARNING,
"You must pass either an object or an array with the CURLOPT_HTTPHEADER, CURLOPT_QUOTE and CURLOPT_POSTQUOTE arguments");
"You must pass either an object or an array with the CURLOPT_HTTPHEADER,"
"CURLOPT_QUOTE and CURLOPT_POSTQUOTE arguments");
RETURN_FALSE;
}
for (zend_hash_internal_pointer_reset(hash);
zend_hash_get_current_data(hash, (void **) &current) == SUCCESS;
zend_hash_move_forward(hash)) {
for (zend_hash_internal_pointer_reset(ph);
zend_hash_get_current_data(ph, (void **) &current) == SUCCESS;
zend_hash_move_forward(ph)) {
char *indiv = NULL;
SEPARATE_ZVAL(current);
convert_to_string_ex(current);
indiv = estrndup(Z_STRVAL_PP(current), Z_STRLEN_PP(current) + 1);
indiv[Z_STRLEN_PP(current)] = '\0';
slist = curl_slist_append(slist, indiv);
if (! slist) {
efree(indiv);
@@ -845,6 +886,11 @@ PHP_FUNCTION(curl_exec)
}
ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl);
if (ch->performed) {
php_error(E_WARNING, "Multiple executions on the same handle are not currently supported, please upgrade to the next version of PHP");
RETURN_FALSE;
}
error = curl_easy_perform(ch->cp);
if (error != CURLE_OK) {
if (ch->handlers->write->buf.c)
@@ -853,6 +899,8 @@ PHP_FUNCTION(curl_exec)
RETURN_FALSE;
}
ch->performed = 1;
if (ch->handlers->write->method == PHP_CURL_RETURN) {
if (ch->handlers->write->type != PHP_CURL_BINARY)
smart_str_0(&ch->handlers->write->buf);
@@ -863,6 +911,10 @@ PHP_FUNCTION(curl_exec)
}
/* }}} */
#define CAAL(s, v) add_assoc_long_ex(return_value, s, sizeof(s), v);
#define CAAD(s, v) add_assoc_double_ex(return_value, s, sizeof(s), v);
#define CAAS(s, v) add_assoc_string_ex(return_value, s, sizeof(s), v, 1);
/* {{{ proto string curl_getinfo(int ch, int opt)
Get information regarding a specific transfer */
PHP_FUNCTION(curl_getinfo)
@@ -887,31 +939,37 @@ PHP_FUNCTION(curl_getinfo)
array_init(return_value);
curl_easy_getinfo(ch->cp, CURLINFO_EFFECTIVE_URL, &url);
add_assoc_string(return_value, "url", url, 1);
CAAS("url", url);
curl_easy_getinfo(ch->cp, CURLINFO_HTTP_CODE, &l_code);
add_assoc_long(return_value, "http_code", l_code);
CAAL("http_code", l_code);
curl_easy_getinfo(ch->cp, CURLINFO_HEADER_SIZE, &l_code);
add_assoc_long(return_value, "header_size", l_code);
CAAL("header_size", l_code);
curl_easy_getinfo(ch->cp, CURLINFO_REQUEST_SIZE, &l_code);
add_assoc_long(return_value, "request_size", l_code);
CAAL("request_size", l_code);
curl_easy_getinfo(ch->cp, CURLINFO_FILETIME, &l_code);
add_assoc_long(return_value, "filetime", l_code);
CAAL("filetime", l_code);
curl_easy_getinfo(ch->cp, CURLINFO_SSL_VERIFYRESULT, &l_code);
CAAL("ssl_verify_result", l_code);
curl_easy_getinfo(ch->cp, CURLINFO_TOTAL_TIME, &d_code);
add_assoc_double(return_value, "total_time", d_code);
CAAD("total_time", d_code);
curl_easy_getinfo(ch->cp, CURLINFO_NAMELOOKUP_TIME, &d_code);
add_assoc_double(return_value, "namelookup_time", d_code);
CAAD("namelookup_time", d_code);
curl_easy_getinfo(ch->cp, CURLINFO_CONNECT_TIME, &d_code);
add_assoc_double(return_value, "connect_time", d_code);
CAAD("connect_time", d_code);
curl_easy_getinfo(ch->cp, CURLINFO_PRETRANSFER_TIME, &d_code);
add_assoc_double(return_value, "pretransfer_time", d_code);
CAAD("pretransfer_time", d_code);
curl_easy_getinfo(ch->cp, CURLINFO_SIZE_UPLOAD, &d_code);
add_assoc_double(return_value, "size_upload", d_code);
CAAD("size_upload", d_code);
curl_easy_getinfo(ch->cp, CURLINFO_SIZE_DOWNLOAD, &d_code);
add_assoc_double(return_value, "size_download", d_code);
CAAD("size_download", d_code);
curl_easy_getinfo(ch->cp, CURLINFO_SPEED_DOWNLOAD, &d_code);
add_assoc_double(return_value, "speed_download", d_code);
CAAD("speed_download", d_code);
curl_easy_getinfo(ch->cp, CURLINFO_SPEED_UPLOAD, &d_code);
add_assoc_double(return_value, "speed_upload", d_code);
CAAD("speed_upload", d_code);
curl_easy_getinfo(ch->cp, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &d_code);
CAAD("download_content_length", d_code);
curl_easy_getinfo(ch->cp, CURLINFO_CONTENT_LENGTH_UPLOAD, &d_code);
CAAD("upload_content_length", d_code);
} else {
option = Z_LVAL_PP(zoption);
switch (option) {
@@ -926,7 +984,8 @@ PHP_FUNCTION(curl_getinfo)
case CURLINFO_HTTP_CODE:
case CURLINFO_HEADER_SIZE:
case CURLINFO_REQUEST_SIZE:
case CURLINFO_FILETIME: {
case CURLINFO_FILETIME:
case CURLINFO_SSL_VERIFYRESULT: {
long code;
curl_easy_getinfo(ch->cp, option, &code);
@@ -941,7 +1000,9 @@ PHP_FUNCTION(curl_getinfo)
case CURLINFO_SIZE_UPLOAD:
case CURLINFO_SIZE_DOWNLOAD:
case CURLINFO_SPEED_DOWNLOAD:
case CURLINFO_SPEED_UPLOAD: {
case CURLINFO_SPEED_UPLOAD:
case CURLINFO_CONTENT_LENGTH_DOWNLOAD:
case CURLINFO_CONTENT_LENGTH_UPLOAD: {
double code;
curl_easy_getinfo(ch->cp, option, &code);
@@ -1037,6 +1098,6 @@ static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC)
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 tw=78 fdm=marker
* vim<600: sw=4 ts=4 tw=78
* vim600: noet sw=4 ts=4 fdm=marker
* vim<600: noet sw=4 ts=4
*/
+2
View File
@@ -41,6 +41,7 @@ extern zend_module_entry curl_module_entry;
#define CURLOPT_BINARYTRANSFER 19914
PHP_MINIT_FUNCTION(curl);
PHP_MSHUTDOWN_FUNCTION(curl);
PHP_MINFO_FUNCTION(curl);
PHP_FUNCTION(curl_version);
PHP_FUNCTION(curl_init);
@@ -90,6 +91,7 @@ typedef struct {
struct _php_curl_error err;
struct _php_curl_free to_free;
long id;
int performed;
} php_curl;
+1 -21
View File
@@ -116,9 +116,7 @@ static zend_function_entry domxml_functions[] = {
static function_entry php_domxmldoc_class_functions[] = {
/* PHP_FALIAS(domdocument, xmldoc, NULL) */
{"domdocument", PHP_FN(xmldoc), NULL},
PHP_NAMED_FE(domdocument, PHP_FN(xmldoc), NULL)
PHP_FALIAS(doctype, domxml_doc_doctype, NULL)
PHP_FALIAS(implementation, domxml_doc_implementation, NULL)
PHP_FALIAS(root, domxml_doc_document_element, NULL) /* not DOM */
@@ -133,9 +131,6 @@ static function_entry php_domxmldoc_class_functions[] = {
PHP_FALIAS(imported_node, domxml_doc_imported_node, NULL)
PHP_FALIAS(dtd, domxml_intdtd, NULL)
PHP_FALIAS(dumpmem, domxml_dumpmem, NULL)
/*
PHP_FALIAS(create_cdata_section, domxml_create_cdata_section, NULL)
*/
#if defined(LIBXML_XPATH_ENABLED)
PHP_FALIAS(xpath_init, xpath_init, NULL)
PHP_FALIAS(xpath_new_context, xpath_new_context, NULL)
@@ -146,13 +141,6 @@ static function_entry php_domxmldoc_class_functions[] = {
static function_entry php_domxmldoctype_class_functions[] = {
PHP_FALIAS(name, domxml_doctype_name, NULL)
/*
PHP_FALIAS(entities, domxml_doctype_entities, NULL)
PHP_FALIAS(notations, domxml_doctype_notations, NULL)
PHP_FALIAS(system_id, domxml_doctype_system_id, NULL)
PHP_FALIAS(public_id, domxml_doctype_public_id, NULL)
PHP_FALIAS(internal_subset, domxml_doctype_internal_subset, NULL)
*/
{NULL, NULL, NULL}
};
@@ -225,11 +213,6 @@ static zend_function_entry php_domxmlentityref_class_functions[] = {
};
static zend_function_entry php_domxmlentity_class_functions[] = {
/*
PHP_FALIAS(public_id, domxml_entity_public_id, NULL)
PHP_FALIAS(system_id, domxml_entity_system_id, NULL)
PHP_FALIAS(notation_name, domxml_entity_notation_name, NULL)
*/
{NULL, NULL, NULL}
};
@@ -255,9 +238,6 @@ static zend_function_entry php_domxmlattr_class_functions[] = {
PHP_FALIAS(name, domxml_attr_name, NULL)
PHP_FALIAS(value, domxml_attr_value, NULL)
PHP_FALIAS(specified, domxml_attr_specified, NULL)
/*
PHP_FALIAS(owner_element, domxml_attr_owner_element, NULL)
*/
{NULL, NULL, NULL}
};
+7 -5
View File
@@ -1592,8 +1592,9 @@ PHP_FUNCTION(imagecolorat)
#if HAVE_LIBGD20
if(gdImageTrueColor(im)) {
if (im->tpixels && gdImageBoundsSafe(im, Z_LVAL_PP(x), Z_LVAL_PP(y))) {
RETURN_LONG(im->tpixels[Z_LVAL_PP(x)][Z_LVAL_PP(y)]);
RETURN_LONG(gdImageTrueColorPixel(im, Z_LVAL_PP(x), Z_LVAL_PP(y)));
} else {
php_error(E_NOTICE, "%ld,%ld is out of bounds",Z_LVAL_PP(x), Z_LVAL_PP(y));
RETURN_FALSE;
}
} else {
@@ -1605,6 +1606,7 @@ PHP_FUNCTION(imagecolorat)
RETURN_LONG(im->pixels[Z_LVAL_PP(x)][Z_LVAL_PP(y)]);
#endif
} else {
php_error(E_NOTICE, "%ld,%ld is out of bounds",Z_LVAL_PP(x), Z_LVAL_PP(y));
RETURN_FALSE;
}
#if HAVE_LIBGD20
@@ -3534,8 +3536,8 @@ static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type )
else {
y_ratio = x_ratio;
}
dest_width = org_width / x_ratio;
dest_height = org_height / y_ratio;
dest_width = (int)(org_width / x_ratio);
dest_height = (int)(org_height / y_ratio);
}
else {
x_ratio = (float) dest_width / (float) org_width;
@@ -3547,8 +3549,8 @@ static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type )
else {
y_ratio = x_ratio;
}
dest_width = org_width * x_ratio;
dest_height = org_height * y_ratio;
dest_width = (int)(org_width * x_ratio);
dest_height = (int)(org_height * y_ratio);
}
im_tmp = gdImageCreate (dest_width, dest_height);
+1
View File
@@ -2100,6 +2100,7 @@ PHP_FUNCTION(imap_rfc822_parse_adrlist)
ZEND_WRONG_PARAM_COUNT();
}
SEPARATE_ZVAL(str);
convert_to_string_ex(str);
convert_to_string_ex(defaulthost);
+3 -2
View File
@@ -210,6 +210,7 @@ PHP_MINIT_FUNCTION(ldap)
le_result = zend_register_list_destructors_ex(_free_ldap_result, NULL, "ldap result", module_number);
le_link = zend_register_list_destructors_ex(_close_ldap_link, NULL, "ldap link", module_number);
le_result_entry = zend_register_list_destructors_ex(NULL, NULL, "ldap result entry", module_number);
le_ber_entry = zend_register_list_destructors_ex(NULL, NULL, "ldap ber entry", module_number);
ldap_module_entry.type = type;
@@ -990,7 +991,7 @@ PHP_FUNCTION(ldap_first_attribute)
if ((attribute = ldap_first_attribute(ldap, ldap_result_entry, &ber)) == NULL) {
RETURN_FALSE;
} else {
ZEND_REGISTER_RESOURCE(return_value, ber, le_ber_entry);
ZEND_REGISTER_RESOURCE(*berp, ber, le_ber_entry);
RETVAL_STRING(attribute, 1);
#if ( LDAP_API_VERSION > 2000 ) || HAVE_NSLDAP || WINDOWS
@@ -1021,7 +1022,7 @@ PHP_FUNCTION(ldap_next_attribute)
if ((attribute = ldap_next_attribute(ldap, ldap_result_entry, ber)) == NULL) {
RETURN_FALSE;
} else {
ZEND_REGISTER_RESOURCE(return_value, ber, le_ber_entry);
ZEND_REGISTER_RESOURCE(*berp, ber, le_ber_entry);
RETVAL_STRING(attribute, 1);
#if ( LDAP_API_VERSION > 2000 ) || HAVE_NSLDAP || WINDOWS
+1 -1
View File
@@ -1238,7 +1238,7 @@ PHP_FUNCTION(mssql_fetch_object)
Returns an associative array of the current row in the result set specified by result_id */
PHP_FUNCTION(mssql_fetch_array)
{
php_mssql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, MSSQL_ASSOC);
php_mssql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, MSSQL_BOTH);
}
/* }}} */
+6 -4
View File
@@ -993,10 +993,12 @@ static void php_mysql_do_query_general(zval **query, zval **mysql_link, int link
MYSQL_RES *mysql_result;
mysql_result = (MYSQL_RES *) zend_list_find(mysql->active_result_id, &type);
if (mysql_result && type==le_result && !mysql_eof(mysql_result)) {
php_error(E_NOTICE, "Called %s() without first fetching all rows from a previous unbuffered query",
get_active_function_name(TSRMLS_C));
while (mysql_fetch_row(mysql_result));
if (mysql_result && type==le_result) {
if (!mysql_eof(mysql_result)) {
php_error(E_NOTICE, "Called %s() without first fetching all rows from a previous unbuffered query",
get_active_function_name(TSRMLS_C));
while (mysql_fetch_row(mysql_result));
}
zend_list_delete(mysql->active_result_id);
mysql->active_result_id = 0;
}
+1 -1
View File
@@ -32,7 +32,7 @@ if test "$PHP_NCURSES" != "no"; then
LIBNAME=ncurses
LIBSYMBOL=initscr
old_LIBS=$LIBS
LIBS="$LIBS -L$NCURSES_DIR/lib -lm -ldl"
LIBS="$LIBS -L$NCURSES_DIR/lib -lm"
AC_CHECK_LIB($LIBNAME, $LIBSYMBOL, [AC_DEFINE(HAVE_NCURSESLIB,1,[ ])],
[AC_MSG_ERROR(wrong ncurses lib version or lib not found)])
LIBS=$old_LIBS
-2
View File
@@ -1,2 +0,0 @@
Sablotron XSLT
Sterling Hughes
-5
View File
@@ -1,5 +0,0 @@
this extension is experimental,
its functions may change their names
or move to extension all together
so do not rely to much on them
you have been warned!
-8
View File
@@ -1,8 +0,0 @@
# $Id $
LTLIBRARY_NAME = libsablot.la
LTLIBRARY_SOURCES = sablot.c
LTLIBRARY_SHARED_NAME = sablot.la
LTLIBRARY_SHARED_LIBADD = $(SABLOT_SHARED_LIBADD)
include $(top_srcdir)/build/dynlib.mk
-68
View File
@@ -1,68 +0,0 @@
dnl $Id$
dnl config.m4 for extension Sablot
PHP_ARG_WITH(sablot, for Sablotron XSL support,
[ --with-sablot[=DIR] Include Sablotron support])
PHP_ARG_WITH(expat-dir, libexpat dir for Sablotron 0.50,
[ --with-expat-dir=DIR Sablotron: libexpat dir for Sablotron 0.50])
if test "$PHP_SABLOT" != "no"; then
PHP_EXTENSION(sablot, $ext_shared)
PHP_SUBST(SABLOT_SHARED_LIBADD)
if test -r $PHP_SABLOT/include/sablot.h; then
SABLOT_DIR=$PHP_SABLOT
else
AC_MSG_CHECKING(for Sablotron in default path)
for i in /usr/local /usr; do
if test -r $i/include/sablot.h; then
SABLOT_DIR=$i
AC_MSG_RESULT(found in $i)
fi
done
fi
if test -z "$SABLOT_DIR"; then
AC_MSG_RESULT(not found)
AC_MSG_ERROR(Please reinstall the Sablotron distribution)
fi
testval=no
for i in $PHP_EXPAT_DIR $SABLOT_DIR; do
if test -f $i/lib/libexpat.a -o -f $i/lib/libexpat.$SHLIB_SUFFIX_NAME; then
AC_DEFINE(HAVE_LIBEXPAT2,1,[ ])
PHP_ADD_LIBRARY_WITH_PATH(expat, $i/lib, SABLOT_SHARED_LIBADD)
PHP_ADD_INCLUDE($i/include)
AC_CHECK_LIB(sablot, SablotSetEncoding, AC_DEFINE(HAVE_SABLOT_SET_ENCODING,1,[ ]))
testval=yes
fi
done
if test "$testval" = "no"; then
PHP_ADD_LIBRARY(xmlparse)
PHP_ADD_LIBRARY(xmltok)
fi
PHP_ADD_INCLUDE($SABLOT_DIR/include)
PHP_ADD_LIBRARY_WITH_PATH(sablot, $SABLOT_DIR/lib, SABLOT_SHARED_LIBADD)
found_iconv=no
AC_CHECK_LIB(c, iconv_open, found_iconv=yes)
if test "$found_iconv" = "no"; then
for i in /usr /usr/local $ICONV_DIR; do
if test -f $i/lib/libconv.a -o -f $i/lib/libiconv.$SHLIB_SUFFIX_NAME; then
PHP_ADD_LIBRARY_WITH_PATH(iconv, $i/lib, SABLOT_SHARED_LIBADD)
found_iconv=yes
fi
done
fi
if test "$found_iconv" = "no"; then
AC_MSG_ERROR(iconv not found, in order to build sablotron you need the iconv library)
fi
AC_DEFINE(HAVE_SABLOT,1,[ ])
fi
-138
View File
@@ -1,138 +0,0 @@
/*
+----------------------------------------------------------------------+
| PHP version 4.0 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2001 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: Sterling Hughes <sterling@php.net> |
+----------------------------------------------------------------------+
*/
#ifndef PHP_SABLOT_H
#define PHP_SABLOT_H
#if HAVE_SABLOT
#include <sablot.h>
extern zend_module_entry sablot_module_entry;
#define phpext_sablot_ptr &sablot_module_entry
#ifdef PHP_WIN32
#define PHP_SABLOT_API __declspec(dllexport)
#else
#define PHP_SABLOT_API
#endif
/* Module functions */
PHP_MINIT_FUNCTION(sablot);
PHP_MINFO_FUNCTION(sablot);
PHP_MSHUTDOWN_FUNCTION(sablot);
/* Request functions */
PHP_RSHUTDOWN_FUNCTION(sablot);
/* Output transformation functions */
PHP_FUNCTION(xslt_output_begintransform);
PHP_FUNCTION(xslt_output_endtransform);
/* Basic transformation functions */
PHP_FUNCTION(xslt_transform);
PHP_FUNCTION(xslt_process);
/* Advanced API transformation functions */
PHP_FUNCTION(xslt_create);
PHP_FUNCTION(xslt_run);
PHP_FUNCTION(xslt_set_sax_handler);
PHP_FUNCTION(xslt_set_scheme_handler);
PHP_FUNCTION(xslt_set_error_handler);
#ifdef HAVE_SABLOT_SET_ENCODING
PHP_FUNCTION(xslt_set_encoding);
#endif
PHP_FUNCTION(xslt_set_base);
PHP_FUNCTION(xslt_fetch_result);
PHP_FUNCTION(xslt_free);
/* Error Handling functions */
PHP_FUNCTION(xslt_error);
PHP_FUNCTION(xslt_errno);
PHP_FUNCTION(xslt_openlog);
PHP_FUNCTION(xslt_closelog);
/* Sablotron error structure */
struct _php_sablot_error {
char *key;
char *value;
struct _php_sablot_error *next;
};
typedef struct _php_sablot_error php_sablot_error;
/* Sablotron Handle */
typedef struct {
/* Error Handling */
zval *errorHandler;
php_sablot_error *errors;
php_sablot_error errors_start;
int last_errno;
/* SAX Handling */
long index;
zval *startDocHandler;
zval *startElementHandler;
zval *endElementHandler;
zval *startNamespaceHandler;
zval *endNamespaceHandler;
zval *commentHandler;
zval *PIHandler;
zval *charactersHandler;
zval *endDocHandler;
/* Scheme Handling */
zval *getAllHandler;
/* Sablotron Related */
SablotHandle p;
} php_sablot;
/* Sablotron Globals */
ZEND_BEGIN_MODULE_GLOBALS(sablot)
zval *errorHandler;
php_sablot_error *errors;
php_sablot_error errors_start;
char *output_transform_file; /* For output transformations */
int last_errno; /* Global last_errno, if no handle is found */
SablotHandle processor;
ZEND_END_MODULE_GLOBALS(sablot)
#ifdef ZTS
#define SABLOTG(v) TSRMG(sablot_globals_id, php_sablot_globals *, v)
#else
#define SABLOTG(v) (sablot_globals.v)
#endif
#else
#define phpext_sablot_ptr NULL
#endif
#endif
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
-1685
View File
File diff suppressed because it is too large. Load diff
-107
View File
@@ -1,107 +0,0 @@
# Microsoft Developer Studio Project File - Name="sablot" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=sablot - 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 "sablot.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 "sablot.mak" CFG="sablot - Win32 Debug_TS"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "sablot - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "sablot - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "sablot - Win32 Debug_TS"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug_TS"
# PROP BASE Intermediate_Dir "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 Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SABLOT_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\\" /I "..\..\main" /I "..\..\TSRM" /I "..\..\ZEND" /D ZEND_WIN32=1 /D PHP_WIN32=1 /D "NDEBUG" /D "PHP_EXPORTS" /D "HAVE_SABLOT" /D COMPILE_DL_SABLOT=1 /D ZEND_DEBUG=0 /D "ZTS" /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x407 /d "_DEBUG"
# ADD RSC /l 0x407 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 php4ts_debug.lib sablot.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"..\..\Debug_TS/php_sablot.dll" /pdbtype:sept /libpath:"..\..\Debug_TS"
!ELSEIF "$(CFG)" == "sablot - Win32 Release_TS"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release_TS"
# PROP BASE Intermediate_Dir "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 Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SABLOT_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\\" /I "..\..\main" /I "..\..\TSRM" /I "..\..\ZEND" /D ZEND_WIN32=1 /D PHP_WIN32=1 /D "NDEBUG" /D "PHP_EXPORTS" /D "HAVE_SABLOT" /D COMPILE_DL_SABLOT=1 /D ZEND_DEBUG=0 /D "ZTS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x407 /d "NDEBUG"
# ADD RSC /l 0x407 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 php4ts.lib sablot.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_sablot.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline"
!ENDIF
# Begin Target
# Name "sablot - Win32 Debug_TS"
# Name "sablot - Win32 Release_TS"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\sablot.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\php_sablot.h
# End Source File
# End Group
# End Target
# End Project
+1 -1
View File
@@ -3,7 +3,7 @@ Get a value from an object of type Random
--SKIPIF--
<?php if (!extension_loaded("satellite")) print "skip";
// internet connection needed, try to lookup www.php.net
exec("host www.php.net 2>/dev/null", $output, &$rv);
exec("host www.php.net 2>/dev/null", $output, $rv);
if ($rv) print "skip";
?>
--POST--
+6 -2
View File
@@ -167,8 +167,12 @@ int php_session_register_serializer(const char *name,
#define PS_ADD_VAR(name) PS_ADD_VARL(name, strlen(name))
#define PS_DEL_VARL(name,namelen) \
zend_hash_del(&PS(vars), name, namelen + 1);
#define PS_DEL_VARL(name,namelen) \
zend_hash_del(&PS(vars), name, namelen+1); \
if (PS(http_session_vars)) { \
zend_hash_del(Z_ARRVAL_P(PS(http_session_vars)), name, namelen+1); \
}
#define PS_DEL_VAR(name) PS_DEL_VARL(name, strlen(name))
+15 -14
View File
@@ -265,14 +265,15 @@ void php_set_session_var(char *name, size_t namelen, zval *state_val,HashTable *
int php_get_session_var(char *name, size_t namelen, zval ***state_var TSRMLS_DC)
{
HashTable *ht = &EG(symbol_table);
if (!PG(register_globals))
ht = PS(http_session_vars) ? Z_ARRVAL_P(PS(http_session_vars)) : NULL;
if (!ht) return HASH_KEY_NON_EXISTANT;
return zend_hash_find(ht, name, namelen + 1, (void **)state_var);
if (PS(http_session_vars)) {
if (zend_hash_find(Z_ARRVAL_P(PS(http_session_vars)), name, namelen+1, (void **) state_var)==SUCCESS) {
return SUCCESS;
}
} else if (!PG(register_globals)) {
/* register_globals is disabled, but we don't have http_session_vars */
return HASH_KEY_NON_EXISTANT;
}
return zend_hash_find(&EG(symbol_table), name, namelen+1, (void **) state_var);
}
#define PS_BIN_NR_OF_BITS 8
@@ -534,12 +535,12 @@ static void php_session_save_current_state(TSRMLS_D)
uint variable_len;
ulong num_key;
HashPosition pos;
if (!PG(register_globals)) {
if (!PS(http_session_vars)) {
return;
}
if (!PG(register_globals) && !PS(http_session_vars)) {
return;
}
if (PS(http_session_vars)) {
for (zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(PS(http_session_vars)), &pos);
zend_hash_get_current_key_ex(Z_ARRVAL_P(PS(http_session_vars)), &variable, &variable_len, &num_key, 0, &pos) == HASH_KEY_IS_STRING;
zend_hash_move_forward_ex(Z_ARRVAL_P(PS(http_session_vars)),&pos)) {
+13 -9
View File
@@ -430,6 +430,8 @@ PHP_FUNCTION(socket_fd_alloc)
php_fd_set *php_fd = (php_fd_set*)emalloc(sizeof(php_fd_set));
FD_ZERO(&(php_fd->set));
php_fd->max_fd = 0;
ZEND_REGISTER_RESOURCE(return_value, php_fd, le_destroy);
}
@@ -557,6 +559,8 @@ PHP_FUNCTION(socket_fd_zero)
FD_ZERO(&(php_fd->set));
php_fd->max_fd = 0;
RETURN_TRUE;
}
/* }}} */
@@ -568,7 +572,7 @@ PHP_FUNCTION(socket_select)
zval *arg1, *arg2, *arg3, *arg4;
struct timeval tv;
php_fd_set *rfds = NULL, *wfds = NULL, *xfds = NULL;
SOCKET max_fd;
SOCKET max_fd = 0;
int sets = 0, usec = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r!r!r!z|l", &arg1, &arg2, &arg3, &arg4, &usec) == FAILURE)
@@ -729,7 +733,8 @@ PHP_FUNCTION(socket_write)
retval = send(php_sock->bsd_socket, str, min(length, str_len), 0);
#endif
if (retval <= 0) {
if (retval < 0) {
php_sock->error = errno;
php_error(E_WARNING, "%s() unable to write to socket %d [%d]: %s", get_active_function_name(TSRMLS_C), php_sock->bsd_socket, errno, php_strerror(errno));
RETURN_FALSE;
}
@@ -767,16 +772,15 @@ PHP_FUNCTION(socket_read)
retval = recv(php_sock->bsd_socket, tmpbuf, length, 0);
#endif
if (retval <= 0) {
if (retval != 0) {
/* Not EOF */
PHP_SOCKET_ERROR(php_sock, "unable to read from socket", errno);
}
if (retval == -1) {
PHP_SOCKET_ERROR(php_sock, "unable to read from socket", errno);
efree(tmpbuf);
RETURN_FALSE;
}
tmpbuf = erealloc(tmpbuf, retval + 1);
tmpbuf[ retval ] = '\0' ;
tmpbuf[retval] = 0;
RETURN_STRINGL(tmpbuf, retval, 0);
}
/* }}} */
@@ -958,7 +962,7 @@ PHP_FUNCTION(socket_connect)
} else {
char *q = (char *) &(sin.sin_addr.s_addr);
host_struct = gethostbyname(addr);
if (host_struct->h_addrtype != AF_INET) {
if ((! host_struct) || (host_struct->h_addrtype != AF_INET)) {
RETURN_FALSE;
}
+2 -2
View File
@@ -3133,9 +3133,9 @@ PHP_FUNCTION(array_map)
/* }}} */
/* {{{ proto bool key_exists(mixed key, array search)
/* {{{ proto bool array_key_exists(mixed key, array search)
Checks if the given key or index exists in the array */
PHP_FUNCTION(key_exists)
PHP_FUNCTION(array_key_exists)
{
zval **key, /* key to check for */
**array; /* array to check in */
+1 -1
View File
@@ -616,7 +616,7 @@ function_entry basic_functions[] = {
PHP_FE(array_sum, NULL)
PHP_FE(array_filter, NULL)
PHP_FE(array_map, NULL)
PHP_FE(key_exists, NULL)
PHP_FE(array_key_exists, NULL)
/* aliases from array.c */
PHP_FALIAS(pos, current, first_arg_force_ref)
+1 -1
View File
@@ -733,7 +733,7 @@ _php_math_basetozval(zval *arg, int base, zval *ret) {
if(!f_mode && (!mult || digit > LONG_MAX/mult || num > LONG_MAX-mult*digit)) {
f_mode = 1;
if(!mult) {
fmult = ULONG_MAX + 1;
fmult = ((double) ULONG_MAX) + 1;
} else {
fmult = (unsigned long)mult;
}
+1 -1
View File
@@ -77,7 +77,7 @@ PHP_FUNCTION(array_diff);
PHP_FUNCTION(array_sum);
PHP_FUNCTION(array_filter);
PHP_FUNCTION(array_map);
PHP_FUNCTION(key_exists);
PHP_FUNCTION(array_key_exists);
HashTable* php_splice(HashTable *, int, int, zval ***, int, HashTable **);
PHPAPI void php_array_merge(HashTable *dest, HashTable *src, int recursive);
+3 -3
View File
@@ -12,7 +12,7 @@ if (file_exists('test.file')) {
echo "test.file does not exist\n";
}
fclose (fopen('test.file', 'w'));
chmod ('test.file', 0654);
chmod ('test.file', 0744);
if (file_exists('test.file')) {
echo "test.file exists\n";
} else {
@@ -134,11 +134,11 @@ test.link lstat and stat differ at element 9
test.link lstat and stat differ at element 10
test.file is file
test.link is link
test.file permissions are 0654
test.file permissions are 0744
test.file size is 0
test.file is writeable
test.file is readable
test.file is not executable
test.file is executable
test.file is not executable
test.file is a regular file
test.link is a regular file
+11 -11
View File
@@ -61,13 +61,13 @@ FALSE ===@pow( 0, 2.0)
1.0 === pow( 2, 0.0)
2.0 === pow( 2, 1.0)
4.0 === pow( 2, 2.0)
2147483648 === pow(2,31)
-2147483648 === pow(-2,31)
2147483648 ~== pow(2,31)
-2147483648 ~== pow(-2,31)
1000000000 === pow(10,9)
100000000 === pow(-10,8)
1 === pow(-1,1443279822)
-1 === pow(-1,1443279821)
sqrt(2) === pow(2,1/2)
sqrt(2) ~== pow(2,1/2)
FALSE ===@pow(-2.0,-2.0)
FALSE ===@pow(-2.0,-1.0)
FALSE ===@pow(-2.0, 0.0)
@@ -120,19 +120,19 @@ FALSE ===@pow( 0.0,-1)
4.0 === pow( 2.0, 2)
LONG_MAX-1 === pow(LONG_MAX-1,1)
LONG_MIN+1 === pow(LONG_MIN+1,1)
(LONG_MAX-1)*(LONG_MAX-1) === pow(LONG_MAX-1,2)
(LONG_MIN+1)*(LONG_MIN+1) === pow(LONG_MIN+1,2)
(float)(LONG_MAX-1) === pow(LONG_MAX-1,1.0)
(LONG_MAX-1)*(LONG_MAX-1) ~== pow(LONG_MAX-1,2)
(LONG_MIN+1)*(LONG_MIN+1) ~== pow(LONG_MIN+1,2)
(float)(LONG_MAX-1) ~== pow(LONG_MAX-1,1.0)
FALSE ===@pow(LONG_MIN+1,1.0)
(LONG_MAX-1)*(LONG_MAX-1) === pow(LONG_MAX-1,2.0)
(LONG_MAX-1)*(LONG_MAX-1) ~== pow(LONG_MAX-1,2.0)
FALSE ===@pow(LONG_MIN+1,2.0)
LONG_MAX === pow(LONG_MAX,1)
LONG_MIN ~== pow(LONG_MIN,1)
LONG_MAX*LONG_MAX === pow(LONG_MAX,2)
LONG_MIN*LONG_MIN === pow(LONG_MIN,2)
(float)LONG_MAX === pow(LONG_MAX,1.0)
LONG_MAX*LONG_MAX ~== pow(LONG_MAX,2)
LONG_MIN*LONG_MIN ~== pow(LONG_MIN,2)
(float)LONG_MAX ~== pow(LONG_MAX,1.0)
FALSE ===@pow(LONG_MIN,1.0)
LONG_MAX*LONG_MAX === pow(LONG_MAX,2.0)
LONG_MAX*LONG_MAX ~== pow(LONG_MAX,2.0)
FALSE ===@pow(LONG_MIN,2.0)
TESTS;
+4
View File
@@ -4,8 +4,12 @@ microtime() function
--GET--
--FILE--
<?php
set_time_limit(180);
$passed = 0;
$failed = 0;
$last = 0;
for ($i=1;$i<=100000;$i++) {
list($micro,$time)=explode(" ",microtime());
$add=$micro+$time;
+8 -2
View File
@@ -210,6 +210,10 @@ static void php_var_serialize_class(smart_str *buf, zval **struc, zval *retval_p
ulong index;
HashPosition pos;
int i;
zval nval, *nvalp;
ZVAL_NULL(&nval);
nvalp = &nval;
zend_hash_internal_pointer_reset_ex(HASH_OF(retval_ptr), &pos);
@@ -230,11 +234,13 @@ static void php_var_serialize_class(smart_str *buf, zval **struc, zval *retval_p
continue;
}
php_var_serialize_string(buf, Z_STRVAL_PP(name), Z_STRLEN_PP(name));
if (zend_hash_find(Z_OBJPROP_PP(struc), Z_STRVAL_PP(name),
Z_STRLEN_PP(name) + 1, (void *) &d) == SUCCESS) {
php_var_serialize_string(buf, Z_STRVAL_PP(name),
Z_STRLEN_PP(name));
php_var_serialize_intern(buf, d, var_hash TSRMLS_CC);
} else {
php_var_serialize_intern(buf, &nvalp, var_hash TSRMLS_CC);
}
}
}
+6
View File
@@ -208,6 +208,12 @@ PHP_FUNCTION(shm_remove)
id = (*arg_id)->value.lval;
shm_list_ptr = (sysvshm_shm *) zend_list_find(id, &type);
if (!shm_list_ptr) {
php_error(E_WARNING, "The parameter is not a valid shm_indentifier");
RETURN_FALSE;
}
if(shmctl(shm_list_ptr->id,IPC_RMID,NULL)<0) {
php_error(E_WARNING, "shm_remove() failed for key 0x%x, id %i: %s", shm_list_ptr->key, id,strerror(errno));
RETURN_FALSE;
+6 -3
View File
@@ -80,6 +80,7 @@ typedef struct {
typedef struct {
int top, max;
char *varname;
zend_bool done;
void **elements;
} wddx_stack;
@@ -129,6 +130,7 @@ static int wddx_stack_init(wddx_stack *stack)
} else {
stack->max = STACK_BLOCK_SIZE;
stack->varname = NULL;
stack->done = 0;
return SUCCESS;
}
}
@@ -382,7 +384,7 @@ static void php_wddx_serialize_string(wddx_packet *packet, zval *var)
break;
default:
if (iscntrl((int)*p)) {
if (iscntrl((int)*p) && *p != '\n') {
FLUSH_BUF();
sprintf(control_buf, WDDX_CHAR, *p);
php_wddx_add_chunk(packet, control_buf);
@@ -884,7 +886,8 @@ static void php_wddx_pop_element(void *user_data, const char *name)
}
}
efree(ent1);
}
} else
stack->done = 1;
} else if (!strcmp(name, EL_VAR) && stack->varname) {
efree(stack->varname);
}
@@ -901,7 +904,7 @@ static void php_wddx_process_data(void *user_data, const char *s, int len)
int decoded_len;
TSRMLS_FETCH();
if (!wddx_stack_is_empty(stack)) {
if (!wddx_stack_is_empty(stack) && !stack->done) {
wddx_stack_top(stack, (void**)&ent);
switch (Z_TYPE_P(ent)) {
case ST_STRING:
+21 -20
View File
@@ -38,7 +38,7 @@
#include <fcntl.h>
/* functions relating to handlers */
static void register_sax_handler_pair(zval *, zval *, zval **);
static void register_sax_handler_pair(zval **, zval **, zval **);
/* Free processor */
static void free_processor(zend_rsrc_list_entry *rsrc TSRMLS_DC);
@@ -89,6 +89,7 @@ function_entry xslt_functions[] = {
PHP_FE(xslt_error, NULL)
PHP_FE(xslt_errno, NULL)
PHP_FE(xslt_free, NULL)
{NULL, NULL, NULL}
};
/* }}} */
@@ -245,20 +246,20 @@ PHP_FUNCTION(xslt_set_sax_handlers)
/* Document handlers (document start, document end) */
if (strcasecmp(string_key, "document") == 0) {
register_sax_handler_pair(XSLT_SAX(handle).doc_start,
XSLT_SAX(handle).doc_end,
register_sax_handler_pair(&XSLT_SAX(handle).doc_start,
&XSLT_SAX(handle).doc_end,
handler);
}
/* Element handlers, start of an element, and end of an element */
else if (strcasecmp(string_key, "element") == 0) {
register_sax_handler_pair(XSLT_SAX(handle).element_start,
XSLT_SAX(handle).element_end,
register_sax_handler_pair(&XSLT_SAX(handle).element_start,
&XSLT_SAX(handle).element_end,
handler);
}
/* Namespace handlers, start of a namespace, end of a namespace */
else if (strcasecmp(string_key, "namespace") == 0) {
register_sax_handler_pair(XSLT_SAX(handle).namespace_start,
XSLT_SAX(handle).namespace_end,
register_sax_handler_pair(&XSLT_SAX(handle).namespace_start,
&XSLT_SAX(handle).namespace_end,
handler);
}
/* Comment handlers, called when a comment is reached */
@@ -292,7 +293,7 @@ PHP_FUNCTION(xslt_set_scheme_handlers)
zval **processor_p, /* Resource pointer to the php->sablotron handle */
**scheme_handlers_p, /* Pointer to the scheme handler array */
**handler; /* Individual scheme handler */
zval *assign_handle; /* The handler to assign to */
zval **assign_handle; /* The handler to assign to */
HashTable *scheme_handlers; /* Scheme handler array */
php_xslt *handle; /* php->sablotron handle */
char *string_key; /* Hash key (string) */
@@ -328,31 +329,31 @@ PHP_FUNCTION(xslt_set_scheme_handlers)
/* Open the URI and return the whole string */
if (strcasecmp(string_key, "get_all") == 0) {
assign_handle = XSLT_SCHEME(handle).get_all;
assign_handle = &XSLT_SCHEME(handle).get_all;
}
/* Open the URI and return a handle */
else if (strcasecmp(string_key, "open") == 0) {
assign_handle = XSLT_SCHEME(handle).open;
assign_handle = &XSLT_SCHEME(handle).open;
}
/* Retrieve data from the URI */
else if (strcasecmp(string_key, "get") == 0) {
assign_handle = XSLT_SCHEME(handle).get;
assign_handle = &XSLT_SCHEME(handle).get;
}
/* Save data to the URI */
else if (strcasecmp(string_key, "put") == 0) {
assign_handle = XSLT_SCHEME(handle).put;
assign_handle = &XSLT_SCHEME(handle).put;
}
/* Close the URI */
else if (strcasecmp(string_key, "close") == 0) {
assign_handle = XSLT_SCHEME(handle).close;
assign_handle = &XSLT_SCHEME(handle).close;
}
/* Invalid handler name */
else {
php_error(E_WARNING, "Invalid option to xslt_set_scheme_handlers(): %s", string_key);
}
assign_handle = *handler;
zval_add_ref(&assign_handle);
*assign_handle = *handler;
zval_add_ref(assign_handle);
}
}
/* }}} */
@@ -659,14 +660,14 @@ static void free_processor(zend_rsrc_list_entry *rsrc TSRMLS_DC)
/* {{{ register_sax_handler_pair()
Register a pair of sax handlers */
static void register_sax_handler_pair(zval *handler1, zval *handler2, zval **handler)
static void register_sax_handler_pair(zval **handler1, zval **handler2, zval **handler)
{
zval **current; /* The current handler we're grabbing */
/* Grab and assign handler 1 */
if (zend_hash_index_find(Z_ARRVAL_PP(handler), 0, (void **) &current) == SUCCESS) {
handler1 = *current;
zval_add_ref(&handler1);
*handler1 = *current;
zval_add_ref(handler1);
}
else {
php_error(E_WARNING, "Wrong format of arguments to xslt_set_sax_handlers()");
@@ -675,8 +676,8 @@ static void register_sax_handler_pair(zval *handler1, zval *handler2, zval **han
/* Grab and assign handler 2 */
if (zend_hash_index_find(Z_ARRVAL_PP(handler), 1, (void **) &current) == SUCCESS) {
handler2 = *current;
zval_add_ref(&handler2);
*handler2 = *current;
zval_add_ref(handler2);
}
else {
php_error(E_WARNING, "Wrong format of arguments to xslt_set_sax_handlers()");
+1 -4
View File
@@ -219,9 +219,6 @@ extern void xslt_call_function(char *name,
int idx; /* Idx, when looping through and free'ing the arguments */
TSRMLS_FETCH(); /* For TS mode, fetch the executor globals */
/* Allocate and initialize return value from the function */
MAKE_STD_ZVAL(*retval);
argv = emalloc(argc * sizeof(zval **));
for (idx = 0; idx < argc; idx++) {
argv[idx] = &user_args[idx];
@@ -241,10 +238,10 @@ extern void xslt_call_function(char *name,
/* Decrease refcount and free if refcount is <= 0 */
zval_ptr_dtor(argv[idx]);
}
efree(argv);
}
/* }}} */
#endif
/*
+2 -1
View File
@@ -137,7 +137,8 @@ static PHP_INI_MH(OnUpdate_zlib_output_compression)
char *ini_value;
ini_value = php_ini_string("output_handler", sizeof("output_handler"), 0);
if (ini_value != NULL && new_value != NULL && strlen(ini_value) != 0) {
if (ini_value != NULL && strlen(ini_value) != 0 &&
new_value != NULL && strlen(new_value) != 0 ) {
php_error(E_CORE_ERROR,"Cannot use both zlib.output_compression and output_handler together!!");
return FAILURE;
}
+2 -3
View File
@@ -506,9 +506,8 @@ PHP_FUNCTION(set_time_limit)
WRONG_PARAM_COUNT;
}
convert_to_long_ex(new_timeout);
zend_unset_timeout(TSRMLS_C);
zend_set_timeout(Z_LVAL_PP(new_timeout));
convert_to_string_ex(new_timeout);
zend_alter_ini_entry("max_execution_time", sizeof("max_execution_time"), Z_STRVAL_PP(new_timeout), Z_STRLEN_PP(new_timeout), PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
}
/* }}} */
+1 -1
View File
@@ -1,3 +1,3 @@
/* automatically generated by configure */
/* edit configure.in to change version number */
#define PHP_VERSION "4.1.0RC2"
#define PHP_VERSION "4.1.0"
+3
View File
@@ -10,6 +10,7 @@ include $(top_srcdir)/build/rules.mk
peardir=$(PEAR_INSTALLDIR)
PEAR_SUBDIRS = \
Archive \
Benchmark \
Cache \
Cache/Container \
@@ -32,6 +33,7 @@ PEAR_SUBDIRS = \
XML
PEAR_FILES = \
Archive/Tar.php \
Benchmark/Iterate.php \
Benchmark/Timer.php \
Cache.php \
@@ -106,6 +108,7 @@ PEAR_FILES = \
PEAR/Packager.php \
PEAR/Remote.php \
PEAR/Uploader.php \
PEAR/Registry.php \
Payment/Verisign.php \
Schedule/At.php \
System.php \
+1 -1
View File
@@ -352,7 +352,7 @@ class PEAR_WebInstaller extends PEAR
// check if we can write the Package.xml file for caching
if ( is_writeable($this->installdir."/$PackageFile") || !file_exists($this->installdir."/$PackageFile") && is_writeable($this->installdir) )
if ( (file_exists($this->installdir."/$PackageFile") && is_writeable($this->installdir."/$PackageFile")) || !file_exists($this->installdir."/$PackageFile") && is_writeable($this->installdir) )
{
$time = filemtime($this->installdir."/$PackageFile");
+7 -1
View File
@@ -43,7 +43,13 @@ if ($opts['help']) {
exit;
}
*/
do_testing($argc, $argv);
set_time_limit(280);
if(!isset($_SERVER['argc'])) {
echo "\nWARNING: register_argc_argv seems to be set 'off' in php.ini\n\n";
}
@do_testing($_SERVER['argc'], $_SERVER['argv']);
exit;
+11 -2
View File
@@ -39,7 +39,16 @@ AC_ARG_WITH(apxs,
done
PHP_ADD_INCLUDE($APXS_INCLUDEDIR)
PHP_SAPI=apache
APACHE_INSTALL="\$(mkinstalldirs) \"\$(INSTALL_ROOT)`$APXS -q LIBEXECDIR`\" && $APXS -S LIBEXECDIR=\"\$(INSTALL_ROOT)`$APXS -q LIBEXECDIR`\" -i -a -n php4 $SAPI_SHARED"
# Test whether apxs support -S option
$APXS -q -S CFLAGS=$APXS_CFLAGS CFLAGS >/dev/null 2>&1
if test "$?" != "0"; then
APACHE_INSTALL="$APXS -i -a -n php4 $SAPI_SHARED" # Old apxs does not have -S option
else
APACHE_INSTALL="\$(mkinstalldirs) \"\$(INSTALL_ROOT)`$APXS -q LIBEXECDIR`\" && $APXS -S LIBEXECDIR=\"\$(INSTALL_ROOT)`$APXS -q LIBEXECDIR`\" -i -a -n php4 $SAPI_SHARED"
fi
PHP_BUILD_SHARED
if test -z "`$APXS -q LD_SHLIB`" || test "`$APXS -q LIBEXECDIR`" = "modules"; then
PHP_APXS_BROKEN=yes
@@ -64,7 +73,7 @@ if test "$PHP_SAPI" != "apache"; then
AC_MSG_CHECKING(for Apache module support)
AC_ARG_WITH(apache,
[ --with-apache[=DIR] Build Apache module. DIR is the top-level Apache
build directory, defaults to /usr/local/etc/httpd.],[
build directory, defaults to /usr/local/apache.],[
if test "$withval" = "yes"; then
# Apache's default directory
withval=/usr/local/apache
+2 -2
View File
@@ -218,10 +218,10 @@ PHP_MINFO_FUNCTION(apache)
#if !defined(WIN32) && !defined(WINNT)
sprintf(output_buf, "%s(%d)/%d", user_name, (int)user_id, (int)group_id);
php_info_print_table_row(2, "User/Group", output_buf);
sprintf(output_buf, "Per Child: %d<br>Keep Alive: %s<br>Max Per Connection: %d", max_requests_per_child, serv->keep_alive ? "on":"off", serv->keep_alive_max);
sprintf(output_buf, "Per Child: %d - Keep Alive: %s - Max Per Connection: %d", max_requests_per_child, serv->keep_alive ? "on":"off", serv->keep_alive_max);
php_info_print_table_row(2, "Max Requests", output_buf);
#endif
sprintf(output_buf, "Connection: %d<br>Keep-Alive: %d", serv->timeout, serv->keep_alive_timeout);
sprintf(output_buf, "Connection: %d - Keep-Alive: %d", serv->timeout, serv->keep_alive_timeout);
php_info_print_table_row(2, "Timeouts", output_buf);
#if !defined(WIN32) && !defined(WINNT)
php_info_print_table_row(2, "Server Root", server_root);
+1 -1
View File
@@ -5,6 +5,6 @@ a=Hello+World
--GET--
--FILE--
<?php error_reporting(0);
echo $a?>
echo $_POST['a']; ?>
--EXPECT--
Hello World
+1 -1
View File
@@ -7,6 +7,6 @@ b=Hello+Again+World&c=Hi+Mom
--FILE--
<?php
error_reporting(0);
echo "$a $b $c"?>
echo "{$_POST['a']} {$_GET['b']} {$_GET['c']}"?>
--EXPECT--
Hello World Hello Again World Hi Mom
+1 -1
View File
@@ -6,6 +6,6 @@ a=Hello+World&b=Hello+Again+World
--FILE--
<?php
error_reporting(0);
echo "$a $b"?>
echo "{$_POST['a']} {$_POST['b']}" ?>
--EXPECT--
Hello World Hello Again World
+1 -1
View File
@@ -6,6 +6,6 @@ a=Hello+World&b=Hello+Again+World&c=1
--FILE--
<?php
error_reporting(0);
echo "$a $b $c"?>
echo "{$_POST['a']} {$_POST['b']} {$_POST['c']}"?>
--EXPECT--
Hello World Hello Again World 1
+10 -2
View File
@@ -1,12 +1,20 @@
--TEST--
Testing $argc and $argv handling
--SKIPIF--
<?php if(ini_get('register_argc_argv') == '') echo 'skip'; ?>
--POST--
--GET--
ab+cd+ef+123+test
--FILE--
<?php
for($i=0;$i<$argc;$i++) {
echo "$i: ".$argv[$i]."\n";
if(ini_get('register_globals') != '') {
for($i=0;$i<$argc;$i++) {
echo "$i: ".$argv[$i]."\n";
}
} else {
for($i=0;$i<$_SERVER['argc'];$i++) {
echo "$i: ".$_SERVER['argv'][$i]."\n";
}
}
?>
--EXPECT--
+57 -17
View File
@@ -15,21 +15,61 @@ TESTS;
Remember to NOT put a trailing ; after a line!
*/
error_reporting(E_ALL);
$tests = explode("\n",$tests);
$success = TRUE;
foreach ($tests as $test)
{
$res = eval("return ($test);");
$success = $success && $res;
if (!$res)
{
echo "\nAssert failed:\n";
echo "$test\n";
list($left,$right) = explode('===',$test);
echo "Left: ";var_dump(eval("return ($left );"));
echo "Right: ";var_dump(eval("return ($right);"));
}
}
if ($success) echo "OK";
error_reporting(E_ALL);
$tests = explode("\n",$tests);
$success = TRUE;
foreach ($tests as $n=>$test)
{
// ignore empty lines
if (!$test) continue;
// warn for trailing ;
if (substr(trim($test), -1, 1) === ';') {
echo "WARNING: trailing ';' found in test ".($n+1)."\n";
exit;
}
// try for operators
$operators = array('===', '~==');
$operator = NULL;
foreach ($operators as $a_operator) {
if (strpos($test, $a_operator)!== FALSE) {
$operator = $a_operator;
list($left,$right) = explode($operator, $test);
break;
}
}
if (!$operator) {
echo "WARNING: unknown operator in '$test' (1)\n";
exit;
}
$left = eval("return ($left );");
$right = eval("return ($right);");
switch (@$operator) {
case '===': // exact match
$result = $left === $right;
break;
case '~==': // may differ after 12th significant number
if ( !is_float($left ) && !is_int($left )
|| !is_float($right) && !is_int($right)) {
$result = FALSE;
break;
}
$result = abs(($left-$right) / $left) < 1e-12;
break;
default:
echo "WARNING: unknown operator in '$test' (2)\n";
exit;
}
$success = $success && $result;
if (!$result) {
echo "\nAssert failed:\n";
echo "$test\n";
echo "Left: ";var_dump($left );
echo "Right: ";var_dump($right);
}
}
if ($success) echo "OK";
-12
View File
@@ -471,18 +471,6 @@ Package=<4>
###############################################################################
Project: "sablot"=..\ext\sablot\sablot.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "shmop"=..\ext\shmop\shmop.dsp - Package Owner=<4>
Package=<5>