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/strings.h
          +++ new/usr/src/head/strings.h
↓ open down ↓ 15 lines elided ↑ open up ↑
  16   16   * If applicable, add the following below this CDDL HEADER, with the
  17   17   * fields enclosed by brackets "[]" replaced with your own identifying
  18   18   * information: Portions Copyright [yyyy] [name of copyright owner]
  19   19   *
  20   20   * CDDL HEADER END
  21   21   */
  22   22  /*
  23   23   * Copyright (c) 1995, 1996, by Sun Microsystems, Inc.
  24   24   * All rights reserved.
  25   25   */
       26 +/*
       27 + * Copyright 2013 Garrett D'Amore <garrett@damore.org>
       28 + */
  26   29  
  27   30  #ifndef _STRINGS_H
  28   31  #define _STRINGS_H
  29   32  
  30      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  31      -
  32   33  #include <sys/types.h>
  33   34  #include <sys/feature_tests.h>
  34   35  
  35   36  #if !defined(_XOPEN_SOURCE) || defined(__EXTENSIONS__)
  36   37  #include <string.h>
  37   38  #endif
  38   39  
  39   40  #ifdef  __cplusplus
  40   41  extern "C" {
  41   42  #endif
↓ open down ↓ 14 lines elided ↑ open up ↑
  56   57   * specifically defined for each of these headers.  As a result,
  57   58   * inclusion of <string.h> would result in declarations not allowed
  58   59   * in <strings.h>, and making the following prototypes visible for
  59   60   * anything other than X/Open UNIX Extension would result in
  60   61   * conflicts with what is now in <string.h>.
  61   62   */
  62   63  #if defined(_XPG4_2) && !defined(__EXTENSIONS__)
  63   64  extern int ffs(int);
  64   65  extern int strcasecmp(const char *, const char *);
  65   66  extern int strncasecmp(const char *, const char *, size_t);
       67 +#if defined(_XPG7)
       68 +#ifndef _LOCALE_T
       69 +#define _LOCALE_T
       70 +typedef struct locale *locale_t;
       71 +#endif
       72 +extern int strcasecmp_l(const char *, const char *, locale_t);
       73 +extern int strncasecmp_l(const char *, const char *, size_t, locale_t);
       74 +#endif  /* defined(_XPG7) */
  66   75  #endif  /* defined(_XPG4_2) && !defined(__EXTENSIONS__) */
  67   76  
  68   77  #else
  69   78  
  70   79  extern int bcmp();
  71   80  extern void bcopy();
  72   81  extern void bzero();
  73   82  
  74   83  extern char *index();
  75   84  extern char *rindex();
  76   85  
  77   86  #if defined(_XPG4_2) && !defined(__EXTENSIONS__)
  78   87  extern int ffs();
  79   88  extern int strcasecmp();
  80   89  extern int strncasecmp();
       90 +#if defined(_XPG7)
       91 +extern int strcasecmp_l();
       92 +extern int strncasecmp_l();
       93 +#endif
  81   94  #endif /* defined(_XPG4_2) && !defined(__EXTENSIONS__) */
  82   95  
  83   96  #endif  /* __STDC__ */
  84   97  
  85   98  #ifdef  __cplusplus
  86   99  }
  87  100  #endif
  88  101  
  89  102  #endif  /* _STRINGS_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX