mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Fix NS commercial Unix build bustage on some compilers by (at least temporarily) making PRUnichar always be equivalent to PRUint16 rather than sometimes being wchar_t. r=scc sr=brendan b=75544
This commit is contained in:
parent
498c575a6b
commit
dc77e98525
14
configure.in
14
configure.in
@ -2064,13 +2064,9 @@ if test "$result" = "yes"; then
|
||||
fi
|
||||
|
||||
dnl Check for usable wchar_t (2 bytes, unsigned)
|
||||
dnl (we really don't need the unsignedness check anymore)
|
||||
dnl ========================================================
|
||||
|
||||
TEST_SHORT_WCHAR=1
|
||||
MOZ_ARG_DISABLE_BOOL(short-wchar,
|
||||
[ --disable-short-wchar Disable compiler short-wchar option],
|
||||
TEST_SHORT_WCHAR= )
|
||||
|
||||
AC_CACHE_CHECK(for usable wchar_t (2 bytes, unsigned),
|
||||
ac_cv_have_usable_wchar,
|
||||
[AC_TRY_RUN([#include <wchar.h>
|
||||
@ -2081,20 +2077,13 @@ AC_CACHE_CHECK(for usable wchar_t (2 bytes, unsigned),
|
||||
ac_cv_have_usable_wchar="no",
|
||||
ac_cv_have_usable_wchar="maybe")])
|
||||
if test "$ac_cv_have_usable_wchar" = "yes"; then
|
||||
case $target in
|
||||
*-aix4.3*)
|
||||
;;
|
||||
*)
|
||||
AC_DEFINE(HAVE_CPP_2BYTE_WCHAR_T)
|
||||
HAVE_CPP_2BYTE_WCHAR_T=1
|
||||
;;
|
||||
esac
|
||||
else
|
||||
dnl This is really gcc-only
|
||||
dnl Do this test using CXX instead of CC since some versions of gcc
|
||||
dnl 2.96-2.97 have a signed wchar_t in c++ only.
|
||||
|
||||
if test "$TEST_SHORT_WCHAR"; then
|
||||
_SAVE_CFLAGS=$CFLAGS
|
||||
_SAVE_CC=$CC
|
||||
CC=$CXX
|
||||
@ -2119,7 +2108,6 @@ dnl Since this is gcc-only, CC and CXX should take the same arguments.
|
||||
CFLAGS=$_SAVE_CFLAGS
|
||||
fi
|
||||
CC=$_SAVE_CC
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Checks for header files.
|
||||
|
@ -67,8 +67,8 @@ literal_string( const char* aPtr, PRUint32 aLength )
|
||||
|
||||
#ifdef HAVE_CPP_2BYTE_WCHAR_T
|
||||
#define NS_L(s) L##s
|
||||
#define NS_MULTILINE_LITERAL_STRING(s) nsLocalString(s, (sizeof(s)/sizeof(wchar_t))-1)
|
||||
#define NS_NAMED_MULTILINE_LITERAL_STRING(n,s) nsLocalString n(s, (sizeof(s)/sizeof(wchar_t))-1)
|
||||
#define NS_MULTILINE_LITERAL_STRING(s) nsLocalString(NS_REINTERPRET_CAST(const PRUnichar*, s), (sizeof(s)/sizeof(wchar_t))-1)
|
||||
#define NS_NAMED_MULTILINE_LITERAL_STRING(n,s) nsLocalString n(NS_REINTERPRET_CAST(const PRUnichar*, s), (sizeof(s)/sizeof(wchar_t))-1)
|
||||
#else
|
||||
#define NS_L(s) s
|
||||
#define NS_MULTILINE_LITERAL_STRING(s) NS_ConvertASCIItoUCS2(s, sizeof(s)-1)
|
||||
|
@ -203,11 +203,7 @@
|
||||
|
||||
#ifndef __PRUNICHAR__
|
||||
#define __PRUNICHAR__
|
||||
#ifdef HAVE_CPP_2BYTE_WCHAR_T
|
||||
typedef wchar_t PRUnichar;
|
||||
#else
|
||||
typedef PRUint16 PRUnichar;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -67,8 +67,8 @@ literal_string( const char* aPtr, PRUint32 aLength )
|
||||
|
||||
#ifdef HAVE_CPP_2BYTE_WCHAR_T
|
||||
#define NS_L(s) L##s
|
||||
#define NS_MULTILINE_LITERAL_STRING(s) nsLocalString(s, (sizeof(s)/sizeof(wchar_t))-1)
|
||||
#define NS_NAMED_MULTILINE_LITERAL_STRING(n,s) nsLocalString n(s, (sizeof(s)/sizeof(wchar_t))-1)
|
||||
#define NS_MULTILINE_LITERAL_STRING(s) nsLocalString(NS_REINTERPRET_CAST(const PRUnichar*, s), (sizeof(s)/sizeof(wchar_t))-1)
|
||||
#define NS_NAMED_MULTILINE_LITERAL_STRING(n,s) nsLocalString n(NS_REINTERPRET_CAST(const PRUnichar*, s), (sizeof(s)/sizeof(wchar_t))-1)
|
||||
#else
|
||||
#define NS_L(s) s
|
||||
#define NS_MULTILINE_LITERAL_STRING(s) NS_ConvertASCIItoUCS2(s, sizeof(s)-1)
|
||||
|
Loading…
Reference in New Issue
Block a user