mirror of
https://github.com/php/php-src.git
synced 2024-11-27 03:44:07 +08:00
Remove HAVE_STDARG_H
The C89 standard and later defines the `<stdarg.h>` header as part of the standard headers [1]. On current systems it is always present and can be included unconditionally. Checking for presence and functionality of the `<stdarg.h>` header and variadic function is not relevant anymore on current systems since this is always available. Also Autoconf suggests relying on at least C89 or above [2] and [3]. The following files were regenerated with re2c 1.0.3: - Zend/zend_language_scanner.c - Zend/zend_language_scanner_defs.h Refs: [1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2 [2] http://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4 [3] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html
This commit is contained in:
parent
d3ca28f569
commit
b189c2432a
@ -15,10 +15,7 @@
|
||||
#ifdef ZTS
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#if HAVE_STDARG_H
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
|
||||
typedef struct _tsrm_tls_entry tsrm_tls_entry;
|
||||
|
||||
|
@ -7,8 +7,6 @@ dnl AC_REQUIRE([AM_PROG_CC_STDC])dnl
|
||||
AC_REQUIRE([AC_PROG_CC_C_O])dnl
|
||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||
|
||||
AC_CHECK_HEADERS(stdarg.h)
|
||||
|
||||
AC_CHECK_FUNCS(sigprocmask)
|
||||
|
||||
AX_FUNC_WHICH_GETHOSTBYNAME_R()
|
||||
|
@ -51,7 +51,6 @@ stdint.h \
|
||||
limits.h \
|
||||
malloc.h \
|
||||
unistd.h \
|
||||
stdarg.h \
|
||||
sys/types.h \
|
||||
sys/time.h \
|
||||
signal.h \
|
||||
|
@ -30,9 +30,7 @@
|
||||
#include "zend_closures.h"
|
||||
#include "zend_inheritance.h"
|
||||
|
||||
#ifdef HAVE_STDARG_H
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
|
||||
/* these variables are true statics/globals, and have to be mutex'ed on every access */
|
||||
ZEND_API HashTable module_registry;
|
||||
|
@ -23,9 +23,7 @@
|
||||
#include "zend.h"
|
||||
#include "zend_ast.h"
|
||||
|
||||
#ifdef HAVE_STDARG_H
|
||||
# include <stdarg.h>
|
||||
#endif
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "zend_llist.h"
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -75,9 +75,7 @@
|
||||
# error ZEND_MMAP_AHEAD should be greater than or equal to YYMAXFILL
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDARG_H
|
||||
# include <stdarg.h>
|
||||
#endif
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Generated by re2c 1.0.1 */
|
||||
/* Generated by re2c 1.0.3 */
|
||||
#line 3 "Zend/zend_language_scanner_defs.h"
|
||||
|
||||
enum YYCONDTYPE {
|
||||
|
@ -54,9 +54,7 @@
|
||||
# include <unix.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDARG_H
|
||||
# include <stdarg.h>
|
||||
#endif
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef HAVE_DLFCN_H
|
||||
# include <dlfcn.h>
|
||||
|
@ -19,9 +19,7 @@
|
||||
|
||||
#include "zend.h"
|
||||
#include "zend_ptr_stack.h"
|
||||
#ifdef HAVE_STDARG_H
|
||||
# include <stdarg.h>
|
||||
#endif
|
||||
#include <stdarg.h>
|
||||
|
||||
ZEND_API void zend_ptr_stack_init_ex(zend_ptr_stack *stack, zend_bool persistent)
|
||||
{
|
||||
|
@ -21,9 +21,7 @@
|
||||
|
||||
#include "zend.h"
|
||||
|
||||
#ifdef HAVE_STDARG_H
|
||||
# include <stdarg.h>
|
||||
#endif
|
||||
#include <stdarg.h>
|
||||
|
||||
#if ZEND_BROKEN_SPRINTF
|
||||
int zend_sprintf(char *buffer, const char *format, ...)
|
||||
|
@ -32,9 +32,7 @@
|
||||
#include <utime.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDARG_H
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
|
||||
#ifdef ZTS
|
||||
#define VIRTUAL_DIR
|
||||
|
@ -442,7 +442,6 @@ poll.h \
|
||||
pwd.h \
|
||||
resolv.h \
|
||||
signal.h \
|
||||
stdarg.h \
|
||||
syslog.h \
|
||||
sysexits.h \
|
||||
sys/ioctl.h \
|
||||
|
@ -77,24 +77,7 @@ AC_DEFUN([PHP_MBSTRING_SETUP_MBREGEX], [
|
||||
AC_DEFINE([USE_COMBINATION_EXPLOSION_CHECK],1,[whether to check multibyte regex backtrack])
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK(for variable length prototypes and stdarg.h, php_cv_mbstring_stdarg, [
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <stdarg.h>
|
||||
int foo(int x, ...) {
|
||||
va_list va;
|
||||
va_start(va, x);
|
||||
va_arg(va, int);
|
||||
va_arg(va, char *);
|
||||
va_arg(va, double);
|
||||
return 0;
|
||||
}
|
||||
int main() { return foo(10, "", 3.14); }
|
||||
]])], [php_cv_mbstring_stdarg=yes], [php_cv_mbstring_stdarg=no], [
|
||||
php_cv_mbstring_stdarg=no
|
||||
])
|
||||
])
|
||||
|
||||
AC_CHECK_HEADERS([strings.h unistd.h sys/time.h sys/times.h stdarg.h limits.h])
|
||||
AC_CHECK_HEADERS([strings.h unistd.h sys/time.h sys/times.h limits.h])
|
||||
AC_CHECK_SIZEOF(int, 4)
|
||||
AC_CHECK_SIZEOF(short, 2)
|
||||
AC_CHECK_SIZEOF(long, 4)
|
||||
|
@ -104,7 +104,6 @@
|
||||
#define HAVE_SYSLOG_H 1
|
||||
#undef HAVE_UNISTD_H
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_STDARG_H 1
|
||||
#undef HAVE_ALLOCA_H
|
||||
#undef HAVE_KILL
|
||||
#define HAVE_GETPID 1
|
||||
|
Loading…
Reference in New Issue
Block a user