This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: cvs broken on win2k after recent cygwin upgrade: "The descriptor is a file, not a socket"


On Sun, Apr 15, 2001 at 06:44:50PM +0200, Corinna Vinschen wrote:
>On Sun, Apr 15, 2001 at 09:07:28AM -0400, Christopher Faylor wrote:
>> On Sun, Apr 15, 2001 at 09:22:58AM +0100, Henry S. Thompson wrote:
>> >Thanks for the observations.  Seems to me to confirm Corinna's
>> >original belief that somehow Cygwin is getting the wrong WINSOCK
>> >library, even though the right one is available.
>> 
>> Cygwin uses wsock32.dll.
>
>That's not quite correct. Cygwin uses ws2_32.dll if available.
>The reason is the Winsock2 functionality used for duplicating
>sockets. The old method is still implemented as a fallback, though.

How is that implemented?  I don't see it in the code.  Where is
that implemented below?

Also the two tests for ws32_handle and wsock32_handle look reversed.

cgf

LoadDLLinitfunc (wsock32)
{
  extern void wsock_init ();
  HANDLE h;

  if ((h = LoadLibrary ("wsock32.dll")) != NULL)
    wsock32_handle = h;
  else if (!wsock32_handle)
    api_fatal ("could not load wsock32.dll.  Is TCP/IP installed?");
  else
    return 0;           /* Already done by another thread? */

  if (!ws2_32_handle) 	/* IS THIS CORRECT? */
    wsock_init ();

  return 0;
}

LoadDLLinitfunc (ws2_32)
{
  extern void wsock_init ();
  HANDLE h;

  if ((h = LoadLibrary ("ws2_32.dll")) == NULL)
    return 0;          /* Already done or not available. */
  ws2_32_handle = h;

  if (!wsock32_handle) 	/* IS THIS CORRECT? */
    wsock_init ();

  return 0;
}


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]