4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
24 */
25
26 #ifndef _SYS_SUNDDI_H
27 #define _SYS_SUNDDI_H
28
29 /*
30 * Sun Specific DDI definitions (fakekernel version)
31 * The real sunddi.h has become a "kitchen sink" full of
32 * includes we don't want, and lots of places include it.
33 * Rather than fight that battle now, provide this one
34 * with just the str*, mem*, and kiconv* functions.
35 * Some day, re-factor: sunddi.h, systm.h
36 */
37
38 #include <sys/isa_defs.h>
39 #include <sys/dditypes.h>
40 #include <sys/time.h>
41 #include <sys/cmn_err.h>
42
43 #include <sys/kmem.h>
84 extern void bcopy(const void *, void *, size_t);
85 extern void bzero(void *, size_t);
86
87 extern void *memcpy(void *, const void *, size_t);
88 extern void *memset(void *, int, size_t);
89 extern void *memmove(void *, const void *, size_t);
90 extern int memcmp(const void *, const void *, size_t) __PURE;
91
92 /* Need to be consistent with <string.h> C++ definition for memchr() */
93 #if __cplusplus >= 199711L
94 extern const void *memchr(const void *, int, size_t);
95 #else
96 extern void *memchr(const void *, int, size_t);
97 #endif /* __cplusplus >= 199711L */
98
99 extern int ddi_strtol(const char *, char **, int, long *);
100 extern int ddi_strtoul(const char *, char **, int, unsigned long *);
101 extern int ddi_strtoll(const char *, char **, int, longlong_t *);
102 extern int ddi_strtoull(const char *, char **, int, u_longlong_t *);
103
104 /*
105 * kiconv functions and their macros.
106 */
107 #define KICONV_IGNORE_NULL (0x0001)
108 #define KICONV_REPLACE_INVALID (0x0002)
109
110 extern kiconv_t kiconv_open(const char *, const char *);
111 extern size_t kiconv(kiconv_t, char **, size_t *, char **, size_t *, int *);
112 extern int kiconv_close(kiconv_t);
113 extern size_t kiconvstr(const char *, const char *, char *, size_t *, char *,
114 size_t *, int, int *);
115
116 #endif /* _KERNEL */
117
118 #ifdef __cplusplus
119 }
120 #endif
121
122 #endif /* _SYS_SUNDDI_H */
|
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
24 * Copyright 2017 Nexenta Systems, Inc. All rights reserved.
25 */
26
27 #ifndef _SYS_SUNDDI_H
28 #define _SYS_SUNDDI_H
29
30 /*
31 * Sun Specific DDI definitions (fakekernel version)
32 * The real sunddi.h has become a "kitchen sink" full of
33 * includes we don't want, and lots of places include it.
34 * Rather than fight that battle now, provide this one
35 * with just the str*, mem*, and kiconv* functions.
36 * Some day, re-factor: sunddi.h, systm.h
37 */
38
39 #include <sys/isa_defs.h>
40 #include <sys/dditypes.h>
41 #include <sys/time.h>
42 #include <sys/cmn_err.h>
43
44 #include <sys/kmem.h>
85 extern void bcopy(const void *, void *, size_t);
86 extern void bzero(void *, size_t);
87
88 extern void *memcpy(void *, const void *, size_t);
89 extern void *memset(void *, int, size_t);
90 extern void *memmove(void *, const void *, size_t);
91 extern int memcmp(const void *, const void *, size_t) __PURE;
92
93 /* Need to be consistent with <string.h> C++ definition for memchr() */
94 #if __cplusplus >= 199711L
95 extern const void *memchr(const void *, int, size_t);
96 #else
97 extern void *memchr(const void *, int, size_t);
98 #endif /* __cplusplus >= 199711L */
99
100 extern int ddi_strtol(const char *, char **, int, long *);
101 extern int ddi_strtoul(const char *, char **, int, unsigned long *);
102 extern int ddi_strtoll(const char *, char **, int, longlong_t *);
103 extern int ddi_strtoull(const char *, char **, int, u_longlong_t *);
104
105 #endif /* _KERNEL || _FAKE_KERNEL */
106
107 #ifdef __cplusplus
108 }
109 #endif
110
111 #endif /* _SYS_SUNDDI_H */
|