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 231895 d75cac1f3eb36fe4cc1a4b0bd9034ea599deb328
parent 231894 71fa9295bec1fa1d62137be34eda1f224cdde1e4
child 231896 2d6093ce363779570c1bb2f3096be013e2a805c1
push id4187
push userbhearsum@mozilla.com
push dateFri, 28 Nov 2014 15:29:12 +0000
treeherdermozilla-beta@f23cc6a30c11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehugg
bugs1032640
milestone35.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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_ */