diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2005-12-14 21:46:32 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2005-12-14 21:46:32 +0000 |
commit | 3fce9befb1d4f65739adc427683f5a6357ee102f (patch) | |
tree | bda10871810ec2e3c47c06cfa6e07b88df5efe02 /sys/arch/powerpc/include | |
parent | 6ffc06fbc8f7e1d2c6134ab0d4563b6a189b983c (diff) |
convert _FOO_SOURCE -> __FOO_VISIBLE in machine. OK deraadt@
Diffstat (limited to 'sys/arch/powerpc/include')
-rw-r--r-- | sys/arch/powerpc/include/limits.h | 14 | ||||
-rw-r--r-- | sys/arch/powerpc/include/signal.h | 6 | ||||
-rw-r--r-- | sys/arch/powerpc/include/types.h | 6 | ||||
-rw-r--r-- | sys/arch/powerpc/include/va-ppc.h | 19 |
4 files changed, 25 insertions, 20 deletions
diff --git a/sys/arch/powerpc/include/limits.h b/sys/arch/powerpc/include/limits.h index 0ad3045e87f..dc7bea2f679 100644 --- a/sys/arch/powerpc/include/limits.h +++ b/sys/arch/powerpc/include/limits.h @@ -1,4 +1,4 @@ -/* $OpenBSD: limits.h,v 1.13 2002/09/15 09:01:59 deraadt Exp $ */ +/* $OpenBSD: limits.h,v 1.14 2005/12/14 21:46:31 millert Exp $ */ /* $NetBSD: limits.h,v 1.1 1996/09/30 16:34:28 ws Exp $ */ /*- @@ -35,19 +35,21 @@ #ifndef _POWERPC_LIMITS_H_ #define _POWERPC_LIMITS_H_ +#include <sys/cdefs.h> + #define MB_LEN_MAX 1 /* no multibyte characters */ -#if !defined(_ANSI_SOURCE) +#if __POSIX_VISIBLE || __XPG_VISIBLE #define SIZE_MAX UINT_MAX /* max value for a size_t */ #define SSIZE_MAX INT_MAX /* max value for a ssize_t */ +#endif -#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE) -#define SIZE_T_MAX UINT_MAX /* max value for a size_t */ +#if __BSD_VISIBLE +#define SIZE_T_MAX UINT_MAX /* max value for a size_t (historic) */ #define UQUAD_MAX 0xffffffffffffffffULL /* max unsigned quad */ #define QUAD_MAX 0x7fffffffffffffffLL /* max signed quad */ #define QUAD_MIN (-0x7fffffffffffffffLL-1) /* min signed quad */ -#endif /* !_POSIX_SOURCE && !_XOPEN_SOURCE */ -#endif /* !_ANSI_SOURCE */ +#endif /* __BSD_VISIBLE */ #endif /* _POWERPC_LIMITS_H_ */ diff --git a/sys/arch/powerpc/include/signal.h b/sys/arch/powerpc/include/signal.h index 46067127310..d25ec5e6fe6 100644 --- a/sys/arch/powerpc/include/signal.h +++ b/sys/arch/powerpc/include/signal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: signal.h,v 1.4 2001/09/01 15:49:05 drahn Exp $ */ +/* $OpenBSD: signal.h,v 1.5 2005/12/14 21:46:31 millert Exp $ */ /* $NetBSD: signal.h,v 1.1 1996/09/30 16:34:34 ws Exp $ */ /* @@ -34,8 +34,11 @@ #ifndef _POWERPC_SIGNAL_H_ #define _POWERPC_SIGNAL_H_ +#include <sys/cdefs.h> + typedef int sig_atomic_t; +#if __BSD_VISIBLE #include <machine/types.h> /* @@ -65,4 +68,5 @@ struct sigcontext { int sc_mask; /* saved signal mask */ struct trapframe sc_frame; /* saved registers */ }; +#endif /* __BSD_VISIBLE */ #endif /* _POWERPC_SIGNAL_H_ */ diff --git a/sys/arch/powerpc/include/types.h b/sys/arch/powerpc/include/types.h index cd19026ae1d..78be0235c50 100644 --- a/sys/arch/powerpc/include/types.h +++ b/sys/arch/powerpc/include/types.h @@ -1,5 +1,5 @@ /* $NetBSD: types.h,v 1.1 1996/09/30 16:34:36 ws Exp $ */ -/* $OpenBSD: types.h,v 1.15 2005/03/29 17:25:18 miod Exp $ */ +/* $OpenBSD: types.h,v 1.16 2005/12/14 21:46:31 millert Exp $ */ /*- * Copyright (C) 1995 Wolfgang Solfrank. @@ -53,6 +53,7 @@ typedef unsigned long long uint64_t; typedef u_int32_t register_t; +#if __BSD_VISIBLE typedef unsigned long vm_size_t; typedef unsigned long vm_offset_t; @@ -60,10 +61,13 @@ typedef unsigned long vaddr_t; typedef unsigned long paddr_t; typedef unsigned long vsize_t; typedef unsigned long psize_t; +#endif +#if defined(_KERNEL) typedef struct label_t { int val[25]; } label_t; +#endif #define __BROKEN_INDIRECT_CONFIG diff --git a/sys/arch/powerpc/include/va-ppc.h b/sys/arch/powerpc/include/va-ppc.h index 1da4b3dadae..028bae06382 100644 --- a/sys/arch/powerpc/include/va-ppc.h +++ b/sys/arch/powerpc/include/va-ppc.h @@ -1,6 +1,8 @@ -/* $OpenBSD: va-ppc.h,v 1.10 2002/10/24 16:59:24 drahn Exp $ */ +/* $OpenBSD: va-ppc.h,v 1.11 2005/12/14 21:46:31 millert Exp $ */ /* GNU C varargs support for the PowerPC with either the V.4 or Windows NT calling sequences */ +#include <sys/cdefs.h> + #ifndef _WIN32 /* System V.4 support */ /* Define __gnuc_va_list. */ @@ -197,17 +199,6 @@ __extension__ (*({ \ #define va_end(AP) ((void)0) /* Copy __gnuc_va_list into another variable of this type. */ -#if !defined(_ANSI_SOURCE) && \ - (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \ - defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L) -#define va_copy(dest, src) \ -__extension__ ({ \ - (dest) = \ - (struct __va_list_tag *)__builtin_alloca(sizeof(__gnuc_va_list)); \ - *(dest) = *(src);\ - }) -#endif - #define __va_copy(dest, src) \ __extension__ ({ \ (dest) = \ @@ -215,6 +206,10 @@ __extension__ ({ \ *(dest) = *(src);\ }) +#if __ISO_C_VISIBLE >= 1999 +#define va_copy(dest, src) __va_copy(dest, src) +#endif + #endif /* __VA_PPC_H__ */ #endif /* defined (_STDARG_H) || defined (_VARARGS_H) */ |