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

25 Nov 1996 10:53:05 -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: Geoffrey Noer <[email-masked]>
Original-CC: [email-masked]
Original-Sender: [email-masked]

Geoffrey Noer wrote:
> 
> Fabricio Chalub taps on the keyboard:
> >
> > The sockets support in gnu-win32 works just fine, but is standing on the
> > thin ice... for example, some functions are missing, some headers points
> > to void and some functions are mapped in a poor way...  in
> > <sys/socket.h>, we have this lovely---what should I call---workaround:
> >
> >       #define socket cygwin32_socket
> >
> > which of course maps the BSD API to a function that in turn probably
> > calls the Winsock32 API (too many function calls, but I guess that's
> > normal when one maps some system into another.)
> [...]
> 
> The way sockets work, we export socket-related functions in the cygwin.dll
> as cygwin32_funcname and then use defines to map these names to the
> ordinary ones.
> 
> In normal use, you will get the cygwin32 sockets.  However, if you choose
> to use WinSock, you can do so without giving up access to the rest of the
> Cygwin32 API simply by not including the <sys/socket.h> header.
> 
> If anyone can think of a better way of doing this, please let me know...
> 

But why do you have to define the names as cygwin32_xxx and *then*
redefine as xxx?  Why just don't write the functions with their real
names?  Are there any conflicts?  I mean, I don't think that anyone
would use *both* WinSock and Sockets at the same time. :)

[]s fabricio chalub
-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".