From a64fc6cf442f7dd566f85696aae17ab2249ba01f Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 14 Feb 2015 00:04:36 -0800 Subject: [PATCH] Don't check for C89 headers. 1988 called, they want their lack of a C standard back. We don't need to check whether we have stdarg.h, stddef.h, stdlib.h, or string.h, as they're specified by C89 and I don't think there are any platforms we care about that don't have a C89 environment in which we could be built. Change-Id: I447551181284fab7722354b62774625ed8ee94bc Reviewed-on: https://code.wireshark.org/review/7110 Petri-Dish: Guy Harris Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris --- ConfigureChecks.cmake | 4 ---- asn1/kerberos/packet-kerberos-template.c | 3 --- cmakeconfig.h.in | 12 ------------ config.h.win32 | 6 ------ configure.ac | 2 +- epan/dissectors/packet-aodv.c | 2 -- epan/dissectors/packet-kerberos.c | 9 +++------ epan/packet.c | 3 --- epan/proto.h | 6 +----- 9 files changed, 5 insertions(+), 42 deletions(-) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index a743425191..a3be685778 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -40,12 +40,8 @@ check_include_file("netdb.h" HAVE_NETDB_H) #cmake_pop_check_state() check_include_file("portaudio.h" HAVE_PORTAUDIO_H) check_include_file("pwd.h" HAVE_PWD_H) -check_include_file("stdarg.h" HAVE_STDARG_H) -check_include_file("stddef.h" HAVE_STDDEF_H) check_include_file("stdint.h" HAVE_STDINT_H) -check_include_file("stdlib.h" HAVE_STDLIB_H) check_include_file("strings.h" HAVE_STRINGS_H) -check_include_file("string.h" HAVE_STRING_H) check_include_file("sys/ioctl.h" HAVE_SYS_IOCTL_H) check_include_file("sys/param.h" HAVE_SYS_PARAM_H) check_include_file("sys/socket.h" HAVE_SYS_SOCKET_H) diff --git a/asn1/kerberos/packet-kerberos-template.c b/asn1/kerberos/packet-kerberos-template.c index 9a111da625..bfcbc0d605 100644 --- a/asn1/kerberos/packet-kerberos-template.c +++ b/asn1/kerberos/packet-kerberos-template.c @@ -262,9 +262,6 @@ read_keytab_file_from_preferences(void) #ifdef _WIN32 /* prevent redefinition warnings in kfw-2.5\inc\win_mac.h */ #undef HAVE_GETADDRINFO -#undef HAVE_STDARG_H -#undef HAVE_STDLIB_H -#undef HAVE_STRING_H #undef HAVE_SYS_TYPES_H #endif /* _WIN32 */ #include diff --git a/cmakeconfig.h.in b/cmakeconfig.h.in index 213a5851ba..01cb1bf4f9 100644 --- a/cmakeconfig.h.in +++ b/cmakeconfig.h.in @@ -274,24 +274,12 @@ /* Define to 1 if you have the WinSparkle library */ #cmakedefine HAVE_SOFTWARE_UPDATE 1 -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDARG_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDDEF_H 1 - /* Define to 1 if you have the header file. */ #cmakedefine HAVE_STDINT_H 1 -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDLIB_H 1 - /* Define to 1 if you have the header file. */ #cmakedefine HAVE_STRINGS_H 1 -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STRING_H 1 - /* Define if you have the 'strptime' function. */ #cmakedefine HAVE_STRPTIME 1 diff --git a/config.h.win32 b/config.h.win32 index 403ee9fd29..ec5021b426 100644 --- a/config.h.win32 +++ b/config.h.win32 @@ -119,12 +119,6 @@ /* Define if you have the header file. */ /* #undef HAVE_SNMP_VERSION_H */ -/* Define if you have the header file. */ -#define HAVE_STDARG_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_STDDEF_H */ - /* Define if you have the header file. */ /* #undef HAVE_SYS_IOCTL_H */ diff --git a/configure.ac b/configure.ac index 4e866dc073..6e21650455 100644 --- a/configure.ac +++ b/configure.ac @@ -2537,7 +2537,7 @@ AC_SUBST(LIBCAP_LIBS) dnl Checks for header files. dnl Some of these may not be needed: http://hacks.owlfolio.org/header-survey/ -AC_CHECK_HEADERS(fcntl.h getopt.h grp.h inttypes.h netdb.h pwd.h stdarg.h stddef.h unistd.h) +AC_CHECK_HEADERS(fcntl.h getopt.h grp.h inttypes.h netdb.h pwd.h unistd.h) AC_CHECK_HEADERS(sys/ioctl.h sys/param.h sys/socket.h sys/sockio.h sys/stat.h sys/time.h sys/types.h sys/utsname.h sys/wait.h) AC_CHECK_HEADERS(netinet/in.h) AC_CHECK_HEADERS(arpa/inet.h arpa/nameser.h) diff --git a/epan/dissectors/packet-aodv.c b/epan/dissectors/packet-aodv.c index 8d9762baa7..5a278de637 100644 --- a/epan/dissectors/packet-aodv.c +++ b/epan/dissectors/packet-aodv.c @@ -23,9 +23,7 @@ #include "config.h" -#ifdef HAVE_STDDEF_H #include -#endif #include #include diff --git a/epan/dissectors/packet-kerberos.c b/epan/dissectors/packet-kerberos.c index 4ede65f03b..5cbe79f350 100644 --- a/epan/dissectors/packet-kerberos.c +++ b/epan/dissectors/packet-kerberos.c @@ -513,9 +513,6 @@ read_keytab_file_from_preferences(void) #ifdef _WIN32 /* prevent redefinition warnings in kfw-2.5\inc\win_mac.h */ #undef HAVE_GETADDRINFO -#undef HAVE_STDARG_H -#undef HAVE_STDLIB_H -#undef HAVE_STRING_H #undef HAVE_SYS_TYPES_H #endif /* _WIN32 */ #include @@ -4245,7 +4242,7 @@ dissect_kerberos_ChangePasswdData(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, /*--- End of included file: packet-kerberos-fn.c ---*/ -#line 1985 "../../asn1/kerberos/packet-kerberos-template.c" +#line 1982 "../../asn1/kerberos/packet-kerberos-template.c" /* Make wrappers around exported functions for now */ int @@ -5283,7 +5280,7 @@ void proto_register_kerberos(void) { NULL, HFILL }}, /*--- End of included file: packet-kerberos-hfarr.c ---*/ -#line 2366 "../../asn1/kerberos/packet-kerberos-template.c" +#line 2363 "../../asn1/kerberos/packet-kerberos-template.c" }; /* List of subtrees */ @@ -5357,7 +5354,7 @@ void proto_register_kerberos(void) { &ett_kerberos_ChangePasswdData, /*--- End of included file: packet-kerberos-ettarr.c ---*/ -#line 2382 "../../asn1/kerberos/packet-kerberos-template.c" +#line 2379 "../../asn1/kerberos/packet-kerberos-template.c" }; static ei_register_info ei[] = { diff --git a/epan/packet.c b/epan/packet.c index 07a0c6e05c..458235d78a 100644 --- a/epan/packet.c +++ b/epan/packet.c @@ -27,10 +27,7 @@ #include #include -#ifdef HAVE_STDARG_H #include -#endif - #include #include diff --git a/epan/proto.h b/epan/proto.h index 7436c3099a..11b01b960c 100644 --- a/epan/proto.h +++ b/epan/proto.h @@ -35,11 +35,7 @@ #ifndef __PROTO_H__ #define __PROTO_H__ -#ifdef HAVE_STDARG_H -# include -#else -# include -#endif +#include #include