1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-23 07:31:31 +00:00

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
This commit is contained in:
Mike Barcroft 2002-08-21 16:20:02 +00:00
parent 9884a53c1a
commit abbd890233
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=102227
93 changed files with 1380 additions and 1402 deletions

View File

@ -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 */

View File

@ -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

View File

@ -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 */

View File

@ -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

View File

@ -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 {

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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 {

View File

@ -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);

View File

@ -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

View File

@ -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 *);
/*

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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>

View File

@ -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);

View File

@ -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
/*

View File

@ -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
/*

View File

@ -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

View File

@ -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

View File

@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$");
unsigned long
___runetype(c)
_BSD_CT_RUNE_T_ c;
__ct_rune_t c;
{
int x;
_RuneRange *rr = &_CurrentRuneLocale->runetype_ext;

View File

@ -40,9 +40,9 @@ __FBSDID("$FreeBSD$");
#include <stdio.h>
#include <rune.h>
_BSD_CT_RUNE_T_
__ct_rune_t
___tolower(c)
_BSD_CT_RUNE_T_ c;
__ct_rune_t c;
{
int x;
_RuneRange *rr = &_CurrentRuneLocale->maplower_ext;

View File

@ -40,9 +40,9 @@ __FBSDID("$FreeBSD$");
#include <stdio.h>
#include <rune.h>
_BSD_CT_RUNE_T_
__ct_rune_t
___toupper(c)
_BSD_CT_RUNE_T_ c;
__ct_rune_t c;
{
int x;
_RuneRange *rr = &_CurrentRuneLocale->mapupper_ext;

View File

@ -69,7 +69,7 @@ extern int _fwalk(int (*)(FILE *));
extern int __swsetup(FILE *);
extern int __sflags(const char *, int *);
extern int __ungetc(int, FILE *);
extern int __vfprintf(FILE *, const char *, _BSD_VA_LIST_);
extern int __vfprintf(FILE *, const char *, __va_list);
extern int __sdidinit;

View File

@ -39,7 +39,7 @@ int
vasprintf(str, fmt, ap)
char **str;
const char *fmt;
_BSD_VA_LIST_ ap;
__va_list ap;
{
int ret;
FILE f;

View File

@ -43,7 +43,7 @@ __FBSDID("$FreeBSD$");
#include <stdio.h>
int
vprintf(const char *__restrict fmt, _BSD_VA_LIST_ ap)
vprintf(const char *__restrict fmt, __va_list ap)
{
return (vfprintf(stdout, fmt, ap));

View File

@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$");
int
vscanf(fmt, ap)
const char *fmt;
_BSD_VA_LIST_ ap;
__va_list ap;
{
int retval;

View File

@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$");
int
vsnprintf(char *__restrict str, size_t n, const char *__restrict fmt,
_BSD_VA_LIST_ ap)
__va_list ap)
{
size_t on;
int ret;

View File

@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$");
#include "local.h"
int
vsprintf(char *__restrict str, const char *__restrict fmt, _BSD_VA_LIST_ ap)
vsprintf(char *__restrict str, const char *__restrict fmt, __va_list ap)
{
int ret;
FILE f;

View File

@ -62,7 +62,7 @@ int
vsscanf(str, fmt, ap)
const char *str;
const char *fmt;
_BSD_VA_LIST_ ap;
__va_list ap;
{
FILE f;
struct __sFILEX ext;

View File

@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
#include <machine/ansi.h>
#include <sys/_types.h>
typedef __uintptr_t devinfo_handle_t;
#define DEVINFO_ROOT_DEVICE ((devinfo_handle_t)0)

View File

@ -38,21 +38,21 @@
#define _KVM_H_
#include <sys/cdefs.h>
#include <machine/ansi.h>
#include <sys/_types.h>
#include <nlist.h>
/* Default version symbol. */
#define VRS_SYM "_version"
#define VRS_KEY "VERSION"
#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
typedef struct __kvm kvm_t;

View File

@ -386,8 +386,8 @@ curses.head: curses.h.in
-e "s%@cf_cv_type_of_bool@%${TYPE_OF_BOOL}%g" \
-e "s%@cf_cv_typeof_chtype@%${TYPEOF_CHTYPE}%g" \
-e "s%@cf_cv_widec_shift@%${WIDEC_SHIFT}%g" \
-e "s/ _WCHAR_T/ _BSD_WCHAR_T_/g" \
-e "s/ _WINT_T/ _BSD_WINT_T_/g" \
-e "s/ _WCHAR_T/ __wchar_t/g" \
-e "s/ _WINT_T/ __wint_t/g" \
unctrl.h: unctrl.h.in
sed <${NCURSES}/include/$@.in >$@ \

View File

@ -245,9 +245,9 @@ struct disklabel;
extern char *getdisklabel(const char *, struct disklabel *);
extern int printf(const char *fmt, ...) __printflike(1, 2);
extern void vprintf(const char *fmt, _BSD_VA_LIST_);
extern void vprintf(const char *fmt, __va_list);
extern int sprintf(char *buf, const char *cfmt, ...) __printflike(2, 3);
extern void vsprintf(char *buf, const char *cfmt, _BSD_VA_LIST_);
extern void vsprintf(char *buf, const char *cfmt, __va_list);
extern void twiddle(void);

View File

@ -386,8 +386,8 @@ curses.head: curses.h.in
-e "s%@cf_cv_type_of_bool@%${TYPE_OF_BOOL}%g" \
-e "s%@cf_cv_typeof_chtype@%${TYPEOF_CHTYPE}%g" \
-e "s%@cf_cv_widec_shift@%${WIDEC_SHIFT}%g" \
-e "s/ _WCHAR_T/ _BSD_WCHAR_T_/g" \
-e "s/ _WINT_T/ _BSD_WINT_T_/g" \
-e "s/ _WCHAR_T/ __wchar_t/g" \
-e "s/ _WINT_T/ __wint_t/g" \
unctrl.h: unctrl.h.in
sed <${NCURSES}/include/$@.in >$@ \

147
sys/alpha/include/_types.h Normal file
View File

@ -0,0 +1,147 @@
/*-
* Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* From: @(#)ansi.h 8.2 (Berkeley) 1/4/94
* From: @(#)types.h 8.3 (Berkeley) 1/5/94
* $FreeBSD$
*/
#ifndef _MACHINE__TYPES_H_
#define _MACHINE__TYPES_H_
/*
* Basic types upon which most other types are built.
*/
typedef __signed char __int8_t;
typedef unsigned char __uint8_t;
typedef short __int16_t;
typedef unsigned short __uint16_t;
typedef int __int32_t;
typedef unsigned int __uint32_t;
typedef long __int64_t;
typedef unsigned long __uint64_t;
/*
* Standard type definitions.
*/
typedef __int32_t __clock_t; /* clock()... */
typedef __int32_t __clockid_t; /* clock_gettime()... */
typedef __int64_t __critical_t;
typedef __uint32_t __fflags_t; /* file flags */
typedef __int64_t __intfptr_t;
typedef __int64_t __intmax_t;
typedef __int64_t __intptr_t;
typedef __uint32_t __intrmask_t;
typedef __int32_t __int_fast8_t;
typedef __int32_t __int_fast16_t;
typedef __int32_t __int_fast32_t;
typedef __int64_t __int_fast64_t;
typedef __int8_t __int_least8_t;
typedef __int16_t __int_least16_t;
typedef __int32_t __int_least32_t;
typedef __int64_t __int_least64_t;
typedef __int64_t __off_t; /* file offset */
typedef __int32_t __pid_t; /* process [group] */
typedef __int64_t __ptrdiff_t; /* ptr1 - ptr2 */
typedef __int64_t __register_t;
typedef __int64_t __segsz_t; /* segment size (in pages) */
typedef __uint64_t __size_t; /* sizeof() */
typedef __uint32_t __socklen_t;
typedef __int64_t __ssize_t; /* byte count or error */
typedef __int32_t __time_t; /* time()... */
typedef __int32_t __timer_t; /* timer_gettime()... */
typedef __uint64_t __uintfptr_t;
typedef __uint64_t __uintmax_t;
typedef __uint64_t __uintptr_t;
typedef __uint32_t __uint_fast8_t;
typedef __uint32_t __uint_fast16_t;
typedef __uint32_t __uint_fast32_t;
typedef __uint64_t __uint_fast64_t;
typedef __uint8_t __uint_least8_t;
typedef __uint16_t __uint_least16_t;
typedef __uint32_t __uint_least32_t;
typedef __uint64_t __uint_least64_t;
typedef __uint64_t __u_register_t;
typedef __uint64_t __vm_offset_t;
typedef __int64_t __vm_ooffset_t;
typedef __uint64_t __vm_pindex_t;
typedef __uint64_t __vm_size_t;
/*
* Unusual type definitions.
*/
/*
* The rune type above is declared to be an ``int'' instead of the more natural
* ``unsigned long'' or ``long''. Two things are happening here. It is not
* unsigned so that EOF (-1) can be naturally assigned to it and used. Also,
* it looks like 10646 will be a 31 bit standard. This means that if your
* ints cannot hold 32 bits, you will be in trouble. The reason an int was
* chosen over a long is that the is*() and to*() routines take ints (says
* ANSI C), but they use __ct_rune_t instead of int. By changing it here, you
* lose a bit of ANSI conformance, but your programs will still work.
*
* NOTE: rune_t is not covered by ANSI nor other standards, and should not
* be instantiated outside of lib/libc/locale. Use wchar_t. wchar_t and
* rune_t must be the same type. Also wint_t must be no narrower than
* wchar_t, and should also be able to hold all members of the largest
* character set plus one extra value (WEOF). wint_t must be at least 16 bits.
*/
typedef __int32_t __ct_rune_t;
typedef __int32_t __rune_t;
typedef __int32_t __wchar_t;
typedef __int32_t __wint_t;
/*
* mbstate_t is an opaque object to keep conversion state, during multibyte
* stream conversions. The content must not be referenced by user programs.
*/
typedef union {
char __mbstate8[128];
__int64_t _mbstateL; /* for alignment */
} __mbstate_t;
#if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3)
typedef __builtin_va_list __va_list; /* internally known to gcc */
#else
typedef struct {
char *__base;
int __offset;
int __pad;
} __va_list;
#endif /* post GCC 2.95 */
#if defined __GNUC__ && !defined(__GNUC_VA_LIST) && !defined(__NO_GNUC_VA_LIST)
#define __GNUC_VA_LIST
typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/
#endif
#endif /* !_MACHINE__TYPES_H_ */

View File

