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-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,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 C56901F4B4 for ; Mon, 18 Jan 2021 08:11:57 +0000 (UTC) Received: from localhost ([::1]:47892 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1Pdk-0003Ki-Nz for normalperson@yhbt.net; Mon, 18 Jan 2021 03:11:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54558) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1Pdh-0003KY-9a for bug-gnulib@gnu.org; Mon, 18 Jan 2021 03:11:53 -0500 Received: from mo4-p00-ob.smtp.rzone.de ([85.215.255.22]:26012) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1Pdf-0005pn-Bt for bug-gnulib@gnu.org; Mon, 18 Jan 2021 03:11:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1610957507; s=strato-dkim-0002; d=clisp.org; h=Message-ID:Date:Subject:To:From:From:Subject:Sender; bh=a+klDqogI4FVGJL/zarjhy0SsH1n+AQ8utC/t9yT6nI=; b=VkBFo8ahzTcxNGh+9TQihd8huWlApE4t2wcFujgUjB8sCfk70VIjp8wYaohtw7yP6F JULFM5RCMHyV1bRU6A/llCEiJwKOEtVOjJaXyinRMpGty2Z2QfAt/5XUBhQwa3gZLyva M1wyfjIwV6eaGl79E5UXolu4JPk4BkL/35yLs5uuE1V9zAxK8NdRONqmJouiWeiVwcWd NDAEk5f6jlbDQL+jJKDUfURj/TWaz/v3QYjZj7ug8USYgLH4iQUPf4mSLuSeGmsP0fPT WnQjJfikYeS+ouI2SXD5s4ZYobuj1yK9+BXcvKbduOohyxdRslySkMqkZdLIoHlt4ASz L1ug== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOHqfyyvs=" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 47.12.1 DYNA|AUTH) with ESMTPSA id u0aa20x0I8Bksnn (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Mon, 18 Jan 2021 09:11:46 +0100 (CET) From: Bruno Haible To: bug-gnulib@gnu.org Subject: uninorm tests: Fix compilation error on Cygwin Date: Mon, 18 Jan 2021 09:11:45 +0100 Message-ID: <1665494.vnJLl2dfa7@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-197-generic; KDE/5.18.0; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Received-SPF: none client-ip=85.215.255.22; envelope-from=bruno@clisp.org; helo=mo4-p00-ob.smtp.rzone.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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" When compiling a testdir for all of Gnulib, on Cygwin, with libunistring preinstalled, I get compilation errors such as: In file included from ../../gltests/uninorm/test-nfc.c:21:0: /usr/local/cygwin64/include/uninorm.h:130:21: error: initializer element is not constant #define UNINORM_NFC (&uninorm_nfc) ^ ../../gltests/uninorm/test-nfc.c:25:15: note: in expansion of macro 'UNINORM_NFC' uninorm_t n = UNINORM_NFC; ^~~~~~~~~~~ make[4]: *** [Makefile:21689: uninorm/test-nfc.o] Error 1 This patch fixes it. 2021-01-18 Bruno Haible uninorm tests: Fix compilation error on Cygwin. * tests/uninorm/test-nfc.c (n): Don't define when using a preinstalled libunistring on Windows. * tests/uninorm/test-nfd.c (n): Likewise. * tests/uninorm/test-nfkc.c (n): Likewise. * tests/uninorm/test-nfkd.c (n): Likewise. diff --git a/tests/uninorm/test-nfc.c b/tests/uninorm/test-nfc.c index 0e90834..0a7d857 100644 --- a/tests/uninorm/test-nfc.c +++ b/tests/uninorm/test-nfc.c @@ -20,7 +20,7 @@ #include "uninorm.h" -#if !(WOE32DLL || defined __ANDROID__) +#if !(((defined _WIN32 || defined __CYGWIN__) && (HAVE_LIBUNISTRING || WOE32DLL)) || defined __ANDROID__) /* Check that UNINORM_NFC is defined and links. */ uninorm_t n = UNINORM_NFC; #endif diff --git a/tests/uninorm/test-nfd.c b/tests/uninorm/test-nfd.c index 63a40f9..e5a06bc 100644 --- a/tests/uninorm/test-nfd.c +++ b/tests/uninorm/test-nfd.c @@ -20,7 +20,7 @@ #include "uninorm.h" -#if !(WOE32DLL || defined __ANDROID__) +#if !(((defined _WIN32 || defined __CYGWIN__) && (HAVE_LIBUNISTRING || WOE32DLL)) || defined __ANDROID__) /* Check that UNINORM_NFD is defined and links. */ uninorm_t n = UNINORM_NFD; #endif diff --git a/tests/uninorm/test-nfkc.c b/tests/uninorm/test-nfkc.c index 0505319..52709d7 100644 --- a/tests/uninorm/test-nfkc.c +++ b/tests/uninorm/test-nfkc.c @@ -20,7 +20,7 @@ #include "uninorm.h" -#if !(WOE32DLL || defined __ANDROID__) +#if !(((defined _WIN32 || defined __CYGWIN__) && (HAVE_LIBUNISTRING || WOE32DLL)) || defined __ANDROID__) /* Check that UNINORM_NFKC is defined and links. */ uninorm_t n = UNINORM_NFKC; #endif diff --git a/tests/uninorm/test-nfkd.c b/tests/uninorm/test-nfkd.c index 1e20d9a..5e374e3 100644 --- a/tests/uninorm/test-nfkd.c +++ b/tests/uninorm/test-nfkd.c @@ -20,7 +20,7 @@ #include "uninorm.h" -#if !(WOE32DLL || defined __ANDROID__) +#if !(((defined _WIN32 || defined __CYGWIN__) && (HAVE_LIBUNISTRING || WOE32DLL)) || defined __ANDROID__) /* Check that UNINORM_NFKD is defined and links. */ uninorm_t n = UNINORM_NFKD; #endif