1 /* Copyright unknown? */ 2 #ifndef _STATFIX_H 3 #define _STATFIX_H 4 5 #include <sys/types.h> 6 #include <sys/stat.h> 7 8 /* Definition of "S_ISLNK" stolen from Perl v5.0. */ 9 10 /* The stat macros for Amdahl UTS, Unisoft System V/88 (and derivatives 11 like UTekV) are broken, sometimes giving false positives. Undefine 12 them here and let the code below set them to proper values. 13 14 The ghs macro stands for GreenHills Software C-1.8.5 which 15 is the C compiler for sysV88 and the various derivatives. 16 This header file bug is corrected in gcc-2.5.8 and later versions. 17 --Kaveh Ghazi (ghazi@noc.rutgers.edu) 10/3/94. */ 18 19 #if defined(uts) || (defined(m88k) && defined(ghs)) 20 # undef S_ISLNK 21 #endif 22 23 #ifndef S_ISLNK 24 # ifdef _S_ISLNK 25 # define S_ISLNK(m) _S_ISLNK(m) 26 # else 27 # ifdef _S_IFLNK 28 # define S_ISLNK(m) ((m & S_IFMT) == _S_IFLNK) 29 # else 30 # ifdef S_IFLNK 31 # define S_ISLNK(m) ((m & S_IFMT) == S_IFLNK) 32 # else 33 # define S_ISLNK(m) (0) 34 # endif 35 # endif 36 # endif 37 #endif 38 39 #endif /* _STATFIX_H */ 40