summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2012-10-10 11:23:48 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2012-10-10 11:23:48 +0000
commite372a16a5b3761f3876fe7d1cd7e67740f9856cf (patch)
treeee9009c6d42f6b1bd9a15b2471aa0374d84d18ac /sys
parent4de30929195beaafe2d5a1ef86bf5b5b10cd02cf (diff)
Add __BEGIN_DECLS so that programs using C++ can use functions
defined in sysarch.h again, they were broken following the change to NO_IMPLICIT_EXTERN_C. help/ok kettenis@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/alpha/include/sysarch.h5
-rw-r--r--sys/arch/amd64/include/sysarch.h6
-rw-r--r--sys/arch/i386/include/sysarch.h6
3 files changed, 14 insertions, 3 deletions
diff --git a/sys/arch/alpha/include/sysarch.h b/sys/arch/alpha/include/sysarch.h
index bcebc5fcb2f..73a098ea64c 100644
--- a/sys/arch/alpha/include/sysarch.h
+++ b/sys/arch/alpha/include/sysarch.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sysarch.h,v 1.7 2011/04/23 21:34:02 martynas Exp $ */
+/* $OpenBSD: sysarch.h,v 1.8 2012/10/10 11:23:47 sthen Exp $ */
/* $NetBSD: sysarch.h,v 1.8 2001/04/26 03:10:46 ross Exp $ */
/*-
@@ -33,6 +33,7 @@
#ifndef _MACHINE_SYSARCH_H_
#define _MACHINE_SYSARCH_H_
+#include <sys/cdefs.h>
#include <machine/ieeefp.h>
/*
@@ -55,7 +56,9 @@ struct alpha_fp_c_args {
};
#ifndef _KERNEL
+__BEGIN_DECLS
int sysarch(int, void *);
+__END_DECLS
#endif /* !_KERNEL */
#endif /* !_MACHINE_SYSARCH_H_ */
diff --git a/sys/arch/amd64/include/sysarch.h b/sys/arch/amd64/include/sysarch.h
index a1542578233..bebba9b3579 100644
--- a/sys/arch/amd64/include/sysarch.h
+++ b/sys/arch/amd64/include/sysarch.h
@@ -1,9 +1,11 @@
-/* $OpenBSD: sysarch.h,v 1.10 2011/04/13 02:49:12 guenther Exp $ */
+/* $OpenBSD: sysarch.h,v 1.11 2012/10/10 11:23:47 sthen Exp $ */
/* $NetBSD: sysarch.h,v 1.1 2003/04/26 18:39:48 fvdl Exp $ */
#ifndef _MACHINE_SYSARCH_H_
#define _MACHINE_SYSARCH_H_
+#include <sys/cdefs.h>
+
/*
* Architecture specific syscalls (amd64)
*/
@@ -68,6 +70,7 @@ int amd64_iopl(struct proc *, void *, register_t *);
int amd64_set_fsbase(struct proc *, void *);
int amd64_get_fsbase(struct proc *, void *);
#else
+__BEGIN_DECLS
int amd64_iopl(int);
int amd64_get_ioperm(u_long *);
int amd64_set_ioperm(u_long *);
@@ -77,6 +80,7 @@ int amd64_pmc_read(struct amd64_pmc_read_args *);
int amd64_set_fsbase(void *);
int amd64_get_fsbase(void **);
int sysarch(int, void *);
+__END_DECLS
#endif
#endif /* !_MACHINE_SYSARCH_H_ */
diff --git a/sys/arch/i386/include/sysarch.h b/sys/arch/i386/include/sysarch.h
index e870866f464..763f27413b1 100644
--- a/sys/arch/i386/include/sysarch.h
+++ b/sys/arch/i386/include/sysarch.h
@@ -1,9 +1,11 @@
-/* $OpenBSD: sysarch.h,v 1.10 2011/11/07 15:41:33 guenther Exp $ */
+/* $OpenBSD: sysarch.h,v 1.11 2012/10/10 11:23:47 sthen Exp $ */
/* $NetBSD: sysarch.h,v 1.8 1996/01/08 13:51:44 mycroft Exp $ */
#ifndef _MACHINE_SYSARCH_H_
#define _MACHINE_SYSARCH_H_
+#include <sys/cdefs.h>
+
/*
* Architecture specific syscalls (i386)
*/
@@ -43,6 +45,7 @@ struct i386_set_ioperm_args {
};
#ifndef _KERNEL
+__BEGIN_DECLS
int i386_get_ldt(int, union descriptor *, int);
int i386_set_ldt(int, union descriptor *, int);
int i386_iopl(int);
@@ -53,6 +56,7 @@ int i386_set_fsbase(void *);
int i386_get_gsbase(void **);
int i386_set_gsbase(void *);
int sysarch(int, void *);
+__END_DECLS
#else
uint32_t i386_get_threadbase(struct proc *, int);
int i386_set_threadbase(struct proc *, uint32_t, int);