mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Use zend_sprintf by default (which is defined to sprintf, if the system's
sprintf is useable).
This commit is contained in:
parent
143b02d8a4
commit
cb45c2ea55
3 changed files with 4 additions and 5 deletions
|
@ -113,9 +113,6 @@
|
||||||
/* Define if you have broken header files like SunOS 4 */
|
/* Define if you have broken header files like SunOS 4 */
|
||||||
#define MISSING_FCLOSE_DECL 0
|
#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 */
|
/* Define to compile PHP/Zend thread safe */
|
||||||
#undef ZTS
|
#undef ZTS
|
||||||
|
|
||||||
|
@ -124,3 +121,5 @@
|
||||||
|
|
||||||
/* Define if struct sockaddr contains the field sa_len */
|
/* Define if struct sockaddr contains the field sa_len */
|
||||||
#undef HAVE_SOCKADDR_SA_LEN
|
#undef HAVE_SOCKADDR_SA_LEN
|
||||||
|
|
||||||
|
#define sprintf zend_sprintf
|
||||||
|
|
|
@ -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)))
|
(strlen(data->basedir) + 2 * data->dirdepth + keylen + 5 + sizeof(FILE_PREFIX)))
|
||||||
return NULL;
|
return NULL;
|
||||||
p = key;
|
p = key;
|
||||||
n = zend_sprintf(buf, "%s/", data->basedir);
|
n = sprintf(buf, "%s/", data->basedir);
|
||||||
for(i = 0; i < data->dirdepth; i++) {
|
for(i = 0; i < data->dirdepth; i++) {
|
||||||
buf[n++] = *p++;
|
buf[n++] = *p++;
|
||||||
buf[n++] = DIR_DELIMITER;
|
buf[n++] = DIR_DELIMITER;
|
||||||
|
|
|
@ -1607,7 +1607,7 @@ PHPAPI char *php_addcslashes(char *str, int length, int *new_length, int should_
|
||||||
case '\v': *target++ = 'v'; break;
|
case '\v': *target++ = 'v'; break;
|
||||||
case '\b': *target++ = 'b'; break;
|
case '\b': *target++ = 'b'; break;
|
||||||
case '\f': *target++ = 'f'; break;
|
case '\f': *target++ = 'f'; break;
|
||||||
default: target += zend_sprintf(target, "%03o", (unsigned char)c);
|
default: target += sprintf(target, "%03o", (unsigned char)c);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue