From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel,gmane.comp.lib.gnulib.bugs Subject: Re: [Emacs-diffs] master 085c7f6 2/2: Test format-time-string with zone arg Date: Tue, 2 May 2017 00:52:03 -0700 Organization: UCLA Computer Science Department Message-ID: <80850259-8972-19b3-6435-2b8b9cc2319b@cs.ucla.edu> References: <20170427222412.28742.14016@vcs0.savannah.gnu.org> <20170427222413.8FBA722040@vcs0.savannah.gnu.org> <07e00044-4ce1-bba8-2fe5-4e7eb7fb27a6@cornell.edu> <269c5353-d07b-5cf0-4009-3d817351c470@cs.ucla.edu> <83h915ja41.fsf@gnu.org> <175dace6-c544-a0ac-2e96-b378b3c6f49d@cs.ucla.edu> <83shkoid2k.fsf@gnu.org> <8836de3f-eeda-ec8d-fff1-ef68ec808389@cs.ucla.edu> <83pofrixf4.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------412F07073AEA36CBE0968E92" X-Trace: blaine.gmane.org 1493711551 28593 195.159.176.226 (2 May 2017 07:52:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 2 May 2017 07:52:31 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 Cc: Gnulib bugs , Bruno Haible , kbrown@cornell.edu, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 02 09:52:26 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d5Sbi-0007LP-I2 for ged-emacs-devel@m.gmane.org; Tue, 02 May 2017 09:52:26 +0200 Original-Received: from localhost ([::1]:57252 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d5Sbo-0006wK-9E for ged-emacs-devel@m.gmane.org; Tue, 02 May 2017 03:52:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57674) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d5Sbf-0006vJ-Rl for emacs-devel@gnu.org; Tue, 02 May 2017 03:52:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d5Sbe-0008DZ-LG for emacs-devel@gnu.org; Tue, 02 May 2017 03:52:23 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:36044) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d5SbX-00087q-V9; Tue, 02 May 2017 03:52:16 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 9B0FE160083; Tue, 2 May 2017 00:52:13 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id iYwnapJYb4US; Tue, 2 May 2017 00:52:12 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 7FEF216008E; Tue, 2 May 2017 00:52:12 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 0jcSZu8a5rNB; Tue, 2 May 2017 00:52:12 -0700 (PDT) Original-Received: from [192.168.1.9] (unknown [47.153.188.248]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 569F6160083; Tue, 2 May 2017 00:52:12 -0700 (PDT) In-Reply-To: <83pofrixf4.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:214510 gmane.comp.lib.gnulib.bugs:37211 Archived-At: This is a multi-part message in MIME format. --------------412F07073AEA36CBE0968E92 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Eli Zaretskii wrote: > the utimens.c file you've brought from Gnulib has 2 problems: > > . it defines WIN32_LEAN_AND_MEAN unconditionally, which conflicts > with our own definition in nt/inc/ms-w32.h, which is processed > earlier; > > . it includes msvc-nothrow.h, which is absent in the repository, it > should have been imported from Gnulib together with utimens.c > > I fixed the first of these temporarily, in a way that at least GCC > lets utimens.c compile, but I think in general utimens.c should do > > #ifndef WIN32_LEAN_AND_MEAN > # define WIN32_LEAN_AND_MEAN > #endif > > to avoid possible clashes with definitions elsewhere in the sources. I'd like Bruno's opinion on the macro clash, and on the attached patch fo= r the=20 msvc-nothrow.h issue, a patch that I installed into Gnulib and into Emacs= master=20 to try to get the Emacs master build working again. For quite some time Emacs has avoided Gnulib's msvc-nothrow and msvc-inva= l=20 modules, the reason for which I do not understand (and don't particularly= want=20 to :-). It's trivial to add the msvc-nothrow and msvc-inval machinery to = the=20 Emacs source code, if this is necessary now for some reason: simply remov= e them=20 from the AVOIDED_MODULES list in admin/merge-gnulib and then run=20 admin/merge-gnulib. I don't know whether this would break other parts of = the=20 build on MS-Windows, though. --------------412F07073AEA36CBE0968E92 Content-Type: text/x-diff; name="0001-utimens-port-to-Emacs-MS-Windows.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-utimens-port-to-Emacs-MS-Windows.patch" =46rom fb26fc4b4ad7db1d12933aefc3d213c6f217092c Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 2 May 2017 00:40:41 -0700 Subject: [PATCH] utimens: port to Emacs + MS-Windows Skip the new MS-Windows-specific code if Emacs. * lib/utimens.c [EMACS_CONFIGUATION]: Avoid new MS-Windows-specific code. (USE_SETFILETIME): New macro. (fdutimens): Use it. --- ChangeLog | 9 +++++++++ lib/utimens.c | 10 ++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ad44003..8c91b23 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2017-05-02 Paul Eggert + + utimens: port to Emacs + MS-Windows + Skip the new MS-Windows-specific code if Emacs. + * lib/utimens.c [EMACS_CONFIGUATION]: + Avoid new MS-Windows-specific code. + (USE_SETFILETIME): New macro. + (fdutimens): Use it. + 2017-05-01 Paul Eggert =20 tzset: update doc for TZ problems on MS-Windows diff --git a/lib/utimens.c b/lib/utimens.c index 0b3b8e2..5f3a846 100644 --- a/lib/utimens.c +++ b/lib/utimens.c @@ -35,7 +35,13 @@ #include "stat-time.h" #include "timespec.h" =20 -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +/* On native Windows, use SetFileTime; but avoid this when compiling + GNU Emacs, which arranges for this in some other way and which + defines WIN32_LEAN_AND_MEAN itself. */ + +#if ((defined _WIN32 || defined __WIN32__) \ + && ! defined __CYGWIN__ && ! defined EMACS_CONFIGURATION) +# define USE_SETFILETIME # define WIN32_LEAN_AND_MEAN # include # include "msvc-nothrow.h" @@ -277,7 +283,7 @@ fdutimens (int fd, char const *file, struct timespec = const timespec[2]) lutimensat_works_really =3D -1; #endif /* HAVE_UTIMENSAT || HAVE_FUTIMENS */ =20 -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +#ifdef USE_SETFILETIME /* On native Windows, use SetFileTime(). See */ --=20 2.7.4 --------------412F07073AEA36CBE0968E92--