RFC: minor defs.h cleanup
Tom Tromey
tromey@redhat.com
Wed Dec 5 17:49:00 GMT 2012
Jan's recent 'long long' patch made me notice that defs.h did a check
for the definition of LONGEST before defining it. I couldn't find any
way for this to be defined though -- I guess it is a relic from some
older configury scheme.
So, this removes the check.
I also noticed a duplicate definition of 'min' and 'max' in defs.h.
So this removes those as well.
Tom
2012-12-05 Tom Tromey <tromey@redhat.com>
* defs.h: Don't check for definition of LONGEST.
(min, max): Remove duplicates.
diff --git a/gdb/defs.h b/gdb/defs.h
index 5e8a681..b365aa4 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -116,8 +116,6 @@ typedef bfd_vma CORE_ADDR;
/* This is to make sure that LONGEST is at least as big as CORE_ADDR. */
-#ifndef LONGEST
-
#ifdef BFD64
#define LONGEST BFD_HOST_64_BIT
@@ -142,8 +140,6 @@ typedef bfd_vma CORE_ADDR;
#endif /* No BFD64 */
-#endif /* ! LONGEST */
-
#ifndef min
#define min(a, b) ((a) < (b) ? (a) : (b))
#endif
@@ -630,12 +626,6 @@ enum gdb_osabi
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
-#ifndef min
-#define min(a, b) ((a) < (b) ? (a) : (b))
-#endif
-#ifndef max
-#define max(a, b) ((a) > (b) ? (a) : (b))
-#endif
#ifndef atof
More information about the Gdb-patches
mailing list