aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2001-03-14 16:42:30 +0000
committerAndrew Cagney <cagney@redhat.com>2001-03-14 16:42:30 +0000
commit5bb367b1d911e5893a504ebd2ac301f55cd3ec79 (patch)
tree59ab5aed48339cc88c8792a7741b007f46346d5b /gdb
parent0eee5820aa0f68b2283b40f5a3fb09aefcfb1575 (diff)
downloadgdb-5bb367b1d911e5893a504ebd2ac301f55cd3ec79.zip
gdb-5bb367b1d911e5893a504ebd2ac301f55cd3ec79.tar.gz
gdb-5bb367b1d911e5893a504ebd2ac301f55cd3ec79.tar.bz2
Eliminate some uses of __STDC__.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog16
-rw-r--r--gdb/ch-exp.c2
-rw-r--r--gdb/defs.h21
-rw-r--r--gdb/hppa-tdep.c8
-rw-r--r--gdb/m3-nat.c9
-rw-r--r--gdb/p-lang.h2
-rw-r--r--gdb/printcmd.c4
-rw-r--r--gdb/remote-adapt.c6
-rw-r--r--gdb/remote-eb.c4
-rw-r--r--gdb/remote-mm.c6
-rw-r--r--gdb/scm-tags.h6
-rw-r--r--gdb/ser-go32.c4
-rw-r--r--gdb/ui-out.h2
13 files changed, 17 insertions, 73 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f9de7cf..9b0bcaf 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,19 @@
+2001-03-13 Andrew Cagney <ac131313@redhat.com>
+
+ * ui-out.h: Remove #if __STDC__, assume an ISO-C compiler.
+ * m3-nat.c: Ditto.
+ * p-lang.h: Ditto.
+ * printcmd.c (printf_command): Ditto.
+ * ch-exp.c (match_integer_literal): Ditto.
+ * scm-tags.h: Ditto.
+ * ser-go32.c: Ditto.
+ * hppa-tdep.c (unwind_command): Ditto.
+ * defs.h (volatile): Delete macro definition. Assume __STDC__.
+ * remote-adapt.c (volatile): Ditto.
+ * remote-eb.c (volatile): Ditto.
+ * remote-mm.c (volatile): Ditto.
+ * defs.h (alloca): Assume __STDC__, declare returning void *.
+
2001-03-08 Andrew Cagney <ac131313@redhat.com>
* inferior.h (ARCH_NUM_REGS): Delete definition.
diff --git a/gdb/ch-exp.c b/gdb/ch-exp.c
index c29e7b0..abd51878 100644
--- a/gdb/ch-exp.c
+++ b/gdb/ch-exp.c
@@ -1788,7 +1788,7 @@ match_integer_literal (void)
else
{
yylval.typed_val.val = ival;
-#if defined(CC_HAS_LONG_LONG) && defined(__STDC__)
+#if defined(CC_HAS_LONG_LONG)
if (ival > (LONGEST) 2147483647U || ival < -(LONGEST) 2147483648U)
yylval.typed_val.type = builtin_type_long_long;
else
diff --git a/gdb/defs.h b/gdb/defs.h
index c6a4637..66c3e78 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -764,23 +764,6 @@ enum val_prettyprint
#define CONST_PTR const
#endif
-/*
- * Allow things in gdb to be declared "volatile". If compiling ANSI, it
- * just works. If compiling with gcc but non-ansi, redefine to __volatile__.
- * If non-ansi, non-gcc, then eliminate "volatile" entirely, making those
- * objects be read-write rather than read-only.
- */
-
-#ifndef volatile
-#ifndef __STDC__
-#ifdef __GNUC__
-#define volatile __volatile__
-#else
-#define volatile /* nothing */
-#endif /* GNUC */
-#endif /* STDC */
-#endif /* volatile */
-
/* Defaults for system-wide constants (if not defined by xm.h, we fake it).
FIXME: Assumes 2's complement arithmetic */
@@ -993,11 +976,7 @@ extern void free ();
/* We need to be careful not to declare this in a way which conflicts with
bison. Bison never declares it as char *, but under various circumstances
(like __hpux) we need to use void *. */
-#if defined (__STDC__) || defined (__hpux)
extern void *alloca ();
-#else /* Don't use void *. */
-extern char *alloca ();
-#endif /* Don't use void *. */
#endif /* Not _AIX */
#endif /* Not HAVE_ALLOCA_H */
#endif /* Not GNU C */
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 3b5ee347..3a87908 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -4524,11 +4524,7 @@ unwind_command (char *exp, int from_tty)
printf_unfiltered ("\n\tregion_end = ");
print_address (u->region_end, gdb_stdout);
-#ifdef __STDC__
#define pif(FLD) if (u->FLD) printf_unfiltered (" "#FLD);
-#else
-#define pif(FLD) if (u->FLD) printf_unfiltered (" FLD");
-#endif
printf_unfiltered ("\n\tflags =");
pif (Cannot_unwind);
@@ -4553,11 +4549,7 @@ unwind_command (char *exp, int from_tty)
putchar_unfiltered ('\n');
-#ifdef __STDC__
#define pin(FLD) printf_unfiltered ("\t"#FLD" = 0x%x\n", u->FLD);
-#else
-#define pin(FLD) printf_unfiltered ("\tFLD = 0x%x\n", u->FLD);
-#endif
pin (Region_description);
pin (Entry_FR);
diff --git a/gdb/m3-nat.c b/gdb/m3-nat.c
index 7e78881..4fcf951 100644
--- a/gdb/m3-nat.c
+++ b/gdb/m3-nat.c
@@ -1832,13 +1832,8 @@ mach3_read_inferior (CORE_ADDR addr, char *myaddr, int length)
return length;
}
-#ifdef __STDC__
#define CHK_GOTO_OUT(str,ret) \
do if (ret != KERN_SUCCESS) { errstr = #str; goto out; } while(0)
-#else
-#define CHK_GOTO_OUT(str,ret) \
- do if (ret != KERN_SUCCESS) { errstr = str; goto out; } while(0)
-#endif
struct vm_region_list
{
@@ -4225,11 +4220,7 @@ m3_open (char *arg, int from_tty)
}
#ifdef DUMP_SYSCALL
-#ifdef __STDC__
#define STR(x) #x
-#else
-#define STR(x) "x"
-#endif
char *bsd1_names[] =
{
diff --git a/gdb/p-lang.h b/gdb/p-lang.h
index c03e632..3dd2830 100644
--- a/gdb/p-lang.h
+++ b/gdb/p-lang.h
@@ -19,9 +19,7 @@
/* This file is derived from c-lang.h */
-#ifdef __STDC__ /* Forward decls for prototypes */
struct value;
-#endif
extern int pascal_parse (void); /* Defined in p-exp.y */
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index e3ad2fe..92e06ef 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -2077,11 +2077,7 @@ printf_command (char *arg, int from_tty)
*f++ = '\\';
break;
case 'a':
-#ifdef __STDC__
*f++ = '\a';
-#else
- *f++ = '\007'; /* Bell */
-#endif
break;
case 'b':
*f++ = '\b';
diff --git a/gdb/remote-adapt.c b/gdb/remote-adapt.c
index e732365..c52560b 100644
--- a/gdb/remote-adapt.c
+++ b/gdb/remote-adapt.c
@@ -309,12 +309,6 @@ get_hex_regs (int n, int regno)
/* Called when SIGALRM signal sent due to alarm() timeout. */
#ifndef HAVE_TERMIO
-#ifndef __STDC__
-#ifndef volatile
-#define volatile
-/**/
-# endif
-#endif
volatile int n_alarms;
void
diff --git a/gdb/remote-eb.c b/gdb/remote-eb.c
index a3dc581..476b150 100644
--- a/gdb/remote-eb.c
+++ b/gdb/remote-eb.c
@@ -202,10 +202,6 @@ get_hex_regs (int n, int regno)
/* Called when SIGALRM signal sent due to alarm() timeout. */
#ifndef HAVE_TERMIO
-#ifndef __STDC__
-#define volatile
-/**/
-#endif
volatile int n_alarms;
void
diff --git a/gdb/remote-mm.c b/gdb/remote-mm.c
index 6270ebe..ed72d4b 100644
--- a/gdb/remote-mm.c
+++ b/gdb/remote-mm.c
@@ -118,12 +118,6 @@ FILE *mm_stream;
/* Called when SIGALRM signal sent due to alarm() timeout. */
#ifndef HAVE_TERMIO
-#ifndef __STDC__
-#ifndef volatile
-#define volatile
-/**/
-# endif
-#endif
volatile int n_alarms;
static void
diff --git a/gdb/scm-tags.h b/gdb/scm-tags.h
index 3cd43c7..4fa5ce2 100644
--- a/gdb/scm-tags.h
+++ b/gdb/scm-tags.h
@@ -375,11 +375,5 @@ extern int scm_tc16_key_vector;
#endif /* 0 */
-#ifdef __STDC__
-
-#else /* STDC */
-
-#endif /* STDC */
-
#endif /* TAGSH */
diff --git a/gdb/ser-go32.c b/gdb/ser-go32.c
index ec1c3e0..e3d3bf5 100644
--- a/gdb/ser-go32.c
+++ b/gdb/ser-go32.c
@@ -355,11 +355,7 @@ dos_comisr (int irq)
}
}
-#ifdef __STDC__
#define ISRNAME(x) dos_comisr##x
-#else
-#define ISRNAME(x) dos_comisr/**/x
-#endif
#define ISR(x) static void ISRNAME(x)() {dos_comisr(x);}
ISR (0) ISR (1) ISR (2) ISR (3)
diff --git a/gdb/ui-out.h b/gdb/ui-out.h
index bb5834f..a7be1ed 100644
--- a/gdb/ui-out.h
+++ b/gdb/ui-out.h
@@ -25,10 +25,8 @@
/* The ui_out structure */
-#if __STDC__
struct ui_out;
struct ui_out_data;
-#endif
/* the current ui_out */