Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Mon, 25 Oct 2004 14:14:39 +0200 From: Stepan Kasal To: bug-autoconf AT gnu DOT org Cc: "Gerrit P. Haase" , cygwin AT cygwin DOT com, autoconf AT gnu DOT org Subject: resolv.h test proposal Message-ID: <20041025121439.GA4915@matsrv.math.cas.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-Virus-Scanned: ClamAV 0.80/541/Wed Oct 20 16:31:25 2004 clamav-milter version 0.80j on localhost X-Virus-Status: Clean X-Spam-Status: No, hits=-0.9 required=5.0 tests=BAYES_30 autolearn=no version=2.64 X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on matsrv.math.cas.cz 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. Regards, Stepan Kasal ----- Forwarded message from "Gerrit P. Haase" ----- Date: Mon, 25 Oct 2004 13:46:43 +0200 From: "Gerrit P. Haase" 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 fails suddenly. >>>> >>>>Apparently /usr/include/resolv.h misses the definition for >>>>sockaddr_in, which is defined in >>>> >>>>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 >> >> SYNOPSIS >> #include >> #include >> #include >> #include >> > 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 #endif #ifdef HAVE_NETINET_IN_H # include /* inet_ functions / structs */ #endif #ifdef HAVE_ARPA_NAMESER_H # include /* DNS HEADER struct */ #endif #ifdef HAVE_SYS_SOCKET_H # include /* DNS HEADER struct */ #endif ]]) Anyway, there should be a macro which provides this functionity. -- =^..^= http://nyckelpiga.de/donate.html ----- End forwarded message ----- -- 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/