@ -38,73 +38,6 @@
#ifndef _MACHINE_ANSI_H_
#define _MACHINE_ANSI_H_
/*
* Types which are fundamental to the implementation and may appear in
* more than one standard header are defined here. Standard headers
* then use:
* #ifdef _BSD_SIZE_T_
* typedef _BSD_SIZE_T_ size_t;
* #undef _BSD_SIZE_T_
* #endif
*/
#define _BSD_CLOCK_T_ int /* clock() */
#define _BSD_CLOCKID_T_ int /* clock_gettime()... */
#define _BSD_FFLAGS_T_ __uint_least32_t /* file flags */
#define _BSD_MBSTATE_T_ __mbstate_t /* mbstate_t */
#define _BSD_PTRDIFF_T_ long /* ptr1 - ptr2 */
#define _BSD_RUNE_T_ _BSD_CT_RUNE_T_ /* rune_t (see below) */
#define _BSD_SEGSZ_T_ __int64_t /* segment size (in pages) */
#define _BSD_SIZE_T_ unsigned long /* sizeof() */
#define _BSD_SOCKLEN_T_ __uint32_t /* socklen_t (duh) */
#define _BSD_SSIZE_T_ long /* byte count or error */
#define _BSD_TIME_T_ int /* time()... */
#define _BSD_TIMER_T_ int /* timer_gettime()... */
#define _BSD_WCHAR_T_ _BSD_CT_RUNE_T_ /* wchar_t (see below) */
#define _BSD_WINT_T_ _BSD_CT_RUNE_T_ /* wint_t (see below) */
/*
* Types which are fundamental to the implementation and must be used
* in more than one standard header although they are only declared in
* one (perhaps nonstandard) header are defined here. Standard headers
* use _BSD_XXX_T_ without undef'ing it.
*/
#define _BSD_CT_RUNE_T_ int /* arg type for ctype funcs */
#define _BSD_OFF_T_ long /* file offset */
#define _BSD_PID_T_ int /* process [group] */
#if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3)
#define _BSD_VA_LIST_ __builtin_va_list /* internally known to gcc */
#else
typedef struct {
char *__base;
int __offset;
int __pad;
} __va_list;
#define _BSD_VA_LIST_ __va_list /* va_list */
#endif /* post GCC 2.95 */
#if defined __GNUC__ && !defined(__GNUC_VA_LIST) && !defined(__NO_GNUC_VA_LIST)
#define __GNUC_VA_LIST
typedef _BSD_VA_LIST_ __gnuc_va_list; /* compatibility w/GNU headers*/
#endif
/*
* The rune type above is declared to be an ``int'' instead of the more natural
* ``unsigned long'' or ``long''. Two things are happening here. It is not
* unsigned so that EOF (-1) can be naturally assigned to it and used. Also,
* it looks like 10646 will be a 31 bit standard. This means that if your
* ints cannot hold 32 bits, you will be in trouble. The reason an int was
* chosen over a long is that the is*() and to*() routines take ints (says
* ANSI C), but they use _BSD_CT_RUNE_T_ instead of int. By changing it
* here, you lose a bit of ANSI conformance, but your programs will still
* work.
*
* NOTE: rune_t is not covered by ANSI nor other standards, and should not
* be instantiated outside of lib/libc/locale. Use wchar_t. wchar_t and
* rune_t must be the same type. Also wint_t must be no narrower than
* wchar_t, and should also be able to hold all members of the largest
* character set plus one extra value (WEOF). wint_t must be at least 16 bits.
*/
/*
* Frequencies of the clock ticks reported by clock() and times(). They
* are the same as stathz for bogus historical reasons. They should be
@ -118,50 +51,4 @@ typedef _BSD_VA_LIST_ __gnuc_va_list; /* compatibility w/GNU headers*/
#define _BSD_CLK_TCK_ 100
#define _BSD_CLOCKS_PER_SEC_ 100
/*
* Internal names for basic integral types. Omit the typedef if
* not possible for a machine/compiler combination.
*/
typedef __signed char __int8_t;
typedef unsigned char __uint8_t;
typedef short __int16_t;
typedef unsigned short __uint16_t;
typedef int __int32_t;
typedef unsigned int __uint32_t;
typedef long __int64_t;
typedef unsigned long __uint64_t;
typedef long __intptr_t;
typedef unsigned long __uintptr_t;
typedef __signed char __int_least8_t;
typedef unsigned char __uint_least8_t;
typedef short __int_least16_t;
typedef unsigned short __uint_least16_t;
typedef int __int_least32_t;
typedef unsigned int __uint_least32_t;
typedef long __int_least64_t;
typedef unsigned long __uint_least64_t;
typedef int __int_fast8_t;
typedef unsigned int __uint_fast8_t;
typedef int __int_fast16_t;
typedef unsigned int __uint_fast16_t;
typedef int __int_fast32_t;
typedef unsigned int __uint_fast32_t;
typedef long __int_fast64_t;
typedef unsigned long __uint_fast64_t;
typedef long __intmax_t;
typedef unsigned long __uintmax_t;
/*
* mbstate_t is an opaque object to keep conversion state, during multibyte
* stream conversions. The content must not be referenced by user programs.
*/
typedef union {
char __mbstate8[128];
__int64_t _mbstateL; /* for alignment */
} __mbstate_t;
#endif /* !_MACHINE_ANSI_H_ */

View File

@ -39,7 +39,7 @@
#define _MACHINE_ENDIAN_H_
#include <sys/cdefs.h>
#include <machine/ansi.h>
#include <sys/_types.h>
/*
* Define the order of 32-bit words in 64-bit words.

View File

@ -39,9 +39,9 @@
#ifndef _ALPHA_STDARG_H_
#define _ALPHA_STDARG_H_
#include <machine/ansi.h>
#include <sys/_types.h>
typedef _BSD_VA_LIST_ va_list;
typedef __va_list va_list;
#if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3)

View File

@ -1,62 +0,0 @@
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)types.h 8.3 (Berkeley) 1/5/94
* $NetBSD: types.h,v 1.8 1997/04/06 08:47:45 cgd Exp $
* $FreeBSD$
*/
#ifndef _MACHTYPES_H_
#define _MACHTYPES_H_
#include <sys/cdefs.h>
typedef unsigned long vm_offset_t;
typedef long vm_ooffset_t;
typedef unsigned long vm_pindex_t;
typedef unsigned long vm_size_t;
typedef __int64_t register_t;
typedef __uint64_t u_register_t;
#ifdef _KERNEL
typedef long intfptr_t;
typedef unsigned long uintfptr_t;
#endif
/* Critical section value */
typedef register_t critical_t;
/* Interrupt mask (spl, xxx_imask, etc) */
typedef __uint32_t intrmask_t;
#endif /* _MACHTYPES_H_ */

View File

@ -46,9 +46,9 @@
#if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3)
#include <machine/ansi.h>
#include <sys/_types.h>
typedef _BSD_VA_LIST_ va_list;
typedef __va_list va_list;
typedef int __builtin_va_alist_t __attribute__((__mode__(__word__)));
#define va_alist __builtin_va_alist

139
sys/amd64/include/_types.h Normal file
View File

@ -0,0 +1,139 @@
/*-
* Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* From: @(#)ansi.h 8.2 (Berkeley) 1/4/94
* From: @(#)types.h 8.3 (Berkeley) 1/5/94
* $FreeBSD$
*/
#ifndef _MACHINE__TYPES_H_
#define _MACHINE__TYPES_H_
/*
* Basic types upon which most other types are built.
*/
typedef __signed char __int8_t;
typedef unsigned char __uint8_t;
typedef short __int16_t;
typedef unsigned short __uint16_t;
typedef int __int32_t;
typedef unsigned int __uint32_t;
typedef long __int64_t;
typedef unsigned long __uint64_t;
/*
* Standard type definitions.
*/
typedef __int32_t __clock_t; /* clock()... */
typedef __int32_t __clockid_t; /* clock_gettime()... */
typedef __int64_t __critical_t;
typedef __uint32_t __fflags_t; /* file flags */
typedef __int64_t __intfptr_t;
typedef __int64_t __intmax_t;
typedef __int64_t __intptr_t;
typedef __uint32_t __intrmask_t;
typedef __int32_t __int_fast8_t;
typedef __int32_t __int_fast16_t;
typedef __int32_t __int_fast32_t;
typedef __int64_t __int_fast64_t;
typedef __int8_t __int_least8_t;
typedef __int16_t __int_least16_t;
typedef __int32_t __int_least32_t;
typedef __int64_t __int_least64_t;
typedef __int64_t __off_t; /* file offset */
typedef __int32_t __pid_t; /* process [group] */
typedef __int64_t __ptrdiff_t; /* ptr1 - ptr2 */
typedef __int64_t __register_t;
typedef __int64_t __segsz_t; /* segment size (in pages) */
typedef __uint64_t __size_t; /* sizeof() */
typedef __uint32_t __socklen_t;
typedef __int64_t __ssize_t; /* byte count or error */
typedef __int32_t __time_t; /* time()... */
typedef __int32_t __timer_t; /* timer_gettime()... */
typedef __uint64_t __uintfptr_t;
typedef __uint64_t __uintmax_t;
typedef __uint64_t __uintptr_t;
typedef __uint32_t __uint_fast8_t;
typedef __uint32_t __uint_fast16_t;
typedef __uint32_t __uint_fast32_t;
typedef __uint64_t __uint_fast64_t;
typedef __uint8_t __uint_least8_t;
typedef __uint16_t __uint_least16_t;
typedef __uint32_t __uint_least32_t;
typedef __uint64_t __uint_least64_t;
typedef __uint64_t __u_register_t;
typedef __uint64_t __vm_offset_t;
typedef __int64_t __vm_ooffset_t;
typedef __uint64_t __vm_pindex_t;
typedef __uint64_t __vm_size_t;
/*
* Unusual type definitions.
*/
/*
* The rune type above is declared to be an ``int'' instead of the more natural
* ``unsigned long'' or ``long''. Two things are happening here. It is not
* unsigned so that EOF (-1) can be naturally assigned to it and used. Also,
* it looks like 10646 will be a 31 bit standard. This means that if your
* ints cannot hold 32 bits, you will be in trouble. The reason an int was
* chosen over a long is that the is*() and to*() routines take ints (says
* ANSI C), but they use __ct_rune_t instead of int. By changing it here, you
* lose a bit of ANSI conformance, but your programs will still work.
*
* NOTE: rune_t is not covered by ANSI nor other standards, and should not
* be instantiated outside of lib/libc/locale. Use wchar_t. wchar_t and
* rune_t must be the same type. Also wint_t must be no narrower than
* wchar_t, and should also be able to hold all members of the largest
* character set plus one extra value (WEOF). wint_t must be at least 16 bits.
*/
typedef __int32_t __ct_rune_t;
typedef __int32_t __rune_t;
typedef __int32_t __wchar_t;
typedef __int32_t __wint_t;
/*
* mbstate_t is an opaque object to keep conversion state, during multibyte
* stream conversions. The content must not be referenced by user programs.
*/
typedef union {
char __mbstate8[128];
__int64_t _mbstateL; /* for alignment */
} __mbstate_t;
typedef __builtin_va_list __va_list; /* internally known to gcc */
#if defined __GNUC__ && !defined(__GNUC_VA_LIST) && !defined(__NO_GNUC_VA_LIST)
#define __GNUC_VA_LIST
typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/
#endif
#endif /* !_MACHINE__TYPES_H_ */

View File

