From: miguelb@omega.lncc.br (Fabricio Chalub)
Subject: Re: Sockets in gnu-win32
25 Nov 1996 08:21:43 -0800
Sender: daemon@cygnus.com
Approved: cygnus.gnu-win32@cygnus.com
Distribution: cygnus
Message-ID: <3299C684.71B2.cygnus.gnu-win32@omega.lncc.br>
References: <1.5.4.32.19961124202644.006815f0@mail.direct.ca>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.01Gold (Win95; I)
Original-To: Wade Richards <wrichard@direct.ca>
Original-CC: gnu-win32@cygnus.com
Original-Sender: owner-gnu-win32@cygnus.com

To make things clear, let me show what happened to my file after the
macro expasion:

class wormHole {
   int sock;
   struct hostent *targetAddr;
   struct sockaddr_in target;

   public:
      wormHole (int kind = streamSocket);
      callTarget (char *target_name, int port);
      cygwin32_socket  (void) { return sock; }
};

Note that cygwin32_socket replaced the original socket function.

Now take a look a the constructor:

wormHole::wormHole (int kind = streamSocket) {
(*)   sock = cygwin32_socket  (2 , kind, 0);
}

Get it?  The compiler thinks that this (*) call of cygwin32_socket is
from the wormHole class, not the original from the sockets library!

Anyway, if I #undef'ed socket I would loose this expansion.

[]s
-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
