[PHP-CVS] cvs: php4 /ext/standard/tests/math hexdec.phpt

2002-11-17 Thread Marcus Boerger
helly   Sun Nov 17 04:27:48 2002 EDT

  Modified files:  
/php4/ext/standard/tests/math   hexdec.phpt 
  Log:
  Conversion fix by Michael Mauch
  
  
Index: php4/ext/standard/tests/math/hexdec.phpt
diff -u php4/ext/standard/tests/math/hexdec.phpt:1.2 
php4/ext/standard/tests/math/hexdec.phpt:1.3
--- php4/ext/standard/tests/math/hexdec.phpt:1.2Thu Oct  3 22:34:15 2002
+++ php4/ext/standard/tests/math/hexdec.phptSun Nov 17 04:27:48 2002
@@ -8,8 +8,8 @@
 var_dump(hexdec(q12345));
 var_dump(hexdec(12345+?!));
 var_dump(hexdec(12345q));
-var_dump(hexdec(123451));
-var_dump(hexdec(17fff));
+var_dump((float)hexdec(123451));
+var_dump((float)hexdec(17fff));
 
 ?
 --EXPECT--



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4(PHP_4_3) /ext/standard/tests/math hexdec.phpt

2002-11-17 Thread Marcus Boerger
helly   Sun Nov 17 04:28:56 2002 EDT

  Modified files:  (Branch: PHP_4_3)
/php4/ext/standard/tests/math   hexdec.phpt 
  Log:
  MFH: Conversion fix by Michael Mauch
  
  
Index: php4/ext/standard/tests/math/hexdec.phpt
diff -u php4/ext/standard/tests/math/hexdec.phpt:1.2 
php4/ext/standard/tests/math/hexdec.phpt:1.2.2.1
--- php4/ext/standard/tests/math/hexdec.phpt:1.2Thu Oct  3 22:34:15 2002
+++ php4/ext/standard/tests/math/hexdec.phptSun Nov 17 04:28:56 2002
@@ -8,8 +8,8 @@
 var_dump(hexdec(q12345));
 var_dump(hexdec(12345+?!));
 var_dump(hexdec(12345q));
-var_dump(hexdec(123451));
-var_dump(hexdec(17fff));
+var_dump((float)hexdec(123451));
+var_dump((float)hexdec(17fff));
 
 ?
 --EXPECT--



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4(PHP_4_3) /ext/gd/libgd gdft.c

2002-11-17 Thread Derick Rethans
derick  Sun Nov 17 08:10:37 2002 EDT

  Modified files:  (Branch: PHP_4_3)
/php4/ext/gd/libgd  gdft.c 
  Log:
  - Fix memory allocation problem in bundled GD (reported by Brian Havard)
  
  
Index: php4/ext/gd/libgd/gdft.c
diff -u php4/ext/gd/libgd/gdft.c:1.11 php4/ext/gd/libgd/gdft.c:1.11.2.1
--- php4/ext/gd/libgd/gdft.c:1.11   Tue Nov 12 08:12:58 2002
+++ php4/ext/gd/libgd/gdft.cSun Nov 17 08:10:36 2002
@@ -347,7 +347,7 @@
   FT_CharMap charmap;
 
   a = (font_t *) gdMalloc (sizeof (font_t));
-  a-fontlist = strdup (b-fontlist);
+  a-fontlist = estrdup (b-fontlist);
   a-library = b-library;
 
   /*
@@ -356,7 +356,7 @@
   fontsearchpath = getenv (GDFONTPATH);
   if (!fontsearchpath)
 fontsearchpath = DEFAULT_FONTPATH;
-  fontlist = strdup (a-fontlist);
+  fontlist = estrdup (a-fontlist);
 
   /*
* Must use gd_strtok_r else pointer corrupted by strtok in nested loop.
@@ -366,7 +366,7 @@
 {
 
   /* make a fresh copy each time - strtok corrupts it. */
-  path = strdup (fontsearchpath);
+  path = estrdup (fontsearchpath);
   /*
* Allocate an oversized buffer that is guaranteed to be
* big enough for all paths to be tested.



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/gd/libgd gdft.c

2002-11-17 Thread Derick Rethans
derick  Sun Nov 17 08:11:47 2002 EDT

  Modified files:  
/php4/ext/gd/libgd  gdft.c 
  Log:
  - MFB: Fix memory allocation problem in bundled GD (reported by Brian Havard)
  
  
Index: php4/ext/gd/libgd/gdft.c
diff -u php4/ext/gd/libgd/gdft.c:1.11 php4/ext/gd/libgd/gdft.c:1.12
--- php4/ext/gd/libgd/gdft.c:1.11   Tue Nov 12 08:12:58 2002
+++ php4/ext/gd/libgd/gdft.cSun Nov 17 08:11:46 2002
@@ -347,7 +347,7 @@
   FT_CharMap charmap;
 
   a = (font_t *) gdMalloc (sizeof (font_t));
-  a-fontlist = strdup (b-fontlist);
+  a-fontlist = estrdup (b-fontlist);
   a-library = b-library;
 
   /*
@@ -356,7 +356,7 @@
   fontsearchpath = getenv (GDFONTPATH);
   if (!fontsearchpath)
 fontsearchpath = DEFAULT_FONTPATH;
-  fontlist = strdup (a-fontlist);
+  fontlist = estrdup (a-fontlist);
 
   /*
* Must use gd_strtok_r else pointer corrupted by strtok in nested loop.
@@ -366,7 +366,7 @@
 {
 
   /* make a fresh copy each time - strtok corrupts it. */
-  path = strdup (fontsearchpath);
+  path = estrdup (fontsearchpath);
   /*
* Allocate an oversized buffer that is guaranteed to be
* big enough for all paths to be tested.



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /main main.c Zend zend.c zend.h zend_builtin_functions.c zend_execute.c zend_execute_API.c

2002-11-17 Thread Zeev Suraski
zeevSun Nov 17 08:26:37 2002 EDT

  Modified files:  
/Zend   zend.c zend.h zend_builtin_functions.c zend_execute.c 
zend_execute_API.c 
/php4/main  main.c 
  Log:
  Unify handling of error_reporting - fix bug #16137
  
  
Index: Zend/zend.c
diff -u Zend/zend.c:1.162 Zend/zend.c:1.163
--- Zend/zend.c:1.162   Fri Nov  1 17:19:55 2002
+++ Zend/zend.c Sun Nov 17 08:26:36 2002
@@ -59,6 +59,22 @@
 static int (*zend_get_configuration_directive_p)(char *name, uint name_length, zval 
*contents);
 
 
+static ZEND_INI_MH(OnUpdateErrorReporting)
+{
+   if (!new_value) {
+   EG(error_reporting) = E_ALL  ~E_NOTICE;
+   } else {
+   EG(error_reporting) = atoi(new_value);
+   }
+   return SUCCESS;
+}
+
+
+ZEND_INI_BEGIN()
+   ZEND_INI_ENTRY(error_reporting,   NULL,   
+ZEND_INI_ALL,   OnUpdateErrorReporting)
+ZEND_INI_END()
+
+
 #ifdef ZTS
 ZEND_API int compiler_globals_id;
 ZEND_API int executor_globals_id;
@@ -487,6 +503,14 @@
 #endif
 
return SUCCESS;
+}
+
+
+void zend_register_standard_ini_entries(TSRMLS_D)
+{
+   int module_number = 0;
+
+   REGISTER_INI_ENTRIES();
 }
 
 
Index: Zend/zend.h
diff -u Zend/zend.h:1.165 Zend/zend.h:1.166
--- Zend/zend.h:1.165   Thu Nov 14 00:41:32 2002
+++ Zend/zend.h Sun Nov 17 08:26:36 2002
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend.h,v 1.165 2002/11/14 05:41:32 sebastian Exp $ */
+/* $Id: zend.h,v 1.166 2002/11/17 13:26:36 zeev Exp $ */
 
 #ifndef ZEND_H
 #define ZEND_H
@@ -348,6 +348,7 @@
 
 int zend_startup(zend_utility_functions *utility_functions, char **extensions, int 
start_builtin_functions);
 void zend_shutdown(TSRMLS_D);
+void zend_register_standard_ini_entries(TSRMLS_D);
 
 #ifdef ZTS
 void zend_post_startup(TSRMLS_D);
Index: Zend/zend_builtin_functions.c
diff -u Zend/zend_builtin_functions.c:1.124 Zend/zend_builtin_functions.c:1.125
--- Zend/zend_builtin_functions.c:1.124 Mon Oct 21 04:42:32 2002
+++ Zend/zend_builtin_functions.c   Sun Nov 17 08:26:37 2002
@@ -22,7 +22,7 @@
 #include zend_API.h
 #include zend_builtin_functions.h
 #include zend_constants.h
