mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-10 18:50:50 +00:00
Compare commits
28
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19aa8d72d6 | ||
|
|
acc4a8ed6d | ||
|
|
897b701dee | ||
|
|
a1abfb7643 | ||
|
|
94bea2902b | ||
|
|
e97718461b | ||
|
|
3dab84005d | ||
|
|
18f86e7757 | ||
|
|
d37b140601 | ||
|
|
38423a895b | ||
|
|
a648a5c2cc | ||
|
|
641f19c68f | ||
|
|
ff9946b264 | ||
|
|
fe550afba6 | ||
|
|
bf7603cf83 | ||
|
|
cca7178332 | ||
|
|
28c96e89e1 | ||
|
|
b189759bcd | ||
|
|
c26b4d8c9f | ||
|
|
a37b138d7c | ||
|
|
79a898697d | ||
|
|
3f65e03649 | ||
|
|
7482eb6adc | ||
|
|
113b132639 | ||
|
|
82070f1cdf | ||
|
|
eac689a606 | ||
|
|
ba90d5d529 | ||
|
|
4dceb59561 |
No files matched your search
@@ -1,3 +1,91 @@
|
||||
2000-10-02 Rasmus Lerdorf <rasmus@php.net>
|
||||
|
||||
* ext/imap/config.m4:
|
||||
Add --with-imap-ssl to support SSL'ized imap library in RH7 and others
|
||||
|
||||
2000-10-02 Andi Gutmans <andi@zend.com>
|
||||
|
||||
* ext/standard/url.c: - Now really fix it.
|
||||
|
||||
* NEWS: - Update NEWS
|
||||
|
||||
* ext/standard/url.c: - Fix bug in parse_url()
|
||||
|
||||
2000-10-02 Rasmus Lerdorf <rasmus@php.net>
|
||||
|
||||
* ext/sablot/config.m4
|
||||
ext/shmop/config.m4
|
||||
ext/sockets/config.m4
|
||||
ext/curl/config.m4
|
||||
ext/cybercash/config.m4
|
||||
ext/java/config.m4
|
||||
ext/pfpro/config.m4
|
||||
ext/pgsql/config.m4
|
||||
configure.in
|
||||
ext/ccvs/config.m4: Clean up the alignment of configure --help output
|
||||
|
||||
2000-10-02 Andi Gutmans <andi@zend.com>
|
||||
|
||||
* NEWS: - Aiming for thursday to release 4.0.3
|
||||
|
||||
* main/php_version.h:
|
||||
- Darn file is needed for Windows. Maybe it should be called
|
||||
php_version.w32.h?
|
||||
|
||||
* main/php_version.h:
|
||||
- Any reason why php_version.h is in the CVS? I'm removing it so if I'm
|
||||
screwing something up scream *now* :)
|
||||
|
||||
2000-10-02 Daniel Beulshausen <daniel@php4win.de>
|
||||
|
||||
* NEWS: forgot that a while ago...
|
||||
|
||||
* ext/mcrypt/mcrypt.dsp: fixed unresolved externals.
|
||||
|
||||
2000-10-02 Stig Venaas <venaas@uninett.no>
|
||||
|
||||
* NEWS: *** empty log message ***
|
||||
|
||||
2000-10-02 Sterling Hughes <stirling@bestweb.net>
|
||||
|
||||
* ext/curl/curl.c: Tiny change in copying of buffer.
|
||||
|
||||
2000-10-01 James Moore <James@phpuk.org>
|
||||
|
||||
* INSTALL:
|
||||
Adding note about having to make install if you do not have apache already installed (IE there is no apache dir to copy httpd binary to)
|
||||
|
||||
2000-10-01 Andi Gutmans <andi@zend.com>
|
||||
|
||||
* main/fopen-wrappers.c: - Remove unneeded IS_SLASH() definition.
|
||||
|
||||
2000-10-01 Derick Rethans <d.rethans@jdimedia.nl>
|
||||
|
||||
* ext/shmop/.cvsignore
|
||||
ext/shmop/Makefile.in
|
||||
ext/shmop/README
|
||||
ext/shmop/config.m4
|
||||
ext/shmop/php_shmop.h
|
||||
ext/shmop/setup.stub
|
||||
ext/shmop/shmop.c:
|
||||
- Added the shmop extension. It allows more general ways of shared memory
|
||||
access. (thanks to Ilia Alshanestky <iliaa@home.com> and Slava Poliakov
|
||||
<slavapl@mailandnews.com>
|
||||
|
||||
2000-10-01 Sterling Hughes <stirling@bestweb.net>
|
||||
|
||||
* NEWS:
|
||||
It seems these entries were truncated in my commit, perhaps it was due to
|
||||
the multiple NEWS entries in the same commit.
|
||||
|
||||
2000-10-01 Andi Gutmans <andi@zend.com>
|
||||
|
||||
* NEWS:
|
||||
- Fixed conflicts. Those first two lines with the XXX need to be fixed.
|
||||
I'm not sure if they were meant to be in the Changelog or NEWS file, in
|
||||
any case they are broken. Whoever, commited them can you please fix it?
|
||||
I couldn't find who commited them in the CVS commit messages
|
||||
|
||||
2000-09-30 Daniel Beulshausen <daniel@php4win.de>
|
||||
|
||||
* php_modules.dsw: added filepro & snmp
|
||||
|
||||
@@ -94,7 +94,8 @@ $ ./configure --prefix=/www --activate-module=src/modules/php4/libphp4.a
|
||||
(The above line is correct! Yes, we know libphp4.a does not exist at this
|
||||
stage. It isn't supposed to. It will be created.)
|
||||
$ make
|
||||
(you should now have an httpd binary which you can copy to your Apache bin dir)
|
||||
(you should now have an httpd binary which you can copy to your Apache bin dir if
|
||||
is is your first install then you need to "make install" as well)
|
||||
$ cd ../php-4.0.x
|
||||
$ cp php.ini-dist /usr/local/lib/php.ini
|
||||
You can edit /usr/local/lib/php.ini file to set PHP options.
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
PHP 4.0 NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
|
||||
?? ??? 2000, Version 4.0.3-dev
|
||||
05 Oct 2000, Version 4.0.3
|
||||
- Fixed dirname() under certain conditions (Andi)
|
||||
- Add --with-imap-ssl to support SSL'ized imap library in RH7 and others
|
||||
(Rasmus)
|
||||
- Fix possible crash bug in parse_url() (Andi)
|
||||
- Added support for trans sid under Win32 (Daniel)
|
||||
- IPv6 support in fopen (Stig Venaas)
|
||||
- Added the shmop extension. It allows more general ways of shared memory
|
||||
access. (thanks to Ilia Alshanestky <iliaa@home.com> and Slava Poliakov
|
||||
<slavapl@mailandnews.com> (Derick)
|
||||
- Added the ability for CURLOPT_POSTFIELDS to accept an associative array of
|
||||
HTTP POST variables and values. (Sterling)
|
||||
- Added the CURLOPT_HTTPHEADER option to curl_setopt(). (Sterling)
|
||||
|
||||
@@ -70,10 +70,7 @@ cwd_state main_cwd_state; /* True global */
|
||||
|
||||
#ifdef TSRM_WIN32
|
||||
#define tsrm_strtok_r(a,b,c) strtok((a),(b))
|
||||
#define DEFAULT_SLASH '\\'
|
||||
#define TOKENIZER_STRING "/\\"
|
||||
|
||||
#define COPY_WHEN_ABSOLUTE 2
|
||||
|
||||
static int php_check_dots(const char *element, int n)
|
||||
{
|
||||
@@ -90,7 +87,6 @@ static int php_check_dots(const char *element, int n)
|
||||
|
||||
|
||||
#else
|
||||
#define DEFAULT_SLASH '/'
|
||||
#define TOKENIZER_STRING "/"
|
||||
#endif
|
||||
|
||||
@@ -107,10 +103,6 @@ static int php_check_dots(const char *element, int n)
|
||||
(len == 1 && ptr[0] == '.')
|
||||
#endif
|
||||
|
||||
#ifndef COPY_WHEN_ABSOLUTE
|
||||
#define COPY_WHEN_ABSOLUTE 0
|
||||
#endif
|
||||
|
||||
/* define this to check semantics */
|
||||
#define IS_DIR_OK(s) (1)
|
||||
|
||||
@@ -422,7 +414,9 @@ CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path
|
||||
}
|
||||
|
||||
if (length == -1) {
|
||||
return virtual_chdir(path);
|
||||
/* No directory only file name */
|
||||
errno = ENOENT;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (length == COPY_WHEN_ABSOLUTE && IS_ABSOLUTE_PATH(path, length+1)) { /* Also use trailing slash if this is absolute */
|
||||
|
||||
@@ -46,8 +46,9 @@
|
||||
/* mode_t isn't defined on Windows */
|
||||
typedef int mode_t;
|
||||
|
||||
#define DEFAULT_SLASH '\\'
|
||||
#define IS_SLASH(c) ((c) == '/' || (c) == '\\')
|
||||
|
||||
#define COPY_WHEN_ABSOLUTE 2
|
||||
#define IS_ABSOLUTE_PATH(path, len) \
|
||||
(len >= 2 && isalpha(path[0]) && path[1] == ':')
|
||||
|
||||
@@ -56,10 +57,16 @@ typedef int mode_t;
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
|
||||
#define DEFAULT_SLASH '/'
|
||||
#define IS_SLASH(c) ((c) == '/')
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef COPY_WHEN_ABSOLUTE
|
||||
#define COPY_WHEN_ABSOLUTE 0
|
||||
#endif
|
||||
|
||||
#ifndef IS_ABSOLUTE_PATH
|
||||
#define IS_ABSOLUTE_PATH(path, len) \
|
||||
(IS_SLASH(path[0]))
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "zend_compile.h"
|
||||
|
||||
#define ZEND_EXTENSION_API_NO 20000815
|
||||
#define ZEND_EXTENSION_API_NO 20001002
|
||||
|
||||
typedef struct _zend_extension_version_info {
|
||||
int zend_extension_api_no;
|
||||
|
||||
+2
-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.3-dev)
|
||||
AM_INIT_AUTOMAKE(php, 4.0.3RC2)
|
||||
|
||||
PHP_VERSION=$VERSION
|
||||
echo "/* automatically generated by configure */" > php_version.h.new
|
||||
@@ -456,7 +456,7 @@ else
|
||||
fi
|
||||
|
||||
PHP_ARG_ENABLE(debug, whether to include debugging symbols,
|
||||
[ --enable-debug Compile with debugging symbols.], no)
|
||||
[ --enable-debug Compile with debugging symbols.], no)
|
||||
|
||||
if test "$PHP_DEBUG" = "yes"; then
|
||||
PHP_DEBUG=1
|
||||
|
||||
+2
-2
@@ -3,8 +3,8 @@ dnl config.m4 for PHP4 CCVS Extension
|
||||
|
||||
AC_MSG_CHECKING(CCVS Support)
|
||||
AC_ARG_WITH(ccvs,
|
||||
[ --with-ccvs[=DIR] Compile CCVS support into PHP4.
|
||||
Please specify your CCVS base install directory as DIR.
|
||||
[ --with-ccvs[=DIR] Compile CCVS support into PHP4.
|
||||
Please specify your CCVS base install directory as DIR.
|
||||
],
|
||||
[
|
||||
if test "$withval" != "no"; then
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@ dnl $Id$
|
||||
dnl config.m4 for extension CURL
|
||||
|
||||
PHP_ARG_WITH(curl, for CURL support,
|
||||
[ --with-curl[=DIR] Include CURL support])
|
||||
[ --with-curl[=DIR] Include CURL support])
|
||||
|
||||
if test "$PHP_CURL" != "no"; then
|
||||
if test -r $PHP_CURL/include/curl/easy.h; then
|
||||
@@ -31,4 +31,4 @@ if test "$PHP_CURL" != "no"; then
|
||||
AC_DEFINE(HAVE_CURL,1,[ ])
|
||||
|
||||
PHP_EXTENSION(curl, $ext_shared)
|
||||
fi
|
||||
fi
|
||||
+1
-1
@@ -552,7 +552,7 @@ PHP_FUNCTION(curl_exec)
|
||||
ret_data = emalloc(stat_sb.st_size+1);
|
||||
|
||||
while ((b = fread(buf, 1, sizeof(buf), fp)) > 0) {
|
||||
memcpy(&(ret_data[pos]), buf, b);
|
||||
memcpy(ret_data + pos, buf, b);
|
||||
pos += b;
|
||||
}
|
||||
ret_data[stat_sb.st_size - 1] = '\0';
|
||||
|
||||
@@ -4,7 +4,7 @@ dnl don't forget to call PHP_EXTENSION(cybercash)
|
||||
AC_MSG_CHECKING(for CyberCash support)
|
||||
AC_ARG_WITH(cybercash,
|
||||
[ --with-cybercash[=DIR] Include CyberCash support. DIR is the CyberCash MCK
|
||||
install directory.],
|
||||
install directory.],
|
||||
[
|
||||
if test "$withval" != "no"; then
|
||||
test -f $withval/mckcrypt.h && MCK_DIR="$withval"
|
||||
|
||||
@@ -23,6 +23,17 @@ if test "$PHP_KERBEROS" != "no"; then
|
||||
PHP_KERBEROS_LIBDIR=$PHP_KERBEROS/lib
|
||||
fi
|
||||
|
||||
PHP_ARG_WITH(imap-ssl,for SSL support in IMAP,
|
||||
[ --with-imap-ssl[=DIR] Include SSL support in IMAP.])
|
||||
|
||||
if test "$PHP_IMAP_SSL" = "yes"; then
|
||||
PHP_IMAP_SSL=/usr
|
||||
fi
|
||||
|
||||
if test "$PHP_IMAP_SSL" != "no"; then
|
||||
PHP_SSL_LIBDIR=$PHP_IMAP_SSL/lib
|
||||
fi
|
||||
|
||||
PHP_ARG_WITH(imap,for IMAP support,
|
||||
[ --with-imap[=DIR] Include IMAP support. DIR is the IMAP include
|
||||
and c-client.a directory.])
|
||||
@@ -77,6 +88,12 @@ PHP_ARG_WITH(imap,for IMAP support,
|
||||
AC_ADD_LIBRARY(gssapi_krb5,, IMAP_SHARED_LIBADD)
|
||||
fi
|
||||
|
||||
if test "$PHP_IMAP_SSL" != "no"; then
|
||||
AC_ADD_LIBPATH($PHP_SSL_LIBDIR, IMAP_SHARED_LIBADD)
|
||||
AC_ADD_LIBRARY(ssl,, IMAP_SHARED_LIBADD)
|
||||
AC_ADD_LIBRARY(crypto,, IMAP_SHARED_LIBADD)
|
||||
fi
|
||||
|
||||
PHP_EXTENSION(imap, $ext_shared)
|
||||
|
||||
AC_DEFINE(HAVE_IMAP,1,[ ])
|
||||
|
||||
-103
@@ -1,103 +0,0 @@
|
||||
#ifndef _INCLUDED_IMAP_H
|
||||
#define _INCLUDED_IMAP_H
|
||||
|
||||
#if COMPILE_DL
|
||||
#undef HAVE_IMAP
|
||||
#define HAVE_IMAP 1
|
||||
#endif
|
||||
|
||||
#if HAVE_IMAP
|
||||
|
||||
#ifndef PHP_WIN32
|
||||
#include "build-defs.h"
|
||||
#endif
|
||||
|
||||
/* Functions accessable to PHP */
|
||||
extern zend_module_entry imap_module_entry;
|
||||
#define imap_module_ptr &imap_module_entry
|
||||
|
||||
extern PHP_MINIT_FUNCTION(imap);
|
||||
extern PHP_RINIT_FUNCTION(imap);
|
||||
extern PHP_RSHUTDOWN_FUNCTION(imap);
|
||||
PHP_MINFO_FUNCTION(imap);
|
||||
PHP_FUNCTION(imap_open);
|
||||
PHP_FUNCTION(imap_popen);
|
||||
PHP_FUNCTION(imap_reopen);
|
||||
PHP_FUNCTION(imap_num_msg);
|
||||
PHP_FUNCTION(imap_num_recent);
|
||||
PHP_FUNCTION(imap_headers);
|
||||
PHP_FUNCTION(imap_headerinfo);
|
||||
PHP_FUNCTION(imap_rfc822_parse_headers);
|
||||
PHP_FUNCTION(imap_body);
|
||||
PHP_FUNCTION(imap_fetchstructure);
|
||||
PHP_FUNCTION(imap_fetchbody);
|
||||
PHP_FUNCTION(imap_expunge);
|
||||
PHP_FUNCTION(imap_delete);
|
||||
PHP_FUNCTION(imap_undelete);
|
||||
PHP_FUNCTION(imap_check);
|
||||
PHP_FUNCTION(imap_close);
|
||||
PHP_FUNCTION(imap_mail_copy);
|
||||
PHP_FUNCTION(imap_mail_move);
|
||||
PHP_FUNCTION(imap_createmailbox);
|
||||
PHP_FUNCTION(imap_renamemailbox);
|
||||
PHP_FUNCTION(imap_deletemailbox);
|
||||
PHP_FUNCTION(imap_listmailbox);
|
||||
PHP_FUNCTION(imap_scanmailbox);
|
||||
PHP_FUNCTION(imap_subscribe);
|
||||
PHP_FUNCTION(imap_unsubscribe);
|
||||
PHP_FUNCTION(imap_append);
|
||||
PHP_FUNCTION(imap_ping);
|
||||
PHP_FUNCTION(imap_base64);
|
||||
PHP_FUNCTION(imap_qprint);
|
||||
PHP_FUNCTION(imap_8bit);
|
||||
PHP_FUNCTION(imap_binary);
|
||||
PHP_FUNCTION(imap_mailboxmsginfo);
|
||||
PHP_FUNCTION(imap_rfc822_write_address);
|
||||
PHP_FUNCTION(imap_rfc822_parse_adrlist);
|
||||
PHP_FUNCTION(imap_setflag_full);
|
||||
PHP_FUNCTION(imap_clearflag_full);
|
||||
PHP_FUNCTION(imap_sort);
|
||||
PHP_FUNCTION(imap_fetchheader);
|
||||
PHP_FUNCTION(imap_fetchtext);
|
||||
PHP_FUNCTION(imap_uid);
|
||||
PHP_FUNCTION(imap_msgno);
|
||||
PHP_FUNCTION(imap_list);
|
||||
PHP_FUNCTION(imap_list_full);
|
||||
PHP_FUNCTION(imap_listscan);
|
||||
PHP_FUNCTION(imap_lsub);
|
||||
PHP_FUNCTION(imap_lsub_full);
|
||||
PHP_FUNCTION(imap_create);
|
||||
PHP_FUNCTION(imap_rename);
|
||||
PHP_FUNCTION(imap_status);
|
||||
PHP_FUNCTION(imap_bodystruct);
|
||||
PHP_FUNCTION(imap_fetch_overview);
|
||||
PHP_FUNCTION(imap_mail_compose);
|
||||
PHP_FUNCTION(imap_alerts);
|
||||
PHP_FUNCTION(imap_errors);
|
||||
PHP_FUNCTION(imap_last_error);
|
||||
PHP_FUNCTION(imap_mail);
|
||||
PHP_FUNCTION(imap_search);
|
||||
PHP_FUNCTION(imap_utf8);
|
||||
PHP_FUNCTION(imap_utf7_decode);
|
||||
PHP_FUNCTION(imap_utf7_encode);
|
||||
PHP_FUNCTION(imap_mime_header_decode);
|
||||
#else
|
||||
#define imap_module_ptr NULL
|
||||
#endif /* HAVE_IMAP */
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define phpext_imap_ptr imap_module_ptr
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+3
-3
@@ -3,9 +3,9 @@
|
||||
|
||||
AC_MSG_CHECKING(for Java support)
|
||||
AC_ARG_WITH(java,
|
||||
[ --with-java[=DIR] Include Java support. DIR is the base install
|
||||
directory for the JDK. This extension can only
|
||||
be built as a shared dl.],
|
||||
[ --with-java[=DIR] Include Java support. DIR is the base install
|
||||
directory for the JDK. This extension can only
|
||||
be built as a shared dl.],
|
||||
[
|
||||
if test "$withval" != "no"; then
|
||||
JAVA_SHARED="libphp_java.la"
|
||||
|
||||
@@ -54,7 +54,7 @@ BSC32=bscmake.exe
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib ntwdblib.lib /nologo /dll /machine:I386 /out:"MSSQL_65_Release/php_mssql.dll" /libpath:"..\..\Release_TS"
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib libmcrypt.lib libltdl.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_mcrypt.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\..\php_build\mcrypt" /libpath:"..\..\Release_TS_Inline"
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib php4ts.lib libmcrypt.lib libltdl.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_mcrypt.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\..\php_build\mcrypt" /libpath:"..\..\Release_TS_Inline" /libpath:"..\..\TSRM\Release_TS" /libpath:"..\..\TSRM\Release_TS_Inline"
|
||||
|
||||
!ELSEIF "$(CFG)" == "mcrypt - Win32 Debug_TS"
|
||||
|
||||
@@ -96,6 +96,10 @@ LINK32=link.exe
|
||||
|
||||
SOURCE=.\mcrypt.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\win32\readdir.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
@@ -104,14 +108,10 @@ SOURCE=.\mcrypt.c
|
||||
|
||||
SOURCE=.\php_mcrypt.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\MCRYPT_Win32_HOWTO.txt
|
||||
SOURCE=..\..\win32\readdir.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
@@ -1,61 +0,0 @@
|
||||
dnl $Id$
|
||||
dnl config.m4 for extension pcre
|
||||
|
||||
dnl By default we'll compile and link against the bundled PCRE library
|
||||
dnl if DIR is supplied, we'll use that for linking
|
||||
|
||||
PHP_ARG_WITH(pcre-regex,whether to include PCRE support,
|
||||
[ --without-pcre-regex Do not include Perl Compatible Regular Expressions
|
||||
support. Use --with-pcre-regex=DIR to specify DIR
|
||||
where PCRE's include and library files are located,
|
||||
if not using bundled library.],yes)
|
||||
|
||||
if test "$PHP_PCRE_REGEX" != "no"; then
|
||||
PHP_EXTENSION(pcre, $ext_shared)
|
||||
if test "$PHP_PCRE_REGEX" = "yes"; then
|
||||
PCRE_LIBADD=pcrelib/libpcre.la
|
||||
PCRE_SHARED_LIBADD=pcrelib/libpcre.la
|
||||
PCRE_SUBDIRS=pcrelib
|
||||
PHP_SUBST(PCRE_LIBADD)
|
||||
PHP_SUBST(PCRE_SUBDIRS)
|
||||
AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ])
|
||||
PHP_FAST_OUTPUT($ext_builddir/pcrelib/Makefile)
|
||||
LIB_BUILD($ext_builddir/pcrelib,$ext_shared,yes)
|
||||
else
|
||||
test -f $PHP_PCRE_REGEX/pcre.h && PCRE_INCDIR=$PHP_PCRE_REGEX
|
||||
test -f $PHP_PCRE_REGEX/include/pcre.h && PCRE_INCDIR=$PHP_PCRE_REGEX/include
|
||||
|
||||
if test -z "$PCRE_INCDIR"; then
|
||||
AC_MSG_RESULT(Could not find pcre.h in $PHP_PCRE_REGEX)
|
||||
fi
|
||||
|
||||
changequote({,})
|
||||
pcre_major=`grep PCRE_MAJOR $PCRE_INCDIR/pcre.h | sed -e 's/[^0-9]//g'`
|
||||
pcre_minor=`grep PCRE_MINOR $PCRE_INCDIR/pcre.h | sed -e 's/[^0-9]//g'`
|
||||
changequote([,])
|
||||
pcre_minor_length=`echo "$pcre_minor" | wc -c | sed -e 's/[^0-9]//g'`
|
||||
if test "$pcre_minor_length" -eq 2 ; then
|
||||
pcre_minor="$pcre_minor"0
|
||||
fi
|
||||
pcre_version=$pcre_major$pcre_minor
|
||||
if test "$pcre_version" -lt 208; then
|
||||
AC_MSG_ERROR(The PCRE extension requires PCRE library version >= 2.08)
|
||||
fi
|
||||
|
||||
test -f $PHP_PCRE_REGEX/libpcre.a && PCRE_LIBDIR="$PHP_PCRE_REGEX"
|
||||
test -f $PHP_PCRE_REGEX/lib/libpcre.a && PCRE_LIBDIR="$PHP_PCRE_REGEX/lib"
|
||||
|
||||
if test -z "$PCRE_LIBDIR" ; then
|
||||
AC_MSG_ERROR(Could not find libpcre.a in $PHP_PCRE_REGEX)
|
||||
fi
|
||||
|
||||
AC_ADD_LIBRARY_WITH_PATH(pcre, $PCRE_LIBDIR, PCRE_SHARED_LIBADD)
|
||||
|
||||
AC_ADD_INCLUDE($PCRE_INCDIR)
|
||||
AC_DEFINE(HAVE_PCRE, 1, [ ])
|
||||
fi
|
||||
fi
|
||||
PHP_SUBST(PCRE_SHARED_LIBADD)
|
||||
|
||||
|
||||
AC_CHECK_FUNC(memmove, [], [AC_DEFINE(USE_BCOPY, 1, [ ])])
|
||||
+1
-1
@@ -2,7 +2,7 @@ dnl $Id$
|
||||
dnl config.m4 for extension pfpro
|
||||
|
||||
PHP_ARG_WITH(pfpro, whether to include Verisign Payflow Pro support,
|
||||
[ --with-pfpro[=DIR] Include Verisign Payflow Pro support])
|
||||
[ --with-pfpro[=DIR] Include Verisign Payflow Pro support])
|
||||
|
||||
if test "$PHP_PFPRO" != "no"; then
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ AC_DEFUN(PGSQL_INC_CHK,[if test -r $i$1/libpq-fe.h; then PGSQL_DIR=$i; PGSQL_INC
|
||||
PHP_ARG_WITH(pgsql,for PostgreSQL support,
|
||||
[ --with-pgsql[=DIR] Include PostgreSQL support. DIR is the PostgreSQL
|
||||
base install directory, defaults to /usr/local/pgsql.
|
||||
Set DIR to "shared" to build as a dl, or "shared,DIR"
|
||||
Set DIR to "shared" to build as a dl, or "shared,DIR"
|
||||
to build as a dl and still specify DIR.])
|
||||
|
||||
if test "$PHP_PGSQL" != "no"; then
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
AC_MSG_CHECKING(for Java support)
|
||||
AC_ARG_WITH(java,
|
||||
[ --with-java[=DIR] Include Java support. DIR is the base install
|
||||
directory for the JDK. This extension can only
|
||||
be built as a shared dl.],
|
||||
[ --with-java[=DIR] Include Java support. DIR is the base install
|
||||
directory for the JDK. This extension can only
|
||||
be built as a shared dl.],
|
||||
[
|
||||
if test "$withval" != "no"; then
|
||||
JAVA_SHARED="libphp_java.la"
|
||||
|
||||
@@ -2,7 +2,7 @@ dnl $Id$
|
||||
dnl config.m4 for extension Sablot
|
||||
|
||||
PHP_ARG_WITH(sablot, for Sablotron XSL support,
|
||||
[ --with-sablot[=DIR] Include Sablotron support])
|
||||
[ --with-sablot[=DIR] Include Sablotron support])
|
||||
|
||||
if test "$PHP_SABLOT" != "no"; then
|
||||
if test -r $PHP_SABLOT/include/sablot.h; then
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
dnl $Id$
|
||||
PHP_ARG_ENABLE(shmop, whether to enable shmop support,
|
||||
[ --enable-shmop Enable shmop support])
|
||||
[ --enable-shmop Enable shmop support])
|
||||
|
||||
if test "$PHP_SHMOP" != "no"; then
|
||||
AC_DEFINE(HAVE_SHMOP, 1, [ ])
|
||||
|
||||
@@ -47,7 +47,7 @@ typedef struct {
|
||||
|
||||
#ifdef ZTS
|
||||
#define EXTNAMEG(v) (extname_globals->v)
|
||||
#define EXTNAMELS_FETCH() php_extname_globals *extname_globals = ts_resource(gd_extname_id)
|
||||
#define EXTNAMELS_FETCH() php_extname_globals *extname_globals = ts_resource(extname_globals_id)
|
||||
#else
|
||||
#define EXTNAMEG(v) (extname_globals.v)
|
||||
#define EXTNAMELS_FETCH()
|
||||
|
||||
@@ -102,7 +102,7 @@ PHP_FUNCTION(confirm_extname_compiled)
|
||||
convert_to_string_ex(arg);
|
||||
|
||||
len = sprintf(string, "Congratulations, you have successfully modified ext/extname/config.m4, module %s is compiled into PHP", Z_STRVAL_PP(arg));
|
||||
RETVAL_STRINGL(string, len, 1);
|
||||
RETURN_STRINGL(string, len, 1);
|
||||
}
|
||||
/* }}} */
|
||||
/* The previous line is meant for emacs, so it can correctly fold and unfold
|
||||
|
||||
@@ -10,13 +10,13 @@ dnl If your extension references something external, use with:
|
||||
|
||||
dnl PHP_ARG_WITH(sockets, for sockets support,
|
||||
dnl Make sure that the comment is aligned:
|
||||
dnl [ --with-sockets Include sockets support])
|
||||
dnl [ --with-sockets Include sockets support])
|
||||
|
||||
dnl Otherwise use enable:
|
||||
|
||||
PHP_ARG_ENABLE(sockets, whether to enable sockets support,
|
||||
dnl Make sure that the comment is aligned:
|
||||
[ --enable-sockets Enable sockets support])
|
||||
[ --enable-sockets Enable sockets support])
|
||||
|
||||
if test "$PHP_SOCKETS" != "no"; then
|
||||
dnl If you will not be testing anything external, like existence of
|
||||
|
||||
+48
-29
@@ -691,31 +691,55 @@ PHP_FUNCTION(basename)
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
convert_to_string_ex(str);
|
||||
ret = php_basename((*str)->value.str.val,(*str)->value.str.len);
|
||||
RETVAL_STRING(ret,1)
|
||||
efree(ret);
|
||||
ret = php_basename(Z_STRVAL_PP(str), Z_STRLEN_PP(str));
|
||||
RETVAL_STRING(ret, 0)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
PHPAPI void php_dirname(char *str, int len) {
|
||||
register char *c;
|
||||
/* This function doesn't work with absolute paths in Win32 such as C:\foo
|
||||
* (and it didn't before either). This needs to be fixed
|
||||
*/
|
||||
PHPAPI void php_dirname(char *path, int len)
|
||||
{
|
||||
register char *end = path + len - 1;
|
||||
|
||||
c = str + len - 1;
|
||||
while (*c == '/'
|
||||
#ifdef PHP_WIN32
|
||||
|| *c == '\\'
|
||||
#endif
|
||||
)
|
||||
c--; /* strip trailing slashes */
|
||||
*(c + 1) = '\0';
|
||||
if ((c = strrchr(str, '/'))
|
||||
#ifdef PHP_WIN32
|
||||
|| (c = strrchr(str, '\\'))
|
||||
#endif
|
||||
)
|
||||
*c='\0';
|
||||
else
|
||||
*str='\0';
|
||||
if (len <= 0) {
|
||||
/* Illegal use of this function */
|
||||
return;
|
||||
}
|
||||
|
||||
/* Strip trailing slashes */
|
||||
while (end >= path && IS_SLASH(*end)) {
|
||||
end--;
|
||||
}
|
||||
if (end < path) {
|
||||
/* The path only contained slashes */
|
||||
path[0] = DEFAULT_SLASH;
|
||||
path[1] = '\0';
|
||||
return;
|
||||
}
|
||||
|
||||
/* Strip filename */
|
||||
while (end >= path && !IS_SLASH(*end)) {
|
||||
end--;
|
||||
}
|
||||
if (end < path) {
|
||||
/* No slash found, therefore return '.' */
|
||||
path[0] = '.';
|
||||
path[1] = '\0';
|
||||
return;
|
||||
}
|
||||
|
||||
/* Strip slashes which came before the file name */
|
||||
while (end >= path && IS_SLASH(*end)) {
|
||||
end--;
|
||||
}
|
||||
if (end < path) {
|
||||
path[0] = DEFAULT_SLASH;
|
||||
path[1] = '\0';
|
||||
return;
|
||||
}
|
||||
*(end+1) = '\0';
|
||||
}
|
||||
|
||||
/* {{{ proto string dirname(string path)
|
||||
@@ -729,14 +753,9 @@ PHP_FUNCTION(dirname)
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
convert_to_string_ex(str);
|
||||
ret = estrdup((*str)->value.str.val);
|
||||
php_dirname(ret,(*str)->value.str.len);
|
||||
if(*ret) {
|
||||
RETVAL_STRING(ret,1);
|
||||
} else {
|
||||
RETVAL_FALSE;
|
||||
}
|
||||
efree(ret);
|
||||
ret = estrndup(Z_STRVAL_PP(str), Z_STRLEN_PP(str));
|
||||
php_dirname(ret, Z_STRLEN_PP(str));
|
||||
RETVAL_STRING(ret, 0);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ void free_url(php_url * theurl)
|
||||
php_url *url_parse(char *str)
|
||||
{
|
||||
regex_t re;
|
||||
regmatch_t subs[10];
|
||||
regmatch_t subs[11];
|
||||
int err;
|
||||
int length = strlen(str);
|
||||
char *result;
|
||||
|
||||
@@ -281,7 +281,7 @@ PHPAPI FILE *php_fopen_primary_script(void)
|
||||
{
|
||||
FILE *fp;
|
||||
struct stat st;
|
||||
char *temp, *path_info, *filename;
|
||||
char *path_info, *filename;
|
||||
int length;
|
||||
PLS_FETCH();
|
||||
SLS_FETCH();
|
||||
@@ -358,13 +358,7 @@ PHPAPI FILE *php_fopen_primary_script(void)
|
||||
STR_FREE(SG(request_info).path_translated); /* for same reason as above */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
temp = estrdup(filename);
|
||||
php_dirname(temp, strlen(temp));
|
||||
if (*temp) {
|
||||
V_CHDIR(temp);
|
||||
}
|
||||
efree(temp);
|
||||
V_CHDIR_FILE(filename);
|
||||
SG(request_info).path_translated = filename;
|
||||
|
||||
return fp;
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
#include <locale.h>
|
||||
#endif
|
||||
#include "zend.h"
|
||||
#include "zend_extensions.h"
|
||||
#include "php_ini.h"
|
||||
#include "php_globals.h"
|
||||
#include "php_main.h"
|
||||
|
||||
@@ -1,283 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP version 4.0 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.02 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.php.net/license/2_02.txt. |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Author: Sander Steffann (sander@steffann.nl) |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#include "php.h"
|
||||
|
||||
#if HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifndef MAXSYMLINKS
|
||||
#define MAXSYMLINKS 32
|
||||
#endif
|
||||
|
||||
#ifndef S_ISDIR
|
||||
#define S_ISDIR(mode) (((mode)&S_IFMT) == S_IFDIR)
|
||||
#endif
|
||||
|
||||
char *php_realpath(char *path, char resolved_path[]);
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
#define IS_SLASH(p) ((p) == '/' || (p) == '\\')
|
||||
#else
|
||||
#define IS_SLASH(p) ((p) == '/')
|
||||
#endif
|
||||
|
||||
char *php_realpath(char *path, char resolved_path []) {
|
||||
char path_construction[MAXPATHLEN]; /* We build the result in here */
|
||||
char *writepos; /* Position to write next char */
|
||||
|
||||
char path_copy[MAXPATHLEN]; /* A work-copy of the path */
|
||||
char *workpos; /* working position in *path */
|
||||
|
||||
#if !defined(PHP_WIN32)
|
||||
char buf[MAXPATHLEN]; /* Buffer for readlink */
|
||||
int linklength; /* The result from readlink */
|
||||
#endif
|
||||
int linkcount = 0; /* Count symlinks to avoid loops */
|
||||
|
||||
struct stat filestat; /* result from stat */
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
char *temppos; /* position while counting '.' */
|
||||
int dotcount; /* number of '.' */
|
||||
int t; /* counter */
|
||||
#endif
|
||||
|
||||
/* Set the work-position to the beginning of the given path */
|
||||
strcpy(path_copy, path);
|
||||
workpos = path_copy;
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
/* Find out where we start - Windows version */
|
||||
if (IS_SLASH(*workpos)) {
|
||||
/* We start at the root of the current drive */
|
||||
/* Get the current directory */
|
||||
if (V_GETCWD(path_construction, MAXPATHLEN-1) == NULL) {
|
||||
/* Unable to get cwd */
|
||||
resolved_path[0] = 0;
|
||||
return NULL;
|
||||
}
|
||||
/* We only need the first three chars (for example "C:\") */
|
||||
path_construction[3] = 0;
|
||||
workpos++;
|
||||
} else if (workpos[1] == ':') {
|
||||
/* A drive-letter is specified, copy it */
|
||||
strncpy(path_construction, path, 2);
|
||||
strcat(path_construction, "\\");
|
||||
workpos++;
|
||||
workpos++;
|
||||
} else {
|
||||
/* Use the current directory */
|
||||
if (V_GETCWD(path_construction, MAXPATHLEN-1) == NULL) {
|
||||
/* Unable to get cwd */
|
||||
resolved_path[0] = 0;
|
||||
return NULL;
|
||||
}
|
||||
strcat(path_construction, "\\");
|
||||
}
|
||||
#else
|
||||
/* Find out where we start - Unix version */
|
||||
if (*workpos == '/') {
|
||||
/* We start at the root */
|
||||
strcpy(path_construction, "/");
|
||||
workpos++;
|
||||
} else {
|
||||
/* Use the current directory */
|
||||
if (V_GETCWD(path_construction, MAXPATHLEN-1) == NULL) {
|
||||
/* Unable to get cwd */
|
||||
resolved_path[0] = 0;
|
||||
return NULL;
|
||||
}
|
||||
strcat(path_construction, "/");
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Set the next-char-position */
|
||||
writepos = &path_construction[strlen(path_construction)];
|
||||
|
||||
/* Go to the end, then stop */
|
||||
while(*workpos != 0) {
|
||||
/* Strip (back)slashes */
|
||||
while(IS_SLASH(*workpos)) workpos++;
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
/* reset dotcount */
|
||||
dotcount = 0;
|
||||
|
||||
/* Look for .. */
|
||||
if ((workpos[0] == '.') && (workpos[1] != 0)) {
|
||||
/* Windows accepts \...\ as \..\..\, \....\ as \..\..\..\, etc */
|
||||
/* At least Win98 does */
|
||||
|
||||
temppos = workpos;
|
||||
while(*temppos++ == '.') {
|
||||
dotcount++;
|
||||
if (!IS_SLASH(*temppos) && (*temppos != 0) && (*temppos != '.')) {
|
||||
/* This is not a /../ component, but a filename that starts with '.' */
|
||||
dotcount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Go back dotcount-1 times */
|
||||
for (t=0 ; t<(dotcount-1) ; t++) {
|
||||
workpos++; /* move to next '.' */
|
||||
|
||||
/* Can we still go back? */
|
||||
if ((writepos-3) <= path_construction) return NULL;
|
||||
|
||||
/* Go back */
|
||||
writepos--; /* move to '\' */
|
||||
writepos--;
|
||||
while(!IS_SLASH(*writepos)) writepos--; /* skip until previous '\\' */
|
||||
}
|
||||
workpos++;
|
||||
}
|
||||
|
||||
/* No special case */
|
||||
if (dotcount == 0) {
|
||||
/* Append */
|
||||
while(!IS_SLASH(*workpos) && (*workpos != 0)) {
|
||||
*writepos++ = *workpos++;
|
||||
}
|
||||
}
|
||||
|
||||
/* Just one '.', go to next element */
|
||||
if (dotcount == 1) {
|
||||
while(!IS_SLASH(*workpos) && (*workpos != 0)) {
|
||||
*workpos++;
|
||||
}
|
||||
|
||||
/* Avoid double \ in the result */
|
||||
writepos--;
|
||||
}
|
||||
|
||||
/* If it was a directory, append a slash */
|
||||
if (IS_SLASH(*workpos)) {
|
||||
*writepos++ = *workpos++;
|
||||
}
|
||||
*writepos = 0;
|
||||
#else /* defined(PHP_WIN32) */
|
||||
/* Look for .. */
|
||||
if ((workpos[0] == '.') && (workpos[1] != 0)) {
|
||||
if ((workpos[1] == '.') && ((workpos[2] == '/') || (workpos[2] == 0))) {
|
||||
/* One directory back */
|
||||
/* Set pointers to right position */
|
||||
workpos++; /* move to second '.' */
|
||||
workpos++; /* move to '/' */
|
||||
|
||||
/* Only apply .. if not in root */
|
||||
if ((writepos-1) > path_construction) {
|
||||
writepos--; /* move to '/' */
|
||||
while(*--writepos != '/') ; /* skip until previous '/' */
|
||||
}
|
||||
} else {
|
||||
if (workpos[1] == '/') {
|
||||
/* Found a /./ skip it */
|
||||
workpos++; /* move to '/' */
|
||||
|
||||
/* Avoid double / in the result */
|
||||
writepos--;
|
||||
} else {
|
||||
/* No special case, the name just started with a . */
|
||||
/* Append */
|
||||
while((*workpos != '/') && (*workpos != 0)) {
|
||||
*writepos++ = *workpos++;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/* No special case */
|
||||
/* Append */
|
||||
while((*workpos != '/') && (*workpos != 0)) {
|
||||
*writepos++ = *workpos++;
|
||||
}
|
||||
}
|
||||
|
||||
#if HAVE_SYMLINK
|
||||
/* We are going to use path_construction, so close it */
|
||||
*writepos = 0;
|
||||
|
||||
/* Check the current location to see if it is a symlink */
|
||||
if((linklength = readlink(path_construction, buf, MAXPATHLEN)) != -1) {
|
||||
/* Check linkcount */
|
||||
if (linkcount > MAXSYMLINKS) return NULL;
|
||||
|
||||
/* Count this symlink */
|
||||
linkcount++;
|
||||
|
||||
/* Set end of buf */
|
||||
buf[linklength] = 0;
|
||||
|
||||
/* Check for overflow */
|
||||
if ((strlen(workpos) + strlen(buf) + 1) >= MAXPATHLEN) return NULL;
|
||||
|
||||
/* Remove the symlink-component wrom path_construction */
|
||||
writepos--; /* move to '/' */
|
||||
while(*--writepos != '/') ; /* skip until previous '/' */
|
||||
*++writepos = 0; /* end of string after '/' */
|
||||
|
||||
/* If the symlink starts with a '/', empty path_construction */
|
||||
if (*buf == '/') {
|
||||
*path_construction = 0;
|
||||
writepos = path_construction;
|
||||
}
|
||||
|
||||
/* Insert symlink into path_copy */
|
||||
strcat(buf, workpos);
|
||||
strcpy(path_copy, buf);
|
||||
workpos = path_copy;
|
||||
}
|
||||
#endif /* HAVE_SYMLINK */
|
||||
|
||||
/* If it was a directory, append a slash */
|
||||
if (*workpos == '/') {
|
||||
*writepos++ = *workpos++;
|
||||
}
|
||||
*writepos = 0;
|
||||
#endif /* defined(PHP_WIN32) */
|
||||
}
|
||||
|
||||
/* Check if the resolved path is a directory */
|
||||
if (V_STAT(path_construction, &filestat) != 0) {
|
||||
if (errno != ENOENT) return NULL;
|
||||
} else {
|
||||
if (S_ISDIR(filestat.st_mode)) {
|
||||
/* It's a directory, append a / if needed */
|
||||
if (*(writepos-1) != '/') {
|
||||
/* Check for overflow */
|
||||
if ((strlen(workpos) + 2) >= MAXPATHLEN) {
|
||||
return NULL;
|
||||
}
|
||||
*writepos++ = '/';
|
||||
*writepos = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
strcpy(resolved_path, path_construction);
|
||||
return resolved_path;
|
||||
}
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
*/
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
/* automatically generated by configure */
|
||||
/* edit configure.in to change version number */
|
||||
#define PHP_VERSION "4.0.3-dev"
|
||||
#define PHP_VERSION "4.0.3RC2"
|
||||
@@ -312,6 +312,9 @@ static void init_request_info(SLS_D)
|
||||
SG(request_info).request_method = getenv("REQUEST_METHOD");
|
||||
SG(request_info).query_string = getenv("QUERY_STRING");
|
||||
SG(request_info).request_uri = getenv("PATH_INFO");
|
||||
if (!SG(request_info).request_uri) {
|
||||
SG(request_info).request_uri = getenv("SCRIPT_NAME");
|
||||
}
|
||||
SG(request_info).path_translated = NULL; /* we have to update it later, when we have that information */
|
||||
SG(request_info).content_type = getenv("CONTENT_TYPE");
|
||||
SG(request_info).content_length = (content_length?atoi(content_length):0);
|
||||
|
||||
-113
@@ -1,113 +0,0 @@
|
||||
#include "php.h"
|
||||
|
||||
#ifndef HAVE_STRTOK_R
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Softweyr LLC. All rights reserved.
|
||||
*
|
||||
* strtok_r, from Berkeley strtok
|
||||
* Oct 13, 1998 by Wes Peters <wes@softweyr.com>
|
||||
*
|
||||
* Copyright (c) 1988, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notices, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notices, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
*
|
||||
* This product includes software developed by Softweyr LLC, the
|
||||
* University of California, Berkeley, and its contributors.
|
||||
*
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY SOFTWEYR LLC, THE REGENTS AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SOFTWEYR LLC, THE
|
||||
* REGENTS, OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
|
||||
char *
|
||||
strtok_r(char *s, const char *delim, char **last)
|
||||
{
|
||||
char *spanp;
|
||||
int c, sc;
|
||||
char *tok;
|
||||
|
||||
if (s == NULL && (s = *last) == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Skip (span) leading delimiters (s += strspn(s, delim), sort of).
|
||||
*/
|
||||
cont:
|
||||
c = *s++;
|
||||
for (spanp = (char *)delim; (sc = *spanp++) != 0; )
|
||||
{
|
||||
if (c == sc)
|
||||
{
|
||||
goto cont;
|
||||
}
|
||||
}
|
||||
|
||||
if (c == 0) /* no non-delimiter characters */
|
||||
{
|
||||
*last = NULL;
|
||||
return NULL;
|
||||
}
|
||||
tok = s - 1;
|
||||
|
||||
/*
|
||||
* Scan token (scan for delimiters: s += strcspn(s, delim), sort of).
|
||||
* Note that delim must have one NUL; we stop if we see that, too.
|
||||
*/
|
||||
for (;;)
|
||||
{
|
||||
c = *s++;
|
||||
spanp = (char *)delim;
|
||||
do
|
||||
{
|
||||
if ((sc = *spanp++) == c)
|
||||
{
|
||||
if (c == 0)
|
||||
{
|
||||
s = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
char *w = s - 1;
|
||||
*w = '\0';
|
||||
}
|
||||
*last = s;
|
||||
return tok;
|
||||
}
|
||||
}
|
||||
while (sc != 0);
|
||||
}
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user