X-Git-Url: https://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fbyteswap_.h;h=ca8554431951d4e3ba048d32e746a88615f7ee33;hb=5d95b32a83f1663be6172f07b21ba7615b6055f4;hp=da3c6a37771e83bf13b8570538ea37a00fed4716;hpb=4b560b1235fa3640920aa52d24c2b652f6decfb7;p=gnulib.git diff --git a/lib/byteswap_.h b/lib/byteswap_.h index da3c6a377..ca8554431 100644 --- a/lib/byteswap_.h +++ b/lib/byteswap_.h @@ -1,5 +1,5 @@ /* byteswap.h - Byte swapping - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 2005, 2007 Free Software Foundation, Inc. Written by Oskar Liljeblad , 2005. This program is free software; you can redistribute it and/or modify @@ -16,7 +16,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef _BYTESWAP_H +#ifndef _GL_BYTESWAP_H +#define _GL_BYTESWAP_H /* Given an unsigned 16-bit argument X, return the value corresponding to X with reversed byte order. */ @@ -27,7 +28,7 @@ X with reversed byte order. */ #define bswap_32(x) ((((x) & 0x000000FF) << 24) | \ (((x) & 0x0000FF00) << 8) | \ - (((x) & 0x00FF0000) << 8) | \ + (((x) & 0x00FF0000) >> 8) | \ (((x) & 0xFF000000) >> 24)) /* Given an unsigned 64-bit argument X, return the value corresponding to @@ -41,4 +42,4 @@ (((x) & 0x00FF000000000000ULL) >> 40) | \ (((x) & 0xFF00000000000000ULL) >> 56)) -#endif +#endif /* _GL_BYTESWAP_H */