delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/07/10/15:50:26

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=0.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <20110710132515.GO4726@calimero.vinschen.de>
References: <CACSzjJnO5QWjFHVfYzHghxutbkfWx_g3+_6oRY3mh+_J_Nj7CQ AT mail DOT gmail DOT com> <20110710132515 DOT GO4726 AT calimero DOT vinschen DOT de>
Date: Sun, 10 Jul 2011 21:49:58 +0200
Message-ID: <CACSzjJm=yCRVhV=rk7z7Qee_o_J=gLsLAU4YQifhidQtpDgHAw@mail.gmail.com>
Subject: Re: Where is gethostbyname2 ?
From: Sam Mani <psamman14 AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id p6AJoLYv008265

OK, thanks. The local declaration works just fine :)

On Sun, Jul 10, 2011 at 3:25 PM, Corinna Vinschen wrote:
> On Jul 10 03:19, Sam Mani wrote:
>> What header should a C file include to be able to call gethostbyname2() ?
>
> In theory that would be netdb.h, but apparently we forgot to declare
> the function there and nobody missed it so far.  I applied a patch to
> CVS so the declaration will be added to the next Cygwin release.
>
> For the time being, just declare the function in your source file, in
> C++ for instance:
>
>  extern "C" struct hostent *gethostbyname2 (const char *, int);
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


- Raw text -


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