summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authormike <mike@FreeBSD.org>2002-08-21 16:20:02 +0000
committermike <mike@FreeBSD.org>2002-08-21 16:20:02 +0000
commit9e6f796b0d2083dcc48c062853660f96db0a3c8d (patch)
tree7e9e16e835d265de592c113ee6c5d85f9be039cb /include
parentd5203d1ff8cef07eff72ad400fde5c759623752e (diff)
downloadFreeBSD-src-9e6f796b0d2083dcc48c062853660f96db0a3c8d.zip
FreeBSD-src-9e6f796b0d2083dcc48c062853660f96db0a3c8d.tar.gz
o Merge <machine/ansi.h> and <machine/types.h> into a new header
called <machine/_types.h>. o <machine/ansi.h> will continue to live so it can define MD clock macros, which are only MD because of gratuitous differences between architectures. o Change all headers to make use of this. This mainly involves changing: #ifdef _BSD_FOO_T_ typedef _BSD_FOO_T_ foo_t; #undef _BSD_FOO_T_ #endif to: #ifndef _FOO_T_DECLARED typedef __foo_t foo_t; #define _FOO_T_DECLARED #endif Concept by: bde Reviewed by: jake, obrien
Diffstat (limited to 'include')
-rw-r--r--include/_ctype.h32
-rw-r--r--include/arpa/inet.h14
-rw-r--r--include/ctype.h32
-rw-r--r--include/err.h16
-rw-r--r--include/grp.h6
-rw-r--r--include/inttypes.h6
-rw-r--r--include/monetary.h14
-rw-r--r--include/netdb.h14
-rw-r--r--include/pwd.h18
-rw-r--r--include/runetype.h20
-rw-r--r--include/search.h8
-rw-r--r--include/signal.h8
-rw-r--r--include/stddef.h22
-rw-r--r--include/stdio.h40
-rw-r--r--include/stdlib.h21
-rw-r--r--include/string.h8
-rw-r--r--include/strings.h8
-rw-r--r--include/time.h32
-rw-r--r--include/timeconv.h8
-rw-r--r--include/unistd.h24
-rw-r--r--include/vis.h8
-rw-r--r--include/wchar.h26
-rw-r--r--include/wctype.h8
23 files changed, 197 insertions, 196 deletions
diff --git a/include/_ctype.h b/include/_ctype.h
index 15a5b227..e3d574d 100644
--- a/include/_ctype.h
+++ b/include/_ctype.h
@@ -126,11 +126,11 @@ __END_DECLS
#define toascii(c) ((c) & 0x7F)
#endif
-/* See comments in <machine/ansi.h> about _BSD_CT_RUNE_T_. */
+/* See comments in <machine/_types.h> about __ct_rune_t. */
__BEGIN_DECLS
-unsigned long ___runetype(_BSD_CT_RUNE_T_);
-_BSD_CT_RUNE_T_ ___tolower(_BSD_CT_RUNE_T_);
-_BSD_CT_RUNE_T_ ___toupper(_BSD_CT_RUNE_T_);
+unsigned long ___runetype(__ct_rune_t);
+__ct_rune_t ___tolower(__ct_rune_t);
+__ct_rune_t ___toupper(__ct_rune_t);
__END_DECLS
/*
@@ -149,34 +149,34 @@ __END_DECLS
#if !defined(_DONT_USE_CTYPE_INLINE_) && \
(defined(_USE_CTYPE_INLINE_) || defined(__GNUC__) || defined(__cplusplus))
static __inline int
-__maskrune(_BSD_CT_RUNE_T_ _c, unsigned long _f)
+__maskrune(__ct_rune_t _c, unsigned long _f)
{
return ((_c < 0 || _c >= _CACHED_RUNES) ? ___runetype(_c) :
_CurrentRuneLocale->runetype[_c]) & _f;
}
static __inline int
-__istype(_BSD_CT_RUNE_T_ _c, unsigned long _f)
+__istype(__ct_rune_t _c, unsigned long _f)
{
return (!!__maskrune(_c, _f));
}
static __inline int
-__isctype(_BSD_CT_RUNE_T_ _c, unsigned long _f)
+__isctype(__ct_rune_t _c, unsigned long _f)
{
return (_c < 0 || _c >= _CACHED_RUNES) ? 0 :
!!(_DefaultRuneLocale.runetype[_c] & _f);
}
-static __inline _BSD_CT_RUNE_T_
-__toupper(_BSD_CT_RUNE_T_ _c)
+static __inline __ct_rune_t
+__toupper(__ct_rune_t _c)
{
return (_c < 0 || _c >= _CACHED_RUNES) ? ___toupper(_c) :
_CurrentRuneLocale->mapupper[_c];
}
-static __inline _BSD_CT_RUNE_T_
-__tolower(_BSD_CT_RUNE_T_ _c)
+static __inline __ct_rune_t
+__tolower(__ct_rune_t _c)
{
return (_c < 0 || _c >= _CACHED_RUNES) ? ___tolower(_c) :
_CurrentRuneLocale->maplower[_c];
@@ -185,11 +185,11 @@ __tolower(_BSD_CT_RUNE_T_ _c)
#else /* not using inlines */
__BEGIN_DECLS
-int __maskrune(_BSD_CT_RUNE_T_, unsigned long);
-int __istype(_BSD_CT_RUNE_T_, unsigned long);
-int __isctype(_BSD_CT_RUNE_T_, unsigned long);
-_BSD_CT_RUNE_T_ __toupper(_BSD_CT_RUNE_T_);
-_BSD_CT_RUNE_T_ __tolower(_BSD_CT_RUNE_T_);
+int __maskrune(__ct_rune_t, unsigned long);
+int __istype(__ct_rune_t, unsigned long);
+int __isctype(__ct_rune_t, unsigned long);
+__ct_rune_t __toupper(__ct_rune_t);
+__ct_rune_t __tolower(__ct_rune_t);
__END_DECLS
#endif /* using inlines */
diff --git a/include/arpa/inet.h b/include/arpa/inet.h
index 13be871..41cbc11 100644
--- a/include/arpa/inet.h
+++ b/include/arpa/inet.h
@@ -59,7 +59,7 @@
/* External definitions for functions in inet(3), addr2ascii(3) */
#include <sys/cdefs.h>
-#include <machine/ansi.h>
+#include <sys/_types.h>
/* Required for byteorder(3) functions. */
#include <machine/endian.h>
@@ -88,9 +88,9 @@ typedef uint16_t in_port_t;
#endif
#if __BSD_VISIBLE
-#ifdef _BSD_SIZE_T_
-typedef _BSD_SIZE_T_ size_t;
-#undef _BSD_SIZE_T_
+#ifndef _SIZE_T_DECLARED
+typedef __size_t size_t;
+#define _SIZE_T_DECLARED
#endif
#endif
@@ -98,9 +98,9 @@ typedef _BSD_SIZE_T_ size_t;
* XXX socklen_t is used by a POSIX.1-2001 interface, but not required by
* POSIX.1-2001.
*/
-#ifdef _BSD_SOCKLEN_T_
-typedef _BSD_SOCKLEN_T_ socklen_t;
-#undef _BSD_SOCKLEN_T_
+#ifndef _SOCKLEN_T_DECLARED
+typedef __socklen_t socklen_t;
+#define _SOCKLEN_T_DECLARED
#endif
#ifndef _STRUCT_IN_ADDR_DECLARED
diff --git a/include/ctype.h b/include/ctype.h
index 15a5b227..e3d574d 100644
--- a/include/ctype.h
+++ b/include/ctype.h
@@ -126,11 +126,11 @@ __END_DECLS
#define toascii(c) ((c) & 0x7F)
#endif
-/* See comments in <machine/ansi.h> about _BSD_CT_RUNE_T_. */
+/* See comments in <machine/_types.h> about __ct_rune_t. */
__BEGIN_DECLS
-unsigned long ___runetype(_BSD_CT_RUNE_T_);
-_BSD_CT_RUNE_T_ ___tolower(_BSD_CT_RUNE_T_);
-_BSD_CT_RUNE_T_ ___toupper(_BSD_CT_RUNE_T_);
+unsigned long ___runetype(__ct_rune_t);
+__ct_rune_t ___tolower(__ct_rune_t);
+__ct_rune_t ___toupper(__ct_rune_t);
__END_DECLS
/*
@@ -149,34 +149,34 @@ __END_DECLS
#if !defined(_DONT_USE_CTYPE_INLINE_) && \
(defined(_USE_CTYPE_INLINE_) || defined(__GNUC__) || defined(__cplusplus))
static __inline int
-__maskrune(_BSD_CT_RUNE_T_ _c, unsigned long _f)
+__maskrune(__ct_rune_t _c, unsigned long _f)
{
return ((_c < 0 || _c >= _CACHED_RUNES) ? ___runetype(_c) :
_CurrentRuneLocale->runetype[_c]) & _f;
}
static __inline int
-__istype(_BSD_CT_RUNE_T_ _c, unsigned long _f)
+__istype(__ct_rune_t _c, unsigned long _f)
{
return (!!__maskrune(_c, _f));
}
static __inline int
-__isctype(_BSD_CT_RUNE_T_ _c, unsigned long _f)
+__isctype(__ct_rune_t _c, unsigned long _f)
{
return (_c < 0 || _c >= _CACHED_RUNES) ? 0 :
!!(_DefaultRuneLocale.runetype[_c] & _f);
}
-static __inline _BSD_CT_RUNE_T_
-__toupper(_BSD_CT_RUNE_T_ _c)
+static __inline __ct_rune_t
+__toupper(__ct_rune_t _c)
{
return (_c < 0 || _c >= _CACHED_RUNES) ? ___toupper(_c) :
_CurrentRuneLocale->mapupper[_c];
}
-static __inline _BSD_CT_RUNE_T_
-__tolower(_BSD_CT_RUNE_T_ _c)
+static __inline __ct_rune_t
+__tolower(__ct_rune_t _c)
{
return (_c < 0 || _c >= _CACHED_RUNES) ? ___tolower(_c) :
_CurrentRuneLocale->maplower[_c];
@@ -185,11 +185,11 @@ __tolower(_BSD_CT_RUNE_T_ _c)
#else /* not using inlines */
__BEGIN_DECLS
-int __maskrune(_BSD_CT_RUNE_T_, unsigned long);
-int __istype(_BSD_CT_RUNE_T_, unsigned long);
-int __isctype(_BSD_CT_RUNE_T_, unsigned long);
-_BSD_CT_RUNE_T_ __toupper(_BSD_CT_RUNE_T_);
-_BSD_CT_RUNE_T_ __tolower(_BSD_CT_RUNE_T_);
+int __maskrune(__ct_rune_t, unsigned long);
+int __istype(__ct_rune_t, unsigned long);
+int __isctype(__ct_rune_t, unsigned long);
+__ct_rune_t __toupper(__ct_rune_t);
+__ct_rune_t __tolower(__ct_rune_t);
__END_DECLS
#endif /* using inlines */
diff --git a/include/err.h b/include/err.h
index e829e9a..675c708 100644
--- a/include/err.h
+++ b/include/err.h
@@ -42,25 +42,25 @@
* places (<machine/varargs.h> and <machine/stdarg.h>), so if we include one
* of them here we may collide with the utility's includes. It's unreasonable
* for utilities to have to include one of them to include err.h, so we get
- * _BSD_VA_LIST_ from <machine/ansi.h> and use it.
+ * __va_list from <sys/_types.h> and use it.
*/
-#include <machine/ansi.h>
#include <sys/cdefs.h>
+#include <sys/_types.h>
__BEGIN_DECLS
void err(int, const char *, ...) __dead2 __printf0like(2, 3);
-void verr(int, const char *, _BSD_VA_LIST_) __dead2 __printf0like(2, 0);
+void verr(int, const char *, __va_list) __dead2 __printf0like(2, 0);
void errc(int, int, const char *, ...) __dead2 __printf0like(3, 4);
-void verrc(int, int, const char *, _BSD_VA_LIST_) __dead2
+void verrc(int, int, const char *, __va_list) __dead2
__printf0like(3, 0);
void errx(int, const char *, ...) __dead2 __printf0like(2, 3);
-void verrx(int, const char *, _BSD_VA_LIST_) __dead2 __printf0like(2, 0);
+void verrx(int, const char *, __va_list) __dead2 __printf0like(2, 0);
void warn(const char *, ...) __printf0like(1, 2);
-void vwarn(const char *, _BSD_VA_LIST_) __printf0like(1, 0);
+void vwarn(const char *, __va_list) __printf0like(1, 0);
void warnc(int, const char *, ...) __printf0like(2, 3);
-void vwarnc(int, const char *, _BSD_VA_LIST_) __printf0like(2, 0);
+void vwarnc(int, const char *, __va_list) __printf0like(2, 0);
void warnx(const char *, ...) __printflike(1, 2);
-void vwarnx(const char *, _BSD_VA_LIST_) __printflike(1, 0);
+void vwarnx(const char *, __va_list) __printflike(1, 0);
void err_set_file(void *);
void err_set_exit(void (*)(int));
__END_DECLS
diff --git a/include/grp.h b/include/grp.h
index ce69823..2f5c543 100644
--- a/include/grp.h
+++ b/include/grp.h
@@ -49,9 +49,9 @@
#define _PATH_GROUP "/etc/group"
#endif
-#ifdef _BSD_GID_T_
-typedef _BSD_GID_T_ gid_t;
-#undef _BSD_GID_T_
+#ifndef _GID_T_DECLARED
+typedef __gid_t gid_t;
+#define _GID_T_DECLARED
#endif
struct group {
diff --git a/include/inttypes.h b/include/inttypes.h
index d2b86dd..3fe6fcc 100644
--- a/include/inttypes.h
+++ b/include/inttypes.h
@@ -33,9 +33,9 @@
#include <sys/stdint.h>
#ifndef __cplusplus
-#ifdef _BSD_WCHAR_T_
-typedef _BSD_WCHAR_T_ wchar_t;
-#undef _BSD_WCHAR_T_
+#ifndef _WCHAR_T_DECLARED
+typedef __wchar_t wchar_t;
+#define _WCHAR_T_DECLARED
#endif
#endif
diff --git a/include/monetary.h b/include/monetary.h
index 1de844b..9601078 100644
--- a/include/monetary.h
+++ b/include/monetary.h
@@ -30,16 +30,16 @@
#define _MONETARY_H_
#include <sys/cdefs.h>
-#include <machine/ansi.h>
+#include <sys/_types.h>
-#ifdef _BSD_SIZE_T_
-typedef _BSD_SIZE_T_ size_t;
-#undef _BSD_SIZE_T_
+#ifndef _SIZE_T_DECLARED
+typedef __size_t size_t;
+#define _SIZE_T_DECLARED
#endif
-#ifdef _BSD_SSIZE_T_
-typedef _BSD_SSIZE_T_ ssize_t;
-#undef _BSD_SSIZE_T_
+#ifndef _SIZE_T_DECLARED
+typedef __ssize_t ssize_t;
+#define _SIZE_T_DECLARED
#endif
__BEGIN_DECLS
diff --git a/include/netdb.h b/include/netdb.h
index 8da2e8d..4fb0aa8 100644
--- a/include/netdb.h
+++ b/include/netdb.h
@@ -62,16 +62,16 @@
#define _NETDB_H_
#include <sys/cdefs.h>
-#include <machine/ansi.h>
+#include <sys/_types.h>
-#ifdef _BSD_SIZE_T_
-typedef _BSD_SIZE_T_ size_t;
-#undef _BSD_SIZE_T_
+#ifndef _SIZE_T_DECLARED
+typedef __size_t size_t;
+#define _SIZE_T_DECLARED
#endif
-#ifdef _BSD_SOCKLEN_T_
-typedef _BSD_SOCKLEN_T_ socklen_t;
-#undef _BSD_SOCKLEN_T_
+#ifndef _SOCKLEN_T_DECLARED
+typedef __socklen_t socklen_t;
+#define _SOCKLEN_T_DECLARED
#endif
#ifndef _PATH_HEQUIV
diff --git a/include/pwd.h b/include/pwd.h
index b038fa7..40082c3 100644
--- a/include/pwd.h
+++ b/include/pwd.h
@@ -45,19 +45,19 @@
#include <sys/cdefs.h>
#include <sys/_types.h>
-#ifdef _BSD_GID_T_
-typedef _BSD_GID_T_ gid_t;
-#undef _BSD_GID_T_
+#ifndef _GID_T_DECLARED
+typedef __gid_t gid_t;
+#define _GID_T_DECLARED
#endif
-#ifdef _BSD_TIME_T_
-typedef _BSD_TIME_T_ time_t;
-#undef _BSD_TIME_T_
+#ifndef _TIME_T_DECLARED
+typedef __time_t time_t;
+#define _TIME_T_DECLARED
#endif
-#ifdef _BSD_UID_T_
-typedef _BSD_UID_T_ uid_t;
-#undef _BSD_UID_T_
+#ifndef _UID_T_DECLARED
+typedef __uid_t uid_t;
+#define _UID_T_DECLARED
#endif
#define _PATH_PWD "/etc"
diff --git a/include/runetype.h b/include/runetype.h
index 4ddd95d..522206d 100644
--- a/include/runetype.h
+++ b/include/runetype.h
@@ -41,22 +41,22 @@
#define _RUNETYPE_H_
#include <sys/cdefs.h>
-#include <machine/ansi.h>
+#include <sys/_types.h>
-#ifdef _BSD_RUNE_T_
-typedef _BSD_RUNE_T_ rune_t;
-#undef _BSD_RUNE_T_
+#ifndef _RUNE_T_DECLARED
+typedef __rune_t rune_t;
+#define _RUNE_T_DECLARED
#endif
-#ifdef _BSD_SIZE_T_
-typedef _BSD_SIZE_T_ size_t;
-#undef _BSD_SIZE_T_
+#ifndef _SIZE_T_DECLARED
+typedef __size_t size_t;
+#define _SIZE_T_DECLARED
#endif
#ifndef __cplusplus
-#ifdef _BSD_WCHAR_T_
-typedef _BSD_WCHAR_T_ wchar_t;
-#undef _BSD_WCHAR_T_
+#ifndef _WCHAR_T_DECLARED
+typedef __wchar_t wchar_t;
+#define _WCHAR_T_DECLARED
#endif
#endif
diff --git a/include/search.h b/include/search.h
index f0ef443..c899762 100644
--- a/include/search.h
+++ b/include/search.h
@@ -10,11 +10,11 @@
#define _SEARCH_H_
#include <sys/cdefs.h>
-#include <machine/ansi.h>
+#include <sys/_types.h>
-#ifdef _BSD_SIZE_T_
-typedef _BSD_SIZE_T_ size_t;
-#undef _BSD_SIZE_T_
+#ifndef _SIZE_T_DECLARED
+typedef __size_t size_t;
+#define _SIZE_T_DECLARED
#endif
typedef struct entry {
diff --git a/include/signal.h b/include/signal.h
index 58ff0f8..ec6e5a0 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -40,7 +40,7 @@
#include <sys/cdefs.h>
#include <sys/_posix.h>
-#include <machine/ansi.h>
+#include <sys/_types.h>
#include <sys/signal.h>
#include <sys/time.h>
@@ -53,7 +53,7 @@ extern __const int sys_nsig;
__BEGIN_DECLS
int raise(int);
#ifndef _ANSI_SOURCE
-int kill(_BSD_PID_T_, int);
+int kill(__pid_t, int);
int sigaction(int, const struct sigaction *, struct sigaction *);
int sigaddset(sigset_t *, int);
int sigdelset(sigset_t *, int);
@@ -69,14 +69,14 @@ int sigwait(const sigset_t *, int *);
#ifdef _P1003_1B_VISIBLE
__BEGIN_DECLS
-int sigqueue(_BSD_PID_T_, int, const union sigval);
+int sigqueue(__pid_t, int, const union sigval);
int sigtimedwait(const sigset_t *, siginfo_t *, const struct timespec *);
int sigwaitinfo(const sigset_t *, siginfo_t *);
__END_DECLS
#endif
#ifndef _POSIX_SOURCE
-int killpg(_BSD_PID_T_, int);
+int killpg(__pid_t, int);
int sigaltstack(const stack_t *, stack_t *);
int sigblock(int);
int siginterrupt(int, int);
diff --git a/include/stddef.h b/include/stddef.h
index 1e8dd2e..8400214 100644
--- a/include/stddef.h
+++ b/include/stddef.h
@@ -39,26 +39,26 @@
#define _STDDEF_H_
#include <sys/cdefs.h>
-#include <machine/ansi.h>
+#include <sys/_types.h>
-typedef _BSD_PTRDIFF_T_ ptrdiff_t;
+typedef __ptrdiff_t ptrdiff_t;
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
-#ifdef _BSD_RUNE_T_
-typedef _BSD_RUNE_T_ rune_t;
-#undef _BSD_RUNE_T_
+#ifndef _RUNE_T_DECLARED
+typedef __rune_t rune_t;
+#define _RUNE_T_DECLARED
#endif
#endif
-#ifdef _BSD_SIZE_T_
-typedef _BSD_SIZE_T_ size_t;
-#undef _BSD_SIZE_T_
+#ifndef _SIZE_T_DECLARED
+typedef __size_t size_t;
+#define _SIZE_T_DECLARED
#endif
#ifndef __cplusplus
-#ifdef _BSD_WCHAR_T_
-typedef _BSD_WCHAR_T_ wchar_t;
-#undef _BSD_WCHAR_T_
+#ifndef _WCHAR_T_DECLARED
+typedef __wchar_t wchar_t;
+#define _WCHAR_T_DECLARED
#endif
#endif
diff --git a/include/stdio.h b/include/stdio.h
index d64e690..724b0df 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -41,18 +41,18 @@
#define _STDIO_H_
#include <sys/cdefs.h>
-#include <machine/ansi.h>
+#include <sys/_types.h>
-#ifdef _BSD_SIZE_T_
-typedef _BSD_SIZE_T_ size_t;
-#undef _BSD_SIZE_T_
+#ifndef _SIZE_T_DECLARED
+typedef __size_t size_t;
+#define _SIZE_T_DECLARED
#endif
#ifndef NULL
#define NULL 0
#endif
-typedef _BSD_OFF_T_ fpos_t;
+typedef __off_t fpos_t;
#define _FSTDIO /* Define for new stdio with functions. */
@@ -251,16 +251,16 @@ FILE *tmpfile(void);
char *tmpnam(char *);
int ungetc(int, FILE *);
int vfprintf(FILE *__restrict, const char *__restrict,
- _BSD_VA_LIST_);
-int vprintf(const char *__restrict, _BSD_VA_LIST_);
+ __va_list);
+int vprintf(const char *__restrict, __va_list);
int vsprintf(char *__restrict, const char *__restrict,
- _BSD_VA_LIST_);
+ __va_list);
#if __ISO_C_VISIBLE >= 1999
int snprintf(char *__restrict, size_t, const char *__restrict,
...) __printflike(3, 4);
int vsnprintf(char *__restrict, size_t, const char *__restrict,
- _BSD_VA_LIST_) __printflike(3, 0);
+ __va_list) __printflike(3, 0);
#endif
/*
@@ -298,8 +298,8 @@ int putchar_unlocked(int);
#endif
#if __POSIX_VISIBLE >= 200112
-int fseeko(FILE *, _BSD_OFF_T_, int);
-_BSD_OFF_T_ ftello(FILE *);
+int fseeko(FILE *, __off_t, int);
+__off_t ftello(FILE *);
#endif
#if __BSD_VISIBLE || __XSI_VISIBLE > 0 && __XSI_VISIBLE < 600
@@ -327,10 +327,10 @@ __const char *fmtcheck(const char *, const char *) __ATTR_FORMAT_ARG;
int fpurge(FILE *);
void setbuffer(FILE *, char *, int);
int setlinebuf(FILE *);
-int vasprintf(char **, const char *, _BSD_VA_LIST_)
+int vasprintf(char **, const char *, __va_list)
__printflike(2, 0);
-int vscanf(const char *, _BSD_VA_LIST_) __scanflike(1, 0);
-int vsscanf(const char *, const char *, _BSD_VA_LIST_)
+int vscanf(const char *, __va_list) __scanflike(1, 0);
+int vsscanf(const char *, const char *, __va_list)
__scanflike(2, 0);
/*
@@ -364,19 +364,19 @@ FILE *funopen(const void *,
*/
#ifndef _FTRUNCATE_DECLARED
#define _FTRUNCATE_DECLARED
-int ftruncate(int, _BSD_OFF_T_);
+int ftruncate(int, __off_t);
#endif
#ifndef _LSEEK_DECLARED
#define _LSEEK_DECLARED
-_BSD_OFF_T_ lseek(int, _BSD_OFF_T_, int);
+__off_t lseek(int, __off_t, int);
#endif
#ifndef _MMAP_DECLARED
#define _MMAP_DECLARED
-void *mmap(void *, size_t, int, int, int, _BSD_OFF_T_);
+void *mmap(void *, size_t, int, int, int, __off_t);
#endif
#ifndef _TRUNCATE_DECLARED
#define _TRUNCATE_DECLARED
-int truncate(const char *, _BSD_OFF_T_);
+int truncate(const char *, __off_t);
#endif
#endif /* __BSD_VISIBLE */
@@ -384,8 +384,8 @@ int truncate(const char *, _BSD_OFF_T_);
* Functions internal to the implementation.
*/
int __srget(FILE *);
-int __vfscanf(FILE *, const char *, _BSD_VA_LIST_);
-int __svfscanf(FILE *, const char *, _BSD_VA_LIST_);
+int __vfscanf(FILE *, const char *, __va_list);
+int __svfscanf(FILE *, const char *, __va_list);
int __swbuf(int, FILE *);
/*
diff --git a/include/stdlib.h b/include/stdlib.h
index c3c3cc0..c3d9d13 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -38,25 +38,24 @@
#define _STDLIB_H_
#include <sys/cdefs.h>
-
-#include <machine/ansi.h>
+#include <sys/_types.h>
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
-#ifdef _BSD_RUNE_T_
-typedef _BSD_RUNE_T_ rune_t;
-#undef _BSD_RUNE_T_
+#ifndef _RUNE_T_DECLARED
+typedef __rune_t rune_t;
+#define _RUNE_T_DECLARED
#endif
#endif
-#ifdef _BSD_SIZE_T_
-typedef _BSD_SIZE_T_ size_t;
-#undef _BSD_SIZE_T_
+#ifndef _SIZE_T_DECLARED
+typedef __size_t size_t;
+#define _SIZE_T_DECLARED
#endif
#ifndef __cplusplus
-#ifdef _BSD_WCHAR_T_
-typedef _BSD_WCHAR_T_ wchar_t;
-#undef _BSD_WCHAR_T_
+#ifndef _WCHAR_T_DECLARED
+typedef __wchar_t wchar_t;
+#define _WCHAR_T_DECLARED
#endif
#endif
diff --git a/include/string.h b/include/string.h
index 7b3dbc6..7715991 100644
--- a/include/string.h
+++ b/include/string.h
@@ -38,7 +38,7 @@
#define _STRING_H_
#include <sys/cdefs.h>
-#include <machine/ansi.h>
+#include <sys/_types.h>
/*
* Prototype functions which were historically defined in <string.h>, but
@@ -48,9 +48,9 @@
#include <strings.h>
#endif
-#ifdef _BSD_SIZE_T_
-typedef _BSD_SIZE_T_ size_t;
-#undef _BSD_SIZE_T_
+#ifndef _SIZE_T_DECLARED
+typedef __size_t size_t;
+#define _SIZE_T_DECLARED
#endif
#ifndef NULL
diff --git a/include/strings.h b/include/strings.h
index bc989cb..cb77938 100644
--- a/include/strings.h
+++ b/include/strings.h
@@ -30,11 +30,11 @@
#define _STRINGS_H_
#include <sys/cdefs.h>
-#include <machine/ansi.h>
+#include <sys/_types.h>
-#ifdef _BSD_SIZE_T_
-typedef _BSD_SIZE_T_ size_t;
-#undef _BSD_SIZE_T_
+#ifndef _SIZE_T_DECLARED
+typedef __size_t size_t;
+#define _SIZE_T_DECLARED
#endif
__BEGIN_DECLS
diff --git a/include/time.h b/include/time.h
index daf8e90..c317a98 100644
--- a/include/time.h
+++ b/include/time.h
@@ -46,6 +46,8 @@
#define _TIME_H_
#include <sys/cdefs.h>
+#include <sys/_types.h>
+
#include <machine/ansi.h>
#if __POSIX_VISIBLE > 0 && __POSIX_VISIBLE < 200112 || __BSD_VISIBLE
@@ -63,33 +65,33 @@
#define NULL 0
#endif
-#ifdef _BSD_CLOCK_T_
-typedef _BSD_CLOCK_T_ clock_t;
-#undef _BSD_CLOCK_T_
+#ifndef _CLOCK_T_DECLARED
+typedef __clock_t clock_t;
+#define _CLOCK_T_DECLARED
#endif
-#ifdef _BSD_TIME_T_
-typedef _BSD_TIME_T_ time_t;
-#undef _BSD_TIME_T_
+#ifndef _TIME_T_DECLARED
+typedef __time_t time_t;
+#define _TIME_T_DECLARED
#endif
-#ifdef _BSD_SIZE_T_
-typedef _BSD_SIZE_T_ size_t;
-#undef _BSD_SIZE_T_
+#ifndef _SIZE_T_DECLARED
+typedef __size_t size_t;
+#define _SIZE_T_DECLARED
#endif
#if __POSIX_VISIBLE >= 199309
/*
* New in POSIX 1003.1b-1993.
*/
-#ifdef _BSD_CLOCKID_T_
-typedef _BSD_CLOCKID_T_ clockid_t;
-#undef _BSD_CLOCKID_T_
+#ifndef _CLOCKID_T_DECLARED
+typedef __clockid_t clockid_t;
+#define _CLOCKID_T_DECLARED
#endif
-#ifdef _BSD_TIMER_T_
-typedef _BSD_TIMER_T_ timer_t;
-#undef _BSD_TIMER_T_
+#ifndef _TIMER_T_DECLARED
+typedef __timer_t timer_t;
+#define _TIMER_T_DECLARED
#endif
#include <sys/timespec.h>
diff --git a/include/timeconv.h b/include/timeconv.h
index e76c4cd..cce937c 100644
--- a/include/timeconv.h
+++ b/include/timeconv.h
@@ -46,11 +46,11 @@
#define _TIMECONV_H_
#include <sys/cdefs.h>
-#include <machine/ansi.h>
+#include <sys/_types.h>
-#ifdef _BSD_TIME_T_
-typedef _BSD_TIME_T_ time_t;
-#undef _BSD_TIME_T_
+#ifndef _TIME_T_DECLARED
+typedef __time_t time_t;
+#define _TIME_T_DECLARED
#endif
time_t _time32_to_time(__int32_t t32);
diff --git a/include/unistd.h b/include/unistd.h
index 099cf53..8629305 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -42,24 +42,24 @@
#include <sys/unistd.h>
#include <sys/_types.h>
-#ifdef _BSD_GID_T_
-typedef _BSD_GID_T_ gid_t;
-#undef _BSD_GID_T_
+#ifndef _GID_T_DECLARED
+typedef __gid_t gid_t;
+#define _GID_T_DECLARED
#endif
-#ifdef _BSD_SIZE_T_
-typedef _BSD_SIZE_T_ size_t;
-#undef _BSD_SIZE_T_
+#ifndef _SIZE_T_DECLARED
+typedef __size_t size_t;
+#define _SIZE_T_DECLARED
#endif
-#ifdef _BSD_SSIZE_T_
-typedef _BSD_SSIZE_T_ ssize_t;
-#undef _BSD_SSIZE_T_
+#ifndef _SSIZE_T_DECLARED
+typedef __ssize_t ssize_t;
+#define _SSIZE_T_DECLARED
#endif
-#ifdef _BSD_UID_T_
-typedef _BSD_UID_T_ uid_t;
-#undef _BSD_UID_T_
+#ifndef _UID_T_DECLARED
+typedef __uid_t_ uid_t;
+#define _UID_T_DECLARED
#endif
/*
diff --git a/include/vis.h b/include/vis.h
index f630db7..d4134db 100644
--- a/include/vis.h
+++ b/include/vis.h
@@ -37,11 +37,11 @@
#ifndef _VIS_H_
#define _VIS_H_
-#include <machine/ansi.h>
+#include <sys/_types.h>
-#ifdef _BSD_SIZE_T_
-typedef _BSD_SIZE_T_ size_t;
-#undef _BSD_SIZE_T_
+#ifndef _SIZE_T_DECLARED
+typedef __size_t size_t;
+#define _SIZE_T_DECLARED
#endif
/*
diff --git a/include/wchar.h b/include/wchar.h
index 36785ca..bcbac9b 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -68,7 +68,7 @@
#define _WCHAR_H_
#include <sys/cdefs.h>
-#include <machine/ansi.h>
+#include <sys/_types.h>
#include <stdio.h>
@@ -76,20 +76,20 @@
#define NULL 0
#endif
-#ifdef _BSD_MBSTATE_T_
-typedef _BSD_MBSTATE_T_ mbstate_t;
-#undef _BSD_MBSTATE_T_
+#ifndef _MBSTATE_T_DECLARED
+typedef __mbstate_t mbstate_t;
+#define _MBSTATE_T_DECLARED
#endif
-#ifdef _BSD_SIZE_T_
-typedef _BSD_SIZE_T_ size_t;
-#undef _BSD_SIZE_T_
+#ifndef _SIZE_T_DECLARED
+typedef __size_t size_t;
+#define _SIZE_T_DECLARED
#endif
#ifndef __cplusplus
-#ifdef _BSD_WCHAR_T_
-typedef _BSD_WCHAR_T_ wchar_t;
-#undef _BSD_WCHAR_T_
+#ifndef _WCHAR_T_DECLARED
+typedef __wchar_t wchar_t;
+#define _WCHAR_T_DECLARED
#endif
#endif
@@ -98,9 +98,9 @@ typedef unsigned long wctype_t;
#define _WCTYPE_T
#endif
-#ifdef _BSD_WINT_T_
-typedef _BSD_WINT_T_ wint_t;
-#undef _BSD_WINT_T_
+#ifndef _WINT_T_DECLARED
+typedef __wint_t wint_t;
+#define _WINT_T_DECLARED
#endif
#ifndef WEOF
diff --git a/include/wctype.h b/include/wctype.h
index 2865184..359cc3b 100644
--- a/include/wctype.h
+++ b/include/wctype.h
@@ -32,7 +32,7 @@
#define _WCTYPE_H_
#include <sys/cdefs.h>
-#include <machine/ansi.h>
+#include <sys/_types.h>
#include <ctype.h>
@@ -46,9 +46,9 @@ typedef unsigned long wctype_t;
#define _WCTYPE_T
#endif
-#ifdef _BSD_WINT_T_
-typedef _BSD_WINT_T_ wint_t;
-#undef _BSD_WINT_T_
+#ifndef _WINT_T_DECLARED
+typedef __wint_t wint_t;
+#define _WINT_T_DECLARED
#endif
#ifndef WEOF
OpenPOWER on IntegriCloud