From: miguelb AT omega DOT lncc DOT br (Fabricio Chalub) Subject: Re: Sockets in gnu-win32 25 Nov 1996 08:21:43 -0800 Sender: daemon AT cygnus DOT com Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <3299C684.71B2.cygnus.gnu-win32@omega.lncc.br> References: <1 DOT 5 DOT 4 DOT 32 DOT 19961124202644 DOT 006815f0 AT mail DOT direct DOT 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 Original-CC: gnu-win32 AT cygnus DOT com Original-Sender: owner-gnu-win32 AT cygnus DOT 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 AT cygnus DOT com" with one line of text: "help".