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


  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 /*      Copyright (c) 1988 AT&T     */
  22 /*        All Rights Reserved   */
  23 
  24 
  25 /*
  26  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  27  * Use is subject to license terms.
  28  */
  29 /*
  30  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.

  31  */
  32 
  33 #ifndef _TIME_H
  34 #define _TIME_H
  35 
  36 #include <sys/feature_tests.h>
  37 #include <iso/time_iso.h>
  38 #if (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
  39         (_POSIX_C_SOURCE > 2) || defined(__EXTENSIONS__)
  40 #include <sys/types.h>
  41 #include <sys/time_impl.h>
  42 #endif /* (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) ... */
  43 
  44 /*
  45  * Allow global visibility for symbols defined in
  46  * C++ "std" namespace in <iso/time_iso.h>.
  47  */
  48 #if __cplusplus >= 199711L
  49 using std::size_t;
  50 using std::clock_t;


 354         time_t *__time;
 355         char *__buf;
 356 {
 357         return (__posix_ctime_r(__time, __buf));
 358 }
 359 
 360 #endif /* !__lint */
 361 #endif /* __PRAGMA_REDEFINE_EXTNAME */
 362 
 363 #else  /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */
 364 
 365 extern char *asctime_r();
 366 extern char *ctime_r();
 367 
 368 #endif /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */
 369 
 370 #endif /* __STDC__ */
 371 
 372 #endif /* defined(__EXTENSIONS__) || defined(_REENTRANT)... */
 373 

















 374 #ifdef  __cplusplus
 375 }
 376 #endif
 377 
 378 #endif  /* _TIME_H */


  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 /*      Copyright (c) 1988 AT&T     */
  22 /*        All Rights Reserved   */
  23 
  24 
  25 /*
  26  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  27  * Use is subject to license terms.
  28  */
  29 /*
  30  * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
  31  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  32  */
  33 
  34 #ifndef _TIME_H
  35 #define _TIME_H
  36 
  37 #include <sys/feature_tests.h>
  38 #include <iso/time_iso.h>
  39 #if (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
  40         (_POSIX_C_SOURCE > 2) || defined(__EXTENSIONS__)
  41 #include <sys/types.h>
  42 #include <sys/time_impl.h>
  43 #endif /* (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) ... */
  44 
  45 /*
  46  * Allow global visibility for symbols defined in
  47  * C++ "std" namespace in <iso/time_iso.h>.
  48  */
  49 #if __cplusplus >= 199711L
  50 using std::size_t;
  51 using std::clock_t;


 355         time_t *__time;
 356         char *__buf;
 357 {
 358         return (__posix_ctime_r(__time, __buf));
 359 }
 360 
 361 #endif /* !__lint */
 362 #endif /* __PRAGMA_REDEFINE_EXTNAME */
 363 
 364 #else  /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */
 365 
 366 extern char *asctime_r();
 367 extern char *ctime_r();
 368 
 369 #endif /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */
 370 
 371 #endif /* __STDC__ */
 372 
 373 #endif /* defined(__EXTENSIONS__) || defined(_REENTRANT)... */
 374 
 375 
 376 #if defined(_XPG7) || !defined(_STRICT_SYMBOLS)
 377 
 378 #ifndef _LOCALE_T
 379 #define _LOCALE_T
 380 typedef struct locale *locale_t;
 381 #endif
 382 
 383 #if     defined(__STDC__)
 384 extern size_t strftime_l(char *_RESTRICT_KYWD, size_t,
 385         const char *_RESTRICT_KYWD, const struct tm *_RESTRICT_KYWD, locale_t);
 386 #else /* __STDC__ */
 387 extern size_t strftime_l();
 388 #endif /* __STDC__ */
 389 
 390 #endif /* defined(_XPG7) || !defined(_STRICT_SYMBOLS) */
 391 
 392 #ifdef  __cplusplus
 393 }
 394 #endif
 395 
 396 #endif  /* _TIME_H */