svn commit: r258283 - in head: . include lib lib/libc lib/libc/iconv lib/libc_nonshared

Peter Wemm peter at FreeBSD.org
Sun Nov 17 22:52:22 UTC 2013


Author: peter
Date: Sun Nov 17 22:52:17 2013
New Revision: 258283
URL: http://svnweb.freebsd.org/changeset/base/258283

Log:
  Attempt to move the POSIX iconv* symbols out of runtime linker space.
  FreeBSD systems usually implemented this as a third party module and
  our implementation hasn't played as nicely with the old way as it could
  have.
  
  To that end:
  * Rename the iconv* symbols in libc.so.7 to have a __bsd_ prefix.
  * Provide .symver compatability with existing 10.x+ binaries that
    referenced the iconv symbols. All existing binaries should work.
  * Like on Linux/glibc systems, add a libc_nonshared.a to the ldscript
    at /usr/lib/libc.so.
  * Move the "iconv*" wrapper symbols to libc_nonshared.a
  
  This should solve the runtime ambiguity about which symbols resolve
  to where.  If you compile against the iconv in libc, your runtime
  dependencies will be unambiguous.
  
  Old 9.x libraries and binaries will always resolve against their
  libiconv.so.3 like they did on 9.x.  They won't resolve against libc.
  
  Old 10.x binaries will be satisified by the .symver helpers.
  
  This should allow ports to selectively compile against the libiconv
  port if needed and it should behave without ambiguity now.
  
  Discussed with:	 kib

Added:
  head/lib/libc/iconv/iconv-internal.h   (contents, props changed)
  head/lib/libc/iconv/iconv_compat.c   (contents, props changed)
  head/lib/libc_nonshared/
  head/lib/libc_nonshared/Makefile   (contents, props changed)
  head/lib/libc_nonshared/__iconv.c   (contents, props changed)
  head/lib/libc_nonshared/__iconv_free_list.c   (contents, props changed)
  head/lib/libc_nonshared/__iconv_get_list.c   (contents, props changed)
  head/lib/libc_nonshared/__stub.c   (contents, props changed)
  head/lib/libc_nonshared/iconv.c   (contents, props changed)
  head/lib/libc_nonshared/iconv_canonicalize.c   (contents, props changed)
  head/lib/libc_nonshared/iconv_close.c   (contents, props changed)
  head/lib/libc_nonshared/iconv_open.c   (contents, props changed)
  head/lib/libc_nonshared/iconv_open_into.c   (contents, props changed)
  head/lib/libc_nonshared/iconv_set_relocation_prefix.c   (contents, props changed)
  head/lib/libc_nonshared/iconvctl.c   (contents, props changed)
  head/lib/libc_nonshared/iconvlist.c   (contents, props changed)
Modified:
  head/Makefile.inc1
  head/include/iconv.h
  head/lib/Makefile
  head/lib/libc/iconv/Makefile.inc
  head/lib/libc/iconv/Symbol.map
  head/lib/libc/iconv/iconv.c
  head/lib/libc/libc.ldscript

