41 lines
1.1 KiB
Text
41 lines
1.1 KiB
Text
$NetBSD: patch-ae,v 1.1 2004/10/09 17:20:28 kristerw Exp $
|
|
|
|
--- lib/util.C.orig Sat Oct 9 19:09:16 2004
|
|
+++ lib/util.C Sat Oct 9 19:12:49 2004
|
|
@@ -31,7 +31,11 @@
|
|
#include <algorithm>
|
|
#include <iterator>
|
|
#include <iostream>
|
|
+#if __GNUC__ == 2
|
|
+#include <locale.h>
|
|
+#else
|
|
#include <locale>
|
|
+#endif
|
|
#include <fstream>
|
|
#include <cctype>
|
|
#include <ctype.h>
|
|
@@ -403,7 +407,7 @@
|
|
}
|
|
}
|
|
|
|
-#ifndef _WIN32
|
|
+#if !defined(_WIN32) && __GNUC__ != 2
|
|
// In order for toupper and tolower to work under certain conditions
|
|
// it needs to know about local.
|
|
// See: http://linux-rep.fnal.gov/software/gcc/onlinedocs/libstdc++/22_locale/howto.html#7
|
|
@@ -422,13 +426,13 @@
|
|
// - Add a trailing slash if necessary
|
|
//
|
|
void canonicalize_master_url(string& url) {
|
|
-#ifndef _WIN32
|
|
+#if !defined(_WIN32) && __GNUC__ != 2
|
|
Tolower down ( std::locale("C") );
|
|
#endif
|
|
string::size_type p = url.find("://");
|
|
// lowercase http://
|
|
if (p != string::npos) {
|
|
-#ifndef _WIN32
|
|
+#if !defined(_WIN32) && __GNUC__ != 2
|
|
transform(url.begin(), url.begin()+p, url.begin(), down);
|
|
#else
|
|
transform(url.begin(), url.begin()+p, url.begin(), tolower);
|