@ -38,7 +38,7 @@
#define _MACHINE_ENDIAN_H_
#include <sys/cdefs.h>
#include <machine/ansi.h>
#include <sys/_types.h>
/*
* Define the order of 32-bit words in 64-bit words.

View File

@ -31,9 +31,9 @@
#ifndef _MACHINE_STDARG_H_
#define _MACHINE_STDARG_H_
#include <machine/ansi.h>
#include <sys/_types.h>
typedef _BSD_VA_LIST_ va_list;
typedef __va_list va_list;
#define va_start(ap, last) \
__builtin_stdarg_start((ap), (last))

View File

@ -45,9 +45,9 @@
#if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3)
#include <machine/ansi.h>
#include <sys/_types.h>
typedef _BSD_VA_LIST_ va_list;
typedef __va_list va_list;
typedef int __builtin_va_alist_t __attribute__((__mode__(__word__)));
#define va_alist __builtin_va_alist

151
sys/arm/include/_types.h Normal file
View File

@ -0,0 +1,151 @@
/*-
* Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* From: @(#)ansi.h 8.2 (Berkeley) 1/4/94
* From: @(#)types.h 8.3 (Berkeley) 1/5/94
* $FreeBSD$
*/
#ifndef _MACHINE__TYPES_H_
#define _MACHINE__TYPES_H_
/*
* Basic types upon which most other types are built.
*/
typedef __signed char __int8_t;
typedef unsigned char __uint8_t;
typedef short __int16_t;
typedef unsigned short __uint16_t;
typedef int __int32_t;
typedef unsigned int __uint32_t;
#if defined(__GNUC__)
typedef int __attribute__((__mode__(__DI__))) __int64_t;
typedef unsigned int __attribute__((__mode__(__DI__))) __uint64_t;
#else
/* LONGLONG */
typedef long long __int64_t;
/* LONGLONG */
typedef unsigned long long __uint64_t;
#endif
/*
* Standard type definitions.
*/
typedef __uint32_t __clock_t; /* clock()... */
typedef __int32_t __clockid_t; /* clock_gettime()... */
typedef __int32_t __critical_t;
typedef __uint32_t __fflags_t; /* file flags */
typedef __int32_t __intfptr_t;
typedef __int64_t __intmax_t;
typedef __int32_t __intptr_t;
typedef __uint32_t __intrmask_t;
typedef __int32_t __int_fast8_t;
typedef __int32_t __int_fast16_t;
typedef __int32_t __int_fast32_t;
typedef __int64_t __int_fast64_t;
typedef __int8_t __int_least8_t;
typedef __int16_t __int_least16_t;
typedef __int32_t __int_least32_t;
typedef __int64_t __int_least64_t;
typedef __int64_t __off_t; /* file offset */
typedef __int32_t __pid_t; /* process [group] */
typedef __int32_t __ptrdiff_t; /* ptr1 - ptr2 */
typedef __int32_t __register_t;
typedef __int32_t __segsz_t; /* segment size (in pages) */
typedef __uint32_t __size_t; /* sizeof() */
typedef __uint32_t __socklen_t;
typedef __int32_t __ssize_t; /* byte count or error */
typedef __int32_t __time_t; /* time()... */
typedef __int32_t __timer_t; /* timer_gettime()... */
typedef __uint32_t __uintfptr_t;
typedef __uint64_t __uintmax_t;
typedef __uint32_t __uintptr_t;
typedef __uint32_t __uint_fast8_t;
typedef __uint32_t __uint_fast16_t;
typedef __uint32_t __uint_fast32_t;
typedef __uint64_t __uint_fast64_t;
typedef __uint8_t __uint_least8_t;
typedef __uint16_t __uint_least16_t;
typedef __uint32_t __uint_least32_t;
typedef __uint64_t __uint_least64_t;
typedef __uint32_t __u_register_t;
typedef __uint32_t __vm_offset_t;
typedef __int64_t __vm_ooffset_t;
typedef __uint64_t __vm_pindex_t;
typedef __uint32_t __vm_size_t;
/*
* Unusual type definitions.
*/
/*
* The rune type above is declared to be an ``int'' instead of the more natural
* ``unsigned long'' or ``long''. Two things are happening here. It is not
* unsigned so that EOF (-1) can be naturally assigned to it and used. Also,
* it looks like 10646 will be a 31 bit standard. This means that if your
* ints cannot hold 32 bits, you will be in trouble. The reason an int was
* chosen over a long is that the is*() and to*() routines take ints (says
* ANSI C), but they use __ct_rune_t instead of int. By changing it here, you
* lose a bit of ANSI conformance, but your programs will still work.
*
* NOTE: rune_t is not covered by ANSI nor other standards, and should not
* be instantiated outside of lib/libc/locale. Use wchar_t. wchar_t and
* rune_t must be the same type. Also wint_t must be no narrower than
* wchar_t, and should also be able to hold all members of the largest
* character set plus one extra value (WEOF). wint_t must be at least 16 bits.
*/
typedef __int32_t __ct_rune_t;
typedef __int32_t __rune_t;
typedef __int32_t __wchar_t;
typedef __int32_t __wint_t;
/*
* mbstate_t is an opaque object to keep conversion state, during multibyte
* stream conversions. The content must not be referenced by user programs.
*/
typedef union {
char __mbstate8[128];
__int64_t _mbstateL; /* for alignment */
} __mbstate_t;
#if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3)
typedef __builtin_va_list __va_list; /* internally known to gcc */
#else
typedef char * __va_list;
#endif /* post GCC 2.95 */
#if defined __GNUC__ && !defined(__GNUC_VA_LIST) && !defined(__NO_GNUC_VA_LIST)
#define __GNUC_VA_LIST
typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/
#endif
#endif /* !_MACHINE__TYPES_H_ */

View File

@ -37,66 +37,6 @@
#ifndef _MACHINE_ANSI_H_
#define _MACHINE_ANSI_H_
/*
* Types which are fundamental to the implementation and may appear in
* more than one standard header are defined here. Standard headers
* then use:
* #ifdef _BSD_SIZE_T_
* typedef _BSD_SIZE_T_ size_t;
* #undef _BSD_SIZE_T_
* #endif
*/
#define _BSD_CLOCK_T_ unsigned long /* clock()... */
#define _BSD_CLOCKID_T_ int /* clock_gettime()... */
#define _BSD_MBSTATE_T_ __mbstate_t /* mbstate_t */
#define _BSD_PTRDIFF_T_ int /* ptr1 - ptr2 */
#define _BSD_RUNE_T_ _BSD_CT_RUNE_T_ /* rune_t (see below) */
#define _BSD_SIZE_T_ unsigned int /* sizeof() */
#define _BSD_SOCKLEN_T_ __uint32_t /* socklen_t (duh) */
#define _BSD_SSIZE_T_ int /* byte count or error */
#define _BSD_TIME_T_ int /* time()... */
#define _BSD_TIMER_T_ int /* timer_gettime()... */
#define _BSD_WCHAR_T_ _BSD_CT_RUNE_T_ /* wchar_t (see below) */
#define _BSD_WINT_T_ _BSD_CT_RUNE_T_ /* wint_t (see below) */
/*
* Types which are fundamental to the implementation and must be used
* in more than one standard header although they are only declared in
* one (perhaps nonstandard) header are defined here. Standard headers
* use _BSD_XXX_T_ without undef'ing it.
*/
#define _BSD_CT_RUNE_T_ int /* arg type for ctype funcs */
#define _BSD_OFF_T_ __int64_t /* file offset */
#define _BSD_PID_T_ int /* process [group] */
#if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3)
#define _BSD_VA_LIST_ __builtin_va_list /* internally known to gcc */
#else
#define _BSD_VA_LIST_ char * /* va_list */
#endif /* post GCC 2.95 */
#if defined __GNUC__ && !defined(__GNUC_VA_LIST) && !defined(__NO_GNUC_VA_LIST)
#define __GNUC_VA_LIST
typedef _BSD_VA_LIST_ __gnuc_va_list; /* compatibility w/GNU headers*/
#endif
/*
* The rune type above is declared to be an ``int'' instead of the more natural
* ``unsigned long'' or ``long''. Two things are happening here. It is not
* unsigned so that EOF (-1) can be naturally assigned to it and used. Also,
* it looks like 10646 will be a 31 bit standard. This means that if your
* ints cannot hold 32 bits, you will be in trouble. The reason an int was
* chosen over a long is that the is*() and to*() routines take ints (says
* ANSI C), but they use _BSD_CT_RUNE_T_ instead of int. By changing it
* here, you lose a bit of ANSI conformance, but your programs will still
* work.
*
* NOTE: rune_t is not covered by ANSI nor other standards, and should not
* be instantiated outside of lib/libc/locale. Use wchar_t. wchar_t and
* rune_t must be the same type. Also wint_t must be no narrower than
* wchar_t, and should also be able to hold all members of the largest
* character set plus one extra value (WEOF). wint_t must be at least 16 bits.
*/
/*
* Frequencies of the clock ticks reported by clock() and times(). They
* are the same as stathz for bogus historical reasons. They should be
@ -110,65 +50,4 @@ typedef _BSD_VA_LIST_ __gnuc_va_list; /* compatibility w/GNU headers*/
#define _BSD_CLK_TCK_ 100
#define _BSD_CLOCKS_PER_SEC_ 100
/*
* XXX this paragraph is very out of date.
* Typedefs for especially magic types. #define's wouldn't work in the
* __GNUC__ case, since __attribute__(()) only works in certain contexts.
* This is not in <machine/types.h>, since that has too much namespace
* pollution for inclusion in ANSI headers, yet we need __int64_t in at
* least <stdio.h>.
*/
#ifdef __GNUC__
typedef int __attribute__((__mode__(__DI__))) __int64_t;
typedef unsigned int __attribute__((__mode__(__DI__))) __uint64_t;
#else
/* LONGLONG */
typedef long long __int64_t;
/* LONGLONG */
typedef unsigned long long __uint64_t;
#endif
/*
* Internal names for basic integral types. Omit the typedef if
* not possible for a machine/compiler combination.
*/
typedef __signed char __int8_t;
typedef unsigned char __uint8_t;
typedef short __int16_t;
typedef unsigned short __uint16_t;
typedef int __int32_t;
typedef unsigned int __uint32_t;
typedef int __intptr_t;
typedef unsigned int __uintptr_t;
typedef __signed char __int_least8_t;
typedef unsigned char __uint_least8_t;
typedef short __int_least16_t;
typedef unsigned short __uint_least16_t;
typedef int __int_least32_t;
typedef unsigned int __uint_least32_t;
typedef __int64_t __int_least64_t;
typedef __uint64_t __uint_least64_t;
typedef int __int_fast8_t;
typedef unsigned int __uint_fast8_t;
typedef int __int_fast16_t;
typedef unsigned int __uint_fast16_t;
typedef int __int_fast32_t;
typedef unsigned int __uint_fast32_t;
typedef __int64_t __int_fast64_t;
typedef __uint64_t __uint_fast64_t;
typedef __int64_t __intmax_t;
typedef __uint64_t __uintmax_t;
/*
* mbstate_t is an opaque object to keep conversion state, during multibyte
* stream conversions. The content must not be referenced by user programs.
*/
typedef union {
char __mbstate8[128];
__int64_t _mbstateL; /* for alignment */
} __mbstate_t;
#endif /* _MACHINE_ANSI_H_ */
#endif /* !_MACHINE_ANSI_H_ */

View File

@ -1,59 +0,0 @@
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)types.h 8.3 (Berkeley) 1/5/94
* $FreeBSD$
*/
#ifndef _MACHINE_TYPES_H_
#define _MACHINE_TYPES_H_
typedef unsigned int vm_offset_t;
typedef __int64_t vm_ooffset_t;
typedef __uint64_t vm_pindex_t;
typedef unsigned int vm_size_t;
typedef __int32_t register_t;
typedef __uint32_t u_register_t;
#ifdef _KERNEL
typedef int intfptr_t;
typedef unsigned int uintfptr_t;
#endif
/* Critical section value */
typedef register_t critical_t;
/* Interrupt mask (spl, xxx_imask, etc) */
typedef __uint32_t intrmask_t;
#endif /* !_MACHINE_TYPES_H_ */

151
sys/i386/include/_types.h Normal file
View File

@ -0,0 +1,151 @@
/*-
* Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* From: @(#)ansi.h 8.2 (Berkeley) 1/4/94
* From: @(#)types.h 8.3 (Berkeley) 1/5/94
* $FreeBSD$
*/
#ifndef _MACHINE__TYPES_H_
#define _MACHINE__TYPES_H_
/*
* Basic types upon which most other types are built.
*/
typedef __signed char __int8_t;
typedef unsigned char __uint8_t;
typedef short __int16_t;
typedef unsigned short __uint16_t;
typedef int __int32_t;
typedef unsigned int __uint32_t;
#if defined(__GNUC__)
typedef int __attribute__((__mode__(__DI__))) __int64_t;
typedef unsigned int __attribute__((__mode__(__DI__))) __uint64_t;
#else
/* LONGLONG */
typedef long long __int64_t;
/* LONGLONG */
typedef unsigned long long __uint64_t;
#endif
/*
* Standard type definitions.
*/
typedef __uint32_t __clock_t; /* clock()... */
typedef __int32_t __clockid_t; /* clock_gettime()... */
typedef __int32_t __critical_t;
typedef __uint32_t __fflags_t; /* file flags */
typedef __int32_t __intfptr_t;
typedef __int64_t __intmax_t;
typedef __int32_t __intptr_t;
typedef __uint32_t __intrmask_t;
typedef __int32_t __int_fast8_t;
typedef __int32_t __int_fast16_t;
typedef __int32_t __int_fast32_t;
typedef __int64_t __int_fast64_t;
typedef __int8_t __int_least8_t;
typedef __int16_t __int_least16_t;
typedef __int32_t __int_least32_t;
typedef __int64_t __int_least64_t;
typedef __int64_t __off_t; /* file offset */
typedef __int32_t __pid_t; /* process [group] */
typedef __int32_t __ptrdiff_t; /* ptr1 - ptr2 */
typedef __int32_t __register_t;
typedef __int32_t __segsz_t; /* segment size (in pages) */
typedef __uint32_t __size_t; /* sizeof() */
typedef __uint32_t __socklen_t;
typedef __int32_t __ssize_t; /* byte count or error */
typedef __int32_t __time_t; /* time()... */
typedef __int32_t __timer_t; /* timer_gettime()... */
typedef __uint32_t __uintfptr_t;
typedef __uint64_t __uintmax_t;
typedef __uint32_t __uintptr_t;
typedef __uint32_t __uint_fast8_t;
typedef __uint32_t __uint_fast16_t;
typedef __uint32_t __uint_fast32_t;
typedef __uint64_t __uint_fast64_t;
typedef __uint8_t __uint_least8_t;
typedef __uint16_t __uint_least16_t;
typedef __uint32_t __uint_least32_t;
typedef __uint64_t __uint_least64_t;
typedef __uint32_t __u_register_t;
typedef __uint32_t __vm_offset_t;
typedef __int64_t __vm_ooffset_t;
typedef __uint64_t __vm_pindex_t;
typedef __uint32_t __vm_size_t;
/*
* Unusual type definitions.
*/
/*
* The rune type above is declared to be an ``int'' instead of the more natural
* ``unsigned long'' or ``long''. Two things are happening here. It is not
* unsigned so that EOF (-1) can be naturally assigned to it and used. Also,
* it looks like 10646 will be a 31 bit standard. This means that if your
* ints cannot hold 32 bits, you will be in trouble. The reason an int was
* chosen over a long is that the is*() and to*() routines take ints (says
* ANSI C), but they use __ct_rune_t instead of int. By changing it here, you
* lose a bit of ANSI conformance, but your programs will still work.
*
* NOTE: rune_t is not covered by ANSI nor other standards, and should not
* be instantiated outside of lib/libc/locale. Use wchar_t. wchar_t and
* rune_t must be the same type. Also wint_t must be no narrower than
* wchar_t, and should also be able to hold all members of the largest
* character set plus one extra value (WEOF). wint_t must be at least 16 bits.
*/
typedef __int32_t __ct_rune_t;
typedef __int32_t __rune_t;
typedef __int32_t __wchar_t;
typedef __int32_t __wint_t;
/*
* mbstate_t is an opaque object to keep conversion state, during multibyte
* stream conversions. The content must not be referenced by user programs.
*/
typedef union {
char __mbstate8[128];
__int64_t _mbstateL; /* for alignment */
} __mbstate_t;
#if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3)
typedef __builtin_va_list __va_list; /* internally known to gcc */
#else
typedef char * __va_list;
#endif /* post GCC 2.95 */
#if defined __GNUC__ && !defined(__GNUC_VA_LIST) && !defined(__NO_GNUC_VA_LIST)
#define __GNUC_VA_LIST
typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/
#endif
#endif /* !_MACHINE__TYPES_H_ */

View File

@ -37,68 +37,6 @@
#ifndef _MACHINE_ANSI_H_
#define _MACHINE_ANSI_H_
/*
* Types which are fundamental to the implementation and may appear in
* more than one standard header are defined here. Standard headers
* then use:
* #ifdef _BSD_SIZE_T_
* typedef _BSD_SIZE_T_ size_t;
* #undef _BSD_SIZE_T_
* #endif
*/
#define _BSD_CLOCK_T_ unsigned long /* clock()... */
#define _BSD_CLOCKID_T_ int /* clock_gettime()... */
#define _BSD_FFLAGS_T_ __uint_least32_t /* file flags */
#define _BSD_MBSTATE_T_ __mbstate_t /* mbstate_t */
#define _BSD_PTRDIFF_T_ int /* ptr1 - ptr2 */
#define _BSD_RUNE_T_ _BSD_CT_RUNE_T_ /* rune_t (see below) */
#define _BSD_SEGSZ_T_ __int32_t /* segment size (in pages) */
#define _BSD_SIZE_T_ unsigned int /* sizeof() */
#define _BSD_SOCKLEN_T_ __uint32_t /* socklen_t (duh) */
#define _BSD_SSIZE_T_ int /* byte count or error */
#define _BSD_TIME_T_ int /* time()... */
#define _BSD_TIMER_T_ int /* timer_gettime()... */
#define _BSD_WCHAR_T_ _BSD_CT_RUNE_T_ /* wchar_t (see below) */
#define _BSD_WINT_T_ _BSD_CT_RUNE_T_ /* wint_t (see below) */
/*
* Types which are fundamental to the implementation and must be used
* in more than one standard header although they are only declared in
* one (perhaps nonstandard) header are defined here. Standard headers
* use _BSD_XXX_T_ without undef'ing it.
*/
#define _BSD_CT_RUNE_T_ int /* arg type for ctype funcs */
#define _BSD_OFF_T_ __int64_t /* file offset */
#define _BSD_PID_T_ int /* process [group] */
#if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3)
#define _BSD_VA_LIST_ __builtin_va_list /* internally known to gcc */
#else
#define _BSD_VA_LIST_ char * /* va_list */
#endif /* post GCC 2.95 */
#if defined __GNUC__ && !defined(__GNUC_VA_LIST) && !defined(__NO_GNUC_VA_LIST)
#define __GNUC_VA_LIST
typedef _BSD_VA_LIST_ __gnuc_va_list; /* compatibility w/GNU headers*/
#endif
/*
* The rune type above is declared to be an ``int'' instead of the more natural
* ``unsigned long'' or ``long''. Two things are happening here. It is not
* unsigned so that EOF (-1) can be naturally assigned to it and used. Also,
* it looks like 10646 will be a 31 bit standard. This means that if your
* ints cannot hold 32 bits, you will be in trouble. The reason an int was
* chosen over a long is that the is*() and to*() routines take ints (says
* ANSI C), but they use _BSD_CT_RUNE_T_ instead of int. By changing it
* here, you lose a bit of ANSI conformance, but your programs will still
* work.
*
* NOTE: rune_t is not covered by ANSI nor other standards, and should not
* be instantiated outside of lib/libc/locale. Use wchar_t. wchar_t and
* rune_t must be the same type. Also wint_t must be no narrower than
* wchar_t, and should also be able to hold all members of the largest
* character set plus one extra value (WEOF). wint_t must be at least 16 bits.
*/
/*
* Frequencies of the clock ticks reported by clock() and times(). They
* are the same as stathz for bogus historical reasons. They should be
@ -112,65 +50,4 @@ typedef _BSD_VA_LIST_ __gnuc_va_list; /* compatibility w/GNU headers*/
#define _BSD_CLK_TCK_ 128
#define _BSD_CLOCKS_PER_SEC_ 128
/*
* XXX this paragraph is very out of date.
* Typedefs for especially magic types. #define's wouldn't work in the
* __GNUC__ case, since __attribute__(()) only works in certain contexts.
* This is not in <machine/types.h>, since that has too much namespace
* pollution for inclusion in ANSI headers, yet we need __int64_t in at
* least <stdio.h>.
*/
#ifdef __GNUC__
typedef int __attribute__((__mode__(__DI__))) __int64_t;
typedef unsigned int __attribute__((__mode__(__DI__))) __uint64_t;
#else
/* LONGLONG */
typedef long long __int64_t;
/* LONGLONG */
typedef unsigned long long __uint64_t;
#endif
/*
* Internal names for basic integral types. Omit the typedef if
* not possible for a machine/compiler combination.
*/
typedef __signed char __int8_t;
typedef unsigned char __uint8_t;
typedef short __int16_t;
typedef unsigned short __uint16_t;
typedef int __int32_t;
typedef unsigned int __uint32_t;
typedef int __intptr_t;
typedef unsigned int __uintptr_t;
typedef __signed char __int_least8_t;
typedef unsigned char __uint_least8_t;
typedef short __int_least16_t;
typedef unsigned short __uint_least16_t;
typedef int __int_least32_t;
typedef unsigned int __uint_least32_t;
typedef __int64_t __int_least64_t;
typedef __uint64_t __uint_least64_t;
typedef int __int_fast8_t;
typedef unsigned int __uint_fast8_t;
typedef int __int_fast16_t;
typedef unsigned int __uint_fast16_t;
typedef int __int_fast32_t;
typedef unsigned int __uint_fast32_t;
typedef __int64_t __int_fast64_t;
typedef __uint64_t __uint_fast64_t;
typedef __int64_t __intmax_t;
typedef __uint64_t __uintmax_t;
/*
* mbstate_t is an opaque object to keep conversion state, during multibyte
* stream conversions. The content must not be referenced by user programs.
*/
typedef union {
char __mbstate8[128];
__int64_t _mbstateL; /* for alignment */
} __mbstate_t;
#endif /* !_MACHINE_ANSI_H_ */

View File

@ -38,7 +38,7 @@
#define _MACHINE_ENDIAN_H_
#include <sys/cdefs.h>
#include <machine/ansi.h>
#include <sys/_types.h>
/*
* Define the order of 32-bit words in 64-bit words.

View File

@ -38,9 +38,9 @@
#ifndef _STDARG_H_
#define _STDARG_H_
#include <machine/ansi.h>
#include <sys/_types.h>
typedef _BSD_VA_LIST_ va_list;
typedef __va_list va_list;
#if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3)

View File

@ -1,59 +0,0 @@
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)types.h 8.3 (Berkeley) 1/5/94
* $FreeBSD$
*/
#ifndef _MACHINE_TYPES_H_
#define _MACHINE_TYPES_H_
typedef unsigned int vm_offset_t;
typedef __int64_t vm_ooffset_t;
typedef __uint64_t vm_pindex_t;
typedef unsigned int vm_size_t;
typedef __int32_t register_t;
typedef __uint32_t u_register_t;
#ifdef _KERNEL
typedef int intfptr_t;
typedef unsigned int uintfptr_t;
#endif
/* Critical section value */
typedef register_t critical_t;
/* Interrupt mask (spl, xxx_imask, etc) */
typedef __uint32_t intrmask_t;
#endif /* !_MACHINE_TYPES_H_ */

View File

@ -45,9 +45,9 @@
#if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3)
#include <machine/ansi.h>
#include <sys/_types.h>
typedef _BSD_VA_LIST_ va_list;
typedef __va_list va_list;
typedef int __builtin_va_alist_t __attribute__((__mode__(__word__)));
#define va_alist __builtin_va_alist

143
sys/ia64/include/_types.h Normal file
View File

