diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-06-06 18:13:41 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-06-09 19:07:09 -0400 |
commit | 943f9baa37aa2704820439d4f72a7624c7eb4968 (patch) | |
tree | 6524433ccdab90d3755b1283fddc0292aa36c2bb | |
parent | dc3de083d522ef0fb465adaacd065a61481d4007 (diff) | |
download | gdb-943f9baa37aa2704820439d4f72a7624c7eb4968.zip gdb-943f9baa37aa2704820439d4f72a7624c7eb4968.tar.gz gdb-943f9baa37aa2704820439d4f72a7624c7eb4968.tar.bz2 |
sim: cleanup obsolete NULL fallback
We require C11 which defines NULL, so drop the inconsistent set of
fallback defines in the codebase.
-rw-r--r-- | sim/common/ChangeLog | 4 | ||||
-rw-r--r-- | sim/common/sim-basics.h | 5 | ||||
-rw-r--r-- | sim/igen/ChangeLog | 7 | ||||
-rw-r--r-- | sim/igen/gen-itable.c | 5 | ||||
-rw-r--r-- | sim/igen/gen-model.c | 4 | ||||
-rw-r--r-- | sim/igen/ld-cache.c | 4 | ||||
-rw-r--r-- | sim/igen/ld-decode.c | 4 | ||||
-rw-r--r-- | sim/ppc/ChangeLog | 8 | ||||
-rw-r--r-- | sim/ppc/basics.h | 4 | ||||
-rw-r--r-- | sim/ppc/gen-itable.c | 5 | ||||
-rw-r--r-- | sim/ppc/gen-model.c | 4 | ||||
-rw-r--r-- | sim/ppc/ld-cache.c | 4 | ||||
-rw-r--r-- | sim/ppc/ld-decode.c | 3 |
13 files changed, 19 insertions, 42 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index b5b6db2..2cc89c8 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,5 +1,9 @@ 2021-06-09 Mike Frysinger <vapier@gentoo.org> + * sim-basics.h (NULL): Delete. + +2021-06-09 Mike Frysinger <vapier@gentoo.org> + * nrun.c (main): Set default_callback.target_endian to current_target_byte_order when it's BFD_ENDIAN_UNKNOWN. diff --git a/sim/common/sim-basics.h b/sim/common/sim-basics.h index 25c1193..ac63aef 100644 --- a/sim/common/sim-basics.h +++ b/sim/common/sim-basics.h @@ -36,11 +36,6 @@ #include <setjmp.h> -#ifndef NULL -#define NULL 0 -#endif - - #ifndef min #define min(a, b) ((a) < (b) ? (a) : (b)) #endif diff --git a/sim/igen/ChangeLog b/sim/igen/ChangeLog index 7ef9e1d..22efdf3 100644 --- a/sim/igen/ChangeLog +++ b/sim/igen/ChangeLog @@ -1,3 +1,10 @@ +2021-06-09 Mike Frysinger <vapier@gentoo.org> + + * gen-itable.c (NULL): Delete. + * gen-model.c (NULL): Likewise. + * ld-cache.c (NULL): Likewise. + * ld-decode.c (NULL): Likewise. + 2021-06-05 Mike Frysinger <vapier@gentoo.org> * local.mk (all-recursive): Delete rule. diff --git a/sim/igen/gen-itable.c b/sim/igen/gen-itable.c index 3b50ab6..eedef58 100644 --- a/sim/igen/gen-itable.c +++ b/sim/igen/gen-itable.c @@ -34,11 +34,6 @@ #include "gen-itable.h" -#ifndef NULL -#define NULL 0 -#endif - - typedef struct _itable_info { diff --git a/sim/igen/gen-model.c b/sim/igen/gen-model.c index f162446..054d7b9 100644 --- a/sim/igen/gen-model.c +++ b/sim/igen/gen-model.c @@ -31,10 +31,6 @@ #include "gen-model.h" -#ifndef NULL -#define NULL 0 -#endif - void gen_model_h (lf *file, insn_table *table) diff --git a/sim/igen/ld-cache.c b/sim/igen/ld-cache.c index 24b6222..defe31d 100644 --- a/sim/igen/ld-cache.c +++ b/sim/igen/ld-cache.c @@ -30,10 +30,6 @@ #include "ld-insn.h" #include "ld-cache.h" -#ifndef NULL -#define NULL 0 -#endif - enum { diff --git a/sim/igen/ld-decode.c b/sim/igen/ld-decode.c index 75f2427..6736e6b 100644 --- a/sim/igen/ld-decode.c +++ b/sim/igen/ld-decode.c @@ -31,10 +31,6 @@ #include "ld-decode.h" -#ifndef NULL -#define NULL 0 -#endif - static const name_map decode_type_map[] = { {"normal", normal_decode_rule}, diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog index fcd74c6..9289b8e 100644 --- a/sim/ppc/ChangeLog +++ b/sim/ppc/ChangeLog @@ -1,3 +1,11 @@ +2021-06-09 Mike Frysinger <vapier@gentoo.org> + + * basics.h (NULL): Delete. + * gen-itable.c (NULL): Likewise. + * gen-model.c (NULL): Likewise. + * ld-cache.c (NULL): Likewise. + * ld-decode.c (NULL): Likewise. + 2021-05-29 Mike Frysinger <vapier@gentoo.org> * configure.ac (WERROR_CFLAGS): Add -Wno-format for mingw32 hosts. diff --git a/sim/ppc/basics.h b/sim/ppc/basics.h index 057cf1a..3eb7c61 100644 --- a/sim/ppc/basics.h +++ b/sim/ppc/basics.h @@ -103,10 +103,6 @@ typedef enum { #define NORETURN #endif -#ifndef NULL -#define NULL 0 -#endif - #if !defined (__attribute__) #if (!defined(__GNUC__) \ || (__GNUC__ < 2) \ diff --git a/sim/ppc/gen-itable.c b/sim/ppc/gen-itable.c index 7f3139e..a0d1560 100644 --- a/sim/ppc/gen-itable.c +++ b/sim/ppc/gen-itable.c @@ -32,11 +32,6 @@ #include "igen.h" #include "gen-itable.h" -#ifndef NULL -#define NULL 0 -#endif - - static void itable_h_insn(insn_table *entry, diff --git a/sim/ppc/gen-model.c b/sim/ppc/gen-model.c index a591d31..1322391 100644 --- a/sim/ppc/gen-model.c +++ b/sim/ppc/gen-model.c @@ -30,10 +30,6 @@ #include "gen-model.h" -#ifndef NULL -#define NULL 0 -#endif - static void model_c_or_h_data(insn_table *table, diff --git a/sim/ppc/ld-cache.c b/sim/ppc/ld-cache.c index 29a7035..611ac7a 100644 --- a/sim/ppc/ld-cache.c +++ b/sim/ppc/ld-cache.c @@ -23,10 +23,6 @@ #include "table.h" #include "ld-cache.h" -#ifndef NULL -#define NULL 0 -#endif - enum { ca_type, diff --git a/sim/ppc/ld-decode.c b/sim/ppc/ld-decode.c index 3b2e1a0..cee006f 100644 --- a/sim/ppc/ld-decode.c +++ b/sim/ppc/ld-decode.c @@ -24,9 +24,6 @@ #include "table.h" #include "ld-decode.h" -#ifndef NULL -#define NULL 0 -#endif enum { op_options, |