summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2006-01-26 17:32:49 +0000
committerDarkvater <Darkvater@openttd.org>2006-01-26 17:32:49 +0000
commit0855449106f7f634c484f0d953fda5b794a85512 (patch)
treed1ba94d3567b91d189dc8dc48dc71233e0b43012
parent227769d709d53f4ebceaf822e9fd946fd3e8cd48 (diff)
downloadopenttd-0855449106f7f634c484f0d953fda5b794a85512.tar.xz
(svn r3442) - Fix: Only windows has stricmp. So define strcasecmp to stricmp when using MSVC
-rw-r--r--network_gui.c2
-rw-r--r--stdafx.h1
-rw-r--r--win32.c7
3 files changed, 2 insertions, 8 deletions
diff --git a/network_gui.c b/network_gui.c
index 11f25eae5..1bc753930 100644
--- a/network_gui.c
+++ b/network_gui.c
@@ -115,7 +115,7 @@ static int CDECL NGameNameSorter(const void *a, const void *b)
{
const NetworkGameList *cmp1 = *(const NetworkGameList**)a;
const NetworkGameList *cmp2 = *(const NetworkGameList**)b;
- int r = stricmp(cmp1->info.server_name, cmp2->info.server_name);
+ int r = strcasecmp(cmp1->info.server_name, cmp2->info.server_name);
return (_internal_sort_order & 1) ? -r : r;
}
diff --git a/stdafx.h b/stdafx.h
index 5318cc527..0589002a6 100644
--- a/stdafx.h
+++ b/stdafx.h
@@ -144,6 +144,7 @@
# endif
# endif
+# define strcasecmp stricmp
#endif /* defined(_MSC_VER) */
diff --git a/win32.c b/win32.c
index ce235ab20..409bb8f71 100644
--- a/win32.c
+++ b/win32.c
@@ -604,13 +604,6 @@ static void Win32InitializeExceptions(void)
}
#endif
-#ifndef __MINGW32__
-static inline int strcasecmp(const char* s1, const char* s2)
-{
- return stricmp(s1, s2);
-}
-#endif
-
static char *_fios_path;
static char *_fios_save_path;
static char *_fios_scn_path;