Browse Source

Fixed bug #20256 (snprintf() not defined)

PHP-5
foobar 24 years ago
parent
commit
411478e1f6
  1. 2
      main/php.h
  2. 2
      main/php_sprintf.c
  3. 2
      main/snprintf.c
  4. 4
      main/snprintf.h

2
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"

2
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:

2
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

4
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

Loading…
Cancel
Save