]> granicus.if.org Git - php/commitdiff
- Don't define DEBUG anymore. Everyone should use PHP_DEBUG.
authorAndi Gutmans <andi@php.net>
Sat, 11 Mar 2000 20:48:49 +0000 (20:48 +0000)
committerAndi Gutmans <andi@php.net>
Sat, 11 Mar 2000 20:48:49 +0000 (20:48 +0000)
  There are 2-3 third-party libs in PHP which use DEBUG and I left them
  this way (primary example is pcrelib).
- Please test things and Andrei, can you check that pcrelib stopped
  printing the warning messages?

15 files changed:
build-defs.h.in
configure.in
ext/cybercash/cybercash.h
ext/db/db.c
ext/dbase/dbf_ndx.c
ext/gettext/php_gettext.h
ext/icap/php_icap.c
ext/imap/imap.c
ext/mcal/php_mcal.c
ext/mcrypt/php_mcrypt.h
ext/mhash/php_mhash.h
ext/odbc/php_odbc.c
ext/standard/dns.c
main/php.h
main/win95nt.h

index fd9f69759708a417fe9fb2d1444818f4366a7ae4..cd6f2260e27694d343d172d69acfe52571bd4032 100644 (file)
@@ -39,7 +39,7 @@
 #define PHP_BINNAME            "@BINNAME@"
 #define PHP_CFLAGS             "@CFLAGS@"
 #define PHP_DBASE_LIB          ""
-#define PHP_DEBUG              "@DEBUG_CFLAGS@"
+#define PHP_BUILD_DEBUG                "@DEBUG_CFLAGS@"
 #define PHP_GDBM_INCLUDE       ""
 #define PHP_HSREGEX            ""
 #define PHP_IBASE_INCLUDE      ""
index a7691b8113a782da1a1f642e973388f9d1c8f503..366d4afdb79576b2e85106f46c5f27de36eab172 100644 (file)
@@ -406,11 +406,9 @@ AC_MSG_CHECKING(whether to include debugging symbols)
 AC_MSG_RESULT($PHP_DEBUG)
 
 if test "$PHP_DEBUG" = "yes"; then
-  AC_DEFINE(DEBUG,1)
   PHP_DEBUG=1
   ZEND_DEBUG=yes
 else
-  AC_DEFINE(DEBUG,0)
   PHP_DEBUG=0
   ZEND_DEBUG=no
 fi
index 27bba3edd165d95a9be31c37f026777c5d569d83..bbac201d8d999f35ea48246750ea7d7d1194d807 100644 (file)
@@ -35,7 +35,7 @@
 
 #if PHP_API_VERSION < 19990421
 #define zend_module_entry cybercash_module_entry
-#include "modules.h"
+#include "zend_modules.h"
 #include "internal_functions.h"
 #endif
 
index ea6b9e194f71597c948692c455106f2b0e28ed79..ab1412d086703e143f3ebefca36b6da8a0e04ca9 100644 (file)
@@ -373,13 +373,13 @@ dbm_info *php_dbm_open(char *filename, char *mode) {
                        ret = -1;
 #else 
 #if NDBM 
-#if DEBUG
+#if PHP_DEBUG
                php_error(E_WARNING, "dbmopen_ndbm(%s): errno = %d [%s]\n",filename,errno,strerror(errno));
 #endif
                if (errno) ret=errno;
                else ret = -1;
 #else
-#if DEBUG
+#if PHP_DEBUG
                php_error(E_WARNING, "dbmopen_flatfile(%s): errno = %d [%s]\n",filename,errno,strerror(errno));
 #endif
                if (errno) ret=errno;
index 9263b02b0c37f2d36395d58bfe143658b253c323..a648b42326cbbed01220a986c22f5face4c928c3 100644 (file)
@@ -50,7 +50,7 @@ static ndx_page_t *ndx_get_page(ndx_header_t *hp, int pageno)
        dndx_page_t     *dp;
        ndx_record_t    *rp;
 
-#if DEBUG
+#if PHP_DEBUG
        printf("getting page %d", pageno);
 #endif
        if ((fp = (ndx_page_t *)malloc(sizeof(ndx_page_t))) == NULL)
@@ -75,7 +75,7 @@ static ndx_page_t *ndx_get_page(ndx_header_t *hp, int pageno)
        memset(rp, 0, sizeof(ndx_record_t) * hp->ndx_keys_ppg);
        fp->ndxp_records = rp;
        fp->ndxp_header_p = hp;
-#if DEBUG
+#if PHP_DEBUG
        printf(", n_keys %ld\n", fp->ndxp_num_keys);
 #endif
        return fp;
@@ -102,7 +102,7 @@ static ndx_record_t *ndx_get_record(ndx_page_t *fp, int rec_no)
        ndx_header_t            *hp = fp->ndxp_header_p;
        struct dndx_record      *drp;
 
-#if DEBUG
+#if PHP_DEBUG
        printf("page %ld, rec %d: ", fp->ndxp_page_no, rec_no);
 #endif
        if (rec_no >= fp->ndxp_num_keys)
@@ -117,7 +117,7 @@ static ndx_record_t *ndx_get_record(ndx_page_t *fp, int rec_no)
                rp->ndxr_key_data = &drp->dndx_key_data;
                rp->ndxr_p_nrec = rec_no;
        }
