diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2006-01-06 18:53:07 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2006-01-06 18:53:07 +0000 |
commit | 4f6f4abee953638d3409775c050227c9537c9e8c (patch) | |
tree | 38d3a984a5a051627704f25d9151930244be39c5 /include/stddef.h | |
parent | a835e97a88caf4a2d77874683640dd0e6c0225d1 (diff) |
Adapt things to use __type_t instead of _BSD_TYPE_T_
Add new sys/_types.h header
Include machine/_types.h or sys/_types.h where applicable
Diffstat (limited to 'include/stddef.h')
-rw-r--r-- | include/stddef.h | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/include/stddef.h b/include/stddef.h index 467a51edeb8..a2ec869e267 100644 --- a/include/stddef.h +++ b/include/stddef.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stddef.h,v 1.8 2005/05/11 18:44:12 espie Exp $ */ +/* $OpenBSD: stddef.h,v 1.9 2006/01/06 18:53:04 millert Exp $ */ /* $NetBSD: stddef.h,v 1.4 1994/10/26 00:56:26 cgd Exp $ */ /*- @@ -35,31 +35,33 @@ #ifndef _STDDEF_H_ #define _STDDEF_H_ -#include <machine/ansi.h> +#include <sys/cdefs.h> +#include <sys/_types.h> -typedef _BSD_PTRDIFF_T_ ptrdiff_t; +#ifndef _PTRDIFF_T_DEFINED_ +#define _PTRDIFF_T_DEFINED_ +typedef __ptrdiff_t ptrdiff_t; +#endif -#ifdef _BSD_SIZE_T_ -typedef _BSD_SIZE_T_ size_t; -#undef _BSD_SIZE_T_ +#ifndef _SIZE_T_DEFINED_ +#define _SIZE_T_DEFINED_ +typedef __size_t size_t; #endif -#ifdef _BSD_WCHAR_T_ /* in C++, wchar_t is a built-in type */ -#ifndef __cplusplus -typedef _BSD_WCHAR_T_ wchar_t; -#undef _BSD_WCHAR_T_ -#endif +#if !defined(_WCHAR_T_DEFINED_) && !defined(__cplusplus) +#define _WCHAR_T_DEFINED_ +typedef __wchar_t wchar_t; #endif -#ifdef _BSD_WINT_T_ -typedef _BSD_WINT_T_ wint_t; -#undef _BSD_WINT_T_ +#ifndef _WINT_T_DEFINED_ +#define _WINT_T_DEFINED_ +typedef __wint_t wint_t; #endif -#ifdef _BSD_MBSTATE_T_ -typedef _BSD_MBSTATE_T_ mbstate_t; -#undef _BSD_MBSTATE_T_ +#ifndef _MBSTATE_T_DEFINED_ +#define _MBSTATE_T_DEFINED_ +typedef __mbstate_t mbstate_t; #endif #ifndef NULL |