diff options
author | Jim Meyering <jim@meyering.net> | 2002-06-19 11:12:59 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2002-06-19 11:12:59 +0000 |
commit | f35cc0e4a0beba8c080e31ef3fd17a83e51f377b (patch) | |
tree | 4dbad32662a3a1d1686d769db01ce97b357e941e /lib | |
parent | 86adc7266e3e464eaba9fd955132951daa62e1e9 (diff) | |
download | coreutils-f35cc0e4a0beba8c080e31ef3fd17a83e51f377b.tar.xz |
Report an error if neither S_ISREG nor
S_IFREG is defined, instead of using a test specific to glibc
2.2. This should be safe, since POSIX requires S_ISREG and
Unix Version 7 had S_IFREG. We don't need to check for
<sys/types.h> since we don't use any symbols that it defines.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/file-type.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/file-type.h b/lib/file-type.h index 765ec89cb..c766d6c21 100644 --- a/lib/file-type.h +++ b/lib/file-type.h @@ -18,16 +18,11 @@ /* Written by Paul Eggert and Jim Meyering. */ -/* Include <sys/types.h> and <sys/stat.h> before including this - file. */ - #ifndef FILE_TYPE_H # define FILE_TYPE_H 1 -# if 2 <= __GLIBC__ && 2 <= __GLIBC_MINOR__ -# if !defined _SYS_STAT_H || !defined _SYS_TYPES_H -you must include <sys/types.h> and <sys/stat.h> before including this file -# endif +# if ! defined S_ISREG && ! defined S_IFREG +you must include <sys/stat.h> before including this file # endif char const *file_type (struct stat const *); |