Branch
Hash :
4aa26bff
Author :
Date :
2025-08-18T15:44:48
sys_stat: Fix namespace pollution on native Windows. * lib/issymlink.h: New file, extracted from lib/sys_stat.in.h. * lib/issymlink.c: Include issymlink.h instead of <sys/stat.h>. * lib/issymlinkat.c: Likewise. * modules/issymlink (Files): Add lib/issymlink.h. (Depends-on): Add extern-inline. (configure.ac): Use gl_MODULE_INDICATOR. (Include): Set to "issymlink.h". * modules/issymlinkat (Files): Add lib/issymlink.h. (Depends-on): Add extern-inline. (configure.ac): Use gl_MODULE_INDICATOR. (Include): Set to "issymlink.h". * lib/sys_stat.in.h: Don't include <errno.h>, <unistd.h>. (_GL_ISSYMLINK_INLINE, _GL_ISSYMLINKAT_INLINE): Remove macros. (issymlink, issymlinkat): Remove functions. * m4/sys_stat_h.m4 (gl_SYS_STAT_H_REQUIRE_DEFAULTS): Don't initialize GNULIB_ISSYMLINK, GNULIB_ISSYMLINKAT. * modules/sys_stat-h (Depends-on): Remove extern-inline. (Makefile.am): Don't substitute GNULIB_ISSYMLINK, GNULIB_ISSYMLINKAT. * lib/chown.c: Include issymlink.h. * lib/lchown.c: Likewise. * lib/lchmod.c: Likewise. * lib/fchmodat.c: Likewise. * lib/rename.c: Likewise. * lib/renameatu.c: Likewise. * lib/unlink.c: Likewise. * lib/unlinkat.c: Likewise. * lib/utimens.c: Likewise.
/* Test whether a file is a symbolic link.
Copyright (C) 2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
#define _GL_ISSYMLINK_INLINE _GL_EXTERN_INLINE
#include "issymlink.h"