Print this page
Fix clang errors

Split Close
Expand all
Collapse all
          --- old/usr/src/head/wchar.h
          +++ new/usr/src/head/wchar.h
↓ open down ↓ 114 lines elided ↑ open up ↑
 115  115   * however, inclusion of <stdarg.h> breaks Standard C namespace.
 116  116   */
 117  117  #if defined(_XPG6) && !defined(_VA_LIST)
 118  118  #define _VA_LIST
 119  119  typedef __va_list va_list;
 120  120  #endif  /* defined(_XPG6) && !defined(_VA_LIST) */
 121  121  
 122  122  #ifdef __STDC__
 123  123  
 124  124  #if !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE) || defined(__EXTENSIONS__)
      125 +#if __cplusplus >= 199711L
      126 +namespace std {
      127 +#endif
 125  128  extern int iswalpha(wint_t);
 126  129  extern int iswupper(wint_t);
 127  130  extern int iswlower(wint_t);
 128  131  extern int iswdigit(wint_t);
 129  132  extern int iswxdigit(wint_t);
 130  133  extern int iswalnum(wint_t);
 131  134  extern int iswspace(wint_t);
 132  135  extern int iswpunct(wint_t);
 133  136  extern int iswprint(wint_t);
 134  137  extern int iswgraph(wint_t);
 135  138  extern int iswcntrl(wint_t);
 136  139  extern int iswctype(wint_t, wctype_t);
 137  140  extern wint_t towlower(wint_t);
 138  141  extern wint_t towupper(wint_t);
 139  142  extern wchar_t *wcswcs(const wchar_t *, const wchar_t *);
 140  143  extern int wcswidth(const wchar_t *, size_t);
 141  144  extern int wcwidth(wchar_t);
 142  145  extern wctype_t wctype(const char *);
      146 +#if __cplusplus >= 199711L
      147 +} /* namespace std */
      148 +
      149 +using std::iswalpha;
      150 +using std::iswupper;
      151 +using std::iswlower;
      152 +using std::iswdigit;
      153 +using std::iswxdigit;
      154 +using std::iswalnum;
      155 +using std::iswspace;
      156 +using std::iswpunct;
      157 +using std::iswprint;
      158 +using std::iswgraph;
      159 +using std::iswcntrl;
      160 +using std::iswctype;
      161 +using std::towlower;
      162 +using std::towupper;
      163 +using std::wcswcs;
      164 +using std::wcswidth;
      165 +using std::wcwidth;
      166 +using std::wctype;
      167 +#endif
 143  168  #endif /* !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE)... */
 144  169  
 145  170  #if defined(__EXTENSIONS__) || \
 146  171          (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX))
 147  172          /* || defined(_XPG7) */
 148  173  extern wchar_t *wcsdup(const wchar_t *);
 149  174  extern size_t wcsnlen(const wchar_t *, size_t);
 150  175  extern wchar_t *wcpcpy(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD);
 151  176  extern wchar_t *wcpncpy(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD,
 152  177      size_t);
↓ open down ↓ 45 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX