delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/10/29/06:36:21

From: colin AT bird DOT fu DOT is DOT saga-u DOT ac DOT jp (Colin Peters)
Subject: RE: compiling winsock apps
29 Oct 1997 06:36:21 -0800 :
Message-ID: <01BCE47C.CA123600.cygnus.gnu-win32@gbird0>
Mime-Version: 1.0
To: "'Ben Miller'" <bgmiller AT dccinc DOT com>
Cc: "'GNU-Win32'" <gnu-win32 AT cygnus DOT com>

Ben Miller[SMTP:bgmiller AT dccinc DOT com] wrote:
>try renaming the file to winsock.cpp and then compiling it.  It will generate these errors.  Is there something I am missing in order to be able to compile in c++ mode rather that c mode?

The C++ parser has some problems with parting function prototypes with
__attributes__ separated from the function names. I think that you will
need to go through the entries in Sockets.h that cause the errors and
change them to put the PASCAL word at the end of the line (I think this
works). E.g.

char PASCAL *inet_ntoa (struct in_addr in);

becomes

char *inet_ntoa (struct in_addr in) PASCAL;

It doesn't look nice, but it seems to work (won't work with non GNU
compilers though, but neither will a lot of other stuff in those
headers).

Good luck,
Colin.

-- Colin Peters - Saga Univ. Dept. of Information Science
-- colin AT bird DOT fu DOT is DOT saga-u DOT ac DOT jp - finger for PGP public key
-- http://www.fu.is.saga-u.ac.jp/~colin/index.html
-- http://www.geocities.com/Tokyo/Towers/6162/

-
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