Subject: Re: Sockets in gnu-win32
From: [email-masked] (Fabricio Chalub)

25 Nov 1996 08:21:43 -0800
Sender: [email-masked]
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
References: <[email-masked]>
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 <[email-masked]>
Original-CC: [email-masked]
Original-Sender: [email-masked]

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
"[email-masked]" with one line of text: "help".