[PHP-CVS] cvs: php4(PHP_4_3) / acinclude.m4
sniper Mon Mar 31 18:21:56 2003 EDT Modified files: (Branch: PHP_4_3) /php4 acinclude.m4 Log: MFH: Fixed bug #22989 (sendmail not found by configure) Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.218.2.12 php4/acinclude.m4:1.218.2.13 --- php4/acinclude.m4:1.218.2.12Tue Mar 25 08:43:56 2003 +++ php4/acinclude.m4 Mon Mar 31 18:21:56 2003 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.218.2.12 2003/03/25 13:43:56 sniper Exp $ +dnl $Id: acinclude.m4,v 1.218.2.13 2003/03/31 23:21:56 sniper Exp $ dnl dnl This file contains local autoconf functions. @@ -686,7 +686,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(PHP_4_3) / acinclude.m4 configure.in
sniper Tue Mar 25 08:43:56 2003 EDT Modified files: (Branch: PHP_4_3) /php4 configure.in acinclude.m4 Log: MFH: Made --with-pear --disable-all-aware. Plus some cosmetics fixes. Index: php4/configure.in diff -u php4/configure.in:1.396.2.41 php4/configure.in:1.396.2.42 --- php4/configure.in:1.396.2.41Mon Mar 17 08:50:21 2003 +++ php4/configure.in Tue Mar 25 08:43:56 2003 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.396.2.41 2003/03/17 13:50:21 wez Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.396.2.42 2003/03/25 13:43:56 sniper Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -554,7 +554,7 @@ dnl General settings. dnl - - +PHP_CONFIGURE_PART(General settings) PHP_HELP_SEPARATOR([General settings:]) @@ -611,7 +611,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 $disable_cli != 1; then install_pear=install-pear Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.218.2.11 php4/acinclude.m4:1.218.2.12 --- php4/acinclude.m4:1.218.2.11Mon Mar 17 08:50:20 2003 +++ php4/acinclude.m4 Tue Mar 25 08:43:56 2003 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.218.2.11 2003/03/17 13:50:20 wez Exp $ +dnl $Id: acinclude.m4,v 1.218.2.12 2003/03/25 13:43:56 sniper Exp $ dnl dnl This file contains local autoconf functions. @@ -531,7 +531,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(PHP_4_3) / acinclude.m4 configure.in /main main.c safe_mode.c TSRM tsrm_virtual_cwd.c
wez Mon Mar 17 08:50:24 2003 EDT Modified files: (Branch: PHP_4_3) /php4 acinclude.m4 configure.in /TSRM tsrm_virtual_cwd.c /php4/main main.c safe_mode.c Log: MFH Fix for Bug #21310 Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.218.2.10 php4/acinclude.m4:1.218.2.11 --- php4/acinclude.m4:1.218.2.10Tue Mar 11 21:26:58 2003 +++ php4/acinclude.m4 Mon Mar 17 08:50:20 2003 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.218.2.10 2003/03/12 02:26:58 sniper Exp $ +dnl $Id: acinclude.m4,v 1.218.2.11 2003/03/17 13:50:20 wez Exp $ dnl dnl This file contains local autoconf functions. @@ -1446,6 +1446,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.396.2.40 php4/configure.in:1.396.2.41 --- php4/configure.in:1.396.2.40Wed Mar 12 17:21:25 2003 +++ php4/configure.in Mon Mar 17 08:50:21 2003 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.396.2.40 2003/03/12 22:21:25 sniper Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.396.2.41 2003/03/17 13:50:21 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.41.2.1 TSRM/tsrm_virtual_cwd.c:1.41.2.2 --- TSRM/tsrm_virtual_cwd.c:1.41.2.1Tue Dec 31 11:23:06 2002 +++ TSRM/tsrm_virtual_cwd.c Mon Mar 17 08:50:21 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: tsrm_virtual_cwd.c,v 1.41.2.1 2002/12/31 16:23:06 sebastian Exp $ */ +/* $Id: tsrm_virtual_cwd.c,v 1.41.2.2 2003/03/17 13:50:21 wez Exp $ */ #include sys/types.h #include sys/stat.h @@ -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); @@ -363,58 +366,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--; + } + +
[PHP-CVS] cvs: php4(PHP_4_3) / acinclude.m4
sniper Tue Mar 11 21:26:58 2003 EDT Modified files: (Branch: PHP_4_3) /php4 acinclude.m4 Log: MFH Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.218.2.9 php4/acinclude.m4:1.218.2.10 --- php4/acinclude.m4:1.218.2.9 Mon Mar 10 09:33:10 2003 +++ php4/acinclude.m4 Tue Mar 11 21:26:58 2003 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.218.2.9 2003/03/10 14:33:10 sniper Exp $ +dnl $Id: acinclude.m4,v 1.218.2.10 2003/03/12 02:26:58 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 egrep line itself -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) / acinclude.m4 configure.in
sniper Mon Mar 10 09:33:10 2003 EDT Modified files: (Branch: PHP_4_3) /php4 acinclude.m4 configure.in Log: - MFH: use shtool mkdir always. Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.218.2.8 php4/acinclude.m4:1.218.2.9 --- php4/acinclude.m4:1.218.2.8 Mon Feb 24 10:12:11 2003 +++ php4/acinclude.m4 Mon Mar 10 09:33:10 2003 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.218.2.8 2003/02/24 15:12:11 sniper Exp $ +dnl $Id: acinclude.m4,v 1.218.2.9 2003/03/10 14:33:10 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 21 +$php_shtool mkdir include Makefile.objects Makefile.fragments dnl We need to play tricks here to avoid matching the egrep line itself @@ -667,21 +667,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 21 -dnl `mkdir -p' must be quiet about creating existing directories -mkdir -p conftestdir/somedir /dev/null 21 -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 sys/types.h @@ -1274,10 +1259,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.396.2.37 php4/configure.in:1.396.2.38 --- php4/configure.in:1.396.2.37Fri Mar 7 01:18:27 2003 +++ php4/configure.in Mon Mar 10 09:33:10 2003 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.396.2.37 2003/03/07 06:18:27 sniper Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.396.2.38 2003/03/10 14:33:10 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 @@ -1177,10 +1177,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 FEO #include ../main/php_config.h -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) / acinclude.m4
sniper Sun Feb 23 23:37:15 2003 EDT Modified files: (Branch: PHP_4_3) /php4 acinclude.m4 Log: MFH Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.218.2.6 php4/acinclude.m4:1.218.2.7 --- php4/acinclude.m4:1.218.2.6 Mon Feb 10 12:12:16 2003 +++ php4/acinclude.m4 Sun Feb 23 23:37:15 2003 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.218.2.6 2003/02/10 17:12:16 sniper Exp $ +dnl $Id: acinclude.m4,v 1.218.2.7 2003/02/24 04:37:15 sniper Exp $ dnl dnl This file contains local autoconf functions. @@ -1107,7 +1107,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(PHP_4_3) / acinclude.m4 config.guess config.sub configure.in ltmain.sh
sniper Mon Feb 10 12:12:19 2003 EDT Modified files: (Branch: PHP_4_3) /php4 acinclude.m4 config.guess config.sub configure.in ltmain.sh Log: - MFH: libtool upgrade to 1.4.3 # For some reason those other files were not up-to-date in this branch.. Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.218.2.5 php4/acinclude.m4:1.218.2.6 --- php4/acinclude.m4:1.218.2.5 Fri Jan 3 17:07:05 2003 +++ php4/acinclude.m4 Mon Feb 10 12:12:16 2003 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.218.2.5 2003/01/03 22:07:05 alexwaugh Exp $ +dnl $Id: acinclude.m4,v 1.218.2.6 2003/02/10 17:12:16 sniper Exp $ dnl dnl This file contains local autoconf functions. @@ -1788,75 +1788,3 @@ 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 21 /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 -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/config.guess diff -u php4/config.guess:1.16 php4/config.guess:1.16.4.1 --- php4/config.guess:1.16 Thu Jul 4 04:21:31 2002 +++ php4/config.guess Mon Feb 10 12:12:16 2003 @@ -3,7 +3,7 @@ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002 Free Software Foundation, Inc. -timestamp='2002-05-29' +timestamp='2002-10-21' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -88,30 +88,40 @@ exit 1 fi +trap 'exit 1' 1 2 15 -dummy=dummy-$$ -trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. -# CC_FOR_BUILD -- compiler used by this script. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. -set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,)echo int dummy(){} $dummy.c ; +# This shell variable is my proudest work .. or something. --bje + +set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ; +(old=`umask` umask 077 mkdir $tmpdir umask $old unset old) + || (echo $me: cannot create $tmpdir 2 exit 1) ; +dummy=$tmpdir/dummy ; +files=$dummy.c $dummy.o $dummy.rel $dummy ; +trap '''rm -f $files; rmdir $tmpdir; exit 1''' 1 2 15 ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,)echo int x; $dummy.c ; for c in cc gcc c89 c99 ; do - ($c $dummy.c -c -o $dummy.o) /dev/null 21 ; - if test $? = 0 ; then + if ($c -c -o $dummy.o $dummy.c) /dev/null 21 ; then CC_FOR_BUILD=$c; break ; fi ; done ; - rm -f $dummy.c $dummy.o $dummy.rel ; + rm -f $files ; if test x$CC_FOR_BUILD = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac' +esac ; +unset files' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # ([EMAIL PROTECTED] 1994-08-24) @@ -221,6 +231,7 @@ # A Tn.n version is a
Re: [PHP-CVS] cvs: php4(PHP_4_3) / acinclude.m4
On Fri, Jan 03, 2003 at 10:07:06PM -, Alex Waugh wrote: alexwaugh Fri Jan 3 17:07:06 2003 EDT Modified files: (Branch: PHP_4_3) /php4 acinclude.m4 Log: MFH When merging code between branches, please include a revision number and an abbreviated commit message for reference. For example: MFH 1.224: cross-compiling fix -- 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
Re: [PHP-CVS] cvs: php4(PHP_4_3) / acinclude.m4
In message [EMAIL PROTECTED] Jon Parise [EMAIL PROTECTED] wrote: On Fri, Jan 03, 2003 at 10:07:06PM -, Alex Waugh wrote: alexwaugh Fri Jan 3 17:07:06 2003 EDT Modified files: (Branch: PHP_4_3) /php4 acinclude.m4 Log: MFH When merging code between branches, please include a revision number and an abbreviated commit message for reference. For example: MFH 1.224: cross-compiling fix OK, I'll try and remember next time. 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(PHP_4_3) / acinclude.m4 configure.in
iliaa Thu Jan 2 14:21:55 2003 EDT Modified files: (Branch: PHP_4_3) /php4 configure.in acinclude.m4 Log: MFH Index: php4/configure.in diff -u php4/configure.in:1.396.2.21 php4/configure.in:1.396.2.22 --- php4/configure.in:1.396.2.21Wed Jan 1 04:55:38 2003 +++ php4/configure.in Thu Jan 2 14:21:52 2003 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.396.2.21 2003/01/01 09:55:38 wez Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.396.2.22 2003/01/02 19:21:52 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.218.2.3 php4/acinclude.m4:1.218.2.4 --- php4/acinclude.m4:1.218.2.3 Wed Jan 1 04:55:38 2003 +++ php4/acinclude.m4 Thu Jan 2 14:21:53 2003 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.218.2.3 2003/01/01 09:55:38 wez Exp $ +dnl $Id: acinclude.m4,v 1.218.2.4 2003/01/02 19:21:53 iliaa Exp $ dnl dnl This file contains local autoconf functions. @@ -211,13 +211,13 @@ AC_MSG_CHECKING([for OpenSSL version]) AC_EGREP_CPP(yes,[ #include openssl/opensslv.h -#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
[PHP-CVS] cvs: php4(PHP_4_3) / acinclude.m4 configure.in /main streams.c
wez Wed Jan 1 04:55:38 2003 EDT Modified files: (Branch: PHP_4_3) /php4 acinclude.m4 configure.in /php4/main streams.c Log: Workaround a bug in glibc 2.2.9x and later that causes it not to seek to EOF for stdio streams opened with a mode of a+. Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.218.2.2 php4/acinclude.m4:1.218.2.3 --- php4/acinclude.m4:1.218.2.2 Sun Nov 17 14:28:57 2002 +++ php4/acinclude.m4 Wed Jan 1 04:55:38 2003 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.218.2.2 2002/11/17 19:28:57 wez Exp $ +dnl $Id: acinclude.m4,v 1.218.2.3 2003/01/01 09:55:38 wez Exp $ dnl dnl This file contains local autoconf functions. @@ -1461,6 +1461,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 stdio.h +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.396.2.20 php4/configure.in:1.396.2.21 --- php4/configure.in:1.396.2.20Fri Dec 27 17:11:40 2002 +++ php4/configure.in Wed Jan 1 04:55:38 2003 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.396.2.20 2002/12/27 22:11:40 edink Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.396.2.21 2003/01/01 09:55:38 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.125.2.24 php4/main/streams.c:1.125.2.25 --- php4/main/streams.c:1.125.2.24 Tue Dec 31 11:26:28 2002 +++ php4/main/streams.c Wed Jan 1 04:55:38 2003 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: streams.c,v 1.125.2.24 2002/12/31 16:26:28 sebastian Exp $ */ +/* $Id: streams.c,v 1.125.2.25 2003/01/01 09:55:38 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(PHP_4_3) / acinclude.m4 /main streams.c
wez Sun Nov 17 14:14:50 2002 EDT Modified files: (Branch: PHP_4_3) /php4 acinclude.m4 /php4/main streams.c Log: Fix fopencookie detection for newer versions of glibc. The GNU people strike again with their useless docs; fopencookie does NOT use fpos_t * as documented :/ Additionally, it appears that the the libio layer buffers in chunks of 8KB, so our test needs to exploit this in order to function correctly. Thanks to Derick for doing some groundwork. Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.218 php4/acinclude.m4:1.218.2.1 --- php4/acinclude.m4:1.218 Tue Oct 29 06:24:26 2002 +++ php4/acinclude.m4 Sun Nov 17 14:14:49 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.218.2.1 2002/11/17 19:14:49 wez Exp $ dnl dnl This file contains local autoconf functions. @@ -1487,16 +1487,16 @@ #include stdio.h struct cookiedata { - fpos_t pos; + __off64t 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, __off64t *position, int whence) { ((struct cookiedata*)cookie)-pos = *position; return 0; } cookie_io_functions_t funcs = {reader, writer, seeker, closer}; @@ -1505,13 +1505,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_off64t=yes ], [ ] ) else @@ -1532,8 +1532,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_off64t = yes ; then + AC_DEFINE(COOKIE_SEEKER_USES_OFF64T, 1, [ ]) fi fi Index: php4/main/streams.c diff -u php4/main/streams.c:1.125.2.10 php4/main/streams.c:1.125.2.11 --- php4/main/streams.c:1.125.2.10 Sat Nov 16 20:06:31 2002 +++ php4/main/streams.c Sun Nov 17 14:14:49 2002 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: streams.c,v 1.125.2.10 2002/11/17 01:06:31 wez Exp $ */ +/* $Id: streams.c,v 1.125.2.11 2002/11/17 19:14:49 wez Exp $ */ #define _GNU_SOURCE #include php.h @@ -1756,12 +1756,12 @@ return php_stream_write(((php_stream *)cookie), (char *)buffer, size); } -#ifdef COOKIE_SEEKER_USES_FPOS_T -static int stream_cookie_seeker(void *cookie, fpos_t *position, int whence) +#ifdef COOKIE_SEEKER_USES_OFF64T +static int stream_cookie_seeker(void *cookie, __off64t *position, int whence) { TSRMLS_FETCH(); - *position = php_stream_seek((php_stream *)cookie, *position, whence); + *position = php_stream_seek((php_stream *)cookie, (off_t)*position, whence); if (*position == -1) return -1; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) / acinclude.m4 /main streams.c
wez Sun Nov 17 14:28:57 2002 EDT Modified files: (Branch: PHP_4_3) /php4/main streams.c /php4 acinclude.m4 Log: s/off64t/off64_t/ Index: php4/main/streams.c diff -u php4/main/streams.c:1.125.2.11 php4/main/streams.c:1.125.2.12 --- php4/main/streams.c:1.125.2.11 Sun Nov 17 14:14:49 2002 +++ php4/main/streams.c Sun Nov 17 14:28:57 2002 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: streams.c,v 1.125.2.11 2002/11/17 19:14:49 wez Exp $ */ +/* $Id: streams.c,v 1.125.2.12 2002/11/17 19:28:57 wez Exp $ */ #define _GNU_SOURCE #include php.h @@ -1756,8 +1756,8 @@ return php_stream_write(((php_stream *)cookie), (char *)buffer, size); } -#ifdef COOKIE_SEEKER_USES_OFF64T -static int stream_cookie_seeker(void *cookie, __off64t *position, int whence) +#ifdef COOKIE_SEEKER_USES_OFF64_T +static int stream_cookie_seeker(void *cookie, __off64_t *position, int whence) { TSRMLS_FETCH(); Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.218.2.1 php4/acinclude.m4:1.218.2.2 --- php4/acinclude.m4:1.218.2.1 Sun Nov 17 14:14:49 2002 +++ php4/acinclude.m4 Sun Nov 17 14:28:57 2002 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.218.2.1 2002/11/17 19:14:49 wez Exp $ +dnl $Id: acinclude.m4,v 1.218.2.2 2002/11/17 19:28:57 wez Exp $ dnl dnl This file contains local autoconf functions. @@ -1487,7 +1487,7 @@ #include stdio.h struct cookiedata { - __off64t pos; + __off64_t pos; }; __ssize_t reader(void *cookie, char *buffer, size_t size) @@ -1496,7 +1496,7 @@ { return size; } int closer(void *cookie) { return 0; } -int seeker(void *cookie, __off64t *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}; @@ -1511,7 +1511,7 @@ } ], - [ cookie_io_functions_use_off64t=yes ], + [ cookie_io_functions_use_off64_t=yes ], [ ] ) else @@ -1532,8 +1532,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_off64t = yes ; then - AC_DEFINE(COOKIE_SEEKER_USES_OFF64T, 1, [ ]) + if test $cookie_io_functions_use_off64_t = yes ; then + AC_DEFINE(COOKIE_SEEKER_USES_OFF64_T, 1, [ ]) fi fi -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php