commit 5d1e14bd8b9a11ab860937d3ab97248ddeef30b1 (HEAD, refs/remotes/origin/master) Author: Paul Eggert Date: Sat Jan 7 15:28:00 2023 -0800 Adjust to recent Gnulib macro renaming Also, remove some references to unused Gnulib macros. diff --git a/configure.ac b/configure.ac index 7833ed3e464..8c11414fe0b 100644 --- a/configure.ac +++ b/configure.ac @@ -6361,7 +6361,7 @@ AC_DEFUN # it temporarily reverts them to their pre-pkg-config values, # because gnulib needs to work with both src (which uses the # pkg-config stuff) and lib-src (which does not). For example, gnulib -# may need to determine whether LIB_CLOCK_GETTIME should contain -lrt, +# may need to determine whether CLOCK_TIME_LIB should contain -lrt, # and it therefore needs to run in an environment where LIBS does not # already contain -lrt merely because 'pkg-config --libs' printed '-lrt' # for some package unrelated to lib-src. diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in index 3f144401d65..5b82cf1151c 100644 --- a/lib-src/Makefile.in +++ b/lib-src/Makefile.in @@ -193,18 +193,18 @@ LIBRESOLV= ## -llockfile if HAVE_LIBLOCKFILE or -lmail if HAVE_LIBMAIL LIBS_MAIL=@LIBS_MAIL@ ## empty or -lrt or -lposix4 if HAVE_CLOCK_GETTIME -LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ +CLOCK_TIME_LIB = @CLOCK_TIME_LIB@ ## empty or -lbcrypt or -ladvapi32 -LIB_GETRANDOM = @LIB_GETRANDOM@ +GETRANDOM_LIB = @GETRANDOM_LIB@ ## Whatever libraries are needed for euidaccess -LIB_EACCESS=@LIB_EACCESS@ +EUIDACCESS_LIBGEN=@EUIDACCESS_LIBGEN@ ## Libraries needed for file_has_acl FILE_HAS_ACL_LIB=@FILE_HAS_ACL_LIB@ ## empty or -lwsock2 for MinGW LIB_WSOCK32=@LIB_WSOCK32@ ## Extra libraries for etags -LIBS_ETAGS = $(LIB_CLOCK_GETTIME) $(LIB_GETRANDOM) +LIBS_ETAGS = $(CLOCK_TIME_LIB) $(GETRANDOM_LIB) HAVE_SECCOMP=@HAVE_SECCOMP@ HAVE_LIBSECCOMP=@HAVE_LIBSECCOMP@ @@ -426,13 +426,14 @@ pop.o: emacsclient${EXEEXT}: ${srcdir}/emacsclient.c $(NTLIB) $(config_h) $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} $< \ $(NTLIB) $(LOADLIBES) \ - $(LIB_WSOCK32) $(LIB_EACCESS) $(FILE_HAS_ACL_LIB) $(LIBS_ECLIENT) \ + $(LIB_WSOCK32) $(EUIDACCESS_LIBGEN) \ + $(FILE_HAS_ACL_LIB) $(LIBS_ECLIENT) \ -o $@ emacsclientw${EXEEXT}: ${srcdir}/emacsclient.c $(NTLIB) $(CLIENTRES) $(config_h) $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} $(CLIENTRES) -mwindows $< \ $(LOADLIBES) \ - $(LIB_WSOCK32) $(LIB_EACCESS) $(LIBS_ECLIENT) -o $@ + $(LIB_WSOCK32) $(EUIDACCESS_LIBGEN) $(LIBS_ECLIENT) -o $@ be-resources: ${srcdir}/be_resources.cc ${config_h} $(AM_V_CXXLD)$(CXX) ${ALL_CXXFLAGS} ${HAIKU_LIBS} $< -o $@ diff --git a/msdos/autogen/Makefile.in b/msdos/autogen/Makefile.in index 7f44c9867fe..df9b7797989 100644 --- a/msdos/autogen/Makefile.in +++ b/msdos/autogen/Makefile.in @@ -921,13 +921,11 @@ LIBXT_OTHER = LIBX_OTHER = @LIBX_OTHER@ LIBZ = @LIBZ@ LIB_ACL = @LIB_ACL@ -LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ -LIB_EACCESS = @LIB_EACCESS@ +CLOCK_TIME_LIB = @CLOCK_TIME_LIB@ +EUIDACCESS_LIBGEN = @EUIDACCESS_LIBGEN@ LIB_EXECINFO = @LIB_EXECINFO@ -LIB_FDATASYNC = @LIB_FDATASYNC@ LIB_MATH = @LIB_MATH@ LIB_PTHREAD = @LIB_PTHREAD@ -LIB_PTHREAD_SIGMASK = @LIB_PTHREAD_SIGMASK@ LIB_TIMER_TIME = @LIB_TIMER_TIME@ LIB_WSOCK32 = @LIB_WSOCK32@ LN_S_FILEONLY = @LN_S_FILEONLY@ diff --git a/msdos/sed1v2.inp b/msdos/sed1v2.inp index 4d4c80a6b1a..ac7041a1bed 100644 --- a/msdos/sed1v2.inp +++ b/msdos/sed1v2.inp @@ -48,9 +48,8 @@ s/\.h\.in/.h-in/ /^LIB_MATH *=/s/@LIB_MATH@/-lm/ /^LIB_PTHREAD *=/s/@LIB_PTHREAD@// /^LIB_ACL *=/s/@LIB_ACL@// -/^LIB_EACCESS *=/s/@LIB_EACCESS@// -/^LIB_FDATASYNC *=/s/@LIB_FDATASYNC@// -/^LIB_NANOSLEEP *=/s/@LIB_NANOSLEEP@// +/^EUIDACCESS_LIBGEN *=/s/@EUIDACCESS_LIBGEN@// +/^NANOSLEEP_LIB *=/s/@NANOSLEEP_LIB@// s/ *@LIBTIFF@// s/ *@LIBJPEG@// s/ *@LIBPNG@// @@ -140,7 +139,7 @@ s/ *@WEBP_LIBS@// /^LIBSELINUX_LIBS *=/s/@LIBSELINUX_LIBS@// /^LIBSYSTEMD_LIBS *=/s/@LIBSYSTEMD_LIBS@// /^LIBSYSTEMD_CFLAGS *=/s/@LIBSYSTEMD_CFLAGS@// -/^LIB_CLOCK_GETTIME *=/s/@[^@\n]*@//g +/^CLOCK_TIME_LIB *=/s/@[^@\n]*@//g /^LIB_TIMER_TIME *=/s/@[^@\n]*@//g /^LIB_EXECINFO *=/s/@[^@\n]*@//g /^LIBGNUTLS_LIBS *=/s/@[^@\n]*@// diff --git a/msdos/sed3v2.inp b/msdos/sed3v2.inp index dc9eaff27c8..9688a27b066 100644 --- a/msdos/sed3v2.inp +++ b/msdos/sed3v2.inp @@ -32,9 +32,9 @@ /^LIBRESOLV *=/s/@[^@\n]*@//g /^LIBS_MAIL *=/s/@[^@\n]*@//g /^LIBS_SYSTEM *=/s/@[^@\n]*@//g -/^LIB_CLOCK_GETTIME *=/s/@[^@\n]*@//g +/^CLOCK_TIME_LIB *=/s/@[^@\n]*@//g /^LIB_TIMER_TIME *=/s/@[^@\n]*@//g -/^LIB_GETRANDOM *=/s/@[^@\n]*@//g +/^GETRANDOM_LIB *=/s/@[^@\n]*@//g /^CFLAGS *=/s!=.*$!=-O2 -g! /^CPPFLAGS *=/s/@CPPFLAGS@// /^LDFLAGS *=/s/@LDFLAGS@// @@ -49,7 +49,6 @@ /^ALLOCA *=/s!@ALLOCA@!! /^EXEEXT *=/s!@EXEEXT@!.exe! /^CLIENTW *=/s/@CLIENTW@// -/^LIB_FDATASYNC *=/s/@LIB_FDATASYNC@// /^LIB_WSOCK32 *=/s/@LIB_WSOCK32@// /^LIBS_ECLIENT *=/s/@LIBS_ECLIENT@// /^NTLIB *=/s/@NTLIB@// diff --git a/msdos/sedlibmk.inp b/msdos/sedlibmk.inp index 497aedb2096..634bf999e50 100644 --- a/msdos/sedlibmk.inp +++ b/msdos/sedlibmk.inp @@ -270,7 +270,6 @@ s/@PACKAGE@/emacs/ /^LDFLAGS *=/s/@[^@\n]*@// /^LD_FIRSTFLAG *=/s/@[^@\n]*@// /^LIB_PTHREAD *=/s/@[^@\n]*@// -/^LIB_PTHREAD_SIGMASK *=/s/@[^@\n]*@// /^LIBS *=/s/@[^@\n]*@// /^MAKEINFO *=/s/@MAKEINFO@/makeinfo/ # MKDIR_P lines are edited further below @@ -323,7 +322,7 @@ s/@PACKAGE@/emacs/ /^REPLACE_MKTIME *=/s/@[^@\n]*@/1/ # We don't want any other gnulib replacement functions /^REPLACE_[^ =]* *= *@/s/@[^@\n]*@/0/ -/^LIB_GETRANDOM[^ =]* *= *@/s/@[^@\n]*@// +/^GETRANDOM_LIB[^ =]* *= *@/s/@[^@\n]*@// /^SIG_ATOMIC_T_SUFFIX *=/s/@SIG_ATOMIC_T_SUFFIX@// /^SIZE_T_SUFFIX *=/s/@SIZE_T_SUFFIX@/u/ /^ASSERT_H *=/s/@[^@\n]*@/assert.h/ diff --git a/src/Makefile.in b/src/Makefile.in index c29c3750e59..1a2a316b310 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -144,9 +144,9 @@ M17N_FLT_CFLAGS = M17N_FLT_LIBS = @M17N_FLT_LIBS@ LIB_ACL=@LIB_ACL@ -LIB_CLOCK_GETTIME=@LIB_CLOCK_GETTIME@ -LIB_EACCESS=@LIB_EACCESS@ -LIB_NANOSLEEP=@LIB_NANOSLEEP@ +CLOCK_TIME_LIB=@CLOCK_TIME_LIB@ +EUIDACCESS_LIBGEN=@EUIDACCESS_LIBGEN@ +NANOSLEEP_LIB=@NANOSLEEP_LIB@ LIB_TIMER_TIME=@LIB_TIMER_TIME@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -558,9 +558,9 @@ lisp = ## Construct full set of libraries to be linked. LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(PGTK_LIBS) $(LIBX_BASE) $(LIBIMAGE) \ $(LIBX_OTHER) $(LIBSOUND) \ - $(RSVG_LIBS) $(IMAGEMAGICK_LIBS) $(LIB_ACL) $(LIB_CLOCK_GETTIME) \ - $(LIB_NANOSLEEP) $(WEBKIT_LIBS) \ - $(LIB_EACCESS) $(LIB_TIMER_TIME) $(DBUS_LIBS) \ + $(RSVG_LIBS) $(IMAGEMAGICK_LIBS) $(LIB_ACL) $(CLOCK_TIME_LIB) \ + $(NANOSLEEP_LIB) $(WEBKIT_LIBS) \ + $(EUIDACCESS_LIBGEN) $(LIB_TIMER_TIME) $(DBUS_LIBS) \ $(LIB_EXECINFO) $(XRANDR_LIBS) $(XINERAMA_LIBS) $(XFIXES_LIBS) \ $(XDBE_LIBS) $(XSYNC_LIBS) \ $(LIBXML2_LIBS) $(LIBGPM) $(LIBS_SYSTEM) $(CAIRO_LIBS) \ diff --git a/test/Makefile.in b/test/Makefile.in index fd21695f5bc..f4b85e7dfe5 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -264,8 +264,8 @@ FPIC_CFLAGS = GMP_H = @GMP_H@ LIBGMP = @LIBGMP@ -LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ -LIB_NANOSLEEP = @LIB_NANOSLEEP@ +CLOCK_TIME_LIB = @CLOCK_TIME_LIB@ +NANOSLEEP_LIB = @NANOSLEEP_LIB@ MODULE_CFLAGS = $(and $(GMP_H),-I.) -I../src -I$(srcdir)/../src \ $(FPIC_CFLAGS) $(PROFILING_CFLAGS) \ @@ -286,7 +286,7 @@ $(test_module): $(test_module: $(AM_V_at)$(CC) -shared $(CPPFLAGS) $(MODULE_CFLAGS) $(LDFLAGS) \ -o $@ $< $(LIBGMP) \ $(and $(GMP_H),$(srcdir)/../lib/mini-gmp.c) \ - $(LIB_CLOCK_GETTIME) $(LIB_NANOSLEEP) + $(CLOCK_TIME_LIB) $(NANOSLEEP_LIB) endif src/emacs-tests.log: ../lib-src/seccomp-filter.c commit a1b558a2e24d71ff6634a0ff50d46380c162c961 Author: Paul Eggert Date: Sat Jan 7 15:08:45 2023 -0800 Update from Gnulib by running admin/merge-gnulib diff --git a/lib/filename.h b/lib/filename.h index ab77ca2df91..a2400a9dfe3 100644 --- a/lib/filename.h +++ b/lib/filename.h @@ -1,5 +1,5 @@ /* Basic filename support macros. - Copyright (C) 2001-2022 Free Software Foundation, Inc. + Copyright (C) 2001-2023 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in index 0b4e0458a3c..2ebf187e867 100644 --- a/lib/gnulib.mk.in +++ b/lib/gnulib.mk.in @@ -204,6 +204,7 @@ CFLAGS_SOUND = @CFLAGS_SOUND@ CHECK_STRUCTS = @CHECK_STRUCTS@ CLIENTRES = @CLIENTRES@ CLIENTW = @CLIENTW@ +CLOCK_TIME_LIB = @CLOCK_TIME_LIB@ CM_OBJ = @CM_OBJ@ COM_ERRLIB = @COM_ERRLIB@ CPP = @CPP@ @@ -238,6 +239,7 @@ ENOLINK_VALUE = @ENOLINK_VALUE@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ +EUIDACCESS_LIBGEN = @EUIDACCESS_LIBGEN@ EXECINFO_H = @EXECINFO_H@ EXEEXT = @EXEEXT@ FILE_HAS_ACL_LIB = @FILE_HAS_ACL_LIB@ @@ -254,6 +256,7 @@ GETADDRINFO_A_LIBS = @GETADDRINFO_A_LIBS@ GETLOADAVG_LIBS = @GETLOADAVG_LIBS@ GETOPT_CDEFS_H = @GETOPT_CDEFS_H@ GETOPT_H = @GETOPT_H@ +GETRANDOM_LIB = @GETRANDOM_LIB@ GFILENOTIFY_CFLAGS = @GFILENOTIFY_CFLAGS@ GFILENOTIFY_LIBS = @GFILENOTIFY_LIBS@ GL_CFLAG_ALLOW_WARNINGS = @GL_CFLAG_ALLOW_WARNINGS@ @@ -940,7 +943,6 @@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_EACCESS = @LIB_EACCESS@ LIB_EXECINFO = @LIB_EXECINFO@ LIB_GETRANDOM = @LIB_GETRANDOM@ -LIB_HAS_ACL = @LIB_HAS_ACL@ LIB_MATH = @LIB_MATH@ LIB_NANOSLEEP = @LIB_NANOSLEEP@ LIB_PTHREAD = @LIB_PTHREAD@ @@ -960,6 +962,7 @@ MKDIR_P = @MKDIR_P@ MODULES_OBJ = @MODULES_OBJ@ MODULES_SECONDARY_SUFFIX = @MODULES_SECONDARY_SUFFIX@ MODULES_SUFFIX = @MODULES_SUFFIX@ +NANOSLEEP_LIB = @NANOSLEEP_LIB@ NATIVE_COMPILATION_AOT = @NATIVE_COMPILATION_AOT@ NEXT_ASSERT_H = @NEXT_ASSERT_H@ NEXT_AS_FIRST_DIRECTIVE_ASSERT_H = @NEXT_AS_FIRST_DIRECTIVE_ASSERT_H@ @@ -1036,6 +1039,7 @@ PRE_ALLOC_OBJ = @PRE_ALLOC_OBJ@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ +PTHREAD_SIGMASK_LIB = @PTHREAD_SIGMASK_LIB@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ RALLOC_OBJ = @RALLOC_OBJ@ RANLIB = @RANLIB@ @@ -1223,6 +1227,7 @@ SUBDIR_MAKEFILES_IN = @SUBDIR_MAKEFILES_IN@ SYSTEM_TYPE = @SYSTEM_TYPE@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TERMCAP_OBJ = @TERMCAP_OBJ@ +TIMER_TIME_LIB = @TIMER_TIME_LIB@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_TIME_UTC = @TIME_H_DEFINES_TIME_UTC@ TOOLKIT_LIBW = @TOOLKIT_LIBW@ diff --git a/lib/malloc/scratch_buffer.h b/lib/malloc/scratch_buffer.h index a9bdcadec21..33fd2b29cd5 100644 --- a/lib/malloc/scratch_buffer.h +++ b/lib/malloc/scratch_buffer.h @@ -1,5 +1,5 @@ /* Variable-sized buffer with on-stack default allocation. - Copyright (C) 2015-2022 Free Software Foundation, Inc. + Copyright (C) 2015-2023 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/lib/malloc/scratch_buffer_grow.c b/lib/malloc/scratch_buffer_grow.c index 9a5e4dbb1eb..a5e8f2f7230 100644 --- a/lib/malloc/scratch_buffer_grow.c +++ b/lib/malloc/scratch_buffer_grow.c @@ -1,5 +1,5 @@ /* Variable-sized buffer with on-stack default allocation. - Copyright (C) 2015-2022 Free Software Foundation, Inc. + Copyright (C) 2015-2023 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/lib/malloc/scratch_buffer_grow_preserve.c b/lib/malloc/scratch_buffer_grow_preserve.c index 3fe5a0720ec..c0b5d87b7e4 100644 --- a/lib/malloc/scratch_buffer_grow_preserve.c +++ b/lib/malloc/scratch_buffer_grow_preserve.c @@ -1,5 +1,5 @@ /* Variable-sized buffer with on-stack default allocation. - Copyright (C) 2015-2022 Free Software Foundation, Inc. + Copyright (C) 2015-2023 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/lib/malloc/scratch_buffer_set_array_size.c b/lib/malloc/scratch_buffer_set_array_size.c index 89c37a950e9..24c39350ade 100644 --- a/lib/malloc/scratch_buffer_set_array_size.c +++ b/lib/malloc/scratch_buffer_set_array_size.c @@ -1,5 +1,5 @@ /* Variable-sized buffer with on-stack default allocation. - Copyright (C) 2015-2022 Free Software Foundation, Inc. + Copyright (C) 2015-2023 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/lib/mktime-internal.h b/lib/mktime-internal.h index 170764eabc8..709c36bdf56 100644 --- a/lib/mktime-internal.h +++ b/lib/mktime-internal.h @@ -1,5 +1,5 @@ /* Internals of mktime and related functions - Copyright 2016-2022 Free Software Foundation, Inc. + Copyright 2016-2023 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Paul Eggert . diff --git a/lib/mktime.c b/lib/mktime.c index 7dc9d67ef9d..94a4320e6ca 100644 --- a/lib/mktime.c +++ b/lib/mktime.c @@ -1,5 +1,5 @@ /* Convert a 'struct tm' to a time_t value. - Copyright (C) 1993-2022 Free Software Foundation, Inc. + Copyright (C) 1993-2023 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Paul Eggert . diff --git a/lib/regex.c b/lib/regex.c index ff1176782e4..3beb0deb987 100644 --- a/lib/regex.c +++ b/lib/regex.c @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002-2022 Free Software Foundation, Inc. + Copyright (C) 2002-2023 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . diff --git a/lib/regex.h b/lib/regex.h index a7e0bd02757..9ef0252ffff 100644 --- a/lib/regex.h +++ b/lib/regex.h @@ -1,6 +1,6 @@ /* Definitions for data structures and routines for the regular expression library. - Copyright (C) 1985, 1989-2022 Free Software Foundation, Inc. + Copyright (C) 1985, 1989-2023 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/lib/timegm.c b/lib/timegm.c index a1b19efc392..b47025a0545 100644 --- a/lib/timegm.c +++ b/lib/timegm.c @@ -1,6 +1,6 @@ /* Convert UTC calendar time to simple time. Like mktime but assumes UTC. - Copyright (C) 1994-2022 Free Software Foundation, Inc. + Copyright (C) 1994-2023 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/m4/acl.m4 b/m4/acl.m4 index 6c2db7d3203..e612f1ae34b 100644 --- a/m4/acl.m4 +++ b/m4/acl.m4 @@ -1,5 +1,5 @@ # acl.m4 - check for access control list (ACL) primitives -# serial 25 +# serial 26 # Copyright (C) 2002, 2004-2023 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation @@ -141,7 +141,6 @@ AC_DEFUN fi if test -n "$gl_need_lib_has_acl"; then FILE_HAS_ACL_LIB=$LIB_ACL - LIB_HAS_ACL="$FILE_HAS_ACL_LIB" fi AC_SUBST([LIB_ACL]) AC_DEFINE_UNQUOTED([USE_ACL], [$use_acl], @@ -211,7 +210,4 @@ AC_DEFUN FILE_HAS_ACL_LIB=$LIB_ACL fi AC_SUBST([FILE_HAS_ACL_LIB]) - dnl For backward compatibility (e.g. coreutils still uses LIB_HAS_ACL). - LIB_HAS_ACL="$FILE_HAS_ACL_LIB" - AC_SUBST([LIB_HAS_ACL]) ]) diff --git a/m4/clock_time.m4 b/m4/clock_time.m4 index 411e0710e7f..d624a73d35d 100644 --- a/m4/clock_time.m4 +++ b/m4/clock_time.m4 @@ -1,14 +1,14 @@ -# clock_time.m4 serial 11 +# clock_time.m4 serial 12 dnl Copyright (C) 2002-2006, 2009-2023 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Check for clock_getres, clock_gettime and clock_settime, -# and set LIB_CLOCK_GETTIME. +# and set CLOCK_TIME_LIB. # For a program named, say foo, you should add a line like the following # in the corresponding Makefile.am file: -# foo_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) +# foo_LDADD = $(LDADD) $(CLOCK_TIME_LIB) AC_DEFUN([gl_CLOCK_TIME], [ @@ -21,12 +21,15 @@ AC_DEFUN # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all* # programs in the package would end up linked with that potentially-shared # library, inducing unnecessary run-time overhead. - LIB_CLOCK_GETTIME= - AC_SUBST([LIB_CLOCK_GETTIME]) + CLOCK_TIME_LIB= + AC_SUBST([CLOCK_TIME_LIB]) gl_saved_libs=$LIBS AC_SEARCH_LIBS([clock_gettime], [rt posix4], [test "$ac_cv_search_clock_gettime" = "none required" || - LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime]) + CLOCK_TIME_LIB=$ac_cv_search_clock_gettime]) AC_CHECK_FUNCS([clock_getres clock_gettime clock_settime]) LIBS=$gl_saved_libs + # For backward compatibility. + LIB_CLOCK_GETTIME="$CLOCK_TIME_LIB" + AC_SUBST([LIB_CLOCK_GETTIME]) ]) diff --git a/m4/euidaccess.m4 b/m4/euidaccess.m4 index 0dc757820ee..f0eb5bde84a 100644 --- a/m4/euidaccess.m4 +++ b/m4/euidaccess.m4 @@ -1,4 +1,4 @@ -# euidaccess.m4 serial 15 +# euidaccess.m4 serial 16 dnl Copyright (C) 2002-2023 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -41,12 +41,15 @@ AC_DEFUN # Save and restore LIBS so -lgen isn't added to it. Otherwise, *all* # programs in the package would end up linked with that potentially-shared # library, inducing unnecessary run-time overhead. - LIB_EACCESS= - AC_SUBST([LIB_EACCESS]) + EUIDACCESS_LIBGEN= + AC_SUBST([EUIDACCESS_LIBGEN]) gl_saved_libs=$LIBS AC_SEARCH_LIBS([eaccess], [gen], [test "$ac_cv_search_eaccess" = "none required" || - LIB_EACCESS=$ac_cv_search_eaccess]) + EUIDACCESS_LIBGEN=$ac_cv_search_eaccess]) AC_CHECK_FUNCS([eaccess]) LIBS=$gl_saved_libs + # For backward compatibility. + LIB_EACCESS="$EUIDACCESS_LIBGEN" + AC_SUBST([LIB_EACCESS]) ]) diff --git a/m4/getrandom.m4 b/m4/getrandom.m4 index f2010c0213f..c508f1a55c3 100644 --- a/m4/getrandom.m4 +++ b/m4/getrandom.m4 @@ -1,4 +1,4 @@ -# getrandom.m4 serial 9 +# getrandom.m4 serial 10 dnl Copyright 2020-2023 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -62,13 +62,16 @@ AC_DEFUN if test $gl_cv_lib_assume_bcrypt = yes; then AC_DEFINE([HAVE_LIB_BCRYPT], [1], [Define to 1 if the bcrypt library is guaranteed to be present.]) - LIB_GETRANDOM='-lbcrypt' + GETRANDOM_LIB='-lbcrypt' else - LIB_GETRANDOM='-ladvapi32' + GETRANDOM_LIB='-ladvapi32' fi ;; *) - LIB_GETRANDOM= ;; + GETRANDOM_LIB= ;; esac + AC_SUBST([GETRANDOM_LIB]) + dnl For backward compatibility. + LIB_GETRANDOM="$GETRANDOM_LIB" AC_SUBST([LIB_GETRANDOM]) ]) diff --git a/m4/nanosleep.m4 b/m4/nanosleep.m4 index 21ee5a21daf..e21a3e343cb 100644 --- a/m4/nanosleep.m4 +++ b/m4/nanosleep.m4 @@ -1,4 +1,4 @@ -# serial 42 +# serial 43 dnl From Jim Meyering. dnl Check for the nanosleep function. @@ -25,11 +25,11 @@ AC_DEFUN # Solaris 2.5.1 needs -lposix4 to get the nanosleep function. # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. - LIB_NANOSLEEP= - AC_SUBST([LIB_NANOSLEEP]) + NANOSLEEP_LIB= + AC_SUBST([NANOSLEEP_LIB]) AC_SEARCH_LIBS([nanosleep], [rt posix4], [test "$ac_cv_search_nanosleep" = "none required" || - LIB_NANOSLEEP=$ac_cv_search_nanosleep]) + NANOSLEEP_LIB=$ac_cv_search_nanosleep]) if test "x$ac_cv_search_nanosleep" != xno; then dnl The system has a nanosleep function. @@ -143,4 +143,8 @@ AC_DEFUN HAVE_NANOSLEEP=0 fi LIBS=$nanosleep_save_libs + + # For backward compatibility. + LIB_NANOSLEEP="$NANOSLEEP_LIB" + AC_SUBST([LIB_NANOSLEEP]) ]) diff --git a/m4/pthread_sigmask.m4 b/m4/pthread_sigmask.m4 index 5110668155e..27795282bee 100644 --- a/m4/pthread_sigmask.m4 +++ b/m4/pthread_sigmask.m4 @@ -1,4 +1,4 @@ -# pthread_sigmask.m4 serial 21 +# pthread_sigmask.m4 serial 22 dnl Copyright (C) 2011-2023 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -24,7 +24,7 @@ AC_DEFUN [gl_cv_func_pthread_sigmask_macro=no]) ]) - LIB_PTHREAD_SIGMASK= + PTHREAD_SIGMASK_LIB= if test $gl_cv_func_pthread_sigmask_macro = yes; then dnl pthread_sigmask is a dummy macro. @@ -62,7 +62,7 @@ AC_DEFUN ]) if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then dnl pthread_sigmask is available with -pthread or -lpthread. - LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD" + PTHREAD_SIGMASK_LIB="$LIBMULTITHREAD" else dnl pthread_sigmask is not available at all. HAVE_PTHREAD_SIGMASK=0 @@ -101,6 +101,9 @@ AC_DEFUN ]) fi + AC_SUBST([PTHREAD_SIGMASK_LIB]) + dnl For backward compatibility. + LIB_PTHREAD_SIGMASK="$PTHREAD_SIGMASK_LIB" AC_SUBST([LIB_PTHREAD_SIGMASK]) dnl We don't need a variable LTLIB_PTHREAD_SIGMASK, because when dnl "$gl_threads_api" = posix, $LTLIBMULTITHREAD and $LIBMULTITHREAD are the @@ -114,7 +117,7 @@ AC_DEFUN dnl On FreeBSD 13.0, MidnightBSD 1.1, HP-UX 11.31, Solaris 9, in programs dnl that are not linked with -lpthread, the pthread_sigmask() function dnl always returns 0 and has no effect. - if test -z "$LIB_PTHREAD_SIGMASK"; then + if test -z "$PTHREAD_SIGMASK_LIB"; then case " $LIBS " in *' -pthread '*) ;; *' -lpthread '*) ;; @@ -162,7 +165,7 @@ AC_DEFUN [gl_cv_func_pthread_sigmask_return_works], [ gl_save_LIBS="$LIBS" - LIBS="$LIBS $LIB_PTHREAD_SIGMASK" + LIBS="$LIBS $PTHREAD_SIGMASK_LIB" AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include @@ -208,7 +211,7 @@ AC_DEFUN gl_cv_func_pthread_sigmask_unblock_works="guessing yes";; esac m4_ifdef([gl_][THREADLIB], - [dnl Link against $LIBMULTITHREAD, not only $LIB_PTHREAD_SIGMASK. + [dnl Link against $LIBMULTITHREAD, not only $PTHREAD_SIGMASK_LIB. dnl Otherwise we get a false positive on those platforms where dnl $gl_cv_func_pthread_sigmask_in_libc_works is "no". gl_save_LIBS=$LIBS diff --git a/m4/timer_time.m4 b/m4/timer_time.m4 index 4c2608b58e8..437d1dc5428 100644 --- a/m4/timer_time.m4 +++ b/m4/timer_time.m4 @@ -1,10 +1,10 @@ -# timer_time.m4 serial 5 +# timer_time.m4 serial 6 dnl Copyright (C) 2011-2023 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. -# Check for timer_settime, and set LIB_TIMER_TIME. +# Check for timer_settime, and set TIMER_TIME_LIB. AC_DEFUN([gl_TIMER_TIME], [ @@ -21,13 +21,13 @@ AC_DEFUN AC_CHECK_DECL([timer_settime], [], [], [[#include ]]) - LIB_TIMER_TIME= - AC_SUBST([LIB_TIMER_TIME]) + TIMER_TIME_LIB= + AC_SUBST([TIMER_TIME_LIB]) AS_IF([test "$ac_cv_have_decl_timer_settime" = yes], [ gl_saved_libs=$LIBS AC_SEARCH_LIBS([timer_settime], [rt posix4], [test "$ac_cv_search_timer_settime" = "none required" || - LIB_TIMER_TIME=$ac_cv_search_timer_settime]) + TIMER_TIME_LIB=$ac_cv_search_timer_settime]) m4_ifdef([gl_][PTHREADLIB], [dnl GLIBC uses threads to emulate posix timers when kernel support dnl is not available (like Linux < 2.6 or when used with kFreeBSD) @@ -42,8 +42,11 @@ AC_DEFUN #endif #endif ], - [LIB_TIMER_TIME="$LIB_TIMER_TIME $LIBPMULTITHREAD"])]) + [TIMER_TIME_LIB="$TIMER_TIME_LIB $LIBPMULTITHREAD"])]) AC_CHECK_FUNCS([timer_settime]) LIBS=$gl_saved_libs ]) + dnl For backward compatibility. + LIB_TIMER_TIME="$TIMER_TIME_LIB" + AC_SUBST([LIB_TIMER_TIME]) ]) commit 0be40fbe43c4e409a417b12d2919ca64326e0281 Author: Michael Albinus Date: Sat Jan 7 12:14:26 2023 +0100 Add new Tramp method "toolbox" * doc/misc/tramp.texi (Inline methods): Add toolbox. * etc/NEWS: Add new Tramp method "toolbox". * lisp/net/tramp-container.el (tramp-toolbox-program): New defcustom. (tramp-toolbox-method): New defconst. (tramp-toolbox--completion-function): New defun. Set it for "toolbox". (tramp-methods) : Add. (tramp-default-host-alist): Add rule for "toolbox". diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index a2c292dd5ad..7f66dc9e849 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -927,6 +927,17 @@ Inline methods This method does not support user names. +@item @option{toolbox} +@cindex method @option{toolbox} +@cindex @option{toolbox} method + +Integration of Toolbox system containers. The host name may be either +a container's name or ID, as returned by @samp{toolbox list -c}. +Without a host name, the default Toolbox container for the host will +be used. + +This method does not support user names. + @end table diff --git a/etc/NEWS b/etc/NEWS index a2924201267..690e9c3faa9 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -114,6 +114,12 @@ docstring, or a comment, or (re)indents the surrounding defun if point is not in a comment or a string. It is by default bound to 'M-q' in 'prog-mode' and all its descendants. +** Tramp + ++++ +*** New connection method "toolbox". +This allow accessing system containers provided by Toolbox. + * New Modes and Packages in Emacs 30.1 diff --git a/lisp/net/tramp-container.el b/lisp/net/tramp-container.el index 6cdd6c654ea..1dd29190f10 100644 --- a/lisp/net/tramp-container.el +++ b/lisp/net/tramp-container.el @@ -41,6 +41,7 @@ ;; CONTAINER is the container to connect to ;; ;; +;; ;; Open file in a Kubernetes container: ;; ;; C-x C-f /kubernetes:POD:/path/to/file @@ -54,6 +55,18 @@ ;; namespace, use this command to change it: ;; ;; "kubectl config set-context --current --namespace=" +;; +;; +;; +;; Open a file on an existing toolbox container via Toolbox: +;; +;; C-x C-f /toolbox:CONTAINER:/path/to/file +;; +;; Where: +;; CONTAINER is the container to connect to (optional) +;; +;; If the container is not running, it is started. If no container is +;; specified, the default Toolbox container is used. ;;; Code: @@ -83,6 +96,14 @@ tramp-kubernetes-program :type '(choice (const "kubectl") (string))) +;;;###tramp-autoload +(defcustom tramp-toolbox-program "toolbox" + "Name of the Toolbox client program." + :group 'tramp + :version "30.1" + :type '(choice (const "toolbox") + (string))) + ;;;###tramp-autoload (defconst tramp-docker-method "docker" "Tramp method name to use to connect to Docker containers.") @@ -95,6 +116,10 @@ tramp-podman-method (defconst tramp-kubernetes-method "kubernetes" "Tramp method name to use to connect to Kubernetes containers.") +;;;###tramp-autoload +(defconst tramp-toolbox-method "toolbox" + "Tramp method name to use to connect to Toolbox containers.") + ;;;###tramp-autoload (defun tramp-docker--completion-function (&rest _args) "List Docker-like containers available for connection. @@ -150,6 +175,27 @@ tramp-kubernetes--current-context-data "jsonpath='{.contexts[?(@.name == \"%s\")]}'" current-context))) (buffer-string)))))) +;;;###tramp-autoload +(defun tramp-toolbox--completion-function (&rest _args) + "List Toolbox containers available for connection. + +This function is used by `tramp-set-completion-function', please +see its function help for a description of the format." + (when-let ((default-directory tramp-compat-temporary-file-directory) + (raw-list (shell-command-to-string + (concat tramp-toolbox-program " list -c"))) + ;; Ignore header line. + (lines (cdr (split-string raw-list "\n" 'omit))) + (names (mapcar + (lambda (line) + (when (string-match + (rx bol (1+ (not space)) + (1+ space) (group (1+ (not space))) space) + line) + (match-string 1 line))) + lines))) + (mapcar (lambda (m) (list nil m)) (delq nil names)))) + ;;;###tramp-autoload (defvar tramp-default-remote-shell) ;; Silence byte compiler. @@ -167,6 +213,7 @@ tramp-default-remote-shell (tramp-remote-shell ,tramp-default-remote-shell) (tramp-remote-shell-login ("-l")) (tramp-remote-shell-args ("-i" "-c")))) + (add-to-list 'tramp-methods `(,tramp-podman-method (tramp-login-program ,tramp-podman-program) @@ -179,6 +226,7 @@ tramp-default-remote-shell (tramp-remote-shell ,tramp-default-remote-shell) (tramp-remote-shell-login ("-l")) (tramp-remote-shell-args ("-i" "-c")))) + (add-to-list 'tramp-methods `(,tramp-kubernetes-method (tramp-login-program ,tramp-kubernetes-program) @@ -193,6 +241,19 @@ tramp-default-remote-shell (tramp-remote-shell-login ("-l")) (tramp-remote-shell-args ("-i" "-c")))) + (add-to-list 'tramp-methods + `(,tramp-toolbox-method + (tramp-login-program ,tramp-toolbox-program) + (tramp-login-args (("run") + ("-c" "%h") + ("%l"))) + (tramp-direct-async (,tramp-default-remote-shell "-c")) + (tramp-remote-shell ,tramp-default-remote-shell) + (tramp-remote-shell-login ("-l")) + (tramp-remote-shell-args ("-c")))) + + (add-to-list 'tramp-default-host-alist `(,tramp-toolbox-method nil "")) + (tramp-set-completion-function tramp-docker-method '((tramp-docker--completion-function ""))) @@ -203,7 +264,11 @@ tramp-default-remote-shell (tramp-set-completion-function tramp-kubernetes-method - '((tramp-kubernetes--completion-function "")))) + '((tramp-kubernetes--completion-function ""))) + + (tramp-set-completion-function + tramp-toolbox-method + '((tramp-toolbox--completion-function "")))) (add-hook 'tramp-unload-hook (lambda () commit de8d6bd329a6f623649f01210ce000e91f6be034 Author: Michael Albinus Date: Sat Jan 7 12:07:10 2023 +0100 Minor tramp-archive.el fix * lisp/net/tramp-archive.el (tramp-archive-file-name-regexp): Use `ignore-errors'. diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el index daf44a293a3..a2add1ed73a 100644 --- a/lisp/net/tramp-archive.el +++ b/lisp/net/tramp-archive.el @@ -200,7 +200,7 @@ tramp-archive-compression-suffixes ;; be an "Eager macro-expansion failure" when unloading/reloading Tramp. ;;;###tramp-autoload (defconst tramp-archive-file-name-regexp - (eval-when-compile (tramp-archive-autoload-file-name-regexp)) + (eval-when-compile (ignore-errors (tramp-archive-autoload-file-name-regexp))) "Regular expression matching archive file names.") ;;;###tramp-autoload commit 5636f14856982f6ee342fd45edd460ffaa73a7e3 Author: Xi Lu Date: Thu Jan 5 05:27:03 2023 +0800 ; Use a single '<=' for range comparisons * lisp/simple.el (undo-elt-in-region, char-uppercase-p) (event-apply-modifier): Use a single '<='. (Bug#60561) diff --git a/lisp/simple.el b/lisp/simple.el index 7910454e2f6..690968ca938 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3795,16 +3795,14 @@ undo-elt-in-region because markers can be arbitrarily relocated. Instead, pass the marker adjustment's corresponding (TEXT . POS) element." (cond ((integerp undo-elt) - (and (>= undo-elt start) - (<= undo-elt end))) + (<= start undo-elt end)) ((eq undo-elt nil) t) ((atom undo-elt) nil) ((stringp (car undo-elt)) ;; (TEXT . POSITION) - (and (>= (abs (cdr undo-elt)) start) - (<= (abs (cdr undo-elt)) end))) + (<= start (abs (cdr undo-elt)) end)) ((and (consp undo-elt) (markerp (car undo-elt))) ;; (MARKER . ADJUSTMENT) (<= start (car undo-elt) end)) @@ -6419,7 +6417,7 @@ char-uppercase-p then gives correct answers only for ASCII characters." (cond ((unicode-property-table-internal 'lowercase) (characterp (get-char-code-property char 'lowercase))) - ((and (>= char ?A) (<= char ?Z))))) + ((<= ?A char ?Z)))) (defun zap-to-char (arg char &optional interactive) "Kill up to and including ARGth occurrence of CHAR. @@ -10049,8 +10047,7 @@ event-apply-modifier ((eq symbol 'shift) ;; FIXME: Should we also apply this "upcase" behavior of shift ;; to non-ascii letters? - (if (and (<= (downcase event) ?z) - (>= (downcase event) ?a)) + (if (<= ?a (downcase event) ?z) (upcase event) (logior (ash 1 lshiftby) event))) (t