aboutsummaryrefslogtreecommitdiff
path: root/libf2c/libI77
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1998-03-22 03:43:37 -0700
committerJeff Law <law@gcc.gnu.org>1998-03-22 03:43:37 -0700
commit2731cc566bbf5cd7a3ec87dab2816c72d6c58516 (patch)
tree0be9c66017b3b794623f60bffe69c9e5dc2e0bcf /libf2c/libI77
parent44d2eabcec980711169175cb6bdf5f50a306d5e0 (diff)
downloadgcc-2731cc566bbf5cd7a3ec87dab2816c72d6c58516.zip
gcc-2731cc566bbf5cd7a3ec87dab2816c72d6c58516.tar.gz
gcc-2731cc566bbf5cd7a3ec87dab2816c72d6c58516.tar.bz2
Merge in g77-0.5.22.
From-SVN: r18757
Diffstat (limited to 'libf2c/libI77')
-rw-r--r--libf2c/libI77/Version.c2
-rw-r--r--libf2c/libI77/err.c3
-rw-r--r--libf2c/libI77/open.c8
3 files changed, 11 insertions, 2 deletions
diff --git a/libf2c/libI77/Version.c b/libf2c/libI77/Version.c
index d80ea39..6fdf19e 100644
--- a/libf2c/libI77/Version.c
+++ b/libf2c/libI77/Version.c
@@ -3,7 +3,7 @@ static char junk[] = "\n@(#) LIBI77 VERSION pjw,dmg-mods 19970916\n";
/*
*/
-char __G77_LIBI77_VERSION__[] = "0.5.22-19970930";
+char __G77_LIBI77_VERSION__[] = "0.5.22";
/*
2.01 $ format added
diff --git a/libf2c/libI77/err.c b/libf2c/libI77/err.c
index 12eb9ee..cb40630 100644
--- a/libf2c/libI77/err.c
+++ b/libf2c/libI77/err.c
@@ -80,7 +80,8 @@ char *F_err[] =
"'new' file exists", /* 128 */
"can't append to file", /* 129 */
"non-positive record number", /* 130 */
- "I/O started while already doing I/O" /* 131 */
+ "I/O started while already doing I/O", /* 131 */
+ "Temporary file name (TMPDIR?) too long" /* 132 */
};
#define MAXERR (sizeof(F_err)/sizeof(char *)+100)
diff --git a/libf2c/libI77/open.c b/libf2c/libI77/open.c
index b08302b..d7e8491 100644
--- a/libf2c/libI77/open.c
+++ b/libf2c/libI77/open.c
@@ -143,12 +143,20 @@ integer f_open(olist *a)
case 's':
case 'S':
b->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':