diff options
author | Craig Burley <burley@gnu.org> | 1998-05-19 06:52:03 -0400 |
---|---|---|
committer | Dave Love <fx@gcc.gnu.org> | 1998-05-19 10:52:03 +0000 |
commit | a843efa0d4ff93324077fbd8b1fc57ed8f4b57f0 (patch) | |
tree | c4e8e02849cc5a16fa5bc00db65b9b2aa8561eaf /libf2c/libF77 | |
parent | deec641e31ba6af1cf67f72546486d5b8c37ee69 (diff) | |
download | gcc-a843efa0d4ff93324077fbd8b1fc57ed8f4b57f0.tar.gz |
Update to Netlib version of 1998-04-20
From-SVN: r19877
Diffstat (limited to 'libf2c/libF77')
-rw-r--r-- | libf2c/libF77/Version.c | 2 | ||||
-rw-r--r-- | libf2c/libF77/dtime_.c | 2 | ||||
-rw-r--r-- | libf2c/libF77/etime_.c | 2 | ||||
-rw-r--r-- | libf2c/libF77/h_dnnt.c | 3 | ||||
-rw-r--r-- | libf2c/libF77/h_nint.c | 3 | ||||
-rw-r--r-- | libf2c/libF77/i_dnnt.c | 3 | ||||
-rw-r--r-- | libf2c/libF77/i_nint.c | 3 | ||||
-rw-r--r-- | libf2c/libF77/main.c | 18 | ||||
-rw-r--r-- | libf2c/libF77/s_paus.c | 6 | ||||
-rw-r--r-- | libf2c/libF77/signal1.h0 | 12 |
10 files changed, 36 insertions, 18 deletions
diff --git a/libf2c/libF77/Version.c b/libf2c/libF77/Version.c index 4f7df49982c..2460a81b368 100644 --- a/libf2c/libF77/Version.c +++ b/libf2c/libF77/Version.c @@ -3,7 +3,7 @@ static char junk[] = "\n@(#)LIBF77 VERSION 19970919\n"; /* */ -char __G77_LIBF77_VERSION__[] = "0.5.22"; +char __G77_LIBF77_VERSION__[] = "0.5.23-19980501"; /* 2.00 11 June 1980. File version.c added to library. diff --git a/libf2c/libF77/dtime_.c b/libf2c/libF77/dtime_.c index 79b6735b13b..95db94f4874 100644 --- a/libf2c/libF77/dtime_.c +++ b/libf2c/libF77/dtime_.c @@ -1,5 +1,7 @@ #include "time.h" #ifndef USE_CLOCK +#define _INCLUDE_POSIX_SOURCE /* for HP-UX */ +#define _INCLUDE_XOPEN_SOURCE /* for HP-UX */ #include "sys/types.h" #include "sys/times.h" #endif diff --git a/libf2c/libF77/etime_.c b/libf2c/libF77/etime_.c index 04528b50bb8..7ed3fce6b27 100644 --- a/libf2c/libF77/etime_.c +++ b/libf2c/libF77/etime_.c @@ -1,5 +1,7 @@ #include "time.h" #ifndef USE_CLOCK +#define _INCLUDE_POSIX_SOURCE /* for HP-UX */ +#define _INCLUDE_XOPEN_SOURCE /* for HP-UX */ #include "sys/types.h" #include "sys/times.h" #endif diff --git a/libf2c/libF77/h_dnnt.c b/libf2c/libF77/h_dnnt.c index 9d0aa25f1d3..005ac6fc412 100644 --- a/libf2c/libF77/h_dnnt.c +++ b/libf2c/libF77/h_dnnt.c @@ -9,6 +9,5 @@ shortint h_dnnt(x) doublereal *x; shortint h_dnnt(doublereal *x) #endif { -return( (*x)>=0 ? - floor(*x + .5) : -floor(.5 - *x) ); +return (shortint)(*x >= 0. ? floor(*x + .5) : -floor(.5 - *x)); } diff --git a/libf2c/libF77/h_nint.c b/libf2c/libF77/h_nint.c index 0af3735da42..6b8dc29b154 100644 --- a/libf2c/libF77/h_nint.c +++ b/libf2c/libF77/h_nint.c @@ -9,6 +9,5 @@ shortint h_nint(x) real *x; shortint h_nint(real *x) #endif { -return( (*x)>=0 ? - floor(*x + .5) : -floor(.5 - *x) ); +return (shortint)(*x >= 0 ? floor(*x + .5) : -floor(.5 - *x)); } diff --git a/libf2c/libF77/i_dnnt.c b/libf2c/libF77/i_dnnt.c index 8fcecb68200..4ede56ac355 100644 --- a/libf2c/libF77/i_dnnt.c +++ b/libf2c/libF77/i_dnnt.c @@ -9,6 +9,5 @@ integer i_dnnt(x) doublereal *x; integer i_dnnt(doublereal *x) #endif { -return( (*x)>=0 ? - floor(*x + .5) : -floor(.5 - *x) ); +return (integer)(*x >= 0. ? floor(*x + .5) : -floor(.5 - *x)); } diff --git a/libf2c/libF77/i_nint.c b/libf2c/libF77/i_nint.c index c0f6795171f..411ce32821e 100644 --- a/libf2c/libF77/i_nint.c +++ b/libf2c/libF77/i_nint.c @@ -9,6 +9,5 @@ integer i_nint(x) real *x; integer i_nint(real *x) #endif { -return( (*x)>=0 ? - floor(*x + .5) : -floor(.5 - *x) ); +return (integer)(*x >= 0 ? floor(*x + .5) : -floor(.5 - *x)); } diff --git a/libf2c/libF77/main.c b/libf2c/libF77/main.c index 469a64bdcb3..343d7bdff1c 100644 --- a/libf2c/libF77/main.c +++ b/libf2c/libF77/main.c @@ -50,38 +50,44 @@ extern int MAIN__(void); #define Int int #endif -static VOID sigfdie(Int n) +static VOID sigfdie(Sigarg) { +Use_Sigarg; sig_die("Floating Exception", 1); } -static VOID sigidie(Int n) +static VOID sigidie(Sigarg) { +Use_Sigarg; sig_die("IOT Trap", 1); } #ifdef SIGQUIT -static VOID sigqdie(Int n) +static VOID sigqdie(Sigarg) { +Use_Sigarg; sig_die("Quit signal", 1); } #endif -static VOID sigindie(Int n) +static VOID sigindie(Sigarg) { +Use_Sigarg; sig_die("Interrupt", 0); } -static VOID sigtdie(Int n) +static VOID sigtdie(Sigarg) { +Use_Sigarg; sig_die("Killed", 0); } #ifdef SIGTRAP -static VOID sigtrdie(Int n) +static VOID sigtrdie(Sigarg) { +Use_Sigarg; sig_die("Trace trap", 1); } #endif diff --git a/libf2c/libF77/s_paus.c b/libf2c/libF77/s_paus.c index ee2a0ee6bf5..a7733a53362 100644 --- a/libf2c/libF77/s_paus.c +++ b/libf2c/libF77/s_paus.c @@ -2,6 +2,7 @@ #include "f2c.h" #define PAUSESIG 15 +#include "signal1.h" #ifdef KR_headers #define Void /* void */ #define Int /* int */ @@ -12,7 +13,6 @@ #undef min #undef max #include <stdlib.h> -#include "signal1.h" #ifdef __cplusplus extern "C" { #endif @@ -22,8 +22,8 @@ extern int getpid(void), isatty(int), pause(void); extern VOID f_exit(Void); static VOID -waitpause(Int n) -{ n = n; /* shut up compiler warning */ +waitpause(Sigarg) +{ Use_Sigarg; return; } diff --git a/libf2c/libF77/signal1.h0 b/libf2c/libF77/signal1.h0 index 8800a18d77b..662cae450dc 100644 --- a/libf2c/libF77/signal1.h0 +++ b/libf2c/libF77/signal1.h0 @@ -12,8 +12,12 @@ #ifdef KR_headers #define Sigarg_t #else +#ifdef __cplusplus +#define Sigarg_t ... +#else #define Sigarg_t int #endif +#endif #endif /*Sigarg_t*/ #ifdef USE_SIG_PF /* compile with -DUSE_SIG_PF under IRIX */ @@ -23,3 +27,11 @@ typedef Sigret_t (*sig_pf)(Sigarg_t); #endif #define signal1(a,b) signal(a,(sig_pf)b) + +#ifdef __cplusplus +#define Sigarg ... +#define Use_Sigarg +#else +#define Sigarg Int n +#define Use_Sigarg n = n /* shut up compiler warning */ +#endif |