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


   6  * (the "License").  You may not use this file except in compliance
   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*
  23  * Copyright (c) 1995, 1996, by Sun Microsystems, Inc.
  24  * All rights reserved.
  25  */



  26 
  27 #ifndef _STRINGS_H
  28 #define _STRINGS_H
  29 
  30 #pragma ident   "%Z%%M% %I%     %E% SMI"
  31 
  32 #include <sys/types.h>
  33 #include <sys/feature_tests.h>
  34 
  35 #if !defined(_XOPEN_SOURCE) || defined(__EXTENSIONS__)
  36 #include <string.h>
  37 #endif
  38 
  39 #ifdef  __cplusplus
  40 extern "C" {
  41 #endif
  42 
  43 #if defined(__STDC__)
  44 
  45 extern int bcmp(const void *, const void *, size_t);
  46 extern void bcopy(const void *, void *, size_t);
  47 extern void bzero(void *, size_t);
  48 
  49 extern char *index(const char *, int);
  50 extern char *rindex(const char *, int);
  51 
  52 /*
  53  * X/Open System Interfaces and Headers, Issue 4, Version 2, defines
  54  * both <string.h> and <strings.h>.  The namespace requirements
  55  * do not permit the visibility of anything other than what is
  56  * specifically defined for each of these headers.  As a result,
  57  * inclusion of <string.h> would result in declarations not allowed
  58  * in <strings.h>, and making the following prototypes visible for
  59  * anything other than X/Open UNIX Extension would result in
  60  * conflicts with what is now in <string.h>.
  61  */
  62 #if defined(_XPG4_2) && !defined(__EXTENSIONS__)
  63 extern int ffs(int);
  64 extern int strcasecmp(const char *, const char *);
  65 extern int strncasecmp(const char *, const char *, size_t);








  66 #endif  /* defined(_XPG4_2) && !defined(__EXTENSIONS__) */
  67 
  68 #else
  69 
  70 extern int bcmp();
  71 extern void bcopy();
  72 extern void bzero();
  73 
  74 extern char *index();
  75 extern char *rindex();
  76 
  77 #if defined(_XPG4_2) && !defined(__EXTENSIONS__)
  78 extern int ffs();
  79 extern int strcasecmp();
  80 extern int strncasecmp();




  81 #endif /* defined(_XPG4_2) && !defined(__EXTENSIONS__) */
  82 
  83 #endif  /* __STDC__ */
  84 
  85 #ifdef  __cplusplus
  86 }
  87 #endif
  88 
  89 #endif  /* _STRINGS_H */


   6  * (the "License").  You may not use this file except in compliance
   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*
  23  * Copyright (c) 1995, 1996, by Sun Microsystems, Inc.
  24  * All rights reserved.
  25  */
  26 /*
  27  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
  28  */
  29 
  30 #ifndef _STRINGS_H
  31 #define _STRINGS_H
  32 


  33 #include <sys/types.h>
  34 #include <sys/feature_tests.h>
  35 
  36 #if !defined(_XOPEN_SOURCE) || defined(__EXTENSIONS__)
  37 #include <string.h>
  38 #endif
  39 
  40 #ifdef  __cplusplus
  41 extern "C" {
  42 #endif
  43 
  44 #if defined(__STDC__)
  45 
  46 extern int bcmp(const void *, const void *, size_t);
  47 extern void bcopy(const void *, void *, size_t);
  48 extern void bzero(void *, size_t);
  49 
  50 extern char *index(const char *, int);
  51 extern char *rindex(const char *, int);
  52 
  53 /*
  54  * X/Open System Interfaces and Headers, Issue 4, Version 2, defines
  55  * both <string.h> and <strings.h>.  The namespace requirements
  56  * do not permit the visibility of anything other than what is
  57  * specifically defined for each of these headers.  As a result,
  58  * inclusion of <string.h> would result in declarations not allowed
  59  * in <strings.h>, and making the following prototypes visible for
  60  * anything other than X/Open UNIX Extension would result in
  61  * conflicts with what is now in <string.h>.
  62  */
  63 #if defined(_XPG4_2) && !defined(__EXTENSIONS__)
  64 extern int ffs(int);
  65 extern int strcasecmp(const char *, const char *);
  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) */
  75 #endif  /* defined(_XPG4_2) && !defined(__EXTENSIONS__) */
  76 
  77 #else
  78 
  79 extern int bcmp();
  80 extern void bcopy();
  81 extern void bzero();
  82 
  83 extern char *index();
  84 extern char *rindex();
  85 
  86 #if defined(_XPG4_2) && !defined(__EXTENSIONS__)
  87 extern int ffs();
  88 extern int strcasecmp();
  89 extern int strncasecmp();
  90 #if defined(_XPG7)
  91 extern int strcasecmp_l();
  92 extern int strncasecmp_l();
  93 #endif
  94 #endif /* defined(_XPG4_2) && !defined(__EXTENSIONS__) */
  95 
  96 #endif  /* __STDC__ */
  97 
  98 #ifdef  __cplusplus
  99 }
 100 #endif
 101 
 102 #endif  /* _STRINGS_H */