diff options
author | Geo.Liaskos@gmail.com <Geo.Liaskos@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-21 03:47:44 +0000 |
---|---|---|
committer | Geo.Liaskos@gmail.com <Geo.Liaskos@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-21 03:47:44 +0000 |
commit | a220b593c5b7fa2fde7074ea6c1c7afe36500d21 (patch) | |
tree | 9b8c6ff48cbf4d13d94dd5c3955078cedb7b794b /base/sys_byteorder.h | |
parent | 864c6324e727020f09b31339e2077be06c93d403 (diff) | |
download | chromium_src-a220b593c5b7fa2fde7074ea6c1c7afe36500d21.zip chromium_src-a220b593c5b7fa2fde7074ea6c1c7afe36500d21.tar.gz chromium_src-a220b593c5b7fa2fde7074ea6c1c7afe36500d21.tar.bz2 |
Add more support for FreeBSD
BUG=
Review URL: https://chromiumcodereview.appspot.com/16206002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224546 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/sys_byteorder.h')
-rw-r--r-- | base/sys_byteorder.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/base/sys_byteorder.h b/base/sys_byteorder.h index 97e33ac..17b662c 100644 --- a/base/sys_byteorder.h +++ b/base/sys_byteorder.h @@ -25,7 +25,7 @@ #include <stdlib.h> #elif defined(OS_MACOSX) #include <libkern/OSByteOrder.h> -#elif defined(OS_OPENBSD) +#elif defined(OS_BSD) #include <sys/endian.h> #else #include <byteswap.h> @@ -42,6 +42,8 @@ inline uint16 ByteSwap(uint16 x) { return OSSwapInt16(x); #elif defined(OS_OPENBSD) return swap16(x); +#elif defined(OS_FREEBSD) + return bswap16(x); #else return bswap_16(x); #endif @@ -53,6 +55,8 @@ inline uint32 ByteSwap(uint32 x) { return OSSwapInt32(x); #elif defined(OS_OPENBSD) return swap32(x); +#elif defined(OS_FREEBSD) + return bswap32(x); #else return bswap_32(x); #endif @@ -64,6 +68,8 @@ inline uint64 ByteSwap(uint64 x) { return OSSwapInt64(x); #elif defined(OS_OPENBSD) return swap64(x); +#elif defined(OS_FREEBSD) + return bswap64(x); #else return bswap_64(x); #endif |