code cleanup: use __linux__ define over linux

This commit is contained in:
Campbell Barton 2013-07-19 10:41:04 +00:00
parent bc5ecbc393
commit dc06041049

@ -44,7 +44,7 @@
#if defined(__sun__) || defined(__sun) || defined(__NetBSD__) #if defined(__sun__) || defined(__sun) || defined(__NetBSD__)
# include <sys/statvfs.h> /* Other modern unix os's should probably use this also */ # include <sys/statvfs.h> /* Other modern unix os's should probably use this also */
#elif !defined(__FreeBSD__) && !defined(linux) && (defined(__sparc) || defined(__sparc__)) #elif !defined(__FreeBSD__) && !defined(__linux__) && (defined(__sparc) || defined(__sparc__))
# include <sys/statfs.h> # include <sys/statfs.h>
#endif #endif
@ -53,7 +53,7 @@
# include <sys/mount.h> # include <sys/mount.h>
#endif #endif
#if defined(linux) || defined(__CYGWIN32__) || defined(__hpux) || defined(__GNU__) || defined(__GLIBC__) #if defined(__linux__) || defined(__CYGWIN32__) || defined(__hpux) || defined(__GNU__) || defined(__GLIBC__)
#include <sys/vfs.h> #include <sys/vfs.h>
#endif #endif
@ -194,13 +194,13 @@ double BLI_dir_free_space(const char *dir)
strcpy(name, "/"); strcpy(name, "/");
} }
#if defined(__FreeBSD__) || defined(linux) || defined(__OpenBSD__) || defined(__APPLE__) || defined(__GNU__) || defined(__GLIBC__) #if defined(__FreeBSD__) || defined(__linux__) || defined(__OpenBSD__) || defined(__APPLE__) || defined(__GNU__) || defined(__GLIBC__)
if (statfs(name, &disk)) return(-1); if (statfs(name, &disk)) return(-1);
#endif #endif
#if defined(__sun__) || defined(__sun) || defined(__NetBSD__) #if defined(__sun__) || defined(__sun) || defined(__NetBSD__)
if (statvfs(name, &disk)) return(-1); if (statvfs(name, &disk)) return(-1);
#elif !defined(__FreeBSD__) && !defined(linux) && (defined(__sparc) || defined(__sparc__)) #elif !defined(__FreeBSD__) && !defined(__linux__) && (defined(__sparc) || defined(__sparc__))
/* WARNING - This may not be supported by geeneric unix os's - Campbell */ /* WARNING - This may not be supported by geeneric unix os's - Campbell */
if (statfs(name, &disk, sizeof(struct statfs), 0)) return(-1); if (statfs(name, &disk, sizeof(struct statfs), 0)) return(-1);
#endif #endif