summaryrefslogtreecommitdiff
path: root/libiberty/choose-temp.c
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1998-04-02 11:07:45 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1998-04-02 11:07:45 +0000
commit4cb1caaf7b40d9a59780c67415018ac359f65881 (patch)
tree4846aa29b1c899ca051b360843233a9cc438a53c /libiberty/choose-temp.c
parent7f388fb42f9b946247b133274e142dc771b0d5e2 (diff)
downloadgcc-4cb1caaf7b40d9a59780c67415018ac359f65881.tar.gz
Patched in the gcc directory:
* Makefile.in (choose-temp.o): Depend on system.h. Patched in both the libiberty and gcc directories: * choose-temp.c: Include system.h when IN_GCC. From-SVN: r18952
Diffstat (limited to 'libiberty/choose-temp.c')
-rw-r--r--libiberty/choose-temp.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/libiberty/choose-temp.c b/libiberty/choose-temp.c
index 5668f745207..ea4f9ed5f32 100644
--- a/libiberty/choose-temp.c
+++ b/libiberty/choose-temp.c
@@ -26,12 +26,17 @@ Boston, MA 02111-1307, USA. */
#include "config.h"
#endif
-/* If we are in gcc, or 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. */
+#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 (IN_GCC) || defined (HAVE_CONFIG_H)) ? defined (HAVE_SYS_FILE_H) : ! defined (NO_SYS_FILE_H)
+#if defined (HAVE_CONFIG_H) ? defined (HAVE_SYS_FILE_H) : ! defined (NO_SYS_FILE_H)
#include <sys/types.h>
#include <sys/file.h> /* May get R_OK, etc. on some systems. */
#endif
@@ -43,6 +48,7 @@ Boston, MA 02111-1307, USA. */
#endif
#include <stdio.h> /* May get P_tmpdir. */
+#endif /* IN_GCC */
#ifdef IN_GCC
#include "gansidecl.h"