summaryrefslogtreecommitdiff
path: root/libiberty/choose-temp.c
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1998-12-14 07:01:03 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1998-12-14 07:01:03 +0000
commit11a0bb74cdf64f43744171b7e7c37258981a7741 (patch)
treeb348c86e9e18670eff439b3af199b2013f9faf12 /libiberty/choose-temp.c
parent625c729b515b09ec51322dab459b52fdb203060f (diff)
choose-temp.c: Don't check IN_GCC anymore.
* choose-temp.c: Don't check IN_GCC anymore. * floatformat.c (floatformat_from_double): Use `const', not `CONST'. * memchr.c (memchr): Likewise. * memcpy.c (memcpy): Likewise. * memmove.c (memmove): Likewise. * mkstemp.c: Don't check IN_GCC anymore. * pexecute.c: Likewise. * splay-tree.c: Likewise. * strchr.c (strchr): Use `const', not `CONST'. * strrchr.c (strrchr): Likewise. * strtol.c (strtol): Likewise. * strtoul.c (strtoul): Likewise. From-SVN: r24307
Diffstat (limited to 'libiberty/choose-temp.c')
-rw-r--r--libiberty/choose-temp.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/libiberty/choose-temp.c b/libiberty/choose-temp.c
index 089bd10208d..c295ca15b2a 100644
--- a/libiberty/choose-temp.c
+++ b/libiberty/choose-temp.c
@@ -22,22 +22,16 @@ Boston, MA 02111-1307, USA. */
/* This file lives in at least two places: libiberty and gcc.
Don't change one without the other. */
-#if defined (IN_GCC) || defined (HAVE_CONFIG_H)
+#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-#ifdef IN_GCC
-#include "system.h"
-#else
-
-/* If we are in gcc, system.h has handled everything. When not in
- gcc, if we have a config.h we assume that HAVE_SYS_FILE_H tells us
- whether to include sys/file.h. However, libiberty does not have a
- config.h, and instead arranges to define NO_SYS_FILE_H on the
- command line when there is no sys/file.h. */
-
-#if defined (HAVE_CONFIG_H) ? defined (HAVE_SYS_FILE_H) : ! defined (NO_SYS_FILE_H)
+#include <stdio.h> /* May get P_tmpdir. */
#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_SYS_FILE_H
#include <sys/file.h> /* May get R_OK, etc. on some systems. */
#endif
@@ -47,13 +41,10 @@ Boston, MA 02111-1307, USA. */
#define X_OK 1
#endif
-#include <stdio.h> /* May get P_tmpdir. */
-#endif /* IN_GCC */
-
#include "libiberty.h"
-#ifdef IN_GCC
extern int mkstemps ();
-#else
+
+#ifndef IN_GCC
#if defined (__MSDOS__) || defined (_WIN32)
#define DIR_SEPARATOR '\\'
#endif