Subject: Re: 1.5_ALPHA/i386 build failure
To: None <joda@pdc.kth.se>
From: T.SHIOZAKI <tshiozak@astec.co.jp>
List: current-users
Date: 08/11/2000 18:57:03
Hi,
From: joda@pdc.kth.se (Johan Danielsson)
Subject: 1.5_ALPHA/i386 build failure
Date: 11 Aug 2000 11:24:13 +0200
Message-ID: <xofn1ikdubm.fsf@blubb.pdc.kth.se>
> /usr/obj/1.5/dest/usr/lib/libc.a(setlocale.o): In function `__setlocale_mb_len_max_32':
> setlocale.o(.text+0x0): multiple definition of `__setlocale_mb_len_max_32'
> libhack.o(.text+0x1358): first defined here
> /usr/bin/ld: Warning: size of symbol `__setlocale_mb_len_max_32' changed from 35 to 736 in setlocale.o
> collect2: ld returned 1 exit status
It seems that newly added __mb_cur_max in stdlib.h causes the error.
The following patch corrects the problem, maybe
(I can't verify and commit it just now):
Index: setlocale.c
===================================================================
RCS file: /cvsroot/basesrc/distrib/utils/libhack/setlocale.c,v
retrieving revision 1.2
diff -u -r1.2 setlocale.c
--- setlocale.c 1998/01/09 08:03:22 1.2
+++ setlocale.c 2000/08/11 09:52:19
@@ -6,6 +6,8 @@
*/
#include <sys/localedef.h>
+#include <stdlib.h>
+#define __SETLOCALE_SOURCE__
#include <locale.h>
/*
@@ -17,8 +19,10 @@
static char current_locale[32] = { "C" };
+size_t __mb_cur_max = 1;
+
char *
-setlocale(category, locale)
+__setlocale_mb_len_max_32(category, locale)
int category;
const char *locale;
{
--
Takuya SHIOZAKI / ASTEC Products, Inc.