mirror of
https://github.com/php/php-src.git
synced 2024-11-24 02:15:04 +08:00
Remove HAVE_STRERROR
Checking for the strerror function presence is no longer needed since it is part of the C89 standard [1] and can be safely assumed that all current systems have it. Check in the configure.ac and Windows defined symbol are still left until the file library (libmagic) will be updated. [1]: https://port70.net/~nsz/c/c89/c89-draft.html
This commit is contained in:
parent
07df6594b5
commit
e6a6017f78
@ -143,11 +143,6 @@ PHPAPI int string_natural_compare_function_ex(zval *result, zval *op1, zval *op2
|
|||||||
PHPAPI int string_natural_compare_function(zval *result, zval *op1, zval *op2);
|
PHPAPI int string_natural_compare_function(zval *result, zval *op1, zval *op2);
|
||||||
PHPAPI int string_natural_case_compare_function(zval *result, zval *op1, zval *op2);
|
PHPAPI int string_natural_case_compare_function(zval *result, zval *op1, zval *op2);
|
||||||
|
|
||||||
#ifndef HAVE_STRERROR
|
|
||||||
PHPAPI char *php_strerror(int errnum);
|
|
||||||
#define strerror php_strerror
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef HAVE_MBLEN
|
#ifndef HAVE_MBLEN
|
||||||
# define php_mblen(ptr, len) 1
|
# define php_mblen(ptr, len) 1
|
||||||
# define php_mb_reset()
|
# define php_mb_reset()
|
||||||
|
@ -3732,24 +3732,6 @@ PHP_FUNCTION(stripslashes)
|
|||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
#ifndef HAVE_STRERROR
|
|
||||||
/* {{{ php_strerror
|
|
||||||
*/
|
|
||||||
char *php_strerror(int errnum)
|
|
||||||
{
|
|
||||||
extern int sys_nerr;
|
|
||||||
extern char *sys_errlist[];
|
|
||||||
|
|
||||||
if ((unsigned int) errnum < sys_nerr) {
|
|
||||||
return(sys_errlist[errnum]);
|
|
||||||
}
|
|
||||||
|
|
||||||
(void) snprintf(BG(str_ebuf), sizeof(php_basic_globals.str_ebuf), "Unknown error: %d", errnum);
|
|
||||||
return(BG(str_ebuf));
|
|
||||||
}
|
|
||||||
/* }}} */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* {{{ php_stripcslashes
|
/* {{{ php_stripcslashes
|
||||||
*/
|
*/
|
||||||
PHPAPI void php_stripcslashes(zend_string *str)
|
PHPAPI void php_stripcslashes(zend_string *str)
|
||||||
|
@ -230,10 +230,6 @@ typedef unsigned int socklen_t;
|
|||||||
#include "zend_stack.h"
|
#include "zend_stack.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#ifndef HAVE_STRERROR
|
|
||||||
char *strerror(int);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if HAVE_PWD_H
|
#if HAVE_PWD_H
|
||||||
# ifdef PHP_WIN32
|
# ifdef PHP_WIN32
|
||||||
#include "win32/param.h"
|
#include "win32/param.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user