[Bf-blender-cvs] [2967253] master: Fix Windows build.

Bastien Montagne noreply at git.blender.org
Wed Feb 18 12:23:12 CET 2015


Commit: 2967253ae4f080a4968d6542409c608c1b1fcb41
Author: Bastien Montagne
Date:   Wed Feb 18 12:16:31 2015 +0100
Branches: master
https://developer.blender.org/rB2967253ae4f080a4968d6542409c608c1b1fcb41

Fix Windows build.

Mighty M$VC never heard of 'strcasecmp' family of functions, it prefers its
own names, as usual...

===================================================================

M	source/blender/blenlib/BLI_utildefines.h

===================================================================

diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h
index 079352f..de91332 100644
--- a/source/blender/blenlib/BLI_utildefines.h
+++ b/source/blender/blenlib/BLI_utildefines.h
@@ -515,6 +515,11 @@ extern "C" {
 
 
 /* generic strcmp macros */
+#if defined(_MSC_VER)
+#  define strcasecmp _stricmp
+#  define strncasecmp _strnicmp
+#endif
+
 #define STREQ(a, b) (strcmp(a, b) == 0)
 #define STRCASEEQ(a, b) (strcasecmp(a, b) == 0)
 #define STREQLEN(a, b, n) (strncmp(a, b, n) == 0)




More information about the Bf-blender-cvs mailing list