delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/10/25/08:50:41

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Message-ID: <417CF66F.7020803@x-ray.at>
Date: Mon, 25 Oct 2004 14:49:51 +0200
From: Reini Urban <rurban AT x-ray DOT at>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.8a3) Gecko/20040817
MIME-Version: 1.0
To: Stepan Kasal <kasal AT ucw DOT cz>
CC: cygwin AT cygwin DOT com
Subject: Re: resolv.h test proposal
References: <20041025121439 DOT GA4915 AT matsrv DOT math DOT cas DOT cz>
In-Reply-To: <20041025121439.GA4915@matsrv.math.cas.cz>
X-IsSubscribed: yes

Stepan Kasal schrieb:
> Hello,
>    the text below seems to relly be a bug report with a proposed fix.
> So I take the liberty to forward it to the bug report address.

Many thanks for doing this for us.

> ----- Forwarded message from "Gerrit P. Haase" -----
> Date: Mon, 25 Oct 2004 13:46:43 +0200
> From: "Gerrit P. Haase" <freeweb AT nyckelpiga DOT de>
> To: cygwin AT cygwin DOT com
> Cc: autoconf AT gnu DOT org
> Subject: Re: [bugreport] resolv.h test fails (was: Re: minires-devel-0.97-1:
> 	resolv.h fails)
> 
> Gerrit wrote:
>>Pierre A. Humblet wrote:
>>>At 01:03 PM 10/18/2004 +0200, Corinna Vinschen wrote:
>>>>On Oct 18 03:28, Reini Urban wrote:
>>>>
>>>>>minires-devel-0.97-1:
>>>>> #include <resolv.h> fails suddenly.
>>>>>
>>>>>Apparently /usr/include/resolv.h misses the definition for
>>>>>sockaddr_in, which is defined in <cygwin/in.h>
>>>>>
>>>>>Have no clue why it suddenly fails. Anyone else?
>>>>>These headers didn't change for years...
>>>>>
>>>>>Which file is supposed to include cygwin/in.h? I found nothing.
>>>>
>>>>netinet/in.h
>>>
>>>
>>>Its an upstream issue. According to the resolver man page, 
>>>netinet/in.h should be included before resolv.h.
>>>
>>>For example
>>><http://www.mcsr.olemiss.edu/cgi-bin/man-cgi?resolver+3>
>>>SYNOPSIS
>>>     #include <sys/types.h>
>>>     #include <netinet/in.h>
>>>     #include <arpa/nameser.h>
>>>     #include <resolv.h>
>>>
> 
>>I think this is correct.  What is buggy is the autoconf test which is
>>just including resolv.h and not netinet/in.h to compile the test exe.
> 
> This applies to the default test when calling
> AC_CHECK_HEADERS([resolv.h])
> 
> Workaround is to use s.th. like this in configure.ac:
> 
> AC_CHECK_HEADERS([arpa/nameser.h netinet/in.h sys/socket.h sys/types.h])
> AC_CHECK_HEADERS([resolv.h], [], [],
>       [[#if HAVE_SYS_TYPES_H
>         #  include <sys/types.h>
>         #endif
>         #ifdef HAVE_NETINET_IN_H
>         #  include <netinet/in.h>   /* inet_ functions / structs */
>         #endif
>         #ifdef HAVE_ARPA_NAMESER_H
>         #  include <arpa/nameser.h> /* DNS HEADER struct */
>         #endif
>         #ifdef HAVE_SYS_SOCKET_H
>         #  include <sys/socket.h> /* DNS HEADER struct */
>         #endif
>      ]])
> 
> Anyway, there should be a macro which provides this functionity.

-- 
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/

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

- Raw text -


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