[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Re: stlport5.2: FTBFS on armel: #error Weird WCHAR_MIN or WCHAR_MAX macro value.



Hi,

> I'm thinking it's more likely a glibc bug, as I fail to see an apparent reason
> why WCHAR_MIN/MAX are defined different on each of these platforms. It
> probably has to be reassigned to eglibc, but I'm cross-posting this to the
> eglibc maintainers first.

I think too.
wchar_t is not handled in cpp. WCHAR_MAX becomes -1.

I updated patch of local-eabi-wchar.diff.
# This header was included by #444580.

Best regards,
  Nobuhiro

-- 
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=444580

Unlike other architectures, on Arm EABI, wchar_t is "unsigned int".
thus the default glibc definitions are incorrect:

#define __WCHAR_MIN     (-2147483647 - 1)
#define __WCHAR_MAX     (2147483647)

This causes miscompilation of atleast libidn, and possibly other
packages that use gnulib tests that check the correctness of wchar_t.
The attached adds a eabi specific bits.h.

---
 ports/sysdeps/arm/eabi/bits/wchar.h |   26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

--- /dev/null
+++ b/ports/sysdeps/arm/eabi/bits/wchar.h
@@ -0,0 +1,26 @@
+/* wchar_t type related definitions.
+   Copyright (C) 2000 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#ifndef _BITS_WCHAR_H
+#define _BITS_WCHAR_H	1
+
+#define __WCHAR_MIN	( 0 )
+#define __WCHAR_MAX	( 4294967295 )
+
+#endif	/* bits/wchar.h */

Reply to: