s4-charset: use dyn_CODEPAGEDIR for location of upcase.dat/lowcase.dat
authorAndrew Tridgell <tridge@samba.org>
Mon, 7 Feb 2011 02:13:44 +0000 (13:13 +1100)
committerAndrew Tridgell <tridge@samba.org>
Mon, 7 Feb 2011 02:22:02 +0000 (13:22 +1100)
this matches samba3 behaviour

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

codepages/wscript_build
lib/util/charset/codepoints.c
source4/dynconfig/wscript
source4/smbd/server.c

index 695070fe0d0da14e8a4f93e1a309ebc604394c24..12255296e466c1236e2a093bbc58470a01d6a39f 100644 (file)
@@ -1,3 +1,3 @@
 #!/usr/bin/env python
 
-bld.INSTALL_WILDCARD('${DATADIR}', '*.dat')
+bld.INSTALL_WILDCARD('${CODEPAGEDIR}', '*.dat')
index 8be20512af4faeeba457ce216d9df33c763bbdee..bc39f1b1a4790f6f347c667531450f4ac9a8bd8d 100644 (file)
@@ -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;
        }
 }
 
index 08621d40f14cd2b2e72fe29265704b045e42f0eb..6cebf7ee7fd290a17a6f9212fe2ac9c8f64b865e 100644 (file)
@@ -126,6 +126,7 @@ def dynconfig_cflags(bld, list=None):
     override = { 'MODULESDIR'    : 'bin/modules',
                  'PYTHONDIR'     : 'bin/python',
                  'PYTHONARCHDIR' : 'bin/python',
+                 'CODEPAGEDIR'   : os.path.join(bld.env.srcdir, 'codepages'),
                  'SCRIPTSBINDIR' : os.path.join(bld.env.srcdir, 'source4/scripting/bin'),
                  'SETUPDIR'      : os.path.join(bld.env.srcdir, 'source4/setup') }
     for f in dyn_cflags.keys():
index 0a4e38d398acb198b0a8f5fe438c1f5b5f78b50a..0f2f1bb1bb70db2818a059fa31ae4353c994b31f 100644 (file)
@@ -260,6 +260,7 @@ static void show_build(void)
                CONFIG_OPTION(PIDDIR),
                CONFIG_OPTION(PRIVATE_DIR),
                CONFIG_OPTION(SWATDIR),
+               CONFIG_OPTION(CODEPAGEDIR),
                CONFIG_OPTION(SETUPDIR),
                CONFIG_OPTION(WINBINDD_SOCKET_DIR),
                CONFIG_OPTION(WINBINDD_PRIVILEGED_SOCKET_DIR),