summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/alpha/include/limits.h14
-rw-r--r--sys/arch/alpha/include/signal.h8
-rw-r--r--sys/arch/alpha/include/stdarg.h7
-rw-r--r--sys/arch/alpha/include/types.h6
-rw-r--r--sys/arch/amd64/include/limits.h14
-rw-r--r--sys/arch/amd64/include/signal.h8
-rw-r--r--sys/arch/amd64/include/stdarg.h7
-rw-r--r--sys/arch/amd64/include/types.h4
-rw-r--r--sys/arch/arm/include/limits.h14
-rw-r--r--sys/arch/arm/include/signal.h11
-rw-r--r--sys/arch/arm/include/stdarg.h7
-rw-r--r--sys/arch/arm/include/types.h4
-rw-r--r--sys/arch/hppa/include/limits.h14
-rw-r--r--sys/arch/hppa/include/signal.h8
-rw-r--r--sys/arch/hppa/include/stdarg.h8
-rw-r--r--sys/arch/hppa/include/types.h8
-rw-r--r--sys/arch/hppa64/include/limits.h18
-rw-r--r--sys/arch/hppa64/include/signal.h8
-rw-r--r--sys/arch/hppa64/include/stdarg.h8
-rw-r--r--sys/arch/hppa64/include/types.h8
-rw-r--r--sys/arch/i386/include/limits.h14
-rw-r--r--sys/arch/i386/include/signal.h8
-rw-r--r--sys/arch/i386/include/stdarg.h7
-rw-r--r--sys/arch/i386/include/types.h6
-rw-r--r--sys/arch/m68k/include/limits.h14
-rw-r--r--sys/arch/m68k/include/signal.h9
-rw-r--r--sys/arch/m68k/include/stdarg.h7
-rw-r--r--sys/arch/m68k/include/types.h6
-rw-r--r--sys/arch/m88k/include/limits.h14
-rw-r--r--sys/arch/m88k/include/signal.h9
-rw-r--r--sys/arch/m88k/include/types.h4
-rw-r--r--sys/arch/m88k/include/va-m88k.h8
-rw-r--r--sys/arch/mips64/include/limits.h30
-rw-r--r--sys/arch/mips64/include/signal.h9
-rw-r--r--sys/arch/mips64/include/stdarg.h5
-rw-r--r--sys/arch/mips64/include/types.h6
-rw-r--r--sys/arch/powerpc/include/limits.h14
-rw-r--r--sys/arch/powerpc/include/signal.h6
-rw-r--r--sys/arch/powerpc/include/types.h6
-rw-r--r--sys/arch/powerpc/include/va-ppc.h19
-rw-r--r--sys/arch/sparc/include/limits.h14
-rw-r--r--sys/arch/sparc/include/signal.h8
-rw-r--r--sys/arch/sparc/include/stdarg.h6
-rw-r--r--sys/arch/sparc/include/types.h6
-rw-r--r--sys/arch/sparc64/include/limits.h14
-rw-r--r--sys/arch/sparc64/include/signal.h15
-rw-r--r--sys/arch/sparc64/include/stdarg.h7
-rw-r--r--sys/arch/sparc64/include/types.h6
-rw-r--r--sys/arch/vax/include/limits.h14
-rw-r--r--sys/arch/vax/include/signal.h8
-rw-r--r--sys/arch/vax/include/stdarg.h7
-rw-r--r--sys/arch/vax/include/types.h4
-rw-r--r--sys/sys/systm.h4
53 files changed, 279 insertions, 219 deletions
diff --git a/sys/arch/alpha/include/limits.h b/sys/arch/alpha/include/limits.h
index 332bcb88c1c..710a0e0a087 100644
--- a/sys/arch/alpha/include/limits.h
+++ b/sys/arch/alpha/include/limits.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: limits.h,v 1.10 2003/06/02 23:27:43 millert Exp $ */
+/* $OpenBSD: limits.h,v 1.11 2005/12/14 21:46:29 millert Exp $ */
/* $NetBSD: limits.h,v 1.2 1996/04/12 01:38:25 cgd Exp $ */
/*
@@ -35,21 +35,23 @@
#ifndef _MACHINE_LIMITS_H_
#define _MACHINE_LIMITS_H_
+#include <sys/cdefs.h>
+
#define MB_LEN_MAX 6 /* Allow 31 bit UTF2 */
-#if !defined(_ANSI_SOURCE)
+#if __POSIX_VISIBLE || __XPG_VISIBLE
#define SIZE_MAX ULONG_MAX /* max value for a size_t */
#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */
+#endif
-#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
-#define SIZE_T_MAX ULONG_MAX /* max value for a size_t */
+#if __BSD_VISIBLE
+#define SIZE_T_MAX ULONG_MAX /* max value for a size_t (historic) */
/* Quads and longs are the same on the alpha */
#define UQUAD_MAX (ULONG_MAX) /* max value for a uquad_t */
#define QUAD_MAX (LONG_MAX) /* max value for a quad_t */
#define QUAD_MIN (LONG_MIN) /* min value for a quad_t */
-#endif /* !_POSIX_SOURCE && !_XOPEN_SOURCE */
-#endif /* !_ANSI_SOURCE */
+#endif /* __BSD_VISIBLE */
#endif /* _MACHINE_LIMITS_H_ */
diff --git a/sys/arch/alpha/include/signal.h b/sys/arch/alpha/include/signal.h
index 8df58e92099..b5c3acaa837 100644
--- a/sys/arch/alpha/include/signal.h
+++ b/sys/arch/alpha/include/signal.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: signal.h,v 1.3 1996/10/30 22:39:29 niklas Exp $ */
+/* $OpenBSD: signal.h,v 1.4 2005/12/14 21:46:30 millert Exp $ */
/* $NetBSD: signal.h,v 1.2 1995/02/16 03:08:08 cgd Exp $ */
/*
@@ -31,9 +31,11 @@
#ifndef _ALPHA_SIGNAL_H_
#define _ALPHA_SIGNAL_H_
+#include <sys/cdefs.h>
+
typedef long sig_atomic_t;
-#ifndef _ANSI_SOURCE
+#if __BSD_VISIBLE
/*
* Information pushed on stack when a signal is delivered.
* This is used by the kernel to restore state following
@@ -59,5 +61,5 @@ struct sigcontext {
long sc_xxx[8]; /* XXX */
};
-#endif /* !_ANSI_SOURCE */
+#endif /* __BSD_VISIBLE */
#endif /* !_ALPHA_SIGNAL_H_*/
diff --git a/sys/arch/alpha/include/stdarg.h b/sys/arch/alpha/include/stdarg.h
index 92fa852c129..34191823c5a 100644
--- a/sys/arch/alpha/include/stdarg.h
+++ b/sys/arch/alpha/include/stdarg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdarg.h,v 1.6 2003/06/02 23:27:43 millert Exp $ */
+/* $OpenBSD: stdarg.h,v 1.7 2005/12/14 21:46:30 millert Exp $ */
/* $NetBSD: stdarg.h,v 1.4 1996/10/09 21:13:05 cgd Exp $ */
/*-
@@ -35,6 +35,7 @@
#ifndef _ALPHA_STDARG_H_
#define _ALPHA_STDARG_H_
+#include <sys/cdefs.h>
#include <machine/ansi.h>
typedef _BSD_VA_LIST_ va_list;
@@ -54,9 +55,7 @@ typedef _BSD_VA_LIST_ va_list;
(*(type *)((ap).offset += __va_size(type), \
(ap).base + (ap).offset + __va_arg_offset(ap, type)))
-#if !defined(_ANSI_SOURCE) && \
- (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
- defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
+#if __ISO_C_VISIBLE >= 1999
#define va_copy(dest, src) \
((dest) = (src))
#endif
diff --git a/sys/arch/alpha/include/types.h b/sys/arch/alpha/include/types.h
index 4d199673f2e..1dc17772230 100644
--- a/sys/arch/alpha/include/types.h
+++ b/sys/arch/alpha/include/types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: types.h,v 1.15 2004/11/26 21:23:03 miod Exp $ */
+/* $OpenBSD: types.h,v 1.16 2005/12/14 21:46:30 millert Exp $ */
/* $NetBSD: types.h,v 1.6 1996/12/05 00:13:47 cgd Exp $ */
/*-
@@ -37,12 +37,13 @@
#include <sys/cdefs.h>
-#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
+#if defined(_KERNEL)
typedef struct label_t {
long val[10];
} label_t;
#endif
+#if __BSD_VISIBLE
typedef unsigned long vm_offset_t;
typedef unsigned long vm_size_t;
@@ -50,6 +51,7 @@ typedef unsigned long vaddr_t;
typedef unsigned long paddr_t;
typedef unsigned long vsize_t;
typedef unsigned long psize_t;
+#endif
/*
* Basic integral types. Omit the typedef if
diff --git a/sys/arch/amd64/include/limits.h b/sys/arch/amd64/include/limits.h
index 6b1fbc21471..3fe15889606 100644
--- a/sys/arch/amd64/include/limits.h
+++ b/sys/arch/amd64/include/limits.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: limits.h,v 1.2 2005/12/13 00:18:19 jsg Exp $ */
+/* $OpenBSD: limits.h,v 1.3 2005/12/14 21:46:30 millert Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
@@ -34,20 +34,22 @@
#ifndef _MACHINE_LIMITS_H_
#define _MACHINE_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 ULONG_MAX /* max value for a size_t */
#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */
+#endif
-#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
-#define SIZE_T_MAX ULONG_MAX /* max value for a size_t */
+#if __BSD_VISIBLE
+#define SIZE_T_MAX ULONG_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_C_SOURCE && !_XOPEN_SOURCE */
-#endif /* !_ANSI_SOURCE */
+#endif /* __BSD_VISIBLE */
#endif /* _MACHINE_LIMITS_H_ */
diff --git a/sys/arch/amd64/include/signal.h b/sys/arch/amd64/include/signal.h
index dbd94581ca2..868633c7ed3 100644
--- a/sys/arch/amd64/include/signal.h
+++ b/sys/arch/amd64/include/signal.h
@@ -1,3 +1,4 @@
+/* $OpenBSD: signal.h,v 1.4 2005/12/14 21:46:30 millert Exp $ */
/* $NetBSD: signal.h,v 1.2 2003/04/28 23:16:17 bjh21 Exp $ */
/*
@@ -34,9 +35,11 @@
#ifndef _AMD64_SIGNAL_H_
#define _AMD64_SIGNAL_H_
+#include <sys/cdefs.h>
+
typedef int sig_atomic_t;
-#ifndef _ANSI_SOURCE
+#if __BSD_VISIBLE
#include <machine/trap.h>
/*
@@ -80,6 +83,5 @@ struct sigcontext {
int sc_mask;
};
-#endif /* !_ANSI_SOURCE */
+#endif /* __BSD_VISIBLE */
#endif /* !_AMD64_SIGNAL_H_ */
-
diff --git a/sys/arch/amd64/include/stdarg.h b/sys/arch/amd64/include/stdarg.h
index dcd0938e07a..370b624166f 100644
--- a/sys/arch/amd64/include/stdarg.h
+++ b/sys/arch/amd64/include/stdarg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdarg.h,v 1.2 2005/12/13 00:18:19 jsg Exp $ */
+/* $OpenBSD: stdarg.h,v 1.3 2005/12/14 21:46:30 millert Exp $ */
/* $NetBSD: stdarg.h,v 1.2 2003/04/28 23:16:17 bjh21 Exp $ */
/*-
@@ -35,6 +35,7 @@
#ifndef _AMD64_STDARG_H_
#define _AMD64_STDARG_H_
+#include <sys/cdefs.h>
#include <machine/ansi.h>
typedef _BSD_VA_LIST_ va_list;
@@ -44,9 +45,7 @@ typedef _BSD_VA_LIST_ va_list;
#define va_end(ap) __builtin_va_end(ap)
#define __va_copy(dest, src) __builtin_va_copy((dest), (src))
-#if !defined(_ANSI_SOURCE) && \
- (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
- defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
+#if __ISO_C_VISIBLE >= 1999
#define va_copy(dest, src) __va_copy((dest), (src))
#endif
diff --git a/sys/arch/amd64/include/types.h b/sys/arch/amd64/include/types.h
index a8b529f3fa7..68bb521d2b8 100644
--- a/sys/arch/amd64/include/types.h
+++ b/sys/arch/amd64/include/types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: types.h,v 1.8 2005/12/13 00:18:19 jsg Exp $ */
+/* $OpenBSD: types.h,v 1.9 2005/12/14 21:46:30 millert Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -42,10 +42,12 @@ typedef struct label_t {
} label_t;
#endif
+#if __BSD_VISIBLE
typedef unsigned long paddr_t;
typedef unsigned long psize_t;
typedef unsigned long vaddr_t;
typedef unsigned long vsize_t;
+#endif
#define __BIT_TYPES_DEFINED__
typedef __signed char int8_t;
diff --git a/sys/arch/arm/include/limits.h b/sys/arch/arm/include/limits.h
index 44c99876b4f..3479577b598 100644
--- a/sys/arch/arm/include/limits.h
+++ b/sys/arch/arm/include/limits.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: limits.h,v 1.1 2004/02/01 05:09:49 drahn Exp $ */
+/* $OpenBSD: limits.h,v 1.2 2005/12/14 21:46:30 millert Exp $ */
/* $NetBSD: limits.h,v 1.4 2003/04/28 23:16:18 bjh21 Exp $ */
/*
@@ -35,20 +35,22 @@
#ifndef _ARM32_LIMITS_H_
#define _ARM32_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 /* _ARM32_LIMITS_H_ */
diff --git a/sys/arch/arm/include/signal.h b/sys/arch/arm/include/signal.h
index d0d5122166d..121b03d4120 100644
--- a/sys/arch/arm/include/signal.h
+++ b/sys/arch/arm/include/signal.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: signal.h,v 1.1 2004/02/01 05:09:49 drahn Exp $ */
+/* $OpenBSD: signal.h,v 1.2 2005/12/14 21:46:30 millert Exp $ */
/* $NetBSD: signal.h,v 1.5 2003/10/18 17:57:21 briggs Exp $ */
/*
@@ -47,13 +47,15 @@
#ifndef _ARM32_SIGNAL_H_
#define _ARM32_SIGNAL_H_
+#include <sys/cdefs.h>
+
#ifndef _LOCORE
typedef int sig_atomic_t;
#endif
#define __HAVE_SIGINFO
-
+#if __BSD_VISIBLE
#ifndef _LOCORE
/*
* Information pushed on stack when a signal is delivered.
@@ -129,6 +131,5 @@ struct sigcontext {
#define SIG_CODE_SEGV_ADDR_MASK SIG_CODE_BUS_ADDR_MASK
#define SIG_CODE_SEGV_TYPE_MASK SIG_CODE_BUS_TYPE_MASK
-#endif /* !_ARM_SIGNAL_H_ */
-
-/* End of signal.h */
+#endif /* __BSD_VISIBLE */
+#endif /* !_ARM32_SIGNAL_H_ */
diff --git a/sys/arch/arm/include/stdarg.h b/sys/arch/arm/include/stdarg.h
index 4203558ad70..4af3e313bb8 100644
--- a/sys/arch/arm/include/stdarg.h
+++ b/sys/arch/arm/include/stdarg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdarg.h,v 1.3 2005/11/24 20:49:44 deraadt Exp $ */
+/* $OpenBSD: stdarg.h,v 1.4 2005/12/14 21:46:30 millert Exp $ */
/* $NetBSD: stdarg.h,v 1.7 2003/08/07 16:26:53 agc Exp $ */
/*
@@ -35,6 +35,7 @@
#ifndef _ARM32_STDARG_H_
#define _ARM32_STDARG_H_
+#include <sys/cdefs.h>
#include <machine/ansi.h>
typedef _BSD_VA_LIST_ va_list;
@@ -51,9 +52,7 @@ typedef _BSD_VA_LIST_ va_list;
#define va_end __builtin_va_end
#define __va_copy(dest, src) __builtin_va_copy((dest), (src))
-#if !defined(_ANSI_SOURCE) && \
- (defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
- defined(_NETBSD_SOURCE))
+#if __ISO_C_VISIBLE >= 1999
#define va_copy(dest, src) __va_copy((dest), (src))
#endif
diff --git a/sys/arch/arm/include/types.h b/sys/arch/arm/include/types.h
index 38fb6218272..d4d1cb614ee 100644
--- a/sys/arch/arm/include/types.h
+++ b/sys/arch/arm/include/types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: types.h,v 1.3 2004/11/26 21:23:04 miod Exp $ */
+/* $OpenBSD: types.h,v 1.4 2005/12/14 21:46:30 millert Exp $ */
/* $NetBSD: types.h,v 1.4 2002/02/28 03:17:25 simonb Exp $ */
/*
@@ -53,7 +53,7 @@ typedef struct label_t { /* Used by setjmp & longjmp */
#endif
/* NB: This should probably be if defined(_KERNEL) */
-#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
+#if __BSD_VISIBLE
typedef unsigned long vm_offset_t;
typedef unsigned long vm_size_t;
diff --git a/sys/arch/hppa/include/limits.h b/sys/arch/hppa/include/limits.h
index d5ee2bca41d..eda7db85dd6 100644
--- a/sys/arch/hppa/include/limits.h
+++ b/sys/arch/hppa/include/limits.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: limits.h,v 1.9 2004/10/05 18:43:42 mickey Exp $ */
+/* $OpenBSD: limits.h,v 1.10 2005/12/14 21:46:30 millert Exp $ */
/*
* Copyright (c) 1988, 1993
@@ -34,14 +34,17 @@
#ifndef _MACHINE_LIMITS_H_
#define _MACHINE_LIMITS_H_
+#include <sys/cdefs.h>
+
#define MB_LEN_MAX 6 /* Allow 31 bit UTF2 */
-#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)
-#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) */
/* GCC requires that quad constants be written as expressions. */
#define UQUAD_MAX ((u_quad_t)0-1) /* max value for a uquad_t */
@@ -49,7 +52,6 @@
#define QUAD_MAX ((quad_t)(UQUAD_MAX >> 1))
#define QUAD_MIN (-QUAD_MAX-1) /* min value for a quad_t */
-#endif /* !_POSIX_SOURCE */
-#endif /* !_ANSI_SOURCE */
+#endif /* __BSD_VISIBLE */
#endif /* _MACHINE_LIMITS_H_ */
diff --git a/sys/arch/hppa/include/signal.h b/sys/arch/hppa/include/signal.h
index 887457fc799..3e659cdc6d6 100644
--- a/sys/arch/hppa/include/signal.h
+++ b/sys/arch/hppa/include/signal.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: signal.h,v 1.5 2004/04/03 01:03:11 mickey Exp $ */
+/* $OpenBSD: signal.h,v 1.6 2005/12/14 21:46:30 millert Exp $ */
/*
* Copyright (c) 1994, The University of Utah and
@@ -26,13 +26,15 @@
#ifndef _HPPA_SIGNAL_H_
#define _HPPA_SIGNAL_H_
+#include <sys/cdefs.h>
+
/*
* Machine-dependent signal definitions
*/
typedef int sig_atomic_t;
-#ifndef _ANSI_SOURCE
+#if __BSD_VISIBLE
#include <machine/trap.h>
/*
@@ -53,5 +55,5 @@ struct sigcontext {
unsigned sc_regs[32];
unsigned sc_fpregs[64];
};
-#endif /* !_ANSI_SOURCE */
+#endif /* __BSD_VISIBLE */
#endif /* !_HPPA_SIGNAL_H_ */
diff --git a/sys/arch/hppa/include/stdarg.h b/sys/arch/hppa/include/stdarg.h
index b2c8abba5b9..bbe69721372 100644
--- a/sys/arch/hppa/include/stdarg.h
+++ b/sys/arch/hppa/include/stdarg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdarg.h,v 1.4 2003/06/02 23:27:46 millert Exp $ */
+/* $OpenBSD: stdarg.h,v 1.5 2005/12/14 21:46:30 millert Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -34,6 +34,8 @@
#ifndef _MACHINE_STDARG_H_
#define _MACHINE_STDARG_H_
+#include <sys/cdefs.h>
+
typedef double *va_list;
#ifdef __GNUC__
@@ -50,9 +52,7 @@ typedef double *va_list;
(sizeof(type) > 4 ? ~0x7 : ~0x3))),\
(*((type *) (void *) ((char *)ap + ((8 - sizeof(type)) % 4))))))
-#if !defined(_ANSI_SOURCE) && \
- (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
- defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
+#if __ISO_C_VISIBLE >= 1999
#define va_copy(dest, src) \
((dest) = (src))
#endif
diff --git a/sys/arch/hppa/include/types.h b/sys/arch/hppa/include/types.h
index 7f5eb5ba8aa..194b781a770 100644
--- a/sys/arch/hppa/include/types.h
+++ b/sys/arch/hppa/include/types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: types.h,v 1.11 2004/11/26 21:23:05 miod Exp $ */
+/* $OpenBSD: types.h,v 1.12 2005/12/14 21:46:30 millert Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -34,7 +34,9 @@
#ifndef _MACHINE_TYPES_H_
#define _MACHINE_TYPES_H_
-#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
+#include <sys/cdefs.h>
+
+#if defined(_KERNEL)
typedef struct label_t {
int lbl_rp;
int lbl_sp;
@@ -42,7 +44,9 @@ typedef struct label_t {
int lbl_ss[1];
double lbl_sf[10]; /* hp800:fr12-fr15, hp700:fr12-fr21 */
} label_t;
+#endif
+#if __BSD_VISIBLE
typedef unsigned long hppa_hpa_t;
typedef unsigned long hppa_spa_t;
typedef unsigned int pa_space_t;
diff --git a/sys/arch/hppa64/include/limits.h b/sys/arch/hppa64/include/limits.h
index bc4736a98e1..b9e88daa4ae 100644
--- a/sys/arch/hppa64/include/limits.h
+++ b/sys/arch/hppa64/include/limits.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: limits.h,v 1.1 2005/04/01 10:40:48 mickey Exp $ */
+/* $OpenBSD: limits.h,v 1.2 2005/12/14 21:46:30 millert Exp $ */
/*
* Copyright (c) 1988, 1993
@@ -34,14 +34,17 @@
#ifndef _MACHINE_LIMITS_H_
#define _MACHINE_LIMITS_H_
+#include <sys/cdefs.h>
+
#define MB_LEN_MAX 32 /* Allow 31 bit UTF2 */
-#if !defined(_ANSI_SOURCE)
-#define SIZE_MAX ULONG_MAX /* max value for a size_t */
-#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */
+#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)
-#define SIZE_T_MAX ULONG_MAX /* max value for a size_t */
+#if __BSD_VISIBLE
+#define SIZE_T_MAX UINT_MAX /* max value for a size_t (historic) */
/* GCC requires that quad constants be written as expressions. */
#define UQUAD_MAX ((u_quad_t)0-1) /* max value for a uquad_t */
@@ -49,7 +52,6 @@
#define QUAD_MAX ((quad_t)(UQUAD_MAX >> 1))
#define QUAD_MIN (-QUAD_MAX-1) /* min value for a quad_t */
-#endif /* !_POSIX_SOURCE */
-#endif /* !_ANSI_SOURCE */
+#endif /* __BSD_VISIBLE */
#endif /* _MACHINE_LIMITS_H_ */
diff --git a/sys/arch/hppa64/include/signal.h b/sys/arch/hppa64/include/signal.h
index c09fcd73ea1..7d382945c97 100644
--- a/sys/arch/hppa64/include/signal.h
+++ b/sys/arch/hppa64/include/signal.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: signal.h,v 1.1 2005/04/01 10:40:48 mickey Exp $ */
+/* $OpenBSD: signal.h,v 1.2 2005/12/14 21:46:30 millert Exp $ */
/*
* Copyright (c) 1994, The University of Utah and
@@ -26,13 +26,15 @@
#ifndef _HPPA64_SIGNAL_H_
#define _HPPA64_SIGNAL_H_
+#include <sys/cdefs.h>
+
/*
* Machine-dependent signal definitions
*/
typedef int sig_atomic_t;
-#ifndef _ANSI_SOURCE
+#if __BSD_VISIBLE
#include <machine/trap.h>
/*
@@ -53,5 +55,5 @@ struct sigcontext {
unsigned long sc_regs[32];
unsigned long sc_fpregs[64];
};
-#endif /* !_ANSI_SOURCE */
+#endif /* __BSD_VISIBLE */
#endif /* !_HPPA64_SIGNAL_H_ */
diff --git a/sys/arch/hppa64/include/stdarg.h b/sys/arch/hppa64/include/stdarg.h
index 5d0e1a203d9..bd488cba729 100644
--- a/sys/arch/hppa64/include/stdarg.h
+++ b/sys/arch/hppa64/include/stdarg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdarg.h,v 1.1 2005/04/01 10:40:48 mickey Exp $ */
+/* $OpenBSD: stdarg.h,v 1.2 2005/12/14 21:46:30 millert Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -34,6 +34,8 @@
#ifndef _MACHINE_STDARG_H_
#define _MACHINE_STDARG_H_
+#include <sys/cdefs.h>
+
typedef double *va_list;
#ifdef __GNUC__
@@ -50,9 +52,7 @@ typedef double *va_list;
(sizeof(type) > 4 ? ~0x7 : ~0x3))),\
(*((type *) (void *) ((char *)ap + ((8 - sizeof(type)) % 4))))))
-#if !defined(_ANSI_SOURCE) && \
- (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
- defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
+#if __ISO_C_VISIBLE >= 1999
#define va_copy(dest, src) \
((dest) = (src))
#endif
diff --git a/sys/arch/hppa64/include/types.h b/sys/arch/hppa64/include/types.h
index b098db4f83c..0fd1f814a8f 100644
--- a/sys/arch/hppa64/include/types.h
+++ b/sys/arch/hppa64/include/types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: types.h,v 1.1 2005/04/01 10:40:48 mickey Exp $ */
+/* $OpenBSD: types.h,v 1.2 2005/12/14 21:46:30 millert Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -34,7 +34,9 @@
#ifndef _MACHINE_TYPES_H_
#define _MACHINE_TYPES_H_
-#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
+#include <sys/cdefs.h>
+
+#if defined(_KERNEL)
typedef struct label_t {
int lbl_rp;
int lbl_sp;
@@ -42,7 +44,9 @@ typedef struct label_t {
int lbl_ss[1];
double lbl_sf[10]; /* hp800:fr12-fr15, hp700:fr12-fr21 */
} label_t;
+#endif
+#if __BSD_VISIBLE
typedef unsigned long hppa_hpa_t;
typedef unsigned long hppa_spa_t;
typedef unsigned int pa_space_t;
diff --git a/sys/arch/i386/include/limits.h b/sys/arch/i386/include/limits.h
index ba28ec5d05d..9915dfd884c 100644
--- a/sys/arch/i386/include/limits.h
+++ b/sys/arch/i386/include/limits.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: limits.h,v 1.9 2003/06/02 23:27:47 millert Exp $ */
+/* $OpenBSD: limits.h,v 1.10 2005/12/14 21:46:30 millert Exp $ */
/* $NetBSD: limits.h,v 1.11 1995/12/21 01:08:59 mycroft Exp $ */
/*
@@ -35,20 +35,22 @@
#ifndef _MACHINE_LIMITS_H_
#define _MACHINE_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 /* _MACHINE_LIMITS_H_ */
diff --git a/sys/arch/i386/include/signal.h b/sys/arch/i386/include/signal.h
index e76b5574f07..d8443d8c091 100644
--- a/sys/arch/i386/include/signal.h
+++ b/sys/arch/i386/include/signal.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: signal.h,v 1.4 2003/06/02 23:27:47 millert Exp $ */
+/* $OpenBSD: signal.h,v 1.5 2005/12/14 21:46:30 millert Exp $ */
/* $NetBSD: signal.h,v 1.6 1996/01/08 13:51:43 mycroft Exp $ */
/*
@@ -35,9 +35,11 @@
#ifndef _I386_SIGNAL_H_
#define _I386_SIGNAL_H_
+#include <sys/cdefs.h>
+
typedef int sig_atomic_t;
-#ifndef _ANSI_SOURCE
+#if __BSD_VISIBLE
/*
* Get the "code" values
*/
@@ -81,5 +83,5 @@ struct sigcontext {
#define sc_pc sc_eip
#define sc_ps sc_eflags
-#endif /* !_ANSI_SOURCE */
+#endif /* __BSD_VISIBLE */
#endif /* !_I386_SIGNAL_H_ */
diff --git a/sys/arch/i386/include/stdarg.h b/sys/arch/i386/include/stdarg.h
index 4c51b5768bd..c3e66cbb59a 100644
--- a/sys/arch/i386/include/stdarg.h
+++ b/sys/arch/i386/include/stdarg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdarg.h,v 1.6 2003/06/02 23:27:47 millert Exp $ */
+/* $OpenBSD: stdarg.h,v 1.7 2005/12/14 21:46:30 millert Exp $ */
/* $NetBSD: stdarg.h,v 1.12 1995/12/25 23:15:31 mycroft Exp $ */
/*-
@@ -35,6 +35,7 @@
#ifndef _I386_STDARG_H_
#define _I386_STDARG_H_
+#include <sys/cdefs.h>
#include <machine/ansi.h>
typedef _BSD_VA_LIST_ va_list;
@@ -53,9 +54,7 @@ typedef _BSD_VA_LIST_ va_list;
#define va_arg(ap, type) \
(*(type *)((ap) += __va_size(type), (ap) - __va_size(type)))
-#if !defined(_ANSI_SOURCE) && \
- (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
- defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
+#if __ISO_C_VISIBLE >= 1999
#define va_copy(dest, src) \
((dest) = (src))
#endif
diff --git a/sys/arch/i386/include/types.h b/sys/arch/i386/include/types.h
index 05449d122b8..dca5257b991 100644
--- a/sys/arch/i386/include/types.h
+++ b/sys/arch/i386/include/types.h
@@ -1,5 +1,5 @@
/* $NetBSD: types.h,v 1.12 1995/12/24 01:08:03 mycroft Exp $ */
-/* $OpenBSD: types.h,v 1.18 2004/11/26 21:23:05 miod Exp $ */
+/* $OpenBSD: types.h,v 1.19 2005/12/14 21:46:30 millert Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -37,16 +37,18 @@
#include <sys/cdefs.h>
-#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
+#if defined(_KERNEL)
typedef struct label_t {
int val[6];
} label_t;
#endif
+#if __BSD_VISIBLE
typedef unsigned long vaddr_t;
typedef unsigned long paddr_t;
typedef unsigned long vsize_t;
typedef unsigned long psize_t;
+#endif
/*
* Basic integral types. Omit the typedef if
diff --git a/sys/arch/m68k/include/limits.h b/sys/arch/m68k/include/limits.h
index e269db30f40..21c555ff2b6 100644
--- a/sys/arch/m68k/include/limits.h
+++ b/sys/arch/m68k/include/limits.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: limits.h,v 1.7 2003/06/02 23:27:48 millert Exp $ */
+/* $OpenBSD: limits.h,v 1.8 2005/12/14 21:46:31 millert Exp $ */
/* $NetBSD: limits.h,v 1.9 1994/10/26 07:50:48 cgd Exp $ */
/*
@@ -34,17 +34,19 @@
#define MB_LEN_MAX 1 /* no multibyte characters */
-#if !defined(_ANSI_SOURCE)
+#include <sys/cdefs.h>
+
+#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 */
diff --git a/sys/arch/m68k/include/signal.h b/sys/arch/m68k/include/signal.h
index 158efa5af5d..feb2c72aa68 100644
--- a/sys/arch/m68k/include/signal.h
+++ b/sys/arch/m68k/include/signal.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: signal.h,v 1.3 2003/06/02 23:27:48 millert Exp $ */
+/* $OpenBSD: signal.h,v 1.4 2005/12/14 21:46:31 millert Exp $ */
/* $NetBSD: signal.h,v 1.4 1995/01/10 19:01:31 jtc Exp $ */
/*
@@ -35,9 +35,11 @@
#ifndef _M68K_SIGNAL_H_
#define _M68K_SIGNAL_H_
+#include <sys/cdefs.h>
+
typedef int sig_atomic_t;
-#ifndef _ANSI_SOURCE
+#if __BSD_VISIBLE
/*
* Get the "code" values
*/
@@ -59,6 +61,5 @@ struct sigcontext {
int sc_pc; /* pc to restore */
int sc_ps; /* psl to restore */
};
-
-#endif /* !_ANSI_SOURCE */
+#endif /* __BSD_VISIBLE */
#endif /* !_M68K_SIGNAL_H_ */
diff --git a/sys/arch/m68k/include/stdarg.h b/sys/arch/m68k/include/stdarg.h
index 2ce90b1d71c..d4db7b594e8 100644
--- a/sys/arch/m68k/include/stdarg.h
+++ b/sys/arch/m68k/include/stdarg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdarg.h,v 1.6 2003/06/02 23:27:48 millert Exp $ */
+/* $OpenBSD: stdarg.h,v 1.7 2005/12/14 21:46:31 millert Exp $ */
/* $NetBSD: stdarg.h,v 1.14 1995/12/25 23:15:33 mycroft Exp $ */
/*-
@@ -35,6 +35,7 @@
#ifndef _M68K_STDARG_H_
#define _M68K_STDARG_H_
+#include <sys/cdefs.h>
#include <machine/ansi.h>
typedef _BSD_VA_LIST_ va_list;
@@ -56,9 +57,7 @@ typedef _BSD_VA_LIST_ va_list;
sizeof(type) != __va_size(type) ? \
sizeof(type) : __va_size(type))))
-#if !defined(_ANSI_SOURCE) && \
- (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
- defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
+#if __ISO_C_VISIBLE >= 1999
#define va_copy(dest, src) \
((dest) = (src))
#endif
diff --git a/sys/arch/m68k/include/types.h b/sys/arch/m68k/include/types.h
index bbbbc8a25f3..fb3cde01f21 100644
--- a/sys/arch/m68k/include/types.h
+++ b/sys/arch/m68k/include/types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: types.h,v 1.10 2003/06/02 23:27:48 millert Exp $ */
+/* $OpenBSD: types.h,v 1.11 2005/12/14 21:46:31 millert Exp $ */
/* $NetBSD: types.h,v 1.9 1995/07/06 03:39:38 cgd Exp $ */
/*-
@@ -36,12 +36,13 @@
#include <sys/cdefs.h>
-#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
+#if defined(_KERNEL)
typedef struct label_t { /* consistent with HP-UX */
int val[15];
} label_t;
#endif
+#if __BSD_VISIBLE
typedef unsigned long vm_offset_t;
typedef unsigned long vm_size_t;
@@ -49,6 +50,7 @@ typedef unsigned long vaddr_t;
typedef unsigned long paddr_t;
typedef unsigned long vsize_t;
typedef unsigned long psize_t;
+#endif
/*
* Basic integral types. Omit the typedef if
diff --git a/sys/arch/m88k/include/limits.h b/sys/arch/m88k/include/limits.h
index df91cc22906..d2eaa31dfaf 100644
--- a/sys/arch/m88k/include/limits.h
+++ b/sys/arch/m88k/include/limits.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: limits.h,v 1.1 2004/04/26 12:34:05 miod Exp $ */
+/* $OpenBSD: limits.h,v 1.2 2005/12/14 21:46:31 millert Exp $ */
/*
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
@@ -33,21 +33,23 @@
#ifndef _MACHINE_LIMITS_H_
#define _MACHINE_LIMITS_H_
+#include <sys/cdefs.h>
+
#define MB_LEN_MAX 6 /* Allow 31 bit UTF2 */
-#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)
-#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) */
/* GCC requires that quad constants be written as expressions. */
#define UQUAD_MAX ((u_quad_t)0-1) /* max value for a uquad_t */
/* max value for a quad_t */
#define QUAD_MAX ((quad_t)(UQUAD_MAX >> 1))
#define QUAD_MIN (-QUAD_MAX-1) /* min value for a quad_t */
-#endif /* !_POSIX_SOURCE */
-#endif /* !_ANSI_SOURCE */
+#endif /* __BSD_VISIBLE */
#endif /* _MACHINE_LIMITS_H_ */
diff --git a/sys/arch/m88k/include/signal.h b/sys/arch/m88k/include/signal.h
index 8531f7f05f6..d0d5217e960 100644
--- a/sys/arch/m88k/include/signal.h
+++ b/sys/arch/m88k/include/signal.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: signal.h,v 1.1 2004/04/26 12:34:05 miod Exp $ */
+/* $OpenBSD: signal.h,v 1.2 2005/12/14 21:46:31 millert Exp $ */
/*
* Copyright (c) 1996 Nivas Madhur
* All rights reserved.
@@ -33,10 +33,13 @@
#ifndef __MACHINE_SIGNAL_H__
#define __MACHINE_SIGNAL_H__
-#include <machine/reg.h>
+#include <sys/cdefs.h>
typedef int sig_atomic_t;
+#if __BSD_VISIBLE
+#include <machine/reg.h>
+
/*
* Information pushed on stack when a signal is delivered.
* This is used by the kernel to restore state following
@@ -52,5 +55,5 @@ struct sigcontext {
/* begin machine dependent portion */
struct reg sc_regs;
};
-
+#endif /* __BSD_VISIBLE */
#endif /* __MACHINE_SIGNAL_H__ */
diff --git a/sys/arch/m88k/include/types.h b/sys/arch/m88k/include/types.h
index 30527858837..aff64b459dc 100644
--- a/sys/arch/m88k/include/types.h
+++ b/sys/arch/m88k/include/types.h
@@ -1,5 +1,5 @@
/* $NetBSD: types.h,v 1.7 1995/07/05 17:46:11 pk Exp $ */
-/* $OpenBSD: types.h,v 1.5 2005/12/03 19:01:14 miod Exp $ */
+/* $OpenBSD: types.h,v 1.6 2005/12/14 21:46:31 millert Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -52,10 +52,12 @@ typedef struct label_t {
} label_t;
#endif
+#if __BSD_VISIBLE
typedef unsigned long vaddr_t;
typedef unsigned long paddr_t;
typedef unsigned long vsize_t;
typedef unsigned long psize_t;
+#endif
/*
* Basic integral types. Omit the typedef if
diff --git a/sys/arch/m88k/include/va-m88k.h b/sys/arch/m88k/include/va-m88k.h
index ae4493e7f13..1d908ed1b7b 100644
--- a/sys/arch/m88k/include/va-m88k.h
+++ b/sys/arch/m88k/include/va-m88k.h
@@ -1,10 +1,12 @@
-/* $OpenBSD: va-m88k.h,v 1.5 2004/07/28 08:47:12 miod Exp $ */
+/* $OpenBSD: va-m88k.h,v 1.6 2005/12/14 21:46:31 millert Exp $ */
/* Define __gnuc_va_list. */
#ifndef __GNUC_VA_LIST
#define __GNUC_VA_LIST
+#include <sys/cdefs.h>
+
typedef struct __va_list_tag {
unsigned int __va_arg; /* argument number */
unsigned int *__va_stk; /* start of args passed on stack */
@@ -84,9 +86,7 @@ __extension__ ({ \
*(dest) = *(src);\
})
-#if !defined(_ANSI_SOURCE) && \
- (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
- defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
+#if __ISO_VISIBLE >= 1999
#define va_copy(dest, src) __va_copy(dest, src)
#endif
diff --git a/sys/arch/mips64/include/limits.h b/sys/arch/mips64/include/limits.h
index 5564a841993..c240c41d71b 100644
--- a/sys/arch/mips64/include/limits.h
+++ b/sys/arch/mips64/include/limits.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: limits.h,v 1.2 2005/08/07 07:29:44 miod Exp $ */
+/* $OpenBSD: limits.h,v 1.3 2005/12/14 21:46:31 millert Exp $ */
/*
* Copyright (c) 1988, 1993
@@ -34,6 +34,8 @@
#ifndef _MIPS_LIMITS_H_
#define _MIPS_LIMITS_H_
+#include <sys/cdefs.h>
+
#define CHAR_BIT 8 /* number of bits in a char */
#define MB_LEN_MAX 6 /* Allow 31 bit UTF2 */
@@ -62,15 +64,16 @@
#define INT_MAX 0x7fffffff /* max value for an int */
#define INT_MIN (-0x7fffffff-1) /* min value for an int */
-#if !defined(_ANSI_SOURCE)
+#define UID_MAX UINT_MAX /* max value for a uid_t */
+#define GID_MAX UINT_MAX /* max value for a gid_t */
+
+#if __POSIX_VISIBLE || __XPG_VISIBLE
#define SIZE_MAX ULONG_MAX /* max value for a size_t */
#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */
+#endif
-#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
-#define SIZE_T_MAX ULONG_MAX /* max value for a size_t */
-
-#define UID_MAX UINT_MAX /* max value for a uid_t */
-#define GID_MAX UINT_MAX /* max value for a gid_t */
+#if __BSD_VISIBLE
+#define SIZE_T_MAX ULONG_MAX /* max value for a size_t (historic) */
/* GCC requires that quad constants be written as expressions. */
#define UQUAD_MAX ((u_quad_t)0-1) /* max value for a uquad_t */
@@ -78,17 +81,6 @@
#define QUAD_MAX ((quad_t)(UQUAD_MAX >> 1))
#define QUAD_MIN (-QUAD_MAX-1) /* min value for a quad_t */
-#endif /* !_POSIX_SOURCE && !_XOPEN_SOURCE */
-#endif /* !_ANSI_SOURCE */
-
-#if (!defined(_ANSI_SOURCE)&&!defined(_POSIX_SOURCE)) || defined(_XOPEN_SOURCE)
-#define DBL_DIG 15
-#define DBL_MAX 1.797693134862316E+308
-#define DBL_MIN 2.225073858507201E-308
-
-#define FLT_DIG 6
-#define FLT_MAX 3.40282347E+38F
-#define FLT_MIN 1.17549435E-38F
-#endif
+#endif /* __BSD_VISIBLE */
#endif /* !_MIPS_LIMITS_H_ */
diff --git a/sys/arch/mips64/include/signal.h b/sys/arch/mips64/include/signal.h
index 4e2319f5de5..613772567f1 100644
--- a/sys/arch/mips64/include/signal.h
+++ b/sys/arch/mips64/include/signal.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: signal.h,v 1.5 2005/11/29 02:26:49 deraadt Exp $ */
+/* $OpenBSD: signal.h,v 1.6 2005/12/14 21:46:31 millert Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -37,6 +37,8 @@
#ifndef _MIPS_SIGNAL_H_
#define _MIPS_SIGNAL_H_
+#include <sys/cdefs.h>
+
#if !defined(__LANGUAGE_ASSEMBLY)
#include <sys/types.h>
@@ -45,8 +47,7 @@
*/
typedef int sig_atomic_t;
-#ifndef _ANSI_SOURCE
-
+#if __BSD_VISIBLE
/*
* Information pushed on stack when a signal is delivered.
* This is used by the kernel to restore state following
@@ -66,7 +67,7 @@ struct sigcontext {
long sc_fpc_eir; /* floating point exception instruction reg */
long xxx[8]; /* XXX reserved */
};
-#endif /* !_ANSI_SOURCE */
+#endif /* __BSD_VISIBLE */
#else /* __LANGUAGE_ASSEMBLY */
#define SC_ONSTACK (0 * REGSZ)
diff --git a/sys/arch/mips64/include/stdarg.h b/sys/arch/mips64/include/stdarg.h
index b721da144cc..1a4c0f18978 100644
--- a/sys/arch/mips64/include/stdarg.h
+++ b/sys/arch/mips64/include/stdarg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdarg.h,v 1.2 2005/08/07 07:29:44 miod Exp $ */
+/* $OpenBSD: stdarg.h,v 1.3 2005/12/14 21:46:31 millert Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -34,6 +34,7 @@
#ifndef _MIPS_STDARG_H_
#define _MIPS_STDARG_H_
+#include <sys/cdefs.h>
#include <machine/ansi.h>
typedef _BSD_VA_LIST_ va_list;
@@ -242,6 +243,8 @@ void va_end (__gnuc_va_list); /* Defined in libgcc.a */
/* Copy __gnuc_va_list into another variable of this type. */
#define __va_copy(dest, src) (dest) = (src)
+#if __ISO_C_VISIBLE >= 1999
#define va_copy __va_copy
+#endif
#endif /* !_MIPS_STDARG_H_ */
diff --git a/sys/arch/mips64/include/types.h b/sys/arch/mips64/include/types.h
index 31c1d839e49..7f81b5dbc2d 100644
--- a/sys/arch/mips64/include/types.h
+++ b/sys/arch/mips64/include/types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: types.h,v 1.7 2005/08/07 07:29:44 miod Exp $ */
+/* $OpenBSD: types.h,v 1.8 2005/12/14 21:46:31 millert Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -47,10 +47,12 @@
#include <sys/cdefs.h>
+#if __BSD_VISIBLE
typedef unsigned long vaddr_t;
typedef unsigned long paddr_t;
typedef unsigned long vsize_t;
typedef unsigned long psize_t;
+#endif
/*
* Basic integral types. Omit the typedef if
@@ -81,7 +83,7 @@ typedef int32_t register_t;
typedef int32_t f_register_t;
#endif
-#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
+#if defined(_KERNEL)
typedef struct label_t {
register_t val[14];
} label_t;
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) */
diff --git a/sys/arch/sparc/include/limits.h b/sys/arch/sparc/include/limits.h
index 1b015fb0589..4ab9296fb2b 100644
--- a/sys/arch/sparc/include/limits.h
+++ b/sys/arch/sparc/include/limits.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: limits.h,v 1.9 2003/06/02 23:27:54 millert Exp $ */
+/* $OpenBSD: limits.h,v 1.10 2005/12/14 21:46:31 millert Exp $ */
/* $NetBSD: limits.h,v 1.7 1996/01/05 18:10:57 pk Exp $ */
/*
@@ -34,12 +34,15 @@
#define MB_LEN_MAX 1 /* no multibyte characters */
-#if !defined(_ANSI_SOURCE)
+#include <sys/cdefs.h>
+
+#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) */
/* GCC requires that quad constants be written as expressions. */
#define UQUAD_MAX ((u_quad_t)0-1) /* max value for a uquad_t */
@@ -47,6 +50,5 @@
#define QUAD_MAX ((quad_t)(UQUAD_MAX >> 1))
#define QUAD_MIN (-QUAD_MAX-1) /* min value for a quad_t */
-#endif /* !_POSIX_SOURCE && !_XOPEN_SOURCE */
-#endif /* !_ANSI_SOURCE */
+#endif /* __BSD_VISIBLE */
diff --git a/sys/arch/sparc/include/signal.h b/sys/arch/sparc/include/signal.h
index 21078210493..22939c87553 100644
--- a/sys/arch/sparc/include/signal.h
+++ b/sys/arch/sparc/include/signal.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: signal.h,v 1.4 2003/06/02 23:27:54 millert Exp $ */
+/* $OpenBSD: signal.h,v 1.5 2005/12/14 21:46:31 millert Exp $ */
/* $NetBSD: signal.h,v 1.4 1996/02/01 22:32:35 mycroft Exp $ */
/*
@@ -44,11 +44,13 @@
#ifndef _SPARC_SIGNAL_H_
#define _SPARC_SIGNAL_H_
+#include <sys/cdefs.h>
+
#ifndef _LOCORE
typedef int sig_atomic_t;
#endif
-#ifndef _ANSI_SOURCE
+#if __BSD_VISIBLE
#ifndef _LOCORE
/*
@@ -93,5 +95,5 @@ struct sigcontext {
#define FPE_FLTOPERR_TRAP 0xd0 /* operand error */
#define FPE_FLTOVF_TRAP 0xd4 /* overflow */
-#endif /* !_ANSI_SOURCE */
+#endif /* __BSD_VISIBLE */
#endif /* !_SPARC_SIGNAL_H_ */
diff --git a/sys/arch/sparc/include/stdarg.h b/sys/arch/sparc/include/stdarg.h
index 69777779726..110ad7593dc 100644
--- a/sys/arch/sparc/include/stdarg.h
+++ b/sys/arch/sparc/include/stdarg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdarg.h,v 1.7 2005/12/14 18:28:40 millert Exp $ */
+/* $OpenBSD: stdarg.h,v 1.8 2005/12/14 21:46:31 millert Exp $ */
/* $NetBSD: stdarg.h,v 1.10 1996/12/27 20:55:28 pk Exp $ */
/*
@@ -99,9 +99,7 @@ typedef _BSD_VA_LIST_ va_list;
*__va_arg(ap, type *) : __va_size(type) == 8 ? \
__va_8byte(ap, type) : __va_arg(ap, type))
-#if !defined(_ANSI_SOURCE) && \
- (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
- defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
+#if __BSD_VISIBLE >= 1999
#define va_copy(dest, src) \
((dest) = (src))
#endif
diff --git a/sys/arch/sparc/include/types.h b/sys/arch/sparc/include/types.h
index 4b69daefe1e..dbd26ff06b8 100644
--- a/sys/arch/sparc/include/types.h
+++ b/sys/arch/sparc/include/types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: types.h,v 1.16 2004/11/26 21:23:05 miod Exp $ */
+/* $OpenBSD: types.h,v 1.17 2005/12/14 21:46:31 millert Exp $ */
/* $NetBSD: types.h,v 1.11 1996/12/10 23:19:38 pk Exp $ */
/*
@@ -46,16 +46,18 @@
#include <sys/cdefs.h>
-#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
+#if defined(_KERNEL)
typedef struct label_t {
int val[2];
} label_t;
#endif
+#if __BSD_VISIBLE
typedef unsigned long vaddr_t;
typedef unsigned long paddr_t;
typedef unsigned long vsize_t;
typedef unsigned long psize_t;
+#endif
/*
* Basic integral types. Omit the typedef if
diff --git a/sys/arch/sparc64/include/limits.h b/sys/arch/sparc64/include/limits.h
index 1d608265066..7020923f411 100644
--- a/sys/arch/sparc64/include/limits.h
+++ b/sys/arch/sparc64/include/limits.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: limits.h,v 1.7 2003/06/15 04:35:54 brad Exp $ */
+/* $OpenBSD: limits.h,v 1.8 2005/12/14 21:46:31 millert Exp $ */
/* $NetBSD: limits.h,v 1.8 2000/08/08 22:31:14 tshiozak Exp $ */
/*
@@ -35,14 +35,17 @@
#ifndef _MACHINE_LIMITS_H_
#define _MACHINE_LIMITS_H_
+#include <sys/cdefs.h>
+
#define MB_LEN_MAX 32 /* no multibyte characters */
-#if !defined(_ANSI_SOURCE)
+#if __POSIX_VISIBLE || __XPG_VISIBLE
#define SIZE_MAX ULONG_MAX /* max value for a size_t */
#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */
+#endif
-#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
-#define SIZE_T_MAX ULONG_MAX /* max value for a size_t */
+#if __BSD_VISIBLE
+#define SIZE_T_MAX ULONG_MAX /* max value for a size_t (historic) */
/* GCC requires that quad constants be written as expressions. */
#define UQUAD_MAX ((u_quad_t)0-1) /* max value for a uquad_t */
@@ -50,7 +53,6 @@
#define QUAD_MAX ((quad_t)(UQUAD_MAX >> 1))
#define QUAD_MIN (-QUAD_MAX-1) /* min value for a quad_t */
-#endif /* !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
-#endif /* !_ANSI_SOURCE */
+#endif /* __BSD_VISIBLE */
#endif /* _MACHINE_LIMITS_H_ */
diff --git a/sys/arch/sparc64/include/signal.h b/sys/arch/sparc64/include/signal.h
index f72c8509952..ddab3c9d73e 100644
--- a/sys/arch/sparc64/include/signal.h
+++ b/sys/arch/sparc64/include/signal.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: signal.h,v 1.5 2003/06/02 23:27:56 millert Exp $ */
+/* $OpenBSD: signal.h,v 1.6 2005/12/14 21:46:31 millert Exp $ */
/* $NetBSD: signal.h,v 1.10 2001/05/09 19:50:49 kleink Exp $ */
/*
@@ -41,15 +41,16 @@
* @(#)signal.h 8.1 (Berkeley) 6/11/93
*/
-#ifndef _SPARC_SIGNAL_H_
-#define _SPARC_SIGNAL_H_
+#ifndef _SPARC64_SIGNAL_H_
+#define _SPARC64_SIGNAL_H_
+
+#include <sys/cdefs.h>
#ifndef _LOCORE
typedef int sig_atomic_t;
#endif
-#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
- !defined(_XOPEN_SOURCE)
+#if __BSD_VISIBLE
#ifndef _LOCORE
/*
@@ -88,5 +89,5 @@ struct sigcontext {
#define FPE_FLTOPERR_TRAP 0xd0 /* operand error */
#define FPE_FLTOVF_TRAP 0xd4 /* overflow */
-#endif /* !_ANSI_SOURCE && !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
-#endif /* !_SPARC_SIGNAL_H_ */
+#endif /* __BSD_VISIBLE */
+#endif /* !_SPARC64_SIGNAL_H_ */
diff --git a/sys/arch/sparc64/include/stdarg.h b/sys/arch/sparc64/include/stdarg.h
index 3687adbdbc5..58e56a19799 100644
--- a/sys/arch/sparc64/include/stdarg.h
+++ b/sys/arch/sparc64/include/stdarg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdarg.h,v 1.3 2003/06/02 23:27:56 millert Exp $ */
+/* $OpenBSD: stdarg.h,v 1.4 2005/12/14 21:46:31 millert Exp $ */
/* $NetBSD: stdarg.h,v 1.11 2000/07/23 21:36:56 mycroft Exp $ */
/*
@@ -44,6 +44,7 @@
#ifndef _SPARC64_STDARG_H_
#define _SPARC64_STDARG_H_
+#include <sys/cdefs.h>
#include <machine/ansi.h>
#ifdef __lint__
@@ -57,9 +58,7 @@ typedef _BSD_VA_LIST_ va_list;
#define va_start(ap, last) \
(__builtin_next_arg(last), (ap) = (va_list)__builtin_saveregs())
-#if !defined(_ANSI_SOURCE) && \
- (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
- defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
+#if __BSD_VISIBLE
#define va_copy(dest, src) \
((dest) = (src))
#endif
diff --git a/sys/arch/sparc64/include/types.h b/sys/arch/sparc64/include/types.h
index 9952385e6b4..9096d3c27bd 100644
--- a/sys/arch/sparc64/include/types.h
+++ b/sys/arch/sparc64/include/types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: types.h,v 1.9 2004/11/26 21:23:06 miod Exp $ */
+/* $OpenBSD: types.h,v 1.10 2005/12/14 21:46:31 millert Exp $ */
/* $NetBSD: types.h,v 1.17 2001/05/12 22:42:07 kleink Exp $ */
/*
@@ -47,7 +47,7 @@
#include <sys/cdefs.h>
#include <machine/int_types.h>
-#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
+#if defined(_KERNEL)
typedef struct label_t {
int val[2];
} label_t;
@@ -58,7 +58,7 @@ typedef unsigned long int register_t;
typedef unsigned int register32_t;
typedef unsigned long int register64_t;
-#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
+#if __BSD_VISIBLE
typedef unsigned long int vaddr_t;
typedef vaddr_t vsize_t;
typedef unsigned long int paddr_t;
diff --git a/sys/arch/vax/include/limits.h b/sys/arch/vax/include/limits.h
index 9abebfc755f..3c6342d283c 100644
--- a/sys/arch/vax/include/limits.h
+++ b/sys/arch/vax/include/limits.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: limits.h,v 1.11 2003/06/02 23:27:57 millert Exp $ */
+/* $OpenBSD: limits.h,v 1.12 2005/12/14 21:46:31 millert Exp $ */
/* $NetBSD: limits.h,v 1.9 2000/03/07 19:33:01 kleink Exp $ */
/*
@@ -35,20 +35,22 @@
#ifndef _MACHINE_LIMITS_H_
#define _MACHINE_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 /* _MACHINE_LIMITS_H_ */
diff --git a/sys/arch/vax/include/signal.h b/sys/arch/vax/include/signal.h
index d3a7f35d7ee..9e668b79021 100644
--- a/sys/arch/vax/include/signal.h
+++ b/sys/arch/vax/include/signal.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: signal.h,v 1.3 2003/06/02 23:27:57 millert Exp $ */
+/* $OpenBSD: signal.h,v 1.4 2005/12/14 21:46:31 millert Exp $ */
/* $NetBSD: signal.h,v 1.4 1995/01/10 19:01:52 jtc Exp $ */
/*
@@ -37,9 +37,11 @@
#ifndef _VAX_SIGNAL_H_
#define _VAX_SIGNAL_H_
+#include <sys/cdefs.h>
+
typedef int sig_atomic_t;
-#ifndef _ANSI_SOURCE
+#if __BSD_VISIBLE
/*
* Information pushed on stack when a signal is delivered.
* This is used by the kernel to restore state following
@@ -57,5 +59,5 @@ struct sigcontext {
int sc_ps; /* psl to restore */
};
-#endif /* !_ANSI_SOURCE */
+#endif /* __BSD_VISIBLE */
#endif /* !_VAX_SIGNAL_H_ */
diff --git a/sys/arch/vax/include/stdarg.h b/sys/arch/vax/include/stdarg.h
index d77db2fba36..2ebf9dc7f26 100644
--- a/sys/arch/vax/include/stdarg.h
+++ b/sys/arch/vax/include/stdarg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdarg.h,v 1.6 2003/06/02 23:27:57 millert Exp $ */
+/* $OpenBSD: stdarg.h,v 1.7 2005/12/14 21:46:31 millert Exp $ */
/* $NetBSD: stdarg.h,v 1.11 1999/05/03 16:30:34 christos Exp $ */
/*-
@@ -35,6 +35,7 @@
#ifndef _VAX_STDARG_H_
#define _VAX_STDARG_H_
+#include <sys/cdefs.h>
#include <machine/ansi.h>
typedef _BSD_VA_LIST_ va_list;
@@ -52,9 +53,7 @@ typedef _BSD_VA_LIST_ va_list;
#define va_arg(ap, type) \
(*(type *)(void *)((ap) += __va_size(type), (ap) - __va_size(type)))
-#if !defined(_ANSI_SOURCE) && \
- (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
- defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L)
+#if __BSD_VISIBLE
#define va_copy(dest, src) \
((dest) = (src))
#endif
diff --git a/sys/arch/vax/include/types.h b/sys/arch/vax/include/types.h
index c6c9d65e4b7..f6dc8d29f5b 100644
--- a/sys/arch/vax/include/types.h
+++ b/sys/arch/vax/include/types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: types.h,v 1.15 2005/11/06 22:21:30 miod Exp $ */
+/* $OpenBSD: types.h,v 1.16 2005/12/14 21:46:31 millert Exp $ */
/* $NetBSD: types.h,v 1.14 1998/08/13 02:10:49 eeh Exp $ */
/*-
@@ -43,10 +43,12 @@ typedef struct label_t {
} label_t;
#endif
+#if __BSD_VISIBLE
typedef unsigned long paddr_t;
typedef unsigned long psize_t;
typedef unsigned long vaddr_t;
typedef unsigned long vsize_t;
+#endif
/*
* Basic integral types. Omit the typedef if
diff --git a/sys/sys/systm.h b/sys/sys/systm.h
index 8213ddaac14..ece8e8e2004 100644
--- a/sys/sys/systm.h
+++ b/sys/sys/systm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: systm.h,v 1.66 2005/01/14 04:31:33 djm Exp $ */
+/* $OpenBSD: systm.h,v 1.67 2005/12/14 21:46:31 millert Exp $ */
/* $NetBSD: systm.h,v 1.50 1996/06/09 04:55:09 briggs Exp $ */
/*-
@@ -287,8 +287,10 @@ void dopowerhooks(int);
struct uio;
int uiomove(void *, int, struct uio *);
+#if defined(_KERNEL)
int setjmp(label_t *);
void longjmp(label_t *);
+#endif
void consinit(void);