* 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
This commit is contained in:
Geert Bosch 2001-10-29 18:45:03 +01:00
parent 4b77bfab08
commit 4565903525
5 changed files with 47 additions and 35 deletions

View File

@ -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,

View File

@ -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

View File

@ -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

View File

@ -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;
}

View File

@ -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 */
@ -486,6 +490,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.
@ -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