Re: Various small patches (Zend, TSRM...)
| From: | Zeev Suraski | Date: | Tue, 05 Dec 2000 09:26:15 +0000 |
| Subject: | Re: Various small patches (Zend, TSRM...) | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-40090@lists.php.net to get a copy of this message | ||
AFAIK they're only necessary in the function declarations, not in the actual implementation code.
Zeev
At 07:20 5/12/2000, Andi Gutmans wrote:
According to the ANSI C standard are these void's needed it? I personally find them a bit annoying and never write them :) Do we need to start writing them? Doesn't your compiler have a switch to relax on them? Andi At 03:23 PM 12/4/00 -0800, David Hedbor wrote:-- Zeev Suraski <zeev@zend.com> CTO, Zend Technologies Ltd. http://www.zend.com/Patch #1 adds a bunch of "void" to zend_list.[ch] to avoid unecessary warnings. Patch #2 and #3 makes --enable-debug in TSRM work and it also defines TSRM_DEBUG when compiling PHP. Without this patch, compilation breaks with --enable-debug since tsrm_error is undefined. -- Have a nice day.? zend_list_h.diff ? zend_list.diff Index: zend_list.c =================================================================== RCS file: /repository/Zend/zend_list.c,v retrieving revision 1.27 diff -u -r1.27 zend_list.c--- Andi Gutmans <andi@zend.com> http://www.zend.com/ -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net--- zend_list.c 2000/10/20 18:26:15 1.27+++ zend_list.c 2000/12/04 23:17:21 @@ -382,13 +382,13 @@ } -int zend_init_rsrc_list_dtors() +int zend_init_rsrc_list_dtors(void) {return zend_hash_init(&list_destructors, 50, NULL, NULL, 1);} -void zend_destroy_rsrc_list_dtors() +void zend_destroy_rsrc_list_dtors(void) {zend_hash_destroy(&list_destructors);} Index: zend_list.h =================================================================== RCS file: /repository/Zend/zend_list.h,v retrieving revision 1.23 diff -u -r1.23 zend_list.h--- zend_list.h 2000/10/25 17:41:34 1.23+++ zend_list.h 2000/12/04 23:17:21 @@ -71,8 +71,8 @@ int zend_init_rsrc_plist(ELS_D); void zend_destroy_rsrc_list(ELS_D); void zend_destroy_rsrc_plist(ELS_D); -int zend_init_rsrc_list_dtors(); -void zend_destroy_rsrc_list_dtors(); +int zend_init_rsrc_list_dtors(void); +void zend_destroy_rsrc_list_dtors(void); ZEND_API int zend_list_insert(void *ptr, int type); ZEND_API int zend_plist_insert(void *ptr, int type); Index: configure.in =================================================================== RCS file: /repository/TSRM/configure.in,v retrieving revision 1.16 diff -u -r1.16 configure.in--- configure.in 2000/12/02 13:27:07 1.16 +++ configure.in 2000/12/04 23:18:46@@ -9,9 +9,13 @@ sinclude(tsrm.m4) + + TSRM_BASIC_CHECKS TSRM_THREADS_CHECKS - + + + AM_PROG_LIBTOOL if test "$enable_debug" != "yes"; then AM_SET_LIBTOOL_VARIABLE([--silent]) Index: tsrm.m4 =================================================================== RCS file: /repository/TSRM/tsrm.m4,v retrieving revision 1.11 diff -u -r1.11 tsrm.m4--- tsrm.m4 2000/09/02 15:23:00 1.11 +++ tsrm.m4 2000/12/04 23:18:47@@ -94,5 +94,30 @@ elif test "$TSRM_PTHREADS" != "no"; then TSRM_CHECK_PTHREADS fi +]) +AC_DEFUN(TSRM_ENABLE_DEBUG,[ + AC_ARG_ENABLE(debug,+ [ --enable-debug Compile with debugging symbols.],[+ TSRM_DEBUG=$withval + ],[ + TSRM_DEBUG=no + ]) +]) + + +AC_DEFUN(TSRM_SET_DEBUG,[ + if test "$TSRM_DEBUG" = "yes"; then + AC_DEFINE(TSRM_DEBUG,1,[ ]) + echo " $CFLAGS" | grep ' -g' >/dev/null || DEBUG_CFLAGS="-g" + if test "$CFLAGS" = "-g -O2"; then+ CFLAGS=-g+ fi + test -n "$GCC" && DEBUG_CFLAGS="$DEBUG_CFLAGS -Wall" + test -n "$GCC" && test "$USE_MAINTAINER_MODE" = "yes" && \+ DEBUG_CFLAGS="$DEBUG_CFLAGS -Wmissing-prototypes -Wstrict-prototypes -Wmissi+ ng-declarations" + else + AC_DEFINE(TSRM_DEBUG,0,[ ]) + fi ]) Index: configure.in =================================================================== RCS file: /repository/php4/configure.in,v retrieving revision 1.197 diff -u -r1.197 configure.in--- configure.in 2000/12/02 13:26:03 1.197 +++ configure.in 2000/12/04 23:16:40@@ -462,9 +462,11 @@ if test "$PHP_DEBUG" = "yes"; then PHP_DEBUG=1 ZEND_DEBUG=yes + TSRM_DEBUG=yes else PHP_DEBUG=0 ZEND_DEBUG=no + TSRM_DEBUG=no fi @@ -656,6 +658,8 @@ PHP_CONFIGURE_PART(Configuring Zend) LIBZEND_BASIC_CHECKS LIBZEND_OTHER_CHECKS + +TSRM_SET_DEBUG TSRM_LIB='TSRM/libtsrm.la' TSRM_DIR=TSRM -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net