Skip to content

Commit

Permalink
s4-charset: use dyn_CODEPAGEDIR for location of upcase.dat/lowcase.dat
Browse files Browse the repository at this point in the history
this matches samba3 behaviour

Pair-Programmed-With: Andrew Bartlett <[email protected]>
  • Loading branch information
Andrew Tridgell committed Feb 7, 2011
1 parent 1f533bf commit 1867a60
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion codepages/wscript_build
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env python

bld.INSTALL_WILDCARD('${DATADIR}', '*.dat')
bld.INSTALL_WILDCARD('${CODEPAGEDIR}', '*.dat')
16 changes: 4 additions & 12 deletions lib/util/charset/codepoints.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down
1 change: 1 addition & 0 deletions source4/dynconfig/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
1 change: 1 addition & 0 deletions source4/smbd/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 1867a60

Please sign in to comment.