From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id BFC931F461 for ; Tue, 2 Jul 2019 20:08:39 +0000 (UTC) Received: from localhost ([::1]:56956 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiP4u-0006H9-M3 for normalperson@yhbt.net; Tue, 02 Jul 2019 16:08:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39372) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiMk9-0005Po-89 for bug-gnulib@gnu.org; Tue, 02 Jul 2019 13:39:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hiMk8-0003TH-4O for bug-gnulib@gnu.org; Tue, 02 Jul 2019 13:39:01 -0400 Received: from mo6-p00-ob.smtp.rzone.de ([2a01:238:20a:202:5300::3]:36872) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hiMk7-0003H5-51 for bug-gnulib@gnu.org; Tue, 02 Jul 2019 13:38:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1562089134; s=strato-dkim-0002; d=clisp.org; h=Message-ID:Date:Subject:To:From:X-RZG-CLASS-ID:X-RZG-AUTH:From: Subject:Sender; bh=p9/Qn2eFkQJipbo5/uCbaskTwRoZ5UyK4Udbk08hkiM=; b=YLCRWhoPJDK9DsC4x9C0aWT8DOxZg7+gbCU9tH6ITKJorppArEgl8s6fXgkfbG6DXs 2v+wdME5QJZ/4BRLLe+N6EexKDCWITdtYg1JCosjqiqlhwojcCXoojUqykLSrrKnzRaE 7wiaSNsE/9vppLsBZftp4eEuy7Rji85DAn1NUxhPglBAr0sg396j6ullIshrg+XeLXTU wY4sARJVvWB/x7GVdyb11V7NAdaqc123yb088FguTeGrLAfqNFl5skewVMPjKevKCj4u LL/3pj6CePXf184zoxmreIrqvUpTuNPkU3aTqI/uvQHF4bKnWSpQGV79Fj12cfepCvBD pCpg== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOGaf0zJZW" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 44.24 DYNA|AUTH) with ESMTPSA id v018bcv62Hcs7V1 (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Tue, 2 Jul 2019 19:38:54 +0200 (CEST) From: Bruno Haible To: bug-gnulib@gnu.org Subject: getaddrinfo tests: fix test failure on MSVC Date: Tue, 02 Jul 2019 19:38:53 +0200 Message-ID: <45970095.fu9pO4Vmgl@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-151-generic; KDE/5.18.0; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a01:238:20a:202:5300::3 X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" On native Windows with MSVC, I observe this test failure: FAIL: test-getaddrinfo ====================== FAIL test-getaddrinfo.exe (exit status: 4) The cause is a missing call to WSAStartup(). This patch fixes it. 2019-07-02 Bruno Haible getaddrinfo tests: Fix test failure on MSVC. * tests/test-getaddrinfo.c: Include sockets.h. (main): Invoke gl_sockets_startup. * modules/getaddrinfo-tests (Depends-on): Add sockets. diff --git a/tests/test-getaddrinfo.c b/tests/test-getaddrinfo.c index 2f9dcc3..41910ec 100644 --- a/tests/test-getaddrinfo.c +++ b/tests/test-getaddrinfo.c @@ -39,6 +39,8 @@ SIGNATURE_CHECK (getaddrinfo, int, (char const *, char const *, #include #include +#include "sockets.h" + /* Whether to print debugging messages. */ #define ENABLE_DEBUGGING 0 @@ -167,6 +169,8 @@ simple (char const *host, char const *service) int main (void) { + (void) gl_sockets_startup (SOCKETS_1_1); + return simple (HOST1, SERV1) + simple (HOST2, SERV2) + simple (HOST3, SERV3) diff --git a/modules/getaddrinfo-tests b/modules/getaddrinfo-tests index 521cf68..64a7c2d 100644 --- a/modules/getaddrinfo-tests +++ b/modules/getaddrinfo-tests @@ -3,6 +3,7 @@ tests/signature.h tests/test-getaddrinfo.c Depends-on: +sockets inet_ntop strerror