hholzgra Wed Oct 30 10:11:11 2002 EDT Modified files: /php4/ext/standard basic_functions.c config.m4 Log: getopt with long options reverted to configure problems (may find the wrong getopt.h so needed structures are not defined :( ) Index: php4/ext/standard/basic_functions.c diff -u php4/ext/standard/basic_functions.c:1.539 php4/ext/standard/basic_functions.c:1.540 --- php4/ext/standard/basic_functions.c:1.539 Tue Oct 29 18:35:49 2002 +++ php4/ext/standard/basic_functions.c Wed Oct 30 10:11:10 2002 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: basic_functions.c,v 1.539 2002/10/29 23:35:49 helly Exp $ */ +/* $Id: basic_functions.c,v 1.540 2002/10/30 15:11:10 hholzgra Exp $ */ #include "php.h" #include "php_streams.h" @@ -73,7 +73,7 @@ # include <sys/mman.h> #endif -#ifdef HAVE_GETOPT_H +#ifdef HARTMUT_0 #include <getopt.h> #endif @@ -1373,7 +1373,7 @@ } /* }}} */ -#ifdef HAVE_GETOPT_LONG +#ifdef HARTMUT_0 /* {{{ free_longopts Free the memory allocated to an longopt array. */ static void free_longopts(struct option *longopts) @@ -1400,7 +1400,7 @@ char *optname; int argc = 0, options_len = 0, o; zval *val, **args = NULL, *p_longopts = NULL; -#ifdef HAVE_GETOPT_LONG +#ifdef HARTMUT_0 struct option *longopts = NULL; int longindex = 0; #endif @@ -1451,7 +1451,7 @@ } if(p_longopts) { -#ifdef HAVE_GETOPT_LONG +#ifdef HARTMUT_0 int len, c = zend_hash_num_elements(Z_ARRVAL_P(p_longopts)); struct option *p; zval **arg; @@ -1505,7 +1505,7 @@ optind = 0; /* Invoke getopt(3) on the argument array. */ -#ifdef HAVE_GETOPT_LONG +#ifdef HARTMUT_0 while ((o = getopt_long(argc, argv, options, longopts, &longindex)) != -1) { #else while ((o = getopt(argc, argv, options)) != -1) { @@ -1517,7 +1517,7 @@ /* Prepare the option character and the argument string. */ if(o == 0) { -#ifdef HAVE_GETOPT_LONG +#ifdef HARTMUT_0 optname = (char *)longopts[longindex].name; #endif } else { @@ -1546,7 +1546,7 @@ } free_argv(argv, argc); -#ifdef HAVE_GETOPT_LONG +#ifdef HARTMUT_0 free_longopts(longopts); #endif } Index: php4/ext/standard/config.m4 diff -u php4/ext/standard/config.m4:1.46 php4/ext/standard/config.m4:1.47 --- php4/ext/standard/config.m4:1.46 Thu Oct 24 16:04:16 2002 +++ php4/ext/standard/config.m4 Wed Oct 30 10:11:11 2002 @@ -1,4 +1,4 @@ -dnl $Id: config.m4,v 1.46 2002/10/24 20:04:16 hholzgra Exp $ -*- sh -*- +dnl $Id: config.m4,v 1.47 2002/10/30 15:11:11 hholzgra Exp $ -*- sh -*- divert(3)dnl @@ -225,9 +225,13 @@ AC_FUNC_FNMATCH -AC_CHECK_HEADERS(getopt.h) +dnl getopt long options disabled for now +dnl as we can't be sure that we get the right getopt.h here +dnl using the standard AC_CHECK macros +dnl AC_CHECK_HEADERS(getopt.h) +dnl AC_CHECK_FUNCS(getopt_long getopt_long_only) -AC_CHECK_FUNCS(glob strfmon getopt_long getopt_long_only) +AC_CHECK_FUNCS(glob strfmon) if test "$PHP_SAPI" = "cgi"; then AC_DEFINE(ENABLE_CHROOT_FUNC, 1, [Whether to enable chroot() function])
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php