all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: Eli Zaretskii <eliz@gnu.org>, Paul Eggert <eggert@cs.ucla.edu>
Cc: bug-gnulib@gnu.org, kbrown@cornell.edu, emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] master 085c7f6 2/2: Test format-time-string with zone arg
Date: Tue, 02 May 2017 23:55:50 +0200	[thread overview]
Message-ID: <3590215.6Xrt2mkima@omega> (raw)
In-Reply-To: <83bmrbi3so.fsf@gnu.org>

Paul Eggert wrote:
> I'd like Bruno's opinion on the macro clash

The common idiom is "#define WINDOWS_LEAN_AND_MEAN". This can be seen by comparing
the number of hits of two web searches:
  https://www.google.de/search?q=%22define+windows_lean_and_mean%22
  https://www.google.de/search?q=%22define+windows_lean_and_mean+1%22

> and on the attached patch for the 
> msvc-nothrow.h issue, a patch that I installed into Gnulib and into Emacs master 

The patch is fine with me: it has no drawbacks for other packages.

However, it would be good to know what qualms you have with the msvc-nothrow
module. Should Emacs be built with mingw, not MSVC? Is an EBADF situation never
going to occur in Emacs anyway? Are the portability efforts for mingw and MSVC
in Gnulib useless for Emacs, because on native Windows Emacs uses its own w32.c
instead anyway? Does Emacs have other requirements I don't know about?

Eli Zaretskii wrote:
> That "other way" is the implementation of fdutimens in Emacs's w32.c.
> Perhaps Bruno could look at that implementation and comment on its
> merits and demerits vs the Gnulib implementation

1) The Emacs w32.c ports to Windows98 as well, whereas Gnulib currently assumes
Windows XP at least (and will soon move to Windows 7, I guess - namely when
no one has a test machine with Windows XP any more). Merit or demerit? Opinion?

2) The Emacs w32.c has an option to use the "W" suffixed Windows APIs by default.
Clearly a merit, because it allows to use file names that are not contained in
the "ANSI codepage". Nowadays users can use (type, display, manipulate) such
file names in the cmd.exe windows; any program which is not on par with this
ability is deficient.
Gnulib still uses the "A" suffixed Windows APIs; clearly a demerit.

3) The Emacs w32.c fdutimens function handles only 1 second resolution; the
Gnulib fdutimens supports sub-second resolution.

4) Different errno mapping:

Filename                            GetLastError()           errno in Emacs   errno in Gnulib

'\\server'                          ERROR_BAD_PATHNAME       EINVAL           ENOENT
'\\server\nonexistentshare\'        ERROR_BAD_NET_NAME       EINVAL           ENOENT
 ?                                  ERROR_INVALID_DRIVE      ENOENT           EINVAL
 ?                                  ERROR_BAD_NETPATH        ENOENT           EINVAL
 ?                                  ERROR_DEV_NOT_EXIST      ENOENT           EINVAL
'C:\System Volume Information\foo'  ERROR_ACCESS_DENIED      EACCES           EACCESS or EPERM (*)
'C:\pagefile.sys'                   ERROR_SHARING_VIOLATION  EACCES           EACCESS or EPERM (*)

(*) According to POSIX: http://pubs.opengroup.org/onlinepubs/9699919799/functions/utime.html

Can you tell me how to provoke a ERROR_INVALID_DRIVE, ERROR_BAD_NETPATH, or
ERROR_DEV_NOT_EXIST error code?

5) Anything else?

Bruno




  reply	other threads:[~2017-05-02 21:55 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20170427222412.28742.14016@vcs0.savannah.gnu.org>
     [not found] ` <20170427222413.8FBA722040@vcs0.savannah.gnu.org>
2017-04-30 20:41   ` [Emacs-diffs] master 085c7f6 2/2: Test format-time-string with zone arg Ken Brown
2017-04-30 20:49     ` Paul Eggert
2017-04-30 21:28       ` Ken Brown
2017-05-01 15:02         ` Eli Zaretskii
2017-05-01 16:59           ` Ken Brown
2017-05-01  7:43       ` Eli Zaretskii
2017-05-01 17:49         ` Paul Eggert
2017-05-01 19:36           ` Eli Zaretskii
2017-05-01 23:05             ` Paul Eggert
2017-05-02  6:29               ` Eli Zaretskii
2017-05-02  7:52                 ` Paul Eggert
2017-05-02 17:09                   ` Eli Zaretskii
2017-05-02 21:55                     ` Bruno Haible [this message]
2017-05-02 22:35                       ` Paul Eggert
2017-05-03 15:49                         ` Eli Zaretskii
2017-05-03 15:33                       ` Eli Zaretskii
2017-05-03 19:33                       ` Davis Herring
2017-05-03 21:12                         ` Billy O'Neal (VC LIBS)
2017-05-04 14:26                           ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3590215.6Xrt2mkima@omega \
    --to=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=kbrown@cornell.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.