Skip to content

Commit b189c24

Browse files
committed
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
1 parent d3ca28f commit b189c24

15 files changed

+357
-398
lines changed

TSRM/TSRM.c

-3
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@
1515
#ifdef ZTS
1616

1717
#include <stdio.h>
18-
19-
#if HAVE_STDARG_H
2018
#include <stdarg.h>
21-
#endif
2219

2320
typedef struct _tsrm_tls_entry tsrm_tls_entry;
2421

TSRM/tsrm.m4

-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ dnl AC_REQUIRE([AM_PROG_CC_STDC])dnl
77
AC_REQUIRE([AC_PROG_CC_C_O])dnl
88
AC_REQUIRE([AC_PROG_RANLIB])dnl
99
10-
AC_CHECK_HEADERS(stdarg.h)
11-
1210
AC_CHECK_FUNCS(sigprocmask)
1311
1412
AX_FUNC_WHICH_GETHOSTBYNAME_R()

Zend/Zend.m4

-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ stdint.h \
5151
limits.h \
5252
malloc.h \
5353
unistd.h \
54-
stdarg.h \
5554
sys/types.h \
5655
sys/time.h \
5756
signal.h \

Zend/zend_API.c

-2
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@
3030
#include "zend_closures.h"
3131
#include "zend_inheritance.h"
3232

33-
#ifdef HAVE_STDARG_H
3433
#include <stdarg.h>
35-
#endif
3634

3735
/* these variables are true statics/globals, and have to be mutex'ed on every access */
3836
ZEND_API HashTable module_registry;

Zend/zend_compile.h

+1-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@
2323
#include "zend.h"
2424
#include "zend_ast.h"
2525

26-
#ifdef HAVE_STDARG_H
27-
# include <stdarg.h>
28-
#endif
26+
#include <stdarg.h>
2927

3028
#include "zend_llist.h"
3129

0 commit comments

Comments
 (0)