@ -0,0 +1,143 @@
/*-
* Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* From: @(#)ansi.h 8.2 (Berkeley) 1/4/94
* From: @(#)types.h 8.3 (Berkeley) 1/5/94
* $FreeBSD$
*/
#ifndef _MACHINE__TYPES_H_
#define _MACHINE__TYPES_H_
/*
* Basic types upon which most other types are built.
*/
typedef __signed char __int8_t;
typedef unsigned char __uint8_t;
typedef short __int16_t;
typedef unsigned short __uint16_t;
typedef int __int32_t;
typedef unsigned int __uint32_t;
typedef long __int64_t;
typedef unsigned long __uint64_t;
/*
* Standard type definitions.
*/
typedef __int32_t __clock_t; /* clock()... */
typedef __int32_t __clockid_t; /* clock_gettime()... */
typedef __int64_t __critical_t;
typedef __uint32_t __fflags_t; /* file flags */
typedef __int64_t __intfptr_t;
typedef __int64_t __intmax_t;
typedef __int64_t __intptr_t;
typedef __uint32_t __intrmask_t;
typedef __int32_t __int_fast8_t;
typedef __int32_t __int_fast16_t;
typedef __int32_t __int_fast32_t;
typedef __int64_t __int_fast64_t;
typedef __int8_t __int_least8_t;
typedef __int16_t __int_least16_t;
typedef __int32_t __int_least32_t;
typedef __int64_t __int_least64_t;
typedef __int64_t __off_t; /* file offset */
typedef __int32_t __pid_t; /* process [group] */
typedef __int64_t __ptrdiff_t; /* ptr1 - ptr2 */
typedef __int64_t __register_t;
typedef __int64_t __segsz_t; /* segment size (in pages) */
typedef __uint64_t __size_t; /* sizeof() */
typedef __uint32_t __socklen_t;
typedef __int64_t __ssize_t; /* byte count or error */
typedef __int32_t __time_t; /* time()... */
typedef __int32_t __timer_t; /* timer_gettime()... */
typedef __uint64_t __uintfptr_t;
typedef __uint64_t __uintmax_t;
typedef __uint64_t __uintptr_t;
typedef __uint32_t __uint_fast8_t;
typedef __uint32_t __uint_fast16_t;
typedef __uint32_t __uint_fast32_t;
typedef __uint64_t __uint_fast64_t;
typedef __uint8_t __uint_least8_t;
typedef __uint16_t __uint_least16_t;
typedef __uint32_t __uint_least32_t;
typedef __uint64_t __uint_least64_t;
typedef __uint64_t __u_register_t;
typedef __uint64_t __vm_offset_t;
typedef __int64_t __vm_ooffset_t;
typedef __uint64_t __vm_pindex_t;
typedef __uint64_t __vm_size_t;
/*
* Unusual type definitions.
*/
/*
* The rune type above is declared to be an ``int'' instead of the more natural
* ``unsigned long'' or ``long''. Two things are happening here. It is not
* unsigned so that EOF (-1) can be naturally assigned to it and used. Also,
* it looks like 10646 will be a 31 bit standard. This means that if your
* ints cannot hold 32 bits, you will be in trouble. The reason an int was
* chosen over a long is that the is*() and to*() routines take ints (says
* ANSI C), but they use __ct_rune_t instead of int. By changing it here, you
* lose a bit of ANSI conformance, but your programs will still work.
*
* NOTE: rune_t is not covered by ANSI nor other standards, and should not
* be instantiated outside of lib/libc/locale. Use wchar_t. wchar_t and
* rune_t must be the same type. Also wint_t must be no narrower than
* wchar_t, and should also be able to hold all members of the largest
* character set plus one extra value (WEOF). wint_t must be at least 16 bits.
*/
typedef __int32_t __ct_rune_t;
typedef __int32_t __rune_t;
typedef __int32_t __wchar_t;
typedef __int32_t __wint_t;
/*
* mbstate_t is an opaque object to keep conversion state, during multibyte
* stream conversions. The content must not be referenced by user programs.
*/
typedef union {
char __mbstate8[128];
__int64_t _mbstateL; /* for alignment */
} __mbstate_t;
#ifdef __GNUC__
typedef __builtin_va_list __va_list; /* internally known to gcc */
#if !defined(__GNUC_VA_LIST) && !defined(__NO_GNUC_VA_LIST)
#define __GNUC_VA_LIST
typedef _BSD_VA_LIST_ __gnuc_va_list; /* compatibility w/GNU headers*/
#endif
#else
#error Must add va_list support for this non-GCC compiler.
#endif /* __GNUC__ */
#endif /* !_MACHINE__TYPES_H_ */

View File

@ -38,68 +38,6 @@
#ifndef _MACHINE_ANSI_H_
#define _MACHINE_ANSI_H_
/*
* Types which are fundamental to the implementation and may appear in
* more than one standard header are defined here. Standard headers
* then use:
* #ifdef _BSD_SIZE_T_
* typedef _BSD_SIZE_T_ size_t;
* #undef _BSD_SIZE_T_
* #endif
*/
#define _BSD_CLOCK_T_ int /* clock() */
#define _BSD_CLOCKID_T_ int /* clockid_t */
#define _BSD_FFLAGS_T_ __uint_least32_t /* file flags */
#define _BSD_MBSTATE_T_ __mbstate_t /* mbstate_t */
#define _BSD_PTRDIFF_T_ long /* ptr1 - ptr2 */
#define _BSD_RUNE_T_ _BSD_CT_RUNE_T_ /* rune_t (see below) */
#define _BSD_SEGSZ_T_ __int64_t /* segment size (in pages) */
#define _BSD_SIZE_T_ unsigned long /* sizeof() */
#define _BSD_SOCKLEN_T_ __uint32_t
#define _BSD_SSIZE_T_ long /* byte count or error */
#define _BSD_TIME_T_ int /* time() */
#define _BSD_TIMER_T_ int /* timer_t */
#define _BSD_WCHAR_T_ _BSD_CT_RUNE_T_ /* wchar_t (see below) */
#define _BSD_WINT_T_ _BSD_CT_RUNE_T_ /* wint_t (see below) */
/*
* Types which are fundamental to the implementation and must be used
* in more than one standard header although they are only declared in
* one (perhaps nonstandard) header are defined here. Standard headers
* use _BSD_XXX_T_ without undef'ing it.
*/
#define _BSD_CT_RUNE_T_ int /* arg type for ctype funcs */
#define _BSD_OFF_T_ long /* file offset */
#define _BSD_PID_T_ int /* process [group] */
#ifdef __GNUC__
#define _BSD_VA_LIST_ __builtin_va_list /* internally known to gcc */
#if !defined(__GNUC_VA_LIST) && !defined(__NO_GNUC_VA_LIST)
#define __GNUC_VA_LIST
typedef _BSD_VA_LIST_ __gnuc_va_list; /* compatibility w/GNU headers*/
#endif
#else
#error Must add va_list support for this non-GCC compiler.
#endif /*__GNUC__*/
/*
* The rune type above is declared to be an ``int'' instead of the more natural
* ``unsigned long'' or ``long''. Two things are happening here. It is not
* unsigned so that EOF (-1) can be naturally assigned to it and used. Also,
* it looks like 10646 will be a 31 bit standard. This means that if your
* ints cannot hold 32 bits, you will be in trouble. The reason an int was
* chosen over a long is that the is*() and to*() routines take ints (says
* ANSI C), but they use _BSD_CT_RUNE_T_ instead of int. By changing it
* here, you lose a bit of ANSI conformance, but your programs will still
* work.
*
* NOTE: rune_t is not covered by ANSI nor other standards, and should not
* be instantiated outside of lib/libc/locale. Use wchar_t. wchar_t and
* rune_t must be the same type. Also wint_t must be no narrower than
* wchar_t, and should also be able to hold all members of the largest
* character set plus one extra value (WEOF). wint_t must be at least 16 bits.
*/
/*
* Frequencies of the clock ticks reported by clock() and times(). They
* are the same as stathz for bogus historical reasons. They should be
@ -113,50 +51,4 @@ typedef _BSD_VA_LIST_ __gnuc_va_list; /* compatibility w/GNU headers*/
#define _BSD_CLK_TCK_ 100
#define _BSD_CLOCKS_PER_SEC_ 100
/*
* Internal names for basic integral types. Omit the typedef if
* not possible for a machine/compiler combination.
*/
typedef __signed char __int8_t;
typedef unsigned char __uint8_t;
typedef short __int16_t;
typedef unsigned short __uint16_t;
typedef int __int32_t;
typedef unsigned int __uint32_t;
typedef long __int64_t;
typedef unsigned long __uint64_t;
typedef long __intptr_t;
typedef unsigned long __uintptr_t;
typedef __signed char __int_least8_t;
typedef unsigned char __uint_least8_t;
typedef short __int_least16_t;
typedef unsigned short __uint_least16_t;
typedef int __int_least32_t;
typedef unsigned int __uint_least32_t;
typedef long __int_least64_t;
typedef unsigned long __uint_least64_t;
typedef int __int_fast8_t;
typedef unsigned int __uint_fast8_t;
typedef int __int_fast16_t;
typedef unsigned int __uint_fast16_t;
typedef int __int_fast32_t;
typedef unsigned int __uint_fast32_t;
typedef long __int_fast64_t;
typedef unsigned long __uint_fast64_t;
typedef long __intmax_t;
typedef unsigned long __uintmax_t;
/*
* mbstate_t is an opaque object to keep conversion state, during multibyte
* stream conversions. The content must not be referenced by user programs.
*/
typedef union {
char __mbstate8[128];
__int64_t _mbstateL; /* for alignment */
} __mbstate_t;
#endif /* _MACHINE_ANSI_H_ */
#endif /* !_MACHINE_ANSI_H_ */

View File

@ -39,7 +39,7 @@
#define _MACHINE_ENDIAN_H_
#include <sys/cdefs.h>
#include <machine/ansi.h>
#include <sys/_types.h>
/*
* Define the order of 32-bit words in 64-bit words.

View File

@ -38,9 +38,9 @@
#ifndef _MACHINE_STDARG_H_
#define _MACHINE_STDARG_H_
#include <machine/ansi.h>
#include <sys/_types.h>
typedef _BSD_VA_LIST_ va_list;
typedef __va_list va_list;
#if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3)

View File

@ -1,62 +0,0 @@
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)types.h 8.3 (Berkeley) 1/5/94
* $NetBSD: types.h,v 1.8 1997/04/06 08:47:45 cgd Exp $
* $FreeBSD$
*/
#ifndef _MACHTYPES_H_
#define _MACHTYPES_H_
#include <sys/cdefs.h>
typedef unsigned long vm_offset_t;
typedef long vm_ooffset_t;
typedef unsigned long vm_pindex_t;
typedef unsigned long vm_size_t;
typedef __int64_t register_t;
typedef __uint64_t u_register_t;
#ifdef _KERNEL
typedef long intfptr_t;
typedef unsigned long uintfptr_t;
#endif
/* Critical section value */
typedef register_t critical_t;
/* Interrupt mask (spl, xxx_imask, etc) */
typedef __uint64_t intrmask_t;
#endif /* _MACHTYPES_H_ */

View File

@ -43,9 +43,9 @@
#ifndef _MACHINE_VARARGS_H_
#define _MACHINE_VARARGS_H_
#include <machine/ansi.h>
#include <sys/_types.h>
typedef _BSD_VA_LIST_ va_list;
typedef __va_list va_list;
typedef int __builtin_va_alist_t __attribute__((__mode__(__word__)));
#define va_alist __builtin_va_alist

View File

@ -75,9 +75,9 @@ typedef uint16_t in_port_t;
#define _IN_PORT_T_DECLARED
#endif
#ifdef _BSD_SA_FAMILY_T_
typedef _BSD_SA_FAMILY_T_ sa_family_t;
#undef _BSD_SA_FAMILY_T_
#ifndef _SA_FAMILY_T_DECLARED
typedef __sa_family_t sa_family_t;
#define _SA_FAMILY_T_DECLARED
#endif
/* Internet address (a structure for historical reasons). */