-#if DEBUG
+#if PHP_DEBUG
        printf("left %ld, dbf_rec %ld, data '%s'\n", rp->ndxr_left,
                rp->ndxr_rec, rp->ndxr_key_data);
 #endif
index a6f156a0a884e8f6348ebff11388638e09f4b073..800db286027eb0d68380320c24f0bc23f775ef87 100644 (file)
@@ -34,7 +34,7 @@
 
 #if HAVE_LIBINTL
 #ifndef INIT_FUNC_ARGS
-#include "modules.h"
+#include "zend_modules.h"
 #endif
 
 extern zend_module_entry php_gettext_module_entry;
index 74d86a4be00632b090109609537141bb11f2d4e8..8de4171774f5bbc12a853bd7338c0b93c766da91 100644 (file)
@@ -49,7 +49,7 @@
 #include <stdarg.h>
 #include "cal.h"
 #include "php_icap.h"
-#include "modules.h"
+#include "zend_modules.h"
 #if (WIN32|WINNT)
 #include "winsock.h"
 #endif
index 539405695d2e963e6ccbfcbca966f83955cd8523..09637a06831ee446d92c8d39370e3ad172cad2f1 100644 (file)
@@ -46,7 +46,7 @@
 #include "imap.h"
 #include "mail.h"
 #include "rfc822.h"
-#include "modules.h"
+#include "zend_modules.h"
 #if (WIN32|WINNT)
 #include "winsock.h"
 MAILSTREAM DEFAULTPROTO;
@@ -459,7 +459,7 @@ PHP_MINIT_FUNCTION(imap)
 
        /* Open Options */
 
-       REGISTER_MAIN_LONG_CONSTANT("OP_DEBUG", OP_DEBUG, CONST_PERSISTENT | CONST_CS);
+       REGISTER_MAIN_LONG_CONSTANT("OP_PHP_DEBUG", OP_PHP_DEBUG, CONST_PERSISTENT | CONST_CS);
        /* debug protocol negotiations */
 
        REGISTER_MAIN_LONG_CONSTANT("OP_READONLY", OP_READONLY, CONST_PERSISTENT | CONST_CS);
@@ -2349,7 +2349,7 @@ PHP_FUNCTION(imap_utf7_decode)
 
        *outp = 0;
 
