bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug of i386/bits/byteswap.h for glibc


From: Zhixu Liu
Subject: bug of i386/bits/byteswap.h for glibc
Date: Sat, 9 Nov 2002 11:38:43 +0800 (CST)

Hi, 

If I'm right, the include file /usr/include/bits/byteswap.h (line 84-86, 
45-47) in  glibc-devel-2.2.93-5 for RedHat 8.0 have some bugs:

1.  #define __bswap_16(x) should be #define __bswap_32(x), otherwise if 
__GNUC__ is not defined, i.e, people use compiler other than gcc, 
__bswap32(x) will not be defined!
 
2. After change __bswap_16 to __bswap_32, the macro define should change 
to "# define __bswap_32(x) __bswap_constant_32 (x)". The __extension__ is 
a GNU extension, right? At least, intel compiler (icc) doesn't support it.

The same for the definition of macro __bswap_16 (line 45-47).

To make sure this is not a redhat bug, I download 
http://ftp.gnu.org/gnu/glibc/glibc-2.3.1.tar.gz, and found the same bug in 
sysdeps/i386/bits/byteswap.h

Is that right? Thanks!

Cheers,
-- 
Zhixu Liu

_/\_Organization____________________/\_E-Mail_______________:
Institute of Particle Physics      *   address@hidden
Central China Normal University    *   address@hidden
Tel: 86.(027)-87673315             *





reply via email to

[Prev in Thread] Current Thread [Next in Thread]