View File

@ -616,9 +616,9 @@ void in6_sin_2_v4mapsin6_in_sock __P((struct sockaddr **nam));
extern int (*faithprefix_p)(struct in6_addr *);
#endif /* _KERNEL */
#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

View File

@ -0,0 +1,151 @@
/*-
* Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* From: @(#)ansi.h 8.2 (Berkeley) 1/4/94
* From: @(#)types.h 8.3 (Berkeley) 1/5/94
* $FreeBSD$
*/
#ifndef _MACHINE__TYPES_H_
#define _MACHINE__TYPES_H_
/*
* Basic types upon which most other types are built.
*/
typedef __signed char __int8_t;
typedef unsigned char __uint8_t;
typedef short __int16_t;
typedef unsigned short __uint16_t;
typedef int __int32_t;
typedef unsigned int __uint32_t;
/* LONGLONG */
typedef long long __int64_t;
/* LONGLONG */
typedef unsigned long long __uint64_t;
/*
* Standard type definitions.
*/
typedef __uint32_t __clock_t; /* clock()... */
typedef __int32_t __clockid_t; /* clock_gettime()... */
typedef __int32_t __critical_t;
typedef __uint32_t __fflags_t; /* file flags */
typedef __int32_t __intfptr_t;
typedef __int64_t __intmax_t;
typedef __int32_t __intptr_t;
typedef __uint32_t __intrmask_t;
typedef __int32_t __int_fast8_t;
typedef __int32_t __int_fast16_t;
typedef __int32_t __int_fast32_t;
typedef __int64_t __int_fast64_t;
typedef __int8_t __int_least8_t;
typedef __int16_t __int_least16_t;
typedef __int32_t __int_least32_t;
typedef __int64_t __int_least64_t;
typedef __int64_t __off_t; /* file offset */
typedef __int32_t __pid_t; /* process [group] */
typedef __int32_t __ptrdiff_t; /* ptr1 - ptr2 */
typedef __int32_t __register_t;
typedef __int32_t __segsz_t; /* segment size (in pages) */
typedef __uint32_t __size_t; /* sizeof() */
typedef __uint32_t __socklen_t;
typedef __int32_t __ssize_t; /* byte count or error */
typedef __int32_t __time_t; /* time()... */
typedef __int32_t __timer_t; /* timer_gettime()... */
typedef __uint32_t __uintfptr_t;
typedef __uint64_t __uintmax_t;
typedef __uint32_t __uintptr_t;
typedef __uint32_t __uint_fast8_t;
typedef __uint32_t __uint_fast16_t;
typedef __uint32_t __uint_fast32_t;
typedef __uint64_t __uint_fast64_t;
typedef __uint8_t __uint_least8_t;
typedef __uint16_t __uint_least16_t;
typedef __uint32_t __uint_least32_t;
typedef __uint64_t __uint_least64_t;
typedef __uint32_t __u_register_t;
typedef __uint32_t __vm_offset_t;
typedef __int64_t __vm_ooffset_t;
typedef __uint64_t __vm_pindex_t;
typedef __uint32_t __vm_size_t;
/*
* Unusual type definitions.
*/
/*
* The rune type above is declared to be an ``int'' instead of the more natural
* ``unsigned long'' or ``long''. Two things are happening here. It is not
* unsigned so that EOF (-1) can be naturally assigned to it and used. Also,
* it looks like 10646 will be a 31 bit standard. This means that if your
* ints cannot hold 32 bits, you will be in trouble. The reason an int was
* chosen over a long is that the is*() and to*() routines take ints (says
* ANSI C), but they use __ct_rune_t instead of int. By changing it here, you
* lose a bit of ANSI conformance, but your programs will still work.
*
* NOTE: rune_t is not covered by ANSI nor other standards, and should not
* be instantiated outside of lib/libc/locale. Use wchar_t. wchar_t and
* rune_t must be the same type. Also wint_t must be no narrower than
* wchar_t, and should also be able to hold all members of the largest
* character set plus one extra value (WEOF). wint_t must be at least 16 bits.
*/
typedef __int32_t __ct_rune_t;
typedef __int32_t __rune_t;
typedef __int32_t __wchar_t;
typedef __int32_t __wint_t;
/*
* mbstate_t is an opaque object to keep conversion state, during multibyte
* stream conversions. The content must not be referenced by user programs.
*/
typedef union {
char __mbstate8[128];
__int64_t _mbstateL; /* for alignment */
} __mbstate_t;
#if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3)
typedef __builtin_va_list __va_list; /* internally known to gcc */
#else
typedef struct {
char __gpr;
char __fpr;
char __pad[2];
char *__stack;
char *__base;
} __va_list;
#endif /* post GCC 2.95 */
#if defined __GNUC__ && !defined(__GNUC_VA_LIST) && !defined(__NO_GNUC_VA_LIST)
#define __GNUC_VA_LIST
typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/
#endif
#endif /* !_MACHINE__TYPES_H_ */

View File

@ -37,75 +37,6 @@
#ifndef _MACHINE_ANSI_H_
#define _MACHINE_ANSI_H_
/*
* Types which are fundamental to the implementation and may appear in
* more than one standard header are defined here. Standard headers
* then use:
* #ifdef _BSD_SIZE_T_
* typedef _BSD_SIZE_T_ size_t;
* #undef _BSD_SIZE_T_
* #endif
*/
#define _BSD_CLOCK_T_ int /* clock() */
#define _BSD_FFLAGS_T_ __uint_least32_t /* file flags */
#define _BSD_CLOCKID_T_ int /* clockid_t */
#define _BSD_MBSTATE_T_ __mbstate_t /* mbstate_t */
#define _BSD_PTRDIFF_T_ int /* ptr1 - ptr2 */
#define _BSD_RUNE_T_ _BSD_CT_RUNE_T_ /* rune_t (see below) */
#define _BSD_SEGSZ_T_ __int32_t /* segment size (in pages) */
#define _BSD_SIZE_T_ unsigned int /* sizeof() */
#define _BSD_SOCKLEN_T_ __uint32_t /* socklen_t (duh) */
#define _BSD_SSIZE_T_ long /* byte count or error */
#define _BSD_TIME_T_ int /* time() */
#define _BSD_TIMER_T_ int /* timer_t */
#define _BSD_WCHAR_T_ _BSD_CT_RUNE_T_ /* wchar_t (see below) */
#define _BSD_WINT_T_ _BSD_CT_RUNE_T_ /* wint_t (see below) */
/*
* Types which are fundamental to the implementation and must be used
* in more than one standard header although they are only declared in
* one (perhaps nonstandard) header are defined here. Standard headers
* use _BSD_XXX_T_ without undef'ing it.
*/
#define _BSD_CT_RUNE_T_ int /* arg type for ctype funcs */
#define _BSD_OFF_T_ __int64_t /* file offset */
#define _BSD_PID_T_ int /* process [group] */
#if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3)
#define _BSD_VA_LIST_ __builtin_va_list /* internally known to gcc */
#else
typedef struct {
char __gpr;
char __fpr;
char __pad[2];
char *__stack;
char *__base;
} __va_list;
#define _BSD_VA_LIST_ __va_list /* va_list */
#endif /* post GCC 2.95 */
#if defined __GNUC__ && !defined(__GNUC_VA_LIST) && !defined(__NO_GNUC_VA_LIST)
#define __GNUC_VA_LIST
typedef _BSD_VA_LIST_ __gnuc_va_list; /* compatibility w/GNU headers*/
#endif
/*
* The rune type above is declared to be an ``int'' instead of the more natural
* ``unsigned long'' or ``long''. Two things are happening here. It is not
* unsigned so that EOF (-1) can be naturally assigned to it and used. Also,
* it looks like 10646 will be a 31 bit standard. This means that if your
* ints cannot hold 32 bits, you will be in trouble. The reason an int was
* chosen over a long is that the is*() and to*() routines take ints (says
* ANSI C), but they use _BSD_CT_RUNE_T_ instead of int. By changing it
* here, you lose a bit of ANSI conformance, but your programs will still
* work.
*
* NOTE: rune_t is not covered by ANSI nor other standards, and should not
* be instantiated outside of lib/libc/locale. Use wchar_t. wchar_t and
* rune_t must be the same type. Also wint_t must be no narrower than
* wchar_t, and should also be able to hold all members of the largest
* character set plus one extra value (WEOF). wint_t must be at least 16 bits.
*/
/*
* Frequencies of the clock ticks reported by clock() and times(). They
* are the same as stathz for bogus historical reasons. They should be
@ -119,50 +50,4 @@ typedef _BSD_VA_LIST_ __gnuc_va_list; /* compatibility w/GNU headers*/
#define _BSD_CLK_TCK_ 100
#define _BSD_CLOCKS_PER_SEC_ 100
/*
* Internal names for basic integral types. Omit the typedef if
* not possible for a machine/compiler combination.
*/
typedef __signed char __int8_t;
typedef unsigned char __uint8_t;
typedef short __int16_t;
typedef unsigned short __uint16_t;
typedef int __int32_t;
typedef unsigned int __uint32_t;
typedef long long __int64_t;
typedef unsigned long long __uint64_t;
typedef int __intptr_t;
typedef unsigned int __uintptr_t;
typedef __signed char __int_least8_t;
typedef unsigned char __uint_least8_t;
typedef short __int_least16_t;
typedef unsigned short __uint_least16_t;
typedef int __int_least32_t;
typedef unsigned int __uint_least32_t;
typedef long long __int_least64_t;
typedef unsigned long long __uint_least64_t;
typedef int __int_fast8_t;
typedef unsigned int __uint_fast8_t;
typedef int __int_fast16_t;
typedef unsigned int __uint_fast16_t;
typedef int __int_fast32_t;
typedef unsigned int __uint_fast32_t;
typedef long long __int_fast64_t;
typedef unsigned long long __uint_fast64_t;
typedef long long __intmax_t;
typedef unsigned long long __uintmax_t;
/*
* mbstate_t is an opaque object to keep conversion state, during multibyte
* stream conversions. The content must not be referenced by user programs.
*/
typedef union {
char __mbstate8[128];
__int64_t _mbstateL; /* for alignment */
} __mbstate_t;
#endif /* _MACHINE_ANSI_H_ */
#endif /* !_MACHINE_ANSI_H_ */

View File

@ -39,7 +39,7 @@
#define _MACHINE_ENDIAN_H_
#include <sys/cdefs.h>
#include <machine/ansi.h>
#include <sys/_types.h>
/*
* Define the order of 32-bit words in 64-bit words.

View File

@ -31,9 +31,9 @@
#ifndef _POWERPC_STDARG_H_
#define _POWERPC_STDARG_H_
#include <machine/ansi.h>
#include <sys/_types.h>
typedef _BSD_VA_LIST_ va_list;
typedef __va_list va_list;
#if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3)

View File

@ -1,61 +0,0 @@
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)types.h 8.3 (Berkeley) 1/5/94
* $FreeBSD$
*/
#ifndef _MACHTYPES_H_
#define _MACHTYPES_H_
#include <sys/cdefs.h>
typedef unsigned int vm_offset_t;
typedef __int64_t vm_ooffset_t;
typedef __uint64_t vm_pindex_t;
typedef unsigned int vm_size_t;
typedef __int32_t register_t;
typedef __uint32_t u_register_t;
#ifdef _KERNEL
typedef int intfptr_t;
typedef unsigned int uintfptr_t;
#endif
/* Critical section value */
typedef register_t critical_t;
/* Interrupt mask (spl, xxx_imask, etc) */
typedef __uint32_t intrmask_t;
#endif /* _MACHTYPES_H_ */

