This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
* See if autoconf has found us the internal headers in some form.
*/
#if HAVE_COREFOUNDATION_CFSTRINGENCODINGCONVERTER_H
-# include <Corefoundation/CFStringEncodingConverter.h>
-# include <Corefoundation/CFUnicodePrecomposition.h>
+# include <CoreFoundation/CFStringEncodingConverter.h>
+# include <CoreFoundation/CFUnicodePrecomposition.h>
# define USE_INTERNAL_API 1
#elif HAVE_CFSTRINGENCODINGCONVERTER_H
# include <CFStringEncodingConverter.h>
{
if (newsize > *size) {
*size = newsize + 128;
- buffer = realloc(buffer, *size);
+ buffer = SMB_REALLOC(buffer, *size);
}
return buffer;
}
* perfect fits.
*/
static 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 */
+ void *cd, /* Encoder handle */
+ const char **inbuf, size_t *inbytesleft, /* Script string */
+ char **outbuf, size_t *outbytesleft) /* UTF-16-LE string */
{
static const int script_code = kCFStringEncodingUTF8;
static CFMutableStringRef cfstring = NULL;
}
static 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 */
+ void *cd, /* Encoder handle */
+ const char **inbuf, size_t *inbytesleft, /* UTF-16-LE string */
+ char **outbuf, size_t *outbytesleft) /* Script string */
{
static const int script_code = kCFStringEncodingUTF8;
static CFMutableStringRef cfstring = NULL;
charsconverted = CFStringGetBytes(
cfstring, CFRangeMake(0,cfsize),
script_code, 0, False,
- *outbuf, *outbytesleft, &outsize);
+ (uint8_t *)(*outbuf), *outbytesleft, &outsize);
if (0 == charsconverted) {
debug_out("String conversion: "
"MACOSXFS", macosxfs_encoding_pull, macosxfs_encoding_push
};
-NTSTATUS init_module(void)
+NTSTATUS charset_macosxfs_init(void)
{
return smb_register_charset(&macosxfs_encoding_functions);
}