diff options
author | peter <peter@FreeBSD.org> | 2013-07-03 07:03:19 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2013-07-03 07:03:19 +0000 |
commit | a02844e93b39b1329fb99d013834aa360f9f22ca (patch) | |
tree | aa3112ae9aed3dd307cbc6910a43d4af316b5143 /lib/libc/iconv | |
parent | 768522d3251b4165790523bf0382af436e1d5d21 (diff) | |
download | FreeBSD-src-a02844e93b39b1329fb99d013834aa360f9f22ca.zip FreeBSD-src-a02844e93b39b1329fb99d013834aa360f9f22ca.tar.gz |
Replace the #define for "iconv" so it is for the function name instead of
a macro with parameters. Remove a __DECONST hack and add consts instead
for gnu libiconv API compatability. This makes it work with things like
devel/boost-libs that expects to use "iconv" as though it were a pointer.
Diffstat (limited to 'lib/libc/iconv')
-rw-r--r-- | lib/libc/iconv/citrus_iconv.h | 2 | ||||
-rw-r--r-- | lib/libc/iconv/citrus_iconv_local.h | 4 | ||||
-rw-r--r-- | lib/libc/iconv/iconv.c | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/libc/iconv/citrus_iconv.h b/lib/libc/iconv/citrus_iconv.h index 99604e9..ac14ac3 100644 --- a/lib/libc/iconv/citrus_iconv.h +++ b/lib/libc/iconv/citrus_iconv.h @@ -52,7 +52,7 @@ __END_DECLS */ static __inline int _citrus_iconv_convert(struct _citrus_iconv * __restrict cv, - char * __restrict * __restrict in, size_t * __restrict inbytes, + const char * __restrict * __restrict in, size_t * __restrict inbytes, char * __restrict * __restrict out, size_t * __restrict outbytes, uint32_t flags, size_t * __restrict nresults) { diff --git a/lib/libc/iconv/citrus_iconv_local.h b/lib/libc/iconv/citrus_iconv_local.h index 081a708..52ac825 100644 --- a/lib/libc/iconv/citrus_iconv_local.h +++ b/lib/libc/iconv/citrus_iconv_local.h @@ -45,7 +45,7 @@ static void _citrus_##_m_##_iconv_uninit_shared \ (struct _citrus_iconv_shared *); \ static int _citrus_##_m_##_iconv_convert \ (struct _citrus_iconv * __restrict, \ - char * __restrict * __restrict, \ + const char * __restrict * __restrict, \ size_t * __restrict, \ char * __restrict * __restrict, \ size_t * __restrict outbytes, \ @@ -74,7 +74,7 @@ typedef void (*_citrus_iconv_uninit_shared_t) (struct _citrus_iconv_shared *); typedef int (*_citrus_iconv_convert_t) (struct _citrus_iconv * __restrict, - char *__restrict* __restrict, size_t * __restrict, + const char *__restrict* __restrict, size_t * __restrict, char * __restrict * __restrict, size_t * __restrict, uint32_t, size_t * __restrict); typedef int (*_citrus_iconv_init_context_t)(struct _citrus_iconv *); diff --git a/lib/libc/iconv/iconv.c b/lib/libc/iconv/iconv.c index c78a615..9b28ff6 100644 --- a/lib/libc/iconv/iconv.c +++ b/lib/libc/iconv/iconv.c @@ -130,7 +130,7 @@ libiconv_close(iconv_t handle) } size_t -libiconv(iconv_t handle, char **in, size_t *szin, char **out, size_t *szout) +libiconv(iconv_t handle, const char **in, size_t *szin, char **out, size_t *szout) { size_t ret; int err; @@ -151,7 +151,7 @@ libiconv(iconv_t handle, char **in, size_t *szin, char **out, size_t *szout) } size_t -__iconv(iconv_t handle, char **in, size_t *szin, char **out, +__iconv(iconv_t handle, const char **in, size_t *szin, char **out, size_t *szout, uint32_t flags, size_t *invalids) { size_t ret; |