View File

@ -33,9 +33,9 @@
#if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3)
#include <machine/ansi.h>
#include <sys/_types.h>
typedef _BSD_VA_LIST_ va_list;
typedef __va_list va_list;
typedef int __builtin_va_alist_t __attribute__((__mode__(__word__)));
#define va_alist __builtin_va_alist

View File

@ -0,0 +1,143 @@
/*-
* Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* From: @(#)ansi.h 8.2 (Berkeley) 1/4/94
* From: @(#)types.h 8.3 (Berkeley) 1/5/94
* $FreeBSD$
*/
#ifndef _MACHINE__TYPES_H_
#define _MACHINE__TYPES_H_
/*
* Basic types upon which most other types are built.
*/
typedef __signed char __int8_t;
typedef unsigned char __uint8_t;
typedef short __int16_t;
typedef unsigned short __uint16_t;
typedef int __int32_t;
typedef unsigned int __uint32_t;
typedef long __int64_t;
typedef unsigned long __uint64_t;
/*
* Standard type definitions.
*/
typedef __int32_t __clock_t; /* clock()... */
typedef __int32_t __clockid_t; /* clock_gettime()... */
typedef __int64_t __critical_t;
typedef __uint32_t __fflags_t; /* file flags */
typedef __int64_t __intfptr_t;
typedef __int64_t __intmax_t;
typedef __int64_t __intptr_t;
typedef __uint32_t __intrmask_t;
typedef __int32_t __int_fast8_t;
typedef __int32_t __int_fast16_t;
typedef __int32_t __int_fast32_t;
typedef __int64_t __int_fast64_t;
typedef __int8_t __int_least8_t;
typedef __int16_t __int_least16_t;
typedef __int32_t __int_least32_t;
typedef __int64_t __int_least64_t;
typedef __int64_t __off_t; /* file offset */
typedef __int32_t __pid_t; /* process [group] */
typedef __int64_t __ptrdiff_t; /* ptr1 - ptr2 */
typedef __int64_t __register_t;
typedef __int64_t __segsz_t; /* segment size (in pages) */
typedef __uint64_t __size_t; /* sizeof() */
typedef __uint32_t __socklen_t;
typedef __int64_t __ssize_t; /* byte count or error */
typedef __int32_t __time_t; /* time()... */
typedef __int32_t __timer_t; /* timer_gettime()... */
typedef __uint64_t __uintfptr_t;
typedef __uint64_t __uintmax_t;
typedef __uint64_t __uintptr_t;
typedef __uint32_t __uint_fast8_t;
typedef __uint32_t __uint_fast16_t;
typedef __uint32_t __uint_fast32_t;
typedef __uint64_t __uint_fast64_t;
typedef __uint8_t __uint_least8_t;
typedef __uint16_t __uint_least16_t;
typedef __uint32_t __uint_least32_t;
typedef __uint64_t __uint_least64_t;
typedef __uint64_t __u_register_t;
typedef __uint64_t __vm_offset_t;
typedef __int64_t __vm_ooffset_t;
typedef __uint64_t __vm_pindex_t;
typedef __uint64_t __vm_size_t;
/*
* Unusual type definitions.
*/
/*
* The rune type above is declared to be an ``int'' instead of the more natural
* ``unsigned long'' or ``long''. Two things are happening here. It is not
* unsigned so that EOF (-1) can be naturally assigned to it and used. Also,
* it looks like 10646 will be a 31 bit standard. This means that if your
* ints cannot hold 32 bits, you will be in trouble. The reason an int was
* chosen over a long is that the is*() and to*() routines take ints (says
* ANSI C), but they use __ct_rune_t instead of int. By changing it here, you
* lose a bit of ANSI conformance, but your programs will still work.
*
* NOTE: rune_t is not covered by ANSI nor other standards, and should not
* be instantiated outside of lib/libc/locale. Use wchar_t. wchar_t and
* rune_t must be the same type. Also wint_t must be no narrower than
* wchar_t, and should also be able to hold all members of the largest
* character set plus one extra value (WEOF). wint_t must be at least 16 bits.
*/
typedef __int32_t __ct_rune_t;
typedef __int32_t __rune_t;
typedef __int32_t __wchar_t;
typedef __int32_t __wint_t;
/*
* mbstate_t is an opaque object to keep conversion state, during multibyte
* stream conversions. The content must not be referenced by user programs.
*/
typedef union {
char __mbstate8[128];
__int64_t _mbstateL; /* for alignment */
} __mbstate_t;
#if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3)
typedef __builtin_va_list __va_list; /* internally known to gcc */
#else
typedef char * __va_list;
#endif /* post GCC 2.95 */
#if defined __GNUC__ && !defined(__GNUC_VA_LIST) && !defined(__NO_GNUC_VA_LIST)
#define __GNUC_VA_LIST
typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/
#endif
#endif /* !_MACHINE__TYPES_H_ */

View File

@ -38,68 +38,6 @@
#ifndef _MACHINE_ANSI_H_
#define _MACHINE_ANSI_H_
/*
* Types which are fundamental to the implementation and may appear in
* more than one standard header are defined here. Standard headers
* then use:
* #ifdef _BSD_SIZE_T_
* typedef _BSD_SIZE_T_ size_t;
* #undef _BSD_SIZE_T_
* #endif
*/
#define _BSD_CLOCK_T_ int /* clock() */
#define _BSD_CLOCKID_T_ int /* clock_gettime()... */
#define _BSD_FFLAGS_T_ __uint_least32_t /* file flags */
#define _BSD_MBSTATE_T_ __mbstate_t /* mbstate_t */
#define _BSD_PTRDIFF_T_ long /* ptr1 - ptr2 */
#define _BSD_RUNE_T_ _BSD_CT_RUNE_T_ /* rune_t (see below) */
#define _BSD_SEGSZ_T_ __int64_t /* segment size (in pages) */
#define _BSD_SIZE_T_ unsigned long /* sizeof() */
#define _BSD_SOCKLEN_T_ __uint32_t /* socklen_t (duh) */
#define _BSD_SSIZE_T_ long /* byte count or error */
#define _BSD_TIME_T_ int /* time()... */
#define _BSD_TIMER_T_ int /* timer_gettime()... */
#define _BSD_WCHAR_T_ _BSD_CT_RUNE_T_ /* wchar_t (see below) */
#define _BSD_WINT_T_ _BSD_CT_RUNE_T_ /* wint_t (see below) */
/*
* Types which are fundamental to the implementation and must be used
* in more than one standard header although they are only declared in
* one (perhaps nonstandard) header are defined here. Standard headers
* use _BSD_XXX_T_ without undef'ing it.
*/
#define _BSD_CT_RUNE_T_ int /* arg type for ctype funcs */
#define _BSD_OFF_T_ long /* file offset */
#define _BSD_PID_T_ int /* process [group] */
#if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3)
#define _BSD_VA_LIST_ __builtin_va_list /* internally known to gcc */
#else
#define _BSD_VA_LIST_ char * /* va_list */
#endif /* post GCC 2.95 */
#if defined __GNUC__ && !defined(__GNUC_VA_LIST) && !defined(__NO_GNUC_VA_LIST)
#define __GNUC_VA_LIST
typedef _BSD_VA_LIST_ __gnuc_va_list; /* compatibility w/GNU headers*/
#endif
/*
* The rune type above is declared to be an ``int'' instead of the more natural
* ``unsigned long'' or ``long''. Two things are happening here. It is not
* unsigned so that EOF (-1) can be naturally assigned to it and used. Also,
* it looks like 10646 will be a 31 bit standard. This means that if your
* ints cannot hold 32 bits, you will be in trouble. The reason an int was
* chosen over a long is that the is*() and to*() routines take ints (says
* ANSI C), but they use _BSD_CT_RUNE_T_ instead of int. By changing it
* here, you lose a bit of ANSI conformance, but your programs will still
* work.
*
* NOTE: rune_t is not covered by ANSI nor other standards, and should not
* be instantiated outside of lib/libc/locale. Use wchar_t. wchar_t and
* rune_t must be the same type. Also wint_t must be no narrower than
* wchar_t, and should also be able to hold all members of the largest
* character set plus one extra value (WEOF). wint_t must be at least 16 bits.
*/
/*
* Frequencies of the clock ticks reported by clock() and times(). They
* are the same as stathz for bogus historical reasons. They should be
@ -113,50 +51,4 @@ typedef _BSD_VA_LIST_ __gnuc_va_list; /* compatibility w/GNU headers*/
#define _BSD_CLK_TCK_ 100
#define _BSD_CLOCKS_PER_SEC_ 100
/*
* Internal names for basic integral types. Omit the typedef if
* not possible for a machine/compiler combination.
*/
typedef __signed char __int8_t;
typedef unsigned char __uint8_t;
typedef short __int16_t;
typedef unsigned short __uint16_t;
typedef int __int32_t;
typedef unsigned int __uint32_t;
typedef long __int64_t;
typedef unsigned long __uint64_t;
typedef long __intptr_t;
typedef unsigned long __uintptr_t;
typedef __signed char __int_least8_t;
typedef unsigned char __uint_least8_t;
typedef short __int_least16_t;
typedef unsigned short __uint_least16_t;
typedef int __int_least32_t;
typedef unsigned int __uint_least32_t;
typedef long __int_least64_t;
typedef unsigned long __uint_least64_t;
typedef int __int_fast8_t;
typedef unsigned int __uint_fast8_t;
typedef int __int_fast16_t;
typedef unsigned int __uint_fast16_t;
typedef int __int_fast32_t;
typedef unsigned int __uint_fast32_t;
typedef long __int_fast64_t;
typedef unsigned long __uint_fast64_t;
typedef long __intmax_t;
typedef unsigned long __uintmax_t;
/*
* mbstate_t is an opaque object to keep conversion state, during multibyte
* stream conversions. The content must not be referenced by user programs.
*/
typedef union {
char __mbstate8[128];
__int64_t _mbstateL; /* for alignment */
} __mbstate_t;
#endif /* !_MACHINE_ANSI_H_ */

View File

@ -38,7 +38,7 @@
#define _MACHINE_ENDIAN_H_
#include <sys/cdefs.h>
#include <machine/ansi.h>
#include <sys/_types.h>
/*
* Define the order of 32-bit words in 64-bit words.

View File

@ -41,9 +41,9 @@
#ifndef _MACHINE_STDARG_H_
#define _MACHINE_STDARG_H_
#include <machine/ansi.h>
#include <sys/_types.h>
typedef _BSD_VA_LIST_ va_list;
typedef __va_list va_list;
#if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3)

View File

@ -1,61 +0,0 @@
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)types.h 8.3 (Berkeley) 1/5/94
* $FreeBSD$
*/
#ifndef _MACHINE_TYPES_H_
#define _MACHINE_TYPES_H_
#include <sys/cdefs.h>
typedef unsigned long vm_offset_t;
typedef long vm_ooffset_t;
typedef unsigned long vm_pindex_t;
typedef unsigned long vm_size_t;
typedef __int64_t register_t;
typedef __uint64_t u_register_t;
#ifdef _KERNEL
typedef long intfptr_t;
typedef unsigned long uintfptr_t;
#endif
/* Critical section value */
typedef register_t critical_t;
/* Interrupt mask (spl, xxx_imask, etc) */
typedef __uint32_t intrmask_t;
#endif /* !_MACHINE_TYPES_H_ */

View File

@ -51,9 +51,9 @@
#if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3)
#include <machine/ansi.h>
#include <sys/_types.h>
typedef _BSD_VA_LIST_ va_list;
typedef __va_list va_list;
typedef int __builtin_va_alist_t __attribute__((__mode__(__word__)));
#define va_alist __builtin_va_alist

View File

