diff options
author | Geert Bosch <bosch@gcc.gnu.org> | 2001-10-29 18:45:03 +0100 |
---|---|---|
committer | Geert Bosch <bosch@gcc.gnu.org> | 2001-10-29 18:45:03 +0100 |
commit | 4565903525842e90c4fc5df51cc5dfa3cebfafbe (patch) | |
tree | 84e043479e91b33e543375c19186765d10a6238d | |
parent | 4b77bfab08b2154873311f36bd3e3f1fd37944c1 (diff) | |
download | gcc-4565903525842e90c4fc5df51cc5dfa3cebfafbe.zip gcc-4565903525842e90c4fc5df51cc5dfa3cebfafbe.tar.gz gcc-4565903525842e90c4fc5df51cc5dfa3cebfafbe.tar.bz2 |
* init.c:
(Raise_From_Signal_Handler, Propagate_Signal_Exception): Make arg
const.
(_gnat_error_handler): Make MSG const.
* sysdep.c: Fix localtime_r problem on LynxOS.
Also remove #elif to avoid warnings.
* misc.c (yyparse): Don't set up and register jmpbuf; remove decls
used by this.
* decl.c (annotate_value): Make SIZE unsigned to avoid warning.
From-SVN: r46609
-rw-r--r-- | gcc/ada/ChangeLog | 17 | ||||
-rw-r--r-- | gcc/ada/decl.c | 4 | ||||
-rw-r--r-- | gcc/ada/init.c | 10 | ||||
-rw-r--r-- | gcc/ada/misc.c | 22 | ||||
-rw-r--r-- | gcc/ada/sysdep.c | 29 |
5 files changed, 47 insertions, 35 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index b3670c0..6e62b39 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,20 @@ +2001-10-29 Laurent Guerby <guerby@acm.org> + + * init.c: + (Raise_From_Signal_Handler, Propagate_Signal_Exception): Make arg + const. + (_gnat_error_handler): Make MSG const. + +2001-10-29 Richard Kenner <kenner@gnat.com> + + * sysdep.c: Fix localtime_r problem on LynxOS. + Also remove #elif to avoid warnings. + + * misc.c (yyparse): Don't set up and register jmpbuf; remove decls + used by this. + + * decl.c (annotate_value): Make SIZE unsigned to avoid warning. + 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk> * 86numaux.adb, a-tigeau.ads, a-wtgeau.ads, decl.c, exp_ch6.adb, diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c index aca20c0..7c266e2 100644 --- a/gcc/ada/decl.c +++ b/gcc/ada/decl.c @@ -6,7 +6,7 @@ * * * C Implementation File * * * - * $Revision: 1.5 $ + * $Revision$ * * * Copyright (C) 1992-2001, Free Software Foundation, Inc. * * * @@ -5251,7 +5251,7 @@ annotate_value (gnu_size) TCode tcode; Node_Ref_Or_Val ops[3]; int i; - unsigned int size; + int size; /* If we do not return inside this switch, TCODE will be set to the code to use for a Create_Node operand and LEN (set above) will be diff --git a/gcc/ada/init.c b/gcc/ada/init.c index d20c9cb..1c8f4c7 100644 --- a/gcc/ada/init.c +++ b/gcc/ada/init.c @@ -4,7 +4,7 @@ * * * I N I T * * * - * $Revision: 1.2 $ + * $Revision$ * * * C Implementation File * * * @@ -86,12 +86,12 @@ extern int (*Check_Abort_Status) PARAMS ((void)); #define Raise_From_Signal_Handler \ ada__exceptions__raise_from_signal_handler extern void Raise_From_Signal_Handler PARAMS ((struct Exception_Data *, - char *)); + const char *)); #define Propagate_Signal_Exception \ __gnat_propagate_sig_exc extern void Propagate_Signal_Exception - PARAMS ((struct Machine_State *, struct Exception_Data *, char *)); + PARAMS ((struct Machine_State *, struct Exception_Data *, const char *)); /* Copies of global values computed by the binder */ @@ -226,7 +226,7 @@ __gnat_error_handler (sig) int sig; { struct Exception_Data *exception; - char *msg; + const char *msg; switch (sig) { @@ -557,7 +557,7 @@ __gnat_error_handler (sig) int sig; { struct Exception_Data *exception; - char *msg; + const char *msg; static int recurse = 0; struct sigcontext *info diff --git a/gcc/ada/misc.c b/gcc/ada/misc.c index 298bfc3..edd1d2d 100644 --- a/gcc/ada/misc.c +++ b/gcc/ada/misc.c @@ -6,7 +6,7 @@ * * * C Implementation File * * * - * $Revision: 1.5 $ + * $Revision$ * * * Copyright (C) 1992-2001 Free Software Foundation, Inc. * * * @@ -154,9 +154,6 @@ static char *convert_ada_name_to_qualified_name PARAMS ((char *)); /* For most front-ends, this is the parser for the language. For us, we process the GNAT tree. */ -#define Set_Jmpbuf_Address system__soft_links__set_jmpbuf_address_soft -extern void Set_Jmpbuf_Address (void *); - /* Declare functions we use as part of startup. */ extern void __gnat_initialize PARAMS((void)); extern void adainit PARAMS((void)); @@ -165,34 +162,17 @@ extern void _ada_gnat1drv PARAMS((void)); int yyparse () { - /* Make up what Gigi uses as a jmpbuf. */ - size_t jmpbuf[10]; - /* call the target specific initializations */ __gnat_initialize(); /* Call the front-end elaboration procedures */ adainit (); - /* Set up to catch unhandled exceptions. */ - if (__builtin_setjmp (jmpbuf)) - { - Set_Jmpbuf_Address (0); - abort (); - } - - /* This is only really needed in longjmp/setjmp mode exceptions - but we don't know any easy way to tell what mode the host is - compiled in, and it is harmless to do it unconditionally */ - - Set_Jmpbuf_Address (jmpbuf); - immediate_size_expand = 1; /* Call the front end */ _ada_gnat1drv (); - Set_Jmpbuf_Address (0); return 0; } diff --git a/gcc/ada/sysdep.c b/gcc/ada/sysdep.c index de2c4c5..3ae033a 100644 --- a/gcc/ada/sysdep.c +++ b/gcc/ada/sysdep.c @@ -295,10 +295,12 @@ __gnat_ttyname (filedes) || defined (__MACHTEN__) #include <termios.h> -#elif defined (VMS) +#else +#if defined (VMS) extern char *decc$ga_stdscr; static int initted = 0; #endif +#endif /* Implements the common processing for getc_immediate and getc_immediate_nowait. */ @@ -422,7 +424,8 @@ getc_immediate_common (stream, ch, end_of_file, avail, waiting) } else -#elif defined (VMS) +#else +#if defined (VMS) int fd = fileno (stream); if (isatty (fd)) @@ -444,7 +447,8 @@ getc_immediate_common (stream, ch, end_of_file, avail, waiting) decc$bsd_nocbreak (); } else -#elif defined (__MINGW32__) +#else +#if defined (__MINGW32__) int fd = fileno (stream); int char_waiting; int eot_ch = 4; /* Ctrl-D */ @@ -487,6 +491,8 @@ getc_immediate_common (stream, ch, end_of_file, avail, waiting) } else #endif +#endif +#endif { /* If we're not on a terminal, then we don't need any fancy processing. Also this is the only thing that's left if we're not on one of the @@ -571,9 +577,14 @@ __gnat_localtime_r (timer, tp) return tp; } -#elif defined (__Lynx__) +#else +#if defined (__Lynx__) && defined (___THREADS_POSIX4ad4__) -/* LynxOS provides a non standard localtime_r */ +/* As of LynxOS 3.1.0a patch level 040, LynuxWorks changes the + prototype to the C library function localtime_r from the POSIX.4 + Draft 9 to the POSIX 1.c version. Before this change the following + spec is required. Only use when ___THREADS_POSIX4ad4__ is defined, + the Lynx convention when building against the legacy API. */ extern struct tm *__gnat_localtime_r PARAMS ((const time_t *, struct tm *)); @@ -582,10 +593,12 @@ __gnat_localtime_r (timer, tp) const time_t *timer; struct tm *tp; { - return localtime_r (tp, timer); + localtime_r (tp, timer); + return NULL; } -#elif defined (VMS) || defined (__MINGW32__) +#else +#if defined (VMS) || defined (__MINGW32__) /* __gnat_localtime_r is not needed on NT and VMS */ @@ -603,3 +616,5 @@ __gnat_localtime_r (timer, tp) return (struct tm *) localtime_r (timer, tp); } #endif +#endif +#endif |