<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - JSStringRef should define JSChar without platform checks"
href="https://bugs.webkit.org/show_bug.cgi?id=162808#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - JSStringRef should define JSChar without platform checks"
href="https://bugs.webkit.org/show_bug.cgi?id=162808">bug 162808</a>
from <span class="vcard"><a class="email" href="mailto:Nicolas.Breidinger@sony.com" title="Nicolas Breidinger <Nicolas.Breidinger@sony.com>"> <span class="fn">Nicolas Breidinger</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=162808#c2">comment #2</a>)
<span class="quote">> Don't we need to check if __WCHAR_MAX__ is #defined?</span >
Looking more closely at gcc and msvc, a better check would be as follows:
<span class="quote">> #if !defined(_NATIVE_WCHAR_T_DEFINED) && (!defined(__WCHAR_MAX__) || (__WCHAR_MAX__ > 0xffffU))</span >
_NATIVE_WCHAR_T_DEFINED being msvc specific
__WCHAR_MAX__ being gcc specific
However, I'm not familiar with mac implementation, it seems according to apple's libc (<a href="https://opensource.apple.com/source/Libc/Libc-825.24/include/_types.h">https://opensource.apple.com/source/Libc/Libc-825.24/include/_types.h</a>) it is not guaranteed to exist:
<span class="quote">> #ifdef __WCHAR_MAX__
> #define __DARWIN_WCHAR_MAX        __WCHAR_MAX__
> #else /* ! __WCHAR_MAX__ */
> #define __DARWIN_WCHAR_MAX        0x7fffffff
> #endif /* __WCHAR_MAX__ */</span ></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>