summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-05-13 10:26:20 +0200
committerAndrew Bartlett <abartlet@samba.org>2011-05-13 18:50:23 +0200
commitf18cca9a0a690013eb609719c4798da9b0e1054b (patch)
treec4da3154b96c69a40f5431844248a199f34f1669
parentef2a7c653808a5e0abdd87dc74579bb6c006b730 (diff)
downloadsamba-f18cca9a0a690013eb609719c4798da9b0e1054b.tar.gz
samba-f18cca9a0a690013eb609719c4798da9b0e1054b.tar.bz2
samba-f18cca9a0a690013eb609719c4798da9b0e1054b.zip
lib/util/charset Move built-in charset modules to the top level
This removes the 'charset' subsystem and allows these modules to be used across the whole of Samba. Andrew Bartlett
-rw-r--r--lib/util/charset/CP437.c (renamed from source3/modules/CP437.c)2
-rw-r--r--lib/util/charset/CP850.c (renamed from source3/modules/CP850.c)2
-rw-r--r--lib/util/charset/charset.h2
-rw-r--r--lib/util/charset/charset_macosxfs.c (renamed from source3/modules/charset_macosxfs.c)0
-rw-r--r--lib/util/charset/weird.c (renamed from source3/modules/weird.c)0
-rw-r--r--lib/util/charset/wscript_build33
-rw-r--r--source3/Makefile.in8
-rw-r--r--source3/modules/wscript_build39
-rwxr-xr-xsource3/wscript_build2
9 files changed, 41 insertions, 47 deletions
diff --git a/source3/modules/CP437.c b/lib/util/charset/CP437.c
index 96d14b1f02..1e478d678f 100644
--- a/source3/modules/CP437.c
+++ b/lib/util/charset/CP437.c
@@ -22,7 +22,7 @@
#include "includes.h"
-static const uint16 to_ucs2[256] = {
+static const uint16_t to_ucs2[256] = {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
diff --git a/source3/modules/CP850.c b/lib/util/charset/CP850.c
index 40730c0d8d..87a76f4cdf 100644
--- a/source3/modules/CP850.c
+++ b/lib/util/charset/CP850.c
@@ -22,7 +22,7 @@
#include "includes.h"
-static const uint16 to_ucs2[256] = {
+static const uint16_t to_ucs2[256] = {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
diff --git a/lib/util/charset/charset.h b/lib/util/charset/charset.h
index e5fd596f8f..a7e554204b 100644
--- a/lib/util/charset/charset.h
+++ b/lib/util/charset/charset.h
@@ -279,7 +279,7 @@ static size_t CHARSETNAME ## _push(void *cd, const char **inbuf, size_t *inbytes
int i; \
int done = 0; \
\
- uint16 ch = SVAL(*inbuf,0); \
+ uint16_t ch = SVAL(*inbuf,0); \
\
for (i=0; from_idx[i].start != 0xffff; i++) { \
if ((from_idx[i].start <= ch) && (from_idx[i].end >= ch)) { \
diff --git a/source3/modules/charset_macosxfs.c b/lib/util/charset/charset_macosxfs.c
index 8c2fdc7776..8c2fdc7776 100644
--- a/source3/modules/charset_macosxfs.c
+++ b/lib/util/charset/charset_macosxfs.c
diff --git a/source3/modules/weird.c b/lib/util/charset/weird.c
index 5db8cdcecd..5db8cdcecd 100644
--- a/source3/modules/weird.c
+++ b/lib/util/charset/weird.c
diff --git a/lib/util/charset/wscript_build b/lib/util/charset/wscript_build
index 7623131146..3b29ace6d3 100644
--- a/lib/util/charset/wscript_build
+++ b/lib/util/charset/wscript_build
@@ -9,3 +9,36 @@ bld.SAMBA_SUBSYSTEM('CHARSET',
source='codepoints.c convert_string.c util_str.c util_unistr_w.c charcnv.c pull_push.c util_unistr.c',
deps='DYNCONFIG ICONV_WRAPPER'
)
+
+bld.SAMBA_MODULE('charset_weird',
+ subsystem='CHARSET',
+ source='weird.c',
+ init_function='',
+ deps='samba-util',
+ internal_module=bld.SAMBA3_IS_STATIC_MODULE('charset_weird'),
+ enabled=bld.SAMBA3_IS_ENABLED_MODULE('charset_weird'))
+
+bld.SAMBA_MODULE('charset_CP850',
+ subsystem='CHARSET',
+ source='CP850.c',
+ init_function='',
+ deps='samba-util',
+ internal_module=bld.SAMBA3_IS_STATIC_MODULE('charset_CP850'),
+ enabled=bld.SAMBA3_IS_ENABLED_MODULE('charset_CP850'))
+
+bld.SAMBA_MODULE('charset_CP437',
+ subsystem='CHARSET',
+ source='CP437.c',
+ init_function='',
+ deps='samba-util',
+ internal_module=bld.SAMBA3_IS_STATIC_MODULE('charset_CP437'),
+ enabled=bld.SAMBA3_IS_ENABLED_MODULE('charset_CP437'))
+
+bld.SAMBA_MODULE('charset_macosxfs',
+ subsystem='CHARSET',
+ source='charset_macosxfs.c',
+ init_function='',
+ internal_module=bld.SAMBA3_IS_STATIC_MODULE('charset_macosxfs'),
+ enabled=bld.SAMBA3_IS_ENABLED_MODULE('charset_macosxfs'))
+
+
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 2ad1dc7d46..84bfd9aa39 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -778,10 +778,10 @@ PASSDB_OBJ = $(PASSDB_GET_SET_OBJ) passdb/passdb.o passdb/pdb_interface.o \
lib/util_nscd.o lib/winbind_util.o $(SERVER_MUTEX_OBJ) \
passdb/pdb_util.o
-DEVEL_HELP_WEIRD_OBJ = modules/weird.o
-CP850_OBJ = modules/CP850.o
-CP437_OBJ = modules/CP437.o
-CHARSET_MACOSXFS_OBJ = modules/charset_macosxfs.o
+DEVEL_HELP_WEIRD_OBJ = ../lib/util/charset/weird.o
+CP850_OBJ = ../lib/util/charset/CP850.o
+CP437_OBJ = ../lib/util/charset/CP437.o
+CHARSET_MACOSXFS_OBJ = ../lib/util/charset/charset_macosxfs.o
GROUPDB_OBJ = groupdb/mapping.o groupdb/mapping_tdb.o
diff --git a/source3/modules/wscript_build b/source3/modules/wscript_build
index ff7163fdc7..a16a4f292f 100644
--- a/source3/modules/wscript_build
+++ b/source3/modules/wscript_build
@@ -410,45 +410,6 @@ bld.SAMBA3_MODULE('vfs_time_audit',
-CHARSET_WEIRD_SRC = 'weird.c'
-CHARSET_CP850_SRC = 'CP850.c'
-CHARSET_CP437_SRC = 'CP437.c'
-CHARSET_MACOSXFS_SRC = 'charset_macosxfs.c'
-
-
-bld.SAMBA3_SUBSYSTEM('charset',
- source='',
- vars=locals())
-
-bld.SAMBA3_MODULE('charset_weird',
- subsystem='charset',
- source=CHARSET_WEIRD_SRC,
- init_function='',
- internal_module=bld.SAMBA3_IS_STATIC_MODULE('charset_weird'),
- enabled=bld.SAMBA3_IS_ENABLED_MODULE('charset_weird'))
-
-bld.SAMBA3_MODULE('charset_CP850',
- subsystem='charset',
- source=CHARSET_CP850_SRC,
- init_function='',
- internal_module=bld.SAMBA3_IS_STATIC_MODULE('charset_CP850'),
- enabled=bld.SAMBA3_IS_ENABLED_MODULE('charset_CP850'))
-
-bld.SAMBA3_MODULE('charset_CP437',
- subsystem='charset',
- source=CHARSET_CP437_SRC,
- init_function='',
- internal_module=bld.SAMBA3_IS_STATIC_MODULE('charset_CP437'),
- enabled=bld.SAMBA3_IS_ENABLED_MODULE('charset_CP437'))
-
-bld.SAMBA3_MODULE('charset_macosxfs',
- subsystem='charset',
- source=CHARSET_MACOSXFS_SRC,
- init_function='',
- internal_module=bld.SAMBA3_IS_STATIC_MODULE('charset_macosxfs'),
- enabled=bld.SAMBA3_IS_ENABLED_MODULE('charset_macosxfs'))
-
-
PERFCOUNT_ONEFS_SRC = 'perfcount_onefs.c'
PERFCOUNT_TEST_SRC = 'perfcount_test.c'
diff --git a/source3/wscript_build b/source3/wscript_build
index 105aee99cb..61e892d55e 100755
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -777,7 +777,7 @@ bld.SAMBA3_SUBSYSTEM('KRBCLIENT',
bld.SAMBA3_LIBRARY('samba3core',
source=LIB_SRC,
- deps='LIBCRYPTO ndr ndr-util security NDR_SECURITY charset NDR_MESSAGING LIBASYNC_REQ tdb-wrap3 CHARSET3 UTIL_TDB UTIL_PW SAMBA_VERSION KRB5_WRAP flag_mapping util_reg passdb PTHREADPOOL interfaces',
+ deps='LIBCRYPTO ndr ndr-util security NDR_SECURITY samba-util NDR_MESSAGING LIBASYNC_REQ tdb-wrap3 UTIL_TDB UTIL_PW SAMBA_VERSION KRB5_WRAP flag_mapping util_reg passdb PTHREADPOOL interfaces',
private_library=True,
vars=locals())