Add C++ support.

This commit is contained in:
mike 2002-02-19 02:17:16 +00:00
parent 520242dafe
commit 10ca98b24d
2 changed files with 10 additions and 0 deletions

View File

@ -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_ */

View File

@ -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_ */