-#if DEBUG
+#if PHP_DEBUG
        /* warn if we computed outlen incorrectly */
        if (outp - out != outlen) {
                php_error(E_WARNING,
@@ -2476,7 +2476,7 @@ PHP_FUNCTION(imap_utf7_encode)
 
        *outp = 0;
 
-#if DEBUG
+#if PHP_DEBUG
        /* warn if we computed outlen incorrectly */
        if (outp - out != outlen) {
                php_error(E_WARNING,
index 4bc435e8ea9d281137b14adffaf352053e6b96f8..32ee72cad70fea3d00e357337409bc33ca40647f 100644 (file)
@@ -49,7 +49,7 @@
 #include <stdarg.h>
 #include "mcal.h"
 #include "php_mcal.h"
-#include "modules.h"
+#include "zend_modules.h"
 #if (WIN32|WINNT)
 #include "winsock.h"
 #endif
index 87585ae2cc8fa35508f397a625d58b62db31f3be..ebbd57645d34554d295cdfac0938fe765ab442c3 100644 (file)
@@ -5,7 +5,7 @@
 
 #if PHP_API_VERSION < 19990421
 #define  zend_module_entry zend_module_entry
-#include "modules.h"
+#include "zend_modules.h"
 #include "internal_functions.h"
 #endif
 
index 60f3955c18b78099fd03705c96d5a4ee79e6486d..58080fe1b28b854ff1c115312e8a9fb701aa2973 100644 (file)
@@ -5,7 +5,7 @@
 
 #if PHP_API_VERSION < 19990421
 #define  zend_module_entry zend_module_entry
-#include "modules.h"
+#include "zend_modules.h"
 #include "internal_functions.h"
 #endif
 
index c823d418823a5e7069b6c182c3cf729b905cb832..2f2b1731890b8130a6f1f48b9591cab1b265bcaf 100644 (file)
@@ -243,7 +243,7 @@ static PHP_INI_DISP(display_defPW)
        }
 
        if (value) {
-#if DEBUG
+#if PHP_DEBUG
                php_printf("%s", value);
 #else
                PUTS("********");
index 6e63f37945ebcc74bb346a145f1c936c38ca30ab..65ee1db015cdc21a0db3d38bbd6d744f4a3a9e6c 100644 (file)
@@ -75,14 +75,14 @@ char *php_gethostbyaddr(char *ip)
        struct hostent *hp;
 
        if ((int) (addr = inet_addr(ip)) == -1) {
-#if DEBUG
+#if PHP_DEBUG
                php_error(E_WARNING, "address not in a.b.c.d form");
 #endif
                return estrdup(ip);
        }
        hp = gethostbyaddr((char *) &addr, sizeof(addr), AF_INET);
        if (!hp) {
-#if DEBUG
+#if PHP_DEBUG
                php_error(E_WARNING, "Unable to resolve %s\n", ip);
 #endif
                return estrdup(ip);
@@ -127,7 +127,7 @@ PHP_FUNCTION(gethostbynamel)
 
        hp = gethostbyname((*arg)->value.str.val);
        if (hp == NULL || hp->h_addr_list == NULL) {
-#if DEBUG
+#if PHP_DEBUG
                php_error(E_WARNING, "Unable to resolve %s\n", (*arg)->value.str.val);
 #endif
                return;
@@ -149,7 +149,7 @@ char *php_gethostbyname(char *name)
 
        hp = gethostbyname(name);
        if (!hp || !hp->h_addr_list) {
-#if DEBUG
+#if PHP_DEBUG
                php_error(E_WARNING, "Unable to resolve %s\n", name);
 #endif
                return estrdup(name);
index a667f6978abdf4a86562f6d637b3492f7c6855ca..cb332f28f4eaa13afbeecd4a0b7ae9fe19c0738a 100644 (file)
@@ -73,11 +73,11 @@ extern unsigned char second_arg_allow_ref[];
 #include "php_regex.h"
 
 /* PHP's DEBUG value must match Zend's ZEND_DEBUG value */
-#undef DEBUG
-#define DEBUG ZEND_DEBUG
+#undef PHP_DEBUG
+#define PHP_DEBUG ZEND_DEBUG
 
 
-#if DEBUG || !(defined(__GNUC__)||defined(PHP_WIN32))
+#if PHP_DEBUG || !(defined(__GNUC__)||defined(PHP_WIN32))
 #ifdef inline
 #undef inline
 #endif
index 0e5413ab6ff2f99355379e21f1bea3090df40478..9010c06e75e657f89cfb179fca293d3b0d421ef9 100644 (file)
@@ -44,7 +44,7 @@ typedef long pid_t;
 #define M_PI_2           1.57079632679489661923
 #define M_PI_4           0.78539816339744830962
 
-#if !DEBUG
+#if !PHP_DEBUG
 #ifdef inline
 #undef inline
 #endif