Print this page
locale stuff should use libc safe lmalloc.  Other fixes from tests.

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libc/port/locale/localeimpl.h
          +++ new/usr/src/lib/libc/port/locale/localeimpl.h
↓ open down ↓ 43 lines elided ↑ open up ↑
  44   44   * your life as bootstrapping locale data from files is quite expensive.
  45   45   */
  46   46  
  47   47  #define NLOCDATA        4
  48   48  struct locdata {
  49   49          char            l_lname[ENCODING_LEN+1];        /* locale name */
  50   50          void            *l_data[NLOCDATA];              /* storage area */
  51   51          void            *l_map;                         /* mapped file */
  52   52          size_t          l_map_len;
  53   53          struct locdata  *l_next;                        /* link cached list */
       54 +        int             l_cached;                       /* nonzero if cached */
  54   55  };
  55   56  
  56   57  
  57   58  struct locale {
  58   59          struct locdata  *locdata[LC_ALL];
  59   60          struct locale   *next;
  60   61          int             on_list;        /* on linked list */
  61   62          char            locname[(ENCODING_LEN+1)*NLOCDATA + 1];
  62   63  
  63   64          /*
↓ open down ↓ 43 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX