summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormike <mike@FreeBSD.org>2002-02-19 02:17:16 +0000
committermike <mike@FreeBSD.org>2002-02-19 02:17:16 +0000
commit10ca98b24da133ea8332bb1eafa4287a49ddc3ed (patch)
tree3867d46248f6bc974ffce9c5d0aea390a4c5abee
parent520242dafe90676ea1fa0110a3c29dfd47731ed7 (diff)
downloadFreeBSD-src-10ca98b24da133ea8332bb1eafa4287a49ddc3ed.zip
FreeBSD-src-10ca98b24da133ea8332bb1eafa4287a49ddc3ed.tar.gz
Add C++ support.
-rw-r--r--sys/i386/include/endian.h5
-rw-r--r--sys/ia64/include/endian.h5
2 files changed, 10 insertions, 0 deletions
diff --git a/sys/i386/include/endian.h b/sys/i386/include/endian.h
index f22988b..7428ee3 100644
--- a/sys/i386/include/endian.h
+++ b/sys/i386/include/endian.h
@@ -37,6 +37,7 @@
#ifndef _MACHINE_ENDIAN_H_
#define _MACHINE_ENDIAN_H_
+#include <sys/cdefs.h>
#include <machine/ansi.h>
/*
@@ -59,6 +60,8 @@
#ifdef __GNUC__
+__BEGIN_DECLS
+
static __inline __uint32_t
__htonl(__uint32_t __x)
{
@@ -95,6 +98,8 @@ __ntohs(__uint16_t __x)
return (__htons(__x));
}
+__END_DECLS
+
#endif /* __GNUC__ */
#endif /* !_MACHINE_ENDIAN_H_ */
diff --git a/sys/ia64/include/endian.h b/sys/ia64/include/endian.h
index bfc2381..c1efac9 100644
--- a/sys/ia64/include/endian.h
+++ b/sys/ia64/include/endian.h
@@ -39,6 +39,7 @@
#define _MACHINE_ENDIAN_H_
#include <sys/cdefs.h>
+#include <machine/ansi.h>
/*
* Define the order of 32-bit words in 64-bit words.
@@ -60,6 +61,8 @@
#ifdef __GNUC__
+__BEGIN_DECLS
+
static __inline __uint64_t
__uint8_swap_uint64(__uint64_t __x)
{
@@ -97,6 +100,8 @@ __ntohs(__uint16_t __x)
return (__uint8_swap_uint64(__x) >> 48);
}
+__END_DECLS
+
#endif /* __GNUC__ */
#endif /* !_MACHINE_ENDIAN_H_ */
OpenPOWER on IntegriCloud