From e84184056559e90f2dffc7f7648f40705864e088 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Fri, 28 Nov 2008 15:08:27 +0000 Subject: [PATCH] Unconditionally include stdlib.h. [r24123] --- include/libfirm/adt/xmalloc.h | 4 +--- ir/adt/array.c | 4 +--- ir/adt/pdeq.c | 4 +--- ir/adt/xmalloc.c | 4 +--- ir/ana/analyze_irg_args.c | 4 +--- ir/ana/callgraph.c | 2 -- ir/ana/irloop.c | 4 +--- ir/ana/irscc.c | 4 +--- ir/ana/phiclass.c | 4 +--- ir/be/besched.c | 4 +--- ir/be/mips/mips_scheduler.c | 4 ---- ir/debug/debugger.c | 4 ---- ir/ir/irarch.c | 5 +---- ir/ir/irdump.c | 2 -- ir/ir/irdumptxt.c | 3 --- ir/ir/irgwalk.c | 4 +--- ir/libcore/lc_opts.c | 5 ++--- ir/libcore/lc_opts_enum.c | 4 +--- ir/lower/lower_dw.c | 5 +---- ir/stat/firmstat.c | 4 +--- ir/stat/pattern_dmp.c | 4 +--- ir/tr/type.c | 5 +---- ir/tr/typewalk.c | 5 +---- ir/tv/fltcalc.c | 4 +--- ir/tv/strcalc.c | 4 +--- ir/tv/tv.c | 4 +--- win32/config.h | 3 --- 27 files changed, 22 insertions(+), 85 deletions(-) diff --git a/include/libfirm/adt/xmalloc.h b/include/libfirm/adt/xmalloc.h index 0d292ca05..d9d8d75fc 100644 --- a/include/libfirm/adt/xmalloc.h +++ b/include/libfirm/adt/xmalloc.h @@ -91,9 +91,7 @@ char *xstrdup(const char *str); /* Includes for alloca() */ -#if defined(__FreeBSD__) -#include -#elif defined(_WIN32) +#ifdef _WIN32 #include #endif #ifdef HAVE_ALLOCA_H diff --git a/ir/adt/array.c b/ir/adt/array.c index ad721ad3c..84674e3c0 100644 --- a/ir/adt/array.c +++ b/ir/adt/array.c @@ -26,9 +26,7 @@ #include "config.h" -#ifdef HAVE_STDLIB_H -# include -#endif +#include #include "array_t.h" #include "xmalloc.h" diff --git a/ir/adt/pdeq.c b/ir/adt/pdeq.c index fd73298f9..09bf87235 100644 --- a/ir/adt/pdeq.c +++ b/ir/adt/pdeq.c @@ -29,9 +29,7 @@ #ifdef HAVE_STDIO_H # include #endif -#ifdef HAVE_STDLIB_H -# include -#endif +#include #ifdef HAVE_STRING_H # include #endif diff --git a/ir/adt/xmalloc.c b/ir/adt/xmalloc.c index 902779edd..79d7a634e 100644 --- a/ir/adt/xmalloc.c +++ b/ir/adt/xmalloc.c @@ -31,9 +31,7 @@ #ifdef HAVE_STRING_H # include #endif -#ifdef HAVE_STDLIB_H -# include -#endif +#include #include "xmalloc.h" #include "error.h" diff --git a/ir/ana/analyze_irg_args.c b/ir/ana/analyze_irg_args.c index af364c28c..305475641 100644 --- a/ir/ana/analyze_irg_args.c +++ b/ir/ana/analyze_irg_args.c @@ -25,9 +25,7 @@ */ #include "config.h" -#ifdef HAVE_STDLIB_H -# include -#endif +#include #include "irouts.h" #include "irnode_t.h" diff --git a/ir/ana/callgraph.c b/ir/ana/callgraph.c index 78b8adde4..335116003 100644 --- a/ir/ana/callgraph.c +++ b/ir/ana/callgraph.c @@ -29,9 +29,7 @@ #ifdef HAVE_STRING_H # include #endif -# ifdef HAVE_STDLIB_H #include -#endif #include "callgraph.h" diff --git a/ir/ana/irloop.c b/ir/ana/irloop.c index 2f655a625..21aef6dd7 100644 --- a/ir/ana/irloop.c +++ b/ir/ana/irloop.c @@ -29,9 +29,7 @@ #ifdef HAVE_STRING_H # include #endif -#ifdef HAVE_STDLIB_H -# include -#endif +#include #include "irloop_t.h" #include "irprog_t.h" diff --git a/ir/ana/irscc.c b/ir/ana/irscc.c index 931ad3f86..7c3d8ab39 100644 --- a/ir/ana/irscc.c +++ b/ir/ana/irscc.c @@ -32,9 +32,7 @@ #ifdef HAVE_STRING_H # include #endif -#ifdef HAVE_STDLIB_H -# include -#endif +#include #include "irloop_t.h" diff --git a/ir/ana/phiclass.c b/ir/ana/phiclass.c index 85c5e6e22..421cef92f 100644 --- a/ir/ana/phiclass.c +++ b/ir/ana/phiclass.c @@ -26,9 +26,7 @@ */ #include "config.h" -#ifdef HAVE_STDLIB_H -# include -#endif +#include #include "irnode.h" #include "debug.h" diff --git a/ir/be/besched.c b/ir/be/besched.c index 0a84ac4d7..07c2ab0f6 100644 --- a/ir/be/besched.c +++ b/ir/be/besched.c @@ -25,9 +25,7 @@ */ #include "config.h" -#ifdef HAVE_STDLIB_H -# include -#endif +#include #include "impl.h" #include "irprintf.h" diff --git a/ir/be/mips/mips_scheduler.c b/ir/be/mips/mips_scheduler.c index 9eb93c845..156d05694 100644 --- a/ir/be/mips/mips_scheduler.c +++ b/ir/be/mips/mips_scheduler.c @@ -25,10 +25,6 @@ */ #include "config.h" -#ifdef HAVE_STDLIB_H -#include -#endif - #include "mips_scheduler.h" #include "../besched_t.h" diff --git a/ir/debug/debugger.c b/ir/debug/debugger.c index 9117378ee..313dc118d 100644 --- a/ir/debug/debugger.c +++ b/ir/debug/debugger.c @@ -31,13 +31,9 @@ #ifdef _WIN32 #define WIN32_LEAN_AND_MEAN #include - #endif -#ifdef HAVE_STDLIB_H #include -#endif - #include #include diff --git a/ir/ir/irarch.c b/ir/ir/irarch.c index a3b7413aa..387310f19 100644 --- a/ir/ir/irarch.c +++ b/ir/ir/irarch.c @@ -29,10 +29,7 @@ */ #include "config.h" -#ifdef HAVE_STDLIB_H -# include -#endif - +#include #include #include "irnode_t.h" diff --git a/ir/ir/irdump.c b/ir/ir/irdump.c index 88d42d631..9d09826b0 100644 --- a/ir/ir/irdump.c +++ b/ir/ir/irdump.c @@ -28,9 +28,7 @@ #ifdef HAVE_STRING_H #include #endif -#ifdef HAVE_STDLIB_H #include -#endif #include #include "firm_common_t.h" diff --git a/ir/ir/irdumptxt.c b/ir/ir/irdumptxt.c index b5fdb4217..9a2df210a 100644 --- a/ir/ir/irdumptxt.c +++ b/ir/ir/irdumptxt.c @@ -28,10 +28,7 @@ #ifdef HAVE_STRING_H #include #endif -#ifdef HAVE_STDLIB_H #include -#endif - #include #include "irdump_t.h" diff --git a/ir/ir/irgwalk.c b/ir/ir/irgwalk.c index 7a32f7c45..78daadee3 100644 --- a/ir/ir/irgwalk.c +++ b/ir/ir/irgwalk.c @@ -29,9 +29,7 @@ */ #include "config.h" -#ifdef HAVE_STDLIB_H -# include -#endif +#include #include "irnode_t.h" #include "irgraph_t.h" diff --git a/ir/libcore/lc_opts.c b/ir/libcore/lc_opts.c index f55f5e326..4d6b20527 100644 --- a/ir/libcore/lc_opts.c +++ b/ir/libcore/lc_opts.c @@ -20,12 +20,11 @@ #include #include +#include #include #include -#if defined(__FreeBSD__) -#include -#elif defined(_WIN32) +#ifdef _WIN32 #include #endif #ifdef HAVE_ALLOCA_H diff --git a/ir/libcore/lc_opts_enum.c b/ir/libcore/lc_opts_enum.c index cb66e54db..75ce0ff9f 100644 --- a/ir/libcore/lc_opts_enum.c +++ b/ir/libcore/lc_opts_enum.c @@ -15,9 +15,7 @@ #include #include -#if defined(__FreeBSD__) -#include -#elif defined(_WIN32) +#ifdef _WIN32 #include #endif #ifdef HAVE_ALLOCA_H diff --git a/ir/lower/lower_dw.c b/ir/lower/lower_dw.c index fc1d2cb77..464f5a3ea 100644 --- a/ir/lower/lower_dw.c +++ b/ir/lower/lower_dw.c @@ -29,10 +29,7 @@ #ifdef HAVE_STRING_H # include #endif -#ifdef HAVE_STDLIB_H -# include -#endif - +#include #include #include "error.h" diff --git a/ir/stat/firmstat.c b/ir/stat/firmstat.c index 94e53bfbe..623fd5448 100644 --- a/ir/stat/firmstat.c +++ b/ir/stat/firmstat.c @@ -28,10 +28,8 @@ #ifdef FIRM_STATISTICS #include +#include -#ifdef HAVE_STDLIB_H -# include -#endif #ifdef HAVE_STRING_H # include #endif diff --git a/ir/stat/pattern_dmp.c b/ir/stat/pattern_dmp.c index 1aee6e8c0..ef7136a6c 100644 --- a/ir/stat/pattern_dmp.c +++ b/ir/stat/pattern_dmp.c @@ -28,9 +28,7 @@ #ifdef FIRM_STATISTICS #include -#ifdef HAVE_STDLIB_H -# include -#endif +#include #include "ident.h" #include "irop_t.h" diff --git a/ir/tr/type.c b/ir/tr/type.c index 0dbe259a2..764b657af 100644 --- a/ir/tr/type.c +++ b/ir/tr/type.c @@ -50,10 +50,7 @@ #ifdef HAVE_STRING_H # include #endif -#ifdef HAVE_STDLIB_H -# include -#endif - +#include #include #include "type_t.h" diff --git a/ir/tr/typewalk.c b/ir/tr/typewalk.c index fde9e46f6..363fddbd6 100644 --- a/ir/tr/typewalk.c +++ b/ir/tr/typewalk.c @@ -31,10 +31,7 @@ */ #include "config.h" -#ifdef HAVE_STDLIB_H -# include -#endif - +#include #include #include "entity_t.h" diff --git a/ir/tv/fltcalc.c b/ir/tv/fltcalc.c index 47251e8bd..ba377b188 100644 --- a/ir/tv/fltcalc.c +++ b/ir/tv/fltcalc.c @@ -42,9 +42,7 @@ #ifdef HAVE_STRING_H # include #endif -#ifdef HAVE_STDLIB_H -# include -#endif +#include #include #include diff --git a/ir/tv/strcalc.c b/ir/tv/strcalc.c index ac54d0aee..13e97dada 100644 --- a/ir/tv/strcalc.c +++ b/ir/tv/strcalc.c @@ -27,9 +27,7 @@ #include "config.h" -#ifdef HAVE_STDLIB_H -# include -#endif +#include #ifdef HAVE_STRING_H # include /* memset/memcmp */ #endif diff --git a/ir/tv/tv.c b/ir/tv/tv.c index 3e3d82141..269b3e2e2 100644 --- a/ir/tv/tv.c +++ b/ir/tv/tv.c @@ -41,9 +41,7 @@ #ifdef HAVE_STRINGS_H #include /* strings.h also includes bsd only function strcasecmp */ #endif -#ifdef HAVE_STDLIB_H -# include -#endif +#include #include "tv_t.h" #include "set.h" /* to store tarvals in */ diff --git a/win32/config.h b/win32/config.h index 963d3d725..c09ae46b6 100644 --- a/win32/config.h +++ b/win32/config.h @@ -26,9 +26,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 header file. */ /* #undef HAVE_STRINGS_H */ -- 2.20.1