From 47aeab855ce44f2d05ed1a1e5eb4751027b14dd0 Mon Sep 17 00:00:00 2001 From: Erwin Janssen Date: Sun, 18 Sep 2016 14:19:02 +0200 Subject: [PATCH] Remove define and usage of HAVE_STDLIB_H The header stdlib.h is always present since we are compiling with standard C. There is no need for this check, since it will always evaluate to true. --- cmd/lefty/dot2l/dotparse.y | 5 +---- cmd/lefty/ws/x11/libfilereq/Dir.c | 4 +--- cmd/lefty/ws/x11/libfilereq/Path.c | 2 -- cmd/lefty/ws/x11/libfilereq/SelFile.c | 4 +--- cmd/tools/convert.h | 2 -- config.iffe | 3 --- configure.ac | 2 +- lib/common/render.h | 2 -- lib/fdpgen/tlayout.c | 2 -- plugin/pango/gvrender_pango.c | 2 -- windows/cmd/lefty/dot2l/dotparse.c | 4 +--- windows/include/config.h | 3 --- 12 files changed, 5 insertions(+), 30 deletions(-) diff --git a/cmd/lefty/dot2l/dotparse.y b/cmd/lefty/dot2l/dotparse.y index 8e2dc3bc5..38fa60a28 100644 --- a/cmd/lefty/dot2l/dotparse.y +++ b/cmd/lefty/dot2l/dotparse.y @@ -22,10 +22,7 @@ typedef void *Tobj; #include "config.h" #include "dot2l.h" -#ifdef HAVE_STDLIB_H -# include -#endif - +#include #include static char portstr[SMALLBUF]; diff --git a/cmd/lefty/ws/x11/libfilereq/Dir.c b/cmd/lefty/ws/x11/libfilereq/Dir.c index fba3004ea..12a55b7da 100644 --- a/cmd/lefty/ws/x11/libfilereq/Dir.c +++ b/cmd/lefty/ws/x11/libfilereq/Dir.c @@ -79,9 +79,7 @@ extern void qsort (); #endif /* defined (SVR4) || defined (SYSV) || defined (USG) */ -#ifdef HAVE_STDLIB_H -# include -#endif +#include #include "SFDecls.h" diff --git a/cmd/lefty/ws/x11/libfilereq/Path.c b/cmd/lefty/ws/x11/libfilereq/Path.c index 496855e23..2f604f579 100644 --- a/cmd/lefty/ws/x11/libfilereq/Path.c +++ b/cmd/lefty/ws/x11/libfilereq/Path.c @@ -58,9 +58,7 @@ extern uid_t getuid (); extern void qsort (); #endif /* defined (SVR4) || defined (SYSV) || defined (USG) */ -#ifdef HAVE_STDLIB_H #include -#endif #include "SFDecls.h" diff --git a/cmd/lefty/ws/x11/libfilereq/SelFile.c b/cmd/lefty/ws/x11/libfilereq/SelFile.c index 094e56cfa..e76d97d05 100644 --- a/cmd/lefty/ws/x11/libfilereq/SelFile.c +++ b/cmd/lefty/ws/x11/libfilereq/SelFile.c @@ -101,9 +101,7 @@ extern char *sys_errlist[]; extern char *getwd (char *); #endif /* !defined (SVR4) && !defined (SYSV) && !defined (USG) */ -#ifdef HAVE_STDLIB_H -# include -#endif +#include #ifdef HAVE_STDINT_H #include diff --git a/cmd/tools/convert.h b/cmd/tools/convert.h index 6872e8c4c..17731bd58 100644 --- a/cmd/tools/convert.h +++ b/cmd/tools/convert.h @@ -21,9 +21,7 @@ extern "C" { #include "config.h" #include -#ifdef HAVE_STDLIB_H #include -#endif #include #include "cgraph.h" diff --git a/config.iffe b/config.iffe index 665b38c4d..ffd964a6e 100644 --- a/config.iffe +++ b/config.iffe @@ -39,7 +39,6 @@ hdr stdarg hdr stdbool hdr stddef hdr stdint -hdr stdlib hdr string hdr strings hdr termios @@ -84,9 +83,7 @@ else { endif link{ - #if HAVE_STDLIB_H #include - #endif #if HAVE_STDINT_H #include #endif diff --git a/configure.ac b/configure.ac index 3777adebb..bb37409d2 100644 --- a/configure.ac +++ b/configure.ac @@ -425,7 +425,7 @@ dnl ----------------------------------- dnl Checks for header files # AC_HEADER_STDC -AC_CHECK_HEADERS(stdarg.h stddef.h stddef.h stdlib.h stdint.h malloc.h \ +AC_CHECK_HEADERS(stdarg.h stddef.h stddef.h stdint.h malloc.h \ fcntl.h search.h pthread.h values.h float.h limits.h termios.h \ errno.h time.h unistd.h fenv.h string.h strings.h inttypes.h setjmp.h \ sys/time.h sys/times.h sys/types.h sys/select.h fpu_control.h \ diff --git a/lib/common/render.h b/lib/common/render.h index 0d3374de4..55c732733 100644 --- a/lib/common/render.h +++ b/lib/common/render.h @@ -22,7 +22,6 @@ extern "C" { #ifdef HAVE_SYS_TYPES_H #include #endif -#ifdef HAVE_STDLIB_H #if !defined(WIN32) && !defined(DARWIN) #define __USE_GNU #include @@ -30,7 +29,6 @@ extern "C" { #else #include #endif -#endif #ifdef HAVE_STDDEF_H #include #endif diff --git a/lib/fdpgen/tlayout.c b/lib/fdpgen/tlayout.c index ff36f8d81..643e6ddab 100644 --- a/lib/fdpgen/tlayout.c +++ b/lib/fdpgen/tlayout.c @@ -33,9 +33,7 @@ #ifdef HAVE_SYS_TYPES_H #include #endif -#ifdef HAVE_STDLIB_H #include -#endif #include #ifndef WIN32 #include diff --git a/plugin/pango/gvrender_pango.c b/plugin/pango/gvrender_pango.c index 03115b1cc..a08664ff7 100644 --- a/plugin/pango/gvrender_pango.c +++ b/plugin/pango/gvrender_pango.c @@ -13,9 +13,7 @@ #include "config.h" -#ifdef HAVE_STDLIB_H #include -#endif #ifdef HAVE_STRING_H #include #endif diff --git a/windows/cmd/lefty/dot2l/dotparse.c b/windows/cmd/lefty/dot2l/dotparse.c index dea835695..1a402d726 100644 --- a/windows/cmd/lefty/dot2l/dotparse.c +++ b/windows/cmd/lefty/dot2l/dotparse.c @@ -87,9 +87,7 @@ typedef void *Tobj; #include "dot2l.h" -#ifdef HAVE_STDLIB_H -# include -#endif +#include #include static char portstr[SMALLBUF]; diff --git a/windows/include/config.h b/windows/include/config.h index 4485bc4db..cfdcc8aca 100644 --- a/windows/include/config.h +++ b/windows/include/config.h @@ -298,9 +298,6 @@ /* Define to 1 if you have the header file. */ //#define HAVE_STDINT_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - /* Define to 1 if you have the `strcasecmp' function. */ //#define HAVE_STRCASECMP 1 -- 2.40.0