diff options
author | bosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-29 17:45:03 +0000 |
---|---|---|
committer | bosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-29 17:45:03 +0000 |
commit | 2570de824e7cd6ac755be1c3722ea0ce90bcabba (patch) | |
tree | 84e043479e91b33e543375c19186765d10a6238d /gcc/ada/sysdep.c | |
parent | 102af56b872dcef99a9c896fbff75fea4b3626fa (diff) | |
download | gcc-2570de824e7cd6ac755be1c3722ea0ce90bcabba.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46609 138bc75d-0d04-0410-961f-82ee72b054a4
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 de2c4c5411c..3ae033aeeeb 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 |