summaryrefslogtreecommitdiffstats
path: root/lib/libkiconv
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2013-08-13 07:15:01 +0000
committerpeter <peter@FreeBSD.org>2013-08-13 07:15:01 +0000
commit995e1f0063b0515ed5821ebab3aff02dbbe44719 (patch)
tree9bba3bf02dbd5d242b50c29cd7221d5ae286e560 /lib/libkiconv
parentd9e76bbffc59d724ea0ffe9896012f4ac0859bc7 (diff)
downloadFreeBSD-src-995e1f0063b0515ed5821ebab3aff02dbbe44719.zip
FreeBSD-src-995e1f0063b0515ed5821ebab3aff02dbbe44719.tar.gz
The iconv in libc did two things - implement the standard APIs, the GNU
extensions and also tried to be link time compatible with ports libiconv. This splits that functionality and enables the parts that shouldn't interfere with the port by default. WITH_ICONV (now on by default) - adds iconv.h, iconv_open(3) etc. WITH_LIBICONV_COMPAT (off by default) adds the libiconv_open etc API, linker symbols and even a stub libiconv.so.3 that are good enough to be able to 'pkg delete -f libiconv' on a running system and reasonably expect it to work. I have tortured many machines over the last few days to try and reduce the possibilities of foot-shooting as much as I can. I've successfully recompiled to enable and disable the libiconv_compat modes, ports that use libiconv alongside system iconv etc. If you don't enable the WITH_LIBICONV_COMPAT switch, they don't share symbol space. This is an extension of behavior on other system. iconv(3) is a standard libc interface and libiconv port expects to be able to run alongside it on systems that have it. Bumped osreldate.
Diffstat (limited to 'lib/libkiconv')
-rw-r--r--lib/libkiconv/xlat16_iconv.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libkiconv/xlat16_iconv.c b/lib/libkiconv/xlat16_iconv.c
index f402b78..fee3c77 100644
--- a/lib/libkiconv/xlat16_iconv.c
+++ b/lib/libkiconv/xlat16_iconv.c
@@ -49,8 +49,6 @@
#include "quirks.h"
-typedef void *iconv_t;
-
struct xlat16_table {
uint32_t * idx[0x200];
void * data;
@@ -61,6 +59,7 @@ static struct xlat16_table kiconv_xlat16_open(const char *, const char *, int);
static int chklocale(int, const char *);
#ifdef ICONV_DLOPEN
+typedef void *iconv_t;
static int my_iconv_init(void);
static iconv_t (*my_iconv_open)(const char *, const char *);
static size_t (*my_iconv)(iconv_t, const char **, size_t *, char **, size_t *);
OpenPOWER on IntegriCloud