-
+#include zend_ini.h
 #undef ZEND_TEST_EXCEPTIONS
 
 static ZEND_FUNCTION(zend_version);
@@ -398,8 +398,8 @@
if (zend_get_parameters_ex(1, arg) == FAILURE) {
RETURN_FALSE;
}
-   convert_to_long_ex(arg);
-   EG(error_reporting)=(*arg)-value.lval;
+   convert_to_string_ex(arg);
+   zend_alter_ini_entry(error_reporting, 
+sizeof(error_reporting), Z_STRVAL_PP(arg), Z_STRLEN_PP(arg), ZEND_INI_USER, 
+ZEND_INI_STAGE_RUNTIME);
break;
default:
ZEND_WRONG_PARAM_COUNT();
Index: Zend/zend_execute.c
diff -u Zend/zend_execute.c:1.316 Zend/zend_execute.c:1.317
--- Zend/zend_execute.c:1.316   Mon Nov 11 13:27:32 2002
+++ Zend/zend_execute.c Sun Nov 17 08:26:37 2002
@@ -31,6 +31,7 @@
 #include zend_extensions.h
 #include zend_fast_cache.h
 #include zend_execute_locks.h
+#include zend_ini.h
 
 #define get_zval_ptr(node, Ts, should_free, type) _get_zval_ptr(node, Ts, should_free 
TSRMLS_CC)
 #define get_zval_ptr_ptr(node, Ts, type) _get_zval_ptr_ptr(node, Ts TSRMLS_CC)
