summary refs log tree commit diff
path: root/string
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2008-05-24 22:22:20 +0000
committerJakub Jelinek <jakub@redhat.com>2008-05-24 22:22:20 +0000
commit8ba7d5cebbd4acf40dc8d22982baa50c2e1fd194 (patch)
treece09df60a6357e43ff65911fc7e817bcae26486f /string
parente96fe50f0dd8d76fabfe139b46f059e3b2373b83 (diff)
downloadglibc-8ba7d5cebbd4acf40dc8d22982baa50c2e1fd194.tar.gz
glibc-8ba7d5cebbd4acf40dc8d22982baa50c2e1fd194.tar.xz
glibc-8ba7d5cebbd4acf40dc8d22982baa50c2e1fd194.zip
Updated to fedora-glibc-20080524T2218 cvs/fedora-glibc-2_8_90-5
Diffstat (limited to 'string')
-rw-r--r--string/endian.h66
1 files changed, 34 insertions, 32 deletions
diff --git a/string/endian.h b/string/endian.h
index 430fb3a5c4..37d030a252 100644
--- a/string/endian.h
+++ b/string/endian.h
@@ -56,39 +56,41 @@
 #endif
 
 
+#ifdef __USE_BSD
 /* Conversion interfaces.  */
-#include <bits/byteswap.h>
-
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-# define htobe16(x) __bswap_16 (x)
-# define htole16(x) (x)
-# define be16toh(x) __bswap_16 (x)
-# define le16toh(x) (x)
-
-# define htobe32(x) __bswap_32 (x)
-# define htole32(x) (x)
-# define be32toh(x) __bswap_32 (x)
-# define le32toh(x) (x)
-
-# define htobe64(x) __bswap_64 (x)
-# define htole64(x) (x)
-# define be64toh(x) __bswap_64 (x)
-# define le64toh(x) (x)
-#else
-# define htobe16(x) (x)
-# define htole16(x) __bswap_16 (x)
-# define be16toh(x) (x)
-# define le16toh(x) __bswap_16 (x)
-
-# define htobe32(x) (x)
-# define htole32(x) __bswap_32 (x)
-# define be32toh(x) (x)
-# define le32toh(x) __bswap_32 (x)
-
-# define htobe64(x) (x)
-# define htole64(x) __bswap_64 (x)
-# define be64toh(x) (x)
-# define le64toh(x) __bswap_64 (x)
+# include <bits/byteswap.h>
+
+# if __BYTE_ORDER == __LITTLE_ENDIAN
+#  define htobe16(x) __bswap_16 (x)
+#  define htole16(x) (x)
+#  define be16toh(x) __bswap_16 (x)
+#  define le16toh(x) (x)
+
+#  define htobe32(x) __bswap_32 (x)
+#  define htole32(x) (x)
+#  define be32toh(x) __bswap_32 (x)
+#  define le32toh(x) (x)
+
+#  define htobe64(x) __bswap_64 (x)
+#  define htole64(x) (x)
+#  define be64toh(x) __bswap_64 (x)
+#  define le64toh(x) (x)
+# else
+#  define htobe16(x) (x)
+#  define htole16(x) __bswap_16 (x)
+#  define be16toh(x) (x)
+#  define le16toh(x) __bswap_16 (x)
+
+#  define htobe32(x) (x)
+#  define htole32(x) __bswap_32 (x)
+#  define be32toh(x) (x)
+#  define le32toh(x) __bswap_32 (x)
+
+#  define htobe64(x) (x)
+#  define htole64(x) __bswap_64 (x)
+#  define be64toh(x) (x)
+#  define le64toh(x) __bswap_64 (x)
+# endif
 #endif
 
 #endif	/* endian.h */