From 2c486990c6fa9a1f023543c61e754e98c536e403 Mon Sep 17 00:00:00 2001 From: foobar Date: Tue, 25 Feb 2003 09:45:47 +0000 Subject: [PATCH] MFH: Fixed bug #20256 (snprintf() not defined on some systems) --- main/php.h | 2 +- main/php_sprintf.c | 2 +- main/snprintf.c | 2 +- main/snprintf.h | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/main/php.h b/main/php.h index 40ecc32e55..d7a2308bd4 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 26f1de7a16..6f252c8e48 100644 --- a/main/php_sprintf.c +++ b/main/php_sprintf.c @@ -39,7 +39,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 ec8c0d515f..37c7e0849e 100644 --- a/main/snprintf.c +++ b/main/snprintf.c @@ -419,7 +419,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 dc53229069..4443a6cfc2 100644 --- a/main/snprintf.h +++ b/main/snprintf.h @@ -62,12 +62,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 -- 2.40.0