Bug 1032640 - eliminate inconsistent dll linkage warnings for webrtc string comparison functions on Win32; r=ehugg
authorNathan Froyd <froydnj@mozilla.com>
Wed, 01 Oct 2014 10:45:27 -0400
changeset 208680 d75cac1f3eb36fe4cc1a4b0bd9034ea599deb328
parent 208679 71fa9295bec1fa1d62137be34eda1f224cdde1e4
child 208681 2d6093ce363779570c1bb2f3096be013e2a805c1
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersehugg
bugs1032640
milestone35.0a1
Bug 1032640 - eliminate inconsistent dll linkage warnings for webrtc string comparison functions on Win32; r=ehugg
media/webrtc/signaling/src/sipcc/cpr/include/cpr_strings.h
media/webrtc/signaling/src/sipcc/cpr/win32/cpr_win_strings.h
--- a/media/webrtc/signaling/src/sipcc/cpr/include/cpr_strings.h
+++ b/media/webrtc/signaling/src/sipcc/cpr/include/cpr_strings.h
@@ -13,19 +13,23 @@
 #include "../linux/cpr_linux_strings.h"
 #elif defined SIP_OS_WINDOWS
 #include "../win32/cpr_win_strings.h"
 #elif defined SIP_OS_OSX
 #include "../darwin/cpr_darwin_strings.h"
 #endif
 
 #ifdef CPR_USE_OS_STRCASECMP
-/* Use standard library types */
+/* Use standard library types, but use the OS's name for the functions */
+#ifndef cpr_strcasecmp
 #define cpr_strcasecmp  strcasecmp
+#endif
+#ifndef cpr_strncasecmp
 #define cpr_strncasecmp strncasecmp
+#endif
 #else
 /* Prototypes */
 /**
  * cpr_strcasecmp
  *
  * @brief The CPR wrapper for strcasecmp
  *
  * The cpr_strcasecmp performs case insensitive string comparison of the "s1"
--- a/media/webrtc/signaling/src/sipcc/cpr/win32/cpr_win_strings.h
+++ b/media/webrtc/signaling/src/sipcc/cpr/win32/cpr_win_strings.h
@@ -5,9 +5,11 @@
 #ifndef CPR_WIN32_STRINGS_H_
 #define CPR_WIN32_STRINGS_H_
 
 #include <string.h>
 
 #define cpr_strcasecmp _stricmp
 #define cpr_strncasecmp _strnicmp
 
+#define CPR_USE_OS_STRCASECMP
+
 #endif /* CPR_WIN32_STRINGS_H_ */