From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by sourceware.org (Postfix) with ESMTPS id 7E2553858C66 for ; Wed, 2 Nov 2022 13:10:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7E2553858C66 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-x102b.google.com with SMTP id l22-20020a17090a3f1600b00212fbbcfb78so2049269pjc.3 for ; Wed, 02 Nov 2022 06:10:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=7HFjFEfXnhODVz+KzMNovvxO0yt2aYZxV7v7oKdJSlw=; b=C5jM1YdL+4Jlw+HoqDpk+AQ82ks+vXwnmUf/eU/zIfCe+f6oQI8Kwi705MSSm54WEL 6WsICNe0NR+UajL92xb/xThJNoxsy9BfoXaclJeD06M9FDStg9AWtiieaAZ4GpwmAYvo p6W75r995YrlA8+/0svUbHOVMuIVqi6jyDHmzyOFQHxwKNAVfXgOp1gfRLchYYxJ9O0H lw3uguUh5bCoCHZQOS05BtQ+vYHM9n2ou/0B/h1/Bp58x+7dW49vp1inayO8SzODhcEI JKlMwoCBEvmx2X6qTTElfxDLKxOKSlkBKCGIfg85Bm0qNBv4kurZRcCnOjw7m/jUEJF0 Exhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7HFjFEfXnhODVz+KzMNovvxO0yt2aYZxV7v7oKdJSlw=; b=dWEUDDXwZvcS2rcxZ9DK9AsxxxLn8fav/yfNPKelL5ysHxsh2B02Fy0QCj0RMIrDGk J56s7rHc+IpewO0ayOlN5KPrkenDPGhBtn48nWLgjTsYU/BiRzv3KJxuSLyQ9CehGtdq hzK9D8fg+JH0AvkcZ38nRdZ6WtFdl+Ec1/jmztp5CwHopnDj13roh5GXL3rlgdPdDNbp RYtERJfGuYNiClmpgLyCOhILh57cGR4olo8HZMiLOXWWxLkx2UM/d93HTmSu+cw8QcUI TOXaphgW+e9C8ia4a/ZQh+3ucNsY7n6CRq44z1AOlOgtFjSoCCe3jfVfYTLDq9lkaxkO uhlg== X-Gm-Message-State: ACrzQf0Fp77M5j1UbGTgfVAhdWKvPop/50pi7Dg+hscNfpQgDLPihlK0 Nm56VjDQ+gdmqFbNVfIedMQCoGazjGvC73e4pNiAPd4RPRI= X-Google-Smtp-Source: AMsMyM4wMruh9YA+eM3gk9GG391aTvCxsNFxE8syS2HacNs1RxhPg5acomYMs+usUKcmi7/3BfdDDCGgLc9rv8zEOpo= X-Received: by 2002:a17:902:e812:b0:187:2ab:7d6f with SMTP id u18-20020a170902e81200b0018702ab7d6fmr24623493plg.137.1667394633491; Wed, 02 Nov 2022 06:10:33 -0700 (PDT) MIME-Version: 1.0 References: <6485dbfe07e21a1c451b17d3fda5b3d9@autistici.org> <41193fbdb742b1c2d4d7b4ab06561822@autistici.org> <6acd12904c2bedb0a96162354d1ee8dd@autistici.org> <83zgd9a4w7.fsf@gnu.org> In-Reply-To: <83zgd9a4w7.fsf@gnu.org> Reply-To: noloader@gmail.com From: Jeffrey Walton Date: Wed, 2 Nov 2022 09:10:21 -0400 Message-ID: Subject: Re: _WIN32_WINNT redefined? To: Eli Zaretskii Cc: i.nixman@autistici.org, gdb@sourceware.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, Nov 2, 2022 at 9:02 AM Eli Zaretskii via Gdb wrote: > > > Date: Wed, 02 Nov 2022 10:15:01 +0000 > > X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, > > DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_PASS, SPF_PASS, > > TXREP autolearn=ham autolearn_force=no version=3.4.6 > > From: niXman via Gdb > > > > On 2022-11-02 09:46, niXman via Gdb wrote: > > > On 2022-11-02 08:44, niXman via Gdb wrote: > > >> On 2022-11-02 08:21, niXman via Gdb wrote: > > > > > > ok, I did a little research. > > > > > > the `_WIN32_WINNT` is defined in `gdbsupport/common-defs.h` only, but > > > referenced in `gnulib/import/gettimeofdeay.c` and > > > `gnulib/import/stat-w32.c` only, but not directly because those files > > > include `windows,h` and `sdkdkver.h`. thus that `_WIN32_WINNT` define > > > is never used! > > > > > > so I think the best way is to remove that define completely. > > > > > > > > > ideas? > > > > right, with commented out the entire PP block the build was successful! > > This is the wrong solution, IMO. Here's what Microsoft has to say about it: https://learn.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt " To modify the macros, in a header file (for example, in targetver.h, which is included by some project templates that target Windows), add the following lines. #define WINVER 0x0A00 #define _WIN32_WINNT 0x0A00 If I am reading that correctly, there should be a common header file which defines WINVER and _WIN32_WINNT. In my old MFC days, we would set it in a file like . In a non-MFC project, we would set it under the Visual Studio preprocessor macros, which is just CPPFLAGS. Maybe there needs to be a configure option to set the values. Configure would then create the header file with the values. If the configure option is not supplied, then use a sane default value and create the header file. Jeff