@@ -2424,10 +2425,16 @@
case ZEND_BEGIN_SILENCE:
EX(Ts)[EX(opline)-result.u.var].tmp_var.value.lval = 
EG(error_reporting);
EX(Ts)[EX(opline)-result.u.var].tmp_var.type = 
IS_LONG;  /* shouldn't be necessary */
-   EG(error_reporting) = 0;
+   zend_alter_ini_entry(error_reporting, 
+sizeof(error_reporting), 0, 1, ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME);
NEXT_OPCODE();
-   case ZEND_END_SILENCE:
-   EG(error_reporting) = 
EX(Ts)[EX(opline)-op1.u.var].tmp_var.value.lval;
+   case ZEND_END_SILENCE: {
+   zval restored_error_reporting;
+
+   restored_error_reporting.type = IS_LONG;
+   restored_error_reporting.value.lval = 
+EX(Ts)[EX(opline)-op1.u.var].tmp_var.value.lval;
+   convert_to_string(restored_error_reporting);
+   zend_alter_ini_entry(error_reporting, 
+sizeof(error_reporting), Z_STRVAL(restored_error_reporting), 
+Z_STRLEN(restored_error_reporting), ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME);
+   }
NEXT_OPCODE();
case ZEND_QM_ASSIGN: {
zval *value = get_zval_ptr(EX(opline)-op1, 
EX(Ts), 

[PHP-CVS] cvs: php4 /ext/gd/libgd gd.c

2002-11-17 Thread Derick Rethans
derick  Sun Nov 17 09:25:50 2002 EDT

  Modified files:  
/php4/ext/gd/libgd  gd.c 
  Log:
  - Fix compile problems for mips pro
  
  
Index: php4/ext/gd/libgd/gd.c
diff -u php4/ext/gd/libgd/gd.c:1.26 php4/ext/gd/libgd/gd.c:1.27
--- php4/ext/gd/libgd/gd.c:1.26 Thu Nov 14 10:08:39 2002
+++ php4/ext/gd/libgd/gd.c  Sun Nov 17 09:25:50 2002
@@ -3597,8 +3597,10 @@
 int gdImageSmooth(gdImagePtr im, float weight)
 {
float filter[3][3] ={{1.0,1.0,1.0},
-   {1.0,weight ,1.0},
+   {1.0,0.0,1.0},
{1.0,1.0,1.0}};
+   
+   filter[1][1] = weight;

return gdImageConvolution(im, filter, weight+8, 0);
 }



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 / NEWS

2002-11-17 Thread Ilia Alshanetsky
iliaa   Sun Nov 17 13:57:21 2002 EDT

  Modified files:  
/php4   NEWS 
  Log:
  Expat upgrade news.
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.1260 php4/NEWS:1.1261
--- php4/NEWS:1.1260Fri Nov 15 10:07:24 2002
+++ php4/NEWS   Sun Nov 17 13:57:21 2002
@@ -1,10 +1,11 @@
 PHP 4  NEWS
 |||
 ? ? ??? 200?, Version 4.4.0
+- Fixed bug #20442 (upgraded bunbled expat to 1.95.5). (Ilia)
 - Fixed bug #20424 (stream_get_meta_data craches on a normal file stream).
   (Derick, Wez)
 - Added imagefilter() function which allows application of various filters.
-  This function is only available with bundled GD. (Pierre-Alain Joye, Ilia)
+  This function is only available with bundled GD. (Pierre-Alain Joye, Ilia)  
 
 ? ? ??? 2002, Version 4.3.0
 - ATTENTION! make install will *by default* install the CLI SAPI binary in 



-- 
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

2002-11-17 Thread Wez Furlong
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

2002-11-17 Thread Wez Furlong
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




[PHP-CVS] cvs: php4(PHP_4_3) /ext/gd/libgd gdft.c gdhelpers.c gdhelpers.h

2002-11-17 Thread Derick Rethans
derick  Sun Nov 17 14:40:38 2002 EDT

  Modified files:  (Branch: PHP_4_3)
/php4/ext/gd/libgd  gdft.c gdhelpers.c gdhelpers.h 
  Log:
  - Fix memory problem for real this time.
  
  
Index: php4/ext/gd/libgd/gdft.c
diff -u php4/ext/gd/libgd/gdft.c:1.11.2.1 php4/ext/gd/libgd/gdft.c:1.11.2.2
--- php4/ext/gd/libgd/gdft.c:1.11.2.1   Sun Nov 17 08:10:36 2002
+++ php4/ext/gd/libgd/gdft.cSun Nov 17 14:40:38 2002
@@ -347,7 +347,7 @@
   FT_CharMap charmap;
 
   a = (font_t *) gdMalloc (sizeof (font_t));
-  a-fontlist = estrdup (b-fontlist);
+  a-fontlist = gdEstrdup (b-fontlist);
   a-library = b-library;
 
   /*
@@ -356,7 +356,7 @@
   fontsearchpath = getenv (GDFONTPATH);
   if (!fontsearchpath)
 fontsearchpath = DEFAULT_FONTPATH;
-  fontlist = estrdup (a-fontlist);
+  fontlist = gdEstrdup (a-fontlist);
 
   /*
* Must use gd_strtok_r else pointer corrupted by strtok in nested loop.
@@ -366,7 +366,7 @@
 {
 
   /* make a fresh copy each time - strtok corrupts it. */
-  path = estrdup (fontsearchpath);
+  path = gdEstrdup (fontsearchpath);
   /*
* Allocate an oversized buffer that is guaranteed to be
* big enough for all paths to be tested.
Index: php4/ext/gd/libgd/gdhelpers.c
diff -u php4/ext/gd/libgd/gdhelpers.c:1.3 php4/ext/gd/libgd/gdhelpers.c:1.3.2.1
--- php4/ext/gd/libgd/gdhelpers.c:1.3   Tue Nov 12 11:02:03 2002
+++ php4/ext/gd/libgd/gdhelpers.c   Sun Nov 17 14:40:38 2002
@@ -100,3 +100,9 @@
 {
   efree (ptr);
 }
+
+char *
+gdEstrdup (const char *ptr)
+{
+  return estrdup(ptr);
+}
Index: php4/ext/gd/libgd/gdhelpers.h
diff -u php4/ext/gd/libgd/gdhelpers.h:1.2 php4/ext/gd/libgd/gdhelpers.h:1.2.2.1
--- php4/ext/gd/libgd/gdhelpers.h:1.2   Tue Oct 29 18:08:01 2002
+++ php4/ext/gd/libgd/gdhelpers.h   Sun Nov 17 14:40:38 2002
@@ -14,6 +14,7 @@
 void *gdCalloc(size_t nmemb, size_t size);
 void *gdMalloc(size_t size);
 void *gdRealloc(void *ptr, size_t size);
+char *gdEstrdup(const char *ptr);
 
 #endif /* GDHELPERS_H */
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/gd/libgd gdft.c gdhelpers.c gdhelpers.h

2002-11-17 Thread Derick Rethans
derick  Sun Nov 17 14:45:10 2002 EDT

  Modified files:  
/php4/ext/gd/libgd  gdft.c gdhelpers.c gdhelpers.h 
  Log:
  - MFB
  
  
Index: php4/ext/gd/libgd/gdft.c
diff -u php4/ext/gd/libgd/gdft.c:1.12 php4/ext/gd/libgd/gdft.c:1.13
--- php4/ext/gd/libgd/gdft.c:1.12   Sun Nov 17 08:11:46 2002
+++ php4/ext/gd/libgd/gdft.cSun Nov 17 14:45:10 2002
@@ -347,7 +347,7 @@
   FT_CharMap charmap;
 
   a = (font_t *) gdMalloc (sizeof (font_t));
-  a-fontlist = estrdup (b-fontlist);
+  a-fontlist = gdEstrdup (b-fontlist);
   a-library = b-library;
 
   /*
@@ -356,7 +356,7 @@
   fontsearchpath = getenv (GDFONTPATH);
   if (!fontsearchpath)
 fontsearchpath = DEFAULT_FONTPATH;
-  fontlist = estrdup (a-fontlist);
+  fontlist = gdEstrdup (a-fontlist);
 
   /*
* Must use gd_strtok_r else pointer corrupted by strtok in nested loop.
@@ -366,7 +366,7 @@
 {
 
   /* make a fresh copy each time - strtok corrupts it. */
-  path = estrdup (fontsearchpath);
+  path = gdEstrdup (fontsearchpath);
   /*
* Allocate an oversized buffer that is guaranteed to be
* big enough for all paths to be tested.
Index: php4/ext/gd/libgd/gdhelpers.c
diff -u php4/ext/gd/libgd/gdhelpers.c:1.3 php4/ext/gd/libgd/gdhelpers.c:1.4
--- php4/ext/gd/libgd/gdhelpers.c:1.3   Tue Nov 12 11:02:03 2002
+++ php4/ext/gd/libgd/gdhelpers.c   Sun Nov 17 14:45:10 2002
@@ -100,3 +100,9 @@
 {
   efree (ptr);
 }
+
+char *
+gdEstrdup (const char *ptr)
+{
+  return estrdup(ptr);
+}
Index: php4/ext/gd/libgd/gdhelpers.h
diff -u php4/ext/gd/libgd/gdhelpers.h:1.2 php4/ext/gd/libgd/gdhelpers.h:1.3
--- php4/ext/gd/libgd/gdhelpers.h:1.2   Tue Oct 29 18:08:01 2002
+++ php4/ext/gd/libgd/gdhelpers.h   Sun Nov 17 14:45:10 2002
@@ -14,6 +14,7 @@
 void *gdCalloc(size_t nmemb, size_t size);
 void *gdMalloc(size_t size);
 void *gdRealloc(void *ptr, size_t size);
+char *gdEstrdup(const char *ptr);
 
 #endif /* GDHELPERS_H */
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/gd config.m4

2002-11-17 Thread Ilia Alshanetsky
iliaa   Sun Nov 17 15:18:45 2002 EDT

  Modified files:  
/php4/ext/gdconfig.m4 
  Log:
  A better gd =2.0.4 version check for non-bundled gd library.
  
  
Index: php4/ext/gd/config.m4
diff -u php4/ext/gd/config.m4:1.120 php4/ext/gd/config.m4:1.121
--- php4/ext/gd/config.m4:1.120 Tue Oct 29 20:05:15 2002
+++ php4/ext/gd/config.m4   Sun Nov 17 15:18:44 2002
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.120 2002/10/30 01:05:15 iliaa Exp $
+dnl $Id: config.m4,v 1.121 2002/11/17 20:18:44 iliaa Exp $
 dnl
 
 dnl
@@ -231,7 +231,6 @@
   PHP_CHECK_LIBRARY(gd, gdImageCreateFromXpm,   [AC_DEFINE(HAVE_GD_XPM,  
1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
   PHP_CHECK_LIBRARY(gd, gdImageCreateFromGd2,   [AC_DEFINE(HAVE_GD_GD2,  
1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
   PHP_CHECK_LIBRARY(gd, gdImageCreateTrueColor, [AC_DEFINE(HAVE_LIBGD20, 
1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
-  PHP_CHECK_LIBRARY(gd, gdFreeFontCache,   [AC_DEFINE(HAVE_LIBGD204,
1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
   PHP_CHECK_LIBRARY(gd, gdImageSetTile, [AC_DEFINE(HAVE_GD_IMAGESETTILE, 
1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
   PHP_CHECK_LIBRARY(gd, gdImageEllipse, [AC_DEFINE(HAVE_GD_IMAGEELLIPSE, 
1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
   PHP_CHECK_LIBRARY(gd, gdImageSetBrush,[AC_DEFINE(HAVE_GD_IMAGESETBRUSH,
1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
@@ -243,6 +242,15 @@
   PHP_CHECK_LIBRARY(gd, gdImageGifCtx,  [AC_DEFINE(HAVE_GD_GIF_CTX,  
1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
 ])
 
+dnl
+dnl Check for gd 2.0.4 greater availability
+dnl
+
+AC_TRY_COMPILE([
+ #include gd.h
+], [gdIOCtx *ctx; ctx-ctx.gd_free = 1;],[],
+[AC_DEFINE(HAVE_LIBGD204, 1, [ ])]
+)
 
 dnl
 dnl Main GD configure



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4(PHP_4_3) /ext/gd config.m4

2002-11-17 Thread Ilia Alshanetsky
iliaa   Sun Nov 17 15:19:28 2002 EDT

  Modified files:  (Branch: PHP_4_3)
/php4/ext/gdconfig.m4 
  Log:
  MFH
  
  
Index: php4/ext/gd/config.m4
diff -u php4/ext/gd/config.m4:1.120 php4/ext/gd/config.m4:1.120.2.1
--- php4/ext/gd/config.m4:1.120 Tue Oct 29 20:05:15 2002
+++ php4/ext/gd/config.m4   Sun Nov 17 15:19:28 2002
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.120 2002/10/30 01:05:15 iliaa Exp $
+dnl $Id: config.m4,v 1.120.2.1 2002/11/17 20:19:28 iliaa Exp $
 dnl
 
 dnl
@@ -231,7 +231,6 @@
   PHP_CHECK_LIBRARY(gd, gdImageCreateFromXpm,   [AC_DEFINE(HAVE_GD_XPM,  
1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
   PHP_CHECK_LIBRARY(gd, gdImageCreateFromGd2,   [AC_DEFINE(HAVE_GD_GD2,  
1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
   PHP_CHECK_LIBRARY(gd, gdImageCreateTrueColor, [AC_DEFINE(HAVE_LIBGD20, 
1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
-  PHP_CHECK_LIBRARY(gd, gdFreeFontCache,   [AC_DEFINE(HAVE_LIBGD204,
1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
   PHP_CHECK_LIBRARY(gd, gdImageSetTile, [AC_DEFINE(HAVE_GD_IMAGESETTILE, 
1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
   PHP_CHECK_LIBRARY(gd, gdImageEllipse, [AC_DEFINE(HAVE_GD_IMAGEELLIPSE, 
1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
   PHP_CHECK_LIBRARY(gd, gdImageSetBrush,[AC_DEFINE(HAVE_GD_IMAGESETBRUSH,
1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
@@ -243,6 +242,15 @@
   PHP_CHECK_LIBRARY(gd, gdImageGifCtx,  [AC_DEFINE(HAVE_GD_GIF_CTX,  
1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
 ])
 
+dnl
+dnl Check for gd 2.0.4 greater availability
+dnl
+
+AC_TRY_COMPILE([
+ #include gd.h
+], [gdIOCtx *ctx; ctx-ctx.gd_free = 1;],[],
+[AC_DEFINE(HAVE_LIBGD204, 1, [ ])]
+)
 
 dnl
 dnl Main GD configure



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: CVSROOT / avail

2002-11-17 Thread Rasmus Lerdorf
rasmus  Sun Nov 17 15:44:48 2002 EDT

  Modified files:  
/CVSROOTavail 
  Log:
  doc karma
  
  
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.539 CVSROOT/avail:1.540
--- CVSROOT/avail:1.539 Sat Nov 16 21:35:15 2002
+++ CVSROOT/avail   Sun Nov 17 15:44:48 2002
@@ -27,7 +27,7 @@
 # The PHP Documentation Group maintains the documentation and its
 # translations.
 
-avail|coldocean,alan_k,fleaslob,chad,torben,lynch,kk,ted,kwazy,aka,affinity,paul,skaag,pglat,mbritton,coar,lwest,joey,bibi,mrobinso,lwh,perugini,hamoralesr,tzwenny,hirokawa,drews,paulsen,hartmann,philross,leon,valdirh,dmarion,dubois,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,cris,goba,samesch,jon,soneca,kaufm,ronabop,glace,latoserver,phpguru_dk,lojmann,rafael,jan,jcmeloni,chrullrich,mk,sebastian,troels,mathieu,voize,phaethon,mgx,mj,corean,pandach,brown,cycle98,vizvil,openlife,regina,cynic,jpm,dams,alponce,menuconfig,obst,topgoods,karoora,pcraft,suvia,zak,zimt,mgx,sintoris,jmoore,ftfuture,uttam,ag315,ropik,jbi1979,bbonev,malo,afortaleza,neotron,cg,delrom,jkj,hellekin,kgergely,andreroq,eduardh,cnewbill,fuzzy74,inki,bjoern,fams,smasiello,dim,lucasr,cpereira,lagflores,kjh90,ernani,theseer,cevm,noribsd,eskaly,mctrash,berto,leobopp,tcr,subjective,ufux,virtual,fireclaw,hadar_p,asautins,dbenson,aleczapka,flaviobrito,mattias,tom,amiller,cortesi,lancelot_,irc-html,mkaufman,rarruda,j-f,betz,philip,alindeman,thyla,cucinato,jpsantos,zyprexia,tpug,ozgurakan,mitja,conni,sts,stefanhinz,georg,nmav,subbie,leszek,spheroid,joona,kjartno,slawek,nooboo,alan_dangelo,ae,ahambazaza,nohn,kaser01,visualmind,abohamam,stefan,kurtz,luk,tronic,moh,bernd,wilko,yohgaki,fujimoto,gerzson,webler,spooky,tinenie,cece,daniel,offs,boo,nhoizey,nogada,albaity,joerg,mazen,neil536t,maco,imajes,hakan,chief977,dwestfal,ott,shlomi,holev,raful,yuval,tomer,masterjy,barak,ido,mork,lior,gal,adiju,cr_depend,cyberowl,daniel.paul,florian,iulianphp,kappu,michelinux,muricaru,narcotic,dt,valy,critix,spg1et,ck,costra,fancao0515,rbenea,tibee,ins0mnia,eriksson,wenz,jaxler,volker,avaly,bernardojts,bs,phaser,tal,sander,matroz,thales,dorun,ave,adu,adamf1,figuric,katow,l30n4rd0,samih,mmeier,wentzel,scaro,amtd,aspinei,costello,coti,lmaxcar,lucaiacono,manuzhai,mcastro,sukamade,darvina,peter,maxim,adir,roland,romakhin,jmurin,n0nick,attila,sagi,kai,microbrain,rhheo,shimi,k.schroeder,djworld,emil,lboshell,netholic,dmitry83,machado,progcom,verdana,yincheng,surfmax,arzt,nicos,chregu,msopacua,bbd,cyril,gregory,hudzilla,klean,mignoni,wiesemann,xqi,mersal,zruya,sean,staybyte,daif,aber_sabeel,alzahrani,ayman_h,thomaslio,sfox,jippie,floripa,ahxiao,akcakayaa,allhibi,aner,black,class007,digo,dima,dorons,eshare,hpop1,itay,juppie,mrmatrix,saad,thomasgm,xbite,tobsn,jome,analytik,outsider,heymarcel,asmodean,bader,elmaystro,spic,truelight,gnuhacker,_batman_,sachat,dallas,dart,dejan,zer0fill,steve3d,lm92,bradmssw,tahani,victor,erica,simonh,phpman,mrphp,notarius,joseph,mmkhajah,mohammed,proton,klootz,takashima,leoca,ahmad,abobader,fboudot,wurm,hakawy,felix,ahmedss,mahrous2020,yorgo,gal_ga,feyge,abodive,ama,andras,hassen,jkhdk,okamura,popov,xman,fernandoc,avenger,hwin,tix,alrehawi_,liuming,ramysaweres,astone,shiflett,jaenecke,bdensley,adamchan,jingfs,murphy,potatotsang,the_q,jsheets,phpclub,xelis,adrianr,equerci,phpcatala,tofanini,umut|phpdoc,ZendAPI,phpdoc-ar,phpdoc-cs,phpdoc-de,phpdoc-es,phpdoc-fi,phpdoc-fr,phpdoc-he,phpdoc-hk,phpdoc-hu,phpdoc-it,phpdoc-ja,phpdoc-kr,phpdoc-nl,phpdoc-pl,phpdoc-pt_BR,phpdoc-ro,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-zh

[PHP-CVS] cvs: php4 /ext/xml/expat winconfig.h

2002-11-17 Thread Sebastian Bergmann
sebastian   Sun Nov 17 16:50:01 2002 EDT

  Modified files:  
/php4/ext/xml/expat winconfig.h 
  Log:
  Fix warning. HAVE_MEMMOVE is already defined in config.w32.h.
  
  
Index: php4/ext/xml/expat/winconfig.h
diff -u php4/ext/xml/expat/winconfig.h:1.3 php4/ext/xml/expat/winconfig.h:1.4
--- php4/ext/xml/expat/winconfig.h:1.3  Sun Nov 17 13:37:48 2002
+++ php4/ext/xml/expat/winconfig.h  Sun Nov 17 16:50:00 2002
@@ -25,6 +25,6 @@
 #define BYTEORDER 1234
 
 /* Windows has memmove() available. */
-#define HAVE_MEMMOVE
+/* #define HAVE_MEMMOVE */
 
 #endif /* ndef WINCONFIG_H */



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/gd config.m4

2002-11-17 Thread Ilia Alshanetsky
iliaa   Sun Nov 17 16:57:43 2002 EDT

  Modified files:  
/php4/ext/gdconfig.m4 
  Log:
  Fixed gd 2.0.4 check
  
  
Index: php4/ext/gd/config.m4
diff -u php4/ext/gd/config.m4:1.121 php4/ext/gd/config.m4:1.122
--- php4/ext/gd/config.m4:1.121 Sun Nov 17 15:18:44 2002
+++ php4/ext/gd/config.m4   Sun Nov 17 16:57:43 2002
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.121 2002/11/17 20:18:44 iliaa Exp $
+dnl $Id: config.m4,v 1.122 2002/11/17 21:57:43 iliaa Exp $
 dnl
 
 dnl
@@ -248,9 +248,10 @@
 
 AC_TRY_COMPILE([
  #include gd.h
-], [gdIOCtx *ctx; ctx-ctx.gd_free = 1;],[],
-[AC_DEFINE(HAVE_LIBGD204, 1, [ ])]
-)
+ #include stdlib.h
+], [gdIOCtx *ctx; ctx = malloc(sizeof(gdIOCtx)); ctx-gd_free = 1], 
+   AC_DEFINE(HAVE_LIBGD204, 1, [ ])
+])
 
 dnl
 dnl Main GD configure



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4(PHP_4_3) /ext/gd config.m4

2002-11-17 Thread Ilia Alshanetsky
iliaa   Sun Nov 17 16:58:12 2002 EDT

  Modified files:  (Branch: PHP_4_3)
/php4/ext/gdconfig.m4 
  Log:
  MFH
  
  
Index: php4/ext/gd/config.m4
diff -u php4/ext/gd/config.m4:1.120.2.1 php4/ext/gd/config.m4:1.120.2.2
--- php4/ext/gd/config.m4:1.120.2.1 Sun Nov 17 15:19:28 2002
+++ php4/ext/gd/config.m4   Sun Nov 17 16:58:12 2002
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.120.2.1 2002/11/17 20:19:28 iliaa Exp $
+dnl $Id: config.m4,v 1.120.2.2 2002/11/17 21:58:12 iliaa Exp $
 dnl
 
 dnl
@@ -248,9 +248,10 @@
 
 AC_TRY_COMPILE([
  #include gd.h
-], [gdIOCtx *ctx; ctx-ctx.gd_free = 1;],[],
-[AC_DEFINE(HAVE_LIBGD204, 1, [ ])]
-)
+ #include stdlib.h
+], [gdIOCtx *ctx; ctx = malloc(sizeof(gdIOCtx)); ctx-gd_free = 1], 
+   AC_DEFINE(HAVE_LIBGD204, 1, [ ])
+])
 
 dnl
 dnl Main GD configure



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /main main.c

2002-11-17 Thread Ilia Alshanetsky
iliaa   Sun Nov 17 17:52:47 2002 EDT

  Modified files:  
/php4/main  main.c 
  Log:
  Fixed bug #20466.
   
  
  
Index: php4/main/main.c
diff -u php4/main/main.c:1.513 php4/main/main.c:1.514
--- php4/main/main.c:1.513  Sun Nov 17 08:26:37 2002
+++ php4/main/main.cSun Nov 17 17:52:47 2002
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.513 2002/11/17 13:26:37 zeev Exp $ */
+/* $Id: main.c,v 1.514 2002/11/17 22:52:47 iliaa Exp $ */
 
 /* {{{ includes
  */
@@ -79,6 +79,7 @@
 #include zend_highlight.h
 #include zend_indent.h
 #include zend_extensions.h
+#include zend_ini.h
 
 #include php_content_types.h
 #include php_ticks.h
@@ -1544,7 +1545,7 @@
php_mb_set_zend_encoding(TSRMLS_C);
 #endif /* ZEND_MULTIBYTE  HAVE_MBSTRING */
zend_unset_timeout(TSRMLS_C);
-   zend_set_timeout(EG(timeout_seconds));
+   zend_set_timeout(INI_INT(max_execution_time));
retval = (zend_execute_scripts(ZEND_REQUIRE TSRMLS_CC, NULL, 3, 
prepend_file_p, primary_file, append_file_p) == SUCCESS);

if (old_primary_file_path) {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4(PHP_4_3) /main main.c

2002-11-17 Thread Ilia Alshanetsky
iliaa   Sun Nov 17 17:53:35 2002 EDT

  Modified files:  (Branch: PHP_4_3)
/php4/main  main.c 
  Log:
  MFH
  
  
Index: php4/main/main.c
diff -u php4/main/main.c:1.512.2.1 php4/main/main.c:1.512.2.2
--- php4/main/main.c:1.512.2.1  Sun Nov 17 08:32:43 2002
+++ php4/main/main.cSun Nov 17 17:53:35 2002
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.512.2.1 2002/11/17 13:32:43 zeev Exp $ */
+/* $Id: main.c,v 1.512.2.2 2002/11/17 22:53:35 iliaa Exp $ */
 
 /* {{{ includes
  */
@@ -79,6 +79,7 @@
 #include zend_highlight.h
 #include zend_indent.h
 #include zend_extensions.h
+#include zend_ini.h
 
 #include php_content_types.h
 #include php_ticks.h
@@ -1544,7 +1545,7 @@
php_mb_set_zend_encoding(TSRMLS_C);
 #endif /* ZEND_MULTIBYTE  HAVE_MBSTRING */
zend_unset_timeout(TSRMLS_C);
-   zend_set_timeout(EG(timeout_seconds));
+   zend_set_timeout(INI_INT(max_execution_time));
retval = (zend_execute_scripts(ZEND_REQUIRE TSRMLS_CC, NULL, 3, 
prepend_file_p, primary_file, append_file_p) == SUCCESS);

if (old_primary_file_path) {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4(PHP_4_3) /main php_streams.h streams.c

2002-11-17 Thread Wez Furlong
wez Sun Nov 17 18:08:41 2002 EDT

  Modified files:  (Branch: PHP_4_3)
/php4/main  php_streams.h streams.c 
  Log:
  Revise stream shutdown procedure.
  
  
Index: php4/main/php_streams.h
diff -u php4/main/php_streams.h:1.61.2.2 php4/main/php_streams.h:1.61.2.3
--- php4/main/php_streams.h:1.61.2.2Sat Nov 16 17:59:55 2002
+++ php4/main/php_streams.h Sun Nov 17 18:08:40 2002
@@ -329,6 +329,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)
Index: php4/main/streams.c
diff -u php4/main/streams.c:1.125.2.12 php4/main/streams.c:1.125.2.13
--- php4/main/streams.c:1.125.2.12  Sun Nov 17 14:28:57 2002
+++ php4/main/streams.c Sun Nov 17 18:08:40 2002
@@ -20,7 +20,7 @@
+--+
  */
 
-/* $Id: streams.c,v 1.125.2.12 2002/11/17 19:28:57 wez Exp $ */
+/* $Id: streams.c,v 1.125.2.13 2002/11/17 23:08:40 wez Exp $ */
 
 #define _GNU_SOURCE
 #include php.h
@@ -242,24 +242,55 @@
 PHPAPI int _php_stream_free(php_stream *stream, int close_options TSRMLS_DC) /* {{{ */
 {
int ret = 1;
+   int remove_rsrc = 1;
+   int preserve_handle = close_options  PHP_STREAM_FREE_PRESERVE_HANDLE ? 1 : 0;
+   int release_cast = 1;
 
 #if STREAM_DEBUG
 fprintf(stderr, stream_free: %s:%p[%s] in_free=%d opts=%08x\n, stream-ops-label, 
stream, stream-__orig_path, stream-in_free, close_options);
 #endif

+   /* recursion protection */
if (stream-in_free)
return 1;
 
stream-in_free++;
 
-   _php_stream_flush(stream, 1 TSRMLS_CC);
+   /* if we are releasing the stream only (and preserving the underlying handle),
+* we need to do things a little differently.
+* We are only ever called like this when the stream is cast to a FILE*
+* for include (or other similar) purposes.
+* */
+   if (preserve_handle) {
+   if (stream-fclose_stdiocast == PHP_STREAM_FCLOSE_FOPENCOOKIE) {
+   /* If the stream was fopencookied, we must NOT touch anything
+* here, as the cookied stream relies on it all.
+* Instead, mark the stream as OK to auto-clean */
+   php_stream_auto_cleanup(stream);
+   stream-in_free--;
+   return 0;
+   }
+   /* otherwise, make sure that we don't close the FILE* from a cast */
+   release_cast = 0;
+   }
+
+#if STREAM_DEBUG
+fprintf(stderr, stream_free: %s:%p[%s] preserve_handle=%d release_cast=%d 
+remove_rsrc=%d\n,
+   stream-ops-label, stream, stream-__orig_path, preserve_handle, 
+release_cast, remove_rsrc);
+#endif

-   if ((close_options  PHP_STREAM_FREE_RSRC_DTOR) == 0) {
-   /* Remove entry from the resource list */
+   /* make sure everything is saved */
+   _php_stream_flush(stream, 1 TSRMLS_CC);
+   
+   /* If not called from the resource dtor, remove the stream
+ * from the resource list.
+* */
+   if ((close_options  PHP_STREAM_FREE_RSRC_DTOR) == 0  remove_rsrc) {
zend_list_delete(stream-rsrc_id);
}
+   
if (close_options  PHP_STREAM_FREE_CALL_DTOR) {
-   if (stream-fclose_stdiocast == PHP_STREAM_FCLOSE_FOPENCOOKIE) {
+   if (release_cast  stream-fclose_stdiocast == 
+PHP_STREAM_FCLOSE_FOPENCOOKIE) {
/* calling fclose on an fopencookied stream will ultimately
call this very same function.  If we were called via 
fclose,
the cookie_closer unsets the fclose_stdiocast flags, so
@@ -271,13 +302,14 @@
return fclose(stream-stdiocast);
}
 
-   ret = stream-ops-close(stream, close_options  
PHP_STREAM_FREE_PRESERVE_HANDLE ? 0 : 1 TSRMLS_CC);
+   ret = stream-ops-close(stream, preserve_handle ? 0 : 1 TSRMLS_CC);
stream-abstract = NULL;
 
/* tidy up any FILE* that might have been fdopened */
-   if (stream-fclose_stdiocast == PHP_STREAM_FCLOSE_FDOPEN  
stream-stdiocast) {
+   if (release_cast  stream-fclose_stdiocast == 
+PHP_STREAM_FCLOSE_FDOPEN  

[PHP-CVS] cvs: php4(PHP_4_3) /main php_streams.h

2002-11-17 Thread Wez Furlong
wez Sun Nov 17 18:16:46 2002 EDT

  Modified files:  (Branch: PHP_4_3)
/php4/main  php_streams.h 
  Log:
  Add missing Id tag.
  
  
Index: php4/main/php_streams.h
diff -u php4/main/php_streams.h:1.61.2.3 php4/main/php_streams.h:1.61.2.4
--- php4/main/php_streams.h:1.61.2.3Sun Nov 17 18:08:40 2002
+++ php4/main/php_streams.h Sun Nov 17 18:16:45 2002
@@ -16,6 +16,8 @@
+--+
  */
 
+/* $Id: php_streams.h,v 1.61.2.4 2002/11/17 23:16:45 wez Exp $ */
+
 #ifndef PHP_STREAMS_H
 #define PHP_STREAMS_H
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/gd config.m4

2002-11-17 Thread Jani Taskinen
sniper  Sun Nov 17 19:41:27 2002 EDT

  Modified files:  
/php4/ext/gdconfig.m4 
  Log:
  Fix the test. (and indented it for easier bug spotting :)
  
  
Index: php4/ext/gd/config.m4
diff -u php4/ext/gd/config.m4:1.122 php4/ext/gd/config.m4:1.123
--- php4/ext/gd/config.m4:1.122 Sun Nov 17 16:57:43 2002
+++ php4/ext/gd/config.m4   Sun Nov 17 19:41:27 2002
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.122 2002/11/17 21:57:43 iliaa Exp $
+dnl $Id: config.m4,v 1.123 2002/11/18 00:41:27 sniper Exp $
 dnl
 
 dnl
@@ -246,11 +246,16 @@
 dnl Check for gd 2.0.4 greater availability
 dnl
 
-AC_TRY_COMPILE([
- #include gd.h
- #include stdlib.h
-], [gdIOCtx *ctx; ctx = malloc(sizeof(gdIOCtx)); ctx-gd_free = 1], 
-   AC_DEFINE(HAVE_LIBGD204, 1, [ ])
+AC_TRY_COMPILE(
+[
+#include gd.h
+#include stdlib.h
+], [
+gdIOCtx *ctx;
+ctx = malloc(sizeof(gdIOCtx));
+ctx-gd_free = 1;
+], [
+  AC_DEFINE(HAVE_LIBGD204, 1, [ ])
 ])
 
 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) /ext/gd config.m4

2002-11-17 Thread Jani Taskinen
sniper  Sun Nov 17 19:43:48 2002 EDT

  Modified files:  (Branch: PHP_4_3)
/php4/ext/gdconfig.m4 
  Log:
  MFH
  
  
Index: php4/ext/gd/config.m4
diff -u php4/ext/gd/config.m4:1.120.2.2 php4/ext/gd/config.m4:1.120.2.3
--- php4/ext/gd/config.m4:1.120.2.2 Sun Nov 17 16:58:12 2002
+++ php4/ext/gd/config.m4   Sun Nov 17 19:43:48 2002
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.120.2.2 2002/11/17 21:58:12 iliaa Exp $
+dnl $Id: config.m4,v 1.120.2.3 2002/11/18 00:43:48 sniper Exp $
 dnl
 
 dnl
@@ -246,11 +246,16 @@
 dnl Check for gd 2.0.4 greater availability
 dnl
 
-AC_TRY_COMPILE([
- #include gd.h
- #include stdlib.h
-], [gdIOCtx *ctx; ctx = malloc(sizeof(gdIOCtx)); ctx-gd_free = 1], 
-   AC_DEFINE(HAVE_LIBGD204, 1, [ ])
+AC_TRY_COMPILE(
+[
+#include gd.h
+#include stdlib.h
+], [
+gdIOCtx *ctx;
+ctx = malloc(sizeof(gdIOCtx));
+ctx-gd_free = 1;
+], [
+  AC_DEFINE(HAVE_LIBGD204, 1, [ ])
 ])
 
 dnl



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: CVSROOT / avail

2002-11-17 Thread Andrei Zmievski
andrei  Sun Nov 17 19:54:54 2002 EDT

  Modified files:  
/CVSROOTavail 
  Log:
  Edin needs to update qaweb with RC info.
  
  
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.540 CVSROOT/avail:1.541
--- CVSROOT/avail:1.540 Sun Nov 17 15:44:48 2002
+++ CVSROOT/avail   Sun Nov 17 19:54:54 2002
@@ -41,7 +41,7 @@
 
 # The PHP Quality Assurance Team maintains their own website.
 
-avail|jalal,zak,andre,ultrapingo,lyric,jmoore,ronabop,sebastian,joey,sniper,torben,hellekin,cnewbill,bate,yohgaki,jan,imajes,derick,paulr,msopacua,nohn|qaweb
+avail|jalal,zak,andre,ultrapingo,lyric,jmoore,ronabop,sebastian,joey,sniper,torben,hellekin,cnewbill,bate,yohgaki,jan,imajes,derick,paulr,msopacua,nohn,edink|qaweb
 
 # The PEAR Team has access to the full PEAR tree, the PEAR portion of
 # the PHP 4 tree, the PEAR website, and the PEAR documentation.



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /main SAPI.c SAPI.h main.c php_main.h

2002-11-17 Thread George Schlossnagle
gschlossnagle   Sun Nov 17 19:59:23 2002 EDT

  Modified files:  
/php4/main  main.c php_main.h SAPI.c SAPI.h 
  Log:
  added support functions for the apache_hooks SAPI
  
  
Index: php4/main/main.c
diff -u php4/main/main.c:1.514 php4/main/main.c:1.515
--- php4/main/main.c:1.514  Sun Nov 17 17:52:47 2002
+++ php4/main/main.cSun Nov 17 19:59:23 2002
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.514 2002/11/17 22:52:47 iliaa Exp $ */
+/* $Id: main.c,v 1.515 2002/11/18 00:59:23 gschlossnagle Exp $ */
 
 /* {{{ includes
  */
@@ -811,8 +811,39 @@
 
 static int php_hash_environment(TSRMLS_D);
 
+/* {{{ php_start_sapi()
+ */
+static int php_start_sapi()
+{
+int retval = SUCCESS;
+
+if(!SG(sapi_started)) {
+zend_try {
+PG(during_request_startup) = 1;
+
+/* initialize global variables */
+PG(modules_activated) = 0;
+PG(header_is_being_sent) = 0;
+PG(connection_status) = PHP_CONNECTION_NORMAL;
+
+zend_activate(TSRMLS_C);
+zend_set_timeout(EG(timeout_seconds));
+zend_activate_modules(TSRMLS_C);
+PG(modules_activated)=1;
+} zend_catch {
+retval = FAILURE;
+} zend_end_try();
+
+SG(sapi_started) = 1;
+}
+return retval;
+}
+
+/* }}} */
+
 /* {{{ php_request_startup
  */
+ #ifndef APACHE_HOOKS
 int php_request_startup(TSRMLS_D)
 {
int retval = SUCCESS;
@@ -868,6 +899,56 @@
 
return retval;
 }
+# else
+int php_request_startup(TSRMLS_D)
+{   
+int retval = SUCCESS;
+
+#if PHP_SIGCHILD
+signal(SIGCHLD, sigchld_handler);
+#endif
+
+if (php_start_sapi() == FAILURE)
+return FAILURE;
+
+php_output_activate(TSRMLS_C);
+sapi_activate(TSRMLS_C);
+php_hash_environment(TSRMLS_C);
+
+zend_try {
+PG(during_request_startup) = 1;
+php_output_activate(TSRMLS_C);
+if (PG(expose_php)) {
+sapi_add_header(SAPI_PHP_VERSION_HEADER, 
+sizeof(SAPI_PHP_VERSION_HEADER)-1, 1);
+}
+} zend_catch {
+retval = FAILURE;
+} zend_end_try();
+
+return retval;
+}
+# endif
+/* }}} */
+
+/* {{{ php_request_startup_for_hook
+ */
+int php_request_startup_for_hook(TSRMLS_D)
+{
+int retval = SUCCESS;
+
+#if PHP_SIGCHLD
+signal(SIGCHLD, sigchld_handler);
+#endif
+
+if (php_start_sapi() == FAILURE)
+return FAILURE;
+
+php_output_activate(TSRMLS_C);
+sapi_activate_headers_only(TSRMLS_C);
+php_hash_environment(TSRMLS_C);
+
+return retval;
+}
 /* }}} */
 
 /* {{{ php_request_shutdown_for_exec
@@ -882,6 +963,44 @@
 }
 /* }}} */
 
+/* {{{ php_request_shutdown_for_hook
+ */
+void php_request_shutdown_for_hook(void *dummy)
+{
+TSRMLS_FETCH();
+if (PG(modules_activated)) zend_try {
+php_call_shutdown_functions();
+} zend_end_try();
+
+if (PG(modules_activated)) {
+zend_deactivate_modules(TSRMLS_C);
+}
+
+zend_try {
+int i;
+
+for (i = 0; i  NUM_TRACK_VARS; i++) {
+zval_ptr_dtor(PG(http_globals)[i]);
+}
+} zend_end_try();
+
+zend_deactivate(TSRMLS_C);
+
+zend_try {
+sapi_deactivate(TSRMLS_C);
+} zend_end_try();
+
+zend_try {
+shutdown_memory_manager(CG(unclean_shutdown), 0);
+} zend_end_try();
+
+zend_try {
+zend_unset_timeout(TSRMLS_C);
+} zend_end_try();
+}
+
+/* }}} */
+
 /* {{{ php_request_shutdown
  */
 void php_request_shutdown(void *dummy)
@@ -1559,6 +1678,41 @@
}
free_alloca(old_cwd);
return retval;
+}
+/* }}} */
+
+/* {{{ php_execute_simple_script
+ */
+PHPAPI int php_execute_simple_script(zend_file_handle *primary_file, zval **ret 
+TSRMLS_DC)
+{
+char *old_cwd;
+
+EG(exit_status) = 0;
+#define OLD_CWD_SIZE 4096
+old_cwd = do_alloca(OLD_CWD_SIZE);
+old_cwd[0] = '\0';
+
+zend_try {
+#ifdef PHP_WIN32
+UpdateIniFromRegistry(primary_file-filename TSRMLS_CC);
+#endif
+
+PG(during_request_startup) = 0;
+
+if (primary_file-type == ZEND_HANDLE_FILENAME
+ primary_file-filename) {
+VCWD_GETCWD(old_cwd, OLD_CWD_SIZE-1);
+VCWD_CHDIR_FILE(primary_file-filename);
+}
+zend_execute_scripts(ZEND_REQUIRE TSRMLS_CC, ret, 1, primary_file);
+} zend_end_try();
+
+if (old_cwd[0] != '\0') {
+VCWD_CHDIR(old_cwd);
+}
+
+free_alloca(old_cwd);
+return EG(exit_status);
 }
 /* }}} */
 
Index: php4/main/php_main.h
diff -u php4/main/php_main.h:1.23 php4/main/php_main.h:1.24
--- php4/main/php_main.h:1.23   Wed Sep 18 17:57:29 2002
+++ php4/main/php_main.hSun Nov 17 19:59:23 2002
@@ -18,7 +18,7 @@
  */
 
 
-/* $Id: php_main.h,v 1.23 2002/09/18 21:57:29 zeev Exp $ */
+/* $Id: php_main.h,v 1.24 2002/11/18 00:59:23 gschlossnagle Exp $ */
 
 
 #ifndef PHP_MAIN_H
@@ -39,6 +39,7 @@
 PHPAPI 

[PHP-CVS] cvs: php4 /ext/xml/expat xmlparse.c

2002-11-17 Thread Ilia Alshanetsky
iliaa   Sun Nov 17 21:30:27 2002 EDT

  Modified files:  
/php4/ext/xml/expat xmlparse.c 
  Log:
  Removed duplicate php_compat.h include.
  
  
Index: php4/ext/xml/expat/xmlparse.c
diff -u php4/ext/xml/expat/xmlparse.c:1.6 php4/ext/xml/expat/xmlparse.c:1.7
--- php4/ext/xml/expat/xmlparse.c:1.6   Sun Nov 17 16:29:16 2002
+++ php4/ext/xml/expat/xmlparse.c   Sun Nov 17 21:30:27 2002
@@ -625,7 +625,6 @@
 
 #define parsing (processor != prologInitProcessor)
 
-#include php_compat.h
 
 XML_Parser
 XML_ParserCreate(const XML_Char *encodingName)



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4(PHP_4_3) /ext/standard browscap.c

2002-11-17 Thread Ilia Alshanetsky
iliaa   Sun Nov 17 22:16:46 2002 EDT

  Modified files:  (Branch: PHP_4_3)
/php4/ext/standard  browscap.c 
  Log:
  MFH
  
  
Index: php4/ext/standard/browscap.c
diff -u php4/ext/standard/browscap.c:1.60 php4/ext/standard/browscap.c:1.60.2.1
--- php4/ext/standard/browscap.c:1.60   Mon Oct 14 14:13:18 2002
+++ php4/ext/standard/browscap.cSun Nov 17 22:16:45 2002
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: browscap.c,v 1.60 2002/10/14 18:13:18 iliaa Exp $ */
+/* $Id: browscap.c,v 1.60.2.1 2002/11/18 03:16:45 iliaa Exp $ */
 
 #include php.h
 #include php_regex.h
@@ -58,7 +58,7 @@
return;
}
 
-   t = (char *) malloc(Z_STRLEN_P(pattern)*2);
+   t = (char *) malloc(Z_STRLEN_P(pattern)*2 + 1);

for (i=0, j=0; iZ_STRLEN_P(pattern); i++, j++) {
switch (Z_STRVAL_P(pattern)[i]) {
@@ -78,6 +78,11 @@
break;
}
}
+   
+   if (j  (t[j-1] == '.')) {
+   t[j++] = '*';
+   }
+   
t[j]=0;
Z_STRVAL_P(pattern) = t;
Z_STRLEN_P(pattern) = j;



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4(PHP_4_3) /ext/standard browscap.c

2002-11-17 Thread Jani Taskinen
sniper  Sun Nov 17 22:24:33 2002 EDT

  Modified files:  (Branch: PHP_4_3)
/php4/ext/standard  browscap.c 
  Log:
  MFH: Added error message if browscap location is not set in php.ini
  
  
Index: php4/ext/standard/browscap.c
diff -u php4/ext/standard/browscap.c:1.60.2.1 php4/ext/standard/browscap.c:1.60.2.2
--- php4/ext/standard/browscap.c:1.60.2.1   Sun Nov 17 22:16:45 2002
+++ php4/ext/standard/browscap.cSun Nov 17 22:24:33 2002
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: browscap.c,v 1.60.2.1 2002/11/18 03:16:45 iliaa Exp $ */
+/* $Id: browscap.c,v 1.60.2.2 2002/11/18 03:24:33 sniper Exp $ */
 
 #include php.h
 #include php_regex.h
@@ -220,6 +220,7 @@
char *lookup_browser_name;
 
if (!INI_STR(browscap)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, browscap ini directive 
+not set.);
RETURN_FALSE;
}




-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/qtdom config.m4

2002-11-17 Thread Jani Taskinen
sniper  Mon Nov 18 00:06:02 2002 EDT

  Modified files:  
/php4/ext/qtdom config.m4 
  Log:
  Fixed bug: #20458 (--with-qtdom=shared broken)
  
  
Index: php4/ext/qtdom/config.m4
diff -u php4/ext/qtdom/config.m4:1.10 php4/ext/qtdom/config.m4:1.11
--- php4/ext/qtdom/config.m4:1.10   Wed Oct  9 15:27:11 2002
+++ php4/ext/qtdom/config.m4Mon Nov 18 00:06:01 2002
@@ -1,34 +1,37 @@
 dnl
-dnl $Id: config.m4,v 1.10 2002/10/09 19:27:11 jan Exp $
+dnl $Id: config.m4,v 1.11 2002/11/18 05:06:01 sniper Exp $
 dnl
 
-AC_MSG_CHECKING(whether to include QDOM support)
-AC_ARG_WITH(qtdom,
-[  --with-qtdomInclude QtDOM support (requires Qt = 2.2.0).],
-[
-case $withval in
-no)
-  AC_MSG_RESULT(no) ;;
+PHP_ARG_WITH(qtdom, for QtDOM support,
+[  --with-qtdomInclude QtDOM support (requires Qt = 2.2.0).])
+
+if test $PHP_QTDOM != no; then
+  case $PHP_QTDOM in
 yes)
   if test -f $QTDIR/include/qdom.h; then
-AC_MSG_RESULT(yes)
-PHP_ADD_LIBRARY_WITH_PATH(qt, $QTDIR/lib)
-PHP_ADD_INCLUDE($QTDIR/include)
-AC_DEFINE(HAVE_QTDOM, 1, [Wheter you have qtdom])
-PHP_NEW_EXTENSION(qtdom, qtdom.c qtdom_qt.cpp, $ext_shared)
-PHP_REQUIRE_CXX
+QTDOM_LIBDIR=$QTDIR/lib
+QTDOM_INCDIR=$QTDIR/include
   elif test -f /usr/lib/qt2/include/qdom.h; then
-AC_MSG_RESULT(yes)
-PHP_ADD_LIBRARY(qt)
-PHP_ADD_INCLUDE(/usr/lib/qt2/include)
-AC_DEFINE(HAVE_QTDOM, 1, [Wheter you have qtdom])
-PHP_NEW_EXTENSION(qtdom, qtdom.c qtdom_qt.cpp, $ext_shared)
-PHP_REQUIRE_CXX
-  else
-AC_MSG_RESULT(no)
+QTDOM_LIBDIR=/usr/lib
+QTDOM_INCDIR=/usr/lib/qt2/include
+  fi
+  ;;
+*)
+  if test -f $PHP_QTDOM/include/qdom.h; then
+QTDOM_LIBDIR=$PHP_QTDOM/lib
+QTDOM_INCDIR=$PHP_QTDOM/include
   fi
   ;;
   esac
-],[
-  AC_MSG_RESULT(no)
-])
+
+  if test -z $QTDOM_INCDIR; then
+AC_MSG_ERROR([qdom.h not found.])
+  fi
+
+  PHP_ADD_LIBRARY_WITH_PATH(qt, $QTDOM_LIBDIR, QTDOM_SHARED_LIBADD)
+  PHP_ADD_INCLUDE($QTDOM_INCDIR)
+  PHP_NEW_EXTENSION(qtdom, qtdom.c qtdom_qt.cpp, $ext_shared)
+  PHP_SUBST(QTDOM_SHARED_LIBADD)
+  AC_DEFINE(HAVE_QTDOM, 1, [Whether you have qtdom])
+  PHP_REQUIRE_CXX
+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) /ext/qtdom config.m4

2002-11-17 Thread Jani Taskinen
sniper  Mon Nov 18 00:06:37 2002 EDT

  Modified files:  (Branch: PHP_4_3)
/php4/ext/qtdom config.m4 
  Log:
  MFH; Fixed bug: #20458 (--with-qtdom=shared broken)
  
  
Index: php4/ext/qtdom/config.m4
diff -u php4/ext/qtdom/config.m4:1.10 php4/ext/qtdom/config.m4:1.10.2.1
--- php4/ext/qtdom/config.m4:1.10   Wed Oct  9 15:27:11 2002
+++ php4/ext/qtdom/config.m4Mon Nov 18 00:06:37 2002
@@ -1,34 +1,37 @@
 dnl
-dnl $Id: config.m4,v 1.10 2002/10/09 19:27:11 jan Exp $
+dnl $Id: config.m4,v 1.10.2.1 2002/11/18 05:06:37 sniper Exp $
 dnl
 
-AC_MSG_CHECKING(whether to include QDOM support)
-AC_ARG_WITH(qtdom,
-[  --with-qtdomInclude QtDOM support (requires Qt = 2.2.0).],
-[
-case $withval in
-no)
-  AC_MSG_RESULT(no) ;;
+PHP_ARG_WITH(qtdom, for QtDOM support,
+[  --with-qtdomInclude QtDOM support (requires Qt = 2.2.0).])
+
+if test $PHP_QTDOM != no; then
+  case $PHP_QTDOM in
 yes)
   if test -f $QTDIR/include/qdom.h; then
-AC_MSG_RESULT(yes)
-PHP_ADD_LIBRARY_WITH_PATH(qt, $QTDIR/lib)
-PHP_ADD_INCLUDE($QTDIR/include)
-AC_DEFINE(HAVE_QTDOM, 1, [Wheter you have qtdom])
-PHP_NEW_EXTENSION(qtdom, qtdom.c qtdom_qt.cpp, $ext_shared)
-PHP_REQUIRE_CXX
+QTDOM_LIBDIR=$QTDIR/lib
+QTDOM_INCDIR=$QTDIR/include
   elif test -f /usr/lib/qt2/include/qdom.h; then
-AC_MSG_RESULT(yes)
-PHP_ADD_LIBRARY(qt)
-PHP_ADD_INCLUDE(/usr/lib/qt2/include)
-AC_DEFINE(HAVE_QTDOM, 1, [Wheter you have qtdom])
-PHP_NEW_EXTENSION(qtdom, qtdom.c qtdom_qt.cpp, $ext_shared)
-PHP_REQUIRE_CXX
-  else
-AC_MSG_RESULT(no)
+QTDOM_LIBDIR=/usr/lib
+QTDOM_INCDIR=/usr/lib/qt2/include
+  fi
+  ;;
+*)
+  if test -f $PHP_QTDOM/include/qdom.h; then
+QTDOM_LIBDIR=$PHP_QTDOM/lib
+QTDOM_INCDIR=$PHP_QTDOM/include
   fi
   ;;
   esac
-],[
-  AC_MSG_RESULT(no)
-])
+
+  if test -z $QTDOM_INCDIR; then
+AC_MSG_ERROR([qdom.h not found.])
+  fi
+
+  PHP_ADD_LIBRARY_WITH_PATH(qt, $QTDOM_LIBDIR, QTDOM_SHARED_LIBADD)
+  PHP_ADD_INCLUDE($QTDOM_INCDIR)
+  PHP_NEW_EXTENSION(qtdom, qtdom.c qtdom_qt.cpp, $ext_shared)
+  PHP_SUBST(QTDOM_SHARED_LIBADD)
+  AC_DEFINE(HAVE_QTDOM, 1, [Whether you have qtdom])
+  PHP_REQUIRE_CXX
+fi



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /main SAPI.h main.c

2002-11-17 Thread Sebastian Bergmann
sebastian   Mon Nov 18 01:04:06 2002 EDT

  Modified files:  
/php4/main  SAPI.h main.c 
  Log:
  Fix ZTS build.
  
  
Index: php4/main/SAPI.h
diff -u php4/main/SAPI.h:1.88 php4/main/SAPI.h:1.89
--- php4/main/SAPI.h:1.88   Sun Nov 17 19:59:23 2002
+++ php4/main/SAPI.hMon Nov 18 01:04:06 2002
@@ -184,6 +184,7 @@
 SAPI_API char *sapi_get_default_content_type(TSRMLS_D);
 SAPI_API void sapi_get_default_content_type_header(sapi_header_struct *default_header 
TSRMLS_DC);
 SAPI_API size_t sapi_apply_default_charset(char **mimetype, size_t len TSRMLS_DC);
+SAPI_API void sapi_activate_headers_only(TSRMLS_D);
 
 struct _sapi_module_struct {
char *name;
Index: php4/main/main.c
diff -u php4/main/main.c:1.515 php4/main/main.c:1.516
--- php4/main/main.c:1.515  Sun Nov 17 19:59:23 2002
+++ php4/main/main.cMon Nov 18 01:04:06 2002
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.515 2002/11/18 00:59:23 gschlossnagle Exp $ */
+/* $Id: main.c,v 1.516 2002/11/18 06:04:06 sebastian Exp $ */
 
 /* {{{ includes
  */
@@ -813,7 +813,7 @@
 
 /* {{{ php_start_sapi()
  */
-static int php_start_sapi()
+static int php_start_sapi(TSRMLS_D)
 {
 int retval = SUCCESS;
 
@@ -940,7 +940,7 @@
 signal(SIGCHLD, sigchld_handler);
 #endif
 
-if (php_start_sapi() == FAILURE)
+if (php_start_sapi(TSRMLS_C) == FAILURE)
 return FAILURE;
 
 php_output_activate(TSRMLS_C);
@@ -991,7 +991,7 @@
 } zend_end_try();
 
 zend_try {
-shutdown_memory_manager(CG(unclean_shutdown), 0);
+shutdown_memory_manager(CG(unclean_shutdown), 0 TSRMLS_CC);
 } zend_end_try();
 
 zend_try {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /sapi/apache_hooks php_apache.c

2002-11-17 Thread George Schlossnagle
gschlossnagle   Mon Nov 18 01:09:23 2002 EDT

  Modified files:  
/php4/sapi/apache_hooks php_apache.c 
  Log:
  #defined offsetof, for systems that can't find it
  
  
Index: php4/sapi/apache_hooks/php_apache.c
diff -u php4/sapi/apache_hooks/php_apache.c:1.1 php4/sapi/apache_hooks/php_apache.c:1.2
--- php4/sapi/apache_hooks/php_apache.c:1.1 Sun Nov 17 20:01:21 2002
+++ php4/sapi/apache_hooks/php_apache.c Mon Nov 18 01:09:23 2002
@@ -17,7 +17,7 @@
|  David Sklar [EMAIL PROTECTED] |
+--+
  */
-/* $Id: php_apache.c,v 1.1 2002/11/18 01:01:21 gschlossnagle Exp $ */
+/* $Id: php_apache.c,v 1.2 2002/11/18 06:09:23 gschlossnagle Exp $ */
 
 #include php_apache_http.h
 
@@ -35,6 +35,9 @@
 #endif
 
 #define SECTION(name)  PUTS(H2 align=\center\ name /H2\n)
+
+#undef offsetof
+#define offsetof(s_type,field) ((size_t)(((s_type*)0)-field))
 
 extern module *top_module;
 static int le_apachereq;



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /sapi/apache_hooks php_apache.c

2002-11-17 Thread Rasmus Lerdorf
rasmus  Mon Nov 18 01:14:11 2002 EDT

  Modified files:  
/php4/sapi/apache_hooks php_apache.c 
  Log:
  Fix a few warnings - compiles nicely now
  
  
Index: php4/sapi/apache_hooks/php_apache.c
diff -u php4/sapi/apache_hooks/php_apache.c:1.2 php4/sapi/apache_hooks/php_apache.c:1.3
--- php4/sapi/apache_hooks/php_apache.c:1.2 Mon Nov 18 01:09:23 2002
+++ php4/sapi/apache_hooks/php_apache.c Mon Nov 18 01:14:10 2002
@@ -17,7 +17,7 @@
|  David Sklar [EMAIL PROTECTED] |
+--+
  */
-/* $Id: php_apache.c,v 1.2 2002/11/18 06:09:23 gschlossnagle Exp $ */
+/* $Id: php_apache.c,v 1.3 2002/11/18 06:14:10 rasmus Exp $ */
 
 #include php_apache_http.h
 
@@ -153,7 +153,7 @@
  */
 static void apache_request_read_string_slot(int offset, INTERNAL_FUNCTION_PARAMETERS)
 {
-   zval *id, **new_value;
+   zval *id;
request_rec *r;
char *s;
 
@@ -1163,7 +1163,7 @@
 */
 PHP_FUNCTION(apache_request_sub_req_lookup_uri)
 {
-zval *id, *ret;
+zval *id;
 zval **file;
 request_rec *r, *sub_r;
 TSRMLS_FETCH();
@@ -1186,7 +1186,7 @@
 */
 PHP_FUNCTION(apache_request_sub_req_lookup_file)
 {
-zval *id, *ret;
+zval *id;
 zval **file;
 request_rec *r, *sub_r;
 TSRMLS_FETCH();
@@ -1251,7 +1251,7 @@
 {
 zval *id;
 zval **new_uri;
-request_rec *r, *sub_r;
+request_rec *r;
 TSRMLS_FETCH();
 if(ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, new_uri) == FAILURE) {
 WRONG_PARAM_COUNT;



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php