delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/02/27/18:21:09

From: khan AT xraylith DOT wisc DOT edu (Mumit Khan)
Subject: Re: troubles with gnuwin32-egcs-971023...
27 Feb 1998 18:21:09 -0800 :
Message-ID: <9802280139.AA01800.cygnus.gnu-win32@modi.xraylith.wisc.edu>
References: <3 DOT 0 DOT 3 DOT 32 DOT 19980224102134 DOT 00917210 AT mail-o DOT mchp DOT siemens DOT de>
To: Christoph Moar <christoph DOT moar AT mchp DOT siemens DOT de>
Cc: gnu-win32 AT cygnus DOT com

Christoph Moar <christoph DOT moar AT mchp DOT siemens DOT de> writes:
> So I downloaded gnuwin32-egcs-971023, set the paths and
> started compiling some easy programs.

the gnuwin32-egcs-971023 snapshot *precedes* the egcs-1.00 based
release, so I'm a confused as to why you downloaded that instead of the
release version (especially when the README file mentions that
explicitly)! Of course, if you downloaded egcs-971023 *before* 971205,
then you should simply chuck it get the 1.00 release. It's all in the
README file ...

In any event, the problem you're having is not due to the compiler, but
rather due to a bug/omission in the Winsup headers; the problem is that
the htons etc prototypes were left out of the winsup headers, and hence 
the errors. Hopefully b19 headers have this fixed.

basically, all you have to do is to add the following prototypes after
you include <netinet/in.h> in your C++ source file:

  extern "C" {
  unsigned long int htonl(unsigned long int hostlong);
  unsigned short int htons(unsigned short int hostshort);
  // ... 
  // ...
  }

I believe Kevin Hughes had the same problem a while back, and I don't
remember if I copied the mailing list when I responded to him.

Regards,
Mumit
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019