summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorevanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-24 00:11:25 +0000
committerevanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-24 00:11:25 +0000
commite614262b18654a1a62da00d5a8e4d3de3eda9f81 (patch)
treed14dfebe8119c53887b8477422f070a297db9185 /base
parentf9d44aa6e5fdefae83b3e02effdd7376b31dd3ef (diff)
downloadchromium_src-e614262b18654a1a62da00d5a8e4d3de3eda9f81.zip
chromium_src-e614262b18654a1a62da00d5a8e4d3de3eda9f81.tar.gz
chromium_src-e614262b18654a1a62da00d5a8e4d3de3eda9f81.tar.bz2
port some parts of webkit/glue/plugins/test to Linux
these are not all parts (about a half), but still something BUG=1949 Patch from Paweł Hajdan jr <phajdan.jr@gmail.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2534 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/string_util.h5
-rw-r--r--base/string_util_posix.h4
-rw-r--r--base/string_util_win.h4
3 files changed, 13 insertions, 0 deletions
diff --git a/base/string_util.h b/base/string_util.h
index 69ac608..8c28f3b 100644
--- a/base/string_util.h
+++ b/base/string_util.h
@@ -23,6 +23,11 @@ namespace base {
// are listed below. These functions are then implemented as inline calls
// to the platform-specific equivalents in the platform-specific headers.
+// Compare the two strings s1 and s2 without regard to case using
+// the current locale; returns 0 if they are equal, 1 if s1 > s2, and -1 if
+// s2 > s1 according to a lexicographic comparison.
+int strcasecmp(const char* s1, const char* s2);
+
// Compare up to count characters of s1 and s2 without regard to case using
// the current locale; returns 0 if they are equal, 1 if s1 > s2, and -1 if
// s2 > s1 according to a lexicographic comparison.
diff --git a/base/string_util_posix.h b/base/string_util_posix.h
index 3db654c..f9c3597 100644
--- a/base/string_util_posix.h
+++ b/base/string_util_posix.h
@@ -14,6 +14,10 @@
namespace base {
+inline int strcasecmp(const char* string1, const char* string2) {
+ return ::strcasecmp(string1, string2);
+}
+
inline int strncasecmp(const char* string1, const char* string2, size_t count) {
return ::strncasecmp(string1, string2, count);
}
diff --git a/base/string_util_win.h b/base/string_util_win.h
index 6042efd..a8e6e5a 100644
--- a/base/string_util_win.h
+++ b/base/string_util_win.h
@@ -14,6 +14,10 @@
namespace base {
+inline int strcasecmp(const char* s1, const char* s2) {
+ return _stricmp(s1, s2);
+}
+
inline int strncasecmp(const char* s1, const char* s2, size_t count) {
return _strnicmp(s1, s2, count);
}