Skip to content

Commit

Permalink
r15295: Fix some dependencies
Browse files Browse the repository at this point in the history
Move unistr-specific code to lib/charset/. Remove _m from some places where it's not needed.
(This used to be commit 03224e1)
  • Loading branch information
jelmer authored and Gerald (Jerry) Carter committed Oct 10, 2007
1 parent 8ee028d commit 8d137d9
Show file tree
Hide file tree
Showing 20 changed files with 757 additions and 763 deletions.
13 changes: 6 additions & 7 deletions source4/lib/basic.mk
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ PRIVATE_PROTO_HEADER = netif/proto.h
OBJ_FILES = \
netif/interface.o \
netif/netif.o
PRIVATE_DEPENDENCIES = LIBSAMBA-UTIL
# End SUBSYSTEM LIBNETIF
##############################

Expand All @@ -44,19 +45,17 @@ OBJ_FILES = \
################################################
# Start SUBSYSTEM LIBCOMPRESSION
[SUBSYSTEM::LIBCOMPRESSION]
OBJ_FILES = \
compression/mszip.o
OBJ_FILES = compression/mszip.o
# End SUBSYSTEM LIBCOMPRESION
################################################

[SUBSYSTEM::GENCACHE]
PRIVATE_PROTO_HEADER = gencache/gencache.h
OBJ_FILES = \
gencache/gencache.o \
OBJ_FILES = gencache/gencache.o \

[SUBSYSTEM::DB_WRAP]
PUBLIC_PROTO_HEADER = db_wrap_proto.h
PUBLIC_HEADERS = db_wrap.h
OBJ_FILES = db_wrap.o \
gendb.o
PUBLIC_DEPENDENCIES = ldb LIBTDB LDBSAMBA
OBJ_FILES = db_wrap.o gendb.o
PUBLIC_DEPENDENCIES = LIBTDB ldb
PRIVATE_DEPENDENCIES = LDBSAMBA
21 changes: 10 additions & 11 deletions source4/lib/charset/charcnv.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,16 @@
**/
static const char *charset_name(charset_t ch)
{
const char *ret = NULL;

if (ch == CH_UTF16) ret = "UTF-16LE";
else if (ch == CH_UNIX) ret = lp_unix_charset();
else if (ch == CH_DOS) ret = lp_dos_charset();
else if (ch == CH_DISPLAY) ret = lp_display_charset();
else if (ch == CH_UTF8) ret = "UTF8";
else if (ch == CH_UTF16BE) ret = "UTF-16BE";

if (!ret || !*ret) ret = "ASCII";
return ret;
switch (ch) {
case CH_UTF16: return "UTF-16LE";
case CH_UNIX: return lp_unix_charset();
case CH_DOS: return lp_dos_charset();
case CH_DISPLAY: return lp_display_charset();
case CH_UTF8: return "UTF8";
case CH_UTF16BE: return "UTF-16BE";
default:
return "ASCII";
}
}

static smb_iconv_t conv_handles[NUM_CHARSETS][NUM_CHARSETS];
Expand Down
5 changes: 5 additions & 0 deletions source4/lib/charset/charset.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,9 @@ typedef struct {

#include "lib/charset/charset_proto.h"

/* replace some string functions with multi-byte
versions */
#define strlower(s) strlower_m(s)
#define strupper(s) strupper_m(s)

#endif /* __CHARSET_H__ */
3 changes: 2 additions & 1 deletion source4/lib/charset/config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
[SUBSYSTEM::CHARSET]
OBJ_FILES = \
iconv.o \
charcnv.o
charcnv.o \
util_unistr.o
PUBLIC_HEADERS = charset.h
PUBLIC_PROTO_HEADER = charset_proto.h
PUBLIC_DEPENDENCIES = ICONV
Expand Down
Loading

0 comments on commit 8d137d9

Please sign in to comment.