diff --git a/dmd2/mars.c b/dmd2/mars.c index 125f7c38..d895297f 100644 --- a/dmd2/mars.c +++ b/dmd2/mars.c @@ -16,7 +16,7 @@ #include #include -#if linux || __APPLE__ || __FreeBSD__ || __OpenBSD__ || __sun +#if __linux__ || __APPLE__ || __FreeBSD__ || __OpenBSD__ || __sun #include #endif @@ -517,7 +517,7 @@ int tryMain(size_t argc, char *argv[]) #if _WIN32 inifilename = inifile(argv[0], "sc.ini", "Environment"); -#elif linux || __APPLE__ || __FreeBSD__ || __OpenBSD__ || __sun +#elif __linux__ || __APPLE__ || __FreeBSD__ || __OpenBSD__ || __sun inifilename = inifile(argv[0], "dmd.conf", "Environment"); #else #error "fix this" @@ -917,7 +917,7 @@ Language changes listed by -transition=id:\n\ browse("http://dlang.org/dmd-windows.html"); #endif #endif -#if linux +#if __linux__ #if DMDV1 browse("http://www.digitalmars.com/d/1.0/dmd-linux.html"); #else diff --git a/dmd2/root/async.c b/dmd2/root/async.c index 92767c8e..d68237d1 100644 --- a/dmd2/root/async.c +++ b/dmd2/root/async.c @@ -119,7 +119,7 @@ unsigned __stdcall startthread(void *p) return EXIT_SUCCESS; // if skidding } -#elif linux // Posix +#elif __linux__ // Posix #include #include diff --git a/dmd2/root/man.c b/dmd2/root/man.c index f49d60b4..462ef92a 100644 --- a/dmd2/root/man.c +++ b/dmd2/root/man.c @@ -26,7 +26,7 @@ void browse(const char *url) #endif -#if linux || __FreeBSD__ || __OpenBSD__ || __sun +#if __linux__ || __FreeBSD__ || __OpenBSD__ || __sun #include #include diff --git a/dmd2/root/port.c b/dmd2/root/port.c index 4422809a..044f2444 100644 --- a/dmd2/root/port.c +++ b/dmd2/root/port.c @@ -542,10 +542,10 @@ longdouble Port::strtold(const char *p, char **endp) #endif -#if linux || __APPLE__ || __FreeBSD__ || __OpenBSD__ || __HAIKU__ +#if __linux__ || __APPLE__ || __FreeBSD__ || __OpenBSD__ || __HAIKU__ #include -#if linux +#if __linux__ #include #include #endif diff --git a/dmd2/root/rmem.c b/dmd2/root/rmem.c index ce6b3e0d..d4e9d265 100644 --- a/dmd2/root/rmem.c +++ b/dmd2/root/rmem.c @@ -11,7 +11,7 @@ #include #include -#if linux || __APPLE__ || __FreeBSD__ || __OpenBSD__ || __sun +#if __linux__ || __APPLE__ || __FreeBSD__ || __OpenBSD__ || __sun #include "../root/rmem.h" #else #include "rmem.h" diff --git a/dmd2/root/root.c b/dmd2/root/root.c index 900a3e65..5e172897 100644 --- a/dmd2/root/root.c +++ b/dmd2/root/root.c @@ -8,7 +8,7 @@ // See the included readme.txt for details. #ifndef POSIX -#define POSIX (linux || __APPLE__ || __FreeBSD__ || __OpenBSD__ || __sun) +#define POSIX (__linux__ || __APPLE__ || __FreeBSD__ || __OpenBSD__ || __sun) #endif #include @@ -878,11 +878,11 @@ void FileName::ensurePathToNameExists(const char *name) */ const char *FileName::canonicalName(const char *name) { -#if linux +#if __linux__ // Lovely glibc extension to do it for us return canonicalize_file_name(name); #elif POSIX - #if _POSIX_VERSION >= 200809L || defined (linux) + #if _POSIX_VERSION >= 200809L || defined (__linux__) // NULL destination buffer is allowed and preferred return realpath(name, NULL); #else