cvs: /php4 php.h snprintf.h /php4/ext/odbc php_odbc.c /php4/ext/standard math.c /php4/sapi/cgi cgi_main.c

From: Date: Sun, 12 Mar 2000 17:18:22 +0000
Subject: cvs: /php4 php.h snprintf.h /php4/ext/odbc php_odbc.c /php4/ext/standard math.c /php4/sapi/cgi cgi_main.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-11949@lists.php.net to get a copy of this message
sas Sun Mar 12 09:18:22 2000 EDT Modified files: /php4 php.h snprintf.h /php4/ext/odbc php_odbc.c /php4/ext/standard math.c /php4/sapi/cgi cgi_main.c Log: Use sprintf everywhere and define sprintf to php_sprintf, if sprintf is broken. Index: php4/php.h diff -u php4/php.h:1.70 php4/php.h:1.71 --- php4/php.h:1.70 Sun Mar 12 07:47:30 2000 +++ php4/php.h Sun Mar 12 09:18:21 2000 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php.h,v 1.70 2000/03/12 15:47:30 sas Exp $ */ +/* $Id: php.h,v 1.71 2000/03/12 17:18:21 sas Exp $ */ #ifndef _PHP_H #define _PHP_H @@ -188,7 +188,7 @@ #define LONG_MIN (- LONG_MAX - 1) #endif -#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) +#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) || defined(BROKEN_SPRINTF) #include "snprintf.h" #endif Index: php4/snprintf.h diff -u php4/snprintf.h:1.6 php4/snprintf.h:1.7 --- php4/snprintf.h:1.6 Sat Feb 19 15:21:25 2000 +++ php4/snprintf.h Sun Mar 12 09:18:21 2000 @@ -31,8 +31,7 @@ #if BROKEN_SPRINTF int php_sprintf (char* s, const char* format, ...); -#else -#define php_sprintf sprintf +#define sprintf php_sprintf #endif #endif /* _PHP_SNPRINTF_H */ Index: php4/ext/odbc/php_odbc.c diff -u php4/ext/odbc/php_odbc.c:1.36 php4/ext/odbc/php_odbc.c:1.37 --- php4/ext/odbc/php_odbc.c:1.36 Sun Mar 12 07:47:30 2000 +++ php4/ext/odbc/php_odbc.c Sun Mar 12 09:18:21 2000 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_odbc.c,v 1.36 2000/03/12 15:47:30 sas Exp $ */ +/* $Id: php_odbc.c,v 1.37 2000/03/12 17:18:21 sas Exp $ */ #if COMPILE_DL #include "dl/phpdl.h" @@ -1725,7 +1725,7 @@ RETURN_FALSE; } - hashed_len = php_sprintf(hashed_details, "%s_%s_%s_%s_%d", ODBC_TYPE, db, uid, pwd, cur_opt); + hashed_len = sprintf(hashed_details, "%s_%s_%s_%s_%d", ODBC_TYPE, db, uid, pwd, cur_opt); /* FIXME the idea of checking to see if our connection is already persistent is good, but it adds a lot of overhead to non-persistent connections. We Index: php4/ext/standard/math.c diff -u php4/ext/standard/math.c:1.18 php4/ext/standard/math.c:1.19 --- php4/ext/standard/math.c:1.18 Sun Mar 12 07:47:32 2000 +++ php4/ext/standard/math.c Sun Mar 12 09:18:21 2000 @@ -613,7 +613,7 @@ dec = MAX(0,dec); tmpbuf = (char *) emalloc(32+dec); - tmplen=php_sprintf(tmpbuf,"%.*f",dec,d); + tmplen=sprintf(tmpbuf,"%.*f",dec,d); if (!isdigit((int)tmpbuf[0])) { return tmpbuf; Index: php4/sapi/cgi/cgi_main.c diff -u php4/sapi/cgi/cgi_main.c:1.33 php4/sapi/cgi/cgi_main.c:1.34 --- php4/sapi/cgi/cgi_main.c:1.33 Sun Mar 12 07:47:34 2000 +++ php4/sapi/cgi/cgi_main.c Sun Mar 12 09:18:21 2000 @@ -146,7 +146,7 @@ pi = NULL; } val = emalloc(l + 1); - php_sprintf(val, "%s%s", (sn ? sn : ""), (pi ? pi : "")); /* SAFE */ + sprintf(val, "%s%s", (sn ? sn : ""), (pi ? pi : "")); /* SAFE */ php_register_variable("PHP_SELF", val, track_vars_array ELS_CC PLS_CC); efree(val); }

« previous php.version4 (#11949) next »