Bug 177150 - Some mozilla-config.h defines require additional cflags for embedders. Patch by <mook.moz+mozbz@gmail.com>. r=benjamin, sr=dbaron.

This commit is contained in:
kherron@fmailbox.com 2007-06-16 13:02:15 -07:00
parent 3ef7e96849
commit 2084922e5c

View File

@ -51,6 +51,7 @@
#include "nsXPCOMStrings.h"
#include "nsISupportsImpl.h"
#include "prlog.h"
class nsAString
{
@ -949,6 +950,7 @@ private:
*/
#ifdef HAVE_CPP_2BYTE_WCHAR_T
PR_STATIC_ASSERT(sizeof(wchar_t) == 2);
#define NS_LL(s) L##s
#define NS_MULTILINE_LITERAL_STRING(s) nsDependentString(NS_REINTERPRET_CAST(const nsAString::char_type*, s), PRUint32((sizeof(s)/sizeof(wchar_t))-1))
#define NS_MULTILINE_LITERAL_STRING_INIT(n,s) n(NS_REINTERPRET_CAST(const nsAString::char_type*, s), PRUint32((sizeof(s)/sizeof(wchar_t))-1))
@ -962,6 +964,9 @@ private:
typedef NS_ConvertASCIItoUTF16 nsLiteralString;
#endif
/* Check that PRUnichar is unsigned */
PR_STATIC_ASSERT(PRUnichar(-1) > PRUnichar(0));
/*
* Macro arguments used in concatenation or stringification won't be expanded.
* Therefore, in order for |NS_L(FOO)| to work as expected (which is to expand