Print this page
2964 need POSIX 2008 locale object support

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libc/port/locale/timelocal.c
          +++ new/usr/src/lib/libc/port/locale/timelocal.c
↓ open down ↓ 27 lines elided ↑ open up ↑
  28   28  
  29   29  #include "lint.h"
  30   30  #include <stddef.h>
  31   31  #include "ldpart.h"
  32   32  #include "timelocal.h"
  33   33  
  34   34  static struct lc_time_T _time_locale;
  35   35  static int _time_using_locale;
  36   36  static char *time_locale_buf;
  37   37  
       38 +struct xlocale_time __xlocale_global_time;
       39 +
  38   40  #define LCTIME_SIZE (sizeof (struct lc_time_T) / sizeof (char *))
  39   41  
  40   42  static const struct lc_time_T   _C_time_locale = {
  41   43          {
  42   44                  "Jan", "Feb", "Mar", "Apr", "May", "Jun",
  43   45                  "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
  44   46          }, {
  45   47                  "January", "February", "March", "April", "May", "June",
  46   48                  "July", "August", "September", "October", "November", "December"
  47   49          }, {
↓ open down ↓ 43 lines elided ↑ open up ↑
  91   93              (struct lc_time_T *)&_C_time_locale);
  92   94  }
  93   95  
  94   96  int
  95   97  __time_load_locale(const char *name)
  96   98  {
  97   99          return (__part_load_locale(name, &_time_using_locale,
  98  100              &time_locale_buf, "LC_TIME", LCTIME_SIZE, LCTIME_SIZE,
  99  101              (const char **)&_time_locale));
 100  102  }
      103 +
      104 +void *
      105 +__time_load(const char* name, locale_t loc)
      106 +{
      107 +        struct xlocale_time *new;
      108 +
      109 +        new = calloc(sizeof(struct xlocale_time), 1);
      110 +        /* XXX */
      111 +
      112 +        return (new);
      113 +}
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX