[PHP-CVS] cvs: php4 / acinclude.m4 scan_makefile_in.awk /build scan_makefile_in.awk /scripts Makefile.frag phpize.in
sniper Sun Jun 8 20:17:03 2003 EDT Added files: /php4/build scan_makefile_in.awk Removed files: /php4 scan_makefile_in.awk Modified files: /php4 acinclude.m4 /php4/scripts Makefile.frag phpize.in Log: - Moved scan_makefile_in.awk to better suitable place for it. (other build related scripts are under build/ too..) Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.245 php4/acinclude.m4:1.246 --- php4/acinclude.m4:1.245 Mon May 19 17:11:44 2003 +++ php4/acinclude.m4 Sun Jun 8 20:17:03 2003 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.245 2003/05/19 21:11:44 sniper Exp $ +dnl $Id: acinclude.m4,v 1.246 2003/06/09 00:17:03 sniper Exp $ dnl dnl This file contains local autoconf functions. @@ -1240,7 +1240,7 @@ dnl deprecated AC_DEFUN([PHP_EXTENSION],[ - sources=`$AWK -f $abs_srcdir/scan_makefile_in.awk < []PHP_EXT_SRCDIR($1)[]/Makefile.in` + sources=`$AWK -f $abs_srcdir/build/scan_makefile_in.awk < []PHP_EXT_SRCDIR($1)[]/Makefile.in` PHP_NEW_EXTENSION($1, $sources, $2, $3) Index: php4/scripts/Makefile.frag diff -u php4/scripts/Makefile.frag:1.2 php4/scripts/Makefile.frag:1.3 --- php4/scripts/Makefile.frag:1.2 Sat Mar 1 08:52:11 2003 +++ php4/scripts/Makefile.frag Sun Jun 8 20:17:03 2003 @@ -10,8 +10,8 @@ scripts/phpize.m4 \ build/mkdep.awk \ build/shtool \ + build/scan_makefile_in.awk \ Makefile.global \ - scan_makefile_in.awk \ acinclude.m4 bin_SCRIPTS = phpize php-config Index: php4/scripts/phpize.in diff -u php4/scripts/phpize.in:1.1 php4/scripts/phpize.in:1.2 --- php4/scripts/phpize.in:1.1 Tue Jan 28 05:59:11 2003 +++ php4/scripts/phpize.in Sun Jun 8 20:17:03 2003 @@ -5,8 +5,8 @@ includedir="$prefix/include/php" builddir="`pwd`" -FILES_BUILD="mkdep.awk shtool" -FILES="acinclude.m4 Makefile.global scan_makefile_in.awk" +FILES_BUILD="mkdep.awk scan_makefile_in.awk shtool" +FILES="acinclude.m4 Makefile.global" CLEAN_FILES="$FILES *.lo *.la *.o .deps .libs/ build/ include/ modules/ install-sh \ mkinstalldirs missing config.nice config.sub config.guess configure configure.in \ aclocal.m4 config.h config.h.in conftest* ltmain.sh libtool config.cache \ Index: php4/build/scan_makefile_in.awk +++ php4/build/scan_makefile_in.awk BEGIN { mode=0 sources="" } mode == 0 && /^LTLIBRARY_SOURCES.*\\$/ { if (match($0, "[^=]*$")) { sources=substr($0, RSTART, RLENGTH-1) } mode=1 next } mode == 0 && /^LTLIBRARY_SOURCES.*/ { if (match($0, "[^=]*$")) { sources=substr($0, RSTART, RLENGTH) } } mode == 1 && /.*\\$/ { sources=sources substr($0, 0, length - 1) next } mode == 1 { sources=sources $0 mode=0 } END { print sources } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4
On Tue, 1 Apr 2003, Sascha Schumann wrote: >> Jani added this in order to fix a bug iirc. > >..without understanding the problem. Oh, thou great one, why don't you enlighten us then? :) --Jani -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4
> Jani added this in order to fix a bug iirc. ..without understanding the problem. - Sascha -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4
On Tue, 1 Apr 2003, Sascha Schumann wrote: > sas Tue Apr 1 03:05:01 2003 EDT > > Modified files: > /php4 acinclude.m4 > Log: > Don't need shtool Jani added this in order to fix a bug iirc. Derick > Index: php4/acinclude.m4 > diff -u php4/acinclude.m4:1.235 php4/acinclude.m4:1.236 > --- php4/acinclude.m4:1.235 Mon Mar 31 18:21:41 2003 > +++ php4/acinclude.m4 Tue Apr 1 03:05:01 2003 > @@ -1,4 +1,4 @@ > -dnl $Id: acinclude.m4,v 1.235 2003/03/31 23:21:41 sniper Exp $ > +dnl $Id: acinclude.m4,v 1.236 2003/04/01 08:05:01 sas Exp $ > dnl > dnl This file contains local autoconf functions. > > @@ -28,7 +28,7 @@ > dnl PHP_INIT_BUILD_SYSTEM > dnl > AC_DEFUN([PHP_INIT_BUILD_SYSTEM],[ > -test -d include || $php_shtool mkdir include > +test -d include || mkdir include > > Makefile.objects > > Makefile.fragments > dnl We need to play tricks here to avoid matching the grep line itself > > > > -- "my other box is your windows PC" - Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ - -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / acinclude.m4
sas Tue Apr 1 03:05:01 2003 EDT Modified files: /php4 acinclude.m4 Log: Don't need shtool Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.235 php4/acinclude.m4:1.236 --- php4/acinclude.m4:1.235 Mon Mar 31 18:21:41 2003 +++ php4/acinclude.m4 Tue Apr 1 03:05:01 2003 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.235 2003/03/31 23:21:41 sniper Exp $ +dnl $Id: acinclude.m4,v 1.236 2003/04/01 08:05:01 sas Exp $ dnl dnl This file contains local autoconf functions. @@ -28,7 +28,7 @@ dnl PHP_INIT_BUILD_SYSTEM dnl AC_DEFUN([PHP_INIT_BUILD_SYSTEM],[ -test -d include || $php_shtool mkdir include +test -d include || mkdir include > Makefile.objects > Makefile.fragments dnl We need to play tricks here to avoid matching the grep line itself -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / acinclude.m4
sniper Mon Mar 31 18:21:42 2003 EDT Modified files: /php4 acinclude.m4 Log: Fixed bug #22989 (sendmail not found by configure) Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.234 php4/acinclude.m4:1.235 --- php4/acinclude.m4:1.234 Fri Mar 28 23:52:46 2003 +++ php4/acinclude.m4 Mon Mar 31 18:21:41 2003 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.234 2003/03/29 04:52:46 sterling Exp $ +dnl $Id: acinclude.m4,v 1.235 2003/03/31 23:21:41 sniper Exp $ dnl dnl This file contains local autoconf functions. @@ -679,7 +679,8 @@ ]) AC_DEFUN([PHP_PROG_SENDMAIL],[ -AC_PATH_PROG(PROG_SENDMAIL, sendmail,[], $PATH:/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib) +PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib +AC_PATH_PROG(PROG_SENDMAIL, sendmail,[], $PATH:$PHP_ALT_PATH) if test -n "$PROG_SENDMAIL"; then AC_DEFINE(HAVE_SENDMAIL,1,[whether you have sendmail]) fi -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / acinclude.m4 configure.in
sniper Tue Mar 25 08:43:13 2003 EDT Modified files: /php4 configure.in acinclude.m4 Log: Made "--with-pear" "--disable-all"-aware. Plus some cosmetics fixes. Index: php4/configure.in diff -u php4/configure.in:1.432 php4/configure.in:1.433 --- php4/configure.in:1.432 Sat Mar 22 23:32:22 2003 +++ php4/configure.in Tue Mar 25 08:43:13 2003 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.432 2003/03/23 04:32:22 sterling Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.433 2003/03/25 13:43:13 sniper Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -556,7 +556,7 @@ dnl General settings. dnl - - +PHP_CONFIGURE_PART(General settings) PHP_HELP_SEPARATOR([General settings:]) @@ -613,7 +613,7 @@ PHP_ARG_WITH(pear, [whether to install PEAR, and where], [ --with-pear=DIR Install PEAR in DIR (default PREFIX/lib/php) - --without-pear Do not install PEAR], DEFAULT, no) + --without-pear Do not install PEAR], DEFAULT, yes) if test "$PHP_PEAR" != "no" && test "$PHP_SAPI_CLI" != "no"; then install_pear="install-pear" Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.232 php4/acinclude.m4:1.233 --- php4/acinclude.m4:1.232 Mon Mar 17 08:40:42 2003 +++ php4/acinclude.m4 Tue Mar 25 08:43:13 2003 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.232 2003/03/17 13:40:42 wez Exp $ +dnl $Id: acinclude.m4,v 1.233 2003/03/25 13:43:13 sniper Exp $ dnl dnl This file contains local autoconf functions. @@ -524,7 +524,7 @@ ]) AC_DEFUN([PHP_ARG_ANALYZE],[ -ifelse([$3],yes,[PHP_ARG_ANALYZE_EX([$1])]) +ifelse([$3],yes,[PHP_ARG_ANALYZE_EX([$1])],[ext_output=ifelse([$]$1,,no,[$]$1)]) ifelse([$2],,,[AC_MSG_RESULT([$ext_output])]) ]) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / acinclude.m4 configure.in /main main.c safe_mode.c TSRM tsrm_virtual_cwd.c
wez Mon Mar 17 08:40:46 2003 EDT Modified files: /php4 acinclude.m4 configure.in /TSRM tsrm_virtual_cwd.c /php4/main main.c safe_mode.c Log: Fix for Bug #21310, based on a patch by [EMAIL PROTECTED] Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.231 php4/acinclude.m4:1.232 --- php4/acinclude.m4:1.231 Tue Mar 11 21:26:46 2003 +++ php4/acinclude.m4 Mon Mar 17 08:40:42 2003 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.231 2003/03/12 02:26:46 sniper Exp $ +dnl $Id: acinclude.m4,v 1.232 2003/03/17 13:40:42 wez Exp $ dnl dnl This file contains local autoconf functions. @@ -1439,6 +1439,20 @@ if test "$ac_cv_ebcdic" = "yes"; then AC_DEFINE(CHARSET_EBCDIC,1, [Define if system uses EBCDIC]) fi +]) + +dnl Some systems, notably Solaris, cause getcwd() or realpath to fail if a +dnl component of the path has execute but not read permissions +AC_DEFUN([PHP_BROKEN_GETCWD],[ + AC_MSG_CHECKING([for broken getcwd]) + os=`uname -sr 2>/dev/null` + case $os in +SunOS*) + AC_DEFINE(HAVE_BROKEN_GETCWD,1, [Define if system has broken getcwd]) + AC_MSG_RESULT([yes]);; + *) + AC_MSG_RESULT([no]);; + esac ]) AC_DEFUN([PHP_BROKEN_GLIBC_FOPEN_APPEND],[ Index: php4/configure.in diff -u php4/configure.in:1.430 php4/configure.in:1.431 --- php4/configure.in:1.430 Mon Mar 10 09:32:47 2003 +++ php4/configure.in Mon Mar 17 08:40:42 2003 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.430 2003/03/10 14:32:47 sniper Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.431 2003/03/17 13:40:42 wez Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -378,6 +378,7 @@ ]) PHP_FOPENCOOKIE +PHP_BROKEN_GETCWD PHP_BROKEN_GLIBC_FOPEN_APPEND dnl Checks for typedefs, structures, and compiler characteristics. Index: TSRM/tsrm_virtual_cwd.c diff -u TSRM/tsrm_virtual_cwd.c:1.46 TSRM/tsrm_virtual_cwd.c:1.47 --- TSRM/tsrm_virtual_cwd.c:1.46Sat Feb 8 22:49:42 2003 +++ TSRM/tsrm_virtual_cwd.c Mon Mar 17 08:40:43 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: tsrm_virtual_cwd.c,v 1.46 2003/02/09 03:49:42 shane Exp $ */ +/* $Id: tsrm_virtual_cwd.c,v 1.47 2003/03/17 13:40:43 wez Exp $ */ #include #include @@ -303,7 +303,10 @@ return (0); #if !defined(TSRM_WIN32) && !defined(NETWARE) - if (IS_ABSOLUTE_PATH(path, path_length)) { + /* cwd_length can be 0 when getcwd() fails. +* This can happen under solaris when a dir does not have read permissions +* but *does* have execute permissions */ + if (IS_ABSOLUTE_PATH(path, path_length) || (state->cwd_length < 1)) { if (use_realpath && realpath(path, resolved_path)) { path = resolved_path; path_length = strlen(path); @@ -360,58 +363,64 @@ } - ptr = tsrm_strtok_r(path_copy, TOKENIZER_STRING, &tok); - while (ptr) { - ptr_length = strlen(ptr); + if (state->cwd_length > 0 || IS_ABSOLUTE_PATH(path, path_length)) { + ptr = tsrm_strtok_r(path_copy, TOKENIZER_STRING, &tok); + while (ptr) { + ptr_length = strlen(ptr); - if (IS_DIRECTORY_UP(ptr, ptr_length)) { - char save; + if (IS_DIRECTORY_UP(ptr, ptr_length)) { + char save; - save = DEFAULT_SLASH; + save = DEFAULT_SLASH; #define PREVIOUS state->cwd[state->cwd_length - 1] - while (IS_ABSOLUTE_PATH(state->cwd, state->cwd_length) && - !IS_SLASH(PREVIOUS)) { - save = PREVIOUS; - PREVIOUS = '\0'; - state->cwd_length--; - } - - if (!IS_ABSOLUTE_PATH(state->cwd, state->cwd_length)) { - state->cwd[state->cwd_length++] = save; - state->cwd[state->cwd_length] = '\0'; - } else { - PREVIOUS = '\0'; - state->cwd_length--; - } - } else if (!IS_DIRECTORY_CURRENT(ptr, ptr_length)) { - state->cwd = (char *) realloc(state->cwd, state->cwd_length+ptr_length+1+1); + while (IS_ABSOLUTE_PATH(state->cwd, state->cwd_length) && + !IS_SLASH(PREVIOUS)) { + save = PREVIOUS; + PREVIOUS = '\0'; + state->cwd_length--; + } + + if (!IS_ABSOLUTE_PATH(st
[PHP-CVS] cvs: php4 / acinclude.m4
sniper Tue Mar 11 21:26:46 2003 EDT Modified files: /php4 acinclude.m4 Log: prevent warning Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.230 php4/acinclude.m4:1.231 --- php4/acinclude.m4:1.230 Mon Mar 10 09:32:47 2003 +++ php4/acinclude.m4 Tue Mar 11 21:26:46 2003 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.230 2003/03/10 14:32:47 sniper Exp $ +dnl $Id: acinclude.m4,v 1.231 2003/03/12 02:26:46 sniper Exp $ dnl dnl This file contains local autoconf functions. @@ -28,7 +28,7 @@ dnl PHP_INIT_BUILD_SYSTEM dnl AC_DEFUN([PHP_INIT_BUILD_SYSTEM],[ -$php_shtool mkdir include +test -d include || $php_shtool mkdir include > Makefile.objects > Makefile.fragments dnl We need to play tricks here to avoid matching the grep line itself -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4 configure.in
> See bug #22556 for one problem. You should reference fixed bugs in the commit message. In this case, instead of addressing the core issue, you threw the baby out with the bath water. I'll look into fixing it later. - Sascha -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4 configure.in
On Mon, 10 Mar 2003, Sascha Schumann wrote: >On Mon, 10 Mar 2003, Jani Taskinen wrote: > >> sniper Mon Mar 10 09:32:48 2003 EDT >> >> Modified files: >> /php4acinclude.m4 configure.in >> Log: >> - Always use the shtool mkdir. > >This commit is pointless - it does not address any problems >nor does it add any functionality. See bug #22556 for one problem. And I did ask about this, you never bothered to reply. >Please revert. No way, it's better to use the shtool mkdir which works everywhere. --Jani -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4 configure.in
On Mon, 10 Mar 2003, Jani Taskinen wrote: > sniperMon Mar 10 09:32:48 2003 EDT > > Modified files: > /php4 acinclude.m4 configure.in > Log: > - Always use the shtool mkdir. This commit is pointless - it does not address any problems nor does it add any functionality. Please revert. - Sascha -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / acinclude.m4 configure.in
sniper Mon Mar 10 09:32:48 2003 EDT Modified files: /php4 acinclude.m4 configure.in Log: - Always use the shtool mkdir. Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.229 php4/acinclude.m4:1.230 --- php4/acinclude.m4:1.229 Wed Mar 5 17:00:45 2003 +++ php4/acinclude.m4 Mon Mar 10 09:32:47 2003 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.229 2003/03/05 22:00:45 sas Exp $ +dnl $Id: acinclude.m4,v 1.230 2003/03/10 14:32:47 sniper Exp $ dnl dnl This file contains local autoconf functions. @@ -28,7 +28,7 @@ dnl PHP_INIT_BUILD_SYSTEM dnl AC_DEFUN([PHP_INIT_BUILD_SYSTEM],[ -mkdir include >/dev/null 2>&1 +$php_shtool mkdir include > Makefile.objects > Makefile.fragments dnl We need to play tricks here to avoid matching the grep line itself @@ -660,21 +660,6 @@ AC_SUBST($1) ]) -AC_DEFUN([PHP_MKDIR_P_CHECK],[ - AC_CACHE_CHECK(for working mkdir -p, ac_cv_mkdir_p,[ -test -d conftestdir && rm -rf conftestdir -mkdir -p conftestdir/somedir >/dev/null 2>&1 -dnl `mkdir -p' must be quiet about creating existing directories -mkdir -p conftestdir/somedir >/dev/null 2>&1 -if test "$?" = "0" && test -d conftestdir/somedir; then - ac_cv_mkdir_p=yes -else - ac_cv_mkdir_p=no -fi -rm -rf conftestdir - ]) -]) - AC_DEFUN([PHP_TM_GMTOFF],[ AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff, [AC_TRY_COMPILE([#include @@ -1267,10 +1252,7 @@ ]) AC_DEFUN([PHP_GEN_BUILD_DIRS],[ - PHP_MKDIR_P_CHECK - if test "$ac_cv_mkdir_p" = "yes"; then -mkdir -p $BUILD_DIR - fi + $php_shtool mkdir -p $BUILD_DIR ]) dnl Index: php4/configure.in diff -u php4/configure.in:1.429 php4/configure.in:1.430 --- php4/configure.in:1.429 Fri Mar 7 01:18:17 2003 +++ php4/configure.in Mon Mar 10 09:32:47 2003 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.429 2003/03/07 06:18:17 sniper Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.430 2003/03/10 14:32:47 sniper Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -87,12 +87,12 @@ cwd=`pwd` -PHP_INIT_BUILD_SYSTEM - php_shtool=$srcdir/build/shtool T_MD=`$php_shtool echo -n -e %B` T_ME=`$php_shtool echo -n -e %b` +PHP_INIT_BUILD_SYSTEM + dnl We want this one before the checks, so the checks can modify CFLAGS. test -z "$CFLAGS" && auto_cflags=1 @@ -1183,10 +1183,10 @@ # Create configuration headers # -test -d TSRM || mkdir TSRM +test -d TSRM || $php_shtool mkdir TSRM echo '#include "../main/php_config.h"' > TSRM/tsrm_config.h -test -d Zend || mkdir Zend +test -d Zend || $php_shtool mkdir Zend cat >Zend/zend_config.h
[PHP-CVS] cvs: php4 / acinclude.m4
sas Wed Mar 5 17:00:49 2003 EDT Modified files: /php4 acinclude.m4 Log: Allow shared modules to be built using $(CXX) Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.228 php4/acinclude.m4:1.229 --- php4/acinclude.m4:1.228 Mon Feb 24 10:11:54 2003 +++ php4/acinclude.m4 Wed Mar 5 17:00:45 2003 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.228 2003/02/24 15:11:54 sniper Exp $ +dnl $Id: acinclude.m4,v 1.229 2003/03/05 22:00:45 sas Exp $ dnl dnl This file contains local autoconf functions. @@ -1213,7 +1213,7 @@ fi ]) -dnl PHP_SHARED_MODULE(module-name, object-var, build-dir) +dnl PHP_SHARED_MODULE(module-name, object-var, build-dir, cxx) dnl dnl Basically sets up the link-stage for building module-name dnl from object_var in build-dir. @@ -1226,7 +1226,7 @@ \$(LIBTOOL) --mode=install cp $3/$1.la \$(phplibdir) $3/$1.la: \$($2) \$(translit($1,a-z-,A-Z_)_SHARED_DEPENDENCIES) - \$(LIBTOOL) --mode=link \$(CC) \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \[$]@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$($2) \$(translit($1,a-z-,A-Z_)_SHARED_LIBADD) + \$(LIBTOOL) --mode=link ifelse($4,,[\$(CC)],[\$(CXX)]) \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \[$]@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$($2) \$(translit($1,a-z-,A-Z_)_SHARED_LIBADD) EOF ]) @@ -1274,7 +1274,7 @@ ]) dnl -dnl PHP_NEW_EXTENSION(extname, sources [, shared [,sapi_class[, extra-cflags]]]) +dnl PHP_NEW_EXTENSION(extname, sources [, shared [,sapi_class[, extra-cflags[, cxx) dnl dnl Includes an extension in the build. dnl @@ -1304,7 +1304,7 @@ if test "$3" = "shared" || test "$3" = "yes"; then dnl -- Shared module PHP_ADD_SOURCES_X(PHP_EXT_DIR($1),$2,$ac_extra,shared_objects_$1,yes) - PHP_SHARED_MODULE($1,shared_objects_$1, $ext_builddir) + PHP_SHARED_MODULE($1,shared_objects_$1, $ext_builddir, $6) AC_DEFINE_UNQUOTED([COMPILE_DL_]translit($1,a-z_-,A-Z__), 1, Whether to build $1 as dynamic module) fi fi -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / acinclude.m4
sniper Mon Feb 24 10:11:55 2003 EDT Modified files: /php4 acinclude.m4 Log: fix quotes Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.227 php4/acinclude.m4:1.228 --- php4/acinclude.m4:1.227 Sun Feb 23 23:37:04 2003 +++ php4/acinclude.m4 Mon Feb 24 10:11:54 2003 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.227 2003/02/24 04:37:04 sniper Exp $ +dnl $Id: acinclude.m4,v 1.228 2003/02/24 15:11:54 sniper Exp $ dnl dnl This file contains local autoconf functions. @@ -1100,7 +1100,7 @@ dnl Set libtool variable dnl AC_DEFUN([PHP_SET_LIBTOOL_VARIABLE],[ - if test -z $LIBTOOL; then + if test -z "$LIBTOOL"; then LIBTOOL='$(SHELL) $(top_builddir)/libtool $1' else LIBTOOL="$LIBTOOL $1" -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4
On Mon, 24 Feb 2003, Sascha Schumann wrote: >> On AIX, I encountered a problem that the libtool from >> top_builddir was NOT used but the one in my PATH. > >That's really weird. Way to go AIX. > >$ echo echo hi > gcc >$ chmod +x gcc >$ /bin/sh gcc >/bin/sh: gcc: cannot execute >$ /bin/sh ./gcc >hi Heh, I'm not very surprised. And it's not the only weird thing in it. :) --Jani -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4
> On AIX, I encountered a problem that the libtool from > top_builddir was NOT used but the one in my PATH. That's really weird. Way to go AIX. $ echo echo hi > gcc $ chmod +x gcc $ /bin/sh gcc /bin/sh: gcc: cannot execute $ /bin/sh ./gcc hi - Sascha -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4
On Mon, 24 Feb 2003, Sascha Schumann wrote: >On Mon, 24 Feb 2003, Jani Taskinen wrote: > >> sniper Sun Feb 23 23:37:04 2003 EDT >> >> Modified files: >> /php4acinclude.m4 >> Log: >> Always use the libtool which is build in the top_builddir. > >The cwd of the $(SHELL) is the top_builddir, so I don't >see what you are trying to achieve here. On AIX, I encountered a problem that the libtool from top_builddir was NOT used but the one in my PATH. I was debugging that AIX + PHP as Apache DSO install problem and I was editing the generated libtool script.. kept wondering why none of my changes didn't seem to have any affect in the build, whatever I tried.. Now it uses the correct libtool script all the time. --Jani -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / acinclude.m4
sniper Sun Feb 23 23:37:04 2003 EDT Modified files: /php4 acinclude.m4 Log: Always use the libtool which is build in the top_builddir. Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.226 php4/acinclude.m4:1.227 --- php4/acinclude.m4:1.226 Mon Feb 10 12:09:47 2003 +++ php4/acinclude.m4 Sun Feb 23 23:37:04 2003 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.226 2003/02/10 17:09:47 sniper Exp $ +dnl $Id: acinclude.m4,v 1.227 2003/02/24 04:37:04 sniper Exp $ dnl dnl This file contains local autoconf functions. @@ -1100,7 +1100,11 @@ dnl Set libtool variable dnl AC_DEFUN([PHP_SET_LIBTOOL_VARIABLE],[ - LIBTOOL='$(SHELL) libtool $1' + if test -z $LIBTOOL; then +LIBTOOL='$(SHELL) $(top_builddir)/libtool $1' + else +LIBTOOL="$LIBTOOL $1" + fi ]) dnl -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / acinclude.m4 configure.in ltmain.sh
sniper Mon Feb 10 12:09:50 2003 EDT Modified files: /php4 acinclude.m4 configure.in ltmain.sh Log: - Updated libtool to 1.4.3 which has test for the sed problem.. Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.225 php4/acinclude.m4:1.226 --- php4/acinclude.m4:1.225 Sun Jan 19 16:37:40 2003 +++ php4/acinclude.m4 Mon Feb 10 12:09:47 2003 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.225 2003/01/19 21:37:40 zeev Exp $ +dnl $Id: acinclude.m4,v 1.226 2003/02/10 17:09:47 sniper Exp $ dnl dnl This file contains local autoconf functions. @@ -1779,77 +1779,4 @@ IFS=$ac_IFS APACHE_VERSION=`expr [$]4 \* 100 + [$]5 \* 1000 + [$]6` -]) - -dnl PHP_PROG_SED -dnl -dnl Check for a fully-functional sed program, that truncates -dnl as few characters as possible. Prefer GNU sed if found. -dnl -dnl Based on LT_AC_PROG_SED (libtool CVS) -dnl -AC_DEFUN([PHP_PROG_SED], -[AC_MSG_CHECKING([for working sed]) -AC_CACHE_VAL(ac_cv_path_sed, -[ - -# Create a temporary directory, and hook for its removal unless debugging. -$debug || -{ - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 -} - -# Create a (secure) tmp directory for tmp files. -: ${TMPDIR=/tmp} -{ - tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=$TMPDIR/sed$$-$RANDOM - (umask 077 && mkdir $tmp) -} || -{ - echo "$me: cannot create a temporary directory in $TMPDIR" >&2 - { (exit 1); exit 1; } -} - _max=0 - _count=0 - - # Use the sed found in PATH, skip the rest - _sed=sed - - # Check for GNU sed and select it if it is found. - if "${_sed}" --version 2>&1 < /dev/null | grep -E '(GNU)' > /dev/null; then -ac_cv_path_sed=${_sed} - else -cat /dev/null > "$tmp/sed.in" -_count=0 -echo -n "0123456789" >"$tmp/sed.in" -while true; do - cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp" - mv "$tmp/sed.tmp" "$tmp/sed.in" - cp "$tmp/sed.in" "$tmp/sed.nl" - echo >>"$tmp/sed.nl" - ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break - cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break - # 1 chars as input seems more than enough - test $_count -gt 10 && break - _count=`expr $_count + 1` - if test $_count -gt $_max; then -_max=$_count -ac_cv_path_sed=${_sed} - fi -done - fi - rm -rf "$tmp" -]) -if test -z "$ac_cv_path_sed"; then - AC_MSG_ERROR([Could not find working sed on this system. Please install GNU sed.]) -else - SED=$ac_cv_path_sed - PHP_SUBST(SED) - AC_MSG_RESULT([$SED]) -fi ]) Index: php4/configure.in diff -u php4/configure.in:1.417 php4/configure.in:1.418 --- php4/configure.in:1.417 Tue Jan 28 05:59:09 2003 +++ php4/configure.in Mon Feb 10 12:09:47 2003 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.417 2003/01/28 10:59:09 sniper Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.418 2003/02/10 17:09:47 sniper Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -29,9 +29,6 @@ AC_PREREQ(2.13) AC_INIT(README.CVS-RULES) - -dnl check for working sed -PHP_PROG_SED PHP_CONFIG_NICE(config.nice) for arg in $0 "$@"; do Index: php4/ltmain.sh diff -u php4/ltmain.sh:1.21 php4/ltmain.sh:1.22 --- php4/ltmain.sh:1.21 Sat Jun 29 19:24:48 2002 +++ php4/ltmain.sh Mon Feb 10 12:09:48 2003 @@ -49,14 +49,14 @@ fi # The name of this program. -progname=`$echo "$0" | sed 's%^.*/%%'` +progname=`$echo "$0" | ${SED} 's%^.*/%%'` modename="$progname" # Constants. PROGRAM=ltmain.sh PACKAGE=libtool -VERSION=1.4.2 -TIMESTAMP=" (1.922.2.53 2001/09/11 03:18:52)" +VERSION=1.4.3 +TIMESTAMP=" (1.922.2.110 2002/10/23 01:39:54)" default_mode= help="Try \`$progname --help' for more information." @@ -67,10 +67,19 @@ # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. -Xsed='sed -e 1s/^X//' +Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([\\`\\"$]\)/\\\1/g' -SP2NL='tr \040 \012' -NL2SP='tr \015\012 \040\040' +# test EBCDIC or ASCII +case `echo A|od -x` in + *[Cc]1*) # EBCDIC based system + SP2NL="tr '\100' '\n'" + NL2SP="tr '\r\n' '\100\100'" + ;; + *) # Assume ASCII based system + SP2NL="tr '\040' '\012'" + NL2SP="tr '\015\012' '\040\040'" + ;; +esac
[PHP-CVS] cvs: php4 / acinclude.m4 configure.in
zeevSun Jan 19 16:37:41 2003 EDT Modified files: /php4 acinclude.m4 configure.in Log: relabel Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.224 php4/acinclude.m4:1.225 --- php4/acinclude.m4:1.224 Fri Jan 3 17:05:12 2003 +++ php4/acinclude.m4 Sun Jan 19 16:37:40 2003 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.224 2003/01/03 22:05:12 alexwaugh Exp $ +dnl $Id: acinclude.m4,v 1.225 2003/01/19 21:37:40 zeev Exp $ dnl dnl This file contains local autoconf functions. @@ -777,7 +777,7 @@ dnl PHP_BUILD_THREAD_SAFE dnl AC_DEFUN([PHP_BUILD_THREAD_SAFE],[ - enable_experimental_zts=yes + enable_maintainer_zts=yes if test "$pthreads_working" != "yes"; then AC_MSG_ERROR([ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads.]) fi Index: php4/configure.in diff -u php4/configure.in:1.413 php4/configure.in:1.414 --- php4/configure.in:1.413 Thu Jan 9 11:37:45 2003 +++ php4/configure.in Sun Jan 19 16:37:40 2003 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.413 2003/01/09 16:37:45 sniper Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.414 2003/01/19 21:37:40 zeev Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -237,7 +237,7 @@ AC_MSG_CHECKING([for chosen SAPI module]) AC_MSG_RESULT([$PHP_SAPI]) -if test "$enable_experimental_zts" = "yes"; then +if test "$enable_maintainer_zts" = "yes"; then PTHREADS_ASSIGN_VARS PTHREADS_FLAGS fi @@ -836,7 +836,7 @@ TSRM_DIR=TSRM CPPFLAGS="$CPPFLAGS -I\$(top_builddir)/TSRM" -if test "$ZEND_EXPERIMENTAL_ZTS" = "yes"; then +if test "$ZEND_MAINTAINER_ZTS" = "yes"; then AC_DEFINE(ZTS,1,[ ]) PHP_THREAD_SAFETY=yes else @@ -898,7 +898,7 @@ else part1=no-debug fi -if test "$enable_experimental_zts" = "yes"; then +if test "$enable_maintainer_zts" = "yes"; then part2=zts else part2=non-zts @@ -906,7 +906,7 @@ extbasedir=$part1-$part2-$extbasedir EXTENSION_DIR=$libdir/extensions/$extbasedir else -if test "$enable_experimental_zts" = "yes"; then +if test "$enable_maintainer_zts" = "yes"; then extbasedir=$extbasedir-zts fi -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / acinclude.m4
alexwaugh Fri Jan 3 17:05:13 2003 EDT Modified files: /php4 acinclude.m4 Log: Provide alternative for glibc brokenness test when cross compiling Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.223 php4/acinclude.m4:1.224 --- php4/acinclude.m4:1.223 Thu Jan 2 14:20:57 2003 +++ php4/acinclude.m4 Fri Jan 3 17:05:12 2003 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.223 2003/01/02 19:20:57 iliaa Exp $ +dnl $Id: acinclude.m4,v 1.224 2003/01/03 22:05:12 alexwaugh Exp $ dnl dnl This file contains local autoconf functions. @@ -1457,6 +1457,7 @@ AC_DEFUN([PHP_BROKEN_GLIBC_FOPEN_APPEND],[ AC_MSG_CHECKING([for broken libc stdio]) + AC_CACHE_VAL(have_broken_glibc_fopen_append,[ AC_TRY_RUN([ #include int main(int argc, char *argv[]) @@ -1483,7 +1484,17 @@ } ], [have_broken_glibc_fopen_append=no], -[have_broken_glibc_fopen_append=yes ]) +[have_broken_glibc_fopen_append=yes ], +AC_TRY_COMPILE([ +#include +],[ +#if !__GLIBC_PREREQ(2,2) +choke me +#endif +], +[have_broken_glibc_fopen_append=yes], +[have_broken_glibc_fopen_append=no ]) +)]) if test "$have_broken_glibc_fopen_append" = "yes"; then AC_MSG_RESULT(yes) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4 configure.in /main streams.c
In message <[EMAIL PROTECTED]> Sascha Schumann <[EMAIL PROTECTED]> wrote: > On Thu, 2 Jan 2003, Alex Waugh wrote: > > > In message <[EMAIL PROTECTED]> > > Sascha Schumann <[EMAIL PROTECTED]> wrote: > > > > > > You can; I cross compile it regularly. > > > > > > What is your target/host platform then? > > > > Building on Linux, targetting RISC OS. > > Are our defaults directly applicable to RISC OS? Or how do > you manage that configure produces an appropiate > php_config.h for that target? The vast majority of tests don't require running a test program, therefore they work equally well whether cross compiling or not. On the few that do, the default is usually fine. For those that it gets wrong the easiest way to change them is to put the correct values in config.cache before running configure. eg. currently I'm doing the following: cat > config.cache << EOF ac_cv_path_PROG_SENDMAIL=\${ac_cv_path_PROG_SENDMAIL=\} lt_cv_prog_cc_can_build_shared=\${lt_cv_prog_cc_can_build_shared=no} lt_cv_prog_cc_pic_works=\${lt_cv_prog_cc_pic_works=no} EOF ./configure --host=arm-riscos-aof --with-config-file-path=/Choices: Alex -- Alex Waugh [EMAIL PROTECTED] RISC OS software from http://www.alexwaugh.com/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4 configure.in /main streams.c
On Thu, 2 Jan 2003, Alex Waugh wrote: > In message <[EMAIL PROTECTED]> > Sascha Schumann <[EMAIL PROTECTED]> wrote: > > > > You can; I cross compile it regularly. > > > > What is your target/host platform then? > > Building on Linux, targetting RISC OS. Are our defaults directly applicable to RISC OS? Or how do you manage that configure produces an appropiate php_config.h for that target? - Sascha -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4 configure.in /main streams.c
In message <[EMAIL PROTECTED]> Sascha Schumann <[EMAIL PROTECTED]> wrote: > > You can; I cross compile it regularly. > > What is your target/host platform then? Building on Linux, targetting RISC OS. Alex -- Alex Waugh [EMAIL PROTECTED] RISC OS software from http://www.alexwaugh.com/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4 configure.in /main streams.c
In message <[EMAIL PROTECTED]> Wez Furlong <[EMAIL PROTECTED]> wrote: > But how can you reliably detect a system with a broken libc when > cross-compiling? > > I leave this for someone else to decide, although a more-or-less > reasonable default is to for "have_broken_glibc_fopen_append=no" and > hope that no-one files a problem report :) How about the following (completely untested, so I bet the brackets don't match up :-) Not perfect, but better than a blind guess. Caching the value also makes it easier to manually override if it gets it wrong. Alex AC_DEFUN([PHP_BROKEN_GLIBC_FOPEN_APPEND],[ AC_MSG_CHECKING([for broken libc stdio]) AC_CACHE_VAL(have_broken_glibc_fopen_append,[ AC_TRY_RUN([ #include int main(int argc, char *argv[]) { FILE *fp; long position; char *filename = "/tmp/phpglibccheck"; fp = fopen(filename, "w"); if (fp == NULL) { perror("fopen"); exit(2); } fputs("foobar", fp); fclose(fp); fp = fopen(filename, "a+"); position = ftell(fp); fclose(fp); unlink(filename); if (position == 0) return 1; return 0; } ], [have_broken_glibc_fopen_append=no], [have_broken_glibc_fopen_append=yes ], AC_TRY_COMPILE([ #include ],[ #if __GLIBC_PREREQ(2,2) int main(void) { return 0; } #else choke me #endif ], [have_broken_glibc_fopen_append=yes ], [have_broken_glibc_fopen_append=no ] ) )]) if test "$have_broken_glibc_fopen_append" = "yes"; then AC_MSG_RESULT(yes) AC_DEFINE(HAVE_BROKEN_GLIBC_FOPEN_APPEND,1, [Define if your glibc borks on fopen with mode a+]) else AC_MSG_RESULT(no) fi ]) -- Alex Waugh [EMAIL PROTECTED] RISC OS software from http://www.alexwaugh.com/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4 configure.in /main streams.c
> You can; I cross compile it regularly. What is your target/host platform then? - Sascha -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4 configure.in /main streams.c
In message <[EMAIL PROTECTED]> Sascha Schumann <[EMAIL PROTECTED]> wrote: > On Thu, 2 Jan 2003, Wez Furlong wrote: > > > But how can you reliably detect a system with a broken libc when > > cross-compiling? > > I don't think that you can successfully cross-compile PHP > anyway, so the point is moot anyway. You can; I cross compile it regularly. Alex -- Alex Waugh [EMAIL PROTECTED] RISC OS software from http://www.alexwaugh.com/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / acinclude.m4 configure.in
iliaa Thu Jan 2 14:20:57 2003 EDT Modified files: /php4 configure.in acinclude.m4 Log: Raise required OpenSSL version to 0.9.6. Index: php4/configure.in diff -u php4/configure.in:1.410 php4/configure.in:1.411 --- php4/configure.in:1.410 Wed Jan 1 04:58:16 2003 +++ php4/configure.in Thu Jan 2 14:20:55 2003 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.410 2003/01/01 09:58:16 wez Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.411 2003/01/02 19:20:55 iliaa Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -728,7 +728,7 @@ dnl OpenSSL configure dnl PHP_ARG_WITH(openssl,for OpenSSL support, -[ --with-openssl[=DIR]Include OpenSSL support (requires OpenSSL >= 0.9.5) ]) +[ --with-openssl[=DIR]Include OpenSSL support (requires OpenSSL >= 0.9.6) ]) if test "$PHP_OPENSSL" != "no"; then ext_openssl_shared=$ext_shared Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.222 php4/acinclude.m4:1.223 --- php4/acinclude.m4:1.222 Wed Jan 1 04:58:16 2003 +++ php4/acinclude.m4 Thu Jan 2 14:20:57 2003 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.222 2003/01/01 09:58:16 wez Exp $ +dnl $Id: acinclude.m4,v 1.223 2003/01/02 19:20:57 iliaa Exp $ dnl dnl This file contains local autoconf functions. @@ -204,13 +204,13 @@ AC_MSG_CHECKING([for OpenSSL version]) AC_EGREP_CPP(yes,[ #include -#if OPENSSL_VERSION_NUMBER >= 0x0090500fL +#if OPENSSL_VERSION_NUMBER >= 0x0090600fL yes #endif ],[ -AC_MSG_RESULT([>= 0.9.5]) +AC_MSG_RESULT([>= 0.9.6]) ],[ -AC_MSG_ERROR([OpenSSL version 0.9.5 or greater required.]) +AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.]) ]) CPPFLAGS=$old_CPPFLAGS -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4 configure.in /main streams.c
On Thu, 2 Jan 2003, Wez Furlong wrote: > But how can you reliably detect a system with a broken libc when > cross-compiling? I don't think that you can successfully cross-compile PHP anyway, so the point is moot anyway. - Sascha -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4 configure.in /main streams.c
But how can you reliably detect a system with a broken libc when cross-compiling? I leave this for someone else to decide, although a more-or-less reasonable default is to for "have_broken_glibc_fopen_append=no" and hope that no-one files a problem report :) --Wez On Thu, 2 Jan 2003, Derick Rethans wrote: > On Thu, 2 Jan 2003, Wez Furlong wrote: > > > Defaulting to assuming that the target has a broken libc can cause race > > conditions (as the append operation is no-longer atomic). > > > > Default to assuming a working libc will cause "a+" operations to fail > > when the target actually has a broken libc. > > "broken glibc" << doesn't that imply that this define only need to be > disabled for known broken systems and thus we can make the default not > to define this thing. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4 configure.in /main streams.c
On Thu, 2 Jan 2003, Wez Furlong wrote: > Defaulting to assuming that the target has a broken libc can cause race > conditions (as the append operation is no-longer atomic). > > Default to assuming a working libc will cause "a+" operations to fail > when the target actually has a broken libc. "broken glibc" << doesn't that imply that this define only need to be disabled for known broken systems and thus we can make the default not to define this thing. Derick -- - Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ - -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4 configure.in /main streams.c
Sure, but would should the default option be? Defaulting to assuming that the target has a broken libc can cause race conditions (as the append operation is no-longer atomic). Default to assuming a working libc will cause "a+" operations to fail when the target actually has a broken libc. I don't want to start adding all kinds of weird target checks; I leave that to other people more familiar with this stuff. --Wez. On Thu, 2 Jan 2003, Alex Waugh wrote: > In message> "Wez Furlong" <[EMAIL PROTECTED]> wrote: > > > wez Wed Jan 1 04:58:17 2003 EDT > > > > Modified files: > > /php4 acinclude.m4 configure.in > > /php4/main streams.c > > Log: > > Workaround for glibc 2.2.9x and later "a+" bug that does not seek to EOF for > > files fopen()ed with that mode. > > This breaks the build when cross compiling. Please could you add a > default option to AC_TRY_RUN -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4 configure.in /main streams.c
In message"Wez Furlong" <[EMAIL PROTECTED]> wrote: > wez Wed Jan 1 04:58:17 2003 EDT > > Modified files: > /php4 acinclude.m4 configure.in > /php4/mainstreams.c > Log: > Workaround for glibc 2.2.9x and later "a+" bug that does not seek to EOF for > files fopen()ed with that mode. This breaks the build when cross compiling. Please could you add a default option to AC_TRY_RUN Cheers Alex -- Alex Waugh [EMAIL PROTECTED] RISC OS software from http://www.alexwaugh.com/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / acinclude.m4 configure.in /main streams.c
wez Wed Jan 1 04:58:17 2003 EDT Modified files: /php4 acinclude.m4 configure.in /php4/main streams.c Log: Workaround for glibc 2.2.9x and later "a+" bug that does not seek to EOF for files fopen()ed with that mode. Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.221 php4/acinclude.m4:1.222 --- php4/acinclude.m4:1.221 Mon Nov 18 06:39:41 2002 +++ php4/acinclude.m4 Wed Jan 1 04:58:16 2003 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.221 2002/11/18 11:39:41 wez Exp $ +dnl $Id: acinclude.m4,v 1.222 2003/01/01 09:58:16 wez Exp $ dnl dnl This file contains local autoconf functions. @@ -1454,6 +1454,45 @@ AC_DEFINE(CHARSET_EBCDIC,1, [Define if system uses EBCDIC]) fi ]) + +AC_DEFUN([PHP_BROKEN_GLIBC_FOPEN_APPEND],[ + AC_MSG_CHECKING([for broken libc stdio]) + AC_TRY_RUN([ +#include +int main(int argc, char *argv[]) +{ + FILE *fp; + long position; + char *filename = "/tmp/phpglibccheck"; + + fp = fopen(filename, "w"); + if (fp == NULL) { + perror("fopen"); + exit(2); + } + fputs("foobar", fp); + fclose(fp); + + fp = fopen(filename, "a+"); + position = ftell(fp); + fclose(fp); + unlink(filename); + if (position == 0) + return 1; + return 0; +} +], +[have_broken_glibc_fopen_append=no], +[have_broken_glibc_fopen_append=yes ]) + + if test "$have_broken_glibc_fopen_append" = "yes"; then + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_BROKEN_GLIBC_FOPEN_APPEND,1, [Define if your glibc borks on +fopen with mode a+]) + else + AC_MSG_RESULT(no) + fi +]) + AC_DEFUN([PHP_FOPENCOOKIE],[ AC_CHECK_FUNC(fopencookie, [ have_glibc_fopencookie=yes ]) Index: php4/configure.in diff -u php4/configure.in:1.409 php4/configure.in:1.410 --- php4/configure.in:1.409 Thu Dec 19 12:02:39 2002 +++ php4/configure.in Wed Jan 1 04:58:16 2003 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.409 2002/12/19 17:02:39 edink Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.410 2003/01/01 09:58:16 wez Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -382,6 +382,7 @@ ]) PHP_FOPENCOOKIE +PHP_BROKEN_GLIBC_FOPEN_APPEND dnl Checks for typedefs, structures, and compiler characteristics. dnl - Index: php4/main/streams.c diff -u php4/main/streams.c:1.139 php4/main/streams.c:1.140 --- php4/main/streams.c:1.139 Tue Dec 31 10:58:54 2002 +++ php4/main/streams.c Wed Jan 1 04:58:17 2003 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: streams.c,v 1.139 2002/12/31 15:58:54 sebastian Exp $ */ +/* $Id: streams.c,v 1.140 2003/01/01 09:58:17 wez Exp $ */ #define _GNU_SOURCE #include "php.h" @@ -1317,6 +1317,12 @@ stream = php_stream_alloc_rel(&php_stream_stdio_ops, self, 0, mode); +#ifdef HAVE_BROKEN_GLIBC_FOPEN_APPEND + if (strchr(mode, 'a')) { + fseek(file, 0, SEEK_END); + } +#endif + if (stream) { if (self->is_pipe) { stream->flags |= PHP_STREAM_FLAG_NO_SEEK; @@ -2417,7 +2423,7 @@ } } - if (stream && stream->ops->seek && (stream->flags & PHP_STREAM_FLAG_NO_SEEK) == 0 && strchr(mode, 'a')) { + if (stream && stream->ops->seek && (stream->flags & PHP_STREAM_FLAG_NO_SEEK) +== 0 && strchr(mode, 'a') && stream->position == 0) { off_t newpos = 0; /* if opened for append, we need to revise our idea of the initial file position */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / acinclude.m4 /ext/zlib zlib.c /main php_streams.h streams.c
wez Mon Nov 18 06:39:42 2002 EDT Modified files: /php4 acinclude.m4 /php4/ext/zlib zlib.c /php4/main php_streams.h streams.c Log: Merge streams changes from branch. Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.220 php4/acinclude.m4:1.221 --- php4/acinclude.m4:1.220 Thu Nov 14 19:20:17 2002 +++ php4/acinclude.m4 Mon Nov 18 06:39:41 2002 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.220 2002/11/15 00:20:17 sas Exp $ +dnl $Id: acinclude.m4,v 1.221 2002/11/18 11:39:41 wez Exp $ dnl dnl This file contains local autoconf functions. @@ -1480,16 +1480,16 @@ #include struct cookiedata { - fpos_t pos; + __off64_t pos; }; -size_t reader(void *cookie, char *buffer, size_t size) +__ssize_t reader(void *cookie, char *buffer, size_t size) { return size; } -size_t writer(void *cookie, const char *buffer, size_t size) +__ssize_t writer(void *cookie, const char *buffer, size_t size) { return size; } int closer(void *cookie) { return 0; } -int seeker(void *cookie, fpos_t *position, int whence) +int seeker(void *cookie, __off64_t *position, int whence) { ((struct cookiedata*)cookie)->pos = *position; return 0; } cookie_io_functions_t funcs = {reader, writer, seeker, closer}; @@ -1498,13 +1498,13 @@ struct cookiedata g = { 0 }; FILE *fp = fopencookie(&g, "r", funcs); - if (fp && fseek(fp, 69, SEEK_SET) == 0 && g.pos == 69) + if (fp && fseek(fp, 8192, SEEK_SET) == 0 && g.pos == 8192) exit(0); exit(1); } ], - [ cookie_io_functions_use_fpos_t=yes ], + [ cookie_io_functions_use_off64_t=yes ], [ ] ) else @@ -1525,8 +1525,8 @@ if test "$have_fopen_cookie" = "yes" ; then AC_DEFINE(HAVE_FOPENCOOKIE, 1, [ ]) AC_DEFINE_UNQUOTED(COOKIE_IO_FUNCTIONS_T, $cookie_io_functions_t, [ ]) - if test "$cookie_io_functions_use_fpos_t" = "yes" ; then - AC_DEFINE(COOKIE_SEEKER_USES_FPOS_T, 1, [ ]) + if test "$cookie_io_functions_use_off64_t" = "yes" ; then + AC_DEFINE(COOKIE_SEEKER_USES_OFF64_T, 1, [ ]) fi fi Index: php4/ext/zlib/zlib.c diff -u php4/ext/zlib/zlib.c:1.153 php4/ext/zlib/zlib.c:1.154 --- php4/ext/zlib/zlib.c:1.153 Sun Nov 3 15:31:00 2002 +++ php4/ext/zlib/zlib.cMon Nov 18 06:39:41 2002 @@ -18,7 +18,7 @@ | Jade Nicoletti <[EMAIL PROTECTED]> | +--+ */ -/* $Id: zlib.c,v 1.153 2002/11/03 20:31:00 moriyoshi Exp $ */ +/* $Id: zlib.c,v 1.154 2002/11/18 11:39:41 wez Exp $ */ #define IS_EXT_MODULE #ifdef HAVE_CONFIG_H @@ -258,7 +258,6 @@ { php_info_print_table_start(); php_info_print_table_row(2, "ZLib Support", "enabled"); - php_info_print_table_row(2, "'zlib:' fopen wrapper", "enabled"); php_info_print_table_row(2, "Compiled Version", ZLIB_VERSION ); php_info_print_table_row(2, "Linked Version", (char *)zlibVersion() ); php_info_print_table_end(); Index: php4/main/php_streams.h diff -u php4/main/php_streams.h:1.61 php4/main/php_streams.h:1.62 --- php4/main/php_streams.h:1.61Tue Nov 5 19:17:44 2002 +++ php4/main/php_streams.h Mon Nov 18 06:39:41 2002 @@ -16,6 +16,8 @@ +--+ */ +/* $Id: php_streams.h,v 1.62 2002/11/18 11:39:41 wez Exp $ */ + #ifndef PHP_STREAMS_H #define PHP_STREAMS_H @@ -329,6 +331,7 @@ #define PHP_STREAM_FREE_PRESERVE_HANDLE4 /* tell ops->close to not close it's underlying handle */ #define PHP_STREAM_FREE_RSRC_DTOR 8 /* called from the resource list dtor */ #define PHP_STREAM_FREE_CLOSE (PHP_STREAM_FREE_CALL_DTOR | PHP_STREAM_FREE_RELEASE_STREAM) +#define PHP_STREAM_FREE_CLOSE_CASTED (PHP_STREAM_FREE_CLOSE | +PHP_STREAM_FREE_PRESERVE_HANDLE) PHPAPI int _php_stream_free(php_stream *stream, int close_options TSRMLS_DC); #define php_stream_free(stream, close_options) _php_stream_free((stream), (close_options) TSRMLS_CC) #define php_stream_close(stream) _php_stream_free((stream), PHP_STREAM_FREE_CLOSE TSRMLS_CC) @@ -456,7 +459,7 @@ /* cast as a socketd */ #define PHP_STREAM_AS_SOCKETD 2 -/* try really, really hard to make sure the cast happens (socketpair) */ +/* try really, really hard to make sure the cast happens (avoid using this flag if +possible) */ #define PHP_STREAM_CAST_TRY_HARD 0x8000 #define PHP_STREAM_CAST_RELEASE0x4000 /* stream becomes invalid on success */ #define PHP_STREAM_CAST_INTERNAL 0x2000 /* stream cast for internal use */ @@ -499,11 +502,8 @@ /* this flag is only used by includ
[PHP-CVS] cvs: php4 / acinclude.m4 configure.in /ext/ircg config.m4 ircg.c ircg_dummy.c ircg_thttpd.c /sapi/cli config.m4
sas Wed Nov 13 20:09:46 2002 EDT Added files: /php4/ext/ircg ircg_dummy.c ircg_thttpd.c Modified files: /php4 acinclude.m4 configure.in /php4/ext/ircg config.m4 ircg.c /php4/sapi/cli config.m4 Log: - Remove PHP_DISABLE_CLI - Streamline ircg build: thttpd-dependent part moved into separate source file, so that it can be added to the SAPI-only object list. Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.218 php4/acinclude.m4:1.219 --- php4/acinclude.m4:1.218 Tue Oct 29 06:24:26 2002 +++ php4/acinclude.m4 Wed Nov 13 20:09:45 2002 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.218 2002/10/29 11:24:26 sniper Exp $ +dnl $Id: acinclude.m4,v 1.219 2002/11/14 01:09:45 sas Exp $ dnl dnl This file contains local autoconf functions. @@ -137,13 +137,6 @@ done ]) -dnl -dnl Disable building CLI -dnl -AC_DEFUN([PHP_DISABLE_CLI],[ - disable_cli=1 -]) - dnl dnl Separator into the configure --help display. dnl Index: php4/configure.in diff -u php4/configure.in:1.397 php4/configure.in:1.398 --- php4/configure.in:1.397 Wed Nov 13 14:19:04 2002 +++ php4/configure.in Wed Nov 13 20:09:45 2002 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.397 2002/11/13 19:19:04 andrei Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.398 2002/11/14 01:09:45 sas Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -607,7 +607,7 @@ [ --with-pear=DIR Install PEAR in DIR (default PREFIX/lib/php) --without-pear Do not install PEAR], DEFAULT, no) -if test "$PHP_PEAR" != "no" && test "$disable_cli" != "1"; then +if test "$PHP_PEAR" != "no" && test "$PHP_SAPI_CLI" != "no"; then install_pear="install-pear install-build install-headers install-programs" PEAR_INSTALLDIR=$PHP_PEAR fi @@ -957,7 +957,7 @@ PHP_OS=`uname | xargs` AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS",[uname output]) -if test "$disable_cli" != "1"; then +if test "$PHP_SAPI_CLI" != "no"; then PHP_CLI_TARGET=sapi/cli/php PHP_INSTALL_CLI_TARGET="install-cli" PHP_ADD_SOURCES(sapi/cli, php_cli.c getopt.c,, cli) Index: php4/ext/ircg/config.m4 diff -u php4/ext/ircg/config.m4:1.14 php4/ext/ircg/config.m4:1.15 --- php4/ext/ircg/config.m4:1.14Mon Mar 18 10:00:57 2002 +++ php4/ext/ircg/config.m4 Wed Nov 13 20:09:45 2002 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.14 2002/03/18 15:00:57 sas Exp $ +dnl $Id: config.m4,v 1.15 2002/11/14 01:09:45 sas Exp $ dnl PHP_ARG_WITH(ircg, for IRCG support, @@ -26,11 +26,13 @@ PHP_EVAL_INCLINE(`$IRCG_CONFIG --cppflags`) PHP_ADD_LIBRARY_WITH_PATH(ircg, $PHP_IRCG/lib) PHP_ADD_INCLUDE($PHP_IRCG/include) + PHP_NEW_EXTENSION(ircg, ircg.c ircg_scanner.c, $ext_shared) if test "$PHP_SAPI" = "thttpd"; then -AC_DEFINE(IRCG_WITH_THTTPD, 1, [Whether thttpd is available]) -PHP_DISABLE_CLI +PHP_ADD_SOURCES(PHP_EXT_DIR(ircg),ircg_thttpd.c,[],sapi) +PHP_ADD_SOURCES(PHP_EXT_DIR(ircg),ircg_dummy.c,[],cli) + else +PHP_ADD_SOURCES(PHP_EXT_DIR(ircg),ircg_dummy.c) fi AC_DEFINE(HAVE_IRCG, 1, [Whether you want IRCG support]) - PHP_NEW_EXTENSION(ircg, ircg.c ircg_scanner.c, $ext_shared) PHP_ADD_MAKEFILE_FRAGMENT fi Index: php4/ext/ircg/ircg.c diff -u php4/ext/ircg/ircg.c:1.139 php4/ext/ircg/ircg.c:1.140 --- php4/ext/ircg/ircg.c:1.139 Wed Nov 13 18:19:12 2002 +++ php4/ext/ircg/ircg.cWed Nov 13 20:09:45 2002 @@ -14,9 +14,9 @@ +--+ | Author: Sascha Schumann <[EMAIL PROTECTED]> | +--+ - */ +*/ -/* $Id: ircg.c,v 1.139 2002/11/13 23:19:12 sas Exp $ */ +/* $Id: ircg.c,v 1.140 2002/11/14 01:09:45 sas Exp $ */ /* {{{ includes */ @@ -1379,7 +1379,6 @@ Sets current connection for output */ PHP_FUNCTION(ircg_set_current) { -#ifdef IRCG_WITH_THTTPD zval **p1; php_irconn_t *conn; #if 0 @@ -1412,10 +1411,9 @@ #endif irc_set_currents++; - thttpd_register_on_close(http_closed_connection); - thttpd_set_dont_close(); - conn->fd = thttpd_get_fd(); - if (fcntl(conn->fd, F_GETFL) == -1) { + + if (php_ircg_register_with_sapi(&conn->fd, http_closed_connection) + || fcntl(conn->fd, F_GETFL) == -1) { zend_hash_index_del(&h_irconn, Z_LVAL_PP(p1)); php_error(E_WARNING, "current fd is not valid"); RETURN_FALSE; @@ -1427,7 +1425,6 @@ } RETURN_TRUE; -#endif } /* }}} */ Index: php4/sapi/cli/config.m4 diff -u php4/sapi/cli/config.m4:1.11 php4/sapi/cli/config.m4:1.12 --- php4/sapi/cli/config.m4:1.11Sun Sep 29 12:22:48 2002 +++ php4/sapi/cli/config.m4 Wed Nov 13 20:09:46 2002 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.11 2002/09/29 16:22:48 sas Exp $ +dnl $Id: config.m4,v 1.12 2002/11/14 01:
[PHP-CVS] cvs: php4 / acinclude.m4
sniper Tue Oct 29 06:24:26 2002 EDT Modified files: /php4 acinclude.m4 Log: - Remove the "which" call and just expect sed to be in PATH Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.217 php4/acinclude.m4:1.218 --- php4/acinclude.m4:1.217 Mon Oct 28 18:42:47 2002 +++ php4/acinclude.m4 Tue Oct 29 06:24:26 2002 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.217 2002/10/28 23:42:47 sniper Exp $ +dnl $Id: acinclude.m4,v 1.218 2002/10/29 11:24:26 sniper Exp $ dnl dnl This file contains local autoconf functions. @@ -1746,7 +1746,7 @@ dnl Based on LT_AC_PROG_SED (libtool CVS) dnl AC_DEFUN([PHP_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) +[AC_MSG_CHECKING([for working sed]) AC_CACHE_VAL(ac_cv_path_sed, [ @@ -1775,9 +1775,7 @@ _count=0 # Use the sed found in PATH, skip the rest - _sed=`which sed` - - test ! -f ${_sed} && break + _sed=sed # Check for GNU sed and select it if it is found. if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / acinclude.m4
sniper Mon Oct 28 18:42:48 2002 EDT Modified files: /php4 acinclude.m4 Log: - Only test the sed in PATH. (testing others is useless) Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.216 php4/acinclude.m4:1.217 --- php4/acinclude.m4:1.216 Thu Oct 24 08:21:06 2002 +++ php4/acinclude.m4 Mon Oct 28 18:42:47 2002 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.216 2002/10/24 12:21:06 sas Exp $ +dnl $Id: acinclude.m4,v 1.217 2002/10/28 23:42:47 sniper Exp $ dnl dnl This file contains local autoconf functions. @@ -1748,20 +1748,9 @@ AC_DEFUN([PHP_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(ac_cv_path_sed, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH; do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do -if test -x "$as_dir/$ac_prog"; then - _sed_list="$_sed_list $as_dir/$ac_prog" -fi - done -done +[ - # Create a temporary directory, and hook for its removal unless debugging. +# Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 @@ -1784,16 +1773,19 @@ } _max=0 _count=0 - for _sed in $_sed_list; do -test ! -f ${_sed} && break + + # Use the sed found in PATH, skip the rest + _sed=`which sed` + + test ! -f ${_sed} && break + + # Check for GNU sed and select it if it is found. + if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then +ac_cv_path_sed=${_sed} + else cat /dev/null > "$tmp/sed.in" _count=0 echo -n "0123456789" >"$tmp/sed.in" -# Check for GNU sed and select it if it is found. -if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then - ac_cv_path_sed=${_sed} - break; -fi while true; do cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp" mv "$tmp/sed.tmp" "$tmp/sed.in" @@ -1806,10 +1798,10 @@ _count=`expr $_count + 1` if test $_count -gt $_max; then _max=$_count -ac_cv_path_sed=$_sed +ac_cv_path_sed=${_sed} fi done - done + fi rm -rf "$tmp" ]) if test -z "$ac_cv_path_sed"; then -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4 configure.in /ext/standardconfig.m4 math.c
On Thu, 24 Oct 2002, Sascha Schumann wrote: > sas Thu Oct 24 08:21:07 2002 EDT > > Modified files: > /php4 acinclude.m4 configure.in > /php4/ext/standardconfig.m4 math.c > Log: > Make PHP compile out-of-the-box with uClibc > > > PHP_FUNCTION(asinh) > { > +#ifdef HAVE_ASINH > zval **num; > > if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) { > @@ -329,6 +330,7 @@ > convert_to_double_ex(num); > Z_DVAL_P(return_value) = asinh(Z_DVAL_PP(num)); > Z_TYPE_P(return_value) = IS_DOUBLE; > +#endif > } I thought the general consesus was to not define a function at all if it is not implemented. Better make function_exists() work on them so that you can code workarounds in your code... Derick -- --- Derick Rethans http://derickrethans.nl/ JDI Media Solutions --[ if you hold a unix shell to your ear, do you hear the c? ]- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / acinclude.m4 configure.in /ext/standard config.m4 math.c
sas Thu Oct 24 08:21:07 2002 EDT Modified files: /php4 acinclude.m4 configure.in /php4/ext/standard config.m4 math.c Log: Make PHP compile out-of-the-box with uClibc Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.215 php4/acinclude.m4:1.216 --- php4/acinclude.m4:1.215 Thu Oct 24 06:41:36 2002 +++ php4/acinclude.m4 Thu Oct 24 08:21:06 2002 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.215 2002/10/24 10:41:36 sas Exp $ +dnl $Id: acinclude.m4,v 1.216 2002/10/24 12:21:06 sas Exp $ dnl dnl This file contains local autoconf functions. @@ -1679,6 +1679,13 @@ AC_CHECK_LIB($2, $1, [found=yes], [ AC_CHECK_LIB($2, __$1, [found=yes], [found=no]) ]) + + if test "$found" = "yes"; then +ac_libs=$LIBS +LIBS="$LIBS -l$2" +AC_TRY_RUN([main() { return (0); }],[found=yes],[found=no],[found=no]) +LIBS=$ac_libs + fi if test "$found" = "yes"; then PHP_ADD_LIBRARY($2) Index: php4/configure.in diff -u php4/configure.in:1.386 php4/configure.in:1.387 --- php4/configure.in:1.386 Tue Oct 22 20:21:43 2002 +++ php4/configure.in Thu Oct 24 08:21:06 2002 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.386 2002/10/23 00:21:43 sniper Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.387 2002/10/24 12:21:06 sas Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -279,7 +279,7 @@ PHP_CHECK_FUNC(gethostbyaddr, nsl) PHP_CHECK_FUNC(yp_get_default_domain, nsl) -AC_CHECK_LIB(dl, dlopen, [PHP_ADD_LIBRARY(dl)]) +PHP_CHECK_FUNC(dlopen, dl) AC_CHECK_LIB(m, sin) dnl Check for resolver routines. @@ -802,6 +802,7 @@ PHP_CONFIGURE_PART(Configuring Zend) LIBZEND_BASIC_CHECKS +LIBZEND_DLSYM_CHECK LIBZEND_OTHER_CHECKS TSRM_LIB='TSRM/libtsrm.la' Index: php4/ext/standard/config.m4 diff -u php4/ext/standard/config.m4:1.44 php4/ext/standard/config.m4:1.45 --- php4/ext/standard/config.m4:1.44Mon Oct 21 19:41:38 2002 +++ php4/ext/standard/config.m4 Thu Oct 24 08:21:06 2002 @@ -1,4 +1,4 @@ -dnl $Id: config.m4,v 1.44 2002/10/21 23:41:38 sniper Exp $ -*- sh -*- +dnl $Id: config.m4,v 1.45 2002/10/24 12:21:06 sas Exp $ -*- sh -*- divert(3)dnl @@ -189,7 +189,7 @@ dnl EXTRA_LIBS="$EXTRA_LIBS -lpam" dnl AC_DEFINE(HAVE_LIBPAM,1,[ ]) ], []) -AC_CHECK_FUNCS(getcwd getwd) +AC_CHECK_FUNCS(getcwd getwd asinh acosh atanh log1p hypot) AC_CRYPT_CAP AC_FLUSH_IO Index: php4/ext/standard/math.c diff -u php4/ext/standard/math.c:1.90 php4/ext/standard/math.c:1.91 --- php4/ext/standard/math.c:1.90 Tue Oct 15 10:51:01 2002 +++ php4/ext/standard/math.cThu Oct 24 08:21:07 2002 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: math.c,v 1.90 2002/10/15 14:51:01 sterling Exp $ */ +/* $Id: math.c,v 1.91 2002/10/24 12:21:07 sas Exp $ */ #include "php.h" #include "php_math.h" @@ -321,6 +321,7 @@ PHP_FUNCTION(asinh) { +#ifdef HAVE_ASINH zval **num; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) { @@ -329,6 +330,7 @@ convert_to_double_ex(num); Z_DVAL_P(return_value) = asinh(Z_DVAL_PP(num)); Z_TYPE_P(return_value) = IS_DOUBLE; +#endif } /* }}} */ @@ -337,6 +339,7 @@ PHP_FUNCTION(acosh) { +#ifdef HAVE_ACOSH zval **num; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) { @@ -345,6 +348,7 @@ convert_to_double_ex(num); Z_DVAL_P(return_value) = acosh(Z_DVAL_PP(num)); Z_TYPE_P(return_value) = IS_DOUBLE; +#endif } /* }}} */ @@ -353,6 +357,7 @@ PHP_FUNCTION(atanh) { +#ifdef HAVE_ATANH zval **num; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) { @@ -361,6 +366,7 @@ convert_to_double_ex(num); Z_DVAL_P(return_value) = atanh(Z_DVAL_PP(num)); Z_TYPE_P(return_value) = IS_DOUBLE; +#endif } /* }}} */ @@ -504,6 +510,7 @@ PHP_FUNCTION(log1p) { +#ifdef HAVE_LOG1P zval **num; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) { @@ -512,6 +519,7 @@ convert_to_double_ex(num); Z_DVAL_P(return_value) = log1p(Z_DVAL_PP(num)); Z_TYPE_P(return_value) = IS_DOUBLE; +#endif } /* }}} */ @@ -577,6 +585,7 @@ PHP_FUNCTION(hypot) { +#ifdef HAVE_HYPOT zval **num1, **num2; if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &num1, &num2) == FAILURE) { @@ -586,6 +595,7 @@ convert_to_double_ex(num2); Z_DVAL_P(return_value) = hypot(Z_DVAL_PP(num1), Z_DVAL_PP(num2)); Z_TYPE_P(return_value) = IS_DOUBLE; +#endif } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / acinclude.m4
sas Thu Oct 24 06:41:37 2002 EDT Modified files: /php4 acinclude.m4 Log: Quote macro names in AC_DEFUN() and prefix the internal macros using a single underscore. Also rename AC_PHP_ONCE as PHP_RUN_ONCE. Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.214 php4/acinclude.m4:1.215 --- php4/acinclude.m4:1.214 Sun Oct 20 23:31:52 2002 +++ php4/acinclude.m4 Thu Oct 24 06:41:36 2002 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.214 2002/10/21 03:31:52 sniper Exp $ +dnl $Id: acinclude.m4,v 1.215 2002/10/24 10:41:36 sas Exp $ dnl dnl This file contains local autoconf functions. @@ -9,7 +9,7 @@ dnl are substituted with the proper paths. Can be used to supply dnl custom rules and/or additional targets. dnl -AC_DEFUN(PHP_ADD_MAKEFILE_FRAGMENT,[ +AC_DEFUN([PHP_ADD_MAKEFILE_FRAGMENT],[ ifelse($1,,src=$ext_srcdir/Makefile.frag,src=$1) ifelse($2,,ac_srcdir=$ext_srcdir,ac_srcdir=$2) ifelse($3,,ac_builddir=$ext_builddir,ac_builddir=$3) @@ -21,13 +21,13 @@ dnl dnl Creates builddir/include/what.h and in there #define WHAT value dnl -AC_DEFUN(PHP_DEFINE,[ +AC_DEFUN([PHP_DEFINE],[ [echo "#define ]$1[]ifelse([$2],,[ 1],[ $2])[" > include/php_]translit($1,A-Z,a-z)[.h] ]) dnl PHP_INIT_BUILD_SYSTEM dnl -AC_DEFUN(PHP_INIT_BUILD_SYSTEM,[ +AC_DEFUN([PHP_INIT_BUILD_SYSTEM],[ mkdir include >/dev/null 2>&1 > Makefile.objects > Makefile.fragments @@ -40,7 +40,7 @@ dnl dnl Generates the global makefile. dnl -AC_DEFUN(PHP_GEN_GLOBAL_MAKEFILE,[ +AC_DEFUN([PHP_GEN_GLOBAL_MAKEFILE],[ cat >Makefile <$1 < #include @@ -401,7 +401,7 @@ ]) ]) -AC_DEFUN(PHP_DOES_PREAD_WORK,[ +AC_DEFUN([PHP_DOES_PREAD_WORK],[ echo test > conftest_in AC_TRY_RUN([ #include @@ -429,7 +429,7 @@ rm -f conftest_in ]) -AC_DEFUN(PHP_PWRITE_TEST,[ +AC_DEFUN([PHP_PWRITE_TEST],[ AC_CACHE_CHECK(whether pwrite works,ac_cv_pwrite,[ PHP_DOES_PWRITE_WORK if test "$ac_cv_pwrite" = "no"; then @@ -448,7 +448,7 @@ fi ]) -AC_DEFUN(PHP_PREAD_TEST,[ +AC_DEFUN([PHP_PREAD_TEST],[ AC_CACHE_CHECK(whether pread works,ac_cv_pread,[ PHP_DOES_PREAD_WORK if test "$ac_cv_pread" = "no"; then @@ -467,7 +467,7 @@ fi ]) -AC_DEFUN(PHP_MISSING_TIME_R_DECL,[ +AC_DEFUN([PHP_MISSING_TIME_R_DECL],[ AC_MSG_CHECKING([for missing declarations of reentrant functions]) AC_TRY_COMPILE([#include ],[struct tm *(*func)() = localtime_r],[ : @@ -501,13 +501,13 @@ dnl PHP_LIBGCC_LIBPATH(gcc) dnl Stores the location of libgcc in libgcc_libpath dnl -AC_DEFUN(PHP_LIBGCC_LIBPATH,[ +AC_DEFUN([PHP_LIBGCC_LIBPATH],[ changequote({,}) libgcc_libpath=`$1 --print-libgcc-file-name|sed 's%/*[^/][^/]*$%%'` changequote([,]) ]) -AC_DEFUN(PHP_ARG_ANALYZE_EX,[ +AC_DEFUN([PHP_ARG_ANALYZE_EX],[ ext_output="yes, shared" ext_shared=yes case [$]$1 in @@ -530,7 +530,7 @@ PHP_ALWAYS_SHARED([$1]) ]) -AC_DEFUN(PHP_ARG_ANALYZE,[ +AC_DEFUN([PHP_ARG_ANALYZE],[ ifelse([$3],yes,[PHP_ARG_ANALYZE_EX([$1])]) ifelse([$2],,,[AC_MSG_RESULT([$ext_output])]) ]) @@ -543,11 +543,11 @@ dnl If extension-or-not is yes (default), then do the ENABLE_ALL check and run dnl the PHP_ARG_ANALYZE_EX. dnl -AC_DEFUN(PHP_ARG_WITH,[ +AC_DEFUN([PHP_ARG_WITH],[ PHP_REAL_ARG_WITH([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z0-9-,A-Z0-9_),[ifelse($5,,yes,$5)]) ]) -AC_DEFUN(PHP_REAL_ARG_WITH,[ +AC_DEFUN([PHP_REAL_ARG_WITH],[ ifelse([$2],,,[AC_MSG_CHECKING([$2])]) AC_ARG_WITH($1,[$3],$5=[$]withval, [ @@ -568,11 +568,11 @@ dnl If extension-or-not is yes (default), then do the ENABLE_ALL check and run dnl the PHP_ARG_ANALYZE_EX. dnl -AC_DEFUN(PHP_ARG_ENABLE,[ +AC_DEFUN([PHP_ARG_ENABLE],[ PHP_REAL_ARG_ENABLE([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z-,A-Z_),[ifelse($5,,yes,$5)]) ]) -AC_DEFUN(PHP_REAL_ARG_ENABLE,[ +AC_DEFUN([PHP_REAL_ARG_ENABLE],[ ifelse([$2],,,[AC_MSG_CHECKING([$2])]) AC_ARG_ENABLE($1,[$3],$5=[$]enableval, [ @@ -585,11 +585,11 @@ PHP_ARG_ANALYZE($5,[$2],$6) ]) -AC_DEFUN(PHP_MODULE_PTR,[ +AC_DEFUN([PHP_MODULE_PTR],[ EXTRA_MODULE_PTRS="$EXTRA_MODULE_PTRS $1," ]) -AC_DEFUN(PHP_CONFIG_NICE,[ +AC_DEFUN([PHP_CONFIG_NICE],[ rm -f $1 cat >$1< @@ -658,16 +658,16 @@ esac ]) -AC_DEFUN(PHP_SUBST,[ +AC_DEFUN([PHP_SUBST],[ PHP_VAR_SUBST="$PHP_VAR_SUBST $1" ]) -AC_DEFUN(PHP_SUBST_OLD,[ +AC_DEFUN([PHP_SUBST_OLD],[ PHP_SUBST($1) AC_SUBST($1) ]) -AC_DEFUN(PHP_MKDIR_P_CHECK,[ +AC_DEFUN([PHP_MKDIR_P_CHECK],[ AC_CACHE_CHECK(for working mkdir -p, ac_cv_mkdir_p,[ test -d conftestdir && rm -rf conftestdir mkdir -p conftestdir/somedir >/dev/null 2>&1 @@ -682,7 +682,7 @@ ]) ]) -AC_DEFUN(PHP_TM_GMTOFF,[ +AC_DEFUN([PHP_TM_GMTOFF],[ AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff, [AC_TRY_COMPILE([#include #include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_gmtoff;], @@ -695,19 +695,19 @@ dnl PHP_CONFIGURE_PART(MESSAGE) dnl Idea borrowed from mm -AC_DEFUN(PHP_CONFIGURE_PART,[ +AC_DEFUN([PHP_CONFIGURE_PA
[PHP-CVS] cvs: php4 / acinclude.m4 configure.in /sapi/cgi config.m4 config9.m4
sniper Sun Oct 20 23:12:27 2002 EDT Added files: /php4/sapi/cgi config9.m4 Removed files: /php4/sapi/cgi config.m4 Modified files: /php4 acinclude.m4 configure.in Log: - Moved CGI specific lines from configure.in to sapi/cgi/config9.m4 which is 'executed' last of the SAPI config.m4's. - Added --disable-cgi option. (was possible only with above change) - Made the sed check to not test for the possibly working sed on Solaris since that would make the test quite useless. (compile would still fail) # That sed check is not enabled yet..need to know whether we fail # during configure or just put out a warning about possible non-working # sed. As even plain ./configure doesn't work in most cases, I think # it would be better to just fail during configure and let the users # fix their paths/install GNU sed. Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.212 php4/acinclude.m4:1.213 --- php4/acinclude.m4:1.212 Wed Oct 16 12:21:13 2002 +++ php4/acinclude.m4 Sun Oct 20 23:12:27 2002 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.212 2002/10/16 16:21:13 sniper Exp $ +dnl $Id: acinclude.m4,v 1.213 2002/10/21 03:12:27 sniper Exp $ dnl dnl This file contains local autoconf functions. @@ -1777,9 +1777,8 @@ } _max=0 _count=0 - # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. - for _sed in $_sed_list /usr/xpg4/bin/sed; do + for _sed in $_sed_list; do test ! -f ${_sed} && break cat /dev/null > "$tmp/sed.in" _count=0 @@ -1811,6 +1810,7 @@ AC_MSG_ERROR([Could not find working sed on this system. Please install GNU sed.]) else SED=$ac_cv_path_sed + PHP_SUBST(SED) AC_MSG_RESULT([$SED]) fi ]) Index: php4/configure.in diff -u php4/configure.in:1.384 php4/configure.in:1.385 --- php4/configure.in:1.384 Sun Oct 20 09:45:59 2002 +++ php4/configure.in Sun Oct 20 23:12:27 2002 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.384 2002/10/20 13:45:59 wez Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.385 2002/10/21 03:12:27 sniper Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -127,6 +127,9 @@ dnl check for -R, etc. switch PHP_RUNPATH_SWITCH +dnl check for working sed (disabled for now, waiting for comments) +dnl PHP_PROG_SED + AC_PROG_RANLIB AC_PROG_LN_S AC_PROG_AWK @@ -223,10 +226,7 @@ esyscmd(./scripts/config-stubs sapi) -if test "$PHP_SAPI" = "default"; then - PHP_SELECT_SAPI(cgi, program, cgi_main.c getopt.c,,'$(SAPI_CGI_PATH)') -fi - +dnl Show which main SAPI was selected AC_MSG_CHECKING([for chosen SAPI module]) AC_MSG_RESULT([$PHP_SAPI]) Index: php4/sapi/cgi/config9.m4 +++ php4/sapi/cgi/config9.m4 dnl dnl $Id: config9.m4,v 1.1 2002/10/21 03:12:27 sniper Exp $ dnl AC_ARG_ENABLE(cgi, [ --disable-cgi Disable building CGI version of PHP], [ PHP_SAPI_CGI=$enableval ],[ PHP_SAPI_CGI=yes ]) AC_ARG_ENABLE(force-cgi-redirect, [ --enable-force-cgi-redirect Enable the security check for internal server redirects. You should use this if you are running the CGI version with Apache.], [ PHP_FORCE_CGI_REDIRECT=$enableval ],[ PHP_FORCE_CGI_REDIRECT=no ]) AC_ARG_ENABLE(discard-path, [ --enable-discard-path If this is enabled, the PHP CGI binary can safely be placed outside of the web tree and people will not be able to circumvent .htaccess security.], [ PHP_DISCARD_PATH=$enableval ],[ PHP_DISCARD_PATH=no ]) AC_DEFUN(PHP_TEST_WRITE_STDOUT,[ AC_CACHE_CHECK(whether writing to stdout works,ac_cv_write_stdout,[ AC_TRY_RUN([ #ifdef HAVE_UNISTD_H #include #endif #define TEXT "This is the test message -- " main() { int n; n = write(1, TEXT, sizeof(TEXT)-1); return (!(n == sizeof(TEXT)-1)); } ],[ ac_cv_write_stdout=yes ],[ ac_cv_write_stdout=no ],[ ac_cv_write_stdout=no ]) ]) if test "$ac_cv_write_stdout" = "yes"; then AC_DEFINE(PHP_WRITE_STDOUT, 1, [whether write(2) works]) fi ]) if test "$PHP_SAPI" = "default"; then AC_MSG_CHECKING(for CGI build) if test "$PHP_SAPI_CGI" != "no"; then AC_MSG_RESULT(yes) PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/cgi/Makefile.frag) SAPI_CGI_PATH=sapi/cgi/php-cgi PHP_SUBST(SAPI_CGI_PATH) PHP_TEST_WRITE_STDOUT AC_MSG_CHECKING(whether to force Apache CGI redirect) if test "$PHP_FORCE_CGI_REDIRECT" = "yes"; then REDIRECT=1 else REDIRECT=0 fi AC_DEFINE_UNQUOTED(FORCE_CGI_REDIRECT,$REDIRECT,[ ]) AC_MSG_RESULT($PHP_FORCE_CGI_REDIRECT) AC_MSG_CHECKING(whether to discard path_info + path_translated) if test "$PHP_DISCARD_PATH" = "yes"; then DISCARD_PATH=1 else DISCARD_PATH=0
[PHP-CVS] cvs: php4 / acinclude.m4
sniper Sun Oct 20 23:31:52 2002 EDT Modified files: /php4 acinclude.m4 Log: remove the remains of that comment. Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.213 php4/acinclude.m4:1.214 --- php4/acinclude.m4:1.213 Sun Oct 20 23:12:27 2002 +++ php4/acinclude.m4 Sun Oct 20 23:31:52 2002 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.213 2002/10/21 03:12:27 sniper Exp $ +dnl $Id: acinclude.m4,v 1.214 2002/10/21 03:31:52 sniper Exp $ dnl dnl This file contains local autoconf functions. @@ -1777,7 +1777,6 @@ } _max=0 _count=0 - # along with /bin/sed that truncates output. for _sed in $_sed_list; do test ! -f ${_sed} && break cat /dev/null > "$tmp/sed.in" -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4 configure.in /sapi/cgiconfig.m4 config9.m4
On Sun, 20 Oct 2002, Jon Parise wrote: >On Mon, Oct 21, 2002 at 03:12:27AM -, Jani Taskinen wrote: > >> - # Add /usr/xpg4/bin/sed as it is typically found on Solaris >># along with /bin/sed that truncates output. > >Did you originally intend to remove both of these lines? Yes. :) --Jani -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 / acinclude.m4 configure.in /sapi/cgi config.m4 config9.m4
On Mon, Oct 21, 2002 at 03:12:27AM -, Jani Taskinen wrote: > - # Add /usr/xpg4/bin/sed as it is typically found on Solaris ># along with /bin/sed that truncates output. Did you originally intend to remove both of these lines? -- Jon Parise ([EMAIL PROTECTED]) :: The PHP Project (http://www.php.net/) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / acinclude.m4
sniper Wed Oct 16 12:21:17 2002 EDT Modified files: /php4 acinclude.m4 Log: - Fix typo.. # # Note: This is not used at all yet..waiting for comments first. :) # Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.211 php4/acinclude.m4:1.212 --- php4/acinclude.m4:1.211 Tue Oct 15 15:37:16 2002 +++ php4/acinclude.m4 Wed Oct 16 12:21:13 2002 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.211 2002/10/15 19:37:16 sniper Exp $ +dnl $Id: acinclude.m4,v 1.212 2002/10/16 16:21:13 sniper Exp $ dnl dnl This file contains local autoconf functions. @@ -1807,7 +1807,7 @@ done rm -rf "$tmp" ]) -if test -z "$SED"; then +if test -z "$ac_cv_path_sed"; then AC_MSG_ERROR([Could not find working sed on this system. Please install GNU sed.]) else SED=$ac_cv_path_sed -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / acinclude.m4
sniper Tue Oct 15 15:37:16 2002 EDT Modified files: /php4 acinclude.m4 Log: - Added PHP_PROG_SED which checks whether the sed in system works with very long strings. # # Sascha, is this okay? I added this here since any libtool/autoconf # release out there doesn't have this yet..we can remove this when # we can really start requiring such versions which have it? # # This sets $SED to the correct binary, so that should be used in # places were the lines might be very long. # Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.210 php4/acinclude.m4:1.211 --- php4/acinclude.m4:1.210 Wed Oct 2 08:52:53 2002 +++ php4/acinclude.m4 Tue Oct 15 15:37:16 2002 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.210 2002/10/02 12:52:53 helly Exp $ +dnl $Id: acinclude.m4,v 1.211 2002/10/15 19:37:16 sniper Exp $ dnl dnl This file contains local autoconf functions. @@ -1729,4 +1729,88 @@ IFS=$ac_IFS APACHE_VERSION=`expr [$]4 \* 100 + [$]5 \* 1000 + [$]6` +]) + +dnl PHP_PROG_SED +dnl +dnl Check for a fully-functional sed program, that truncates +dnl as few characters as possible. Prefer GNU sed if found. +dnl +dnl Based on LT_AC_PROG_SED (libtool CVS) +dnl +AC_DEFUN([PHP_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(ac_cv_path_sed, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH; do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do +if test -x "$as_dir/$ac_prog"; then + _sed_list="$_sed_list $as_dir/$ac_prog" +fi + done +done + + # Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} + +# Create a (secure) tmp directory for tmp files. +: ${TMPDIR=/tmp} +{ + tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=$TMPDIR/sed$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in $TMPDIR" >&2 + { (exit 1); exit 1; } +} + _max=0 + _count=0 + # Add /usr/xpg4/bin/sed as it is typically found on Solaris + # along with /bin/sed that truncates output. + for _sed in $_sed_list /usr/xpg4/bin/sed; do +test ! -f ${_sed} && break +cat /dev/null > "$tmp/sed.in" +_count=0 +echo -n "0123456789" >"$tmp/sed.in" +# Check for GNU sed and select it if it is found. +if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then + ac_cv_path_sed=${_sed} + break; +fi +while true; do + cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp" + mv "$tmp/sed.tmp" "$tmp/sed.in" + cp "$tmp/sed.in" "$tmp/sed.nl" + echo >>"$tmp/sed.nl" + ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break + cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break + # 1 chars as input seems more than enough + test $_count -gt 10 && break + _count=`expr $_count + 1` + if test $_count -gt $_max; then +_max=$_count +ac_cv_path_sed=$_sed + fi +done + done + rm -rf "$tmp" +]) +if test -z "$SED"; then + AC_MSG_ERROR([Could not find working sed on this system. Please install GNU sed.]) +else + SED=$ac_cv_path_sed + AC_MSG_RESULT([$SED]) +fi ]) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / acinclude.m4 configure.in
helly Wed Oct 2 08:52:54 2002 EDT Modified files: /php4 acinclude.m4 configure.in Log: Check for C99 conformance of snprintf. #This way we force using internal version if a broken library is used. #E.g. length parameter is broken, return value or default precision wrong. Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.209 php4/acinclude.m4:1.210 --- php4/acinclude.m4:1.209 Wed Oct 2 04:32:26 2002 +++ php4/acinclude.m4 Wed Oct 2 08:52:53 2002 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.209 2002/10/02 08:32:26 sas Exp $ +dnl $Id: acinclude.m4,v 1.210 2002/10/02 12:52:53 helly Exp $ dnl dnl This file contains local autoconf functions. @@ -1164,7 +1164,7 @@ ]) dnl -dnl Check for broken sprintf() +dnl Check for broken sprintf(), C99 conformance dnl AC_DEFUN(PHP_AC_BROKEN_SPRINTF,[ AC_CACHE_CHECK(whether sprintf is broken, ac_cv_broken_sprintf,[ @@ -1177,9 +1177,42 @@ ]) ]) if test "$ac_cv_broken_sprintf" = "yes"; then -AC_DEFINE(PHP_BROKEN_SPRINTF, 1, [ ]) +AC_DEFINE(PHP_BROKEN_SPRINTF, 1, [Whether sprintf is C99 conform]) else -AC_DEFINE(PHP_BROKEN_SPRINTF, 0, [ ]) +AC_DEFINE(PHP_BROKEN_SPRINTF, 0, [Whether sprintf is C99 conform]) + fi +]) + +dnl +dnl Check for broken snprintf(), C99 conformance +dnl +AC_DEFUN(PHP_AC_BROKEN_SNPRINTF,[ + AC_CACHE_CHECK(whether snprintf is broken, ac_cv_broken_snprintf,[ +AC_TRY_RUN([ +#define NULL (0L) +main() { + char buf[20]; + int res = 0; + res = res || (snprintf(buf, 2, "marcus") != 6); + res = res || (buf[1] != '\0'); + res = res || (snprintf(buf, 0, "boerger") != 7); + res = res || (buf[0] != 'm'); + res = res || (snprintf(NULL, 0, "boerger") != 7); + res = res || (snprintf(buf, sizeof(buf), "%f", 0.12345678) != 8); + exit(res); +} +],[ + ac_cv_broken_snprintf=no +],[ + ac_cv_broken_snprintf=yes +],[ + ac_cv_broken_snprintf=no +]) + ]) + if test "$ac_cv_broken_snprintf" = "yes"; then +AC_DEFINE(PHP_BROKEN_SNPRINTF, 1, [Whether snprintf is C99 conform]) + else +AC_DEFINE(PHP_BROKEN_SNPRINTF, 0, [Whether snprintf is C99 conform]) fi ]) Index: php4/configure.in diff -u php4/configure.in:1.376 php4/configure.in:1.377 --- php4/configure.in:1.376 Mon Sep 30 22:47:52 2002 +++ php4/configure.in Wed Oct 2 08:52:53 2002 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.376 2002/10/01 02:47:52 sniper Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.377 2002/10/02 12:52:53 helly Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -493,6 +493,7 @@ AC_FUNC_UTIME_NULL AC_FUNC_ALLOCA PHP_AC_BROKEN_SPRINTF +PHP_AC_BROKEN_SNPRINTF PHP_DECLARED_TIMEZONE PHP_TIME_R_TYPE PHP_READDIR_R_TYPE -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / acinclude.m4
sas Wed Oct 2 04:32:26 2002 EDT Modified files: /php4 acinclude.m4 Log: Another Linux x86 system returns ELIMIT so we need to check errno as well before assuming that pread/pwrite work. Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.208 php4/acinclude.m4:1.209 --- php4/acinclude.m4:1.208 Wed Oct 2 02:05:15 2002 +++ php4/acinclude.m4 Wed Oct 2 04:32:26 2002 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.208 2002/10/02 06:05:15 sas Exp $ +dnl $Id: acinclude.m4,v 1.209 2002/10/02 08:32:26 sas Exp $ dnl dnl This file contains local autoconf functions. @@ -380,6 +380,7 @@ #include #include #include +#include $1 main() { int fd = open("conftest_in", O_WRONLY|O_CREAT, 0600); @@ -387,7 +388,7 @@ if (fd < 0) exit(1); if (pwrite(fd, "text", 4, 0) != 4) exit(1); /* Linux glibc breakage until 2.2.5 */ -if (pwrite(fd, "text", 4, -1) != -1) exit(1); +if (pwrite(fd, "text", 4, -1) != -1 || errno != EINVAL) exit(1); exit(0); } @@ -407,6 +408,7 @@ #include #include #include +#include $1 main() { char buf[3]; @@ -414,7 +416,7 @@ if (fd < 0) exit(1); if (pread(fd, buf, 2, 0) != 2) exit(1); /* Linux glibc breakage until 2.2.5 */ -if (pread(fd, buf, 2, -1) != -1) exit(1); +if (pread(fd, buf, 2, -1) != -1 || errno != EINVAL) exit(1); exit(0); } ],[ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / acinclude.m4 /ext/session config.m4 mod_files.c
sas Wed Oct 2 02:05:16 2002 EDT Modified files: /php4 acinclude.m4 /php4/ext/session config.m4 mod_files.c Log: The pread/pwrite macros check for a bug in the Linux glibc now. The bug causes the kernel not to return -1/EAGAIN. The new test case has been borrowed from the Linux Test Project. This also fixes a bug which apparently caused HAVE_PREAD/WRITE to be defined even if the more complex checks failed (ac_cv_func_NAME=no was set albeit with no difference). Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.207 php4/acinclude.m4:1.208 --- php4/acinclude.m4:1.207 Sun Sep 29 20:03:09 2002 +++ php4/acinclude.m4 Wed Oct 2 02:05:15 2002 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.207 2002/09/30 00:03:09 sas Exp $ +dnl $Id: acinclude.m4,v 1.208 2002/10/02 06:05:15 sas Exp $ dnl dnl This file contains local autoconf functions. @@ -381,7 +381,16 @@ #include #include $1 -main() { return !(pwrite(open("conftest_in", O_WRONLY|O_CREAT, 0600), "hi", 2, 0) == 2); } +main() { +int fd = open("conftest_in", O_WRONLY|O_CREAT, 0600); + +if (fd < 0) exit(1); +if (pwrite(fd, "text", 4, 0) != 4) exit(1); +/* Linux glibc breakage until 2.2.5 */ +if (pwrite(fd, "text", 4, -1) != -1) exit(1); +exit(0); +} + ],[ ac_cv_pwrite=yes ],[ @@ -399,7 +408,15 @@ #include #include $1 -main() { char buf[3]; return !(pread(open("conftest_in", O_RDONLY), buf, 2, 0) == 2); } +main() { +char buf[3]; +int fd = open("conftest_in", O_RDONLY); +if (fd < 0) exit(1); +if (pread(fd, buf, 2, 0) != 2) exit(1); +/* Linux glibc breakage until 2.2.5 */ +if (pread(fd, buf, 2, -1) != -1) exit(1); +exit(0); +} ],[ ac_cv_pread=yes ],[ @@ -421,10 +438,12 @@ fi ]) - case $ac_cv_pwrite in - no) ac_cv_func_pwrite=no;; - 64) AC_DEFINE(PHP_PWRITE_64, 1, [whether pwrite64 is default]);; - esac + if test "$ac_cv_pwrite" != "no"; then +AC_DEFINE(HAVE_PWRITE, 1, [ ]) +if test "$ac_cv_pwrite" = "64"; then + AC_DEFINE(PHP_PWRITE_64, 1, [whether pwrite64 is default]) +fi + fi ]) AC_DEFUN(PHP_PREAD_TEST,[ @@ -438,10 +457,12 @@ fi ]) - case $ac_cv_pread in - no) ac_cv_func_pread=no;; - 64) AC_DEFINE(PHP_PREAD_64, 1, [whether pread64 is default]);; - esac + if test "$ac_cv_pread" != "no"; then +AC_DEFINE(HAVE_PREAD, 1, [ ]) +if test "$ac_cv_pread" = "64"; then + AC_DEFINE(PHP_PREAD_64, 1, [whether pread64 is default]) +fi + fi ]) AC_DEFUN(PHP_MISSING_TIME_R_DECL,[ Index: php4/ext/session/config.m4 diff -u php4/ext/session/config.m4:1.22 php4/ext/session/config.m4:1.23 --- php4/ext/session/config.m4:1.22 Fri Sep 6 06:27:26 2002 +++ php4/ext/session/config.m4 Wed Oct 2 02:05:16 2002 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.22 2002/09/06 10:27:26 sas Exp $ +dnl $Id: config.m4,v 1.23 2002/10/02 06:05:16 sas Exp $ dnl PHP_ARG_ENABLE(session, whether to enable PHP sessions, @@ -9,7 +9,6 @@ [ --with-mm[=DIR] Include mm support for session storage], no, no) if test "$PHP_SESSION" != "no"; then - AC_CHECK_FUNCS(pread pwrite) PHP_PWRITE_TEST PHP_PREAD_TEST PHP_NEW_EXTENSION(session, session.c mod_files.c mod_mm.c mod_user.c, $ext_shared) Index: php4/ext/session/mod_files.c diff -u php4/ext/session/mod_files.c:1.82 php4/ext/session/mod_files.c:1.83 --- php4/ext/session/mod_files.c:1.82 Tue Oct 1 15:19:10 2002 +++ php4/ext/session/mod_files.cWed Oct 2 02:05:16 2002 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: mod_files.c,v 1.82 2002/10/01 19:19:10 sas Exp $ */ +/* $Id: mod_files.c,v 1.83 2002/10/02 06:05:16 sas Exp $ */ #include "php.h" @@ -271,7 +271,7 @@ data->st_size = *vallen = sbuf.st_size; *val = emalloc(sbuf.st_size); -#if defined(HAVE_WORKING_PREAD_TEST) && defined(HAVE_PREAD) +#if defined(HAVE_PREAD) n = pread(data->fd, *val, sbuf.st_size, 0); #else lseek(data->fd, 0, SEEK_SET); @@ -307,7 +307,7 @@ if (vallen < (int)data->st_size) ftruncate(data->fd, 0); -#if defined(HAVE_WORKING_PWRITE_TEST) && defined(HAVE_PWRITE) +#if defined(HAVE_PWRITE) n = pwrite(data->fd, val, vallen, 0); #else lseek(data->fd, 0, SEEK_SET); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / acinclude.m4
sas Sun Sep 29 20:03:11 2002 EDT Modified files: /php4 acinclude.m4 Log: remove unused lines Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.206 php4/acinclude.m4:1.207 --- php4/acinclude.m4:1.206 Sun Sep 29 12:22:47 2002 +++ php4/acinclude.m4 Sun Sep 29 20:03:09 2002 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.206 2002/09/29 16:22:47 sas Exp $ +dnl $Id: acinclude.m4,v 1.207 2002/09/30 00:03:09 sas Exp $ dnl dnl This file contains local autoconf functions. @@ -1245,7 +1245,6 @@ PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,) EXT_STATIC="$EXT_STATIC $1" if test "$3" != "nocli"; then - EXT_CLI_LTLIBS="$EXT_CLI_LTLIBS $abs_builddir/$ext_builddir/lib$1.la" EXT_CLI_STATIC="$EXT_CLI_STATIC $1" fi else @@ -1265,7 +1264,6 @@ else PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cli) fi -EXT_CLI_LTLIBS="$EXT_CLI_LTLIBS $abs_builddir/$ext_builddir/lib$1.la" EXT_CLI_STATIC="$EXT_CLI_STATIC $1" fi PHP_ADD_BUILD_DIR($ext_builddir) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php