@ -36,7 +36,7 @@
*/
/*
* Prerequisites: <sys/cdefs.h>, <machine/ansi.h>
* Prerequisites: <sys/cdefs.h>, <sys/_types.h>
*
* This file must be kept synchronized with <sys/timespec.h>.
* It defines a structure which must be a type pun for
@ -49,8 +49,8 @@
#define _SYS__TIMESPEC_H_
struct __timespec {
#ifdef _BSD_TIME_T_
_BSD_TIME_T_ __tv_sec; /* seconds, but time_t is not yet defined */
#ifndef _TIME_T_DECLARED
__time_t __tv_sec; /* seconds, but time_t is not yet defined */
#else
time_t __tv_sec; /* seconds */
#endif

View File

@ -30,12 +30,12 @@
#define _SYS__TYPES_H_
#include <sys/cdefs.h>
#include <machine/ansi.h>
#include <machine/_types.h>
#define _BSD_FSBLKCNT_T_ __uint64_t
#define _BSD_FSFILCNT_T_ __uint64_t
#define _BSD_GID_T_ __uint32_t
#define _BSD_SA_FAMILY_T_ __uint8_t
#define _BSD_UID_T_ __uint32_t
typedef __uint64_t __fsblkcnt_t;
typedef __uint64_t __fsfilcnt_t;
typedef __uint32_t __gid_t;
typedef __uint8_t __sa_family_t;
typedef __uint32_t __uid_t;
#endif /* !_SYS__TYPES_H_ */

View File

@ -37,7 +37,7 @@
#ifndef _SYS_DIRENT_H_
#define _SYS_DIRENT_H_
#include <machine/ansi.h>
#include <sys/_types.h>
/*
* The dirent structure defines the format of directory entries returned by

View File

@ -31,7 +31,7 @@
#ifndef _SYS_SBUF_H_
#define _SYS_SBUF_H_
#include <machine/ansi.h>
#include <sys/_types.h>
/*
* Structure definition
@ -63,7 +63,7 @@ int sbuf_bcpy(struct sbuf *, const char *, size_t);
int sbuf_cat(struct sbuf *, const char *);
int sbuf_cpy(struct sbuf *, const char *);
int sbuf_printf(struct sbuf *, const char *, ...) __printflike(2, 3);
int sbuf_vprintf(struct sbuf *, const char *, _BSD_VA_LIST_) __printflike(2, 0);
int sbuf_vprintf(struct sbuf *, const char *, __va_list) __printflike(2, 0);
int sbuf_putc(struct sbuf *, int);
int sbuf_trim(struct sbuf *);
int sbuf_overflowed(struct sbuf *);

View File

@ -215,9 +215,9 @@ typedef void __siginfohandler_t(int, struct __siginfo *, void *);
typedef __sighandler_t *sig_t; /* type of pointer to a signal function */
#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
/*

View File

@ -49,14 +49,14 @@
/*
* Data types.
*/
#ifdef _BSD_SA_FAMILY_T_
typedef _BSD_SA_FAMILY_T_ sa_family_t;
#undef _BSD_SA_FAMILY_T_
#ifndef _SA_FAMILY_T_DECLARED
typedef __sa_family_t sa_family_t;
#define _SA_FAMILY_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
/*

View File

@ -43,11 +43,11 @@
#define _SYS_STAT_H_
#include <sys/cdefs.h>
#include <machine/ansi.h>
#include <sys/_types.h>
#ifdef _BSD_FFLAGS_T_
typedef _BSD_FFLAGS_T_ fflags_t; /* file flags */
#undef _BSD_FFLAGS_T_
#ifndef _FFLAGS_T_DECLARED
typedef __fflags_t fflags_t; /* file flags */
#define _FFLAGS_T_DECLARED
#endif
#if !defined(_KERNEL) && !defined(_POSIX_SOURCE)

View File

@ -43,8 +43,8 @@
* a quality implementation should.)
*/
#ifndef _FSBLKCNT_T_DECLARED /* always declared together */
typedef _BSD_FSBLKCNT_T_ fsblkcnt_t;
typedef _BSD_FSFILCNT_T_ fsfilcnt_t;
typedef __fsblkcnt_t fsblkcnt_t;
typedef __fsfilcnt_t fsfilcnt_t;
#define _FSBLKCNT_T_DECLARED
#endif

View File

@ -30,8 +30,8 @@
#define _SYS_STDINT_H_
#include <sys/cdefs.h>
#include <sys/_types.h>
#include <machine/ansi.h>
#include <machine/_stdint.h>
#ifndef _INT8_T_DECLARED

View File

@ -186,17 +186,17 @@ CODE facilitynames[] = {
* 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 syslog.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 closelog(void);
void openlog(const char *, int, int);
int setlogmask(int);
void syslog(int, const char *, ...) __printflike(2, 3);
void vsyslog(int, const char *, _BSD_VA_LIST_) __printflike(2, 0);
void vsyslog(int, const char *, __va_list) __printflike(2, 0);
__END_DECLS
#endif /* !_KERNEL */

View File

@ -143,19 +143,19 @@ void init_param1(void);
void init_param2(int physpages);
void tablefull(const char *);
int kvprintf(char const *, void (*)(int, void*), void *, int,
_BSD_VA_LIST_) __printflike(1, 0);
__va_list) __printflike(1, 0);
void log(int, const char *, ...) __printflike(2, 3);
void log_console(struct uio *);
int printf(const char *, ...) __printflike(1, 2);
int snprintf(char *, size_t, const char *, ...) __printflike(3, 4);
int sprintf(char *buf, const char *, ...) __printflike(2, 3);
int uprintf(const char *, ...) __printflike(1, 2);
int vprintf(const char *, _BSD_VA_LIST_) __printflike(1, 0);
int vsnprintf(char *, size_t, const char *, _BSD_VA_LIST_) __printflike(3, 0);
int vsprintf(char *buf, const char *, _BSD_VA_LIST_) __printflike(2, 0);
int vprintf(const char *, __va_list) __printflike(1, 0);
int vsnprintf(char *, size_t, const char *, __va_list) __printflike(3, 0);
int vsprintf(char *buf, const char *, __va_list) __printflike(2, 0);
int ttyprintf(struct tty *, const char *, ...) __printflike(2, 3);
int sscanf(const char *, char const *, ...);
int vsscanf(const char *, char const *, _BSD_VA_LIST_);
int vsscanf(const char *, char const *, __va_list);
long strtol(const char *, char **, int);
u_long strtoul(const char *, char **, int);
quad_t strtoq(const char *, char **, int);

View File

@ -42,11 +42,11 @@
#ifndef _SYS_TIMES_H_
#define _SYS_TIMES_H_
#include <machine/ansi.h>
#include <sys/_types.h>
#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
struct tms {

View File

@ -36,15 +36,15 @@
*/
/*
* Prerequisites: <sys/cdefs.h>, <machine/ansi.h>
* Prerequisites: <sys/cdefs.h>, <sys/_types.h>
*/
#ifndef _SYS_TIMESPEC_H_
#define _SYS_TIMESPEC_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
struct timespec {

View File

@ -45,9 +45,7 @@
#include <sys/cdefs.h>
/* Machine type dependent parameters. */
#include <machine/ansi.h>
#include <machine/endian.h>
#include <machine/types.h>
#include <sys/_types.h>
#ifndef _POSIX_SOURCE
@ -126,36 +124,42 @@ typedef quad_t * qaddr_t;
typedef char * caddr_t; /* core address */
typedef __const char * c_caddr_t; /* core address, pointer to const */
typedef __volatile char *v_caddr_t; /* core address, pointer to volatile */
typedef __critical_t critical_t; /* Critical section value */
typedef int64_t daddr_t; /* disk address */
typedef u_int32_t fixpt_t; /* fixed point number */
#ifdef _BSD_GID_T_
typedef _BSD_GID_T_ gid_t; /* group id */
#undef _BSD_GID_T_
#ifndef _GID_T_DECLARED
typedef __gid_t gid_t; /* group id */
#define _GID_T_DECLARED
#endif
typedef u_int32_t ino_t; /* inode number */
typedef __intrmask_t intrmask_t; /* Interrupt mask (spl, xxx_imask...) */
typedef long key_t; /* IPC key (for Sys V IPC) */
typedef u_int16_t mode_t; /* permissions */
typedef u_int16_t nlink_t; /* link count */
typedef _BSD_OFF_T_ off_t; /* file offset */
typedef _BSD_PID_T_ pid_t; /* process id */
typedef __off_t off_t; /* file offset */
typedef __pid_t pid_t; /* process id */
typedef __register_t register_t;
typedef quad_t rlim_t; /* resource limit */
#ifdef _BSD_SEGSZ_T_
typedef _BSD_SEGSZ_T_ segsz_t; /* segment size (in pages) */
#undef _BSD_SEGSZ_T_
#endif
typedef __segsz_t segsz_t; /* segment size (in pages) */
typedef int32_t swblk_t; /* swap offset */
typedef __u_register_t u_register_t;
#ifdef _BSD_UID_T_
typedef _BSD_UID_T_ uid_t; /* user id */
#undef _BSD_UID_T_
#ifndef _UID_T_DECLARED
typedef __uid_t uid_t; /* user id */
#define _UID_T_DECLARED
#endif
typedef __vm_offset_t vm_offset_t;
typedef __vm_ooffset_t vm_ooffset_t;
typedef __vm_pindex_t vm_pindex_t;
typedef __vm_size_t vm_size_t;
#ifdef _KERNEL
typedef int boolean_t;
typedef __intfptr_t intfptr_t;
typedef __uintfptr_t uintfptr_t;
typedef u_int64_t uoff_t;
typedef struct vm_page *vm_page_t;
@ -186,45 +190,45 @@ typedef u_int32_t dev_t; /* device number */
#endif /* !_KERNEL */
#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_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_FFLAGS_T_
typedef _BSD_FFLAGS_T_ fflags_t; /* file flags */
#undef _BSD_FFLAGS_T_
#ifndef _FFLAGS_T_DECLARED
typedef __fflags_t fflags_t; /* file flags */
#define _FFLAGS_T_DECLARED
#endif
#ifndef _FSBLKCNT_T_DECLARED /* for statvfs() */
typedef _BSD_FSBLKCNT_T_ fsblkcnt_t;
typedef _BSD_FSFILCNT_T_ fsfilcnt_t;
#define _FSBLKCNT_T_DECLARED
typedef __fsblkcnt_t fsblkcnt_t;
typedef __fsfilcnt_t fsfilcnt_t;
#define _FSBLKCNT_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_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_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
#if __BSD_VISIBLE

View File

@ -40,9 +40,9 @@
#include <sys/cdefs.h>
#include <sys/_types.h>
#ifdef _BSD_SA_FAMILY_T_
typedef _BSD_SA_FAMILY_T_ sa_family_t;
#undef _BSD_SA_FAMILY_T_
#ifndef _SA_FAMILY_T_DECLARED
typedef __sa_family_t sa_family_t;
#define _SA_FAMILY_T_DECLARED
#endif
/*

View File

@ -76,10 +76,10 @@ extern void prompt_Printf(struct prompt *, const char *, ...)
extern void prompt_Printf(struct prompt *, const char *, ...);
#endif
#ifdef __GNUC__
extern void prompt_vPrintf(struct prompt *, const char *, _BSD_VA_LIST_)
extern void prompt_vPrintf(struct prompt *, const char *, __va_list)
__attribute__ ((format (printf, 2, 0)));
#else
extern void prompt_vPrintf(struct prompt *, const char *, _BSD_VA_LIST_);
extern void prompt_vPrintf(struct prompt *, const char *, __va_list);
#endif
#define PROMPT_DONT_WANT_INT 1
#define PROMPT_WANT_INT 0