summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>1999-12-19 14:39:41 +0000
committerSascha Schumann <sas@php.net>1999-12-19 14:39:41 +0000
commitcb45c2ea551ff92a91940bc5e8e1925b8834d0a3 (patch)
treece6612984d81be3a81c2104bed212a3a47296a16
parent143b02d8a4f4d3dea5c823b44d144690da3ae33e (diff)
downloadphp-git-cb45c2ea551ff92a91940bc5e8e1925b8834d0a3.tar.gz
Use zend_sprintf by default (which is defined to sprintf, if the system's
sprintf is useable).
-rw-r--r--acconfig.h.in5
-rw-r--r--ext/session/mod_files.c2
-rw-r--r--ext/standard/string.c2
3 files changed, 4 insertions, 5 deletions
diff --git a/acconfig.h.in b/acconfig.h.in
index 760d55e2a1..fba8562865 100644
--- a/acconfig.h.in
+++ b/acconfig.h.in
@@ -113,9 +113,6 @@
/* Define if you have broken header files like SunOS 4 */
#define MISSING_FCLOSE_DECL 0
-/* Define if you have broken sprintf function like SunOS 4 */
-#define BROKEN_SPRINTF 0
-
/* Define to compile PHP/Zend thread safe */
#undef ZTS
@@ -124,3 +121,5 @@
/* Define if struct sockaddr contains the field sa_len */
#undef HAVE_SOCKADDR_SA_LEN
+
+#define sprintf zend_sprintf
diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c
index 49c25a724c..e3afbfe39a 100644
--- a/ext/session/mod_files.c
+++ b/ext/session/mod_files.c
@@ -100,7 +100,7 @@ static char *_ps_files_path_create(char *buf, size_t buflen, ps_files *data, con
(strlen(data->basedir) + 2 * data->dirdepth + keylen + 5 + sizeof(FILE_PREFIX)))
return NULL;
p = key;
- n = zend_sprintf(buf, "%s/", data->basedir);
+ n = sprintf(buf, "%s/", data->basedir);
for(i = 0; i < data->dirdepth; i++) {
buf[n++] = *p++;
buf[n++] = DIR_DELIMITER;
diff --git a/ext/standard/string.c b/ext/standard/string.c
index f1203cb01a..1be4980757 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -1607,7 +1607,7 @@ PHPAPI char *php_addcslashes(char *str, int length, int *new_length, int should_
case '\v': *target++ = 'v'; break;
case '\b': *target++ = 'b'; break;
case '\f': *target++ = 'f'; break;
- default: target += zend_sprintf(target, "%03o", (unsigned char)c);
+ default: target += sprintf(target, "%03o", (unsigned char)c);
}
continue;
}