From 10f9383f2614fb217c34987c6ac04c7f03c05c72 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 25 May 2024 15:48:32 +0200 Subject: [PATCH] euidaccess: Fix test failure on native Windows. * lib/euidaccess.c: Don't include . (euidaccess): On native Windows, invoke access, not _access. --- ChangeLog | 6 ++++++ lib/euidaccess.c | 8 +++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 36b3fb03ae..893510feb4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-05-25 Bruno Haible + + euidaccess: Fix test failure on native Windows. + * lib/euidaccess.c: Don't include . + (euidaccess): On native Windows, invoke access, not _access. + 2024-05-25 Bruno Haible uchar-c23: Speed up mbrtoc32 on Solaris 11.4. diff --git a/lib/euidaccess.c b/lib/euidaccess.c index c2ecbeff52..6229f2c0d0 100644 --- a/lib/euidaccess.c +++ b/lib/euidaccess.c @@ -1,6 +1,6 @@ /* euidaccess -- check if effective user id can access file - Copyright (C) 1990-1991, 1995, 1998, 2000, 2003-2006, 2008-2023 Free + Copyright (C) 1990-1991, 1995, 1998, 2000, 2003-2006, 2008-2024 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -29,9 +29,7 @@ #include #include #include -#if defined _WIN32 && ! defined __CYGWIN__ -# include -#else +#if !(defined _WIN32 && ! defined __CYGWIN__) # include "root-uid.h" #endif @@ -88,7 +86,7 @@ euidaccess (const char *file, int mode) #elif HAVE_EACCESS /* FreeBSD */ return eaccess (file, mode); #elif defined _WIN32 && ! defined __CYGWIN__ /* mingw */ - return _access (file, mode); + return access (file, mode); #else /* Mac OS X, NetBSD, OpenBSD, HP-UX, Solaris, Cygwin, BeOS */ uid_t uid = getuid (); -- 2.39.5