sunddi.h revision b819cea2f73f98c5662230cc9affc8cc84f77fcf
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
#ifndef _SYS_SUNDDI_H
#define _SYS_SUNDDI_H
/*
* Sun Specific DDI definitions (fakekernel version)
* The real sunddi.h has become a "kitchen sink" full of
* includes we don't want, and lots of places include it.
* Rather than fight that battle now, provide this one
* with just the str*, mem*, and kiconv* functions.
*/
#include <sys/isa_defs.h>
#include <sys/dditypes.h>
#include <sys/u8_textprep.h>
#ifdef __cplusplus
extern "C" {
#endif
#if defined(_KERNEL) || defined(_FAKE_KERNEL)
extern char *strcpy(char *, const char *);
/* Need to be consistent with <string.h> C++ definition for strchr() */
#if __cplusplus >= 199711L
extern const char *strchr(const char *, int);
#else
extern char *strchr(const char *, int);
#endif /* __cplusplus >= 199711L */
extern int stoi(char **);
/* Need to be consistent with <string.h> C++ definition for memchr() */
#if __cplusplus >= 199711L
#else
#endif /* __cplusplus >= 199711L */
extern int ddi_strtol(const char *, char **, int, long *);
extern int ddi_strtoul(const char *, char **, int, unsigned long *);
extern int ddi_strtoll(const char *, char **, int, longlong_t *);
extern int ddi_strtoull(const char *, char **, int, u_longlong_t *);
/*
* kiconv functions and their macros.
*/
#define KICONV_IGNORE_NULL (0x0001)
#define KICONV_REPLACE_INVALID (0x0002)
extern kiconv_t kiconv_open(const char *, const char *);
extern int kiconv_close(kiconv_t);
size_t *, int, int *);
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_SUNDDI_H */