Print this page
2964 need POSIX 2008 locale object support
Reviewed by: Robert Mustacchi <rm@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/head/time.h
          +++ new/usr/src/head/time.h
↓ open down ↓ 20 lines elided ↑ open up ↑
  21   21  /*      Copyright (c) 1988 AT&T */
  22   22  /*        All Rights Reserved   */
  23   23  
  24   24  
  25   25  /*
  26   26   * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  27   27   * Use is subject to license terms.
  28   28   */
  29   29  /*
  30   30   * Copyright 2010 Nexenta Systems, Inc.  Al rights reserved.
       31 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  31   32   */
  32   33  
  33   34  #ifndef _TIME_H
  34   35  #define _TIME_H
  35   36  
  36   37  #include <sys/feature_tests.h>
  37   38  #include <iso/time_iso.h>
  38   39  #if (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
  39   40          (_POSIX_C_SOURCE > 2) || defined(__EXTENSIONS__)
  40   41  #include <sys/types.h>
↓ open down ↓ 323 lines elided ↑ open up ↑
 364  365  
 365  366  extern char *asctime_r();
 366  367  extern char *ctime_r();
 367  368  
 368  369  #endif /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */
 369  370  
 370  371  #endif /* __STDC__ */
 371  372  
 372  373  #endif /* defined(__EXTENSIONS__) || defined(_REENTRANT)... */
 373  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 +
 374  392  #ifdef  __cplusplus
 375  393  }
 376  394  #endif
 377  395  
 378  396  #endif  /* _TIME_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX