emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master c6bfffa9fe1: Update from Gnulib by running admin/merge-gnulib


From: Paul Eggert
Subject: master c6bfffa9fe1: Update from Gnulib by running admin/merge-gnulib
Date: Fri, 10 Mar 2023 19:54:17 -0500 (EST)

branch: master
commit c6bfffa9fe1af7f4f806e5533ba5f3c33476cf9a
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>

    Update from Gnulib by running admin/merge-gnulib
    
    Run admin/merge-gnulib along with the following change:
    * admin/merge-gnulib (GNULIB_MODULES): Replace ‘time’ with
    ‘time-h’, adjusting to a recent renaming in Gnulib modules.
    Emacs doesn’t appear to need the new Gnulib ‘time’ module.
---
 admin/merge-gnulib   |   2 +-
 doc/misc/texinfo.tex | 232 +++++++++++++++++++++++++++++++++++----------------
 lib/gnulib.mk.in     |  12 ++-
 lib/stdio.in.h       |  11 +++
 lib/time.in.h        |  14 ++++
 m4/gnulib-comp.m4    |   2 +-
 m4/time_h.m4         |   4 +-
 7 files changed, 198 insertions(+), 79 deletions(-)

diff --git a/admin/merge-gnulib b/admin/merge-gnulib
index 04e3e34b9f9..917ddda1fd5 100755
--- a/admin/merge-gnulib
+++ b/admin/merge-gnulib
@@ -46,7 +46,7 @@ GNULIB_MODULES='
   qcopy-acl readlink readlinkat regex
   sig2str sigdescr_np socklen stat-time std-gnu11 stdbool stddef stdio
   stpcpy strnlen strtoimax symlink sys_stat sys_time
-  tempname time 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
   vla warnings
 '
diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex
index 3cccf01d958..1ddfef4b878 100644
--- a/doc/misc/texinfo.tex
+++ b/doc/misc/texinfo.tex
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2023-01-02.21}
+\def\texinfoversion{2023-03-04.12}
 %
 % Copyright 1985, 1986, 1988, 1990-2023 Free Software Foundation, Inc.
 %
@@ -2683,25 +2683,21 @@ end
 }
 \setregularquotes
 
-% Allow an option to not use regular directed right quote/apostrophe
-% (char 0x27), but instead the undirected quote from cmtt (char 0x0d).
-% The undirected quote is ugly, so don't make it the default, but it
-% works for pasting with more pdf viewers (at least evince), the
-% lilypond developers report.  xpdf does work with the regular 0x27.
+% output for ' in @code
+% in tt font hex 0D (undirected) or 27 (curly right quote)
 %
 \def\codequoteright{%
   \ifusingtt
       {\ifflagclear{txicodequoteundirected}%
           {\ifflagclear{codequoteundirected}%
               {'}%
-              {\char'15 }}%
-          {\char'15 }}%
+              {\char"0D }}%
+          {\char"0D }}%
       {'}%
 }
 
-% and a similar option for the left quote char vs. a grave accent.
-% Modern fonts display ASCII 0x60 as a grave accent, so some people like
-% the code environments to do likewise.
+% output for ` in @code
+% in tt font hex 12 (grave accent) or 60 (curly left quote)
 % \relax disables Spanish ligatures ?` and !` of \tt font.
 %
 \def\codequoteleft{%
@@ -2709,8 +2705,8 @@ end
       {\ifflagclear{txicodequotebacktick}%
           {\ifflagclear{codequotebacktick}%
               {\relax`}%
-              {\char'22 }}%
-          {\char'22 }}%
+              {\char"12 }}%
+          {\char"12 }}%
       {\relax`}%
 }
 
@@ -2729,7 +2725,7 @@ end
     \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}%
   \fi\fi
 }
-%
+
 \parseargdef\codequotebacktick{%
   \def\temp{#1}%
   \ifx\temp\onword
@@ -2744,6 +2740,11 @@ end
   \fi\fi
 }
 
+% Turn them on by default
+\let\SETtxicodequoteundirected = t
+\let\SETtxicodequotebacktick = t
+
+
 % [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font.
 \def\noligaturesquoteleft{\relax\lq}
 
@@ -2929,10 +2930,6 @@ end
      \let-\dashnobreak
      \let_\realunder
     \fi
-    % Given -foo (with a single dash), we do not want to allow a break
-    % after the hyphen.
-    \global\let\codedashprev=\codedash
-    %
     \codex
   }
   %
@@ -2942,21 +2939,30 @@ end
     %
     % Now, output a discretionary to allow a line break, unless
     % (a) the next character is a -, or
-    % (b) the preceding character is a -.
+    % (b) the preceding character is a -, or
+    % (c) we are at the start of the string.
+    % In both cases (b) and (c), \codedashnobreak should be set to \codedash.
+    %
     % E.g., given --posix, we do not want to allow a break after either -.
     % Given --foo-bar, we do want to allow a break between the - and the b.
     \ifx\next\codedash \else
-      \ifx\codedashprev\codedash
+      \ifx\codedashnobreak\codedash
       \else \discretionary{}{}{}\fi
     \fi
     % we need the space after the = for the case when \next itself is a
     % space token; it would get swallowed otherwise.  As in @code{- a}.
-    \global\let\codedashprev= \next
+    \global\let\codedashnobreak= \next
   }
 }
 \def\normaldash{-}
 %
-\def\codex #1{\tclose{#1}\endgroup}
+\def\codex #1{\tclose{%
+  % Given -foo (with a single dash), we do not want to allow a break
+  % after the -.  \codedashnobreak is set to the first character in
+  % @code.
+  \futurelet\codedashnobreak\relax
+  #1%
+}\endgroup}
 
 \def\codeunder{%
   % this is all so @math{@code{var_name}+1} can work.  In math mode, _
@@ -3950,33 +3956,23 @@ $$%
 
 \def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting
 
-% When we turn headings on, set the page number to 1.
+% Set the page number to 1.
 \def\pageone{
   \global\pageno=1
   \global\arabiccount = \pagecount
 }
 
-% For double-sided printing, put current file name in lower left corner,
-% chapter name on inside top of right hand pages, document
-% title on inside top of left hand pages, and page numbers on outside top
-% edge of all pages.
-\def\HEADINGSdouble{%
-\pageone
-\HEADINGSdoublex
-}
 \let\contentsalignmacro = \chappager
 
-% For single-sided printing, chapter title goes across top left of page,
-% page number on top right.
-\def\HEADINGSsingle{%
-\pageone
-\HEADINGSsinglex
-}
 % \def\HEADINGSon{\HEADINGSdouble} % defined by \CHAPPAGon
 
-\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex}
+% For double-sided printing, put current file name in lower left corner,
+% chapter name on inside top of right hand pages, document
+% title on inside top of left hand pages, and page numbers on outside top
+% edge of all pages.
+\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdouble}
 \let\HEADINGSdoubleafter=\HEADINGSafter
-\def\HEADINGSdoublex{%
+\def\HEADINGSdouble{%
 \global\evenfootline={\hfil}
 \global\oddfootline={\hfil}
 \global\evenheadline={\line{\folio\hfil\thistitle}}
@@ -3986,8 +3982,10 @@ $$%
 \global\let\contentsalignmacro = \chapoddpage
 }
 
-\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex}
-\def\HEADINGSsinglex{%
+% For single-sided printing, chapter title goes across top left of page,
+% page number on top right.
+\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsingle}
+\def\HEADINGSsingle{%
 \global\evenfootline={\hfil}
 \global\oddfootline={\hfil}
 \global\evenheadline={\line{\thischapter\hfil\folio}}
@@ -3999,7 +3997,6 @@ $$%
 
 % for @setchapternewpage off
 \def\HEADINGSsinglechapoff{%
-\pageone
 \global\evenfootline={\hfil}
 \global\oddfootline={\hfil}
 \global\evenheadline={\line{\thischapter\hfil\folio}}
@@ -4105,6 +4102,7 @@ $$%
     \nobreak\kern\dimen0
     \endgroup
     \itemxneedsnegativevskiptrue
+    \penalty 10021 % for \indexpar
   \fi
 }
 
@@ -4221,6 +4219,7 @@ $$%
    % We can be in inner vertical mode in a footnote, although an
    % @itemize looks awful there.
   }%
+  \penalty 10021 % for \indexpar
   \flushcr
 }
 
@@ -4725,13 +4724,11 @@ $$%
 % except not \outer, so it can be used within macros and \if's.
 \edef\newwrite{\makecsname{ptexnewwrite}}
 
-% \newindex {foo} defines an index named IX.
+% \newindex {IX} defines an index named IX.
 % It automatically defines \IXindex such that
 % \IXindex ...rest of line... puts an entry in the index IX.
 % It also defines \IXindfile to be the number of the output channel for
 % the file that accumulates this index.  The file's extension is IX.
-% The name of an index should be no more than 2 characters long
-% for the sake of vms.
 %
 \def\newindex#1{%
   \expandafter\chardef\csname#1indfile\endcsname=0
@@ -4787,11 +4784,17 @@ $$%
 % and it is the two-letter name of the index.
 
 \def\doindex#1{\edef\indexname{#1}\parsearg\doindexxxx}
-\def\doindexxxx #1{\doind{\indexname}{#1}}
+\def\doindexxxx #1{\indexpar\doind{\indexname}{#1}}
 
 % like the previous two, but they put @code around the argument.
 \def\docodeindex#1{\edef\indexname{#1}\parsearg\docodeindexxxx}
-\def\docodeindexxxx #1{\docind{\indexname}{#1}}
+\def\docodeindexxxx #1{\indexpar\docind{\indexname}{#1}}
+
+% End any open paragraph, unless we are immediately after @item in
+% @itemize or @enumerate.
+\def\indexpar{%
+\ifnum\lastpenalty=10021 \else\endgraf\fi
+}
 
 
 % \definedummyword defines \#1 as \string\#1\space, thus effectively
@@ -4989,7 +4992,7 @@ $$%
   \commondummyword\ampchar          {\normalamp}%
   \commondummyword\atchar           {\@}%
   \commondummyword\arrow            {->}%
-  \commondummyword\backslashchar    {}%
+  \commondummyword\backslashchar    {\realbackslash}%
   \commondummyword\bullet           {bullet}%
   \commondummyword\comma            {,}%
   \commondummyword\copyright        {copyright}%
@@ -5089,9 +5092,6 @@ $$%
   %
   % We need to get rid of all macros, leaving only the arguments (if present).
   % Of course this is not nearly correct, but it is the best we can do for now.
-  % makeinfo does not expand macros in the argument to @deffn, which ends up
-  % writing an index entry, and texindex isn't prepared for an index sort entry
-  % that starts with \.
   %
   % Since macro invocations are followed by braces, we can just redefine them
   % to take a single TeX argument.  The case of a macro invocation that
@@ -5351,7 +5351,9 @@ $$%
 % ..., ready, GO:
 %
 \def\safewhatsit#1{\ifhmode
+  \whatsitpenalty = \lastpenalty
   #1%
+  \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi
  \else
   % \lastskip and \lastpenalty cannot both be nonzero simultaneously.
   \whatsitskip = \lastskip
@@ -7387,6 +7389,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 \def\setupverb{%
   \tt
   \def\par{\leavevmode\endgraf}%
+  \parindent = 0pt
   \setcodequotes
   \tabeightspaces
   % Respect line breaks,
@@ -7562,11 +7565,6 @@ might help (with 'rm \jobname.?? \jobname.??s')%
   \exdentamount=\defbodyindent
 }
 
-\newtoks\defidx
-\newtoks\deftext
-
-\def\useindex#1{\defidx={#1}\ignorespaces}
-
 % Called as \printdefunline \deffooheader{text}
 %
 \def\printdefunline#1#2{%
@@ -7574,10 +7572,6 @@ might help (with 'rm \jobname.?? \jobname.??s')%
     \plainfrenchspacing
     % call \deffooheader:
     #1#2 \endheader
-    % create the index entry
-    \defcharsdefault
-    \edef\temp{\noexpand\doind{\the\defidx}{\the\deftext}}%
-    \temp
     % common ending:
     \interlinepenalty = 10000
     \advance\rightskip by 0pt plus 1fil\relax
@@ -7592,6 +7586,24 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 
 \def\Edefun{\endgraf\medbreak}
 
+% @defblock, @defline do not automatically create index entries
+\envdef\defblock{%
+  \startdefun
+}
+\let\Edefblock\Edefun
+
+\def\defline{%
+  \doingtypefnfalse
+  \parseargusing\activeparens{\printdefunline\deflineheader}%
+}
+\def\deflineheader#1 #2 #3\endheader{%
+  \defname{#1}{}{#2}\magicamp\defunargs{#3\unskip}%
+}
+\def\deftypeline{%
+  \doingtypefntrue
+  \parseargusing\activeparens{\printdefunline\deflineheader}%
+}
+
 % \makedefun{deffoo} (\deffooheader parameters) { (\deffooheader expansion) }
 %
 % Define \deffoo, \deffoox  \Edeffoo and \deffooheader.
@@ -7643,23 +7655,18 @@ might help (with 'rm \jobname.?? \jobname.??s')%
   \fi\fi
 }
 
-\def\defind#1#2{
-  \defidx={#1}%
-  \deftext={#2}%
-}
-
 % Untyped functions:
 
 % @deffn category name args
 \makedefun{deffn}#1 #2 #3\endheader{%
-  \defind{fn}{\code{#2}}%
+  \doind{fn}{\code{#2}}%
   \defname{#1}{}{#2}\magicamp\defunargs{#3\unskip}%
 }
 
 % @defop category class name args
 \makedefun{defop}#1 {\defopheaderx{#1\ \putwordon}}
 \def\defopheaderx#1#2 #3 #4\endheader{%
-  \defind{fn}{\code{#3}\space\putwordon\ \code{#2}}%
+  \doind{fn}{\code{#3}\space\putwordon\ \code{#2}}%
   \defname{#1\ \code{#2}}{}{#3}\magicamp\defunargs{#4\unskip}%
 }
 
@@ -7667,7 +7674,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 
 % @deftypefn category type name args
 \makedefun{deftypefn}#1 #2 #3 #4\endheader{%
-  \defind{fn}{\code{#3}}%
+  \doind{fn}{\code{#3}}%
   \doingtypefntrue
   \defname{#1}{#2}{#3}\defunargs{#4\unskip}%
 }
@@ -7675,7 +7682,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 % @deftypeop category class type name args
 \makedefun{deftypeop}#1 {\deftypeopheaderx{#1\ \putwordon}}
 \def\deftypeopheaderx#1#2 #3 #4 #5\endheader{%
-  \defind{fn}{\code{#4}\space\putwordon\ \code{#1\ \code{#2}}}%
+  \doind{fn}{\code{#4}\space\putwordon\ \code{#1\ \code{#2}}}%
   \doingtypefntrue
   \defname{#1\ \code{#2}}{#3}{#4}\defunargs{#5\unskip}%
 }
@@ -7684,14 +7691,14 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 
 % @deftypevr category type var args
 \makedefun{deftypevr}#1 #2 #3 #4\endheader{%
-  \defind{vr}{\code{#3}}%
+  \doind{vr}{\code{#3}}%
   \defname{#1}{#2}{#3}\defunargs{#4\unskip}%
 }
 
 % @deftypecv category class type var args
 \makedefun{deftypecv}#1 {\deftypecvheaderx{#1\ \putwordof}}
 \def\deftypecvheaderx#1#2 #3 #4 #5\endheader{%
-  \defind{vr}{\code{#4}\space\putwordof\ \code{#2}}%
+  \doind{vr}{\code{#4}\space\putwordof\ \code{#2}}%
   \defname{#1\ \code{#2}}{#3}{#4}\defunargs{#5\unskip}%
 }
 
@@ -7708,7 +7715,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 
 % @deftp category name args
 \makedefun{deftp}#1 #2 #3\endheader{%
-  \defind{tp}{\code{#2}}%
+  \doind{tp}{\code{#2}}%
   \defname{#1}{}{#2}\defunargs{#3\unskip}%
 }
 
@@ -8580,6 +8587,87 @@ might help (with 'rm \jobname.?? \jobname.??s')%
   \fi \macnamexxx}
 
 
+% @linemacro
+
+\parseargdef\linemacro{%
+  \linegetargs#1 \linegetargs
+  \expandafter\linegetparamlist\argl;%
+  \begingroup \macrobodyctxt \usembodybackslash
+  \parselinemacrobody
+}
+
+% Parse the arguments to a @linemacro line.  Set \macname to the name
+% of the macro and \argl to the list of arguments.
+\def\linegetargs#1 #2\linegetargs{%
+  \macname={#1}%
+  \def\argl{#2}%
+}
+
+% Build up \paramlist which will be used as the parameter text for the macro.
+% At the end it will be like "#1 #2 #3\endlinemacro".
+\def\linegetparamlist#1;{%
+  \paramno=0\def\paramlist{}%
+  \let\hash\relax \let\xeatspaces\relax
+  \linegetparamlistxxx#1; %
+}
+\def\linegetparamlistxxx#1 {%
+  \if#1;\let\next=\linegetparamlistxxxx
+  \else \let\next=\linegetparamlistxxx
+    \advance\paramno by 1
+    \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
+        {\noexpand\xeatspaces{\hash\the\paramno}}%
+    \edef\paramlist{\paramlist\hash\the\paramno\space}%
+  \fi\next}
+\def\linegetparamlistxxxx{%
+  \ifx\paramlist\empty
+     \def\paramlist{\hash 1\endlinemacro}%
+  \else
+    \expandafter\fixparamlist\paramlist\fixparamlist
+  \fi
+}
+% Replace final space token
+\def\fixparamlist#1 \fixparamlist{%
+  \def\paramlist{#1\endlinemacro}%
+}
+
+% Read the body of the macro, replacing backslash-surrounded variables
+%
+{\catcode`\ =\other\long\gdef\parselinemacrobody#1@end linemacro{%
+\let\xeatspaces\relax
+\xdef\macrobody{#1}%
+\endgroup
+\linemacrodef
+}}
+
+% Make the definition
+\def\linemacrodef{%
+  \let\hash=##%
+  \let\xeatspaces\relax
+  \expandafter\xdef\csname\the\macname\endcsname{%
+    \bgroup
+    \noexpand\scanctxt
+    \noexpand\parsearg
+    \expandafter\noexpand\csname\the\macname @@\endcsname
+  }
+  \expandafter\xdef\csname\the\macname @@\endcsname##1{%
+    \egroup
+    \expandafter\noexpand
+    \csname\the\macname @@@\endcsname##1 \noexpand\endlinemacro
+    % Note that we append a space to the macro line to terminate the last
+    % argument in case the final argument is empty.  @xeatspaces may be needed
+    % to remove this space.
+  }
+  \expandafter\expandafter
+  \expandafter\xdef
+  \expandafter\expandafter\csname\the\macname @@@\endcsname\paramlist{%
+    \newlinechar=13 % split \macrobody into lines
+    \let\noexpand\xeatspaces\noexpand\eatspaces
+    \noexpand\scantokens{\macrobody}%
+  }
+}
+
+
+
 % @alias.
 % We need some trickery to remove the optional spaces around the equal
 % sign.  Make them active and then expand them all to nothing.
diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in
index 53a821b141e..47d08a5e27f 100644
--- a/lib/gnulib.mk.in
+++ b/lib/gnulib.mk.in
@@ -156,7 +156,7 @@
 #  sys_stat \
 #  sys_time \
 #  tempname \
-#  time \
+#  time-h \
 #  time_r \
 #  time_rz \
 #  timegm \
@@ -595,6 +595,7 @@ GL_GNULIB_STRVERSCMP = @GL_GNULIB_STRVERSCMP@
 GL_GNULIB_SYMLINK = @GL_GNULIB_SYMLINK@
 GL_GNULIB_SYMLINKAT = @GL_GNULIB_SYMLINKAT@
 GL_GNULIB_SYSTEM_POSIX = @GL_GNULIB_SYSTEM_POSIX@
+GL_GNULIB_TIME = @GL_GNULIB_TIME@
 GL_GNULIB_TIMEGM = @GL_GNULIB_TIMEGM@
 GL_GNULIB_TIMESPEC_GET = @GL_GNULIB_TIMESPEC_GET@
 GL_GNULIB_TIMESPEC_GETRES = @GL_GNULIB_TIMESPEC_GETRES@
@@ -1209,6 +1210,7 @@ REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@
 REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
 REPLACE_SYMLINK = @REPLACE_SYMLINK@
 REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@
+REPLACE_TIME = @REPLACE_TIME@
 REPLACE_TIMEGM = @REPLACE_TIMEGM@
 REPLACE_TIMESPEC_GET = @REPLACE_TIMESPEC_GET@
 REPLACE_TMPFILE = @REPLACE_TMPFILE@
@@ -3723,8 +3725,8 @@ EXTRA_DIST += tempname.h
 endif
 ## end   gnulib module tempname
 
-## begin gnulib module time
-ifeq (,$(OMIT_GNULIB_MODULE_time))
+## begin gnulib module time-h
+ifeq (,$(OMIT_GNULIB_MODULE_time-h))
 
 BUILT_SOURCES += time.h
 
@@ -3743,6 +3745,7 @@ time.h: time.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) $(ARG_NONNULL_H) $(
              -e 's/@''GNULIB_NANOSLEEP''@/$(GL_GNULIB_NANOSLEEP)/g' \
              -e 's/@''GNULIB_STRFTIME''@/$(GL_GNULIB_STRFTIME)/g' \
              -e 's/@''GNULIB_STRPTIME''@/$(GL_GNULIB_STRPTIME)/g' \
+             -e 's/@''GNULIB_TIME''@/$(GL_GNULIB_TIME)/g' \
              -e 's/@''GNULIB_TIMEGM''@/$(GL_GNULIB_TIMEGM)/g' \
              -e 's/@''GNULIB_TIMESPEC_GET''@/$(GL_GNULIB_TIMESPEC_GET)/g' \
              -e 
's/@''GNULIB_TIMESPEC_GETRES''@/$(GL_GNULIB_TIMESPEC_GETRES)/g' \
@@ -3764,6 +3767,7 @@ time.h: time.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) $(ARG_NONNULL_H) $(
              -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \
              -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \
              -e 's|@''REPLACE_STRFTIME''@|$(REPLACE_STRFTIME)|g' \
+             -e 's|@''REPLACE_TIME''@|$(REPLACE_TIME)|g' \
              -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \
              -e 's|@''REPLACE_TIMESPEC_GET''@|$(REPLACE_TIMESPEC_GET)|g' \
              -e 's|@''REPLACE_TZSET''@|$(REPLACE_TZSET)|g' \
@@ -3782,7 +3786,7 @@ MOSTLYCLEANFILES += time.h time.h-t
 EXTRA_DIST += time.in.h
 
 endif
-## end   gnulib module time
+## end   gnulib module time-h
 
 ## begin gnulib module time_r
 ifeq (,$(OMIT_GNULIB_MODULE_time_r))
diff --git a/lib/stdio.in.h b/lib/stdio.in.h
index 3f8ea985335..098f841738c 100644
--- a/lib/stdio.in.h
+++ b/lib/stdio.in.h
@@ -36,6 +36,12 @@
 
 #ifndef _@GUARD_PREFIX@_STDIO_H
 
+/* Suppress macOS deprecation warnings for sprintf and vsprintf.  */
+#if (defined __APPLE__ && defined __MACH__) && !defined _POSIX_C_SOURCE
+# define _POSIX_C_SOURCE 200809L
+# define _GL_DEFINED__POSIX_C_SOURCE
+#endif
+
 #define _GL_ALREADY_INCLUDING_STDIO_H
 
 /* The include_next requires a split double-inclusion guard.  */
@@ -43,6 +49,11 @@
 
 #undef _GL_ALREADY_INCLUDING_STDIO_H
 
+#ifdef _GL_DEFINED__POSIX_C_SOURCE
+# undef _GL_DEFINED__POSIX_C_SOURCE
+# undef _POSIX_C_SOURCE
+#endif
+
 #ifndef _@GUARD_PREFIX@_STDIO_H
 #define _@GUARD_PREFIX@_STDIO_H
 
diff --git a/lib/time.in.h b/lib/time.in.h
index 87cda21413b..3f9af920e34 100644
--- a/lib/time.in.h
+++ b/lib/time.in.h
@@ -143,6 +143,20 @@ _GL_CXXALIAS_SYS (timespec_getres, int, (struct timespec 
*ts, int base));
 _GL_CXXALIASWARN (timespec_getres);
 # endif
 
+/* Return the number of seconds that have elapsed since the Epoch.  */
+# if @GNULIB_TIME@
+#  if @REPLACE_TIME@
+#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#    define time rpl_time
+#   endif
+_GL_FUNCDECL_RPL (time, time_t, (time_t *__tp));
+_GL_CXXALIAS_RPL (time, time_t, (time_t *__tp));
+#  else
+_GL_CXXALIAS_SYS (time, time_t, (time_t *__tp));
+#  endif
+_GL_CXXALIASWARN (time);
+# endif
+
 /* Sleep for at least RQTP seconds unless interrupted,  If interrupted,
    return -1 and store the remaining time into RMTP.  See
    
<https://pubs.opengroup.org/onlinepubs/9699919799/functions/nanosleep.html>.  */
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
index 0658652a99e..1bd16a779eb 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -189,7 +189,7 @@ AC_DEFUN([gl_EARLY],
   # Code from module sys_time:
   # Code from module sys_types:
   # Code from module tempname:
-  # Code from module time:
+  # Code from module time-h:
   # Code from module time_r:
   # Code from module time_rz:
   # Code from module timegm:
diff --git a/m4/time_h.m4 b/m4/time_h.m4
index b74870c3d0e..51d553a2f1a 100644
--- a/m4/time_h.m4
+++ b/m4/time_h.m4
@@ -2,7 +2,7 @@
 
 # Copyright (C) 2000-2001, 2003-2007, 2009-2023 Free Software Foundation, Inc.
 
-# serial 21
+# serial 22
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -137,6 +137,7 @@ AC_DEFUN([gl_TIME_H_REQUIRE_DEFAULTS],
     gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_NANOSLEEP])
     gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRFTIME])
     gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRPTIME])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIME])
     gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMEGM])
     gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMESPEC_GET])
     gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMESPEC_GETRES])
@@ -169,6 +170,7 @@ AC_DEFUN([gl_TIME_H_DEFAULTS],
   REPLACE_MKTIME=GNULIB_PORTCHECK;       AC_SUBST([REPLACE_MKTIME])
   REPLACE_NANOSLEEP=GNULIB_PORTCHECK;    AC_SUBST([REPLACE_NANOSLEEP])
   REPLACE_STRFTIME=GNULIB_PORTCHECK;     AC_SUBST([REPLACE_STRFTIME])
+  REPLACE_TIME=0;                        AC_SUBST([REPLACE_TIME])
   REPLACE_TIMEGM=GNULIB_PORTCHECK;       AC_SUBST([REPLACE_TIMEGM])
   REPLACE_TIMESPEC_GET=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMESPEC_GET])
   REPLACE_TZSET=GNULIB_PORTCHECK;        AC_SUBST([REPLACE_TZSET])



reply via email to

[Prev in Thread] Current Thread [Next in Thread]