You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by se...@apache.org on 2007/09/27 03:14:12 UTC
svn commit: r579861 - /incubator/stdcxx/trunk/util/aliases.cpp
Author: sebor
Date: Wed Sep 26 18:14:11 2007
New Revision: 579861
URL: http://svn.apache.org/viewvc?rev=579861&view=rev
Log:
2007-09-26 Martin Sebor <se...@roguewave.com>
STDCXX-572
* aliases.cpp (ci_pre_compare): Parenthesized calls to two-argument
overload of tolower() to avoid errors when the symbol is #defined
as a macro in libc header(s) as is the case with gcc 4 on Darwin.
Modified:
incubator/stdcxx/trunk/util/aliases.cpp
Modified: incubator/stdcxx/trunk/util/aliases.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/util/aliases.cpp?rev=579861&r1=579860&r2=579861&view=diff
==============================================================================
--- incubator/stdcxx/trunk/util/aliases.cpp (original)
+++ incubator/stdcxx/trunk/util/aliases.cpp Wed Sep 26 18:14:11 2007
@@ -22,7 +22,7 @@
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*
- * Copyright 2001-2006 Rogue Wave Software.
+ * Copyright 2001-2007 Rogue Wave Software, Inc.
*
**************************************************************************/
@@ -42,7 +42,7 @@
#include <cstdio>
#include <cstring> // for memcpy(), strlen()
#include <clocale> // for setlocale()
-#include <locale>
+#include <locale> // for tolower()
#include <iostream>
#include <string>
#include <vector>
@@ -349,8 +349,8 @@
std::string::const_iterator it1 = s1.begin ();
std::string::const_iterator it2 = s2.begin ();
for (; it1 != s1.end () && it2 != s2.end (); it1++, it2++)
- if (std::tolower(*it1, std::locale ()) !=
- std::tolower(*it2, std::locale ()))
+ if ( (std::tolower)(*it1, std::locale ())
+ != (std::tolower)(*it2, std::locale ()))
return (*it1 - *it2);
return 0;