From 2731cc566bbf5cd7a3ec87dab2816c72d6c58516 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Sun, 22 Mar 1998 03:43:37 -0700 Subject: [PATCH] Merge in g77-0.5.22. From-SVN: r18757 --- libf2c/ChangeLog | 22 ++++++++++++ libf2c/configure | 78 +++++++++++++++++++++++++++++++++++------ libf2c/configure.in | 2 ++ libf2c/libF77/Version.c | 2 +- libf2c/libI77/Version.c | 2 +- libf2c/libI77/err.c | 3 +- libf2c/libI77/open.c | 8 +++++ libf2c/libU77/Version.c | 2 +- 8 files changed, 104 insertions(+), 15 deletions(-) diff --git a/libf2c/ChangeLog b/libf2c/ChangeLog index c66c0aaeed39..3e890556c43b 100644 --- a/libf2c/ChangeLog +++ b/libf2c/ChangeLog @@ -1,3 +1,8 @@ +Sat Feb 28 15:32:15 1998 Craig Burley + + * libI77/open.c (f_open): Use sizeof(buf) instead of + 256, for the usual reasons. + Tue Dec 23 22:56:01 1997 Craig Burley * libF77/signal_.c (G77_signal_0): Return type is @@ -9,6 +14,17 @@ Wed Oct 29 01:01:04 1997 Mumit Khan * configure.in: Set CC to CC_FOR_TARGET when cross-compiling. +Fri Oct 24 11:15:22 1997 Mumit Khan + + * libI77/close.c (f_exit): Reset f__init so that f_clos does not + (incorrectly) think there is an I/O recursion when program is + interrupted. + +Wed Oct 15 10:06:29 1997 Richard Henderson + + * libI77/fio.h: Include if STDC_HEADERS. + * libU77/chmod_.c: Likewise. + Tue Sep 30 00:41:39 1997 Craig Burley Do a better job of printing the offending FORMAT string @@ -532,6 +548,12 @@ Thu Oct 31 22:27:45 1996 Craig Burley * libI77/Version.c: Use , not "stdio.h". * libF77/Version.c: Likewise. +1997-10-03 Dave Love + + * configure.in: Check for tempnam (best because it obeys TMPDIR). + * libI77/open.c: Use it. + * libI77/err.c: New message # 132. + Wed Aug 28 13:25:29 1996 Dave Love * libI77/rsne.c (x_rsne): Use size_t instead of int. diff --git a/libf2c/configure b/libf2c/configure index 0748196a32e2..e35980d11c16 100755 --- a/libf2c/configure +++ b/libf2c/configure @@ -1567,24 +1567,80 @@ fi +for ac_func in tempnam +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:1574: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:1602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + # posix will guarantee the right behaviour for sprintf, else we can't be # sure; HEADER_STDC wouldn't be the right check in sunos4, for instance. # However, on my sunos4/gcc setup unistd.h leads us wrongly to believe # we're posix-conformant, so always do the test. echo $ac_n "checking for ansi/posix sprintf result""... $ac_c" 1>&6 -echo "configure:1576: checking for ansi/posix sprintf result" >&5 +echo "configure:1632: checking for ansi/posix sprintf result" >&5 if test "$cross_compiling" = yes; then g77_cv_sys_sprintf_ansi=no else cat > conftest.$ac_ext < /* does sprintf return the number of chars transferred? */ main () {char foo[2]; (sprintf(foo, "1") == 1) ? exit(0) : exit(1);} EOF -if { (eval echo configure:1588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then g77_cv_sys_sprintf_ansi=yes else @@ -1618,9 +1674,9 @@ fi # define NON_ANSI_RW_MODES on unix (can't hurt) echo $ac_n "checking NON_ANSI_RW_MODES""... $ac_c" 1>&6 -echo "configure:1622: checking NON_ANSI_RW_MODES" >&5 +echo "configure:1678: checking NON_ANSI_RW_MODES" >&5 cat > conftest.$ac_ext <&6 -echo "configure:1665: checking f2c integer type" >&5 +echo "configure:1721: checking f2c integer type" >&5 late_ac_cpp=$ac_cpp ac_cpp="$late_ac_cpp -I$srcdir/../gcc/f -I../../gcc -I$srcdir/../gcc -I$srcdir/../gcc/config" if eval "test \"`echo '$''{'g77_cv_sys_f2cinteger'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < conftest.$ac_ext <&6 -echo "configure:1730: checking f2c long int type" >&5 +echo "configure:1786: checking f2c long int type" >&5 late_ac_cpp=$ac_cpp ac_cpp="$late_ac_cpp -I$srcdir/../gcc/f -I../../gcc -I$srcdir/../gcc -I$srcdir/../gcc/config" if eval "test \"`echo '$''{'g77_cv_sys_f2clongint'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < conftest.$ac_ext <uscrtch=1; +#ifdef HAVE_TEMPNAM /* Allow use of TMPDIR preferentially. */ + s = tempnam (0, buf); + if (strlen (s) >= sizeof (buf)) + err (a->oerr, 132, "open"); + (void) strcpy (buf, s); + free (s); +#else /* ! defined (HAVE_TEMPNAM) */ #ifdef _POSIX_SOURCE tmpnam(buf); #else (void) strcpy(buf,"tmp.FXXXXXX"); (void) mktemp(buf); #endif +#endif /* ! defined (HAVE_TEMPNAM) */ goto replace; case 'n': case 'N': diff --git a/libf2c/libU77/Version.c b/libf2c/libU77/Version.c index 0a278382f51d..99c58c923136 100644 --- a/libf2c/libU77/Version.c +++ b/libf2c/libU77/Version.c @@ -1,6 +1,6 @@ static char junk[] = "\n@(#) LIBU77 VERSION 19970919\n"; -char __G77_LIBU77_VERSION__[] = "0.5.22-970919"; +char __G77_LIBU77_VERSION__[] = "0.5.22"; #include