Re: HEAD compile error on Alpha Linux and Compaq C Compiler - SOLVED

From: Guido Serassio <serassio@dont-contact.us>
Date: Sat, 29 Dec 2001 15:00:34 +0100

HI,

The HEAD compile error on Alpha Linux using Compaq C Compiler come from a
Glibc include bug:

Looking at include dependencies in ntlmauth.c source, i can find that
<bits/byteswap.h> is included twice, one time implicitly from
<netinet/in.h>, the second time explicitly including <byteswap.h>, but
generating the error because _BYTESWAP_H used to avoid multiple inclusions
is defined and checked only in <byteswap.h>.

This simple code is an example:

#include <stdio.h>
#include <netinet/in.h>
#include <byteswap.h>

void main(void)
{

         printf("Hello World !!!\n");
}

And this is the resulting compiler output:

serassio@io serassio]$ ccc prova.c
cc: Error: /usr/include/bits/byteswap.h, line 32: This declaration contains
a redefinition of "__bswap_16
". The previous declaration is at line number 32 in file
/usr/include/bits/byteswap.h. (redef)
__bswap_16 (unsigned short int __bsx)
^
cc: Error: /usr/include/bits/byteswap.h, line 47: This declaration contains
a redefinition of "__bswap_32
". The previous declaration is at line number 47 in file
/usr/include/bits/byteswap.h. (redef)
__bswap_32 (unsigned int __bsx)
^

With gcc all compiles fine.

I think that this problem can happen on all non gcc compilers using Glibc
includes.
I have already opened a Problem Report to Glibc team.

Regards

Guido

-
=======================================================
Serassio Guido
Via Albenga, 11/4 10134 - Torino - ITALY
E-mail: serassio@interfree.it
         serassio@libero.it
WWW: http://www.serassio.it
Received on Sat Dec 29 2001 - 07:00:50 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:43 MST