From 1867a6033ca22da715017df005a5ad61c66e1597 Mon Sep 17 00:00:00 2001
From: Andrew Tridgell <tridge@samba.org>
Date: Mon, 7 Feb 2011 13:13:44 +1100
Subject: s4-charset: use dyn_CODEPAGEDIR for location of
 upcase.dat/lowcase.dat

this matches samba3 behaviour

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
---
 lib/util/charset/codepoints.c | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

(limited to 'lib/util/charset')

diff --git a/lib/util/charset/codepoints.c b/lib/util/charset/codepoints.c
index 8be20512af..bc39f1b1a4 100644
--- a/lib/util/charset/codepoints.c
+++ b/lib/util/charset/codepoints.c
@@ -44,22 +44,14 @@ void load_case_tables(void)
 	if (!mem_ctx) {
 		smb_panic("No memory for case_tables");
 	}
-	upcase_table = map_file(talloc_asprintf(mem_ctx, "%s/upcase.dat", dyn_DATADIR), 0x20000);
-	lowcase_table = map_file(talloc_asprintf(mem_ctx, "%s/lowcase.dat", dyn_DATADIR), 0x20000);
+	upcase_table = map_file(talloc_asprintf(mem_ctx, "%s/upcase.dat", dyn_CODEPAGEDIR), 0x20000);
+	lowcase_table = map_file(talloc_asprintf(mem_ctx, "%s/lowcase.dat", dyn_CODEPAGEDIR), 0x20000);
 	talloc_free(mem_ctx);
 	if (upcase_table == NULL) {
-		/* try also under codepages for testing purposes */
-		upcase_table = map_file("../codepages/upcase.dat", 0x20000);
-		if (upcase_table == NULL) {
-			upcase_table = (void *)-1;
-		}
+		upcase_table = (void *)-1;
 	}
 	if (lowcase_table == NULL) {
-		/* try also under codepages for testing purposes */
-		lowcase_table = map_file("../codepages/lowcase.dat", 0x20000);
-		if (lowcase_table == NULL) {
-			lowcase_table = (void *)-1;
-		}
+		lowcase_table = (void *)-1;
 	}
 }
 
-- 
cgit