diff options
| author | Paul Eggert <eggert@cs.ucla.edu> | 2025-11-06 10:58:30 -0800 |
|---|---|---|
| committer | Paul Eggert <eggert@cs.ucla.edu> | 2025-11-06 12:02:53 -0800 |
| commit | 7654ec5e953f25499cfabe7da08e10d94379781f (patch) | |
| tree | 8aa0edae79ee3a0d75d82d3d72a3c8847031b6bd /lib | |
| parent | 0c694624c3b2aec6a8d036bbbb8c30b83437631b (diff) | |
Update from Gnulib by running admin/merge-gnulib
* admin/merge-gnulib (GNULIB_MODULES): Add stdio-windows.
Also, sort and remove duplicates.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/acl_entries.c | 11 | ||||
| -rw-r--r-- | lib/gnulib.mk.in | 23 | ||||
| -rw-r--r-- | lib/nproc.c | 4 |
3 files changed, 27 insertions, 11 deletions
diff --git a/lib/acl_entries.c b/lib/acl_entries.c index b78ba18a656..7b44e694896 100644 --- a/lib/acl_entries.c +++ b/lib/acl_entries.c @@ -22,7 +22,10 @@ #include "acl-internal.h" /* This file assumes POSIX-draft like ACLs - (Linux, FreeBSD, NetBSD >= 10, Mac OS X, Cygwin >= 2.5). */ + (Linux, FreeBSD, NetBSD >= 10, Mac OS X, Cygwin >= 2.5). + + It is compiled only on systems that do not have the acl_entries() function + (in libc or libacl). */ /* Return the number of entries in ACL. Return -1 and set errno upon failure to determine it. */ @@ -34,7 +37,8 @@ acl_entries (acl_t acl) if (acl != NULL) { -#if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */ +#if HAVE_ACL_FIRST_ENTRY /* Linux, FreeBSD, NetBSD >= 10, Mac OS X, Cygwin >= 2.5 */ +# if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */ /* acl_get_entry returns 0 when it successfully fetches an entry, and -1/EINVAL at the end. */ acl_entry_t ace; @@ -44,7 +48,7 @@ acl_entries (acl_t acl) got_one >= 0; got_one = acl_get_entry (acl, ACL_NEXT_ENTRY, &ace)) count++; -#else /* Linux, FreeBSD, NetBSD >= 10, Cygwin >= 2.5 */ +# else /* Linux, FreeBSD, NetBSD >= 10, Cygwin >= 2.5 */ /* acl_get_entry returns 1 when it successfully fetches an entry, and 0 at the end. */ acl_entry_t ace; @@ -56,6 +60,7 @@ acl_entries (acl_t acl) count++; if (got_one < 0) return -1; +# endif #endif } diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in index f158acef91f..e655023878e 100644 --- a/lib/gnulib.mk.in +++ b/lib/gnulib.mk.in @@ -166,7 +166,9 @@ # stdckdint-h \ # stddef-h \ # stdio-h \ +# stdio-windows \ # stpcpy \ +# stringeq \ # strnlen \ # strtoimax \ # symlink \ @@ -295,6 +297,7 @@ GIF_CFLAGS = @GIF_CFLAGS@ GL_CFLAG_ALLOW_WARNINGS = @GL_CFLAG_ALLOW_WARNINGS@ GL_CFLAG_GNULIB_WARNINGS = @GL_CFLAG_GNULIB_WARNINGS@ GL_COND_LIBTOOL_CONDITION = @GL_COND_LIBTOOL_CONDITION@ +GL_COND_OBJ_ACL_ENTRIES_CONDITION = @GL_COND_OBJ_ACL_ENTRIES_CONDITION@ GL_COND_OBJ_CANONICALIZE_LGPL_CONDITION = @GL_COND_OBJ_CANONICALIZE_LGPL_CONDITION@ GL_COND_OBJ_COPY_FILE_RANGE_CONDITION = @GL_COND_OBJ_COPY_FILE_RANGE_CONDITION@ GL_COND_OBJ_DIRFD_CONDITION = @GL_COND_OBJ_DIRFD_CONDITION@ @@ -1588,10 +1591,11 @@ endif ifeq (,$(OMIT_GNULIB_MODULE_acl-permissions)) libgnu_a_SOURCES += acl-errno-valid.c acl-internal.c get-permissions.c set-permissions.c +ifneq (,$(GL_COND_OBJ_ACL_ENTRIES_CONDITION)) +libgnu_a_SOURCES += acl_entries.c +endif -EXTRA_DIST += acl-internal.h acl.h acl_entries.c - -EXTRA_libgnu_a_SOURCES += acl_entries.c +EXTRA_DIST += acl-internal.h acl.h endif ## end gnulib module acl-permissions @@ -3502,9 +3506,6 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(AM_V_at)mv $@-t3 $@ MOSTLYCLEANFILES += stdio.h stdio.h-t1 stdio.h-t2 stdio.h-t3 -ifneq (,$(GL_COND_OBJ_STDIO_CONSOLESAFE_CONDITION)) -libgnu_a_SOURCES += stdio-consolesafe.c -endif ifneq (,$(GL_COND_OBJ_STDIO_READ_CONDITION)) libgnu_a_SOURCES += stdio-read.c endif @@ -3517,6 +3518,16 @@ EXTRA_DIST += stdio.in.h endif ## end gnulib module stdio-h +## begin gnulib module stdio-windows +ifeq (,$(OMIT_GNULIB_MODULE_stdio-windows)) + +ifneq (,$(GL_COND_OBJ_STDIO_CONSOLESAFE_CONDITION)) +libgnu_a_SOURCES += stdio-consolesafe.c +endif + +endif +## end gnulib module stdio-windows + ## begin gnulib module stdlib-h ifeq (,$(OMIT_GNULIB_MODULE_stdlib-h)) diff --git a/lib/nproc.c b/lib/nproc.c index e899ff17620..9404be1d384 100644 --- a/lib/nproc.c +++ b/lib/nproc.c @@ -22,7 +22,7 @@ #include <errno.h> #include <limits.h> -#if HAVE_MNTENT_H +#if HAVE_SETMNTENT # include <mntent.h> #endif #include <stdlib.h> @@ -385,7 +385,7 @@ cgroup2_mount (void) if (access ("/sys/fs/cgroup/cgroup.controllers", F_OK) == 0) return strdup ("/sys/fs/cgroup"); -#if HAVE_MNTENT_H +#if HAVE_SETMNTENT /* Otherwise look for the mount point. */ struct mntent *mnt; if (! (fp = setmntent ("/proc/mounts", "r"))) |
