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
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License, Version 1.0 only
6 6 * (the "License"). You may not use this file except in compliance
7 7 * with the License.
8 8 *
9 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 10 * or http://www.opensolaris.org/os/licensing.
11 11 * See the License for the specific language governing permissions
12 12 * and limitations under the License.
13 13 *
14 14 * When distributing Covered Code, include this CDDL HEADER in each
15 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
↓ 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
42 43
43 44 #if defined(__STDC__)
44 45
45 46 extern int bcmp(const void *, const void *, size_t);
46 47 extern void bcopy(const void *, void *, size_t);
47 48 extern void bzero(void *, size_t);
48 49
49 50 extern char *index(const char *, int);
50 51 extern char *rindex(const char *, int);
51 52
52 53 /*
53 54 * X/Open System Interfaces and Headers, Issue 4, Version 2, defines
54 55 * both <string.h> and <strings.h>. The namespace requirements
55 56 * do not permit the visibility of anything other than what is
↓ 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