From f9acf770e9c121aa495cb7e19175a4a6e45ff3d9 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 19 Sep 2011 19:13:21 -0700 Subject: lib/util/charset: remove charset module loading Now that the 'table' modules are gone, there is no reason for there to be charset modules at all. This builds the macosxfs and weird modules into the binary at the appropriate times, and changes the tests to test instead the difference between the remaining internal handlers and iconv(). Andrew Bartlett Autobuild-User: Andrew Bartlett Autobuild-Date: Tue Sep 20 06:27:06 CEST 2011 on sn-devel-104 --- lib/util/charset/charset_macosxfs.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) (limited to 'lib/util/charset/charset_macosxfs.c') diff --git a/lib/util/charset/charset_macosxfs.c b/lib/util/charset/charset_macosxfs.c index 4d2ba5b6ffd..dfd142a51e4 100644 --- a/lib/util/charset/charset_macosxfs.c +++ b/lib/util/charset/charset_macosxfs.c @@ -30,8 +30,11 @@ */ #include "includes.h" +#include "charset_proto.h" #undef realloc +#ifdef DARWIN + /* * Include OS frameworks. These are only needed in this module. */ @@ -201,7 +204,7 @@ static void hexdump( const char * label, const char * s, size_t len ) * generic, not specifically for the file system. So they may not be * perfect fits. */ -static size_t macosxfs_encoding_pull( +size_t macosxfs_encoding_pull( void *cd, /* Encoder handle */ char **inbuf, size_t *inbytesleft, /* Script string */ char **outbuf, size_t *outbytesleft) /* UTF-16-LE string */ @@ -323,7 +326,7 @@ static size_t macosxfs_encoding_pull( return 0; } -static size_t macosxfs_encoding_push( +size_t macosxfs_encoding_push( void *cd, /* Encoder handle */ char **inbuf, size_t *inbytesleft, /* UTF-16-LE string */ char **outbuf, size_t *outbytesleft) /* Script string */ @@ -587,19 +590,12 @@ static size_t macosxfs_encoding_push( #endif /* USE_INTERNAL_API */ -/* - * For initialization, actually install the encoding as "macosxfs". - */ -static struct charset_functions macosxfs_encoding_functions = { - "MACOSXFS", macosxfs_encoding_pull, macosxfs_encoding_push -}; - -NTSTATUS charset_macosxfs_init(void) +#else /* DARWIN */ + +void charset_macosfs_dummy(void); +void charset_macosfs_dummy(void) { - if (!smb_register_charset(&macosxfs_encoding_functions)) { - return NT_STATUS_INTERNAL_ERROR; - } - return NT_STATUS_OK; + return; } -/* eof */ +#endif /* DARWIN */ -- cgit