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

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



Hi,

I got the same error in the armhf port. In more detail, the actual error is 
caused by the ambiguity in the definition of WCHAR_MAX.

On armel/armhf WCHAR_MAX is in fact defined in bits/wchar.h:

#define __WCHAR_MAX	( (wchar_t) - 1 )

whereas on amd64 it's defined explicitly as:

/* Use GCC's __WCHAR_MAX__ when available.  */
#ifdef __WCHAR_MAX__
#define __WCHAR_MAX     __WCHAR_MAX__
#else
#define __WCHAR_MAX     (2147483647)
#endif

/* GCC may also define __WCHAR_UNSIGNED__.
   Use L'\0' to give the expression the correct (unsigned) type.  */
#ifdef __WCHAR_UNSIGNED__
#define __WCHAR_MIN       L'\0'

/* Failing that, rely on the preprocessor's knowledge of the
   signedness of wchar_t.  */
#elif L'\0' - 1 > 0
#define __WCHAR_MIN       L'\0'
#else
#define __WCHAR_MIN       (-__WCHAR_MAX - 1)
#endif

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.

Regards

Konstantinos


Reply to: