fmk Mon Nov 15 16:04:15 2004 EDT
Modified files:
/php-src/main php.h php_sprintf.c snprintf.c snprintf.h
Log:
Fix win32 build.
http://cvs.php.net/diff.php/php-src/main/php.h?r1=1.207&r2=1.208&ty=u
Index: php-src/main/php.h
diff -u php-src/main/php.h:1.207 php-src/main/php.h:1.208
--- php-src/main/php.h:1.207 Mon Nov 15 08:42:22 2004
+++ php-src/main/php.h Mon Nov 15 16:04:08 2004
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php.h,v 1.207 2004/11/15 13:42:22 derick Exp $ */
+/* $Id: php.h,v 1.208 2004/11/15 21:04:08 fmk Exp $ */
#ifndef PHP_H
#define PHP_H
@@ -226,7 +226,9 @@
#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
http://cvs.php.net/diff.php/php-src/main/php_sprintf.c?r1=1.18&r2=1.19&ty=u
Index: php-src/main/php_sprintf.c
diff -u php-src/main/php_sprintf.c:1.18 php-src/main/php_sprintf.c:1.19
--- php-src/main/php_sprintf.c:1.18 Mon Nov 15 08:42:22 2004
+++ php-src/main/php_sprintf.c Mon Nov 15 16:04:09 2004
@@ -16,17 +16,20 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_sprintf.c,v 1.18 2004/11/15 13:42:22 derick Exp $ */
+/* $Id: php_sprintf.c,v 1.19 2004/11/15 21:04:09 fmk Exp $ */
#include <stdio.h>
#include <stdarg.h>
-#ifdef NETWARE
+#include "php.h"
+#ifdef PHP_WIN32
+#include "config.w32.h"
+#elif defined NETWARE
#include "config.nw.h"
#else
#include "php_config.h"
#endif
-int
+PHPAPI int
php_sprintf (char*s, const char* format, ...)
{
va_list args;
http://cvs.php.net/diff.php/php-src/main/snprintf.c?r1=1.35&r2=1.36&ty=u
Index: php-src/main/snprintf.c
diff -u php-src/main/snprintf.c:1.35 php-src/main/snprintf.c:1.36
--- php-src/main/snprintf.c:1.35 Mon Nov 15 08:42:22 2004
+++ php-src/main/snprintf.c Mon Nov 15 16:04:09 2004
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: snprintf.c,v 1.35 2004/11/15 13:42:22 derick Exp $ */
+/* $Id: snprintf.c,v 1.36 2004/11/15 21:04:09 fmk Exp $ */
/* ====================================================================
* Copyright (c) 1995-1998 The Apache Group. All rights reserved.
@@ -1135,7 +1135,7 @@
}
-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;
@@ -1147,7 +1147,7 @@
}
-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;
http://cvs.php.net/diff.php/php-src/main/snprintf.h?r1=1.28&r2=1.29&ty=u
Index: php-src/main/snprintf.h
diff -u php-src/main/snprintf.h:1.28 php-src/main/snprintf.h:1.29
--- php-src/main/snprintf.h:1.28 Mon Nov 15 08:42:22 2004
+++ php-src/main/snprintf.h Mon Nov 15 16:04:09 2004
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: snprintf.h,v 1.28 2004/11/15 13:42:22 derick Exp $ */
+/* $Id: snprintf.h,v 1.29 2004/11/15 21:04:09 fmk Exp $ */
/*
@@ -64,13 +64,22 @@
#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 {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php