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:
parent
b6d7dea6d2
commit
98909c6884
1 changed files with 7 additions and 2 deletions
|
@ -374,7 +374,7 @@ string get_full_path(const string &path) {
|
||||||
#ifdef PATH_MAX
|
#ifdef PATH_MAX
|
||||||
static char buffer[PATH_MAX];
|
static char buffer[PATH_MAX];
|
||||||
#else//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)
|
if (path_max <= 0)
|
||||||
path_max = 4096;
|
path_max = 4096;
|
||||||
char *buffer = (char *) malloc(path_max);
|
char *buffer = (char *) malloc(path_max);
|
||||||
|
@ -466,9 +466,14 @@ string remove_file_extension(const string& path) {
|
||||||
return get_string_prefix(path, ".");
|
return get_string_prefix(path, ".");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct ToLower
|
||||||
|
{
|
||||||
|
char operator() (char c) const { return std::tolower(c); }
|
||||||
|
};
|
||||||
|
|
||||||
string lowercase(const string &str) {
|
string lowercase(const string &str) {
|
||||||
string result = str;
|
string result = str;
|
||||||
transform(str.begin(), str.end(), result.begin(), tolower);
|
transform(str.begin(), str.end(), result.begin(), ToLower());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue