From 9b85a345e96764eafdd96ad7a307159ef2f77023 Mon Sep 17 00:00:00 2001 From: Tomas Lindquist Olsen Date: Mon, 2 Feb 2009 00:58:36 +0100 Subject: [PATCH] Removed use of TARGET_LINUX and replaced with POSIX, fixes bug [172] --- dmd/mars.c | 8 +++++--- dmd2/mars.c | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/dmd/mars.c b/dmd/mars.c index d66ce27b..6f9da47d 100644 --- a/dmd/mars.c +++ b/dmd/mars.c @@ -1016,7 +1016,7 @@ int main(int argc, char *argv[]) ext = FileName::ext(p); if (ext) { -#if TARGET_LINUX +#if POSIX if (strcmp(ext, global.obj_ext) == 0 || strcmp(ext, global.bc_ext) == 0) #else @@ -1028,8 +1028,10 @@ int main(int argc, char *argv[]) continue; } -#if TARGET_LINUX || __MINGW32__ +#if POSIX if (strcmp(ext, "a") == 0) +#elif __MINGW32__ + if (stricmp(ext, "a") == 0) #else if (stricmp(ext, "lib") == 0) #endif @@ -1044,7 +1046,7 @@ int main(int argc, char *argv[]) continue; } -#if !TARGET_LINUX +#if !POSIX if (stricmp(ext, "res") == 0) { global.params.resfile = (char *)files.data[i]; diff --git a/dmd2/mars.c b/dmd2/mars.c index eb0d0d78..9034b21f 100644 --- a/dmd2/mars.c +++ b/dmd2/mars.c @@ -1035,7 +1035,7 @@ int main(int argc, char *argv[]) ext = FileName::ext(p); if (ext) { -#if TARGET_LINUX +#if POSIX if (strcmp(ext, global.obj_ext) == 0 || strcmp(ext, global.bc_ext) == 0) #else @@ -1047,8 +1047,10 @@ int main(int argc, char *argv[]) continue; } -#if TARGET_LINUX || __MINGW32__ +#if POSIX if (strcmp(ext, "a") == 0) +#elif __MINGW32__ + if (stricmp(ext, "a") == 0) #else if (stricmp(ext, "lib") == 0) #endif @@ -1063,7 +1065,7 @@ int main(int argc, char *argv[]) continue; } -#if !TARGET_LINUX +#if !POSIX if (stricmp(ext, "res") == 0) { global.params.resfile = (char *)files.data[i];