From: Jim Meyering Date: Tue, 21 May 2002 23:15:05 +0000 (+0000) Subject: (S_ISLNK, S_ISFIFO, S_ISSOCK, S_ISCHR, S_ISBLK, S_ISDOOR): Define here instead. X-Git-Tag: FILEUTILS-4_1_9~189 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fdadb32d0aad1dc5ebe0cc7827ef2d4233321aa6;p=thirdparty%2Fcoreutils.git (S_ISLNK, S_ISFIFO, S_ISSOCK, S_ISCHR, S_ISBLK, S_ISDOOR): Define here instead. --- diff --git a/src/sys2.h b/src/sys2.h index 6914a50433..8493be78da 100644 --- a/src/sys2.h +++ b/src/sys2.h @@ -52,6 +52,34 @@ # define S_ISDOOR(m) (((m) & S_IFMT) == S_IFDOOR) #endif +/* If any of the following S_* macros are undefined, define them here + so each use doesn't have to be guarded with e.g., #ifdef S_ISLNK. */ +#ifndef S_ISLNK +# define S_ISLNK(Mode) 0 +#endif + +#ifndef S_ISFIFO +# define S_ISFIFO(Mode) 0 +#endif + +#ifndef S_ISSOCK +# define S_ISSOCK(Mode) 0 +#endif + +#ifndef S_ISCHR +# define S_ISCHR(Mode) 0 +#endif + +#ifndef S_ISBLK +# define S_ISBLK(Mode) 0 +#endif + +#ifndef S_ISDOOR +# define S_ISDOOR(Mode) 0 +#endif + +/* If any of the following are undefined, + define them to their de facto standard values. */ #if !S_ISUID # define S_ISUID 04000 #endif