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 /gcc/ada/sysdep.c | |
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
Diffstat (limited to 'gcc/ada/sysdep.c')
-rw-r--r-- | gcc/ada/sysdep.c | 29 |
1 files changed, 22 insertions, 7 deletions
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 |