Modified: head/Makefile.inc1
==============================================================================
--- head/Makefile.inc1	Sun Nov 17 22:44:52 2013	(r258282)
+++ head/Makefile.inc1	Sun Nov 17 22:52:17 2013	(r258283)
@@ -1475,11 +1475,13 @@ _startup_libs+=	lib/csu/${MACHINE_CPUARC
 _startup_libs+=	gnu/lib/libgcc
 _startup_libs+=	lib/libcompiler_rt
 _startup_libs+=	lib/libc
+_startup_libs+=	lib/libc_nonshared
 .if ${MK_LIBCPLUSPLUS} != "no"
 _startup_libs+=	lib/libcxxrt
 .endif
 
 gnu/lib/libgcc__L: lib/libc__L
+gnu/lib/libgcc__L: lib/libc_nonshared__L
 .if ${MK_LIBCPLUSPLUS} != "no"
 lib/libcxxrt__L: gnu/lib/libgcc__L
 .endif

Modified: head/include/iconv.h
==============================================================================
--- head/include/iconv.h	Sun Nov 17 22:44:52 2013	(r258282)
+++ head/include/iconv.h	Sun Nov 17 22:52:17 2013	(r258283)
@@ -69,17 +69,12 @@ size_t	__iconv(iconv_t, const char **, s
 /*
  * GNU interfaces for iconv
  */
-/* We have iconvctl() */
-#define _ICONV_VERSION	0x0108
-extern int _iconv_version;
-
 typedef struct {
 	void	*spaceholder[64];
 } iconv_allocation_t;
 
 int	 iconv_open_into(const char *, const char *, iconv_allocation_t *);
-void	 iconv_set_relocation_prefix(const char *orig_prefix,
-	     const char *curr_prefix);
+void	 iconv_set_relocation_prefix(const char *, const char *);
 
 /*
  * iconvctl() request macros

Modified: head/lib/Makefile
==============================================================================
--- head/lib/Makefile	Sun Nov 17 22:44:52 2013	(r258282)
+++ head/lib/Makefile	Sun Nov 17 22:52:17 2013	(r258283)
@@ -32,6 +32,7 @@
 
 SUBDIR_ORDERED=	${_csu} \
 	libc \
+	libc_nonshared \
 	libbsm \
 	libauditd \
 	libcompiler_rt \

Modified: head/lib/libc/iconv/Makefile.inc
==============================================================================
--- head/lib/libc/iconv/Makefile.inc	Sun Nov 17 22:44:52 2013	(r258282)
+++ head/lib/libc/iconv/Makefile.inc	Sun Nov 17 22:52:17 2013	(r258283)
@@ -14,5 +14,5 @@ SRCS+=	citrus_bcs.c citrus_bcs_strtol.c 
 	citrus_esdb.c citrus_hash.c citrus_iconv.c citrus_lookup.c \
 	citrus_lookup_factory.c citrus_mapper.c citrus_memstream.c \
 	citrus_mmap.c citrus_module.c citrus_none.c citrus_pivot_factory.c \
-	citrus_prop.c citrus_stdenc.c iconv.c
+	citrus_prop.c citrus_stdenc.c iconv.c iconv_compat.c
 SYM_MAPS+= ${.CURDIR}/iconv/Symbol.map

Modified: head/lib/libc/iconv/Symbol.map
==============================================================================
--- head/lib/libc/iconv/Symbol.map	Sun Nov 17 22:44:52 2013	(r258282)
+++ head/lib/libc/iconv/Symbol.map	Sun Nov 17 22:52:17 2013	(r258283)
@@ -2,22 +2,18 @@
  * $FreeBSD$
  */
 
-FBSD_1.2 {
-	__iconv;
-	__iconv_free_list;
-	__iconv_get_list;
-	iconv_canonicalize;
-};
-
 FBSD_1.3 {
-	_iconv_version;
-	iconv;
-	iconv_open;
-	iconv_close;
-	iconv_open_into;
-	iconv_set_relocation_prefix;
-	iconvctl;
-	iconvlist;
+	__bsd___iconv;
+	__bsd___iconv_free_list;
+	__bsd___iconv_get_list;
+	__bsd_iconv;
+	__bsd_iconv_canonicalize;
+	__bsd_iconv_close;
+	__bsd_iconv_open;
+	__bsd_iconv_open_into;
+	__bsd_iconv_set_relocation_prefix;
+	__bsd_iconvctl;
+	__bsd_iconvlist;
 };
 
 FBSDprivate_1.0 {

Added: head/lib/libc/iconv/iconv-internal.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/iconv/iconv-internal.h	Sun Nov 17 22:52:17 2013	(r258283)
@@ -0,0 +1,45 @@
+/*-
+ * Copyright (c) 2013 Peter Wemm
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+/*
+ * Interal prototypes for our back-end functions.
+ */
+size_t	__bsd___iconv(iconv_t, const char **, size_t *, char **,
+		size_t *, __uint32_t, size_t *);
+void	__bsd___iconv_free_list(char **, size_t);
+int	__bsd___iconv_get_list(char ***, size_t *, __iconv_bool);
+size_t	__bsd_iconv(iconv_t, const char ** __restrict,
+		    size_t * __restrict, char ** __restrict,
+		    size_t * __restrict);
+const char *__bsd_iconv_canonicalize(const char *);
+int	__bsd_iconv_close(iconv_t);
+iconv_t	__bsd_iconv_open(const char *, const char *);
+int	__bsd_iconv_open_into(const char *, const char *, iconv_allocation_t *);
+void	__bsd_iconv_set_relocation_prefix(const char *, const char *);
+int	__bsd_iconvctl(iconv_t, int, void *);
+void	__bsd_iconvlist(int (*) (unsigned int, const char * const *, void *), void *);

Modified: head/lib/libc/iconv/iconv.c
==============================================================================
--- head/lib/libc/iconv/iconv.c	Sun Nov 17 22:44:52 2013	(r258282)
+++ head/lib/libc/iconv/iconv.c	Sun Nov 17 22:52:17 2013	(r258283)
@@ -47,15 +47,12 @@
 #include "citrus_hash.h"
 #include "citrus_iconv.h"
 
-#define ISBADF(_h_)	(!(_h_) || (_h_) == (iconv_t)-1)
-
-int _iconv_version = _ICONV_VERSION;
+#include "iconv-internal.h"
 
-iconv_t		 _iconv_open(const char *out, const char *in,
-		    struct _citrus_iconv *prealloc);
+#define ISBADF(_h_)	(!(_h_) || (_h_) == (iconv_t)-1)
 
-iconv_t
-_iconv_open(const char *out, const char *in, struct _citrus_iconv *handle)
+static iconv_t
+__bsd___iconv_open(const char *out, const char *in, struct _citrus_iconv *handle)
 {
 	const char *out_slashes;
 	char *out_noslashes;
@@ -92,23 +89,23 @@ _iconv_open(const char *out, const char 
 }
 
 iconv_t
-iconv_open(const char *out, const char *in)
+__bsd_iconv_open(const char *out, const char *in)
 {
 
-	return (_iconv_open(out, in, NULL));
+	return (__bsd___iconv_open(out, in, NULL));
 }
 
 int
-iconv_open_into(const char *out, const char *in, iconv_allocation_t *ptr)
+__bsd_iconv_open_into(const char *out, const char *in, iconv_allocation_t *ptr)
 {
 	struct _citrus_iconv *handle;
 
 	handle = (struct _citrus_iconv *)ptr;
-	return ((_iconv_open(out, in, handle) == (iconv_t)-1) ? -1 : 0);
+	return ((__bsd___iconv_open(out, in, handle) == (iconv_t)-1) ? -1 : 0);
 }
 
 int
-iconv_close(iconv_t handle)
+__bsd_iconv_close(iconv_t handle)
 {
 
 	if (ISBADF(handle)) {
@@ -122,7 +119,7 @@ iconv_close(iconv_t handle)
 }
 
 size_t
-iconv(iconv_t handle, const char **in, size_t *szin, char **out, size_t *szout)
+__bsd_iconv(iconv_t handle, const char **in, size_t *szin, char **out, size_t *szout)
 {
 	size_t ret;
 	int err;
@@ -143,7 +140,7 @@ iconv(iconv_t handle, const char **in, s
 }
 
 size_t
-__iconv(iconv_t handle, const char **in, size_t *szin, char **out,
+__bsd___iconv(iconv_t handle, const char **in, size_t *szin, char **out,
     size_t *szout, uint32_t flags, size_t *invalids)
 {
 	size_t ret;
@@ -167,7 +164,7 @@ __iconv(iconv_t handle, const char **in,
 }
 
 int
-__iconv_get_list(char ***rlist, size_t *rsz, bool sorted)
+__bsd___iconv_get_list(char ***rlist, size_t *rsz, bool sorted)
 {
 	int ret;
 
@@ -181,7 +178,7 @@ __iconv_get_list(char ***rlist, size_t *
 }
 
 void
-__iconv_free_list(char **list, size_t sz)
+__bsd___iconv_free_list(char **list, size_t sz)
 {
 
 	_citrus_esdb_free_list(list, sz);
@@ -202,7 +199,7 @@ qsort_helper(const void *first, const vo
 }
 
 void
-iconvlist(int (*do_one) (unsigned int, const char * const *,
+__bsd_iconvlist(int (*do_one) (unsigned int, const char * const *,
     void *), void *data)
 {
 	char **list, **names;
@@ -213,7 +210,7 @@ iconvlist(int (*do_one) (unsigned int, c
 
 	i = 0;
 
-	if (__iconv_get_list(&list, &sz, true))
+	if (__bsd___iconv_get_list(&list, &sz, true))
 		list = NULL;
 	qsort((void *)list, sz, sizeof(char *), qsort_helper);
 	while (i < sz) {
@@ -222,7 +219,7 @@ iconvlist(int (*do_one) (unsigned int, c
 		curkey = (char *)malloc(slashpos - list[i] + 2);
 		names = (char **)malloc(sz * sizeof(char *));
 		if ((curkey == NULL) || (names == NULL)) {
-			__iconv_free_list(list, sz);
+			__bsd___iconv_free_list(list, sz);
 			return;
 		}
 		strlcpy(curkey, list[i], slashpos - list[i] + 1);
@@ -231,7 +228,7 @@ iconvlist(int (*do_one) (unsigned int, c
 			slashpos = strchr(list[i], '/');
 			curitem = (char *)malloc(strlen(slashpos) + 1);
 			if (curitem == NULL) {
-				__iconv_free_list(list, sz);
+				__bsd___iconv_free_list(list, sz);
 				return;
 			}
 			strlcpy(curitem, &slashpos[1], strlen(slashpos) + 1);
@@ -245,18 +242,18 @@ iconvlist(int (*do_one) (unsigned int, c
 		free(names);
 	}
 
-	__iconv_free_list(list, sz);
+	__bsd___iconv_free_list(list, sz);
 }
 
-__inline const char
-*iconv_canonicalize(const char *name)
+__inline const char *
+__bsd_iconv_canonicalize(const char *name)
 {
 
 	return (_citrus_iconv_canonicalize(name));
 }
 
 int
-iconvctl(iconv_t cd, int request, void *argument)
+__bsd_iconvctl(iconv_t cd, int request, void *argument)
 {
 	struct _citrus_iconv *cv;
 	struct iconv_hooks *hooks;
@@ -308,7 +305,7 @@ iconvctl(iconv_t cd, int request, void *
 }
 
 void
-iconv_set_relocation_prefix(const char *orig_prefix __unused,
+__bsd_iconv_set_relocation_prefix(const char *orig_prefix __unused,
     const char *curr_prefix __unused)
 {
 

Added: head/lib/libc/iconv/iconv_compat.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/iconv/iconv_compat.c	Sun Nov 17 22:52:17 2013	(r258283)
@@ -0,0 +1,121 @@
+/*-
+ * Copyright (c) 2013 Peter Wemm
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+/*
+ * These are ABI implementations for when the raw iconv_* symbol
+ * space was exposed via libc.so.7 in its early life.  This is
+ * a transition aide, these wrappers will not normally ever be
+ * executed except via __sym_compat() references.
+ */
+#include <sys/types.h>
+#include <iconv.h>
+#include "iconv-internal.h"
+
+size_t
+__iconv_compat(iconv_t a, const char ** b, size_t * c, char ** d,
+     size_t * e, __uint32_t f, size_t *g)
+{
+	return __bsd___iconv(a, b, c, d, e, f, g);
+}
+
+void
+__iconv_free_list_compat(char ** a, size_t b)
+{
+	__bsd___iconv_free_list(a, b);
+}
+
+int
+__iconv_get_list_compat(char ***a, size_t *b, __iconv_bool c)
+{
+	return __bsd___iconv_get_list(a, b, c);
+}
+
+size_t
+iconv_compat(iconv_t a, const char ** __restrict b,
+      size_t * __restrict c, char ** __restrict d,
+      size_t * __restrict e)
+{
+	return __bsd_iconv(a, b, c, d, e);
+}
+
+const char *
+iconv_canonicalize_compat(const char *a)
+{
+	return __bsd_iconv_canonicalize(a);
+}
+
+int
+iconv_close_compat(iconv_t a)
+{
+	return __bsd_iconv_close(a);
+}
+
+iconv_t
+iconv_open_compat(const char *a, const char *b)
+{
+	return __bsd_iconv_open(a, b);
+}
+
+int
+iconv_open_into_compat(const char *a, const char *b, iconv_allocation_t *c)
+{
+	return __bsd_iconv_open_into(a, b, c);
+}
+
+void
+iconv_set_relocation_prefix_compat(const char *a, const char *b)
+{
+	return __bsd_iconv_set_relocation_prefix(a, b);
+}
+
+int
+iconvctl_compat(iconv_t a, int b, void *c)
+{
+	return __bsd_iconvctl(a, b, c);
+}
+
+void
+iconvlist_compat(int (*a) (unsigned int, const char * const *, void *), void *b)
+{
+	return __bsd_iconvlist(a, b);
+}
+
+int _iconv_version_compat = 0x0108;	/* Magic - not used */
+
+__sym_compat(__iconv, __iconv_compat, FBSD_1.2);
+__sym_compat(__iconv_free_list, __iconv_free_list_compat, FBSD_1.2);
+__sym_compat(__iconv_get_list, __iconv_get_list_compat, FBSD_1.2);
+__sym_compat(_iconv_version, _iconv_version_compat, FBSD_1.3);
+__sym_compat(iconv, iconv_compat, FBSD_1.3);
+__sym_compat(iconv_canonicalize, iconv_canonicalize_compat, FBSD_1.2);
+__sym_compat(iconv_close, iconv_close_compat, FBSD_1.3);
+__sym_compat(iconv_open, iconv_open_compat, FBSD_1.3);
+__sym_compat(iconv_open_into, iconv_open_into_compat, FBSD_1.3);
+__sym_compat(iconv_set_relocation_prefix, iconv_set_relocation_prefix_compat, FBSD_1.3);
+__sym_compat(iconvctl, iconvctl_compat, FBSD_1.3);
+__sym_compat(iconvlist, iconvlist_compat, FBSD_1.3);

Modified: head/lib/libc/libc.ldscript
==============================================================================
--- head/lib/libc/libc.ldscript	Sun Nov 17 22:44:52 2013	(r258282)
+++ head/lib/libc/libc.ldscript	Sun Nov 17 22:52:17 2013	(r258283)
@@ -1,2 +1,2 @@
 /* $FreeBSD$ */
-GROUP ( @@SHLIB@@ @@LIBDIR@@/libssp_nonshared.a )
+GROUP ( @@SHLIB@@ @@LIBDIR@@/libc_nonshared.a @@LIBDIR@@/libssp_nonshared.a )

Added: head/lib/libc_nonshared/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc_nonshared/Makefile	Sun Nov 17 22:52:17 2013	(r258283)
@@ -0,0 +1,27 @@
+# $FreeBSD$
+
+# We're actually creating a libc_noshared.a that is PIC along side libc.so.*
+# It is used exclusively with libc.so.* - there is no need for any other
+# compile modes.
+# bsd.lib.mk doesn't have an easy way to express that.
+NO_PROFILE?=
+.include <bsd.own.mk>
+NO_PIC=	
+# -fpic on some platforms, -fPIC on others.
+CFLAGS+=${PICFLAG} -DPIC -fvisibility=hidden
+
+LIB=	c_nonshared
+
+# So that an empty .a file doesn't cause errors.
+SRCS=	__stub.c
+
+.if ${MK_ICONV} == "yes"
+SRCS+=	__iconv.c __iconv_free_list.c __iconv_get_list.c \
+	iconv.c iconv_canonicalize.c iconv_close.c \
+	iconv_open.c iconv_open_into.c \
+	iconv_set_relocation_prefix.c iconvctl.c iconvlist.c
+CFLAGS+=-I${.CURDIR}/../libc/iconv
+.endif
+
+.include <bsd.lib.mk>
+

Added: head/lib/libc_nonshared/__iconv.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc_nonshared/__iconv.c	Sun Nov 17 22:52:17 2013	(r258283)
@@ -0,0 +1,38 @@
+/*-
+ * Copyright (c) 2013 Peter Wemm
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#include <sys/types.h>
+#include <iconv.h>
+#include "iconv-internal.h"
+
+size_t
+__iconv(iconv_t a, const char **b, size_t *c, char **d,
+     size_t *e, __uint32_t f, size_t *g)
+{
+	return __bsd___iconv(a, b, c, d, e, f, g);
+}

Added: head/lib/libc_nonshared/__iconv_free_list.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc_nonshared/__iconv_free_list.c	Sun Nov 17 22:52:17 2013	(r258283)
@@ -0,0 +1,37 @@
+/*-
+ * Copyright (c) 2013 Peter Wemm
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#include <sys/types.h>
+#include <iconv.h>
+#include "iconv-internal.h"
+
+void
+__iconv_free_list(char **a, size_t b)
+{
+	__bsd___iconv_free_list(a, b);
+}

Added: head/lib/libc_nonshared/__iconv_get_list.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc_nonshared/__iconv_get_list.c	Sun Nov 17 22:52:17 2013	(r258283)
@@ -0,0 +1,37 @@
+/*-
+ * Copyright (c) 2013 Peter Wemm
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#include <sys/types.h>
+#include <iconv.h>
+#include "iconv-internal.h"
+
+int
+__iconv_get_list(char ***a, size_t *b, __iconv_bool c)
+{
+	return __bsd___iconv_get_list(a, b, c);
+}

Added: head/lib/libc_nonshared/__stub.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc_nonshared/__stub.c	Sun Nov 17 22:52:17 2013	(r258283)
@@ -0,0 +1,31 @@
+/*-
+ * Copyright (c) 2013 Peter Wemm
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+extern int __stub_N8TwezWFyocUB;
+
+int __stub_N8TwezWFyocUB;		/* 42 */

Added: head/lib/libc_nonshared/iconv.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc_nonshared/iconv.c	Sun Nov 17 22:52:17 2013	(r258283)
@@ -0,0 +1,39 @@
+/*-
+ * Copyright (c) 2013 Peter Wemm
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#include <sys/types.h>
+#include <iconv.h>
+#include "iconv-internal.h"
+
+size_t
+iconv(iconv_t a, const char ** __restrict b,
+      size_t * __restrict c, char ** __restrict d,
+      size_t * __restrict e)
+{
+	return __bsd_iconv(a, b, c, d, e);
+}

Added: head/lib/libc_nonshared/iconv_canonicalize.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc_nonshared/iconv_canonicalize.c	Sun Nov 17 22:52:17 2013	(r258283)
@@ -0,0 +1,37 @@
+/*-
+ * Copyright (c) 2013 Peter Wemm
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#include <sys/types.h>
+#include <iconv.h>
+#include "iconv-internal.h"
+
+const char *
+iconv_canonicalize(const char *a)
+{
+	return __bsd_iconv_canonicalize(a);
+}

Added: head/lib/libc_nonshared/iconv_close.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc_nonshared/iconv_close.c	Sun Nov 17 22:52:17 2013	(r258283)
@@ -0,0 +1,37 @@
+/*-
+ * Copyright (c) 2013 Peter Wemm
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#include <sys/types.h>
+#include <iconv.h>
+#include "iconv-internal.h"
+
+int
+iconv_close(iconv_t a)
+{
+	return __bsd_iconv_close(a);
+}

Added: head/lib/libc_nonshared/iconv_open.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc_nonshared/iconv_open.c	Sun Nov 17 22:52:17 2013	(r258283)
@@ -0,0 +1,37 @@
+/*-
+ * Copyright (c) 2013 Peter Wemm
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#include <sys/types.h>
+#include <iconv.h>
+#include "iconv-internal.h"
+
+iconv_t
+iconv_open(const char *a, const char *b)
+{
+	return __bsd_iconv_open(a, b);
+}

Added: head/lib/libc_nonshared/iconv_open_into.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc_nonshared/iconv_open_into.c	Sun Nov 17 22:52:17 2013	(r258283)
@@ -0,0 +1,37 @@
+/*-
+ * Copyright (c) 2013 Peter Wemm
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#include <sys/types.h>
+#include <iconv.h>
+#include "iconv-internal.h"
+
+int
+iconv_open_into(const char *a, const char *b, iconv_allocation_t *c)
+{
+	return __bsd_iconv_open_into(a, b, c);
+}

Added: head/lib/libc_nonshared/iconv_set_relocation_prefix.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc_nonshared/iconv_set_relocation_prefix.c	Sun Nov 17 22:52:17 2013	(r258283)
@@ -0,0 +1,37 @@
+/*-
+ * Copyright (c) 2013 Peter Wemm
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#include <sys/types.h>
+#include <iconv.h>
+#include "iconv-internal.h"
+
+void
+iconv_set_relocation_prefix(const char *a, const char *b)
+{
+	return __bsd_iconv_set_relocation_prefix(a, b);
+}

Added: head/lib/libc_nonshared/iconvctl.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc_nonshared/iconvctl.c	Sun Nov 17 22:52:17 2013	(r258283)
@@ -0,0 +1,37 @@
+/*-
+ * Copyright (c) 2013 Peter Wemm
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#include <sys/types.h>
+#include <iconv.h>
+#include "iconv-internal.h"
+
+int
+iconvctl(iconv_t a, int b, void *c)
+{
+	return __bsd_iconvctl(a, b, c);
+}

Added: head/lib/libc_nonshared/iconvlist.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc_nonshared/iconvlist.c	Sun Nov 17 22:52:17 2013	(r258283)
@@ -0,0 +1,37 @@
+/*-
+ * Copyright (c) 2013 Peter Wemm
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#include <sys/types.h>
+#include <iconv.h>
+#include "iconv-internal.h"
+
+void
+iconvlist(int (*a) (unsigned int, const char * const *, void *), void *b)
+{
+	return __bsd_iconvlist(a, b);
+}


More information about the svn-src-all mailing list