From: foobar Date: Tue, 25 Feb 2003 09:44:12 +0000 (+0000) Subject: Fixed bug #20256 (snprintf() not defined) X-Git-Tag: RELEASE_0_5~751 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=411478e1f6f930743b4d75dbcd1563f346b22a1d;p=php Fixed bug #20256 (snprintf() not defined) --- diff --git a/main/php.h b/main/php.h index 6cd191453a..f02dade94a 100644 --- a/main/php.h +++ b/main/php.h @@ -218,7 +218,7 @@ char *strerror(int); #define LONG_MIN (- LONG_MAX - 1) #endif -#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) || defined(BROKEN_SPRINTF) || defined(BROKEN_SNPRINTF) || defined(BROKEN_VSNPRINTF) +#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) || PHP_BROKEN_SPRINTF || PHP_BROKEN_SNPRINTF || PHP_BROKEN_VSNPRINTF #include "snprintf.h" #endif #include "spprintf.h" diff --git a/main/php_sprintf.c b/main/php_sprintf.c index cb226b28db..e3fdb00531 100644 --- a/main/php_sprintf.c +++ b/main/php_sprintf.c @@ -43,7 +43,7 @@ php_sprintf (char*s, const char* format, ...) return strlen (s); } -#endif /* BROKEN_SPRINTF */ +#endif /* PHP_BROKEN_SPRINTF */ /* * Local variables: diff --git a/main/snprintf.c b/main/snprintf.c index 0f72490f0b..fc3d5de153 100644 --- a/main/snprintf.c +++ b/main/snprintf.c @@ -439,7 +439,7 @@ ap_php_gcvt(double number, int ndigit, char *buf, boolean_e altform) return (buf); } -#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) || defined(BROKEN_SNPRINTF) || defined(BROKEN_VSNPRINTF) +#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) || PHP_BROKEN_SNPRINTF || PHP_BROKEN_VSNPRINTF /* * NUM_BUF_SIZE is the size of the buffer used for arithmetic conversions diff --git a/main/snprintf.h b/main/snprintf.h index 0a72f50e26..0b811eb739 100644 --- a/main/snprintf.h +++ b/main/snprintf.h @@ -64,12 +64,12 @@ Example: #ifndef SNPRINTF_H #define SNPRINTF_H -#if !defined(HAVE_SNPRINTF) || defined(BROKEN_SNPRINTF) +#if !defined(HAVE_SNPRINTF) || PHP_BROKEN_SNPRINTF extern int ap_php_snprintf(char *, size_t, const char *, ...); #define snprintf ap_php_snprintf #endif -#if !defined(HAVE_VSNPRINTF) || defined(BROKEN_VSNPRINTF) +#if !defined(HAVE_VSNPRINTF) || PHP_BROKEN_VSNPRINTF extern int ap_php_vsnprintf(char *, size_t, const char *, va_list ap); #define vsnprintf ap_php_vsnprintf #endif