Fix Debian bug #456082: fix FTBFS with GCC 4.3

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5564 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
pabs3 2008-03-03 14:04:53 +00:00
parent b6d7dea6d2
commit 98909c6884

View file

@ -374,7 +374,7 @@ string get_full_path(const string &path) {
#ifdef PATH_MAX
static char buffer[PATH_MAX];
#else//PATH_MAX
int path_max = pathconf(path, _PC_PATH_MAX);
int path_max = pathconf(path.c_str(), _PC_PATH_MAX);
if (path_max <= 0)
path_max = 4096;
char *buffer = (char *) malloc(path_max);
@ -466,9 +466,14 @@ string remove_file_extension(const string& path) {
return get_string_prefix(path, ".");
}
struct ToLower
{
char operator() (char c) const { return std::tolower(c); }
};
string lowercase(const string &str) {
string result = str;
transform(str.begin(), str.end(), result.begin(), tolower);
transform(str.begin(), str.end(), result.begin(), ToLower());
return result;
}