delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1996/11/24/14:10:51

From: noer AT cygnus DOT com (Geoffrey Noer)
Subject: Re: Sockets in gnu-win32
24 Nov 1996 14:10:51 -0800 :
Sender: daemon AT cygnus DOT com
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <199611242044.MAA20139.cygnus.gnu-win32@cirdan.cygnus.com>
Original-To: miguelb AT omega DOT lncc DOT br (Fabricio Chalub)
Original-Cc: gnu-win32 AT cygnus DOT com
In-Reply-To: <329786AE.4921@omega.lncc.br> from "Fabricio Chalub" at Nov 23, 96 08:20:15 pm
X-Mailer: ELM [version 2.4 PL23]
Original-Sender: owner-gnu-win32 AT cygnus DOT com

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...

-- 
Geoffrey Noer
noer AT cygnus DOT com
-
For help on using this list, 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