/* $Id: machine.h,v 2.3 2012/09/24 15:11:35 ksb Exp $ */ /* standard 7-point style leverage for stat{,v}fs call we need * to get fs tunes. This is way harder than it should be... -- ksb */ /* pick one, or more */ #if !defined(HAVE_STATVFS) #define HAVE_STATVFS (defined(SUN5)||defined(IBMR2)||defined(NETBSD)) #endif #if !defined(HAVE_STATFS) #define HAVE_STATFS (defined(FREEBSD)||defined(DARWIN)||defined(OPENBSD)||defined(HPUX9)||defined(HPUX10)||defined(HPUX11)||defined(LINUX)) #endif #if !defined(HAVE_ANSI_EXTERN) #define HAVE_ANSI_EXTERN !(defined(HPUX11)) #endif /* We can use snprintf(3) to avoid trivial buffer overflows, maybe. */ #if !defined(HAVE_SNPRINTF) #define HAVE_SNPRINTF !(defined(HPUX9)||defined(HPUX8)||defined(HPUX7)) #endif /* act on the choice to get system headers */ #if HAVE_STATFS #if defined(HPUX9)||defined(HPUX10)||defined(HPUX11)||defined(LINUX) #include #endif #if defined(FREEBSD)||defined(DARWIN)||defined(OPENBSD)||defined(NETBSD) #include #include #endif #endif #if HAVE_STATVFS #if defined(SUN5) #include #endif #include #endif /* make them look the same, as much as we can */ #if !defined(STATFS_BUF) #if HAVE_STATFS #define STATFS_BUF struct statfs #endif #endif #if !defined(STATFS_BUF) #if HAVE_STATVFS #define STATFS_BUF struct statvfs #endif #endif #if !defined(STATFS_CALL) #if HAVE_STATFS #define STATFS_CALL statfs #endif #endif #if !defined(STATFS_CALL) #if HAVE_STATVFS #define STATFS_CALL statvfs #endif #endif /* Linux took out newfs, sadly, Sun made it _always_ interactive: * which is worse? */ #if !defined(NEED_NEWFS_YES) #define NEED_NEWFS_YES defined(SUN5) #endif #if !defined(USE_MKFS) #define USE_MKFS defined(LINUX) #endif #if !defined(USE_AUTOSIZE) #define USE_AUTOSIZE (defined(FREEBSD)||defined(DARWIN)) #endif /* keeps cpp happy even when msrc is not quite in sync (ksb) */ #if !defined(HOSTOS) #define HOSTOS 0 #endif #if !defined(HAVE_FSSNAP) #define HAVE_FSSNAP (defined(SUN5) && HOSTOS>=20800) #endif #if !defined(NEED_VFSTAB_NOCHECK) #define NEED_VFSTAB_NOCHECK (defined(SUN5) && HOSTOS>=21000) #endif