diff options
author | Ian Lance Taylor <ian@cygnus.com> | 1998-02-25 23:09:55 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1998-02-25 16:09:55 -0700 |
commit | b9fb3c420b0e4ac3c542950b560e1c8bfc797356 (patch) | |
tree | 36c24d48d0722b6a66eecb3957cc82afa0365ab2 /libiberty/choose-temp.c | |
parent | c1b2e68daae552692a75a72dbe8f8118d5cb4809 (diff) | |
download | gcc-b9fb3c420b0e4ac3c542950b560e1c8bfc797356.tar.gz |
choose-temp.c: Fix handling of sys/file.h to work in libiberty.
Mon Feb 23 14:33:15 1998 Ian Lance Taylor <ian@cygnus.com>
* choose-temp.c: Fix handling of sys/file.h to work in libiberty.
From-SVN: r18240
Diffstat (limited to 'libiberty/choose-temp.c')
-rw-r--r-- | libiberty/choose-temp.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libiberty/choose-temp.c b/libiberty/choose-temp.c index d8808ba02c3..5668f745207 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, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of the libiberty library. Libiberty is free software; you can redistribute it and/or @@ -22,11 +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. */ -#ifdef IN_GCC +#if defined (IN_GCC) || defined (HAVE_CONFIG_H) #include "config.h" #endif -#ifdef HAVE_SYS_FILE_H +/* 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. */ + +#if (defined (IN_GCC) || 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 |