aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1998-01-17 21:23:29 +0000
committerJeff Law <law@gcc.gnu.org>1998-01-17 14:23:29 -0700
commit84f79fea91fa299022c62cd3e7a9b42910d974b2 (patch)
treea4d6943ff4d9319f6da03c1e95ca7eab4fa9c236
parent51549d766565888f6f62d93f5fc2691e06f35f35 (diff)
downloadgcc-84f79fea91fa299022c62cd3e7a9b42910d974b2.zip
gcc-84f79fea91fa299022c62cd3e7a9b42910d974b2.tar.gz
gcc-84f79fea91fa299022c62cd3e7a9b42910d974b2.tar.bz2
* choose-temp.c: Sync with gcc.
From-SVN: r17394
-rw-r--r--libiberty/ChangeLog4
-rw-r--r--libiberty/choose-temp.c17
2 files changed, 12 insertions, 9 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 99e56e1..2b11027 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,7 @@
+Sat Jan 17 22:25:53 1998 Jeffrey A Law (law@cygnus.com)
+
+ * choose-temp.c: Sync with gcc version.
+
Thu Dec 4 17:25:19 1997 Jeffrey A Law (law@cygnus.com)
* strsignal.c (sys_nsig): Try NSIG and _NSIG.
diff --git a/libiberty/choose-temp.c b/libiberty/choose-temp.c
index 798de48..d8808ba 100644
--- a/libiberty/choose-temp.c
+++ b/libiberty/choose-temp.c
@@ -1,5 +1,5 @@
/* Utility to pick a temporary filename prefix.
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
@@ -22,7 +22,11 @@ Boston, MA 02111-1307, USA. */
/* This file lives in at least two places: libiberty and gcc.
Don't change one without the other. */
-#ifndef NO_SYS_FILE_H
+#ifdef IN_GCC
+#include "config.h"
+#endif
+
+#ifdef HAVE_SYS_FILE_H
#include <sys/types.h>
#include <sys/file.h> /* May get R_OK, etc. on some systems. */
#endif
@@ -36,7 +40,6 @@ Boston, MA 02111-1307, USA. */
#include <stdio.h> /* May get P_tmpdir. */
#ifdef IN_GCC
-#include "config.h"
#include "gansidecl.h"
extern char *xmalloc ();
#else
@@ -54,7 +57,7 @@ extern char *xmalloc ();
/* On MSDOS, write temp files in current dir
because there's no place else we can expect to use. */
/* ??? Although the current directory is tried as a last resort,
- this is left in so that on MSDOS it is prefered to /tmp on the
+ this is left in so that on MSDOS it is preferred to /tmp on the
off chance that someone requires this, since that was the previous
behaviour. */
#ifdef __MSDOS__
@@ -68,7 +71,7 @@ extern char *xmalloc ();
#define TEMP_FILE "ccXXXXXX"
/* Subroutine of choose_temp_base.
- If BASE is non-NULL, returh it.
+ If BASE is non-NULL, return it.
Otherwise it checks if DIR is a usable directory.
If success, DIR is returned.
Otherwise NULL is returned. */
@@ -114,11 +117,7 @@ choose_temp_base ()
/* If all else fails, use the current directory! */
if (base == 0)
-#ifdef VMS
- base = "[";
-#else
base = ".";
-#endif
#else /* MPW */
base = ":";