summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-08-22 20:02:14 +0200
committerDan McGee <dan@archlinux.org>2007-08-22 20:02:14 +0200
commit10c3f335d00a38429ce51d2ebcc636083a71d050 (patch)
tree8dc12182e02a95a3a6937492408a0010941a3177
parente24bcc395e7da2a4f46933ea342d0ce90b708de4 (diff)
downloadpacman-10c3f335d00a38429ce51d2ebcc636083a71d050.tar.gz
pacman-10c3f335d00a38429ce51d2ebcc636083a71d050.tar.xz
pacman.c: clarify reason for doing 2 strcmp operations
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--src/pacman/pacman.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 31302abe..fef6d38e 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -520,6 +520,10 @@ static int _parseconfig(const char *file, const char *givensection,
file, linenum);
return(1);
}
+ /* For each directive, compare to the uppercase and camelcase string.
+ * This prevents issues with certain locales where characters don't
+ * follow the toupper() rules we may expect, e.g. tr_TR where i != I.
+ */
upperkey = strtoupper(strdup(key));
if(section == NULL && (strcmp(key, "Include") == 0 || strcmp(upperkey, "INCLUDE") == 0)) {
pm_printf(PM_LOG_ERROR, _("config file %s, line %d: 'Include' directive must belong to a section.\n"),