bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

new module 'access'


From: Bruno Haible
Subject: new module 'access'
Date: Sun, 15 Sep 2019 19:11:25 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-159-generic; KDE/5.18.0; x86_64; ; )

Paul Smith wrote:
> * lib/findprog-in.c (find_in_given_path): Save errno if it is not ENOENT

While testing whether 'access' really sets errno on native Windows, I found
that:
  - Yes, it does so.
  - But access() with argument X_OK crashes on MSVC. On mingw, it works only
    because mingw links to an older version of the runtime library than MSVC.

So, I'm adding a new module 'access' that makes access(file,X_OK) work
portably.


2019-09-15  Bruno Haible  <address@hidden>

        access: New module.
        * lib/unistd.in.h (access): New declaration.
        * lib/access.c: New file.
        * m4/access.m4: New file.
        * m4/unistd_h.m4 (gl_UNISTD_H): Test whether access is declared.
        (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_ACCESS, REPLACE_ACCESS.
        * modules/unistd (Makefile.am): Substitute GNULIB_ACCESS,
        REPLACE_ACCESS.
        * modules/access: New file.
        * tests/test-unistd-c++.cc (access): Check signature.
        * doc/posix-functions/access.texi: Mention the new module.

        access: Add tests.
        * tests/test-access.c: New file.
        * modules/access-tests: New file.

        findprog, findprog-lgpl, findprog-in: Fix crash on MSVC.
        * modules/findprog (Depends-on): Add access.
        * modules/findprog-lgpl (Depends-on): Likewise.
        * modules/findprog-in (Depends-on): Likewise.

Attachment: 0001-access-New-module.patch
Description: Text Data

Attachment: 0002-access-Add-tests.patch
Description: Text Data

Attachment: 0003-findprog-findprog-lgpl-findprog-in-Fix-crash-on-MSVC.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]