This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: gcc-3.0 bug in unixware 7.1.1 (serious)
- To: Franciszek Czekala <franciszek dot czekala at wp dot pl>
- Subject: Re: gcc-3.0 bug in unixware 7.1.1 (serious)
- From: Matt Schalit <mschalit at pacbell dot net>
- Date: Fri, 29 Jun 2001 11:10:15 -0700
- Cc: gcc-bugs at gcc dot gnu dot org
- References: <000701c100bb$608e2fe0$40e063d9@ppp>
Franciszek Czekala wrote:
>
> The file byteorder.h
> (gcc-dir/lib/gcc-lib/i586-sco-sysv5uw7.1.1/3.0/include/sys/byteorder.h)
> defines htons and ntohs functions as having the argument unsigned int
> instead of unsigned short (short is what these functions are about,
> aren't they?) thus conflicting with /usr/include/arpa/inet.h
> and preventing network applications from compiling.
>
> This can be fixed by manually editing appropriate declarations
> and definitions in byteorder.h but it would be better if the correct
> file were generated (it is meant to fix some problems with default
> system include files so it is funny that it introduces new ones).
>
> Best regards
> Franciszek Czekala, Poland
It's fixed in CVS.
I reported it and Bruce Korb fixed it. Here's what the
patch is, essentially:
Apply it to the file --> gcc-3.0/gcc/fixinc/inclhack.def
----------------------------------------------------------------
--- inclhack.def.orig Thu Jun 14 21:16:00 2001
+++ inclhack.def Thu Jun 28 13:10:57 2001
@@ -3043,7 +3043,7 @@
hackname = uw7_byteorder_fix;
files = arpa/inet.h;
select = "in_port_t";
- test = "-f $DESTDIR/sys/byteorder.h";
+ test = "-f sys/byteorder.h";
#ifndef SVR5
mach = "*-*-sysv4*";
mach = "i?86-*-sysv5*";
-----------------------------------------------------------------------------
You can see that it was searching for byteorder.h in the
wrong place, considering the fact that, when you get this running,
the uw7_byteorder_fix is the first fixinclude that gets applied.
Thus there won't be any $DESTDIR/sys/byteorder.h at that time,
unless you already installed gcc-3.0 once and didn't rename
gcc-libs when you were building it again.
I included this all in the gcc-mini-HOWTO I posted last night to
comp.unix.unixware.misc.
Cheers,
Matthew