This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: troubles with gnuwin32-egcs-971023...


Christoph Moar <christoph.moar@mchp.siemens.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@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]