Print this page
remove support for non-ANSI compilation


   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 2006 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 
  27 /*
  28  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  29  */
  30 
  31 /*
  32  * An application should not include this header directly.  Instead it
  33  * should be included only through the inclusion of other Sun headers.
  34  *
  35  * The contents of this header is limited to identifiers specified in the
  36  * C Standard.  Any new identifiers specified in future amendments to the
  37  * C Standard must be placed in this header.  If these new identifiers
  38  * are required to also be in the C++ Standard "std" namespace, then for
  39  * anything other than macro definitions, corresponding "using" directives
  40  * must also be added to <wchar.h>.
  41  */
  42 
  43 #ifndef _ISO_WCHAR_ISO_H
  44 #define _ISO_WCHAR_ISO_H
  45 
  46 #include <sys/feature_tests.h>
  47 #include <stdio_tag.h>
  48 #include <wchar_impl.h>
  49 #include <iso/time_iso.h>
  50 
  51 #if (defined(__cplusplus) && (__cplusplus - 0 < 54321L)) || \


 170 #define swscanf         _swscanf_c89
 171 #define wscanf          _wscanf_c89
 172 #endif
 173 
 174 #endif /* !defined(_LP64) && !defined(_LONGLONG_TYPE) */
 175 
 176 #if (!defined(_MSE_INT_H))
 177 /* not XPG4 and not XPG4v2 */
 178 #if !defined(_XPG4) || defined(_XPG5)
 179 #ifdef __PRAGMA_REDEFINE_EXTNAME
 180 #pragma redefine_extname fgetwc __fgetwc_xpg5
 181 #pragma redefine_extname getwc  __getwc_xpg5
 182 #pragma redefine_extname getwchar       __getwchar_xpg5
 183 #pragma redefine_extname fputwc __fputwc_xpg5
 184 #pragma redefine_extname putwc  __putwc_xpg5
 185 #pragma redefine_extname putwchar       __putwchar_xpg5
 186 #pragma redefine_extname fgetws __fgetws_xpg5
 187 #pragma redefine_extname fputws __fputws_xpg5
 188 #pragma redefine_extname ungetwc        __ungetwc_xpg5
 189 #else   /* __PRAGMA_REDEFINE_EXTNAME */
 190 #ifdef __STDC__
 191 extern wint_t __fgetwc_xpg5(__FILE *);
 192 extern wint_t __getwc_xpg5(__FILE *);
 193 extern wint_t __getwchar_xpg5(void);
 194 extern wint_t __fputwc_xpg5(wint_t, __FILE *);
 195 extern wint_t __putwc_xpg5(wint_t, __FILE *);
 196 extern wint_t __putwchar_xpg5(wint_t);
 197 extern wchar_t *__fgetws_xpg5(wchar_t *_RESTRICT_KYWD, int,
 198                         __FILE *_RESTRICT_KYWD);
 199 extern int __fputws_xpg5(const wchar_t *_RESTRICT_KYWD, __FILE *_RESTRICT_KYWD);
 200 extern wint_t __ungetwc_xpg5(wint_t, __FILE *);
 201 #else
 202 extern wint_t __fgetwc_xpg5();
 203 extern wint_t __getwc_xpg5();
 204 extern wint_t __getwchar_xpg5();
 205 extern wint_t __fputwc_xpg5();
 206 extern wint_t __putwc_xpg5();
 207 extern wint_t __putwchar_xpg5();
 208 extern wchar_t *__fgetws_xpg5();
 209 extern int __fputws_xpg5();
 210 extern wint_t __ungetwc_xpg5();
 211 #endif  /* __STDC__ */
 212 #define fgetwc  __fgetwc_xpg5
 213 #define getwc   __getwc_xpg5
 214 #define getwchar        __getwchar_xpg5
 215 #define fputwc  __fputwc_xpg5
 216 #define putwc   __putwc_xpg5
 217 #define putwchar        __putwchar_xpg5
 218 #define fgetws  __fgetws_xpg5
 219 #define fputws  __fputws_xpg5
 220 #define ungetwc __ungetwc_xpg5
 221 #endif  /* __PRAGMA_REDEFINE_EXTNAME */
 222 #endif /* not XPG4 and not XPG4v2 */
 223 #endif /* defined(_MSE_INT_H) */
 224 
 225 #ifdef __STDC__
 226 
 227 extern wint_t fgetwc(__FILE *);
 228 extern wchar_t *fgetws(wchar_t *_RESTRICT_KYWD, int, __FILE *_RESTRICT_KYWD);
 229 extern wint_t fputwc(wint_t, __FILE *);
 230 extern int fputws(const wchar_t *_RESTRICT_KYWD, __FILE *_RESTRICT_KYWD);
 231 extern wint_t ungetwc(wint_t, __FILE *);
 232 extern wint_t getwc(__FILE *);
 233 extern wint_t getwchar(void);
 234 extern wint_t putwc(wint_t, __FILE *);
 235 extern wint_t putwchar(wint_t);
 236 extern double wcstod(const wchar_t *_RESTRICT_KYWD, wchar_t **_RESTRICT_KYWD);
 237 extern long wcstol(const wchar_t *_RESTRICT_KYWD, wchar_t **_RESTRICT_KYWD,
 238         int);
 239 extern unsigned long wcstoul(const wchar_t *_RESTRICT_KYWD,
 240         wchar_t **_RESTRICT_KYWD, int);
 241 extern wchar_t *wcscat(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD);
 242 extern int wcscmp(const wchar_t *, const wchar_t *);
 243 extern int wcscoll(const wchar_t *, const wchar_t *);
 244 extern wchar_t *wcscpy(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD);
 245 extern size_t wcscspn(const wchar_t *, const wchar_t *);
 246 extern size_t wcslen(const wchar_t *);


 343 #if __cplusplus >= 199711L
 344 extern const wchar_t *wcsstr(const wchar_t *, const wchar_t *);
 345 extern "C++" {
 346         inline wchar_t *wcsstr(wchar_t *__ws1, const wchar_t *__ws2) {
 347                 return (wchar_t *)wcsstr((const wchar_t *)__ws1, __ws2);
 348         }
 349 }
 350 extern const wchar_t *wmemchr(const wchar_t *, wchar_t, size_t);
 351 extern "C++" {
 352         inline wchar_t *wmemchr(wchar_t *__ws, wchar_t __wc, size_t __n) {
 353                 return (wchar_t *)wmemchr((const wchar_t *)__ws, __wc, __n);
 354         }
 355 }
 356 #else /* __cplusplus >= 199711L */
 357 extern wchar_t  *wcsstr(const wchar_t *_RESTRICT_KYWD,
 358         const wchar_t *_RESTRICT_KYWD);
 359 extern wchar_t  *wmemchr(const wchar_t *, wchar_t, size_t);
 360 #endif /* __cplusplus >= 199711L */
 361 #endif /* not XPG4 and not XPG4v2 */
 362 
 363 #else /* __STDC__ */
 364 
 365 extern  wint_t fgetwc();
 366 extern  wchar_t *fgetws();
 367 extern  wint_t fputwc();
 368 extern  int fputws();
 369 extern  wint_t  ungetwc();
 370 extern wint_t getwc();
 371 extern wint_t getwchar();
 372 extern wint_t putwc();
 373 extern wint_t putwchar();
 374 extern wint_t ungetwc();
 375 extern double wcstod();
 376 extern long wcstol();
 377 extern unsigned long wcstoul();
 378 extern wchar_t *wcscat();
 379 extern wchar_t *wcschr();
 380 extern int wcscmp();
 381 extern int wcscoll();
 382 extern wchar_t *wcscpy();
 383 extern size_t wcscspn();
 384 extern size_t wcslen();
 385 extern wchar_t *wcsncat();
 386 extern int wcsncmp();
 387 extern wchar_t *wcsncpy();
 388 extern wchar_t *wcspbrk();
 389 extern wchar_t *wcsrchr();
 390 extern size_t wcsspn();
 391 extern size_t wcsxfrm();
 392 
 393 #if (!defined(_MSE_INT_H))
 394 #if defined(_XPG4) && !defined(_XPG5) /* XPG4 or XPG4v2 */
 395 extern wchar_t *wcstok();
 396 extern size_t wcsftime();
 397 #else   /* XPG4 or XPG4v2 */
 398 #ifdef __PRAGMA_REDEFINE_EXTNAME
 399 #pragma redefine_extname wcstok __wcstok_xpg5
 400 #pragma redefine_extname wcsftime       __wcsftime_xpg5
 401 extern wchar_t *wcstok();
 402 extern size_t wcsftime();
 403 #else   /* __PRAGMA_REDEFINE_EXTNAME */
 404 extern wchar_t *__wcstok_xpg5();
 405 extern size_t __wcsftime_xpg5();
 406 #define wcstok  __wcstok_xpg5
 407 #define wcsftime        __wcsftime_xpg5
 408 #endif  /* __PRAGMA_REDEFINE_EXTNAME */
 409 #endif  /* XPG4 or XPG4v2 */
 410 #endif  /* defined(_MSE_INT_H) */
 411 
 412 /* not XPG4 and not XPG4v2 */
 413 #if (!defined(_XPG4) && !defined(_XPG4_2) || defined(_XPG5))
 414 extern wint_t   btowc();
 415 extern int      fwprintf();
 416 extern int      fwscanf();
 417 extern int      fwide();
 418 extern int      mbsinit();
 419 extern size_t   mbrlen();
 420 extern size_t   mbrtowc();
 421 extern size_t   mbsrtowcs();
 422 extern int      swprintf();
 423 extern int      swscanf();
 424 extern int      vfwprintf();
 425 extern int      vwprintf();
 426 extern int      vswprintf();
 427 extern size_t   wcrtomb();
 428 extern size_t   wcsrtombs();
 429 #if defined(_XPG7) || !defined(_STRICT_SYMBOLS)
 430 extern size_t   wcsnrtombs();
 431 #endif
 432 
 433 extern wchar_t  *wcsstr();
 434 extern int      wctob();
 435 extern wchar_t  *wmemchr();
 436 extern int      wmemcmp();
 437 extern wchar_t  *wmemcpy();
 438 extern wchar_t  *wmemmove();
 439 extern wchar_t  *wmemset();
 440 extern int      wprintf();
 441 extern int      wscanf();
 442 #endif /* not XPG4 and not XPG4v2 */
 443 
 444 #endif /* __STDC__ */
 445 
 446 #if __cplusplus >= 199711L
 447 }
 448 #endif /* end of namespace std */
 449 
 450 #ifdef  __cplusplus
 451 }
 452 #endif
 453 
 454 #endif  /* _ISO_WCHAR_ISO_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  *
  25  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  26  * Use is subject to license terms.
  27  */
  28 
  29 /*




  30  * An application should not include this header directly.  Instead it
  31  * should be included only through the inclusion of other Sun headers.
  32  *
  33  * The contents of this header is limited to identifiers specified in the
  34  * C Standard.  Any new identifiers specified in future amendments to the
  35  * C Standard must be placed in this header.  If these new identifiers
  36  * are required to also be in the C++ Standard "std" namespace, then for
  37  * anything other than macro definitions, corresponding "using" directives
  38  * must also be added to <wchar.h>.
  39  */
  40 
  41 #ifndef _ISO_WCHAR_ISO_H
  42 #define _ISO_WCHAR_ISO_H
  43 
  44 #include <sys/feature_tests.h>
  45 #include <stdio_tag.h>
  46 #include <wchar_impl.h>
  47 #include <iso/time_iso.h>
  48 
  49 #if (defined(__cplusplus) && (__cplusplus - 0 < 54321L)) || \


 168 #define swscanf         _swscanf_c89
 169 #define wscanf          _wscanf_c89
 170 #endif
 171 
 172 #endif /* !defined(_LP64) && !defined(_LONGLONG_TYPE) */
 173 
 174 #if (!defined(_MSE_INT_H))
 175 /* not XPG4 and not XPG4v2 */
 176 #if !defined(_XPG4) || defined(_XPG5)
 177 #ifdef __PRAGMA_REDEFINE_EXTNAME
 178 #pragma redefine_extname fgetwc __fgetwc_xpg5
 179 #pragma redefine_extname getwc  __getwc_xpg5
 180 #pragma redefine_extname getwchar       __getwchar_xpg5
 181 #pragma redefine_extname fputwc __fputwc_xpg5
 182 #pragma redefine_extname putwc  __putwc_xpg5
 183 #pragma redefine_extname putwchar       __putwchar_xpg5
 184 #pragma redefine_extname fgetws __fgetws_xpg5
 185 #pragma redefine_extname fputws __fputws_xpg5
 186 #pragma redefine_extname ungetwc        __ungetwc_xpg5
 187 #else   /* __PRAGMA_REDEFINE_EXTNAME */

 188 extern wint_t __fgetwc_xpg5(__FILE *);
 189 extern wint_t __getwc_xpg5(__FILE *);
 190 extern wint_t __getwchar_xpg5(void);
 191 extern wint_t __fputwc_xpg5(wint_t, __FILE *);
 192 extern wint_t __putwc_xpg5(wint_t, __FILE *);
 193 extern wint_t __putwchar_xpg5(wint_t);
 194 extern wchar_t *__fgetws_xpg5(wchar_t *_RESTRICT_KYWD, int,
 195                         __FILE *_RESTRICT_KYWD);
 196 extern int __fputws_xpg5(const wchar_t *_RESTRICT_KYWD, __FILE *_RESTRICT_KYWD);
 197 extern wint_t __ungetwc_xpg5(wint_t, __FILE *);











 198 #define fgetwc  __fgetwc_xpg5
 199 #define getwc   __getwc_xpg5
 200 #define getwchar        __getwchar_xpg5
 201 #define fputwc  __fputwc_xpg5
 202 #define putwc   __putwc_xpg5
 203 #define putwchar        __putwchar_xpg5
 204 #define fgetws  __fgetws_xpg5
 205 #define fputws  __fputws_xpg5
 206 #define ungetwc __ungetwc_xpg5
 207 #endif  /* __PRAGMA_REDEFINE_EXTNAME */
 208 #endif /* not XPG4 and not XPG4v2 */
 209 #endif /* defined(_MSE_INT_H) */
 210 


 211 extern wint_t fgetwc(__FILE *);
 212 extern wchar_t *fgetws(wchar_t *_RESTRICT_KYWD, int, __FILE *_RESTRICT_KYWD);
 213 extern wint_t fputwc(wint_t, __FILE *);
 214 extern int fputws(const wchar_t *_RESTRICT_KYWD, __FILE *_RESTRICT_KYWD);
 215 extern wint_t ungetwc(wint_t, __FILE *);
 216 extern wint_t getwc(__FILE *);
 217 extern wint_t getwchar(void);
 218 extern wint_t putwc(wint_t, __FILE *);
 219 extern wint_t putwchar(wint_t);
 220 extern double wcstod(const wchar_t *_RESTRICT_KYWD, wchar_t **_RESTRICT_KYWD);
 221 extern long wcstol(const wchar_t *_RESTRICT_KYWD, wchar_t **_RESTRICT_KYWD,
 222         int);
 223 extern unsigned long wcstoul(const wchar_t *_RESTRICT_KYWD,
 224         wchar_t **_RESTRICT_KYWD, int);
 225 extern wchar_t *wcscat(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD);
 226 extern int wcscmp(const wchar_t *, const wchar_t *);
 227 extern int wcscoll(const wchar_t *, const wchar_t *);
 228 extern wchar_t *wcscpy(wchar_t *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD);
 229 extern size_t wcscspn(const wchar_t *, const wchar_t *);
 230 extern size_t wcslen(const wchar_t *);


 327 #if __cplusplus >= 199711L
 328 extern const wchar_t *wcsstr(const wchar_t *, const wchar_t *);
 329 extern "C++" {
 330         inline wchar_t *wcsstr(wchar_t *__ws1, const wchar_t *__ws2) {
 331                 return (wchar_t *)wcsstr((const wchar_t *)__ws1, __ws2);
 332         }
 333 }
 334 extern const wchar_t *wmemchr(const wchar_t *, wchar_t, size_t);
 335 extern "C++" {
 336         inline wchar_t *wmemchr(wchar_t *__ws, wchar_t __wc, size_t __n) {
 337                 return (wchar_t *)wmemchr((const wchar_t *)__ws, __wc, __n);
 338         }
 339 }
 340 #else /* __cplusplus >= 199711L */
 341 extern wchar_t  *wcsstr(const wchar_t *_RESTRICT_KYWD,
 342         const wchar_t *_RESTRICT_KYWD);
 343 extern wchar_t  *wmemchr(const wchar_t *, wchar_t, size_t);
 344 #endif /* __cplusplus >= 199711L */
 345 #endif /* not XPG4 and not XPG4v2 */
 346 



















































































 347 #if __cplusplus >= 199711L
 348 }
 349 #endif /* end of namespace std */
 350 
 351 #ifdef  __cplusplus
 352 }
 353 #endif
 354 
 355 #endif  /* _ISO_WCHAR_ISO_H */