delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/04/15/15:36:30

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Sun, 15 Apr 2001 15:36:31 -0400
From: Christopher Faylor <cgf AT redhat DOT com>
To: Corinna Vinschen <cygwin AT cygwin DOT com>
Subject: Re: cvs broken on win2k after recent cygwin upgrade: "The descriptor is a file, not a socket"
Message-ID: <20010415153631.D9015@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: Corinna Vinschen <cygwin AT cygwin DOT com>
References: <002e01c0b29d$c880d5b0$0401a8c0 AT trinity> <f5by9twn4mm DOT fsf AT cogsci DOT ed DOT ac DOT uk> <010e01c0bafa$f04d9320$2b904f86 AT trinity> <f5bofu2cm9s DOT fsf AT cogsci DOT ed DOT ac DOT uk> <07fd01c0c3dc$cf05f730$0200a8c0 AT voyager> <f5bhezs4e2c DOT fsf AT cogsci DOT ed DOT ac DOT uk> <20010414161237 DOT A4149051 AT MELON> <f5b8zl23731 DOT fsf AT cogsci DOT ed DOT ac DOT uk> <20010415090728 DOT B8359 AT redhat DOT com> <20010415184450 DOT V20490 AT cygbert DOT vinschen DOT de>
Mime-Version: 1.0
User-Agent: Mutt/1.3.11i
In-Reply-To: <20010415184450.V20490@cygbert.vinschen.de>; from cygwin@cygwin.com on Sun, Apr 15, 2001 at 06:44:50PM +0200

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019