[Webkit-unassigned] [Bug 162808] JSStringRef should define JSChar without platform checks

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 30 16:39:16 PDT 2016


--- Comment #3 from Nicolas Breidinger <Nicolas.Breidinger at sony.com> ---
(In reply to comment #2)
> Don't we need to check if __WCHAR_MAX__ is #defined?

Looking more closely at gcc and msvc, a better check would be as follows:
> #if !defined(_NATIVE_WCHAR_T_DEFINED) && (!defined(__WCHAR_MAX__) || (__WCHAR_MAX__ > 0xffffU))

_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 (https://opensource.apple.com/source/Libc/Libc-825.24/include/_types.h) it is not guaranteed to exist:
> #ifdef __WCHAR_MAX__
> #else /* ! __WCHAR_MAX__ */
> #define __DARWIN_WCHAR_MAX	0x7fffffff
> #endif /* __WCHAR_MAX__ */

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160930/fc8785d1/attachment.html>

More information about the webkit-unassigned mailing list