#define PHP_ATTRIBUTE_MALLOC ZEND_ATTRIBUTE_MALLOC
#define PHP_ATTRIBUTE_FORMAT ZEND_ATTRIBUTE_FORMAT
+BEGIN_EXTERN_C()
#include "snprintf.h"
+END_EXTERN_C()
#include "spprintf.h"
#define EXEC_INPUT_BUF 4096
}
-int ap_php_snprintf(char *buf, size_t len, const char *format,...)
+PHPAPI int ap_php_snprintf(char *buf, size_t len, const char *format,...)
{
int cc;
va_list ap;
}
-int ap_php_vsnprintf(char *buf, size_t len, const char *format, va_list ap)
+PHPAPI int ap_php_vsnprintf(char *buf, size_t len, const char *format, va_list ap)
{
int cc;
#ifndef SNPRINTF_H
#define SNPRINTF_H
-int ap_php_snprintf(char *, size_t, const char *, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4);
+PHPAPI int ap_php_snprintf(char *, size_t, const char *, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4);
+#ifdef snprintf
+#undef snprintf
+#endif
#define snprintf ap_php_snprintf
-int ap_php_vsnprintf(char *, size_t, const char *, va_list ap) PHP_ATTRIBUTE_FORMAT(printf, 3, 0);
+PHPAPI int ap_php_vsnprintf(char *, size_t, const char *, va_list ap) PHP_ATTRIBUTE_FORMAT(printf, 3, 0);
+#ifdef vsnprintf
+#undef vsnprintf
+#endif
#define vsnprintf ap_php_vsnprintf
-int php_sprintf (char* s, const char* format, ...) PHP_ATTRIBUTE_FORMAT(printf, 2, 3);
+PHPAPI int php_sprintf (char* s, const char* format, ...) PHP_ATTRIBUTE_FORMAT(printf, 2, 3);
+#ifdef sprintf
+#undef sprintf
+#endif
#define sprintf php_sprintf
typedef enum {