Print this page
2964 need POSIX 2008 locale object support
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
Approved by: TBD

@@ -21,16 +21,17 @@
  */
 /*
  * Copyright (c) 1995, 1996, by Sun Microsystems, Inc.
  * All rights reserved.
  */
+/*
+ * Copyright 2013 Garrett D'Amore <garrett@damore.org>
+ */
 
 #ifndef _STRINGS_H
 #define _STRINGS_H
 
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
 #include <sys/types.h>
 #include <sys/feature_tests.h>
 
 #if !defined(_XOPEN_SOURCE) || defined(__EXTENSIONS__)
 #include <string.h>

@@ -61,10 +62,18 @@
  */
 #if defined(_XPG4_2) && !defined(__EXTENSIONS__)
 extern int ffs(int);
 extern int strcasecmp(const char *, const char *);
 extern int strncasecmp(const char *, const char *, size_t);
+#if defined(_XPG7)
+#ifndef _LOCALE_T
+#define _LOCALE_T
+typedef struct locale *locale_t;
+#endif
+extern int strcasecmp_l(const char *, const char *, locale_t);
+extern int strncasecmp_l(const char *, const char *, size_t, locale_t);
+#endif  /* defined(_XPG7) */
 #endif  /* defined(_XPG4_2) && !defined(__EXTENSIONS__) */
 
 #else
 
 extern int bcmp();

@@ -76,10 +85,14 @@
 
 #if defined(_XPG4_2) && !defined(__EXTENSIONS__)
 extern int ffs();
 extern int strcasecmp();
 extern int strncasecmp();
+#if defined(_XPG7)
+extern int strcasecmp_l();
+extern int strncasecmp_l();
+#endif
 #endif /* defined(_XPG4_2) && !defined(__EXTENSIONS__) */
 
 #endif  /* __STDC__ */
 
 #ifdef  __cplusplus