(__bswap_64): Make it usable for 64bit platforms.
authordrepper <drepper>
Wed, 27 Dec 2000 04:23:21 +0000 (04:23 +0000)
committerdrepper <drepper>
Wed, 27 Dec 2000 04:23:21 +0000 (04:23 +0000)
bits/byteswap.h
sysdeps/generic/bits/byteswap.h

index 6b51156..b193ea1 100644 (file)
@@ -1,5 +1,5 @@
 /* Macros to swap the order of bytes in integer values.
-   Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -56,7 +56,7 @@ __bswap_32 (unsigned int __bsx)
 # define __bswap_64(x) \
      (__extension__                                                          \
       ({ union { unsigned long long int __ll;                                \
-                unsigned long int __l[2]; } __v, __r;                        \
+                unsigned int __l[2]; } __v, __r;                             \
         __v.__ll = (x);                                                      \
         __r.__l[0] = __bswap_32 (__v.__l[1]);                                \
         __r.__l[1] = __bswap_32 (__v.__l[0]);                                \
index 6b51156..b193ea1 100644 (file)
@@ -1,5 +1,5 @@
 /* Macros to swap the order of bytes in integer values.
-   Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -56,7 +56,7 @@ __bswap_32 (unsigned int __bsx)
 # define __bswap_64(x) \
      (__extension__                                                          \
       ({ union { unsigned long long int __ll;                                \
-                unsigned long int __l[2]; } __v, __r;                        \
+                unsigned int __l[2]; } __v, __r;                             \
         __v.__ll = (x);                                                      \
         __r.__l[0] = __bswap_32 (__v.__l[1]);                                \
         __r.__l[1] = __bswap_32 (__v.__l[0]);                                \