<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&#64;sony.com" title="Nicolas Breidinger &lt;Nicolas.Breidinger&#64;sony.com&gt;"> <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">&gt; 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">&gt; #if !defined(_NATIVE_WCHAR_T_DEFINED) &amp;&amp; (!defined(__WCHAR_MAX__) || (__WCHAR_MAX__ &gt; 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">&gt; #ifdef __WCHAR_MAX__
&gt; #define __DARWIN_WCHAR_MAX        __WCHAR_MAX__
&gt; #else /* ! __WCHAR_MAX__ */
&gt; #define __DARWIN_WCHAR_MAX        0x7fffffff
&gt; #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>