mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 09:14:18 +00:00
Update from Gnulib by running admin/merge-gnulib
* admin/merge-gnulib (GNULIB_MODULES): Add stdio-windows. Also, sort and remove duplicates.
This commit is contained in:
parent
0c694624c3
commit
7654ec5e95
7 changed files with 56 additions and 29 deletions
|
|
@ -48,10 +48,10 @@ GNULIB_MODULES='
|
||||||
qcopy-acl readlink readlinkat realloc-posix regex
|
qcopy-acl readlink readlinkat realloc-posix regex
|
||||||
sig2str sigdescr_np socklen stat-time std-gnu11
|
sig2str sigdescr_np socklen stat-time std-gnu11
|
||||||
stdc_bit_width stdc_count_ones stdc_trailing_zeros
|
stdc_bit_width stdc_count_ones stdc_trailing_zeros
|
||||||
stdckdint-h stddef-h stdio-h
|
stdckdint-h stddef-h stdio-h stdio-windows
|
||||||
stpcpy stringeq strnlen strnlen strtoimax symlink sys_stat-h sys_time-h
|
stpcpy stringeq strnlen strtoimax symlink sys_stat-h sys_time-h
|
||||||
tempname time-h time_r time_rz timegm timer-time timespec-add timespec-sub
|
tempname time-h time_r time_rz timegm timer-time timespec-add timespec-sub
|
||||||
update-copyright unlocked-io utimensat
|
unlocked-io update-copyright utimensat
|
||||||
vla warnings year2038
|
vla warnings year2038
|
||||||
'
|
'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,10 @@
|
||||||
#include "acl-internal.h"
|
#include "acl-internal.h"
|
||||||
|
|
||||||
/* This file assumes POSIX-draft like ACLs
|
/* 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 the number of entries in ACL.
|
||||||
Return -1 and set errno upon failure to determine it. */
|
Return -1 and set errno upon failure to determine it. */
|
||||||
|
|
@ -34,7 +37,8 @@ acl_entries (acl_t acl)
|
||||||
|
|
||||||
if (acl != NULL)
|
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,
|
/* acl_get_entry returns 0 when it successfully fetches an entry,
|
||||||
and -1/EINVAL at the end. */
|
and -1/EINVAL at the end. */
|
||||||
acl_entry_t ace;
|
acl_entry_t ace;
|
||||||
|
|
@ -44,7 +48,7 @@ acl_entries (acl_t acl)
|
||||||
got_one >= 0;
|
got_one >= 0;
|
||||||
got_one = acl_get_entry (acl, ACL_NEXT_ENTRY, &ace))
|
got_one = acl_get_entry (acl, ACL_NEXT_ENTRY, &ace))
|
||||||
count++;
|
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,
|
/* acl_get_entry returns 1 when it successfully fetches an entry,
|
||||||
and 0 at the end. */
|
and 0 at the end. */
|
||||||
acl_entry_t ace;
|
acl_entry_t ace;
|
||||||
|
|
@ -56,6 +60,7 @@ acl_entries (acl_t acl)
|
||||||
count++;
|
count++;
|
||||||
if (got_one < 0)
|
if (got_one < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,9 @@
|
||||||
# stdckdint-h \
|
# stdckdint-h \
|
||||||
# stddef-h \
|
# stddef-h \
|
||||||
# stdio-h \
|
# stdio-h \
|
||||||
|
# stdio-windows \
|
||||||
# stpcpy \
|
# stpcpy \
|
||||||
|
# stringeq \
|
||||||
# strnlen \
|
# strnlen \
|
||||||
# strtoimax \
|
# strtoimax \
|
||||||
# symlink \
|
# symlink \
|
||||||
|
|
@ -295,6 +297,7 @@ GIF_CFLAGS = @GIF_CFLAGS@
|
||||||
GL_CFLAG_ALLOW_WARNINGS = @GL_CFLAG_ALLOW_WARNINGS@
|
GL_CFLAG_ALLOW_WARNINGS = @GL_CFLAG_ALLOW_WARNINGS@
|
||||||
GL_CFLAG_GNULIB_WARNINGS = @GL_CFLAG_GNULIB_WARNINGS@
|
GL_CFLAG_GNULIB_WARNINGS = @GL_CFLAG_GNULIB_WARNINGS@
|
||||||
GL_COND_LIBTOOL_CONDITION = @GL_COND_LIBTOOL_CONDITION@
|
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_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_COPY_FILE_RANGE_CONDITION = @GL_COND_OBJ_COPY_FILE_RANGE_CONDITION@
|
||||||
GL_COND_OBJ_DIRFD_CONDITION = @GL_COND_OBJ_DIRFD_CONDITION@
|
GL_COND_OBJ_DIRFD_CONDITION = @GL_COND_OBJ_DIRFD_CONDITION@
|
||||||
|
|
@ -1588,10 +1591,11 @@ endif
|
||||||
ifeq (,$(OMIT_GNULIB_MODULE_acl-permissions))
|
ifeq (,$(OMIT_GNULIB_MODULE_acl-permissions))
|
||||||
|
|
||||||
libgnu_a_SOURCES += acl-errno-valid.c acl-internal.c get-permissions.c set-permissions.c
|
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_DIST += acl-internal.h acl.h
|
||||||
|
|
||||||
EXTRA_libgnu_a_SOURCES += acl_entries.c
|
|
||||||
|
|
||||||
endif
|
endif
|
||||||
## end gnulib module acl-permissions
|
## 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 $@
|
$(AM_V_at)mv $@-t3 $@
|
||||||
MOSTLYCLEANFILES += stdio.h stdio.h-t1 stdio.h-t2 stdio.h-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))
|
ifneq (,$(GL_COND_OBJ_STDIO_READ_CONDITION))
|
||||||
libgnu_a_SOURCES += stdio-read.c
|
libgnu_a_SOURCES += stdio-read.c
|
||||||
endif
|
endif
|
||||||
|
|
@ -3517,6 +3518,16 @@ EXTRA_DIST += stdio.in.h
|
||||||
endif
|
endif
|
||||||
## end gnulib module stdio-h
|
## 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
|
## begin gnulib module stdlib-h
|
||||||
ifeq (,$(OMIT_GNULIB_MODULE_stdlib-h))
|
ifeq (,$(OMIT_GNULIB_MODULE_stdlib-h))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#if HAVE_MNTENT_H
|
#if HAVE_SETMNTENT
|
||||||
# include <mntent.h>
|
# include <mntent.h>
|
||||||
#endif
|
#endif
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
@ -385,7 +385,7 @@ cgroup2_mount (void)
|
||||||
if (access ("/sys/fs/cgroup/cgroup.controllers", F_OK) == 0)
|
if (access ("/sys/fs/cgroup/cgroup.controllers", F_OK) == 0)
|
||||||
return strdup ("/sys/fs/cgroup");
|
return strdup ("/sys/fs/cgroup");
|
||||||
|
|
||||||
#if HAVE_MNTENT_H
|
#if HAVE_SETMNTENT
|
||||||
/* Otherwise look for the mount point. */
|
/* Otherwise look for the mount point. */
|
||||||
struct mntent *mnt;
|
struct mntent *mnt;
|
||||||
if (! (fp = setmntent ("/proc/mounts", "r")))
|
if (! (fp = setmntent ("/proc/mounts", "r")))
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
# acl.m4
|
# acl.m4
|
||||||
# serial 39
|
# serial 40
|
||||||
dnl Copyright (C) 2002, 2004-2025 Free Software Foundation, Inc.
|
dnl Copyright (C) 2002, 2004-2025 Free Software Foundation, Inc.
|
||||||
dnl This file is free software; the Free Software Foundation
|
dnl This file is free software; the Free Software Foundation
|
||||||
dnl gives unlimited permission to copy and/or distribute it,
|
dnl gives unlimited permission to copy and/or distribute it,
|
||||||
|
|
@ -28,6 +28,7 @@ AC_DEFUN_ONCE([gl_FUNC_ACL],
|
||||||
AC_CHECK_FUNCS_ONCE([fchmod])
|
AC_CHECK_FUNCS_ONCE([fchmod])
|
||||||
LIB_ACL=
|
LIB_ACL=
|
||||||
use_acl=0
|
use_acl=0
|
||||||
|
NEED_ACL_ENTRIES=0
|
||||||
if test "$enable_acl" != no; then
|
if test "$enable_acl" != no; then
|
||||||
dnl On all platforms, the ACL related API is declared in <sys/acl.h>.
|
dnl On all platforms, the ACL related API is declared in <sys/acl.h>.
|
||||||
AC_CHECK_HEADERS([sys/acl.h])
|
AC_CHECK_HEADERS([sys/acl.h])
|
||||||
|
|
@ -55,7 +56,10 @@ AC_DEFUN_ONCE([gl_FUNC_ACL],
|
||||||
if test $use_acl = 1; then
|
if test $use_acl = 1; then
|
||||||
dnl On GNU/Linux, an additional API is declared in <acl/libacl.h>.
|
dnl On GNU/Linux, an additional API is declared in <acl/libacl.h>.
|
||||||
AC_CHECK_HEADERS([acl/libacl.h])
|
AC_CHECK_HEADERS([acl/libacl.h])
|
||||||
AC_REPLACE_FUNCS([acl_entries])
|
AC_CHECK_FUNC([acl_entries],
|
||||||
|
[AC_DEFINE([HAVE_ACL_ENTRIES], [1],
|
||||||
|
[Define to 1 if libc or libacl defines the function acl_entries.])],
|
||||||
|
[NEED_ACL_ENTRIES=1])
|
||||||
AC_CACHE_CHECK([for ACL_FIRST_ENTRY],
|
AC_CACHE_CHECK([for ACL_FIRST_ENTRY],
|
||||||
[gl_cv_acl_ACL_FIRST_ENTRY],
|
[gl_cv_acl_ACL_FIRST_ENTRY],
|
||||||
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
|
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
|
||||||
|
|
|
||||||
|
|
@ -192,6 +192,7 @@ AC_DEFUN([gl_EARLY],
|
||||||
# Code from module stdint-h:
|
# Code from module stdint-h:
|
||||||
# Code from module stdio-h:
|
# Code from module stdio-h:
|
||||||
gl_STDIO_H_EARLY
|
gl_STDIO_H_EARLY
|
||||||
|
# Code from module stdio-windows:
|
||||||
# Code from module stdlib-h:
|
# Code from module stdlib-h:
|
||||||
# Code from module stpcpy:
|
# Code from module stpcpy:
|
||||||
# Code from module string-h:
|
# Code from module string-h:
|
||||||
|
|
@ -250,6 +251,7 @@ AC_DEFUN([gl_INIT],
|
||||||
gl_source_base='lib'
|
gl_source_base='lib'
|
||||||
gl_source_base_prefix=
|
gl_source_base_prefix=
|
||||||
gl_FUNC_ACL
|
gl_FUNC_ACL
|
||||||
|
gl_CONDITIONAL([GL_COND_OBJ_ACL_ENTRIES], [test $NEED_ACL_ENTRIES = 1])
|
||||||
gl_ALIGNASOF
|
gl_ALIGNASOF
|
||||||
gl_FUNC_ALLOCA
|
gl_FUNC_ALLOCA
|
||||||
gl_CONDITIONAL_HEADER([alloca.h])
|
gl_CONDITIONAL_HEADER([alloca.h])
|
||||||
|
|
@ -568,18 +570,6 @@ AC_DEFUN([gl_INIT],
|
||||||
gl_STDIO_H
|
gl_STDIO_H
|
||||||
gl_STDIO_H_REQUIRE_DEFAULTS
|
gl_STDIO_H_REQUIRE_DEFAULTS
|
||||||
AC_PROG_MKDIR_P
|
AC_PROG_MKDIR_P
|
||||||
USES_MSVCRT=0
|
|
||||||
case "$host_os" in
|
|
||||||
mingw* | windows*)
|
|
||||||
AC_EGREP_CPP([Special], [
|
|
||||||
#ifndef _UCRT
|
|
||||||
Special
|
|
||||||
#endif
|
|
||||||
],
|
|
||||||
[USES_MSVCRT=1])
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
gl_CONDITIONAL([GL_COND_OBJ_STDIO_CONSOLESAFE], [test $USES_MSVCRT = 1])
|
|
||||||
gl_CONDITIONAL([GL_COND_OBJ_STDIO_READ], [test $REPLACE_STDIO_READ_FUNCS = 1])
|
gl_CONDITIONAL([GL_COND_OBJ_STDIO_READ], [test $REPLACE_STDIO_READ_FUNCS = 1])
|
||||||
gl_CONDITIONAL([GL_COND_OBJ_STDIO_WRITE], [test $REPLACE_STDIO_WRITE_FUNCS = 1])
|
gl_CONDITIONAL([GL_COND_OBJ_STDIO_WRITE], [test $REPLACE_STDIO_WRITE_FUNCS = 1])
|
||||||
dnl No need to create extra modules for these functions. Everyone who uses
|
dnl No need to create extra modules for these functions. Everyone who uses
|
||||||
|
|
@ -605,6 +595,19 @@ AC_DEFUN([gl_INIT],
|
||||||
gl_STDIO_MODULE_INDICATOR([fputs])
|
gl_STDIO_MODULE_INDICATOR([fputs])
|
||||||
gl_STDIO_MODULE_INDICATOR([puts])
|
gl_STDIO_MODULE_INDICATOR([puts])
|
||||||
gl_STDIO_MODULE_INDICATOR([fwrite])
|
gl_STDIO_MODULE_INDICATOR([fwrite])
|
||||||
|
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||||
|
USES_MSVCRT=0
|
||||||
|
case "$host_os" in
|
||||||
|
mingw* | windows*)
|
||||||
|
AC_EGREP_CPP([Special], [
|
||||||
|
#ifndef _UCRT
|
||||||
|
Special
|
||||||
|
#endif
|
||||||
|
],
|
||||||
|
[USES_MSVCRT=1])
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
gl_CONDITIONAL([GL_COND_OBJ_STDIO_CONSOLESAFE], [test $USES_MSVCRT = 1])
|
||||||
gl_STDLIB_H
|
gl_STDLIB_H
|
||||||
gl_STDLIB_H_REQUIRE_DEFAULTS
|
gl_STDLIB_H_REQUIRE_DEFAULTS
|
||||||
AC_PROG_MKDIR_P
|
AC_PROG_MKDIR_P
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
# nproc.m4
|
# nproc.m4
|
||||||
# serial 7
|
# serial 8
|
||||||
dnl Copyright (C) 2009-2025 Free Software Foundation, Inc.
|
dnl Copyright (C) 2009-2025 Free Software Foundation, Inc.
|
||||||
dnl This file is free software; the Free Software Foundation
|
dnl This file is free software; the Free Software Foundation
|
||||||
dnl gives unlimited permission to copy and/or distribute it,
|
dnl gives unlimited permission to copy and/or distribute it,
|
||||||
|
|
@ -19,6 +19,10 @@ AC_DEFUN([gl_PREREQ_NPROC],
|
||||||
|
|
||||||
AC_CHECK_HEADERS([mntent.h sys/pstat.h sys/param.h],,,
|
AC_CHECK_HEADERS([mntent.h sys/pstat.h sys/param.h],,,
|
||||||
[AC_INCLUDES_DEFAULT])
|
[AC_INCLUDES_DEFAULT])
|
||||||
|
gl_CHECK_FUNCS_ANDROID([setmntent],
|
||||||
|
[[#include <stdio.h>
|
||||||
|
#include <mntent.h>
|
||||||
|
]])
|
||||||
dnl <sys/sysctl.h> requires <sys/param.h> on OpenBSD 4.0.
|
dnl <sys/sysctl.h> requires <sys/param.h> on OpenBSD 4.0.
|
||||||
AC_CHECK_HEADERS([sys/sysctl.h],,,
|
AC_CHECK_HEADERS([sys/sysctl.h],,,
|
||||||
[AC_INCLUDES_DEFAULT
|
[AC_INCLUDES_DEFAULT
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue