Print this page
2964 need POSIX 2008 locale object support
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
Approved by: TBD


   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*

  23  * Copyright (c) 1993, 2010, Oracle and/or its affiliates. All rights reserved.
  24  */
  25 
  26 #ifndef _WCHAR_H
  27 #define _WCHAR_H
  28 
  29 #include <sys/feature_tests.h>
  30 #include <iso/wchar_iso.h>
  31 #include <iso/wchar_c99.h>
  32 
  33 /*
  34  * Allow global visibility for symbols defined in
  35  * C++ "std" namespace in <iso/wchar_iso.h>.
  36  */
  37 #if __cplusplus >= 199711L
  38 using std::FILE;
  39 using std::wint_t;
  40 using std::clock_t;
  41 using std::size_t;
  42 using std::time_t;


 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
 168 #endif /* !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE)... */
 169 
 170 #if defined(__EXTENSIONS__) || \
 171         (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX))
 172         /* || defined(_XPG7) */
 173 extern wchar_t *wcsdup(const wchar_t *);



 174 extern size_t wcsnlen(const wchar_t *, size_t);
 175 extern wchar_t *wcpcpy(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD);
 176 extern wchar_t *wcpncpy(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD,
 177     size_t);




 178 extern int wcscasecmp(const wchar_t *, const wchar_t *);

 179 extern int wcsncasecmp(const wchar_t *, const wchar_t *, size_t);
 180 #endif


 181 


 182 #else /* __STDC__ */
 183 
 184 #if !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE) || defined(__EXTENSIONS__)
 185 extern  int iswalpha();
 186 extern  int iswupper();
 187 extern  int iswlower();
 188 extern  int iswdigit();
 189 extern  int iswxdigit();
 190 extern  int iswalnum();
 191 extern  int iswspace();
 192 extern  int iswpunct();
 193 extern  int iswprint();
 194 extern  int iswgraph();
 195 extern  int iswcntrl();
 196 extern  int iswctype();
 197 extern  wint_t towlower();
 198 extern  wint_t towupper();
 199 extern wchar_t *wcswcs();
 200 extern int wcswidth();
 201 extern int wcwidth();
 202 extern wctype_t wctype();
 203 #endif /* !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE)... */
 204 
 205 #if defined(__EXTENSIONS__) || \
 206         (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX))
 207         /* || defined(_XPG7) */
 208 extern wchar_t *wcsdup();
 209 extern size_t wcsnlen();
 210 extern wchar_t *wcpcpy();
 211 extern wchar_t *wcpncpy();



 212 extern int wcscasecmp();

 213 extern int wcsncasecmp();


 214 #endif
 215 
 216 #endif /* __STDC__ */
 217 
 218 #ifdef  __cplusplus
 219 }
 220 #endif
 221 
 222 #endif  /* _WCHAR_H */


   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  24  * Copyright (c) 1993, 2010, Oracle and/or its affiliates. All rights reserved.
  25  */
  26 
  27 #ifndef _WCHAR_H
  28 #define _WCHAR_H
  29 
  30 #include <sys/feature_tests.h>
  31 #include <iso/wchar_iso.h>
  32 #include <iso/wchar_c99.h>
  33 
  34 /*
  35  * Allow global visibility for symbols defined in
  36  * C++ "std" namespace in <iso/wchar_iso.h>.
  37  */
  38 #if __cplusplus >= 199711L
  39 using std::FILE;
  40 using std::wint_t;
  41 using std::clock_t;
  42 using std::size_t;
  43 using std::time_t;


 151 using std::iswupper;
 152 using std::iswlower;
 153 using std::iswdigit;
 154 using std::iswxdigit;
 155 using std::iswalnum;
 156 using std::iswspace;
 157 using std::iswpunct;
 158 using std::iswprint;
 159 using std::iswgraph;
 160 using std::iswcntrl;
 161 using std::iswctype;
 162 using std::towlower;
 163 using std::towupper;
 164 using std::wcswcs;
 165 using std::wcswidth;
 166 using std::wcwidth;
 167 using std::wctype;
 168 #endif
 169 #endif /* !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE)... */
 170 
 171 #if defined(_XPG7) || !defined(_STRICT_SYMBOLS)
 172 
 173 #ifndef _LOCALE_T
 174 #define _LOCALE_T
 175 typedef struct locale *locale_t;
 176 #endif
 177 
 178 extern size_t wcsnlen(const wchar_t *, size_t);
 179 extern wchar_t *wcpcpy(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD);
 180 extern wchar_t *wcpncpy(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD,
 181     size_t);
 182 extern size_t wcsxfrm_l(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD,
 183     size_t, locale_t);
 184 extern int wcscoll_l(const wchar_t *, const wchar_t *, locale_t);
 185 extern wchar_t *wcsdup(const wchar_t *);
 186 extern int wcscasecmp(const wchar_t *, const wchar_t *);
 187 extern int wcscasecmp_l(const wchar_t *, const wchar_t *, locale_t);
 188 extern int wcsncasecmp(const wchar_t *, const wchar_t *, size_t);
 189 extern int wcsncasecmp_l(const wchar_t *, const wchar_t *, size_t, locale_t);
 190 extern size_t mbsnrtowcs(wchar_t *_RESTRICT_KYWD, const char **_RESTRICT_KYWD,
 191     size_t, size_t, mbstate_t *_RESTRICT_KYWD);
 192 
 193 #endif  /* defined(_XPG7) || !defined(_STRICT_SYMBOLS) */
 194 
 195 #else /* __STDC__ */
 196 
 197 #if !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE) || defined(__EXTENSIONS__)
 198 extern  int iswalpha();
 199 extern  int iswupper();
 200 extern  int iswlower();
 201 extern  int iswdigit();
 202 extern  int iswxdigit();
 203 extern  int iswalnum();
 204 extern  int iswspace();
 205 extern  int iswpunct();
 206 extern  int iswprint();
 207 extern  int iswgraph();
 208 extern  int iswcntrl();
 209 extern  int iswctype();
 210 extern  wint_t towlower();
 211 extern  wint_t towupper();
 212 extern wchar_t *wcswcs();
 213 extern int wcswidth();
 214 extern int wcwidth();
 215 extern wctype_t wctype();
 216 #endif /* !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE)... */
 217 
 218 #if defined(_XGP7) || !defined(_STRICT_SYMBOLS)



 219 extern size_t wcsnlen();
 220 extern wchar_t *wcpcpy();
 221 extern wchar_t *wcpncpy();
 222 extern size_t wcsxfrm_l();
 223 extern int wcscoll_l();
 224 extern wchar_t *wcsdup();
 225 extern int wcscasecmp();
 226 extern int wcscasecmp_l();
 227 extern int wcsncasecmp();
 228 extern int wcsncasecmp_l();
 229 extern size_t mbsnrtowcs();
 230 #endif
 231 
 232 #endif /* __STDC__ */
 233 
 234 #ifdef  __cplusplus
 235 }
 236 #endif
 237 
 238 #endif  /* _WCHAR_H */