From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id DFrrGm5sYmP1LRMAWB0awg (envelope-from ) for ; Wed, 02 Nov 2022 09:11:10 -0400 Received: by simark.ca (Postfix, from userid 112) id 61FC41E124; Wed, 2 Nov 2022 09:11:10 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=paxqkgaD; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 4FD5F1E0CB for ; Wed, 2 Nov 2022 09:11:06 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7B6363857C4C for ; Wed, 2 Nov 2022 13:11:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7B6363857C4C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667394663; bh=7HFjFEfXnhODVz+KzMNovvxO0yt2aYZxV7v7oKdJSlw=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=paxqkgaDuw+Q66yok+C0Pq95UqkkSlRKTQjaL2fTYQ2eeki45fb3AO029LNC91bOp ULJt1ZmTzy6u0tJ8d9YnhAR0UVBpwoXcjqhIXjmO1p82pbaW32sEL9ktW5xQW/sTa/ zdlb3mnOoNCNVfCtOWn5OCiSZ6l6jEmy1HEj0vlg= 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 Received: by mail-pj1-x102b.google.com with SMTP id l22-20020a17090a3f1600b00212fbbcfb78so2049269pjc.3 for ; Wed, 02 Nov 2022 06:10:34 -0700 (PDT) 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> Date: Wed, 2 Nov 2022 09:10:21 -0400 Message-ID: Subject: Re: _WIN32_WINNT redefined? To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Jeffrey Walton via Gdb Reply-To: noloader@gmail.com Cc: gdb@sourceware.org Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" 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