Subject: Re: iconv problems after update?
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
From: Takehiko NOZAKI <th-nozaki@netwrk.co.jp>
List: current-users
Date: 03/19/2007 19:36:21
--Multipart_Mon_Mar_19_19:36:21_2007-1
Content-Type: text/plain; charset=US-ASCII

hi, all.

i think it's better to use __PIC__ flag instead of -D_I18N_DYNAMIC.
any comment?

very truly yours.
--
Takehiko NOZAKI <tnozaki@NetBSD.org>



--Multipart_Mon_Mar_19_19:36:21_2007-1
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="patch-citrus"
Content-Transfer-Encoding: 7bit

Index: Makefile
===================================================================
RCS file: /cvsroot/src/lib/libc/Makefile,v
retrieving revision 1.129
diff -u -r1.129 Makefile
--- Makefile	18 Mar 2007 08:52:48 -0000	1.129
+++ Makefile	19 Mar 2007 09:54:12 -0000
@@ -101,14 +101,4 @@
 FILESNAME=	libc.tags
 FILESDIR=	/var/db
 
-
-# workaround for I18N stuffs: build singlebyte setlocale() for libc.a,
-# multibyte for libc.so.  the quirk should be removed when we support
-# dlopen() from within statically linked binaries.
-.if ${MKPICLIB} != "no"
-CPICFLAGS+=	-D_I18N_DYNAMIC
-.elif ${MKPIC} != "no"
-CPPFLAGS+=	-D_I18N_DYNAMIC
-.endif
-
 .include <bsd.lib.mk>
Index: citrus/citrus_ctype.c
===================================================================
RCS file: /cvsroot/src/lib/libc/citrus/citrus_ctype.c,v
retrieving revision 1.4
diff -u -r1.4 citrus_ctype.c
--- citrus/citrus_ctype.c	5 Mar 2003 20:18:15 -0000	1.4
+++ citrus/citrus_ctype.c	19 Mar 2007 09:54:12 -0000
@@ -54,7 +54,7 @@
 	NULL				/* cc_module */
 };
 
-#ifdef _I18N_DYNAMIC
+#if defined(__GNUC__) && (defined(__PIC__) || defined(__pic__))
 
 static int _initctypemodule(_citrus_ctype_t, char const *, _citrus_module_t,
 			    void *, size_t, size_t);
@@ -187,7 +187,7 @@
 }
 
 #else
-/* !_I18N_DYNAMIC */
+/* !__GNUC__ || (!__PIC__ && !__pic__) */
 
 int
 /*ARGSUSED*/
Index: citrus/citrus_module.c
===================================================================
RCS file: /cvsroot/src/lib/libc/citrus/citrus_module.c,v
retrieving revision 1.5
diff -u -r1.5 citrus_module.c
--- citrus/citrus_module.c	29 Nov 2005 03:11:58 -0000	1.5
+++ citrus/citrus_module.c	19 Mar 2007 09:54:13 -0000
@@ -115,7 +115,7 @@
 #include <dirent.h>
 #include <dlfcn.h>
 
-#ifdef _I18N_DYNAMIC
+#if defined(__GNUC__) && (defined(__PIC__) || defined(__pic__))
 
 static int _getdewey(int [], char *);
 static int _cmpndewey(int [], int, int [], int);
@@ -338,7 +338,7 @@
 		dlclose((void *)handle);
 }
 #else
-/* !_I18N_DYNAMIC */
+/* !__GNUC__ || (!__PIC__ && !__pic__) */
 
 void *
 /*ARGSUSED*/
Index: citrus/citrus_stdenc.c
===================================================================
RCS file: /cvsroot/src/lib/libc/citrus/citrus_stdenc.c,v
retrieving revision 1.3
diff -u -r1.3 citrus_stdenc.c
--- citrus/citrus_stdenc.c	29 Oct 2005 18:02:04 -0000	1.3
+++ citrus/citrus_stdenc.c	19 Mar 2007 09:54:13 -0000
@@ -50,7 +50,7 @@
 	&_citrus_NONE_stdenc_traits,	/* ce_traits */
 };
 
-#ifdef _I18N_DYNAMIC
+#if defined(__GNUC__) && (defined(__PIC__) || defined(__pic__))
 
 static int
 /*ARGSUSED*/
@@ -173,7 +173,7 @@
 }
 
 #else
-/* !_I18N_DYNAMIC */
+/* !__GNUC__ || (!__PIC__ && !__pic__) */
 
 int
 /*ARGSUSED*/

--Multipart_Mon_Mar_19_19:36:21_2007-1
Content-Type: text/plain; charset=US-ASCII


--Multipart_Mon_Mar_19_19:36:21_2007-1--