diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c5635ed6724..59e68b25125 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Mon Nov 23 10:16:38 1998 "Melissa O'Neill" + + * cccp.c (S_ISREG, S_ISDIR): Delete defines. + * cpplib.c, gcc.c: Likewise. + * system.h (S_ISREG, S_ISDIR): Define if not already defined. + Mon Nov 23 09:53:44 1998 Richard Henderson * local-alloc.c (local_alloc): Use malloc not alloca for diff --git a/gcc/cccp.c b/gcc/cccp.c index 0d55cec2d5c..d6b2aa0b670 100644 --- a/gcc/cccp.c +++ b/gcc/cccp.c @@ -113,14 +113,6 @@ static int hack_vms_include_specification (); # endif #endif -#ifndef S_ISREG -#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) -#endif - -#ifndef S_ISDIR -#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) -#endif - #ifndef INO_T_EQ #define INO_T_EQ(a, b) ((a) == (b)) #endif diff --git a/gcc/cpplib.c b/gcc/cpplib.c index f8a38e55bb1..269ac6682ef 100644 --- a/gcc/cpplib.c +++ b/gcc/cpplib.c @@ -72,14 +72,6 @@ extern char *update_path PARAMS ((char *, char *)); # endif #endif -#ifndef S_ISREG -#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) -#endif - -#ifndef S_ISDIR -#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) -#endif - /* By default, colon separates directories in a path. */ #ifndef PATH_SEPARATOR #define PATH_SEPARATOR ':' diff --git a/gcc/gcc.c b/gcc/gcc.c index 77b90602a91..2704d965a71 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -55,16 +55,6 @@ extern void set_std_prefix PROTO((char *, int)); #define exit __posix_exit #endif -/* Test if something is a normal file. */ -#ifndef S_ISREG -#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) -#endif - -/* Test if something is a directory. */ -#ifndef S_ISDIR -#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) -#endif - /* By default there is no special suffix for executables. */ #ifdef EXECUTABLE_SUFFIX #define HAVE_EXECUTABLE_SUFFIX diff --git a/gcc/system.h b/gcc/system.h index f876c5443a0..bb5d6801d45 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -356,4 +356,15 @@ extern void abort (); #define _(String) String #define N_(String) String + +/* Test if something is a normal file. */ +#ifndef S_ISREG +#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) +#endif + +/* Test if something is a directory. */ +#ifndef S_ISDIR +#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) +#endif + #endif /* __GCC_SYSTEM_H__ */