mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fix win32 build.
This commit is contained in:
parent
4916f58540
commit
816bcd3aff
4 changed files with 21 additions and 7 deletions
|
@ -226,7 +226,9 @@ char *strerror(int);
|
|||
#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
|
||||
|
|
|
@ -20,13 +20,16 @@
|
|||
|
||||
#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;
|
||||
|
|
|
@ -1135,7 +1135,7 @@ static void strx_printv(int *ccp, char *buf, size_t len, const char *format,
|
|||
}
|
||||
|
||||
|
||||
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_snprintf(char *buf, size_t len, const char *format,...)
|
|||
}
|
||||
|
||||
|
||||
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;
|
||||
|
||||
|
|
|
@ -64,13 +64,22 @@ Example:
|
|||
#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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue