summaryrefslogtreecommitdiff
path: root/lib/util/charset/charset_macosxfs.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-09-19 19:13:21 -0700
committerAndrew Bartlett <abartlet@samba.org>2011-09-20 06:27:06 +0200
commitf9acf770e9c121aa495cb7e19175a4a6e45ff3d9 (patch)
treeb64283a8a0f929f28de73f84ef207f5f5018f8f9 /lib/util/charset/charset_macosxfs.c
parent8316577b7538f7204c5fd6328756c4c3f171b36e (diff)
downloadsamba-f9acf770e9c121aa495cb7e19175a4a6e45ff3d9.tar.gz
samba-f9acf770e9c121aa495cb7e19175a4a6e45ff3d9.tar.bz2
samba-f9acf770e9c121aa495cb7e19175a4a6e45ff3d9.zip
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 <abartlet@samba.org> Autobuild-Date: Tue Sep 20 06:27:06 CEST 2011 on sn-devel-104
Diffstat (limited to 'lib/util/charset/charset_macosxfs.c')
-rw-r--r--lib/util/charset/charset_macosxfs.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/lib/util/charset/charset_macosxfs.c b/lib/util/charset/charset_macosxfs.c
index 4d2ba5b6ff..dfd142a51e 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 */