/* $Id: machine.h,v 2.3 2012/07/24 15:08:44 ksb Exp $ */ #if DYNIX # define HAVE_S_ISSTUFF 0 #else # define HAVE_S_ISSTUFF 1 #endif #if AMIGA||SUN4||SUN5||HPUX11||LINUX||FREEBSD||DARWIN||OPENBSD||NETBSD # define HAVE_STRDUP 1 #else # define HAVE_STRDUP 0 extern char *strdup (); #endif #ifndef HAVE_STRERROR #if NEXT2||IBMR2||HPUX7||HPUX8||HPUX10||HPUX11||SUN5||FREEBSD||DARWIN||OPENBSD||NETBSD||LINUX #define HAVE_STRERROR 1 #else #define HAVE_STRERROR 0 #endif #endif #ifndef HAVE_SEEK_SET # define SEEK_SET 0 #endif extern int errno; #if !HAVE_STRERROR extern char *sys_errlist[]; # define strerror(Me) (sys_errlist[Me]) #endif #if !HAVE_S_ISSTUFF # define S_ISBLK(m) (((m)&S_IFMT) == S_IFBLK) # define S_ISCHR(m) (((m)&S_IFMT) == S_IFCHR) # define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR) # define S_ISFIFO(m) (((m)&S_IFMT) == S_IFIFO) # define S_ISREG(m) (((m)&S_IFMT) == S_IFREG) # define S_ISLNK(m) (((m)&S_IFMT) == S_IFLNK) # define S_ISSOCK(m) (((m)&S_IFMT) == S_IFSOCK) #endif