From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Collin Funk Newsgroups: gmane.comp.lib.gnulib.bugs,gmane.emacs.devel Subject: Re: Gnulib's boot-time.c breaks the build with mingw.org's MinGW Date: Tue, 04 Jun 2024 11:39:12 -0700 Message-ID: <87ikyok0xb.fsf@gmail.com> References: <86tti8k710.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3830"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Paul Eggert , Bruno Haible , emacs-devel@gnu.org, bug-gnulib@gnu.org To: Eli Zaretskii Original-X-From: bug-gnulib-bounces+gnu-bug-gnulib=m.gmane-mx.org@gnu.org Tue Jun 04 20:40:01 2024 Return-path: Envelope-to: gnu-bug-gnulib@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sEZ4h-0000ix-UM for gnu-bug-gnulib@m.gmane-mx.org; Tue, 04 Jun 2024 20:40:00 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sEZ49-0004FG-4g; Tue, 04 Jun 2024 14:39:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sEZ46-0004Dk-St; Tue, 04 Jun 2024 14:39:22 -0400 Original-Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEZ44-0008Ow-2N; Tue, 04 Jun 2024 14:39:22 -0400 Original-Received: by mail-pj1-x1029.google.com with SMTP id 98e67ed59e1d1-2c1b9152848so4083132a91.1; Tue, 04 Jun 2024 11:39:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717526355; x=1718131155; darn=gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=ItGpsyguXDwA+z3X5odNEaniusZQMS3VIeRJp5ZXfIc=; b=mugQnyshhCDNPKfJTUGupTYx59LDVgpZ3h3rTkgNyBjBebsAWrvITof6CRvYo0O1vb fz9J2myq9JoWdE3gqG6n9apUeRJcJ0MZHcFqxLaX+hawNpZy5yVSLgQTFFoRsTRf9INy oqYunpNVi2zX6H/wNtyyMPRkLRBTvAkwdqncV3Jqz2svL6g76wwBSSIGykyMC7K8IHRy KEo7IEJWUqjE1SLInxuCB9yvy1HhKoSdhEKv6E0TcfDUZ4f2poLXMPB05KigC0IPyIfX 5pXlGh6fqXUq+bWvXHhI8UHI9iaijOLdwsg2/dg2Ey61oAHvR1VneuBhPPGm/GiCfswj MZdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717526355; x=1718131155; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ItGpsyguXDwA+z3X5odNEaniusZQMS3VIeRJp5ZXfIc=; b=UCszX5z7Hix2xR+zdGlvybRFcbnrWDhgNTX7wNeQ19mPsWBqciO2SXegsUMy/UnKf2 rFq95uvBFk0DUJH64vY5iNbM0lrWstVbKAXfewZ2QMRT5m53LvUrAM8Vk3IgG37SGvEo qKnC/g4rx8OE1Kq54IeRjClL/hWj8RhyTgfXdIpKHYMuVd1z3es/aq+it5GaTP+EXW4i JZMoNC2ZJs/zbrKpeFIUiv91ajPv4i3r/PSvMqkg1PalZ/N6poO05g/jTbQD620NrqU0 4JjrJ1gU2SIeNueJb+UzR0rNBbDIP2dAqi6LX8sPx9ICyXjwNltBr9bwp0rG3IuXTd5u fNeA== X-Forwarded-Encrypted: i=1; AJvYcCVpfgB4Uw/E9BnVYxzK/RJspVVViOWko1F+veC4lSBP+18rS2fszGh9vFJpgqUkSFxtG3NujT2QRAAeiwifDWEhDT1LleStFSF6Z70nuGQJ+k0ni7oMyl8= X-Gm-Message-State: AOJu0YzdlqYli6Z7UE7oplGwsN44uk3loNprG5ouPitYVSQPL2mdD4jd 3LEEH7EKH1n7PwRg9/L5yYuIv05NgvlApr6nNA+khMITqw0n+4BcVQskIQ== X-Google-Smtp-Source: AGHT+IG08z6pQ6GiWzAmjGTnh30RdUzEWdJo0umcrPae1RGVB0n4GAR2Xjohzub1Od/tkBHQFZoFTw== X-Received: by 2002:a17:90a:c208:b0:2c2:7bcf:cbce with SMTP id 98e67ed59e1d1-2c27db68d8bmr261269a91.49.1717526355027; Tue, 04 Jun 2024 11:39:15 -0700 (PDT) Original-Received: from fedora (c-73-189-213-139.hsd1.ca.comcast.net. [73.189.213.139]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2c1c27cb32asm9476424a91.15.2024.06.04.11.39.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 11:39:14 -0700 (PDT) In-Reply-To: <86tti8k710.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 04 Jun 2024 19:27:23 +0300") Received-SPF: pass client-ip=2607:f8b0:4864:20::1029; envelope-from=collin.funk1@gmail.com; helo=mail-pj1-x1029.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+gnu-bug-gnulib=m.gmane-mx.org@gnu.org Original-Sender: bug-gnulib-bounces+gnu-bug-gnulib=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.comp.lib.gnulib.bugs:50699 gmane.emacs.devel:319823 Archived-At: --=-=-= Content-Type: text/plain Hi Eli, Eli Zaretskii writes: > However, that header is not really needed here because the > signature of the GetTickCount64 function, which boot-time-aux.h now > calls, is completely defined in boot-time-aux.h: > > typedef ULONGLONG (WINAPI * GetTickCount64FuncType) (void); [...] > So I think the Gnulib code should be amended not to include > sysinfoapi.h. For the time being I made a local change in Emacs, to > be able to build the master branch with MinGW, but I don't think it's > an Emacs-specific issue. Thanks for the report. This code was a backup method for getting the boot time on Windows that I added recently. On my system #include includes which then includes unconditionally. Therefore you are correct that there is no need to include it. I've applied the attached patch in Gnulib fixing this. Were you using an older Windows version perhaps? For older systems where the function isn't declared in headers (_WIN32_WINNT < _WIN32_WINNT_VISTA) the dll is loaded and it tries to get the function address from there. Note that the line of code you sent is a typedef not a declaration. :) Collin --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-boot-time-readutmp-Fix-missing-MinGW-include-regr.-2.patch >From c41b3f92e3b0e9bd42d0ac05d80f3d23b00b28d2 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Tue, 4 Jun 2024 11:21:04 -0700 Subject: [PATCH] boot-time, readutmp: Fix missing MinGW include (regr. 2024-05-24). Reported by Eli Zaretskii in: . * lib/boot-time.c [_WIN32 && !__CYGWIN__]: Remove unnecessary include. Some systems do not have this header and should have the correct declarations. * lib/readutmp.c [_WIN32 && !__CYGWIN__]: Likewise. --- ChangeLog | 10 ++++++++++ lib/boot-time.c | 1 - lib/readutmp.c | 1 - 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 787edff23d..1200ec0ec8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2024-06-04 Collin Funk + + boot-time, readutmp: Fix missing MinGW include (regr. 2024-05-24). + Reported by Eli Zaretskii in: + . + * lib/boot-time.c [_WIN32 && !__CYGWIN__]: Remove unnecessary + include. Some systems do not have this header and + should have the correct declarations. + * lib/readutmp.c [_WIN32 && !__CYGWIN__]: Likewise. + 2024-06-03 Paul Eggert nstrftime: remove dependency on hard-locale diff --git a/lib/boot-time.c b/lib/boot-time.c index 71562dcf75..515fc48069 100644 --- a/lib/boot-time.c +++ b/lib/boot-time.c @@ -46,7 +46,6 @@ #if defined _WIN32 && ! defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN # include -# include # include #endif diff --git a/lib/readutmp.c b/lib/readutmp.c index 82b9d4ca33..10d79d1d81 100644 --- a/lib/readutmp.c +++ b/lib/readutmp.c @@ -54,7 +54,6 @@ #if defined _WIN32 && ! defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN # include -# include # include #endif -- 2.45.1 --=-=-=--