mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-15 05:00:49 +00:00
Compare commits
159
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c8a60f5c03 | ||
|
|
cbce251dab | ||
|
|
c939250414 | ||
|
|
a36c434dbb | ||
|
|
8e46600166 | ||
|
|
d07a60c3d0 | ||
|
|
0858af07ec | ||
|
|
a096235f8f | ||
|
|
8244f0f628 | ||
|
|
3cdc24790e | ||
|
|
80df8e6b0a | ||
|
|
b228115b64 | ||
|
|
cdedea01c1 | ||
|
|
c0e263c1a1 | ||
|
|
91889eeb93 | ||
|
|
5c74aa0f0f | ||
|
|
501aa09789 | ||
|
|
16d5e9f108 | ||
|
|
195a756477 | ||
|
|
09fb81a8f3 | ||
|
|
21ff8ec819 | ||
|
|
6d1374480e | ||
|
|
7e33f0b17b | ||
|
|
0be29a4861 | ||
|
|
bcf3204bd3 | ||
|
|
dee465139f | ||
|
|
f5b7714238 | ||
|
|
747258e34f | ||
|
|
66c1d632c1 | ||
|
|
b9d6136a28 | ||
|
|
aaa9baa57f | ||
|
|
549164e1fe | ||
|
|
36f572a5b9 | ||
|
|
2a985b94e0 | ||
|
|
3f783ff20b | ||
|
|
43a661c2ac | ||
|
|
958a5a1311 | ||
|
|
0aca2443d7 | ||
|
|
032765f467 | ||
|
|
ef3912a195 | ||
|
|
0a862aff6f | ||
|
|
38cd9d70d5 | ||
|
|
5031e0dab8 | ||
|
|
40b988316b | ||
|
|
bca8ddd083 | ||
|
|
6d47a2d60f | ||
|
|
96c421553f | ||
|
|
30f0fa9262 | ||
|
|
2a1ac78a9d | ||
|
|
6b702ced00 | ||
|
|
edc32c8faa | ||
|
|
18e7796470 | ||
|
|
4e7c35b1e2 | ||
|
|
5d1e3b81d4 | ||
|
|
e8a7dbe010 | ||
|
|
d205634a58 | ||
|
|
91f27074fc | ||
|
|
c3a83e4c12 | ||
|
|
989fc05c1c | ||
|
|
63f504192e | ||
|
|
07156d5fc5 | ||
|
|
dd96ef8151 | ||
|
|
f467121516 | ||
|
|
27592372cc | ||
|
|
b73a2081ab | ||
|
|
2b85be3c48 | ||
|
|
87166f6978 | ||
|
|
cab6cfa680 | ||
|
|
3c2de4ce6f | ||
|
|
896cf60aff | ||
|
|
2c7191b5ce | ||
|
|
896e2e810d | ||
|
|
1a3f3309a5 | ||
|
|
1bc5e9ffc4 | ||
|
|
33e4ade668 | ||
|
|
2e8fc85965 | ||
|
|
4a04971bed | ||
|
|
cd9e4f37a2 | ||
|
|
8a58067dd5 | ||
|
|
84f1093658 | ||
|
|
1103c8306f | ||
|
|
7755c18735 | ||
|
|
19f20337f4 | ||
|
|
684c1fefc3 | ||
|
|
45e8587fa3 | ||
|
|
120e9fa63f | ||
|
|
8b4d5cefea | ||
|
|
f10d1f8f01 | ||
|
|
740073c795 | ||
|
|
8e0cad5b50 | ||
|
|
040e59eb6d | ||
|
|
e75fa38d9d | ||
|
|
0a1c75a106 | ||
|
|
b9f4c04888 | ||
|
|
49beadaa03 | ||
|
|
2eee05cb5d | ||
|
|
f5a5a7e518 | ||
|
|
43f418accd | ||
|
|
725100424b | ||
|
|
9261ba3e70 | ||
|
|
73b91a7d8f | ||
|
|
0cb64cb8b6 | ||
|
|
854223474e | ||
|
|
7c93ef371b | ||
|
|
fa6a7710ca | ||
|
|
aaec7c8c2b | ||
|
|
cde2734237 | ||
|
|
b892e3c8f8 | ||
|
|
031ce49972 | ||
|
|
b32cdd7637 | ||
|
|
017856111c | ||
|
|
6994c80835 | ||
|
|
69f304f0ac | ||
|
|
bd561b7f57 | ||
|
|
8aa81d5045 | ||
|
|
051623a43c | ||
|
|
bdd9c56790 | ||
|
|
bb5c3b8bcc | ||
|
|
e1285b4f3c | ||
|
|
8bc67a4ec1 | ||
|
|
444ec0f591 | ||
|
|
cc9c4064ab | ||
|
|
709a8d3a0d | ||
|
|
3a4b329cc3 | ||
|
|
a3084031b1 | ||
|
|
ce2a30427b | ||
|
|
af10fc656d | ||
|
|
5fd3346aac | ||
|
|
5091a18158 | ||
|
|
3c7529f4b8 | ||
|
|
8c98829721 | ||
|
|
04d2d6b3bc | ||
|
|
41b3015125 | ||
|
|
42b7601378 | ||
|
|
86c32174be | ||
|
|
c5bf17f0a5 | ||
|
|
730359dc4d | ||
|
|
4053948470 | ||
|
|
333ce2d050 | ||
|
|
a84618a3de | ||
|
|
eff475de14 | ||
|
|
7114dae40d | ||
|
|
ec9bda9e5c | ||
|
|
74dbaf655b | ||
|
|
137b57c5ba | ||
|
|
6d00133ce2 | ||
|
|
087fd4c609 | ||
|
|
1b740da6d4 | ||
|
|
0d3ce62b63 | ||
|
|
d90cd52b89 | ||
|
|
973dbce2b9 | ||
|
|
f51c000bac | ||
|
|
39812d33f7 | ||
|
|
2e9991865e | ||
|
|
016ac5d400 | ||
|
|
bf344046b3 | ||
|
|
26a5bb3fc7 | ||
|
|
c117b30950 | ||
|
|
b7a1b19734 |
No files matched your search
@@ -1,26 +1,53 @@
|
||||
PHP 4.0 NEWS
|
||||
PHP 4 NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? 200?, Version 4.0.7-dev
|
||||
- Better Interbase blob, null and error handling (Patch by Jeremy Bettis)
|
||||
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 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)
|
||||
- Fixed MySQL extension to work with MySQL 4.0. (Jani)
|
||||
- Fixed a crash bug within Cobalt systems. Patch by tomc@tripac.com. (Jani)
|
||||
- Bundled Dan Libby's xmlrpc-epi extension.
|
||||
- Introduced extension version numbers. (Stig)
|
||||
- Added version_compare() function. (Stig)
|
||||
- Fixed pg_last_notice() (could cause random crashes in PostgreSQL
|
||||
applications, even if they didn't use pg_last_notice()). (Zeev)
|
||||
- Fixed DOM-XML's error reporting, so E_WARNING errors are given instead of
|
||||
E_ERROR error's, this allows you to trap errors thrown by DOMXML functions.
|
||||
(Sterling)
|
||||
- Fixed a bug in the mcrypt extension, where list destructors were not
|
||||
properly being allocated. (Sterling)
|
||||
- Better Interbase blob, null and error handling. (Patch by Jeremy Bettis)
|
||||
- Fixed a crash bug in array_map() if the input arrays had string or
|
||||
non-sequential keys. Also modified it so that if a single array is passed,
|
||||
its keys are preserved in the resulting array. (Andrei)
|
||||
- Fixed a crash in dbase_replace_record (Patch by robin.marlow@dps-int.com)
|
||||
- Fixed a crash in msql_result() (Zeev)
|
||||
- Fixed a crash in dbase_replace_record. (Patch by robin.marlow@dps-int.com)
|
||||
- Fixed a crash in msql_result(). (Zeev)
|
||||
- Added support for single dimensional SafeArrays and Enumerations.
|
||||
Added an is_enum() function to check if a component implements an
|
||||
enumeration. (Alan, Harald)
|
||||
- Fixed a bug in dbase_get_record() and dbase_get_record_with_names().
|
||||
boolean fields are now returned correctly.
|
||||
Patch by Lawrence E. Widman <widman@cardiothink.com> (Jani)
|
||||
- Added --version option to php-config (Stig)
|
||||
- Added --version option to php-config. (Stig)
|
||||
- Improved support for thttpd-2.21b by incorporating patches for all known
|
||||
bugs (Sascha)
|
||||
bugs. (Sascha)
|
||||
- Added ircg_get_username, a roomkey argument to ircg_join, error fetching
|
||||
infrastructure, a tokenizer to speed up message processing, and fixed
|
||||
a lot of bugs in the IRCG extension (Sascha)
|
||||
- Improved speed of the serializer/deserializer (Thies, Sascha)
|
||||
- Floating point numbers are better detected when converting from strings
|
||||
a lot of bugs in the IRCG extension. (Sascha)
|
||||
- Improved speed of the serializer/deserializer. (Thies, Sascha)
|
||||
- Floating point numbers are better detected when converting from strings.
|
||||
(Zeev, Zend Engine)
|
||||
- Replaced php.ini-optimized with php.ini-recommended. As the name implies,
|
||||
it's warmly recommended to use this file as the basis for your PHP
|
||||
@@ -39,6 +66,8 @@ PHP 4.0 NEWS
|
||||
- Added vprintf() and vsprintf() functions that allow passing all arguments
|
||||
after format as an array. (Andrei)
|
||||
- Added support for GD2 image type for ImageCreateFromString() (Jani)
|
||||
- Added ImageCreateFromGD(), ImageCreateFromGD2(), ImageCreateFromGD2part(),
|
||||
ImageGD() and ImageGD2() functions (Jani)
|
||||
- addcslashes now warns when charlist is invalid. The returned string
|
||||
remained the same (Jeroen)
|
||||
- Added optional extra argument to gmp_init(). The extra argument
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
Between PHP 4.0.6 and 4.1.0, the Zend module struct changed in a way
|
||||
that broke both source and binary compatibility. If you are
|
||||
maintaining a third party extension, here's how to update it:
|
||||
|
||||
If this was your old module entry:
|
||||
|
||||
zend_module_entry foo_module_entry = {
|
||||
"foo", /* extension name */
|
||||
foo_functions, /* extension function list */
|
||||
NULL, /* extension-wide startup function */
|
||||
NULL, /* extension-wide shutdown function */
|
||||
PHP_RINIT(foo), /* per-request startup function */
|
||||
PHP_RSHUTDOWN(foo), /* per-request shutdown function */
|
||||
PHP_MINFO(foo), /* information function */
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
Here's how it should look if you want your code to build with PHP
|
||||
4.1.0 and up:
|
||||
|
||||
zend_module_entry foo_module_entry = {
|
||||
#if ZEND_MODULE_API_NO >= 20010901
|
||||
STANDARD_MODULE_HEADER,
|
||||
#endif
|
||||
"foo", /* extension name */
|
||||
foo_functions, /* extension function list */
|
||||
NULL, /* extension-wide startup function */
|
||||
NULL, /* extension-wide shutdown function */
|
||||
PHP_RINIT(foo), /* per-request startup function */
|
||||
PHP_RSHUTDOWN(foo), /* per-request shutdown function */
|
||||
PHP_MINFO(foo), /* information function */
|
||||
#if ZEND_MODULE_API_NO >= 20010901
|
||||
FOO_VERSION, /* extension version number (string) */
|
||||
#endif
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
If you don't care about source compatibility with earlier PHP releases
|
||||
than 4.1.0, you can drop the #if/#endif lines.
|
||||
@@ -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);
|
||||
|
||||
@@ -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.
|
||||
|
||||
+1
-1
@@ -20,4 +20,4 @@
|
||||
LTLIBRARY_OBJECTS = $(LTLIBRARY_SOURCES:.c=.lo) $(LTLIBRARY_OBJECTS_X)
|
||||
|
||||
$(LTLIBRARY_NAME): $(LTLIBRARY_OBJECTS) $(LTLIBRARY_DEPENDENCIES)
|
||||
$(LINK_CLEAN) $(LTLIBRARY_LDFLAGS) $(LTLIBRARY_OBJECTS) $(LTLIBRARY_LIBADD)
|
||||
$(LINK) $(LTLIBRARY_LDFLAGS) $(LTLIBRARY_OBJECTS) $(LTLIBRARY_LIBADD)
|
||||
Vendored
+142
-205
@@ -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
@@ -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/"`
|
||||
;;
|
||||
|
||||
+9
-2
@@ -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.0.7RC2, nodefine)
|
||||
AM_INIT_AUTOMAKE(php, 4.1.0, nodefine)
|
||||
|
||||
PHP_VERSION=$VERSION
|
||||
echo "/* automatically generated by configure */" > php_version.h.new
|
||||
@@ -394,6 +394,7 @@ mkstemp \
|
||||
mmap \
|
||||
nl_langinfo \
|
||||
putenv \
|
||||
realpath \
|
||||
random \
|
||||
rand_r \
|
||||
regcomp \
|
||||
@@ -822,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)
|
||||
@@ -924,7 +931,7 @@ PHP_GEN_CONFIG_VARS
|
||||
$php_shtool mkdir -p pear/scripts
|
||||
ALL_OUTPUT_FILES="php4.spec Zend/Makefile main/build-defs.h \
|
||||
pear/scripts/pear pear/scripts/phpize pear/scripts/php-config \
|
||||
pear/scripts/pearize TSRM/Makefile $PHP_OUTPUT_FILES"
|
||||
pear/scripts/pearize pear/scripts/phptar TSRM/Makefile $PHP_OUTPUT_FILES"
|
||||
|
||||
AC_OUTPUT($ALL_OUTPUT_FILES, [], [
|
||||
|
||||
|
||||
+2
-1
@@ -51,7 +51,8 @@ function_entry aspell_functions[] = {
|
||||
static int le_aspell;
|
||||
|
||||
zend_module_entry aspell_module_entry = {
|
||||
"aspell", aspell_functions, PHP_MINIT(aspell), NULL, NULL, NULL, PHP_MINFO(aspell), STANDARD_MODULE_PROPERTIES
|
||||
STANDARD_MODULE_HEADER,
|
||||
"aspell", aspell_functions, PHP_MINIT(aspell), NULL, NULL, NULL, PHP_MINFO(aspell), NO_VERSION_YET, STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
#ifdef COMPILE_DL_ASPELL
|
||||
|
||||
@@ -44,6 +44,7 @@ function_entry bcmath_functions[] = {
|
||||
};
|
||||
|
||||
zend_module_entry bcmath_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"bcmath",
|
||||
bcmath_functions,
|
||||
PHP_MINIT(bcmath),
|
||||
@@ -51,6 +52,7 @@ zend_module_entry bcmath_module_entry = {
|
||||
PHP_RINIT(bcmath),
|
||||
NULL,
|
||||
PHP_MINFO(bcmath),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@ function_entry calendar_functions[] = {
|
||||
|
||||
|
||||
zend_module_entry calendar_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"calendar",
|
||||
calendar_functions,
|
||||
PHP_MINIT(calendar),
|
||||
@@ -64,6 +65,7 @@ zend_module_entry calendar_module_entry = {
|
||||
NULL,
|
||||
NULL,
|
||||
PHP_MINFO(calendar),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES,
|
||||
};
|
||||
|
||||
|
||||
+4
-2
@@ -97,15 +97,17 @@ static char const cvsid[] = "$Id$";
|
||||
|
||||
/* Declare our module to the Zend engine */
|
||||
zend_module_entry ccvs_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"CCVS",
|
||||
ccvs_functions,
|
||||
NULL, NULL, NULL, NULL,
|
||||
PHP_MINFO(ccvs),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
#ifdef COMPILE_DL_LDAP
|
||||
ZEND_GET_MODULE(ldap)
|
||||
#ifdef COMPILE_DL_CCVS
|
||||
ZEND_GET_MODULE(ccvs)
|
||||
#endif
|
||||
|
||||
/* Full Functions (The actual CCVS functions and any internal php hooked functions such as MINFO) */
|
||||
|
||||
+35
-10
@@ -437,7 +437,7 @@ PHP_INI_ENTRY("com.typelib_file", "", PHP_INI_SYSTEM, OnTypelibFileChange)
|
||||
PHP_INI_END()
|
||||
|
||||
|
||||
/* {{{ proto int com_load(string module_name [, string remote_host [, int codepage[, string typelib]]])
|
||||
/* {{{ proto int com_load(string module_name [, string remote_host [, int codepage [, string typelib]]])
|
||||
Loads a COM module */
|
||||
PHP_FUNCTION(com_load)
|
||||
{
|
||||
@@ -511,6 +511,12 @@ PHP_FUNCTION(com_load)
|
||||
/* @todo if (server_name) */
|
||||
|
||||
if (!server_name) {
|
||||
/* @todo shouldn't the bind context be fetched on module startup and kept as a global shared instance ?
|
||||
* all calls to BindToObject would deliver the same instance then (as desired)
|
||||
* IBindCtx::RegisterObjectBound() should be called then after mkparsedisplayname()
|
||||
*
|
||||
* @todo use mkparsedisplaynameex() ?
|
||||
*/
|
||||
if (SUCCEEDED(hr = CreateBindCtx(0, &pBindCtx))) {
|
||||
if (SUCCEEDED(hr = MkParseDisplayName(pBindCtx, ProgID, &ulEaten, &pMoniker))) {
|
||||
hr = pMoniker->lpVtbl->BindToObject(pMoniker, pBindCtx, NULL, &IID_IDispatch, (LPVOID *) &C_DISPATCH(obj));
|
||||
@@ -548,7 +554,7 @@ PHP_FUNCTION(com_load)
|
||||
pResults.pIID = &IID_IDispatch;
|
||||
pResults.pItf = NULL;
|
||||
pResults.hr = S_OK;
|
||||
hr=CoCreateInstanceEx(&clsid, NULL, CLSCTX_SERVER, &server_info, 1, &pResults);
|
||||
hr=CoCreateInstanceEx(&clsid, NULL, CLSCTX_REMOTE_SERVER, &server_info, 1, &pResults);
|
||||
if (SUCCEEDED(hr)) {
|
||||
hr = pResults.hr;
|
||||
C_DISPATCH(obj) = (IDispatch *) pResults.pItf;
|
||||
@@ -742,7 +748,11 @@ int do_COM_invoke(comval *obj, pval *function_name, VARIANT *var_result, pval **
|
||||
|
||||
efree(funcname);
|
||||
for (current_arg=0;current_arg<arg_count;current_arg++) {
|
||||
VariantClear(&variant_args[current_arg]);
|
||||
/* don't release IDispatch pointers as they are used afterwards */
|
||||
if (V_VT(&variant_args[current_arg]) != VT_DISPATCH) {
|
||||
/* @todo review this: what happens to an array of IDispatchs or a VARIANT->IDispatch */
|
||||
VariantClear(&variant_args[current_arg]);
|
||||
}
|
||||
}
|
||||
efree(variant_args);
|
||||
|
||||
@@ -804,9 +814,8 @@ PHP_FUNCTION(com_invoke)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
php_variant_to_pval(var_result, return_value, codepage TSRMLS_CC);
|
||||
RETVAL_VARIANT(var_result);
|
||||
|
||||
FREE_VARIANT(var_result);
|
||||
efree(arguments);
|
||||
}
|
||||
/* }}} */
|
||||
@@ -1049,9 +1058,7 @@ PHP_FUNCTION(com_propget)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
php_variant_to_pval(var_result, return_value, codepage TSRMLS_CC);
|
||||
|
||||
FREE_VARIANT(var_result);
|
||||
RETVAL_VARIANT(var_result);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -1082,7 +1089,8 @@ PHP_FUNCTION(com_propput)
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ proto bool com_load_typelib(string typelib_name[, int case_insensitiv]) */
|
||||
/* {{{ proto bool com_load_typelib(string typelib_name [, int case_insensitiv])
|
||||
Loads a Typelib */
|
||||
PHP_FUNCTION(com_load_typelib)
|
||||
{
|
||||
pval *arg_typelib, *arg_cis;
|
||||
@@ -1673,7 +1681,16 @@ PHP_MSHUTDOWN_FUNCTION(COM)
|
||||
/* exports for external object creation */
|
||||
|
||||
zend_module_entry COM_module_entry = {
|
||||
"com", COM_functions, PHP_MINIT(COM), PHP_MSHUTDOWN(COM), NULL, NULL, PHP_MINFO(COM), STANDARD_MODULE_PROPERTIES
|
||||
STANDARD_MODULE_HEADER,
|
||||
"com",
|
||||
COM_functions,
|
||||
PHP_MINIT(COM),
|
||||
PHP_MSHUTDOWN(COM),
|
||||
NULL,
|
||||
NULL,
|
||||
PHP_MINFO(COM),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
PHPAPI int php_COM_get_le_comval()
|
||||
@@ -1682,3 +1699,11 @@ PHPAPI int php_COM_get_le_comval()
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* indent-tabs-mode: t
|
||||
* End:
|
||||
*/
|
||||
@@ -1,16 +0,0 @@
|
||||
1) Multi-dimenstional array support
|
||||
2) IErrorInfo
|
||||
3) WithEvents
|
||||
4) Documentation (internal and user) and howtos
|
||||
5) IEnumVariant::All() which would be like IEnumVariant::Next(IDispatch::Count)
|
||||
6) Look for memory leaks and AdRef/Release problems - I KNOW there are some...
|
||||
7) Test component (goes with the docs)
|
||||
8) Test suite (Needs test component)
|
||||
9) reduce the need for VARIANT()
|
||||
10) lets try if we are able to call non IDispatch - only Typelib components
|
||||
11) IEnumVariant::Next() without parameter should only return an object, not an array with one element
|
||||
|
||||
|
||||
these seem to be done:
|
||||
|
||||
2) 6) 11)
|
||||
+10
-2
@@ -59,7 +59,15 @@ static PHP_MINFO_FUNCTION(VARIANT)
|
||||
|
||||
|
||||
zend_module_entry VARIANT_module_entry = {
|
||||
"variant", VARIANT_functions, PHP_MINIT(VARIANT), PHP_MSHUTDOWN(VARIANT), NULL, NULL, PHP_MINFO(VARIANT), STANDARD_MODULE_PROPERTIES
|
||||
STANDARD_MODULE_HEADER,
|
||||
"variant",
|
||||
VARIANT_functions,
|
||||
PHP_MINIT(VARIANT),
|
||||
PHP_MSHUTDOWN(VARIANT),
|
||||
NULL, NULL,
|
||||
PHP_MINFO(VARIANT),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
|
||||
@@ -78,7 +86,7 @@ PHP_MINIT_FUNCTION(VARIANT)
|
||||
REGISTER_LONG_CONSTANT("VT_BOOL", VT_BOOL, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("VT_ERROR", VT_ERROR, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("VT_CY", VT_CY, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("VT_DATE", VT_CY, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("VT_DATE", VT_DATE, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("VT_BSTR", VT_BSTR, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("VT_DECIMAL", VT_DECIMAL, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("VT_UNKNOWN", VT_UNKNOWN, CONST_CS | CONST_PERSISTENT);
|
||||
|
||||
+25
-7
@@ -86,7 +86,7 @@ PHPAPI void php_pval_to_variant(pval *pval_arg, VARIANT *var_arg, int codepage T
|
||||
}
|
||||
|
||||
if (pval_arg->is_ref) { /* deprecated, implemented for downwards compatiblity */
|
||||
type |= VT_BYREF;
|
||||
// type |= VT_BYREF;
|
||||
}
|
||||
|
||||
pval_to_variant_ex(pval_arg, var_arg, type, codepage TSRMLS_CC);
|
||||
@@ -187,7 +187,11 @@ static void pval_to_variant_ex(pval *pval_arg, VARIANT *var_arg, int type, int c
|
||||
|
||||
case VT_BOOL:
|
||||
convert_to_boolean_ex(&pval_arg);
|
||||
V_BOOL(var_arg) = (short)Z_LVAL_P(pval_arg);
|
||||
if (Z_LVAL_P(pval_arg)) {
|
||||
V_BOOL(var_arg) = TRUE;
|
||||
} else {
|
||||
V_BOOL(var_arg) = FALSE;
|
||||
}
|
||||
break;
|
||||
|
||||
case VT_ERROR:
|
||||
@@ -281,7 +285,13 @@ static void pval_to_variant_ex(pval *pval_arg, VARIANT *var_arg, int type, int c
|
||||
|
||||
case VT_BOOL|VT_BYREF:
|
||||
convert_to_boolean(pval_arg);
|
||||
V_BOOLREF(var_arg) = (short FAR*) &Z_LVAL_P(pval_arg);
|
||||
/* emalloc or malloc ? */
|
||||
V_BOOLREF(var_arg) = (short FAR*) pemalloc(sizeof(short), 1);
|
||||
if (Z_LVAL_P(pval_arg)) {
|
||||
*V_BOOLREF(var_arg) = TRUE;
|
||||
} else {
|
||||
*V_BOOLREF(var_arg) = FALSE;
|
||||
}
|
||||
break;
|
||||
|
||||
case VT_ERROR|VT_BYREF:
|
||||
@@ -452,11 +462,11 @@ PHPAPI int php_variant_to_pval(VARIANT *var_arg, pval *pval_arg, int codepage TS
|
||||
ZVAL_NULL(pval_arg);
|
||||
return FAILURE;
|
||||
}
|
||||
SafeArrayLock( array);
|
||||
SafeArrayLock(array);
|
||||
|
||||
/* This call has failed for everything I have tried */
|
||||
/* But best leave it to be on the safe side */
|
||||
if (FAILED(SafeArrayGetVartype(array, &vartype))) {
|
||||
if (FAILED(SafeArrayGetVartype(array, &vartype)) || (vartype == VT_EMPTY)) {
|
||||
/* Fall back to what we do know */
|
||||
/* Mask off the array bit and assume */
|
||||
/* what is left is the type of the array */
|
||||
@@ -587,9 +597,17 @@ PHPAPI int php_variant_to_pval(VARIANT *var_arg, pval *pval_arg, int codepage TS
|
||||
|
||||
case VT_BOOL:
|
||||
if (V_ISBYREF(var_arg)) {
|
||||
ZVAL_BOOL(pval_arg, *V_BOOLREF(var_arg));
|
||||
if (*V_BOOLREF(var_arg)) {
|
||||
ZVAL_BOOL(pval_arg, Z_TRUE);
|
||||
} else {
|
||||
ZVAL_BOOL(pval_arg, Z_FALSE);
|
||||
}
|
||||
} else {
|
||||
ZVAL_BOOL(pval_arg, V_BOOL(var_arg));
|
||||
if (V_BOOL(var_arg)) {
|
||||
ZVAL_BOOL(pval_arg, Z_TRUE);
|
||||
} else {
|
||||
ZVAL_BOOL(pval_arg, Z_FALSE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef CONVERSION_H
|
||||
#define CONVERSION_H
|
||||
|
||||
/* isn't this defined somewhere else ? */
|
||||
#define Z_TRUE 1
|
||||
#define Z_FALSE 0
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
|
||||
PHPAPI void php_pval_to_variant(pval *pval_arg, VARIANT *var_arg, int codepage TSRMLS_DC);
|
||||
|
||||
+17
-2
@@ -3,15 +3,30 @@
|
||||
|
||||
#if PHP_WIN32
|
||||
|
||||
#define ALLOC_VARIANT(v) (v) = (VARIANT *) emalloc(sizeof(VARIANT)); \
|
||||
#define ALLOC_VARIANT(v) (v) = (VARIANT *) emalloc(sizeof(VARIANT)); \
|
||||
VariantInit(v);
|
||||
|
||||
#define FREE_VARIANT(v) VariantClear(v); \
|
||||
#define FREE_VARIANT(v) VariantClear(v); \
|
||||
efree(v);
|
||||
|
||||
|
||||
#define IS_VARIANT php_VARIANT_get_le_variant()
|
||||
|
||||
#define ZVAL_VARIANT(z, v) if (V_VT(v) == VT_DISPATCH) { \
|
||||
comval *obj; \
|
||||
ALLOC_COM(obj); \
|
||||
php_COM_set(obj, &V_DISPATCH(v), TRUE TSRMLS_CC); \
|
||||
ZVAL_LONG((z), zend_list_insert(obj, IS_COM)); \
|
||||
} else { \
|
||||
php_variant_to_pval((v), (z), codepage TSRMLS_CC); \
|
||||
FREE_VARIANT(v); \
|
||||
}
|
||||
|
||||
#define RETVAL_VARIANT(v) ZVAL_VARIANT(return_value, (v));
|
||||
#define RETURN_VARIANT(v) RETVAL_VARIANT(v) \
|
||||
return;
|
||||
|
||||
|
||||
#endif /* PHP_WIN32 */
|
||||
|
||||
#endif /* VARIANT_H */
|
||||
+10
-1
@@ -155,7 +155,16 @@ function_entry cpdf_functions[] = {
|
||||
};
|
||||
|
||||
zend_module_entry cpdf_module_entry = {
|
||||
"cpdf", cpdf_functions, PHP_MINIT(cpdf), PHP_MSHUTDOWN(cpdf), PHP_RINIT(cpdf), NULL, PHP_MINFO(cpdf), STANDARD_MODULE_PROPERTIES
|
||||
STANDARD_MODULE_HEADER,
|
||||
"cpdf",
|
||||
cpdf_functions,
|
||||
PHP_MINIT(cpdf),
|
||||
PHP_MSHUTDOWN(cpdf),
|
||||
PHP_RINIT(cpdf),
|
||||
NULL,
|
||||
PHP_MINFO(cpdf),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
#ifdef COMPILE_DL_CPDF
|
||||
|
||||
+8
-10
@@ -4,20 +4,19 @@ PHP_ARG_WITH(crack, whether to include crack support,
|
||||
[ --with-crack[=DIR] Include crack support.])
|
||||
|
||||
if test "$PHP_CRACK" != "no"; then
|
||||
for i in /usr/local/lib /usr/lib $PHP_CRACK $PHP_CRACK/cracklib; do
|
||||
if test -f $i/libcrack.a; then
|
||||
CRACK_LIBDIR=$i
|
||||
fi
|
||||
|
||||
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
|
||||
if test -f $i/packer.h; then
|
||||
CRACK_INCLUDEDIR=$i
|
||||
fi
|
||||
|
||||
for i in /usr/local/include /usr/include $PHP_CRACK/include $PHP_CRACK/cracklib; do
|
||||
test -f $i/packer.h && CRACK_INCLUDEDIR=$i
|
||||
done
|
||||
|
||||
if test -z "$CRACK_LIBDIR"; then
|
||||
AC_MSG_ERROR(Cannot find the cracklib library file)
|
||||
fi
|
||||
|
||||
if test -z "$CRACK_INCLUDEDIR"; then
|
||||
AC_MSG_ERROR(Cannot find a cracklib header file)
|
||||
fi
|
||||
@@ -26,8 +25,7 @@ if test "$PHP_CRACK" != "no"; then
|
||||
PHP_ADD_LIBRARY_WITH_PATH(crack, $CRACK_LIBDIR, CRACK_SHARED_LIBADD)
|
||||
|
||||
PHP_EXTENSION(crack, $ext_shared)
|
||||
|
||||
PHP_SUBST(CRACK_SHARED_LIBADD)
|
||||
AC_DEFINE(HAVE_CRACK, 1, [ ])
|
||||
fi
|
||||
|
||||
PHP_SUBST(CRACK_SHARED_LIBADD)
|
||||
@@ -43,6 +43,7 @@ function_entry crack_functions[] = {
|
||||
};
|
||||
|
||||
zend_module_entry crack_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"crack",
|
||||
crack_functions,
|
||||
ZEND_MODULE_STARTUP_N(crack),
|
||||
@@ -50,6 +51,7 @@ zend_module_entry crack_module_entry = {
|
||||
ZEND_MODULE_ACTIVATE_N(crack),
|
||||
ZEND_MODULE_DEACTIVATE_N(crack),
|
||||
ZEND_MODULE_INFO_N(crack),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
|
||||
@@ -62,6 +62,7 @@ function_entry ctype_functions[] = {
|
||||
/* {{{ ctype_mpodule_entry
|
||||
*/
|
||||
zend_module_entry ctype_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"ctype",
|
||||
ctype_functions,
|
||||
NULL,
|
||||
@@ -69,6 +70,7 @@ zend_module_entry ctype_module_entry = {
|
||||
NULL,
|
||||
NULL,
|
||||
PHP_MINFO(ctype),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
@@ -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)
|
||||
|
||||
+242
-174
@@ -69,13 +69,15 @@ function_entry curl_functions[] = {
|
||||
/* {{{ curl_module_entry
|
||||
*/
|
||||
zend_module_entry curl_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"curl",
|
||||
curl_functions,
|
||||
PHP_MINIT(curl),
|
||||
NULL,
|
||||
PHP_MSHUTDOWN(curl),
|
||||
NULL,
|
||||
NULL,
|
||||
PHP_MINFO(curl),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
/* }}} */
|
||||
@@ -95,152 +97,184 @@ 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_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();
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
@@ -277,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]);
|
||||
@@ -291,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 {
|
||||
@@ -317,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:
|
||||
@@ -328,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]);
|
||||
@@ -393,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]);
|
||||
@@ -435,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();
|
||||
@@ -521,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 *),
|
||||
@@ -631,6 +668,7 @@ PHP_FUNCTION(curl_setopt)
|
||||
case CURLOPT_FRESH_CONNECT:
|
||||
case CURLOPT_FORBID_REUSE:
|
||||
case CURLOPT_CONNECTTIMEOUT:
|
||||
case CURLOPT_SSL_VERIFYHOST:
|
||||
case CURLOPT_SSL_VERIFYPEER:
|
||||
convert_to_long_ex(zvalue);
|
||||
error = curl_easy_setopt(ch->cp, option, Z_LVAL_PP(zvalue));
|
||||
@@ -652,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);
|
||||
@@ -667,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:
|
||||
@@ -730,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");
|
||||
@@ -740,19 +787,20 @@ PHP_FUNCTION(curl_setopt)
|
||||
for (zend_hash_internal_pointer_reset(postfields);
|
||||
zend_hash_get_current_data(postfields, (void **) ¤t) == 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) {
|
||||
@@ -779,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 **) ¤t) == SUCCESS;
|
||||
zend_hash_move_forward(hash)) {
|
||||
for (zend_hash_internal_pointer_reset(ph);
|
||||
zend_hash_get_current_data(ph, (void **) ¤t) == 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);
|
||||
@@ -838,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)
|
||||
@@ -846,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);
|
||||
@@ -856,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)
|
||||
@@ -880,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) {
|
||||
@@ -919,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);
|
||||
@@ -934,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);
|
||||
@@ -1030,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
|
||||
*/
|
||||
@@ -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;
|
||||
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ function_entry cybercash_functions[] = {
|
||||
/* {{{ cybercash_module_entry
|
||||
*/
|
||||
zend_module_entry cybercash_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"cybercash",
|
||||
cybercash_functions,
|
||||
NULL,
|
||||
@@ -52,6 +53,7 @@ zend_module_entry cybercash_module_entry = {
|
||||
NULL,
|
||||
NULL,
|
||||
PHP_MINFO(cybercash),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES,
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
@@ -48,6 +48,7 @@ function_entry cybermut_functions[] = {
|
||||
/* {{{ cybermut_module_entry
|
||||
*/
|
||||
zend_module_entry cybermut_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"cybermut",
|
||||
cybermut_functions,
|
||||
PHP_MINIT(cybermut),
|
||||
@@ -55,6 +56,7 @@ zend_module_entry cybermut_module_entry = {
|
||||
NULL,
|
||||
NULL,
|
||||
PHP_MINFO(cybermut),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
@@ -48,6 +48,7 @@ function_entry cyrus_functions[] = {
|
||||
};
|
||||
|
||||
zend_module_entry cyrus_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"cyrus",
|
||||
cyrus_functions,
|
||||
PHP_MINIT(cyrus),
|
||||
@@ -55,6 +56,7 @@ zend_module_entry cyrus_module_entry = {
|
||||
NULL,
|
||||
NULL,
|
||||
PHP_MINFO(cyrus),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
|
||||
+10
-1
@@ -1234,7 +1234,16 @@ function_entry dbm_functions[] = {
|
||||
/* }}} */
|
||||
|
||||
zend_module_entry dbm_module_entry = {
|
||||
"db", dbm_functions, PHP_MINIT(db), PHP_MSHUTDOWN(db), PHP_RINIT(db), NULL, PHP_MINFO(db), STANDARD_MODULE_PROPERTIES
|
||||
STANDARD_MODULE_HEADER,
|
||||
"db",
|
||||
dbm_functions,
|
||||
PHP_MINIT(db),
|
||||
PHP_MSHUTDOWN(db),
|
||||
PHP_RINIT(db),
|
||||
NULL,
|
||||
PHP_MINFO(db),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
#ifdef COMPILE_DL_DB
|
||||
|
||||
+6
-2
@@ -60,11 +60,15 @@ static PHP_MSHUTDOWN_FUNCTION(dba);
|
||||
static PHP_MINFO_FUNCTION(dba);
|
||||
|
||||
zend_module_entry dba_module_entry = {
|
||||
"dba", dba_functions,
|
||||
STANDARD_MODULE_HEADER,
|
||||
"dba",
|
||||
dba_functions,
|
||||
PHP_MINIT(dba),
|
||||
PHP_MSHUTDOWN(dba),
|
||||
NULL, NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
PHP_MINFO(dba),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
|
||||
+2
-1
@@ -785,7 +785,8 @@ function_entry dbase_functions[] = {
|
||||
/* }}} */
|
||||
|
||||
zend_module_entry dbase_module_entry = {
|
||||
"dbase", dbase_functions, PHP_MINIT(dbase), PHP_MSHUTDOWN(dbase), NULL, NULL, NULL, STANDARD_MODULE_PROPERTIES
|
||||
STANDARD_MODULE_HEADER,
|
||||
"dbase", dbase_functions, PHP_MINIT(dbase), PHP_MSHUTDOWN(dbase), NULL, NULL, NULL, NO_VERSION_YET, STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
|
||||
|
||||
+142
-94
@@ -18,9 +18,15 @@
|
||||
*/
|
||||
|
||||
#include "php.h"
|
||||
#include "ext/standard/info.h"
|
||||
#include "php_ini.h"
|
||||
#include "php_dbplus.h"
|
||||
|
||||
#include <saccess.h>
|
||||
#include <relation.h>
|
||||
#include <dblight.h>
|
||||
|
||||
|
||||
/* If you declare any globals in php_dbplus.h uncomment this:
|
||||
ZEND_DECLARE_MODULE_GLOBALS(dbplus)
|
||||
*/
|
||||
@@ -38,17 +44,17 @@ int le_dbplus_tupel;
|
||||
|
||||
void dbplus_destruct_relation(zend_rsrc_list_entry *rsrc TSRMLS_DC)
|
||||
{
|
||||
relf *conn = (relf *)(rsrc->ptr);
|
||||
relf *conn = (relf *)(rsrc->ptr);
|
||||
|
||||
cdb_close(conn);
|
||||
cdb_close(conn);
|
||||
}
|
||||
|
||||
|
||||
void dbplus_destruct_tupel(zend_rsrc_list_entry *rsrc TSRMLS_DC)
|
||||
{
|
||||
tuple *t = (tuple *)(rsrc->ptr);
|
||||
tuple *t = (tuple *)(rsrc->ptr);
|
||||
|
||||
efree(t);
|
||||
efree(t);
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
@@ -58,54 +64,53 @@ void dbplus_destruct_tupel(zend_rsrc_list_entry *rsrc TSRMLS_DC)
|
||||
/* Every user visible function must have an entry in dbplus_functions[].
|
||||
*/
|
||||
function_entry dbplus_functions[] = {
|
||||
PHP_FE(dbplus_add, NULL)
|
||||
PHP_FE(dbplus_aql, NULL)
|
||||
PHP_FE(dbplus_change, NULL)
|
||||
PHP_FE(dbplus_chdir, NULL)
|
||||
PHP_FE(dbplus_close, NULL)
|
||||
PHP_FE(dbplus_curr, NULL)
|
||||
PHP_FE(dbplus_errno, NULL)
|
||||
PHP_FE(dbplus_errcode, NULL)
|
||||
PHP_FE(dbplus_find, NULL)
|
||||
PHP_FE(dbplus_first, NULL)
|
||||
PHP_FE(dbplus_flush, NULL)
|
||||
PHP_FE(dbplus_freealllocks, NULL)
|
||||
PHP_FE(dbplus_freelock, NULL)
|
||||
PHP_FE(dbplus_freerlocks, NULL)
|
||||
PHP_FE(dbplus_getlock, NULL)
|
||||
PHP_FE(dbplus_getunique, NULL)
|
||||
PHP_FE(dbplus_info, NULL)
|
||||
PHP_FE(dbplus_last, NULL)
|
||||
PHP_FE(dbplus_next, NULL)
|
||||
PHP_FE(dbplus_open, NULL)
|
||||
PHP_FE(dbplus_prev, NULL)
|
||||
PHP_FE(dbplus_rchperm, NULL)
|
||||
PHP_FE(dbplus_rcreate, NULL)
|
||||
PHP_FE(dbplus_rcrtexact, NULL)
|
||||
PHP_FE(dbplus_rcrtlike, NULL)
|
||||
PHP_FE(dbplus_resolve, NULL)
|
||||
PHP_FE(dbplus_restorepos, NULL)
|
||||
PHP_FE(dbplus_rkeys, NULL)
|
||||
PHP_FE(dbplus_ropen, NULL)
|
||||
PHP_FE(dbplus_rquery, NULL)
|
||||
PHP_FE(dbplus_rrename, NULL)
|
||||
PHP_FE(dbplus_rsecindex, NULL)
|
||||
PHP_FE(dbplus_runlink, NULL)
|
||||
PHP_FE(dbplus_rzap, NULL)
|
||||
PHP_FE(dbplus_savepos, NULL)
|
||||
PHP_FE(dbplus_setindex, NULL)
|
||||
PHP_FE(dbplus_setindexbynumber, NULL)
|
||||
PHP_FE(dbplus_sql, NULL)
|
||||
PHP_FE(dbplus_tcl, NULL)
|
||||
PHP_FE(dbplus_tremove, NULL)
|
||||
PHP_FE(dbplus_undo, NULL)
|
||||
PHP_FE(dbplus_undoprepare, NULL)
|
||||
PHP_FE(dbplus_unlockrel, NULL)
|
||||
PHP_FE(dbplus_unselect, NULL)
|
||||
PHP_FE(dbplus_update, NULL)
|
||||
PHP_FE(dbplus_xlockrel, NULL)
|
||||
PHP_FE(dbplus_xunlockrel, NULL)
|
||||
{NULL, NULL, NULL} /* Must be the last line in dbplus_functions[] */
|
||||
PHP_FE(dbplus_add, NULL)
|
||||
PHP_FE(dbplus_aql, NULL)
|
||||
PHP_FE(dbplus_chdir, NULL)
|
||||
PHP_FE(dbplus_close, NULL)
|
||||
PHP_FE(dbplus_curr, NULL)
|
||||
PHP_FE(dbplus_errno, NULL)
|
||||
PHP_FE(dbplus_errcode, NULL)
|
||||
PHP_FE(dbplus_find, NULL)
|
||||
PHP_FE(dbplus_first, NULL)
|
||||
PHP_FE(dbplus_flush, NULL)
|
||||
PHP_FE(dbplus_freealllocks, NULL)
|
||||
PHP_FE(dbplus_freelock, NULL)
|
||||
PHP_FE(dbplus_freerlocks, NULL)
|
||||
PHP_FE(dbplus_getlock, NULL)
|
||||
PHP_FE(dbplus_getunique, NULL)
|
||||
PHP_FE(dbplus_info, NULL)
|
||||
PHP_FE(dbplus_last, NULL)
|
||||
PHP_FE(dbplus_next, NULL)
|
||||
PHP_FE(dbplus_open, NULL)
|
||||
PHP_FE(dbplus_prev, NULL)
|
||||
PHP_FE(dbplus_rchperm, NULL)
|
||||
PHP_FE(dbplus_rcreate, NULL)
|
||||
PHP_FE(dbplus_rcrtexact, NULL)
|
||||
PHP_FE(dbplus_rcrtlike, NULL)
|
||||
PHP_FE(dbplus_resolve, NULL)
|
||||
PHP_FE(dbplus_restorepos, NULL)
|
||||
PHP_FE(dbplus_rkeys, NULL)
|
||||
PHP_FE(dbplus_ropen, NULL)
|
||||
PHP_FE(dbplus_rquery, NULL)
|
||||
PHP_FE(dbplus_rrename, NULL)
|
||||
PHP_FE(dbplus_rsecindex, NULL)
|
||||
PHP_FE(dbplus_runlink, NULL)
|
||||
PHP_FE(dbplus_rzap, NULL)
|
||||
PHP_FE(dbplus_savepos, NULL)
|
||||
PHP_FE(dbplus_setindex, NULL)
|
||||
PHP_FE(dbplus_setindexbynumber, NULL)
|
||||
PHP_FE(dbplus_sql, NULL)
|
||||
PHP_FE(dbplus_tcl, NULL)
|
||||
PHP_FE(dbplus_tremove, NULL)
|
||||
PHP_FE(dbplus_undo, NULL)
|
||||
PHP_FE(dbplus_undoprepare, NULL)
|
||||
PHP_FE(dbplus_unlockrel, NULL)
|
||||
PHP_FE(dbplus_unselect, NULL)
|
||||
PHP_FE(dbplus_update, NULL)
|
||||
PHP_FE(dbplus_xlockrel, NULL)
|
||||
PHP_FE(dbplus_xunlockrel, NULL)
|
||||
{NULL, NULL, NULL} /* Must be the last line in dbplus_functions[] */
|
||||
};
|
||||
|
||||
/* }}} */
|
||||
@@ -113,14 +118,16 @@ function_entry dbplus_functions[] = {
|
||||
/* {{{ module entry */
|
||||
|
||||
zend_module_entry dbplus_module_entry = {
|
||||
"dbplus",
|
||||
dbplus_functions,
|
||||
PHP_MINIT(dbplus),
|
||||
PHP_MSHUTDOWN(dbplus),
|
||||
PHP_RINIT(dbplus), /* Replace with NULL if there's nothing to do at request start */
|
||||
PHP_RSHUTDOWN(dbplus), /* Replace with NULL if there's nothing to do at request end */
|
||||
PHP_MINFO(dbplus),
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
STANDARD_MODULE_HEADER,
|
||||
"dbplus",
|
||||
dbplus_functions,
|
||||
PHP_MINIT(dbplus),
|
||||
PHP_MSHUTDOWN(dbplus),
|
||||
PHP_RINIT(dbplus), /* Replace with NULL if there's nothing to do at request start */
|
||||
PHP_RSHUTDOWN(dbplus), /* Replace with NULL if there's nothing to do at request end */
|
||||
PHP_MINFO(dbplus),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
/* }}} */
|
||||
@@ -138,11 +145,52 @@ PHP_INI_END()
|
||||
|
||||
PHP_MINIT_FUNCTION(dbplus)
|
||||
{
|
||||
/* resource id for cdb connections */
|
||||
le_dbplus_relation = zend_register_list_destructors_ex(dbplus_destruct_relation, NULL, "dbplus_relation", module_number);
|
||||
le_dbplus_tupel = zend_register_list_destructors_ex(dbplus_destruct_tupel , NULL, "dbplus_tuple" , module_number);
|
||||
/* resource id for cdb connections */
|
||||
le_dbplus_relation = zend_register_list_destructors_ex(dbplus_destruct_relation, NULL, "dbplus_relation", module_number);
|
||||
le_dbplus_tupel = zend_register_list_destructors_ex(dbplus_destruct_tupel , NULL, "dbplus_tuple" , module_number);
|
||||
|
||||
return SUCCESS;
|
||||
/* constants for DBPLUS error codes */
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_NOERR", ERR_NOERR, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_DUPLICATE", ERR_DUPLICATE, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_EOSCAN", ERR_EOSCAN, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_EMPTY", ERR_EMPTY, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_CLOSE", ERR_CLOSE, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_WLOCKED", ERR_WLOCKED, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_LOCKED", ERR_LOCKED, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_NOLOCK", ERR_NOLOCK, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_READ", ERR_READ, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_WRITE", ERR_WRITE, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_CREATE", ERR_CREATE, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_LSEEK", ERR_LSEEK, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_LENGTH", ERR_LENGTH, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_OPEN", ERR_OPEN, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_WOPEN", ERR_WOPEN, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_MAGIC", ERR_MAGIC, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_VERSION", ERR_VERSION, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_PGSIZE", ERR_PGSIZE, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_CRC", ERR_CRC, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_PIPE", ERR_PIPE, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_NIDX", ERR_NIDX, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_MALLOC", ERR_MALLOC, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_NUSERS", ERR_NUSERS, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_PREEXIT", ERR_PREEXIT, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_ONTRAP", ERR_ONTRAP, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_PREPROC", ERR_PREPROC, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_DBPARSE", ERR_DBPARSE, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_DBRUNERR", ERR_DBRUNERR, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_DBPREEXIT", ERR_DBPREEXIT, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_WAIT", ERR_WAIT, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_CORRUPT_TUPLE", ERR_CORRUPT_TUPLE, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_WARNING0", ERR_WARNING0, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_PANIC", ERR_PANIC, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_FIFO", ERR_FIFO, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_PERM", ERR_PERM, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_TCL", ERR_TCL, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_RESTRICTED", ERR_RESTRICTED, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_USER", ERR_USER, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("DBPLUS_ERR_UNKNOWN", ERR_UNKNOWN, CONST_CS | CONST_PERSISTENT);
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
@@ -151,7 +199,7 @@ PHP_MINIT_FUNCTION(dbplus)
|
||||
|
||||
PHP_MSHUTDOWN_FUNCTION(dbplus)
|
||||
{
|
||||
return SUCCESS;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
@@ -161,7 +209,7 @@ PHP_MSHUTDOWN_FUNCTION(dbplus)
|
||||
/* Remove if there's nothing to do at request start */
|
||||
PHP_RINIT_FUNCTION(dbplus)
|
||||
{
|
||||
return SUCCESS;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
@@ -171,7 +219,7 @@ PHP_RINIT_FUNCTION(dbplus)
|
||||
/* Remove if there's nothing to do at request end */
|
||||
PHP_RSHUTDOWN_FUNCTION(dbplus)
|
||||
{
|
||||
return SUCCESS;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
@@ -180,13 +228,13 @@ PHP_RSHUTDOWN_FUNCTION(dbplus)
|
||||
|
||||
PHP_MINFO_FUNCTION(dbplus)
|
||||
{
|
||||
php_info_print_table_start();
|
||||
php_info_print_table_header(2, "dbplus support", "enabled");
|
||||
php_info_print_table_end();
|
||||
php_info_print_table_start();
|
||||
php_info_print_table_header(2, "dbplus support", "enabled");
|
||||
php_info_print_table_end();
|
||||
|
||||
/* Remove comments if you have entries in php.ini
|
||||
DISPLAY_INI_ENTRIES();
|
||||
*/
|
||||
/* Remove comments if you have entries in php.ini
|
||||
DISPLAY_INI_ENTRIES();
|
||||
*/
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
@@ -197,24 +245,24 @@ PHP_MINFO_FUNCTION(dbplus)
|
||||
*/
|
||||
PHP_FUNCTION(dbplus_open)
|
||||
{
|
||||
relf *conn;
|
||||
relf *conn;
|
||||
|
||||
zval **name, **writing, **searchpath;
|
||||
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &name, &writing, &searchpath) == FAILURE){
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
zval **name, **writing, **searchpath;
|
||||
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &name, &writing, &searchpath) == FAILURE){
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
convert_to_string_ex(name);
|
||||
convert_to_long_ex(writing);
|
||||
convert_to_long_ex(searchpath);
|
||||
convert_to_string_ex(name);
|
||||
convert_to_long_ex(writing);
|
||||
convert_to_long_ex(searchpath);
|
||||
|
||||
conn = cdb_open((*name)->value.str.val, (*writing)->value.lval, (*searchpath)->value.lval);
|
||||
if(conn == NULL) {
|
||||
/* TODO error handling */
|
||||
RETURN_FALSE;
|
||||
}
|
||||
conn = cdb_open(Z_STRVAL_PP(name), Z_LVAL_PP(writing), Z_LVAL_PP(searchpath));
|
||||
if(conn == NULL) {
|
||||
/* TODO error handling */
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
ZEND_REGISTER_RESOURCE(return_value, conn, le_dbplus);
|
||||
ZEND_REGISTER_RESOURCE(return_value, conn, le_dbplus);
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
@@ -223,16 +271,16 @@ PHP_FUNCTION(dbplus_open)
|
||||
*/
|
||||
PHP_FUNCTION(dbplus_close)
|
||||
{
|
||||
zval **conn;
|
||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &conn) == FAILURE){
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
zval **conn;
|
||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &conn) == FAILURE){
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
convert_to_long_ex(conn);
|
||||
convert_to_long_ex(conn);
|
||||
|
||||
/* TODO resource type check */
|
||||
/* TODO resource type check */
|
||||
|
||||
zend_list_delete((*conn)->value.lval);
|
||||
zend_list_delete(Z_LVAL_PP(conn));
|
||||
}
|
||||
/* }}} */
|
||||
#endif
|
||||
|
||||
@@ -1,141 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP version 4.0 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997, 1998, 1999, 2000, 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: Hartmut Holzgraefe <hartmut@six.de> |
|
||||
| |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include "php.h"
|
||||
#include "php_ini.h"
|
||||
#include "php_dbplus.h"
|
||||
|
||||
|
||||
/* {{{ proto int dbplus_change(int handle, string domain)
|
||||
*/
|
||||
PHP_FUNCTION(dbplus_change)
|
||||
{
|
||||
zval **handle, **domain;
|
||||
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &handle, &domain) == FAILURE){
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
convert_to_long_ex(handle);
|
||||
convert_to_string_ex(domain);
|
||||
|
||||
|
||||
php_error(E_WARNING, "dbplus_change: not yet implemented");
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* {{{ proto int dbplus_rcreate(string name, string domlist, int flag)
|
||||
*/
|
||||
PHP_FUNCTION(dbplus_rcreate)
|
||||
{
|
||||
zval **name, **domlist, **flag;
|
||||
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &name, &domlist, &flag) == FAILURE){
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
convert_to_string_ex(name);
|
||||
convert_to_string_ex(domlist);
|
||||
convert_to_long_ex(flag);
|
||||
|
||||
|
||||
php_error(E_WARNING, "dbplus_rcreate: not yet implemented");
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int dbplus_rcrtexact(string name, int handle, int flag)
|
||||
*/
|
||||
PHP_FUNCTION(dbplus_rcrtexact)
|
||||
{
|
||||
zval **name, **handle, **flag;
|
||||
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &name, &handle, &flag) == FAILURE){
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
convert_to_string_ex(name);
|
||||
convert_to_long_ex(handle);
|
||||
convert_to_long_ex(flag);
|
||||
|
||||
|
||||
php_error(E_WARNING, "dbplus_rcrtexact: not yet implemented");
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int dbplus_rcrtlike(string name, int handle, int flag)
|
||||
*/
|
||||
PHP_FUNCTION(dbplus_rcrtlike)
|
||||
{
|
||||
zval **name, **handle, **flag;
|
||||
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &name, &handle, &flag) == FAILURE){
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
convert_to_string_ex(name);
|
||||
convert_to_long_ex(handle);
|
||||
convert_to_long_ex(flag);
|
||||
|
||||
|
||||
php_error(E_WARNING, "dbplus_rcrtlike: not yet implemented");
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int dbplus_resolve(string name, string vname)
|
||||
*/
|
||||
PHP_FUNCTION(dbplus_resolve)
|
||||
{
|
||||
zval **name, **vname;
|
||||
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &name, &vname) == FAILURE){
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
convert_to_string_ex(name);
|
||||
convert_to_string_ex(vname);
|
||||
|
||||
|
||||
php_error(E_WARNING, "dbplus_resolve: not yet implemented");
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int dbplus_tcl(int sid, string script)
|
||||
*/
|
||||
PHP_FUNCTION(dbplus_tcl)
|
||||
{
|
||||
zval **sid, **script;
|
||||
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &sid, &script) == FAILURE){
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
convert_to_long_ex(sid);
|
||||
convert_to_string_ex(script);
|
||||
|
||||
|
||||
php_error(E_WARNING, "dbplus_tcl: not yet implemented");
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
*/
|
||||
+1093
-809
File diff suppressed because it is too large.
Load diff
@@ -20,9 +20,6 @@
|
||||
#ifndef PHP_DBPLUS_H
|
||||
#define PHP_DBPLUS_H
|
||||
|
||||
#include <saccess.h>
|
||||
#include <relation.h>
|
||||
#include <dblight.h>
|
||||
|
||||
extern zend_module_entry dbplus_module_entry;
|
||||
#define phpext_dbplus_ptr &dbplus_module_entry
|
||||
@@ -41,7 +38,6 @@ PHP_MINFO_FUNCTION(dbplus);
|
||||
|
||||
PHP_FUNCTION(dbplus_add);
|
||||
PHP_FUNCTION(dbplus_aql);
|
||||
PHP_FUNCTION(dbplus_change);
|
||||
PHP_FUNCTION(dbplus_chdir);
|
||||
PHP_FUNCTION(dbplus_close);
|
||||
PHP_FUNCTION(dbplus_curr);
|
||||
@@ -89,11 +85,11 @@ PHP_FUNCTION(dbplus_xunlockrel);
|
||||
|
||||
|
||||
/*
|
||||
Declare any global variables you may need between the BEGIN
|
||||
and END macros here:
|
||||
Declare any global variables you may need between the BEGIN
|
||||
and END macros here:
|
||||
|
||||
ZEND_BEGIN_MODULE_GLOBALS(dbplus)
|
||||
int global_variable;
|
||||
int global_variable;
|
||||
ZEND_END_MODULE_GLOBALS(dbplus)
|
||||
*/
|
||||
|
||||
@@ -118,7 +114,7 @@ void dbplus_destruct_relation(zend_rsrc_list_entry *rsrc TSRMLS_DC);
|
||||
void dbplus_destruct_tupel(zend_rsrc_list_entry *rsrc TSRMLS_DC);
|
||||
|
||||
|
||||
#endif /* PHP_DBPLUS_H */
|
||||
#endif /* PHP_DBPLUS_H */
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -140,6 +140,7 @@ function_entry dbx_functions[] = {
|
||||
};
|
||||
|
||||
zend_module_entry dbx_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"dbx",
|
||||
dbx_functions,
|
||||
ZEND_MINIT(dbx),
|
||||
@@ -147,6 +148,7 @@ zend_module_entry dbx_module_entry = {
|
||||
NULL, /*ZEND_RINIT(dbx), /* Replace with NULL if there's nothing to do at request start */
|
||||
NULL, /*ZEND_RSHUTDOWN(dbx), /* Replace with NULL if there's nothing to do at request end */
|
||||
ZEND_MINFO(dbx),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ dnl config.m4 for extension domxml
|
||||
|
||||
AC_DEFUN(PHP_DOM_CHECK_VERSION,[
|
||||
old_CPPFLAGS=$CPPFLAGS
|
||||
CPPFLAGS=-I$DOMXML_DIR/include
|
||||
CPPFLAGS=-I$DOMXML_DIR/include$DOMXML_DIR_ADD
|
||||
AC_MSG_CHECKING(for libxml version)
|
||||
AC_EGREP_CPP(yes,[
|
||||
#include <libxml/xmlversion.h>
|
||||
@@ -25,11 +25,16 @@ PHP_ARG_WITH(dom, for DOM support,
|
||||
|
||||
if test "$PHP_DOM" != "no"; then
|
||||
|
||||
DOMXML_DIR_ADD=""
|
||||
if test -r $PHP_DOM/include/libxml/tree.h; then
|
||||
DOMXML_DIR=$PHP_DOM
|
||||
elif test -r $PHP_DOM/include/libxml2/libxml/tree.h; then
|
||||
DOMXML_DIR=$PHP_DOM
|
||||
DOMXML_DIR_ADD="/libxml2"
|
||||
else
|
||||
for i in /usr/local /usr; do
|
||||
test -r $i/include/libxml/tree.h && DOMXML_DIR=$i
|
||||
test -r $i/include/libxml2/libxml/tree.h && DOMXML_DIR=$i && DOMXML_DIR_ADD="/libxml2"
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -47,7 +52,7 @@ if test "$PHP_DOM" != "no"; then
|
||||
fi
|
||||
|
||||
PHP_ADD_LIBRARY_WITH_PATH($DOM_LIBNAME, $DOMXML_DIR/lib, DOMXML_SHARED_LIBADD)
|
||||
PHP_ADD_INCLUDE($DOMXML_DIR/include)
|
||||
PHP_ADD_INCLUDE($DOMXML_DIR/include$DOMXML_DIR_ADD)
|
||||
|
||||
if test "$PHP_ZLIB_DIR" = "no"; then
|
||||
AC_MSG_ERROR(DOMXML requires ZLIB. Use --with-zlib-dir=<DIR>)
|
||||
|
||||
+30
-34
@@ -18,7 +18,6 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
@@ -117,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 */
|
||||
@@ -134,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)
|
||||
@@ -147,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}
|
||||
};
|
||||
|
||||
@@ -226,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}
|
||||
};
|
||||
|
||||
@@ -256,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}
|
||||
};
|
||||
|
||||
@@ -267,6 +246,7 @@ static zend_function_entry php_domxmlns_class_functions[] = {
|
||||
};
|
||||
|
||||
zend_module_entry domxml_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"domxml",
|
||||
domxml_functions,
|
||||
PHP_MINIT(domxml),
|
||||
@@ -274,6 +254,7 @@ zend_module_entry domxml_module_entry = {
|
||||
PHP_RINIT(domxml),
|
||||
NULL,
|
||||
PHP_MINFO(domxml),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
@@ -393,16 +374,19 @@ void *php_xpath_get_object(zval *wrapper, int rsrc_type1, int rsrc_type2)
|
||||
TSRMLS_FETCH();
|
||||
|
||||
if (Z_TYPE_P(wrapper) != IS_OBJECT) {
|
||||
php_error(E_ERROR, "Wrapper is not an object");
|
||||
php_error(E_WARNING, "Wrapper is not an object");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (zend_hash_index_find(Z_OBJPROP_P(wrapper), 0, (void **) &handle) == FAILURE) {
|
||||
php_error(E_ERROR, "Underlying object missing");
|
||||
php_error(E_WARNING, "Underlying object missing");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
obj = zend_list_find(Z_LVAL_PP(handle), &type);
|
||||
if (!obj || ((type != rsrc_type1) && (type != rsrc_type2))) {
|
||||
php_error(E_ERROR, "Underlying object missing or of invalid type");
|
||||
php_error(E_WARNING, "Underlying object missing or of invalid type");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return obj;
|
||||
@@ -493,17 +477,20 @@ void *php_xpath_get_context(zval *wrapper, int rsrc_type1, int rsrc_type2 TSRMLS
|
||||
int type;
|
||||
|
||||
if (Z_TYPE_P(wrapper) != IS_OBJECT) {
|
||||
php_error(E_ERROR, "Wrapper is not an object");
|
||||
php_error(E_WARNING, "Wrapper is not an object");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (zend_hash_index_find(Z_OBJPROP_P(wrapper), 0, (void **) &handle) ==
|
||||
FAILURE) {
|
||||
php_error(E_ERROR, "Underlying object missing");
|
||||
php_error(E_WARNING, "Underlying object missing");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
obj = zend_list_find(Z_LVAL_PP(handle), &type);
|
||||
if (!obj || ((type != rsrc_type1) && (type != rsrc_type2))) {
|
||||
php_error(E_ERROR, "Underlying object missing or of invalid type");
|
||||
php_error(E_WARNING, "Underlying object missing or of invalid type");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return obj;
|
||||
@@ -591,18 +578,21 @@ void *php_dom_get_object(zval *wrapper, int rsrc_type1, int rsrc_type2 TSRMLS_DC
|
||||
int type;
|
||||
|
||||
if (Z_TYPE_P(wrapper) != IS_OBJECT) {
|
||||
php_error(E_ERROR, "Wrapper is not an object");
|
||||
php_error(E_WARNING, "Wrapper is not an object");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (zend_hash_index_find(Z_OBJPROP_P(wrapper), 0, (void **) &handle) == FAILURE) {
|
||||
php_error(E_ERROR, "Underlying object missing");
|
||||
php_error(E_WARNING, "Underlying object missing");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
obj = zend_list_find(Z_LVAL_PP(handle), &type);
|
||||
|
||||
/* The following test should be replaced with search in all parents */
|
||||
if (!obj) { /* || ((type != rsrc_type1) && (type != rsrc_type2))) { */
|
||||
php_error(E_ERROR, "Underlying object missing or of invalid type");
|
||||
php_error(E_WARNING, "Underlying object missing or of invalid type");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return obj;
|
||||
@@ -953,6 +943,9 @@ PHP_FUNCTION(domxml_attr_name)
|
||||
|
||||
id = getThis();
|
||||
attrp = php_dom_get_object(id, le_domxmlattrp, 0 TSRMLS_CC);
|
||||
if (!attrp) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
RETURN_STRING((char *) (attrp->name), 1);
|
||||
}
|
||||
@@ -2258,7 +2251,6 @@ PHP_FUNCTION(xmldocfile)
|
||||
if (!docp) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
ret = zend_list_insert(docp, le_domxmldocp);
|
||||
|
||||
rv = php_domobject_new((xmlNodePtr) docp, &ret TSRMLS_CC);
|
||||
SEPARATE_ZVAL(&rv);
|
||||
@@ -2560,9 +2552,8 @@ static void php_xpathptr_new_context(INTERNAL_FUNCTION_PARAMETERS, int mode)
|
||||
int ret;
|
||||
|
||||
id = getThis();
|
||||
|
||||
if (!id) {
|
||||
php_error(E_ERROR, "Invalid object");
|
||||
php_error(E_WARNING, "Invalid object");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -2637,6 +2628,9 @@ static void php_xpathptr_eval(INTERNAL_FUNCTION_PARAMETERS, int mode, int expr)
|
||||
|
||||
|
||||
ctxp = php_xpath_get_context(id, le_xpathctxp, 0 TSRMLS_CC);
|
||||
if (!ctxp) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
convert_to_string(str);
|
||||
|
||||
if (contextnode) {
|
||||
@@ -2776,4 +2770,6 @@ PHP_FUNCTION(domxml_version)
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
* vim600: noet sw=4 ts=4 tw=78 fdm=marker
|
||||
* vim<600: noet sw=4 ts=4 tw=78
|
||||
*/
|
||||
@@ -226,7 +226,8 @@ PHP_MSHUTDOWN_FUNCTION(DOTNET)
|
||||
|
||||
|
||||
zend_module_entry dotnet_module_entry = {
|
||||
"dotnet", DOTNET_functions, PHP_MINIT(DOTNET), PHP_MSHUTDOWN(DOTNET), NULL, NULL, PHP_MINFO(DOTNET), STANDARD_MODULE_PROPERTIES
|
||||
STANDARD_MODULE_HEADER,
|
||||
"dotnet", DOTNET_functions, PHP_MINIT(DOTNET), PHP_MSHUTDOWN(DOTNET), NULL, NULL, PHP_MINFO(DOTNET), NO_VERSION_YET, STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
|
||||
@@ -131,11 +131,13 @@ PHP_MINFO_FUNCTION(exif);
|
||||
/* {{{ exif_module_entry
|
||||
*/
|
||||
zend_module_entry exif_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"exif",
|
||||
exif_functions,
|
||||
NULL, NULL,
|
||||
NULL, NULL,
|
||||
PHP_MINFO(exif),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
@@ -218,6 +218,7 @@ function_entry fbsql_functions[] = {
|
||||
/* }}} */
|
||||
|
||||
zend_module_entry fbsql_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"fbsql",
|
||||
fbsql_functions,
|
||||
PHP_MINIT(fbsql),
|
||||
@@ -225,6 +226,7 @@ zend_module_entry fbsql_module_entry = {
|
||||
PHP_RINIT(fbsql),
|
||||
PHP_RSHUTDOWN(fbsql),
|
||||
PHP_MINFO(fbsql),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
|
||||
@@ -68,6 +68,7 @@ function_entry fdf_functions[] = {
|
||||
/* }}} */
|
||||
|
||||
zend_module_entry fdf_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"fdf",
|
||||
fdf_functions,
|
||||
PHP_MINIT(fdf),
|
||||
@@ -75,6 +76,7 @@ zend_module_entry fdf_module_entry = {
|
||||
NULL,
|
||||
NULL,
|
||||
PHP_MINFO(fdf),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
|
||||
@@ -144,7 +144,8 @@ function_entry filepro_functions[] = {
|
||||
};
|
||||
|
||||
zend_module_entry filepro_module_entry = {
|
||||
"filepro", filepro_functions, PHP_MINIT(filepro), PHP_MSHUTDOWN(filepro), NULL, NULL, NULL, STANDARD_MODULE_PROPERTIES
|
||||
STANDARD_MODULE_HEADER,
|
||||
"filepro", filepro_functions, PHP_MINIT(filepro), PHP_MSHUTDOWN(filepro), NULL, NULL, NULL, NO_VERSION_YET, STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ function_entry fribidi_functions[] = {
|
||||
};
|
||||
|
||||
zend_module_entry fribidi_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"fribidi",
|
||||
fribidi_functions,
|
||||
PHP_MINIT(fribidi),
|
||||
@@ -54,6 +55,7 @@ zend_module_entry fribidi_module_entry = {
|
||||
NULL,
|
||||
NULL,
|
||||
PHP_MINFO(fribidi),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
|
||||
@@ -62,6 +62,7 @@ function_entry php_ftp_functions[] = {
|
||||
};
|
||||
|
||||
zend_module_entry php_ftp_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"ftp",
|
||||
php_ftp_functions,
|
||||
PHP_MINIT(ftp),
|
||||
@@ -69,6 +70,7 @@ zend_module_entry php_ftp_module_entry = {
|
||||
NULL,
|
||||
NULL,
|
||||
PHP_MINFO(ftp),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
@@ -854,3 +856,11 @@ PHP_FUNCTION(ftp_quit)
|
||||
/* }}} */
|
||||
|
||||
#endif /* HAVE_FTP */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* indent-tabs-mode: t
|
||||
* End:
|
||||
*/
|
||||
+51
-17
@@ -202,7 +202,16 @@ function_entry gd_functions[] = {
|
||||
/* }}} */
|
||||
|
||||
zend_module_entry gd_module_entry = {
|
||||
"gd", gd_functions, PHP_MINIT(gd), NULL, NULL, NULL, PHP_MINFO(gd), STANDARD_MODULE_PROPERTIES
|
||||
STANDARD_MODULE_HEADER,
|
||||
"gd",
|
||||
gd_functions,
|
||||
PHP_MINIT(gd),
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
PHP_MINFO(gd),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
#ifdef COMPILE_DL_GD
|
||||
@@ -1580,15 +1589,29 @@ PHP_FUNCTION(imagecolorat)
|
||||
convert_to_long_ex(x);
|
||||
convert_to_long_ex(y);
|
||||
|
||||
if (gdImageBoundsSafe(im, Z_LVAL_PP(x), Z_LVAL_PP(y))) {
|
||||
#if HAVE_LIBGD13
|
||||
RETURN_LONG(im->pixels[Z_LVAL_PP(y)][Z_LVAL_PP(x)]);
|
||||
#else
|
||||
RETURN_LONG(im->pixels[Z_LVAL_PP(x)][Z_LVAL_PP(y)]);
|
||||
#endif
|
||||
#if HAVE_LIBGD20
|
||||
if(gdImageTrueColor(im)) {
|
||||
if (im->tpixels && gdImageBoundsSafe(im, 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 {
|
||||
RETURN_FALSE;
|
||||
#endif
|
||||
if (im->pixels && gdImageBoundsSafe(im, Z_LVAL_PP(x), Z_LVAL_PP(y))) {
|
||||
#if HAVE_LIBGD13
|
||||
RETURN_LONG(im->pixels[Z_LVAL_PP(y)][Z_LVAL_PP(x)]);
|
||||
#else
|
||||
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
|
||||
}
|
||||
#endif
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -1755,7 +1778,17 @@ PHP_FUNCTION(imagecolorsforindex)
|
||||
|
||||
convert_to_long_ex(index);
|
||||
col = Z_LVAL_PP(index);
|
||||
|
||||
#if HAVE_LIBGD20
|
||||
if ((col >= 0 && gdImageTrueColor(im)) || (!gdImageTrueColor(im) && col >= 0 && col < gdImageColorsTotal(im))) {
|
||||
if (array_init(return_value) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
add_assoc_long(return_value,"red", gdImageRed(im,col));
|
||||
add_assoc_long(return_value,"green", gdImageGreen(im,col));
|
||||
add_assoc_long(return_value,"blue", gdImageBlue(im,col));
|
||||
add_assoc_long(return_value,"alpha", gdImageAlpha(im,col));
|
||||
}
|
||||
#else
|
||||
if (col >= 0 && col < gdImageColorsTotal(im)) {
|
||||
if (array_init(return_value) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
@@ -1763,7 +1796,9 @@ PHP_FUNCTION(imagecolorsforindex)
|
||||
add_assoc_long(return_value,"red", im->red[col]);
|
||||
add_assoc_long(return_value,"green", im->green[col]);
|
||||
add_assoc_long(return_value,"blue", im->blue[col]);
|
||||
} else {
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
php_error(E_WARNING, "Color index out of range");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
@@ -2745,11 +2780,10 @@ static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode, int
|
||||
}
|
||||
else
|
||||
# endif
|
||||
|
||||
# if HAVE_GD_STRINGFT
|
||||
error = gdImageStringFT(im, brect, col, fontname, ptsize, angle, x, y, str);
|
||||
# endif
|
||||
|
||||
# if HAVE_GD_STRINGTTF
|
||||
# elif HAVE_GD_STRINGTTF
|
||||
error = gdImageStringTTF(im, brect, col, fontname, ptsize, angle, x, y, str);
|
||||
# endif
|
||||
|
||||
@@ -3502,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;
|
||||
@@ -3515,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);
|
||||
|
||||
@@ -45,7 +45,8 @@ function_entry php_gettext_functions[] = {
|
||||
/* }}} */
|
||||
|
||||
zend_module_entry php_gettext_module_entry = {
|
||||
"gettext", php_gettext_functions, NULL, NULL, NULL, NULL, PHP_MINFO(gettext), STANDARD_MODULE_PROPERTIES
|
||||
STANDARD_MODULE_HEADER,
|
||||
"gettext", php_gettext_functions, NULL, NULL, NULL, NULL, PHP_MINFO(gettext), NO_VERSION_YET, STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
#ifdef COMPILE_DL_GETTEXT
|
||||
|
||||
@@ -86,6 +86,7 @@ function_entry gmp_functions[] = {
|
||||
/* {{{ gmp_module_entry
|
||||
*/
|
||||
zend_module_entry gmp_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"gmp",
|
||||
gmp_functions,
|
||||
ZEND_MODULE_STARTUP_N(gmp),
|
||||
@@ -93,6 +94,7 @@ zend_module_entry gmp_module_entry = {
|
||||
NULL, /* Replace with NULL if there's nothing to do at request start */
|
||||
NULL, /* Replace with NULL if there's nothing to do at request end */
|
||||
ZEND_MODULE_INFO_N(gmp),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
+2
-1
@@ -129,7 +129,8 @@ function_entry hw_functions[] = {
|
||||
};
|
||||
|
||||
zend_module_entry hw_module_entry = {
|
||||
"hyperwave", hw_functions, PHP_MINIT(hw), PHP_MSHUTDOWN(hw), NULL, NULL, PHP_MINFO(hw), STANDARD_MODULE_PROPERTIES
|
||||
STANDARD_MODULE_HEADER,
|
||||
"hyperwave", hw_functions, PHP_MINIT(hw), PHP_MSHUTDOWN(hw), NULL, NULL, PHP_MINFO(hw), NO_VERSION_YET, STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
+10
-1
@@ -89,7 +89,16 @@ function_entry icap_functions[] = {
|
||||
|
||||
|
||||
zend_module_entry php_icap_module_entry = {
|
||||
"icap", icap_functions, PHP_MINIT(icap), NULL, NULL, NULL, PHP_MINFO(icap), 0, 0, 0, NULL
|
||||
STANDARD_MODULE_HEADER,
|
||||
"icap",
|
||||
icap_functions,
|
||||
PHP_MINIT(icap),
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
PHP_MINFO(icap),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
|
||||
|
||||
+4
-2
@@ -51,7 +51,7 @@
|
||||
/* {{{ iconv_functions[]
|
||||
*/
|
||||
function_entry iconv_functions[] = {
|
||||
PHP_FE(iconv, NULL)
|
||||
PHP_NAMED_FE(iconv,php_if_iconv, NULL)
|
||||
PHP_FE(ob_iconv_handler, NULL)
|
||||
PHP_FE(iconv_get_encoding, NULL)
|
||||
PHP_FE(iconv_set_encoding, NULL)
|
||||
@@ -62,6 +62,7 @@ function_entry iconv_functions[] = {
|
||||
/* {{{ iconv_module_entry
|
||||
*/
|
||||
zend_module_entry iconv_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"iconv",
|
||||
iconv_functions,
|
||||
PHP_MINIT(miconv),
|
||||
@@ -69,6 +70,7 @@ zend_module_entry iconv_module_entry = {
|
||||
NULL,
|
||||
NULL,
|
||||
PHP_MINFO(miconv),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
/* }}} */
|
||||
@@ -162,7 +164,7 @@ int php_iconv_string(char *in_p, char **out, char *in_charset, char *out_charset
|
||||
|
||||
/* {{{ proto string iconv(string in_charset, string out_charset, string str)
|
||||
Returns str converted to the out_charset character set */
|
||||
PHP_FUNCTION(iconv)
|
||||
PHP_NAMED_FUNCTION(php_if_iconv)
|
||||
{
|
||||
zval **in_charset, **out_charset, **in_buffer;
|
||||
char *out_buffer;
|
||||
|
||||
@@ -33,7 +33,7 @@ PHP_MINIT_FUNCTION(miconv);
|
||||
PHP_MSHUTDOWN_FUNCTION(miconv);
|
||||
PHP_MINFO_FUNCTION(miconv);
|
||||
|
||||
PHP_FUNCTION(iconv);
|
||||
PHP_NAMED_FUNCTION(php_if_iconv);
|
||||
PHP_FUNCTION(ob_iconv_handler);
|
||||
PHP_FUNCTION(iconv_get_encoding);
|
||||
PHP_FUNCTION(iconv_set_encoding);
|
||||
|
||||
@@ -6,13 +6,13 @@ iconv test
|
||||
--GET--
|
||||
--FILE--
|
||||
<?php
|
||||
echo "iconv extension is available";
|
||||
$test = "Stig S誥her Bakken";
|
||||
print "$test\n";
|
||||
printf("%s\n", iconv("iso-8859-1", "utf-8", $test));
|
||||
echo "iconv extension is available\n";
|
||||
$test = "æøå";
|
||||
printf("ISO-8859-1: %s\nUTF-8: %s\n",
|
||||
$test, iconv("ISO-8859-1", "UTF-8", $test));
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
iconv extension is available
|
||||
Stig S誥her Bakken
|
||||
Stig Sテヲther Bakken
|
||||
ISO-8859-1: æøå
|
||||
UTF-8: æøå
|
||||
+5
-1
@@ -158,12 +158,15 @@ function_entry imap_functions[] = {
|
||||
/* {{{ imap_module_entry
|
||||
*/
|
||||
zend_module_entry imap_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"imap",
|
||||
imap_functions,
|
||||
PHP_MINIT(imap),
|
||||
NULL, PHP_RINIT(imap),
|
||||
NULL,
|
||||
PHP_RINIT(imap),
|
||||
PHP_RSHUTDOWN(imap),
|
||||
PHP_MINFO(imap),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
/* }}} */
|
||||
@@ -2097,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);
|
||||
|
||||
|
||||
@@ -165,6 +165,7 @@ $endif;
|
||||
};
|
||||
|
||||
zend_module_entry ifx_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"informix",
|
||||
ifx_functions,
|
||||
PHP_MINIT(ifx),
|
||||
@@ -172,6 +173,7 @@ zend_module_entry ifx_module_entry = {
|
||||
PHP_RINIT(ifx),
|
||||
NULL,
|
||||
PHP_MINFO(ifx),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
|
||||
@@ -67,6 +67,7 @@ function_entry ii_functions[] = {
|
||||
};
|
||||
|
||||
zend_module_entry ingres_ii_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"ingres_ii",
|
||||
ii_functions,
|
||||
PHP_MINIT(ii),
|
||||
@@ -74,6 +75,7 @@ zend_module_entry ingres_ii_module_entry = {
|
||||
PHP_RINIT(ii),
|
||||
PHP_RSHUTDOWN(ii),
|
||||
PHP_MINFO(ii),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
|
||||
@@ -108,6 +108,7 @@ function_entry ibase_functions[] = {
|
||||
|
||||
zend_module_entry ibase_module_entry =
|
||||
{
|
||||
STANDARD_MODULE_HEADER,
|
||||
"interbase",
|
||||
ibase_functions,
|
||||
PHP_MINIT(ibase),
|
||||
@@ -115,6 +116,7 @@ zend_module_entry ibase_module_entry =
|
||||
PHP_RINIT(ibase),
|
||||
PHP_RSHUTDOWN(ibase),
|
||||
PHP_MINFO(ibase),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
|
||||
@@ -631,6 +631,7 @@ static PHP_MINFO_FUNCTION(java) {
|
||||
}
|
||||
|
||||
zend_module_entry java_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"java",
|
||||
java_functions,
|
||||
PHP_MINIT(java),
|
||||
@@ -638,6 +639,7 @@ zend_module_entry java_module_entry = {
|
||||
NULL,
|
||||
NULL,
|
||||
PHP_MINFO(java),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
|
||||
+8
-5
@@ -120,6 +120,7 @@ function_entry ldap_functions[] = {
|
||||
/* }}} */
|
||||
|
||||
zend_module_entry ldap_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"ldap",
|
||||
ldap_functions,
|
||||
PHP_MINIT(ldap),
|
||||
@@ -127,6 +128,7 @@ zend_module_entry ldap_module_entry = {
|
||||
NULL,
|
||||
NULL,
|
||||
PHP_MINFO(ldap),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
@@ -207,7 +209,8 @@ 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(_free_ldap_result, NULL, "ldap result entry", 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;
|
||||
|
||||
@@ -988,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
|
||||
@@ -1019,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
|
||||
@@ -2004,6 +2007,6 @@ PHP_FUNCTION(ldap_8859_to_t61)
|
||||
* 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: sw=4 ts=4 fdm=marker
|
||||
* vim<600: sw=4 ts=4
|
||||
*/
|
||||
@@ -64,6 +64,7 @@ function_entry mailparse_functions[] = {
|
||||
};
|
||||
|
||||
zend_module_entry mailparse_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"mailparse",
|
||||
mailparse_functions,
|
||||
PHP_MINIT(mailparse),
|
||||
@@ -71,6 +72,7 @@ zend_module_entry mailparse_module_entry = {
|
||||
PHP_RINIT(mailparse),
|
||||
PHP_RSHUTDOWN(mailparse),
|
||||
PHP_MINFO(mailparse),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
/* charset=UTF-8 */
|
||||
/* charset=UTF-8
|
||||
* vim: encoding=utf-8:
|
||||
* */
|
||||
|
||||
/*
|
||||
* "streamable kanji code filter and converter"
|
||||
@@ -151,6 +153,7 @@ enum mbfl_no_encoding {
|
||||
mbfl_no_encoding_sjis_mac,
|
||||
mbfl_no_encoding_jis,
|
||||
mbfl_no_encoding_2022jp,
|
||||
mbfl_no_encoding_cp1252,
|
||||
mbfl_no_encoding_8859_1,
|
||||
mbfl_no_encoding_8859_2,
|
||||
mbfl_no_encoding_8859_3,
|
||||
@@ -230,7 +233,6 @@ typedef struct _mbfl_encoding {
|
||||
#define MBFL_WCSPLANE_8859_15 0x70f00000 /* 00h - FFh */
|
||||
#define MBFL_WCSPLANE_KSC5601 0x70f10000 /* 2121h - 7E7Eh */
|
||||
#define MBFL_WCSPLANE_GB2312 0x70f20000 /* 2121h - 7E7Eh */
|
||||
|
||||
#define MBFL_WCSGROUP_MASK 0xffffff
|
||||
#define MBFL_WCSGROUP_UCS4MAX 0x70000000
|
||||
#define MBFL_WCSGROUP_WCHARMAX 0x78000000
|
||||
|
||||
@@ -131,6 +131,7 @@ function_entry mbstring_functions[] = {
|
||||
};
|
||||
|
||||
zend_module_entry mbstring_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"mbstring",
|
||||
mbstring_functions,
|
||||
PHP_MINIT(mbstring),
|
||||
@@ -138,6 +139,7 @@ zend_module_entry mbstring_module_entry = {
|
||||
PHP_RINIT(mbstring),
|
||||
PHP_RSHUTDOWN(mbstring),
|
||||
PHP_MINFO(mbstring),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
@@ -809,11 +811,11 @@ php_mbstr_encoding_handler(zval *arg, char *res, char *separator TSRMLS_DC)
|
||||
string.no_encoding = MBSTRG(current_internal_encoding);
|
||||
|
||||
/* count the variables contained in the query */
|
||||
num = 1;
|
||||
num = 0;
|
||||
var = res;
|
||||
n = strlen(res);
|
||||
while(n > 0) {
|
||||
if (*var == *separator) {
|
||||
if (*var == '=') {
|
||||
num++;
|
||||
}
|
||||
var++;
|
||||
@@ -921,7 +923,7 @@ php_mbstr_encoding_handler(zval *arg, char *res, char *separator TSRMLS_DC)
|
||||
|
||||
}
|
||||
|
||||
#if !defined(COMPILE_DL_MBSTRING)
|
||||
#if defined(MBSTR_ENC_TRANS)
|
||||
SAPI_POST_HANDLER_FUNC(php_mbstr_post_handler)
|
||||
{
|
||||
MBSTRG(http_input_identify_post) = mbfl_no_encoding_invalid;
|
||||
@@ -937,7 +939,7 @@ SAPI_POST_HANDLER_FUNC(php_mbstr_post_handler)
|
||||
/* http input processing */
|
||||
void mbstr_treat_data(int arg, char *str, zval* destArray TSRMLS_DC)
|
||||
{
|
||||
char *res = NULL, *var, *val, *separator=NULL;
|
||||
char *res = NULL, *separator=NULL;
|
||||
const char *c_var;
|
||||
pval *array_ptr;
|
||||
int free_buffer=0;
|
||||
|
||||
+10
-1
@@ -111,7 +111,16 @@ function_entry mcal_functions[] = {
|
||||
};
|
||||
|
||||
zend_module_entry php_mcal_module_entry = {
|
||||
"mcal", mcal_functions, PHP_MINIT(mcal), NULL, NULL, NULL, PHP_MINFO(mcal), STANDARD_MODULE_PROPERTIES
|
||||
STANDARD_MODULE_HEADER,
|
||||
"mcal",
|
||||
mcal_functions,
|
||||
PHP_MINIT(mcal),
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
PHP_MINFO(mcal),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
#ifdef COMPILE_DL_MCAL
|
||||
|
||||
+29
-14
@@ -35,6 +35,8 @@
|
||||
#include "php_globals.h"
|
||||
#include "ext/standard/info.h"
|
||||
|
||||
static int le_mcrypt;
|
||||
|
||||
|
||||
function_entry mcrypt_functions[] = {
|
||||
PHP_FE(mcrypt_ecb, NULL)
|
||||
@@ -86,11 +88,13 @@ static PHP_MINIT_FUNCTION(mcrypt);
|
||||
static PHP_MSHUTDOWN_FUNCTION(mcrypt);
|
||||
|
||||
zend_module_entry mcrypt_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"mcrypt",
|
||||
mcrypt_functions,
|
||||
PHP_MINIT(mcrypt), PHP_MSHUTDOWN(mcrypt),
|
||||
NULL, NULL,
|
||||
PHP_MINFO(mcrypt),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES,
|
||||
};
|
||||
|
||||
@@ -196,7 +200,7 @@ ZEND_GET_MODULE(mcrypt)
|
||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &mcryptind) == FAILURE) { \
|
||||
WRONG_PARAM_COUNT \
|
||||
} \
|
||||
ZEND_FETCH_RESOURCE (td, MCRYPT, mcryptind, -1, "MCrypt", MCG(le_h));
|
||||
ZEND_FETCH_RESOURCE (td, MCRYPT, mcryptind, -1, "MCrypt", le_mcrypt);
|
||||
|
||||
#define MCRYPT_GET_MODE_DIR_ARGS(DIRECTORY) \
|
||||
switch (argc) { \
|
||||
@@ -244,12 +248,22 @@ PHP_INI_BEGIN()
|
||||
PHP_INI_END()
|
||||
#endif
|
||||
|
||||
static void php_mcrypt_module_dtor(zend_rsrc_list_entry *rsrc)
|
||||
{
|
||||
MCRYPT td = (MCRYPT) rsrc->ptr;
|
||||
mcrypt_module_close (td);
|
||||
}
|
||||
|
||||
|
||||
static PHP_MINIT_FUNCTION(mcrypt)
|
||||
{
|
||||
#if defined(ZTS) && defined(HAVE_LIBMCRYPT24)
|
||||
ZEND_INIT_MODULE_GLOBALS(mcrypt, NULL, NULL);
|
||||
Z_TYPE(mcrypt_module_entry) = type;
|
||||
#endif
|
||||
|
||||
le_mcrypt = zend_register_list_destructors_ex(php_mcrypt_module_dtor, NULL, "mcrypt", module_number);
|
||||
|
||||
/* modes for mcrypt_??? routines */
|
||||
REGISTER_LONG_CONSTANT("MCRYPT_ENCRYPT", 0, CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("MCRYPT_DECRYPT", 1, CONST_PERSISTENT);
|
||||
@@ -427,7 +441,7 @@ PHP_FUNCTION(mcrypt_module_open)
|
||||
php_error (E_WARNING, "could not open encryption module");
|
||||
RETURN_FALSE;
|
||||
} else {
|
||||
ZEND_REGISTER_RESOURCE (return_value, td, MCG(le_h));
|
||||
ZEND_REGISTER_RESOURCE (return_value, td, le_mcrypt);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
@@ -449,13 +463,18 @@ PHP_FUNCTION(mcrypt_generic_init)
|
||||
MCRYPT_CHECK_PARAM_COUNT (3,3)
|
||||
|
||||
zend_get_parameters_ex(3, &mcryptind, &key, &iv);
|
||||
ZEND_FETCH_RESOURCE (td, MCRYPT, mcryptind, -1, "MCrypt", MCG(le_h));
|
||||
ZEND_FETCH_RESOURCE (td, MCRYPT, mcryptind, -1, "MCrypt", le_mcrypt);
|
||||
convert_to_string_ex (key);
|
||||
convert_to_string_ex (iv);
|
||||
|
||||
max_key_size = mcrypt_enc_get_key_size (td);
|
||||
iv_size = mcrypt_enc_get_iv_size (td);
|
||||
|
||||
if (Z_STRLEN_PP(key) == 0) {
|
||||
php_error (E_WARNING, "key size is 0");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
key_s = emalloc (Z_STRLEN_PP(key));
|
||||
memset (key_s, 0, Z_STRLEN_PP(key));
|
||||
|
||||
@@ -500,7 +519,7 @@ PHP_FUNCTION(mcrypt_generic)
|
||||
MCRYPT_CHECK_PARAM_COUNT (2,2)
|
||||
|
||||
zend_get_parameters_ex(2, &mcryptind, &data);
|
||||
ZEND_FETCH_RESOURCE (td, MCRYPT, mcryptind, -1, "MCrypt", MCG(le_h));
|
||||
ZEND_FETCH_RESOURCE (td, MCRYPT, mcryptind, -1, "MCrypt", le_mcrypt);
|
||||
convert_to_string_ex (data);
|
||||
|
||||
/* Check blocksize */
|
||||
@@ -540,7 +559,7 @@ PHP_FUNCTION(mdecrypt_generic)
|
||||
MCRYPT_CHECK_PARAM_COUNT (2,2)
|
||||
|
||||
zend_get_parameters_ex(2, &mcryptind, &data);
|
||||
ZEND_FETCH_RESOURCE (td, MCRYPT, mcryptind, -1, "MCrypt", MCG(le_h));
|
||||
ZEND_FETCH_RESOURCE (td, MCRYPT, mcryptind, -1, "MCrypt", le_mcrypt);
|
||||
convert_to_string_ex (data);
|
||||
|
||||
/* Check blocksize */
|
||||
@@ -607,7 +626,8 @@ PHP_FUNCTION(mcrypt_enc_self_test)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ proto bool mcrypt_module_close(resource td)
|
||||
Free the descriptor td */
|
||||
PHP_FUNCTION(mcrypt_module_close)
|
||||
{
|
||||
zval **mcryptind;
|
||||
@@ -615,15 +635,10 @@ PHP_FUNCTION(mcrypt_module_close)
|
||||
|
||||
MCRYPT_GET_TD_ARG
|
||||
|
||||
if (mcrypt_module_close (td) < 0) {
|
||||
php_error (E_WARNING, "could not close module");
|
||||
RETURN_FALSE
|
||||
} else {
|
||||
zend_list_delete (Z_LVAL_PP(mcryptind));
|
||||
RETURN_TRUE
|
||||
}
|
||||
zend_list_delete (Z_LVAL_PP(mcryptind));
|
||||
RETURN_TRUE;
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto bool mcrypt_generic_end(resource td)
|
||||
This function terminates encrypt specified by the descriptor td */
|
||||
|
||||
@@ -61,7 +61,6 @@ PHP_FUNCTION(mcrypt_module_get_supported_key_sizes);
|
||||
PHP_FUNCTION(mcrypt_module_close);
|
||||
|
||||
ZEND_BEGIN_MODULE_GLOBALS(mcrypt)
|
||||
int le_h;
|
||||
char *modes_dir;
|
||||
char *algorithms_dir;
|
||||
ZEND_END_MODULE_GLOBALS(mcrypt)
|
||||
|
||||
@@ -46,11 +46,13 @@ function_entry mhash_functions[] = {
|
||||
static PHP_MINIT_FUNCTION(mhash);
|
||||
|
||||
zend_module_entry mhash_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"mhash",
|
||||
mhash_functions,
|
||||
PHP_MINIT(mhash), NULL,
|
||||
NULL, NULL,
|
||||
NULL,
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES,
|
||||
};
|
||||
|
||||
|
||||
@@ -2920,6 +2920,7 @@ PHP_FUNCTION(swftextfield_addString)
|
||||
/* }}} */
|
||||
|
||||
zend_module_entry ming_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"ming",
|
||||
ming_functions,
|
||||
PHP_MINIT(ming),
|
||||
@@ -2927,6 +2928,7 @@ zend_module_entry ming_module_entry = {
|
||||
NULL,
|
||||
NULL,
|
||||
PHP_MINFO(ming),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
|
||||
@@ -145,6 +145,7 @@ function_entry mnogosearch_functions[] = {
|
||||
/* }}} */
|
||||
|
||||
zend_module_entry mnogosearch_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"mnogosearch",
|
||||
mnogosearch_functions,
|
||||
PHP_MINIT(mnogosearch),
|
||||
@@ -152,6 +153,7 @@ zend_module_entry mnogosearch_module_entry = {
|
||||
PHP_RINIT(mnogosearch),
|
||||
NULL,
|
||||
PHP_MINFO(mnogosearch),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
|
||||
+2
-1
@@ -103,8 +103,9 @@ function_entry msql_functions[] = {
|
||||
/* }}} */
|
||||
|
||||
zend_module_entry msql_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"msql", msql_functions, PHP_MINIT(msql), NULL, PHP_RINIT(msql), NULL,
|
||||
PHP_MINFO(msql), STANDARD_MODULE_PROPERTIES
|
||||
PHP_MINFO(msql), NO_VERSION_YET, STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -61,6 +61,7 @@ function_entry muscat_functions[] = {
|
||||
};
|
||||
|
||||
zend_module_entry muscat_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"muscat",
|
||||
muscat_functions,
|
||||
PHP_MINIT(muscat),
|
||||
@@ -68,6 +69,7 @@ zend_module_entry muscat_module_entry = {
|
||||
PHP_RINIT(muscat), /* Replace with NULL if there's nothing to do at request start */
|
||||
PHP_RSHUTDOWN(muscat), /* Replace with NULL if there's nothing to do at request end */
|
||||
PHP_MINFO(muscat),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
|
||||
+2
-1
@@ -23,6 +23,7 @@ AC_DEFUN(PHP_MYSQL_SOCK,[
|
||||
/var/tmp/mysql.sock \
|
||||
/var/lib/mysql/mysql.sock \
|
||||
/var/mysql/mysql.sock \
|
||||
/Private/tmp/mysql.sock \
|
||||
; do
|
||||
if test -r $i; then
|
||||
MYSQL_SOCK=$i
|
||||
@@ -80,7 +81,7 @@ elif test "$PHP_MYSQL" != "no"; then
|
||||
|
||||
if test "$PHP_ZLIB_DIR" != "no"; then
|
||||
PHP_ADD_LIBRARY(z,, MYSQL_SHARED_LIBADD)
|
||||
MYSQL_LIBS="-L$PHP_ZLIB_DIR -z"
|
||||
MYSQL_LIBS="-L$PHP_ZLIB_DIR/lib -z"
|
||||
fi
|
||||
|
||||
PHP_ADD_LIBRARY_WITH_PATH(mysqlclient, $MYSQL_LIB_DIR, MYSQL_SHARED_LIBADD)
|
||||
|
||||
+127
-93
@@ -55,14 +55,16 @@ static int le_result, le_link, le_plink;
|
||||
|
||||
#include "php_ini.h"
|
||||
|
||||
# if HAVE_MYSQL_MYSQL_H
|
||||
# include <mysql/mysql.h>
|
||||
# else
|
||||
# include <mysql.h>
|
||||
# endif
|
||||
#if HAVE_MYSQL_MYSQL_H
|
||||
# include <mysql/mysql.h>
|
||||
#else
|
||||
# include <mysql.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MYSQL_REAL_CONNECT
|
||||
#ifdef HAVE_ERRMSG_H
|
||||
#include <errmsg.h>
|
||||
# ifdef HAVE_ERRMSG_H
|
||||
# include <errmsg.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define SAFE_STRING(s) ((s)?(s):"")
|
||||
@@ -117,8 +119,10 @@ function_entry mysql_functions[] = {
|
||||
PHP_FE(mysql_pconnect, NULL)
|
||||
PHP_FE(mysql_close, NULL)
|
||||
PHP_FE(mysql_select_db, NULL)
|
||||
#if MYSQL_VERSION_ID < 40000
|
||||
PHP_FE(mysql_create_db, NULL)
|
||||
PHP_FE(mysql_drop_db, NULL)
|
||||
#endif
|
||||
PHP_FE(mysql_query, NULL)
|
||||
PHP_FE(mysql_unbuffered_query, NULL)
|
||||
PHP_FE(mysql_db_query, NULL)
|
||||
@@ -164,8 +168,10 @@ function_entry mysql_functions[] = {
|
||||
PHP_FALIAS(mysql_fieldtype, mysql_field_type, NULL)
|
||||
PHP_FALIAS(mysql_fieldflags, mysql_field_flags, NULL)
|
||||
PHP_FALIAS(mysql_selectdb, mysql_select_db, NULL)
|
||||
#if MYSQL_VERSION_ID < 40000
|
||||
PHP_FALIAS(mysql_createdb, mysql_create_db, NULL)
|
||||
PHP_FALIAS(mysql_dropdb, mysql_drop_db, NULL)
|
||||
#endif
|
||||
PHP_FALIAS(mysql_freeresult, mysql_free_result, NULL)
|
||||
PHP_FALIAS(mysql_numfields, mysql_num_fields, NULL)
|
||||
PHP_FALIAS(mysql_numrows, mysql_num_rows, NULL)
|
||||
@@ -182,8 +188,16 @@ function_entry mysql_functions[] = {
|
||||
/* {{{ mysql_module_entry
|
||||
*/
|
||||
zend_module_entry mysql_module_entry = {
|
||||
"mysql", mysql_functions, ZEND_MODULE_STARTUP_N(mysql), PHP_MSHUTDOWN(mysql), PHP_RINIT(mysql), PHP_RSHUTDOWN(mysql),
|
||||
PHP_MINFO(mysql), STANDARD_MODULE_PROPERTIES
|
||||
STANDARD_MODULE_HEADER,
|
||||
"mysql",
|
||||
mysql_functions,
|
||||
ZEND_MODULE_STARTUP_N(mysql),
|
||||
PHP_MSHUTDOWN(mysql),
|
||||
PHP_RINIT(mysql),
|
||||
PHP_RSHUTDOWN(mysql),
|
||||
PHP_MINFO(mysql),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
@@ -316,7 +330,7 @@ ZEND_MODULE_STARTUP_D(mysql)
|
||||
le_result = zend_register_list_destructors_ex(_free_mysql_result, NULL, "mysql result", module_number);
|
||||
le_link = zend_register_list_destructors_ex(_close_mysql_link, NULL, "mysql link", module_number);
|
||||
le_plink = zend_register_list_destructors_ex(NULL, _close_mysql_plink, "mysql link persistent", module_number);
|
||||
mysql_module_entry.type = type;
|
||||
Z_TYPE(mysql_module_entry) = type;
|
||||
|
||||
REGISTER_LONG_CONSTANT("MYSQL_ASSOC", MYSQL_ASSOC, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("MYSQL_NUM", MYSQL_NUM, CONST_CS | CONST_PERSISTENT);
|
||||
@@ -324,6 +338,12 @@ ZEND_MODULE_STARTUP_D(mysql)
|
||||
REGISTER_LONG_CONSTANT("MYSQL_USE_RESULT", MYSQL_USE_RESULT, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("MYSQL_STORE_RESULT", MYSQL_STORE_RESULT, CONST_CS | CONST_PERSISTENT);
|
||||
|
||||
#ifdef ZTS
|
||||
# if MYSQL_VERSION_ID >= 40000
|
||||
mysql_thread_init();
|
||||
# endif
|
||||
#endif
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -332,6 +352,12 @@ ZEND_MODULE_STARTUP_D(mysql)
|
||||
*/
|
||||
PHP_MSHUTDOWN_FUNCTION(mysql)
|
||||
{
|
||||
#ifdef ZTS
|
||||
# if MYSQL_VERSION_ID >= 40000
|
||||
mysql_thread_end();
|
||||
# endif
|
||||
#endif
|
||||
|
||||
UNREGISTER_INI_ENTRIES();
|
||||
return SUCCESS;
|
||||
}
|
||||
@@ -438,7 +464,7 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||
MYSQL_DO_CONNECT_RETURN_FALSE();
|
||||
}
|
||||
convert_to_string_ex(z_user);
|
||||
user = (*z_user)->value.str.val;
|
||||
user = Z_STRVAL_PP(z_user);
|
||||
}
|
||||
break;
|
||||
case 3: {
|
||||
@@ -447,8 +473,8 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||
}
|
||||
convert_to_string_ex(z_user);
|
||||
convert_to_string_ex(z_passwd);
|
||||
user = (*z_user)->value.str.val;
|
||||
passwd = (*z_passwd)->value.str.val;
|
||||
user = Z_STRVAL_PP(z_user);
|
||||
passwd = Z_STRVAL_PP(z_passwd);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -541,7 +567,7 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||
}
|
||||
|
||||
/* hash it up */
|
||||
new_le.type = le_plink;
|
||||
Z_TYPE(new_le) = le_plink;
|
||||
new_le.ptr = mysql;
|
||||
if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_details_length+1, (void *) &new_le, sizeof(list_entry), NULL)==FAILURE) {
|
||||
free(mysql);
|
||||
@@ -551,7 +577,7 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||
MySG(num_persistent)++;
|
||||
MySG(num_links)++;
|
||||
} else { /* we do */
|
||||
if (le->type != le_plink) {
|
||||
if (Z_TYPE_P(le) != le_plink) {
|
||||
MYSQL_DO_CONNECT_RETURN_FALSE();
|
||||
}
|
||||
/* ensure that the link did not die */
|
||||
@@ -590,16 +616,16 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||
int type, link;
|
||||
void *ptr;
|
||||
|
||||
if (index_ptr->type != le_index_ptr) {
|
||||
if (Z_TYPE_P(index_ptr) != le_index_ptr) {
|
||||
MYSQL_DO_CONNECT_RETURN_FALSE();
|
||||
}
|
||||
link = (int) index_ptr->ptr;
|
||||
ptr = zend_list_find(link,&type); /* check if the link is still there */
|
||||
if (ptr && (type==le_link || type==le_plink)) {
|
||||
zend_list_addref(link);
|
||||
return_value->value.lval = link;
|
||||
Z_LVAL_P(return_value) = link;
|
||||
php_mysql_set_default_link(link TSRMLS_CC);
|
||||
return_value->type = IS_RESOURCE;
|
||||
Z_TYPE_P(return_value) = IS_RESOURCE;
|
||||
efree(hashed_details);
|
||||
MYSQL_DO_CONNECT_CLEANUP();
|
||||
return;
|
||||
@@ -638,8 +664,8 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||
ZEND_REGISTER_RESOURCE(return_value, mysql, le_link);
|
||||
|
||||
/* add it to the hash */
|
||||
new_index_ptr.ptr = (void *) return_value->value.lval;
|
||||
new_index_ptr.type = le_index_ptr;
|
||||
new_index_ptr.ptr = (void *) Z_LVAL_P(return_value);
|
||||
Z_TYPE(new_index_ptr) = le_index_ptr;
|
||||
if (zend_hash_update(&EG(regular_list), hashed_details, hashed_details_length+1,(void *) &new_index_ptr, sizeof(list_entry), NULL)==FAILURE) {
|
||||
efree(hashed_details);
|
||||
MYSQL_DO_CONNECT_RETURN_FALSE();
|
||||
@@ -648,7 +674,7 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||
}
|
||||
|
||||
efree(hashed_details);
|
||||
php_mysql_set_default_link(return_value->value.lval TSRMLS_CC);
|
||||
php_mysql_set_default_link(Z_LVAL_P(return_value) TSRMLS_CC);
|
||||
MYSQL_DO_CONNECT_CLEANUP();
|
||||
}
|
||||
/* }}} */
|
||||
@@ -752,7 +778,7 @@ PHP_FUNCTION(mysql_select_db)
|
||||
|
||||
convert_to_string_ex(db);
|
||||
|
||||
if (mysql_select_db(&mysql->conn, (*db)->value.str.val)!=0) {
|
||||
if (mysql_select_db(&mysql->conn, Z_STRVAL_PP(db))!=0) {
|
||||
RETURN_FALSE;
|
||||
} else {
|
||||
RETURN_TRUE;
|
||||
@@ -866,6 +892,7 @@ PHP_FUNCTION(mysql_get_server_info)
|
||||
|
||||
#endif
|
||||
|
||||
#if MYSQL_VERSION_ID < 40000
|
||||
/* {{{ proto int mysql_create_db(string database_name [, int link_identifier])
|
||||
Create a MySQL database */
|
||||
PHP_FUNCTION(mysql_create_db)
|
||||
@@ -896,7 +923,7 @@ PHP_FUNCTION(mysql_create_db)
|
||||
ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, mysql_link, id, "MySQL-Link", le_link, le_plink);
|
||||
|
||||
convert_to_string_ex(db);
|
||||
if (mysql_create_db(&mysql->conn, (*db)->value.str.val)==0) {
|
||||
if (mysql_create_db(&mysql->conn, Z_STRVAL_PP(db))==0) {
|
||||
RETURN_TRUE;
|
||||
} else {
|
||||
RETURN_FALSE;
|
||||
@@ -935,13 +962,14 @@ PHP_FUNCTION(mysql_drop_db)
|
||||
ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, mysql_link, id, "MySQL-Link", le_link, le_plink);
|
||||
|
||||
convert_to_string_ex(db);
|
||||
if (mysql_drop_db(&mysql->conn, (*db)->value.str.val)==0) {
|
||||
if (mysql_drop_db(&mysql->conn, Z_STRVAL_PP(db))==0) {
|
||||
RETURN_TRUE;
|
||||
} else {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
#endif
|
||||
|
||||
/* {{{ php_mysql_do_query_general
|
||||
*/
|
||||
@@ -954,7 +982,7 @@ static void php_mysql_do_query_general(zval **query, zval **mysql_link, int link
|
||||
|
||||
if (db) {
|
||||
convert_to_string_ex(db);
|
||||
if (mysql_select_db(&mysql->conn, (*db)->value.str.val)!=0) {
|
||||
if (mysql_select_db(&mysql->conn, Z_STRVAL_PP(db))!=0) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
@@ -965,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;
|
||||
}
|
||||
@@ -977,11 +1007,11 @@ static void php_mysql_do_query_general(zval **query, zval **mysql_link, int link
|
||||
convert_to_string_ex(query);
|
||||
/* mysql_query is binary unsafe, use mysql_real_query */
|
||||
#if MYSQL_VERSION_ID > 32199
|
||||
if (mysql_real_query(&mysql->conn, (*query)->value.str.val, (*query)->value.str.len)!=0) {
|
||||
if (mysql_real_query(&mysql->conn, Z_STRVAL_PP(query), Z_STRLEN_PP(query))!=0) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
#else
|
||||
if (mysql_query(&mysql->conn, (*query)->value.str.val)!=0) {
|
||||
if (mysql_query(&mysql->conn, Z_STRVAL_PP(query))!=0) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
#endif
|
||||
@@ -1152,7 +1182,7 @@ PHP_FUNCTION(mysql_list_tables)
|
||||
ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, mysql_link, id, "MySQL-Link", le_link, le_plink);
|
||||
|
||||
convert_to_string_ex(db);
|
||||
if (mysql_select_db(&mysql->conn, (*db)->value.str.val)!=0) {
|
||||
if (mysql_select_db(&mysql->conn, Z_STRVAL_PP(db))!=0) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
if ((mysql_result=mysql_list_tables(&mysql->conn, NULL))==NULL) {
|
||||
@@ -1195,11 +1225,11 @@ PHP_FUNCTION(mysql_list_fields)
|
||||
ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, mysql_link, id, "MySQL-Link", le_link, le_plink);
|
||||
|
||||
convert_to_string_ex(db);
|
||||
if (mysql_select_db(&mysql->conn, (*db)->value.str.val)!=0) {
|
||||
if (mysql_select_db(&mysql->conn, Z_STRVAL_PP(db))!=0) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
convert_to_string_ex(table);
|
||||
if ((mysql_result=mysql_list_fields(&mysql->conn, (*table)->value.str.val, NULL))==NULL) {
|
||||
if ((mysql_result=mysql_list_fields(&mysql->conn, Z_STRVAL_PP(table), NULL))==NULL) {
|
||||
php_error(E_WARNING, "Unable to save MySQL query result");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
@@ -1311,13 +1341,13 @@ PHP_FUNCTION(mysql_affected_rows)
|
||||
ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, mysql_link, id, "MySQL-Link", le_link, le_plink);
|
||||
|
||||
/* conversion from int64 to long happing here */
|
||||
return_value->value.lval = (long) mysql_affected_rows(&mysql->conn);
|
||||
return_value->type = IS_LONG;
|
||||
Z_LVAL_P(return_value) = (long) mysql_affected_rows(&mysql->conn);
|
||||
Z_TYPE_P(return_value) = IS_LONG;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ proto char mysql_escape_string([char string])
|
||||
/* {{{ proto string mysql_escape_string(string to_be_escaped)
|
||||
Escape string for mysql query */
|
||||
PHP_FUNCTION(mysql_escape_string)
|
||||
{
|
||||
@@ -1333,7 +1363,7 @@ PHP_FUNCTION(mysql_escape_string)
|
||||
*/
|
||||
Z_STRVAL_P(return_value) = (char *) emalloc(Z_STRLEN_PP(str)*2+1);
|
||||
Z_STRLEN_P(return_value) = mysql_escape_string(Z_STRVAL_P(return_value), Z_STRVAL_PP(str), Z_STRLEN_PP(str));
|
||||
return_value->type = IS_STRING;
|
||||
Z_TYPE_P(return_value) = IS_STRING;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -1365,8 +1395,8 @@ PHP_FUNCTION(mysql_insert_id)
|
||||
ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, mysql_link, id, "MySQL-Link", le_link, le_plink);
|
||||
|
||||
/* conversion from int64 to long happing here */
|
||||
return_value->value.lval = (long) mysql_insert_id(&mysql->conn);
|
||||
return_value->type = IS_LONG;
|
||||
Z_LVAL_P(return_value) = (long) mysql_insert_id(&mysql->conn);
|
||||
Z_TYPE_P(return_value) = IS_LONG;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -1400,29 +1430,29 @@ PHP_FUNCTION(mysql_result)
|
||||
ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, result, -1, "MySQL result", le_result);
|
||||
|
||||
convert_to_long_ex(row);
|
||||
if ((*row)->value.lval<0 || (*row)->value.lval>=(int)mysql_num_rows(mysql_result)) {
|
||||
php_error(E_WARNING, "Unable to jump to row %d on MySQL result index %d", (*row)->value.lval, (*result)->value.lval);
|
||||
if (Z_LVAL_PP(row)<0 || Z_LVAL_PP(row)>=(int)mysql_num_rows(mysql_result)) {
|
||||
php_error(E_WARNING, "Unable to jump to row %d on MySQL result index %d", Z_LVAL_PP(row), Z_LVAL_PP(result));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
mysql_data_seek(mysql_result, (*row)->value.lval);
|
||||
mysql_data_seek(mysql_result, Z_LVAL_PP(row));
|
||||
if ((sql_row=mysql_fetch_row(mysql_result))==NULL
|
||||
|| (sql_row_lengths=mysql_fetch_lengths(mysql_result))==NULL) { /* shouldn't happen? */
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (field) {
|
||||
switch((*field)->type) {
|
||||
switch(Z_TYPE_PP(field)) {
|
||||
case IS_STRING: {
|
||||
int i=0;
|
||||
MYSQL_FIELD *tmp_field;
|
||||
char *table_name, *field_name, *tmp;
|
||||
|
||||
if ((tmp=strchr((*field)->value.str.val, '.'))) {
|
||||
table_name = estrndup((*field)->value.str.val, tmp-(*field)->value.str.val);
|
||||
if ((tmp=strchr(Z_STRVAL_PP(field), '.'))) {
|
||||
table_name = estrndup(Z_STRVAL_PP(field), tmp-Z_STRVAL_PP(field));
|
||||
field_name = estrdup(tmp+1);
|
||||
} else {
|
||||
table_name = NULL;
|
||||
field_name = estrndup((*field)->value.str.val,(*field)->value.str.len);
|
||||
field_name = estrndup(Z_STRVAL_PP(field),Z_STRLEN_PP(field));
|
||||
}
|
||||
mysql_field_seek(mysql_result, 0);
|
||||
while ((tmp_field=mysql_fetch_field(mysql_result))) {
|
||||
@@ -1434,7 +1464,7 @@ PHP_FUNCTION(mysql_result)
|
||||
}
|
||||
if (!tmp_field) { /* no match found */
|
||||
php_error(E_WARNING, "%s%s%s not found in MySQL result index %d",
|
||||
(table_name?table_name:""), (table_name?".":""), field_name, (*result)->value.lval);
|
||||
(table_name?table_name:""), (table_name?".":""), field_name, Z_LVAL_PP(result));
|
||||
efree(field_name);
|
||||
if (table_name) {
|
||||
efree(table_name);
|
||||
@@ -1449,7 +1479,7 @@ PHP_FUNCTION(mysql_result)
|
||||
break;
|
||||
default:
|
||||
convert_to_long_ex(field);
|
||||
field_offset = (*field)->value.lval;
|
||||
field_offset = Z_LVAL_PP(field);
|
||||
if (field_offset<0 || field_offset>=(int)mysql_num_fields(mysql_result)) {
|
||||
php_error(E_WARNING, "Bad column offset specified");
|
||||
RETURN_FALSE;
|
||||
@@ -1459,16 +1489,16 @@ PHP_FUNCTION(mysql_result)
|
||||
}
|
||||
|
||||
if (sql_row[field_offset]) {
|
||||
return_value->type = IS_STRING;
|
||||
Z_TYPE_P(return_value) = IS_STRING;
|
||||
|
||||
if (PG(magic_quotes_runtime)) {
|
||||
return_value->value.str.val = php_addslashes(sql_row[field_offset], sql_row_lengths[field_offset],&return_value->value.str.len, 0 TSRMLS_CC);
|
||||
Z_STRVAL_P(return_value) = php_addslashes(sql_row[field_offset], sql_row_lengths[field_offset],&Z_STRLEN_P(return_value), 0 TSRMLS_CC);
|
||||
} else {
|
||||
return_value->value.str.len = sql_row_lengths[field_offset];
|
||||
return_value->value.str.val = (char *) safe_estrndup(sql_row[field_offset], return_value->value.str.len);
|
||||
Z_STRLEN_P(return_value) = sql_row_lengths[field_offset];
|
||||
Z_STRVAL_P(return_value) = (char *) safe_estrndup(sql_row[field_offset], Z_STRLEN_P(return_value));
|
||||
}
|
||||
} else {
|
||||
return_value->type = IS_NULL;
|
||||
Z_TYPE_P(return_value) = IS_NULL;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
@@ -1488,8 +1518,8 @@ PHP_FUNCTION(mysql_num_rows)
|
||||
ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, result, -1, "MySQL result", le_result);
|
||||
|
||||
/* conversion from int64 to long happing here */
|
||||
return_value->value.lval = (long)mysql_num_rows(mysql_result);
|
||||
return_value->type = IS_LONG;
|
||||
Z_LVAL_P(return_value) = (long)mysql_num_rows(mysql_result);
|
||||
Z_TYPE_P(return_value) = IS_LONG;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -1506,8 +1536,8 @@ PHP_FUNCTION(mysql_num_fields)
|
||||
|
||||
ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, result, -1, "MySQL result", le_result);
|
||||
|
||||
return_value->value.lval = mysql_num_fields(mysql_result);
|
||||
return_value->type = IS_LONG;
|
||||
Z_LVAL_P(return_value) = mysql_num_fields(mysql_result);
|
||||
Z_TYPE_P(return_value) = IS_LONG;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -1541,7 +1571,7 @@ static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type,
|
||||
RETURN_FALSE;
|
||||
}
|
||||
convert_to_long_ex(arg2);
|
||||
result_type = (*arg2)->value.lval;
|
||||
result_type = Z_LVAL_PP(arg2);
|
||||
break;
|
||||
default:
|
||||
WRONG_PARAM_COUNT;
|
||||
@@ -1612,7 +1642,7 @@ PHP_FUNCTION(mysql_fetch_object)
|
||||
php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, MYSQL_ASSOC, 2);
|
||||
|
||||
if (Z_TYPE_P(return_value) == IS_ARRAY) {
|
||||
object_and_properties_init(return_value, &zend_standard_class_def, return_value->value.ht);
|
||||
object_and_properties_init(return_value, &zend_standard_class_def, Z_ARRVAL_P(return_value));
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
@@ -1649,11 +1679,11 @@ PHP_FUNCTION(mysql_data_seek)
|
||||
ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, result, -1, "MySQL result", le_result);
|
||||
|
||||
convert_to_long_ex(offset);
|
||||
if ((*offset)->value.lval<0 || (*offset)->value.lval>=(int)mysql_num_rows(mysql_result)) {
|
||||
php_error(E_WARNING, "Offset %d is invalid for MySQL result index %d", (*offset)->value.lval, (*result)->value.lval);
|
||||
if (Z_LVAL_PP(offset)<0 || Z_LVAL_PP(offset)>=(int)mysql_num_rows(mysql_result)) {
|
||||
php_error(E_WARNING, "Offset %d is invalid for MySQL result index %d", Z_LVAL_PP(offset), Z_LVAL_PP(result));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
mysql_data_seek(mysql_result, (*offset)->value.lval);
|
||||
mysql_data_seek(mysql_result, Z_LVAL_PP(offset));
|
||||
RETURN_TRUE;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -1773,11 +1803,11 @@ PHP_FUNCTION(mysql_fetch_field)
|
||||
ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, result, -1, "MySQL result", le_result);
|
||||
|
||||
if (field) {
|
||||
if ((*field)->value.lval<0 || (*field)->value.lval>=(int)mysql_num_fields(mysql_result)) {
|
||||
if (Z_LVAL_PP(field)<0 || Z_LVAL_PP(field)>=(int)mysql_num_fields(mysql_result)) {
|
||||
php_error(E_WARNING, "MySQL: Bad field offset");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
mysql_field_seek(mysql_result, (*field)->value.lval);
|
||||
mysql_field_seek(mysql_result, Z_LVAL_PP(field));
|
||||
}
|
||||
if ((mysql_field=mysql_fetch_field(mysql_result))==NULL) {
|
||||
RETURN_FALSE;
|
||||
@@ -1794,9 +1824,9 @@ PHP_FUNCTION(mysql_fetch_field)
|
||||
add_property_long(return_value, "primary_key", IS_PRI_KEY(mysql_field->flags)?1:0);
|
||||
add_property_long(return_value, "multiple_key",(mysql_field->flags&MULTIPLE_KEY_FLAG?1:0));
|
||||
add_property_long(return_value, "unique_key",(mysql_field->flags&UNIQUE_KEY_FLAG?1:0));
|
||||
add_property_long(return_value, "numeric", IS_NUM(mysql_field->type)?1:0);
|
||||
add_property_long(return_value, "numeric", IS_NUM(Z_TYPE_P(mysql_field))?1:0);
|
||||
add_property_long(return_value, "blob", IS_BLOB(mysql_field->flags)?1:0);
|
||||
add_property_string(return_value, "type", php_mysql_get_field_name(mysql_field->type), 1);
|
||||
add_property_string(return_value, "type", php_mysql_get_field_name(Z_TYPE_P(mysql_field)), 1);
|
||||
add_property_long(return_value, "unsigned",(mysql_field->flags&UNSIGNED_FLAG?1:0));
|
||||
add_property_long(return_value, "zerofill",(mysql_field->flags&ZEROFILL_FLAG?1:0));
|
||||
}
|
||||
@@ -1817,11 +1847,11 @@ PHP_FUNCTION(mysql_field_seek)
|
||||
ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, result, -1, "MySQL result", le_result);
|
||||
|
||||
convert_to_long_ex(offset);
|
||||
if ((*offset)->value.lval<0 || (*offset)->value.lval>=(int)mysql_num_fields(mysql_result)) {
|
||||
php_error(E_WARNING, "Field %d is invalid for MySQL result index %d", (*offset)->value.lval, (*result)->value.lval);
|
||||
if (Z_LVAL_PP(offset)<0 || Z_LVAL_PP(offset)>=(int)mysql_num_fields(mysql_result)) {
|
||||
php_error(E_WARNING, "Field %d is invalid for MySQL result index %d", Z_LVAL_PP(offset), Z_LVAL_PP(result));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
mysql_field_seek(mysql_result, (*offset)->value.lval);
|
||||
mysql_field_seek(mysql_result, Z_LVAL_PP(offset));
|
||||
RETURN_TRUE;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -1850,35 +1880,35 @@ static void php_mysql_field_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
|
||||
ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, result, -1, "MySQL result", le_result);
|
||||
|
||||
convert_to_long_ex(field);
|
||||
if ((*field)->value.lval<0 || (*field)->value.lval>=(int)mysql_num_fields(mysql_result)) {
|
||||
php_error(E_WARNING, "Field %d is invalid for MySQL result index %d", (*field)->value.lval, (*result)->value.lval);
|
||||
if (Z_LVAL_PP(field)<0 || Z_LVAL_PP(field)>=(int)mysql_num_fields(mysql_result)) {
|
||||
php_error(E_WARNING, "Field %d is invalid for MySQL result index %d", Z_LVAL_PP(field), Z_LVAL_PP(result));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
mysql_field_seek(mysql_result, (*field)->value.lval);
|
||||
mysql_field_seek(mysql_result, Z_LVAL_PP(field));
|
||||
if ((mysql_field=mysql_fetch_field(mysql_result))==NULL) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
switch (entry_type) {
|
||||
case PHP_MYSQL_FIELD_NAME:
|
||||
return_value->value.str.len = strlen(mysql_field->name);
|
||||
return_value->value.str.val = estrndup(mysql_field->name, return_value->value.str.len);
|
||||
return_value->type = IS_STRING;
|
||||
Z_STRLEN_P(return_value) = strlen(mysql_field->name);
|
||||
Z_STRVAL_P(return_value) = estrndup(mysql_field->name, Z_STRLEN_P(return_value));
|
||||
Z_TYPE_P(return_value) = IS_STRING;
|
||||
break;
|
||||
case PHP_MYSQL_FIELD_TABLE:
|
||||
return_value->value.str.len = strlen(mysql_field->table);
|
||||
return_value->value.str.val = estrndup(mysql_field->table, return_value->value.str.len);
|
||||
return_value->type = IS_STRING;
|
||||
Z_STRLEN_P(return_value) = strlen(mysql_field->table);
|
||||
Z_STRVAL_P(return_value) = estrndup(mysql_field->table, Z_STRLEN_P(return_value));
|
||||
Z_TYPE_P(return_value) = IS_STRING;
|
||||
break;
|
||||
case PHP_MYSQL_FIELD_LEN:
|
||||
return_value->value.lval = mysql_field->length;
|
||||
return_value->type = IS_LONG;
|
||||
Z_LVAL_P(return_value) = mysql_field->length;
|
||||
Z_TYPE_P(return_value) = IS_LONG;
|
||||
break;
|
||||
case PHP_MYSQL_FIELD_TYPE:
|
||||
return_value->value.str.val = php_mysql_get_field_name(mysql_field->type);
|
||||
return_value->value.str.len = strlen(return_value->value.str.val);
|
||||
return_value->value.str.val = estrndup(return_value->value.str.val, return_value->value.str.len);
|
||||
return_value->type = IS_STRING;
|
||||
Z_STRVAL_P(return_value) = php_mysql_get_field_name(Z_TYPE_P(mysql_field));
|
||||
Z_STRLEN_P(return_value) = strlen(Z_STRVAL_P(return_value));
|
||||
Z_STRVAL_P(return_value) = estrndup(Z_STRVAL_P(return_value), Z_STRLEN_P(return_value));
|
||||
Z_TYPE_P(return_value) = IS_STRING;
|
||||
break;
|
||||
case PHP_MYSQL_FIELD_FLAGS:
|
||||
strcpy(buf, "");
|
||||
@@ -1927,6 +1957,11 @@ static void php_mysql_field_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
|
||||
strcat(buf, "enum ");
|
||||
}
|
||||
#endif
|
||||
#ifdef SET_FLAG
|
||||
if (mysql_field->flags&SET_FLAG) {
|
||||
strcat(buf, "set ");
|
||||
}
|
||||
#endif
|
||||
#ifdef AUTO_INCREMENT_FLAG
|
||||
if (mysql_field->flags&AUTO_INCREMENT_FLAG) {
|
||||
strcat(buf, "auto_increment ");
|
||||
@@ -1944,9 +1979,9 @@ static void php_mysql_field_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
|
||||
len--;
|
||||
}
|
||||
|
||||
return_value->value.str.len = len;
|
||||
return_value->value.str.val = estrndup(buf, len);
|
||||
return_value->type = IS_STRING;
|
||||
Z_STRLEN_P(return_value) = len;
|
||||
Z_STRVAL_P(return_value) = estrndup(buf, len);
|
||||
Z_TYPE_P(return_value) = IS_STRING;
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -2011,17 +2046,16 @@ PHP_FUNCTION(mysql_free_result)
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
if ((*result)->type==IS_RESOURCE && (*result)->value.lval==0) {
|
||||
if (Z_TYPE_PP(result)==IS_RESOURCE && Z_LVAL_PP(result)==0) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, result, -1, "MySQL result", le_result);
|
||||
|
||||
zend_list_delete((*result)->value.lval);
|
||||
zend_list_delete(Z_LVAL_PP(result));
|
||||
RETURN_TRUE;
|
||||
}
|
||||
/* }}} */
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
@@ -2029,6 +2063,6 @@ PHP_FUNCTION(mysql_free_result)
|
||||
* 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: sw=4 ts=4 fdm=marker
|
||||
* vim<600: sw=4 ts=4
|
||||
*/
|
||||
@@ -48,8 +48,10 @@ PHP_FUNCTION(mysql_connect);
|
||||
PHP_FUNCTION(mysql_pconnect);
|
||||
PHP_FUNCTION(mysql_close);
|
||||
PHP_FUNCTION(mysql_select_db);
|
||||
#if MYSQL_VERSION_ID < 40000
|
||||
PHP_FUNCTION(mysql_create_db);
|
||||
PHP_FUNCTION(mysql_drop_db);
|
||||
#endif
|
||||
PHP_FUNCTION(mysql_query);
|
||||
PHP_FUNCTION(mysql_unbuffered_query);
|
||||
PHP_FUNCTION(mysql_db_query);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -46,6 +46,7 @@ static void ncurses_destruct(zend_rsrc_list_entry *rsrc TSRMLS_DC)
|
||||
/* {{{ ncurses_module_entry
|
||||
*/
|
||||
zend_module_entry ncurses_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"ncurses",
|
||||
ncurses_functions,
|
||||
PHP_MINIT(ncurses),
|
||||
@@ -53,6 +54,7 @@ zend_module_entry ncurses_module_entry = {
|
||||
PHP_RINIT(ncurses), /* Replace with NULL if there's nothing to do at request start */
|
||||
PHP_RSHUTDOWN(ncurses), /* Replace with NULL if there's nothing to do at request end */
|
||||
PHP_MINFO(ncurses),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
@@ -97,6 +97,7 @@ function_entry notes_functions[] = {
|
||||
};
|
||||
|
||||
zend_module_entry notes_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"notes",
|
||||
notes_functions,
|
||||
PHP_MINIT(notes),
|
||||
@@ -104,6 +105,7 @@ zend_module_entry notes_module_entry = {
|
||||
PHP_RINIT(notes),
|
||||
PHP_RSHUTDOWN(notes),
|
||||
PHP_MINFO(notes),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
|
||||
@@ -386,6 +386,7 @@ static zend_function_entry php_oci_coll_class_functions[] = {
|
||||
#endif
|
||||
|
||||
zend_module_entry oci8_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"oci8", /* extension name */
|
||||
php_oci_functions, /* extension function list */
|
||||
PHP_MINIT(oci), /* extension-wide startup function */
|
||||
@@ -393,6 +394,7 @@ zend_module_entry oci8_module_entry = {
|
||||
PHP_RINIT(oci), /* per-request startup function */
|
||||
PHP_RSHUTDOWN(oci), /* per-request shutdown function */
|
||||
PHP_MINFO(oci), /* information function */
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
|
||||
@@ -135,6 +135,7 @@ function_entry odbc_functions[] = {
|
||||
/* {{{ odbc_module_entry
|
||||
*/
|
||||
zend_module_entry odbc_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"odbc",
|
||||
odbc_functions,
|
||||
PHP_MINIT(odbc),
|
||||
@@ -142,6 +143,7 @@ zend_module_entry odbc_module_entry = {
|
||||
PHP_RINIT(odbc),
|
||||
PHP_RSHUTDOWN(odbc),
|
||||
PHP_MINFO(odbc),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
+3
-1
@@ -65,8 +65,10 @@ function_entry velocis_functions[] = {
|
||||
};
|
||||
|
||||
zend_module_entry velocis_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"velocis", velocis_functions, PHP_MINIT(velocis), PHP_MSHUTDOWN(velocis),
|
||||
PHP_RINIT(velocis), NULL, PHP_MINFO(velocis), STANDARD_MODULE_PROPERTIES
|
||||
PHP_RINIT(velocis), NULL, PHP_MINFO(velocis), NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -82,6 +82,7 @@ function_entry openssl_functions[] = {
|
||||
/* {{{ openssl_module_entry
|
||||
*/
|
||||
zend_module_entry openssl_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"openssl",
|
||||
openssl_functions,
|
||||
PHP_MINIT(openssl),
|
||||
@@ -89,6 +90,7 @@ zend_module_entry openssl_module_entry = {
|
||||
NULL,
|
||||
NULL,
|
||||
PHP_MINFO(openssl),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
@@ -146,6 +146,7 @@ function_entry oracle_functions[] = {
|
||||
/* {{{ oracle_module_entry
|
||||
*/
|
||||
zend_module_entry oracle_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"oracle",
|
||||
oracle_functions,
|
||||
PHP_MINIT(oracle), /* extension-wide startup function */
|
||||
@@ -153,6 +154,7 @@ zend_module_entry oracle_module_entry = {
|
||||
PHP_RINIT(oracle), /* per-request startup function */
|
||||
PHP_RSHUTDOWN(oracle), /* per-request shutdown function */
|
||||
PHP_MINFO(oracle),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
@@ -1299,13 +1299,15 @@ function_entry ovrimos_functions[] = {
|
||||
/* }}} */
|
||||
|
||||
zend_module_entry ovrimos_module_entry = {
|
||||
"Ovrimos",
|
||||
STANDARD_MODULE_HEADER,
|
||||
"ovrimos",
|
||||
ovrimos_functions,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
PHP_MINFO(ovrimos),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
|
||||
+4
-1
@@ -54,12 +54,15 @@ function_entry pcntl_functions[] = {
|
||||
};
|
||||
|
||||
zend_module_entry pcntl_module_entry = {
|
||||
"pcntl", pcntl_functions,
|
||||
STANDARD_MODULE_HEADER,
|
||||
"pcntl",
|
||||
pcntl_functions,
|
||||
PHP_MINIT(pcntl),
|
||||
PHP_MSHUTDOWN(pcntl),
|
||||
NULL,
|
||||
NULL,
|
||||
PHP_MINFO(pcntl),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
|
||||
+22
-9
@@ -385,7 +385,8 @@ static void php_pcre_match(INTERNAL_FUNCTION_PARAMETERS, int global)
|
||||
}
|
||||
|
||||
/* Calculate the size of the offsets array, and allocate memory for it. */
|
||||
num_subpats = pcre_info(re, NULL, NULL) + 1;
|
||||
pcre_fullinfo(re, extra, PCRE_INFO_CAPTURECOUNT, &num_subpats);
|
||||
num_subpats++;
|
||||
size_offsets = num_subpats * 3;
|
||||
offsets = (int *)emalloc(size_offsets * sizeof(int));
|
||||
|
||||
@@ -434,29 +435,38 @@ static void php_pcre_match(INTERNAL_FUNCTION_PARAMETERS, int global)
|
||||
|
||||
if (global) { /* global pattern matching */
|
||||
if (subpats_order_val == PREG_PATTERN_ORDER) {
|
||||
/* For each subpattern, insert it into the appropriate array */
|
||||
for (i=0; i<count; i++) {
|
||||
/* For each subpattern, insert it into the appropriate array. */
|
||||
for (i = 0; i < count; i++) {
|
||||
add_next_index_string(match_sets[i], (char *)stringlist[i], 1);
|
||||
}
|
||||
}
|
||||
else {
|
||||
/*
|
||||
* If the number of captured subpatterns on this run is
|
||||
* less than the total possible number, pad the result
|
||||
* arrays with empty strings.
|
||||
*/
|
||||
if (count < num_subpats) {
|
||||
for (; i < num_subpats; i++) {
|
||||
add_next_index_string(match_sets[i], empty_string, 1);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/* Allocate the result set array */
|
||||
ALLOC_ZVAL(result_set);
|
||||
array_init(result_set);
|
||||
INIT_PZVAL(result_set);
|
||||
|
||||
/* Add all the subpatterns to it */
|
||||
for (i=0; i<count; i++) {
|
||||
for (i = 0; i < count; i++) {
|
||||
add_next_index_string(result_set, (char *)stringlist[i], 1);
|
||||
}
|
||||
/* And add it to the output array */
|
||||
zend_hash_next_index_insert(Z_ARRVAL_PP(subpats), &result_set,
|
||||
sizeof(zval *), NULL);
|
||||
sizeof(zval *), NULL);
|
||||
}
|
||||
}
|
||||
else { /* single pattern matching */
|
||||
/* For each subpattern, insert it into the subpatterns array. */
|
||||
for (i=0; i<count; i++) {
|
||||
for (i = 0; i < count; i++) {
|
||||
add_next_index_string((*subpats), (char *)stringlist[i], 1);
|
||||
}
|
||||
}
|
||||
@@ -1364,12 +1374,15 @@ function_entry pcre_functions[] = {
|
||||
};
|
||||
|
||||
zend_module_entry pcre_module_entry = {
|
||||
"pcre", pcre_functions,
|
||||
STANDARD_MODULE_HEADER,
|
||||
"pcre",
|
||||
pcre_functions,
|
||||
PHP_MINIT(pcre),
|
||||
PHP_MSHUTDOWN(pcre),
|
||||
PHP_RINIT(pcre),
|
||||
NULL,
|
||||
PHP_MINFO(pcre),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
|
||||
@@ -41,6 +41,9 @@ PHP_FUNCTION(preg_split);
|
||||
PHP_FUNCTION(preg_quote);
|
||||
PHP_FUNCTION(preg_grep);
|
||||
|
||||
char *php_pcre_replace(char *regex, int regex_len, char *subject, int subject_len,
|
||||
zval *replace_val, int is_callable_replace, int *result_len, int limit TSRMLS_DC);
|
||||
|
||||
extern zend_module_entry pcre_module_entry;
|
||||
#define pcre_module_ptr &pcre_module_entry
|
||||
|
||||
|
||||
@@ -236,6 +236,7 @@ function_entry pdf_functions[] = {
|
||||
/* {{{ pdf_module_entry
|
||||
*/
|
||||
zend_module_entry pdf_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"pdf",
|
||||
pdf_functions,
|
||||
PHP_MINIT(pdf),
|
||||
@@ -243,6 +244,7 @@ zend_module_entry pdf_module_entry = {
|
||||
NULL,
|
||||
NULL,
|
||||
PHP_MINFO(pdf),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
@@ -57,6 +57,7 @@ function_entry pfpro_functions[] = {
|
||||
|
||||
/* {{{ Zend module entry */
|
||||
zend_module_entry pfpro_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"pfpro",
|
||||
pfpro_functions,
|
||||
PHP_MINIT(pfpro),
|
||||
@@ -64,6 +65,7 @@ zend_module_entry pfpro_module_entry = {
|
||||
PHP_RINIT(pfpro), /* request start */
|
||||
PHP_RSHUTDOWN(pfpro), /* request end */
|
||||
PHP_MINFO(pfpro),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
@@ -64,7 +64,7 @@ typedef struct {
|
||||
} php_pfpro_globals;
|
||||
|
||||
#ifdef ZTS
|
||||
#define PFPROG(v) TSRMG(gd_pfpro_id, php_pfpro_globals *, v)
|
||||
#define PFPROG(v) TSRMG(pfpro_globals_id, php_pfpro_globals *, v)
|
||||
#else
|
||||
#define PFPROG(v) (pfpro_globals.v)
|
||||
#endif
|
||||
|
||||
+13
-11
@@ -101,6 +101,7 @@ function_entry pgsql_functions[] = {
|
||||
/* {{{ pgsql_module_entry
|
||||
*/
|
||||
zend_module_entry pgsql_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"pgsql",
|
||||
pgsql_functions,
|
||||
PHP_MINIT(pgsql),
|
||||
@@ -108,6 +109,7 @@ zend_module_entry pgsql_module_entry = {
|
||||
PHP_RINIT(pgsql),
|
||||
PHP_RSHUTDOWN(pgsql),
|
||||
PHP_MINFO(pgsql),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
/* }}} */
|
||||
@@ -160,25 +162,22 @@ static void _close_pgsql_plink(zend_rsrc_list_entry *rsrc TSRMLS_DC)
|
||||
PQfinish(link);
|
||||
PGG(num_persistent)--;
|
||||
PGG(num_links)--;
|
||||
if(PGG(last_notice) != NULL) {
|
||||
efree(PGG(last_notice));
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ _notice_handler
|
||||
*/
|
||||
static void
|
||||
_notice_handler(void *arg, const char *message)
|
||||
static void _notice_handler(void *arg, const char *message)
|
||||
{
|
||||
TSRMLS_FETCH();
|
||||
|
||||
if (! PGG(ignore_notices)) {
|
||||
php_log_err((char *) message TSRMLS_CC);
|
||||
if (PGG(last_notice) != NULL) {
|
||||
if (PGG(last_notice)) {
|
||||
efree(PGG(last_notice));
|
||||
}
|
||||
PGG(last_notice) = estrdup(message);
|
||||
PGG(last_notice_len) = strlen(message);
|
||||
PGG(last_notice) = estrndup(message, PGG(last_notice_len));
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
@@ -237,7 +236,6 @@ static void php_pgsql_init_globals(php_pgsql_globals *pgsql_globals_p TSRMLS_DC)
|
||||
{
|
||||
PGG(num_persistent) = 0;
|
||||
PGG(ignore_notices) = 0;
|
||||
PGG(last_notice) = NULL;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -283,6 +281,7 @@ PHP_RINIT_FUNCTION(pgsql)
|
||||
{
|
||||
PGG(default_link)=-1;
|
||||
PGG(num_links) = PGG(num_persistent);
|
||||
PGG(last_notice) = NULL;
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -291,6 +290,9 @@ PHP_RINIT_FUNCTION(pgsql)
|
||||
*/
|
||||
PHP_RSHUTDOWN_FUNCTION(pgsql)
|
||||
{
|
||||
if (PGG(last_notice)) {
|
||||
efree(PGG(last_notice));
|
||||
}
|
||||
zend_hash_apply(&EG(persistent_list), (apply_func_t) _rollback_transactions TSRMLS_CC);
|
||||
return SUCCESS;
|
||||
}
|
||||
@@ -923,10 +925,10 @@ PHP_FUNCTION(pg_cmdtuples)
|
||||
Returns the last notice set by the backend */
|
||||
PHP_FUNCTION(pg_last_notice)
|
||||
{
|
||||
if (PGG(last_notice) == NULL) {
|
||||
RETURN_FALSE;
|
||||
if (PGG(last_notice)) {
|
||||
RETURN_STRINGL(PGG(last_notice), PGG(last_notice_len), 0);
|
||||
} else {
|
||||
RETURN_STRING(PGG(last_notice),0);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -123,6 +123,7 @@ typedef struct {
|
||||
int le_lofp,le_string;
|
||||
int ignore_notices;
|
||||
char *last_notice;
|
||||
uint last_notice_len;
|
||||
} php_pgsql_globals;
|
||||
|
||||
|
||||
|
||||
@@ -110,6 +110,7 @@ static PHP_MINFO_FUNCTION(posix);
|
||||
/* {{{ posix_module_entry
|
||||
*/
|
||||
zend_module_entry posix_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"posix",
|
||||
posix_functions,
|
||||
NULL,
|
||||
@@ -117,6 +118,7 @@ zend_module_entry posix_module_entry = {
|
||||
NULL,
|
||||
NULL,
|
||||
PHP_MINFO(posix),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
+2
-1
@@ -71,7 +71,8 @@ function_entry pspell_functions[] = {
|
||||
static int le_pspell, le_pspell_config;
|
||||
|
||||
zend_module_entry pspell_module_entry = {
|
||||
"pspell", pspell_functions, PHP_MINIT(pspell), NULL, NULL, NULL, PHP_MINFO(pspell), STANDARD_MODULE_PROPERTIES
|
||||
STANDARD_MODULE_HEADER,
|
||||
"pspell", pspell_functions, PHP_MINIT(pspell), NULL, NULL, NULL, PHP_MINFO(pspell), NO_VERSION_YET, STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
#ifdef COMPILE_DL_PSPELL
|
||||
|
||||
@@ -53,6 +53,7 @@ function_entry qtdom_functions[] = {
|
||||
};
|
||||
|
||||
zend_module_entry qtdom_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"qtdom",
|
||||
qtdom_functions,
|
||||
PHP_MINIT(qtdom),
|
||||
@@ -60,6 +61,7 @@ zend_module_entry qtdom_module_entry = {
|
||||
NULL,
|
||||
NULL,
|
||||
PHP_MINFO(qtdom),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
|
||||
@@ -69,6 +69,7 @@ static zend_function_entry php_readline_functions[] = {
|
||||
};
|
||||
|
||||
zend_module_entry readline_module_entry = {
|
||||
STANDARD_MODULE_HEADER,
|
||||
"readline",
|
||||
php_readline_functions,
|
||||
PHP_MINIT(readline),
|
||||
@@ -76,6 +77,7 @@ zend_module_entry readline_module_entry = {
|
||||
NULL,
|
||||
PHP_RSHUTDOWN(readline),
|
||||
NULL,
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
|
||||
+3
-1
@@ -54,13 +54,15 @@ static zend_function_entry php_recode_functions[] = {
|
||||
};
|
||||
|
||||
zend_module_entry recode_module_entry = {
|
||||
"Recode",
|
||||
STANDARD_MODULE_HEADER,
|
||||
"recode",
|
||||
php_recode_functions,
|
||||
PHP_MINIT(recode),
|
||||
PHP_MSHUTDOWN(recode),
|
||||
NULL,
|
||||
NULL,
|
||||
PHP_MINFO(recode),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
1) Multi-dimenstional array support
|
||||
2) IErrorInfo
|
||||
3) WithEvents
|
||||
4) Documentation (internal and user) and howtos
|
||||
5) IEnumVariant::All() which would be like IEnumVariant::Next(IDispatch::Count)
|
||||
6) Look for memory leaks and AdRef/Release problems - I KNOW there are some...
|
||||
7) Test component (goes with the docs)
|
||||
8) Test suite (Needs test component)
|
||||
9) reduce the need for VARIANT()
|
||||
10) lets try if we are able to call non IDispatch - only Typelib components
|
||||
11) IEnumVariant::Next() without parameter should only return an object, not an array with one element
|
||||
|
||||
|
||||
these seem to be done:
|
||||
|
||||
2) 6) 11)
|
||||
+35
-10
@@ -437,7 +437,7 @@ PHP_INI_ENTRY("com.typelib_file", "", PHP_INI_SYSTEM, OnTypelibFileChange)
|
||||
PHP_INI_END()
|
||||
|
||||
|
||||
/* {{{ proto int com_load(string module_name [, string remote_host [, int codepage[, string typelib]]])
|
||||
/* {{{ proto int com_load(string module_name [, string remote_host [, int codepage [, string typelib]]])
|
||||
Loads a COM module */
|
||||
PHP_FUNCTION(com_load)
|
||||
{
|
||||
@@ -511,6 +511,12 @@ PHP_FUNCTION(com_load)
|
||||
/* @todo if (server_name) */
|
||||
|
||||
if (!server_name) {
|
||||
/* @todo shouldn't the bind context be fetched on module startup and kept as a global shared instance ?
|
||||
* all calls to BindToObject would deliver the same instance then (as desired)
|
||||
* IBindCtx::RegisterObjectBound() should be called then after mkparsedisplayname()
|
||||
*
|
||||
* @todo use mkparsedisplaynameex() ?
|
||||
*/
|
||||
if (SUCCEEDED(hr = CreateBindCtx(0, &pBindCtx))) {
|
||||
if (SUCCEEDED(hr = MkParseDisplayName(pBindCtx, ProgID, &ulEaten, &pMoniker))) {
|
||||
hr = pMoniker->lpVtbl->BindToObject(pMoniker, pBindCtx, NULL, &IID_IDispatch, (LPVOID *) &C_DISPATCH(obj));
|
||||
@@ -548,7 +554,7 @@ PHP_FUNCTION(com_load)
|
||||
pResults.pIID = &IID_IDispatch;
|
||||
pResults.pItf = NULL;
|
||||
pResults.hr = S_OK;
|
||||
hr=CoCreateInstanceEx(&clsid, NULL, CLSCTX_SERVER, &server_info, 1, &pResults);
|
||||
hr=CoCreateInstanceEx(&clsid, NULL, CLSCTX_REMOTE_SERVER, &server_info, 1, &pResults);
|
||||
if (SUCCEEDED(hr)) {
|
||||
hr = pResults.hr;
|
||||
C_DISPATCH(obj) = (IDispatch *) pResults.pItf;
|
||||
@@ -742,7 +748,11 @@ int do_COM_invoke(comval *obj, pval *function_name, VARIANT *var_result, pval **
|
||||
|
||||
efree(funcname);
|
||||
for (current_arg=0;current_arg<arg_count;current_arg++) {
|
||||
VariantClear(&variant_args[current_arg]);
|
||||
/* don't release IDispatch pointers as they are used afterwards */
|
||||
if (V_VT(&variant_args[current_arg]) != VT_DISPATCH) {
|
||||
/* @todo review this: what happens to an array of IDispatchs or a VARIANT->IDispatch */
|
||||
VariantClear(&variant_args[current_arg]);
|
||||
}
|
||||
}
|
||||
efree(variant_args);
|
||||
|
||||
@@ -804,9 +814,8 @@ PHP_FUNCTION(com_invoke)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
php_variant_to_pval(var_result, return_value, codepage TSRMLS_CC);
|
||||
RETVAL_VARIANT(var_result);
|
||||
|
||||
FREE_VARIANT(var_result);
|
||||
efree(arguments);
|
||||
}
|
||||
/* }}} */
|
||||
@@ -1049,9 +1058,7 @@ PHP_FUNCTION(com_propget)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
php_variant_to_pval(var_result, return_value, codepage TSRMLS_CC);
|
||||
|
||||
FREE_VARIANT(var_result);
|
||||
RETVAL_VARIANT(var_result);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -1082,7 +1089,8 @@ PHP_FUNCTION(com_propput)
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ proto bool com_load_typelib(string typelib_name[, int case_insensitiv]) */
|
||||
/* {{{ proto bool com_load_typelib(string typelib_name [, int case_insensitiv])
|
||||
Loads a Typelib */
|
||||
PHP_FUNCTION(com_load_typelib)
|
||||
{
|
||||
pval *arg_typelib, *arg_cis;
|
||||
@@ -1673,7 +1681,16 @@ PHP_MSHUTDOWN_FUNCTION(COM)
|
||||
/* exports for external object creation */
|
||||
|
||||
zend_module_entry COM_module_entry = {
|
||||
"com", COM_functions, PHP_MINIT(COM), PHP_MSHUTDOWN(COM), NULL, NULL, PHP_MINFO(COM), STANDARD_MODULE_PROPERTIES
|
||||
STANDARD_MODULE_HEADER,
|
||||
"com",
|
||||
COM_functions,
|
||||
PHP_MINIT(COM),
|
||||
PHP_MSHUTDOWN(COM),
|
||||
NULL,
|
||||
NULL,
|
||||
PHP_MINFO(COM),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
};
|
||||
|
||||
PHPAPI int php_COM_get_le_comval()
|
||||
@@ -1682,3 +1699,11 @@ PHPAPI int php_COM_get_le_comval()
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* indent-tabs-mode: t
|
||||
* End:
|
||||
*/
|
||||
Loaded 100 of 302 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user