bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* Re: bug#33847: 27.0.50; emacsclient does not find server socket
       [not found]                                                   ` <83a6maykcf.fsf@gnu.org>
@ 2021-07-25 16:22                                                     ` Paul Eggert
  2021-07-25 16:34                                                       ` Eli Zaretskii
  2021-10-04  6:45                                                       ` Paul Eggert
  0 siblings, 2 replies; 3+ messages in thread
From: Paul Eggert @ 2021-07-25 16:22 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 33847, larsi, Gnulib bugs, teika, ulm

On 7/24/21 11:32 PM, Eli Zaretskii wrote:

>> No modules are affected by the --disable-year2038 option on MS-Windows.

It turns out that I was wrong about that. (I don't normally look at the 
MS-Windows part of Gnulib and misunderstood some of the code I was 
reading.) Please see gnulib/m4/year2038.m4 for details. This file is in 
the patches I sent, or you can see it directly here:

https://git.savannah.gnu.org/cgit/gnulib.git/tree/m4/year2038.m4

This code knows about MS-Windows, Mingw, _USE_32BIT_TIME_T, 
__MINGW_USE_VC2005_COMPAT, and so forth, and attempts to do the right 
thing. As near as I can make out it should work for the scenario you 
describe, but I don't use MS-Windows so I could well be wrong. If I'm 
wrong and this code doesn't do what you want, I suggest contacting 
bug-gnulib to alert Bruno Haible, who wrote that part of the code. I'll 
cc bug-gnulib so that Bruno sees this email. (Bruno, this discussion is 
at <https://bugs.gnu.org/33847#161>.)

Here's some more background. There are two Gnulib modules involved.

The largefile module ensures that a program can open/stat/etc. all 
files, by widening types like off_t, dev_t and time_t if necessary. If 
it finds that time_t is narrower than what the system can support, it 
attempts to widen time_t; if this attempt fails it issues a warning but 
continues.

The year2038 module is stricter: it insists that time_t be at least 64 
bits and aborts 'configure' otherwise. (Strictly speaking, it should 
insist only on at least 33 bits (or 32 bits unsigned); I suppose I 
should look into fixing that.)

The Emacs patches that I sent do not use the year2038 module, because I 
expected that you wouldn't want to worry about the year 2038. The 
year2038 module is used by GNU packages like coreutils where Y2038 is a 
problem even now, due to the long lead times and lack of updatability on 
systems that use these other GNU packages.

> So therefore my question seems to be even more important than I
> thought, and I'm still asking which Gnulib modules are affected by
> this, because I'd need to audit them carefully to see whether the
> 32-bit MS-Windows build with mingw.org's MinGW could be affected.

There should be no need to audit, because Gnulib still supports 
platforms that have only 32-bit time_t.

Gnulib is agnostic about time_t width, and is supposed to work even if 
time_t is 40 bits (which it is on a very few mainframes) or any other 
width. We regularly test it only on 32- and 64-bit time_t, though.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: bug#33847: 27.0.50; emacsclient does not find server socket
  2021-07-25 16:22                                                     ` bug#33847: 27.0.50; emacsclient does not find server socket Paul Eggert
@ 2021-07-25 16:34                                                       ` Eli Zaretskii
  2021-10-04  6:45                                                       ` Paul Eggert
  1 sibling, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2021-07-25 16:34 UTC (permalink / raw)
  To: Paul Eggert; +Cc: 33847, larsi, bug-gnulib, teika, ulm

> Cc: larsi@gnus.org, teika@gmx.com, 33847@debbugs.gnu.org, ulm@gentoo.org,
>  Gnulib bugs <bug-gnulib@gnu.org>
> From: Paul Eggert <eggert@cs.ucla.edu>
> Date: Sun, 25 Jul 2021 09:22:06 -0700
> 
> On 7/24/21 11:32 PM, Eli Zaretskii wrote:
> 
> >> No modules are affected by the --disable-year2038 option on MS-Windows.
> 
> It turns out that I was wrong about that. (I don't normally look at the 
> MS-Windows part of Gnulib and misunderstood some of the code I was 
> reading.) Please see gnulib/m4/year2038.m4 for details. This file is in 
> the patches I sent, or you can see it directly here:
> 
> https://git.savannah.gnu.org/cgit/gnulib.git/tree/m4/year2038.m4
> 
> This code knows about MS-Windows, Mingw, _USE_32BIT_TIME_T, 
> __MINGW_USE_VC2005_COMPAT, and so forth, and attempts to do the right 
> thing. As near as I can make out it should work for the scenario you 
> describe, but I don't use MS-Windows so I could well be wrong. If I'm 
> wrong and this code doesn't do what you want, I suggest contacting 
> bug-gnulib to alert Bruno Haible, who wrote that part of the code. I'll 
> cc bug-gnulib so that Bruno sees this email. (Bruno, this discussion is 
> at <https://bugs.gnu.org/33847#161>.)

Thanks, I will take a look, although I now understand it isn't urgent,
since Emacs doesn't (yet) use the year2038 module.

> > So therefore my question seems to be even more important than I
> > thought, and I'm still asking which Gnulib modules are affected by
> > this, because I'd need to audit them carefully to see whether the
> > 32-bit MS-Windows build with mingw.org's MinGW could be affected.
> 
> There should be no need to audit, because Gnulib still supports 
> platforms that have only 32-bit time_t.
> 
> Gnulib is agnostic about time_t width, and is supposed to work even if 
> time_t is 40 bits (which it is on a very few mainframes) or any other 
> width. We regularly test it only on 32- and 64-bit time_t, though.

Thanks, that's good to know.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: bug#33847: 27.0.50; emacsclient does not find server socket
  2021-07-25 16:22                                                     ` bug#33847: 27.0.50; emacsclient does not find server socket Paul Eggert
  2021-07-25 16:34                                                       ` Eli Zaretskii
@ 2021-10-04  6:45                                                       ` Paul Eggert
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Eggert @ 2021-10-04  6:45 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 33847, Gnulib bugs, ulm, Stefan Kangas, larsi, teika

I finally got around to installing into the emacs-28 branch the 
emacsclient.c patch that was the first patch in my July 24 email, 
archived here:

https://debbugs.gnu.org/33847#161

I reworked that email's remaining patches (which updated from Gnulib), 
and today posted the reworked versions into a later bug report, here:

https://debbugs.gnu.org/50985#11

and I plan to follow up in that bug report.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-04  6:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu>
     [not found] ` <w6gd0pm41ic.fsf@kph.uni-mainz.de>
     [not found]   ` <fb7b029e-e786-077d-9aab-b3047797b5e2@cs.ucla.edu>
     [not found]     ` <w6g4lay3zzx.fsf@kph.uni-mainz.de>
     [not found]       ` <e293a1e9-e042-bb42-6b40-d887d60d98c5@cs.ucla.edu>
     [not found]         ` <w6g7eezw6pg.fsf@kph.uni-mainz.de>
     [not found]           ` <w6g8syo11k5.fsf@kph.uni-mainz.de>
     [not found]             ` <E917B438-BF4F-43C6-BBB2-5DDE99DADF05@gnu.org>
     [not found]               ` <87eeo27v6k.fsf@gnus.org>
     [not found]                 ` <d6c347f3-9cd3-e9e5-58f9-8ed9af743c73@cs.ucla.edu>
     [not found]                   ` <83lfi79klf.fsf@gnu.org>
     [not found]                     ` <d48925e6-9273-b516-72e6-e2e5dbae6dcf@cs.ucla.edu>
     [not found]                       ` <831rjya5yy.fsf@gnu.org>
     [not found]                         ` <8333533f-08ec-acd4-2fbf-f06e78591e98@cs.ucla.edu>
     [not found]                           ` <83v9h99awv.fsf@gnu.org>
     [not found]                             ` <878s1yjy20.fsf@gnus.org>
     [not found]                               ` <83lf5y2t78.fsf@gnu.org>
     [not found]                                 ` <878s1yi8jc.fsf@gnus.org>
     [not found]                                   ` <83h7gm2r4j.fsf@gnu.org>
     [not found]                                     ` <87wnphe06g.fsf@gnus.org>
     [not found]                                       ` <87r1fpdzuy.fsf@gnus.org>
     [not found]                                         ` <d40c1fec-cf1a-6d4e-84b1-983e61d8aece@cs.ucla.edu>
     [not found]                                           ` <838s1w1b7x.fsf@gnu.org>
     [not found]                                             ` <5f457b50-c1bd-4856-33c7-f85edf111bd0@cs.ucla.edu>
     [not found]                                               ` <83v950yv7i.fsf@gnu.org>
     [not found]                                                 ` <5d2f6394-2fc0-e20a-9018-0ea59f399ba2@cs.ucla.edu>
     [not found]                                                   ` <83a6maykcf.fsf@gnu.org>
2021-07-25 16:22                                                     ` bug#33847: 27.0.50; emacsclient does not find server socket Paul Eggert
2021-07-25 16:34                                                       ` Eli Zaretskii
2021-10-04  6:45                                                       ` Paul Eggert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).