Commit 45659035 by Geert Bosch

* 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
parent 4b77bfab
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> 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
* 86numaux.adb, a-tigeau.ads, a-wtgeau.ads, decl.c, exp_ch6.adb, * 86numaux.adb, a-tigeau.ads, a-wtgeau.ads, decl.c, exp_ch6.adb,
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* * * *
* C Implementation File * * C Implementation File *
* * * *
* $Revision: 1.5 $ * $Revision$
* * * *
* Copyright (C) 1992-2001, Free Software Foundation, Inc. * * Copyright (C) 1992-2001, Free Software Foundation, Inc. *
* * * *
...@@ -5251,7 +5251,7 @@ annotate_value (gnu_size) ...@@ -5251,7 +5251,7 @@ annotate_value (gnu_size)
TCode tcode; TCode tcode;
Node_Ref_Or_Val ops[3]; Node_Ref_Or_Val ops[3];
int i; int i;
unsigned int size; int size;
/* If we do not return inside this switch, TCODE will be set to the /* 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 code to use for a Create_Node operand and LEN (set above) will be
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* * * *
* I N I T * * I N I T *
* * * *
* $Revision: 1.2 $ * $Revision$
* * * *
* C Implementation File * * C Implementation File *
* * * *
...@@ -86,12 +86,12 @@ extern int (*Check_Abort_Status) PARAMS ((void)); ...@@ -86,12 +86,12 @@ extern int (*Check_Abort_Status) PARAMS ((void));
#define Raise_From_Signal_Handler \ #define Raise_From_Signal_Handler \
ada__exceptions__raise_from_signal_handler ada__exceptions__raise_from_signal_handler
extern void Raise_From_Signal_Handler PARAMS ((struct Exception_Data *, extern void Raise_From_Signal_Handler PARAMS ((struct Exception_Data *,
char *)); const char *));
#define Propagate_Signal_Exception \ #define Propagate_Signal_Exception \
__gnat_propagate_sig_exc __gnat_propagate_sig_exc
extern void Propagate_Signal_Exception 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 */ /* Copies of global values computed by the binder */
...@@ -226,7 +226,7 @@ __gnat_error_handler (sig) ...@@ -226,7 +226,7 @@ __gnat_error_handler (sig)
int sig; int sig;
{ {
struct Exception_Data *exception; struct Exception_Data *exception;
char *msg; const char *msg;
switch (sig) switch (sig)
{ {
...@@ -557,7 +557,7 @@ __gnat_error_handler (sig) ...@@ -557,7 +557,7 @@ __gnat_error_handler (sig)
int sig; int sig;
{ {
struct Exception_Data *exception; struct Exception_Data *exception;
char *msg; const char *msg;
static int recurse = 0; static int recurse = 0;
struct sigcontext *info struct sigcontext *info
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* * * *
* C Implementation File * * C Implementation File *
* * * *
* $Revision: 1.5 $ * $Revision$
* * * *
* Copyright (C) 1992-2001 Free Software Foundation, Inc. * * Copyright (C) 1992-2001 Free Software Foundation, Inc. *
* * * *
...@@ -154,9 +154,6 @@ static char *convert_ada_name_to_qualified_name PARAMS ((char *)); ...@@ -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 /* For most front-ends, this is the parser for the language. For us, we
process the GNAT tree. */ 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. */ /* Declare functions we use as part of startup. */
extern void __gnat_initialize PARAMS((void)); extern void __gnat_initialize PARAMS((void));
extern void adainit PARAMS((void)); extern void adainit PARAMS((void));
...@@ -165,34 +162,17 @@ extern void _ada_gnat1drv PARAMS((void)); ...@@ -165,34 +162,17 @@ extern void _ada_gnat1drv PARAMS((void));
int int
yyparse () yyparse ()
{ {
/* Make up what Gigi uses as a jmpbuf. */
size_t jmpbuf[10];
/* call the target specific initializations */ /* call the target specific initializations */
__gnat_initialize(); __gnat_initialize();
/* Call the front-end elaboration procedures */ /* Call the front-end elaboration procedures */
adainit (); 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; immediate_size_expand = 1;
/* Call the front end */ /* Call the front end */
_ada_gnat1drv (); _ada_gnat1drv ();
Set_Jmpbuf_Address (0);
return 0; return 0;
} }
......
...@@ -295,10 +295,12 @@ __gnat_ttyname (filedes) ...@@ -295,10 +295,12 @@ __gnat_ttyname (filedes)
|| defined (__MACHTEN__) || defined (__MACHTEN__)
#include <termios.h> #include <termios.h>
#elif defined (VMS) #else
#if defined (VMS)
extern char *decc$ga_stdscr; extern char *decc$ga_stdscr;
static int initted = 0; static int initted = 0;
#endif #endif
#endif
/* Implements the common processing for getc_immediate and /* Implements the common processing for getc_immediate and
getc_immediate_nowait. */ getc_immediate_nowait. */
...@@ -422,7 +424,8 @@ getc_immediate_common (stream, ch, end_of_file, avail, waiting) ...@@ -422,7 +424,8 @@ getc_immediate_common (stream, ch, end_of_file, avail, waiting)
} }
else else
#elif defined (VMS) #else
#if defined (VMS)
int fd = fileno (stream); int fd = fileno (stream);
if (isatty (fd)) if (isatty (fd))
...@@ -444,7 +447,8 @@ getc_immediate_common (stream, ch, end_of_file, avail, waiting) ...@@ -444,7 +447,8 @@ getc_immediate_common (stream, ch, end_of_file, avail, waiting)
decc$bsd_nocbreak (); decc$bsd_nocbreak ();
} }
else else
#elif defined (__MINGW32__) #else
#if defined (__MINGW32__)
int fd = fileno (stream); int fd = fileno (stream);
int char_waiting; int char_waiting;
int eot_ch = 4; /* Ctrl-D */ int eot_ch = 4; /* Ctrl-D */
...@@ -487,6 +491,8 @@ getc_immediate_common (stream, ch, end_of_file, avail, waiting) ...@@ -487,6 +491,8 @@ getc_immediate_common (stream, ch, end_of_file, avail, waiting)
} }
else else
#endif #endif
#endif
#endif
{ {
/* If we're not on a terminal, then we don't need any fancy processing. /* 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 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) ...@@ -571,9 +577,14 @@ __gnat_localtime_r (timer, tp)
return 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 *)); extern struct tm *__gnat_localtime_r PARAMS ((const time_t *, struct tm *));
...@@ -582,10 +593,12 @@ __gnat_localtime_r (timer, tp) ...@@ -582,10 +593,12 @@ __gnat_localtime_r (timer, tp)
const time_t *timer; const time_t *timer;
struct tm *tp; 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 */ /* __gnat_localtime_r is not needed on NT and VMS */
...@@ -603,3 +616,5 @@ __gnat_localtime_r (timer, tp) ...@@ -603,3 +616,5 @@ __gnat_localtime_r (timer, tp)
return (struct tm *) localtime_r (timer, tp); return (struct tm *) localtime_r (timer, tp);
} }
#endif #endif
#endif
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment