Print this page
2964 need POSIX 2008 locale object support

Split Close
Expand all
Collapse all
          --- old/usr/src/head/iso/locale_iso.h
          +++ new/usr/src/head/iso/locale_iso.h
↓ open down ↓ 35 lines elided ↑ open up ↑
  36   36   * C Standard.  Any new identifiers specified in future amendments to the
  37   37   * C Standard must be placed in this header.  If these new identifiers
  38   38   * are required to also be in the C++ Standard "std" namespace, then for
  39   39   * anything other than macro definitions, corresponding "using" directives
  40   40   * must also be added to <locale.h>.
  41   41   */
  42   42  
  43   43  #ifndef _ISO_LOCALE_ISO_H
  44   44  #define _ISO_LOCALE_ISO_H
  45   45  
  46      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  47      -
  48   46  #include <sys/feature_tests.h>
  49   47  
  50   48  #ifdef __cplusplus
  51   49  extern "C" {
  52   50  #endif
  53   51  
  54   52  #if __cplusplus >= 199711L
  55   53  namespace std {
  56   54  #endif
  57   55  
↓ open down ↓ 50 lines elided ↑ open up ↑
 108  106  #endif
 109  107  
 110  108  #if     defined(__STDC__)
 111  109  extern char     *setlocale(int, const char *);
 112  110  extern struct lconv *localeconv(void);
 113  111  #else
 114  112  extern char   *setlocale();
 115  113  extern struct lconv     *localeconv();
 116  114  #endif
 117  115  
      116 +#define LC_COLLATE_MASK         (1<<0)
      117 +#define LC_CTYPE_MASK           (1<<1)
      118 +#define LC_MESSAGES_MASK        (1<<2)
      119 +#define LC_MONETARY_MASK        (1<<3)
      120 +#define LC_NUMERIC_MASK         (1<<4)
      121 +#define LC_TIME_MASK            (1<<5)
      122 +#define LC_ALL_MASK             (LC_COLLATE_MASK | LC_CTYPE_MASK | LC_MESSAGES_MASK | \
      123 +                                 LC_MONETARY_MASK | LC_NUMERIC_MASK | LC_TIME_MASK)
      124 +#define LC_GLOBAL_LOCALE        ((locale_t)-1)
      125 +
      126 +/* XXX */
      127 +#ifndef _LOCALE_T_DEFINED
      128 +#define _LOCALE_T_DEFINED
      129 +typedef struct  _xlocale *locale_t;
      130 +#endif
      131 +
      132 +locale_t        duplocale(locale_t);
      133 +int             freelocale(locale_t);
      134 +locale_t        newlocale(int, const char *, locale_t);
      135 +const char      *querylocale(int, locale_t);
      136 +locale_t        uselocale(locale_t);
      137 +
 118  138  #if __cplusplus >= 199711L
 119  139  }
 120  140  #endif /* end of namespace std */
 121  141  
 122  142  #ifdef  __cplusplus
 123  143  }
 124  144  #endif
 125  145  
 126  146  #endif  /* _ISO_LOCALE_ISO_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX