Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 77689 - bug of /usr/include/bits/byteswap.h
bug of /usr/include/bits/byteswap.h
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2002-11-11 23:40 EST by Zhixu Liu
Modified: 2016-11-24 09:56 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-01-07 11:54:50 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Zhixu Liu 2002-11-11 23:40:37 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461)

Description of problem:
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 

Is that right? Thanks!

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
Just try to compile a program which use htonl ... with non-GCC compilers,
such as icc, ...	

Actual Results:  It won't pass the compile, as I've said in the description

Additional info:
Comment 1 Matt 2002-11-27 16:13:50 EST
I think I have a similar problem. I'm using an Intel compiler to compile a
program  which worked just fine under Redhat 7.3. Now when I compile I get  the
following error:

ifc  -O3 -tpp7 -Vaxlib -w95 -cm -static -r8  -o prism_static x86_prism4-0e_gui.o
-L/usr/lib -L./library/x86 -L../f90/library/x86 -lprism
./library/x86/libprism.a(create_socket.o): In function `create_socket_':
create_socket.o(.text+0x40): undefined reference to `__bswap_32'
make: *** [prism_static] Error 1
Comment 2 Jakub Jelinek 2003-01-07 11:54:50 EST
Should be fixed in glibc-2.3.1-9 and later.

Note You need to log in before you can comment on or make changes to this bug.