diff options
author | obrien <obrien@FreeBSD.org> | 1999-11-04 10:23:25 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 1999-11-04 10:23:25 +0000 |
commit | eb5e8caab7fd01a193f83e1349fd31fc3e2f455b (patch) | |
tree | a1d4babd1c85e9d1e1a980024d2586fa88596cd8 /contrib/gcc | |
parent | 2c20d04b8679df41628ad0f57eae4f4d90889e5f (diff) | |
download | FreeBSD-src-eb5e8caab7fd01a193f83e1349fd31fc3e2f455b.zip FreeBSD-src-eb5e8caab7fd01a193f83e1349fd31fc3e2f455b.tar.gz |
Merge rev 1.2 (use /tmp 1st, and then /var/tmp) into GCC 2.95.1.
Diffstat (limited to 'contrib/gcc')
-rw-r--r-- | contrib/gcc/choose-temp.c | 34 |
1 files changed, 13 insertions, 21 deletions
diff --git a/contrib/gcc/choose-temp.c b/contrib/gcc/choose-temp.c index 56b229e..018f7d9 100644 --- a/contrib/gcc/choose-temp.c +++ b/contrib/gcc/choose-temp.c @@ -24,22 +24,19 @@ Boston, MA 02111-1307, USA. */ /* $FreeBSD$ */ -#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_STDLIB_H +#include <stdlib.h> +#endif +#ifdef HAVE_SYS_FILE_H #include <sys/file.h> /* May get R_OK, etc. on some systems. */ #endif @@ -49,16 +46,11 @@ Boston, MA 02111-1307, USA. */ #define X_OK 1 #endif -#include <stdio.h> /* May get P_tmpdir. */ -#endif /* IN_GCC */ - -#ifdef IN_GCC -#include "gansidecl.h" -extern char *xmalloc (); -#else -#include "ansidecl.h" #include "libiberty.h" -#if defined (__MSDOS__) || defined (_WIN32) +extern int mkstemps (); + +#ifndef IN_GCC +#if defined (__MSDOS__) || (defined (_WIN32) && ! defined (__CYGWIN__) && ! defined (_UWIN)) #define DIR_SEPARATOR '\\' #endif #endif |