summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/php.h3
-rw-r--r--main/php_sprintf.c39
-rw-r--r--main/snprintf.h6
3 files changed, 1 insertions, 47 deletions
diff --git a/main/php.h b/main/php.h
index f182bb8932..161f955303 100644
--- a/main/php.h
+++ b/main/php.h
@@ -36,8 +36,7 @@
#include "zend_API.h"
-#undef sprintf
-#define sprintf php_sprintf
+#define php_sprintf sprintf
/* Operating system family definition */
#ifdef PHP_WIN32
diff --git a/main/php_sprintf.c b/main/php_sprintf.c
deleted file mode 100644
index 41e632102d..0000000000
--- a/main/php_sprintf.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- +----------------------------------------------------------------------+
- | PHP Version 7 |
- +----------------------------------------------------------------------+
- | Copyright (c) The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.01 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_01.txt |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Author: Jaakko Hyvätti <jaakko.hyvatti@iki.fi> |
- +----------------------------------------------------------------------+
- */
-
-#include <stdio.h>
-#include <stdarg.h>
-#include "php.h"
-#ifdef PHP_WIN32
-#include "config.w32.h"
-#else
-#include <php_config.h>
-#endif
-
-PHPAPI int
-php_sprintf (char*s, const char* format, ...)
-{
- va_list args;
- int ret;
-
- va_start (args, format);
- s[0] = '\0';
- ret = vsprintf (s, format, args);
- va_end (args);
- return (ret < 0) ? -1 : ret;
-}
diff --git a/main/snprintf.h b/main/snprintf.h
index 39284aeaa4..56efe5625c 100644
--- a/main/snprintf.h
+++ b/main/snprintf.h
@@ -82,7 +82,6 @@ PHPAPI int ap_php_snprintf(char *, size_t, const char *, ...) ZEND_ATTRIBUTE_FOR
PHPAPI int ap_php_vsnprintf(char *, size_t, const char *, va_list ap);
PHPAPI int ap_php_vasprintf(char **buf, const char *format, va_list ap);
PHPAPI int ap_php_asprintf(char **buf, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3);
-PHPAPI int php_sprintf (char* s, const char* format, ...) PHP_ATTRIBUTE_FORMAT(printf, 2, 3);
PHPAPI char * php_gcvt(double value, int ndigit, char dec_point, char exponent, char *buf);
PHPAPI char * php_0cvt(double value, int ndigit, char dec_point, char exponent, char *buf);
PHPAPI char * php_conv_fp(char format, double num,
@@ -118,11 +117,6 @@ END_EXTERN_C()
#define asprintf ap_php_asprintf
#endif
-#ifdef sprintf
-#undef sprintf
-#endif
-#define sprintf php_sprintf
-
typedef enum {
LM_STD = 0,
#if SIZEOF_INTMAX_T