* building the docs
@ 2019-05-16 6:15 Jean-Christophe Helary
2019-05-16 6:52 ` Eli Zaretskii
0 siblings, 1 reply; 13+ messages in thread
From: Jean-Christophe Helary @ 2019-05-16 6:15 UTC (permalink / raw)
To: Emacs developers
For some reason, make docs only produces an elisp.pdf with:
------
Index (p 1225)
(Index is nonexistent)
------
The first error I get is:
[51] [52] [53] [54] [55] [56]
Underfull \hbox (badness 10000) in paragraph at lines 504--507
Then comes a long list of "underfull badness"...
emacs.pdf similarly comes with a lack of index, as does emacs-lisp-intro.pdf, and all the manuals that come in /misc...
Do you have hints for debugging this ?
Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: building the docs
2019-05-16 6:15 building the docs Jean-Christophe Helary
@ 2019-05-16 6:52 ` Eli Zaretskii
2019-05-16 6:59 ` Jean-Christophe Helary
0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2019-05-16 6:52 UTC (permalink / raw)
To: emacs-devel, Jean-Christophe Helary, Emacs developers
On May 16, 2019 9:15:09 AM GMT+03:00, Jean-Christophe Helary <brandelune@gmail.com> wrote:
> For some reason, make docs only produces an elisp.pdf with:
>
> ------
> Index (p 1225)
>
> (Index is nonexistent)
>
> ------
>
> The first error I get is:
>
> [51] [52] [53] [54] [55] [56]
> Underfull \hbox (badness 10000) in paragraph at lines 504--507
>
> Then comes a long list of "underfull badness"...
>
>
> emacs.pdf similarly comes with a lack of index, as does
> emacs-lisp-intro.pdf, and all the manuals that come in /misc...
>
> Do you have hints for debugging this ?
>
>
> Jean-Christophe Helary
> -----------------------------------------------
> http://mac4translators.blogspot.com @brandelune
Not sure I understand: you get no Index at all, or do you get an empty Index?
Is your TeX and Texinfo installation functional? Can you produce PDF manuals with indices for some other package? If not, perhaps something is wrong with texindex or with texi2pdf?
The underfull box thingies are not fatal, just ignore them.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: building the docs
2019-05-16 6:52 ` Eli Zaretskii
@ 2019-05-16 6:59 ` Jean-Christophe Helary
2019-05-16 13:54 ` Eli Zaretskii
2019-05-17 10:01 ` 조성빈
0 siblings, 2 replies; 13+ messages in thread
From: Jean-Christophe Helary @ 2019-05-16 6:59 UTC (permalink / raw)
To: Emacs developers
[-- Attachment #1: Type: text/plain, Size: 1360 bytes --]
> On May 16, 2019, at 15:52, Eli Zaretskii <eliz@gnu.org> wrote:
>
> On May 16, 2019 9:15:09 AM GMT+03:00, Jean-Christophe Helary <brandelune@gmail.com> wrote:
>> For some reason, make docs only produces an elisp.pdf with:
>>
>> ------
>> Index (p 1225)
>>
>> (Index is nonexistent)
>>
>> ------
>
> Not sure I understand: you get no Index at all, or do you get an empty Index?
I get an index page with (Index is nonexistent) instead of an index.
> Is your TeX and Texinfo installation functional?
I'd say yes. But obviously it is no...
> Can you produce PDF manuals with indices for some other package?
I only use texinfo for emacs docs. It looks like all the manuals in /misc have an index page that says (Index is nonexistent).
> If not, perhaps something is wrong with texindex or with texi2pdf?
I removed texinfo and reinstalled it. And that's what I get. Since I use brew on macos to manage texinfo and have never tried to install it by hand, I guess that's a recent update from the package that's causing the glitch since I don't seem to remember having such issues in the relatively recent past...
> The underfull box thingies are not fatal, just ignore them.
Thank you.
Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune
[-- Attachment #2: Type: text/html, Size: 3584 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: building the docs
2019-05-16 6:59 ` Jean-Christophe Helary
@ 2019-05-16 13:54 ` Eli Zaretskii
2019-05-17 8:56 ` Jean-Christophe Helary
2019-05-17 10:01 ` 조성빈
1 sibling, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2019-05-16 13:54 UTC (permalink / raw)
To: Jean-Christophe Helary; +Cc: emacs-devel
> From: Jean-Christophe Helary <brandelune@gmail.com>
> Date: Thu, 16 May 2019 15:59:11 +0900
>
> Not sure I understand: you get no Index at all, or do you get an empty Index?
>
> I get an index page with (Index is nonexistent) instead of an index.
Then I cannot reproduce this with a recent master. I guess it's
something related to your installation of TeX or Texinfo. Does
elisp.log say something about the index?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: building the docs
2019-05-16 13:54 ` Eli Zaretskii
@ 2019-05-17 8:56 ` Jean-Christophe Helary
2019-05-17 9:30 ` Eli Zaretskii
0 siblings, 1 reply; 13+ messages in thread
From: Jean-Christophe Helary @ 2019-05-17 8:56 UTC (permalink / raw)
To: Emacs developers
[-- Attachment #1: Type: text/plain, Size: 1048 bytes --]
> On May 16, 2019, at 22:54, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> From: Jean-Christophe Helary <brandelune@gmail.com>
>> Date: Thu, 16 May 2019 15:59:11 +0900
>>
>> Not sure I understand: you get no Index at all, or do you get an empty Index?
>>
>> I get an index page with (Index is nonexistent) instead of an index.
>
> Then I cannot reproduce this with a recent master. I guess it's
> something related to your installation of TeX or Texinfo. Does
> elisp.log say something about the index?
The only thing that looks like an error is:
(/Users/suzume/Documents/Code/emacs/doc/lispref/index.texi (Index) [1224]
No file elisp.fns.
) [1225] )
Also, the html version does include the index, only the ps, dvi and pdf don't.
I just did a new checkout on emacs master, removed/reinstalled texinfo. But I have the same result.
There must be something trivial that I'm missing... :(
Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune
[-- Attachment #2: Type: text/html, Size: 2878 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: building the docs
2019-05-17 8:56 ` Jean-Christophe Helary
@ 2019-05-17 9:30 ` Eli Zaretskii
0 siblings, 0 replies; 13+ messages in thread
From: Eli Zaretskii @ 2019-05-17 9:30 UTC (permalink / raw)
To: Jean-Christophe Helary; +Cc: emacs-devel
> From: Jean-Christophe Helary <brandelune@gmail.com>
> Date: Fri, 17 May 2019 17:56:09 +0900
>
> Then I cannot reproduce this with a recent master. I guess it's
> something related to your installation of TeX or Texinfo. Does
> elisp.log say something about the index?
>
> The only thing that looks like an error is:
>
> (/Users/suzume/Documents/Code/emacs/doc/lispref/index.texi (Index) [1224]
> No file elisp.fns.
> ) [1225] )
That's your problem. You need to find out why this file is not being
produced.
> Also, the html version does include the index, only the ps, dvi and pdf don't.
The HTML version doesn't use TeX, the rest of the formats do.
> I just did a new checkout on emacs master, removed/reinstalled texinfo. But I have the same result.
> There must be something trivial that I'm missing... :(
Looks like some problem with Texinfo you are installing, or with TeX
(a separate package), or maybe with Gawk (nowadays texindex is an Awk
script).
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: building the docs
2019-05-16 6:59 ` Jean-Christophe Helary
2019-05-16 13:54 ` Eli Zaretskii
@ 2019-05-17 10:01 ` 조성빈
2019-05-17 11:54 ` Jean-Christophe Helary
1 sibling, 1 reply; 13+ messages in thread
From: 조성빈 @ 2019-05-17 10:01 UTC (permalink / raw)
To: Jean-Christophe Helary; +Cc: Emacs developers
2019. 5. 16. 오후 3:59, Jean-Christophe Helary <brandelune@gmail.com> 작성:
>> If not, perhaps something is wrong with texindex or with texi2pdf?
>
> I removed texinfo and reinstalled it. And that's what I get. Since I use brew on macos to manage texinfo and have never tried to install it by hand, I guess that's a recent update from the package that's causing the glitch since I don't seem to remember having such issues in the relatively recent past...
IIRC, homebrew’s texinfo is a keg-only formula; If you want the executable in the path you should add /usr/local/opt/texinfo/bin.... and I’m pretty sure I (macOS High Sierra) could get my docs right.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: building the docs
2019-05-17 10:01 ` 조성빈
@ 2019-05-17 11:54 ` Jean-Christophe Helary
2019-05-18 12:44 ` Jean-Christophe Helary
0 siblings, 1 reply; 13+ messages in thread
From: Jean-Christophe Helary @ 2019-05-17 11:54 UTC (permalink / raw)
To: Emacs developers
[-- Attachment #1: Type: text/plain, Size: 2044 bytes --]
> On May 17, 2019, at 19:01, 조성빈 <pcr910303@icloud.com> wrote:
>
> 2019. 5. 16. 오후 3:59, Jean-Christophe Helary <brandelune@gmail.com> 작성:
>
>>> If not, perhaps something is wrong with texindex or with texi2pdf?
>>
>> I removed texinfo and reinstalled it. And that's what I get. Since I use brew on macos to manage texinfo and have never tried to install it by hand, I guess that's a recent update from the package that's causing the glitch since I don't seem to remember having such issues in the relatively recent past...
>
> IIRC, homebrew’s texinfo is a keg-only formula; If you want the executable in the path you should add /usr/local/opt/texinfo/bin.... and I’m pretty sure I (macOS High Sierra) could get my docs right.
I seem to recall that it was the same for me until I found out about those errors. Maybe it's an upgrade in the OS that messed things.
> On May 17, 2019, at 18:30, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> The only thing that looks like an error is:
>>
>> (/Users/suzume/Documents/Code/emacs/doc/lispref/index.texi (Index) [1224]
>> No file elisp.fns.
>> ) [1225] )
>
> That's your problem. You need to find out why this file is not being
> produced.
Definitely.
>> Also, the html version does include the index, only the ps, dvi and pdf don't.
>
> The HTML version doesn't use TeX, the rest of the formats do.
That makes sense.
>> I just did a new checkout on emacs master, removed/reinstalled texinfo. But I have the same result.
>> There must be something trivial that I'm missing... :(
>
> Looks like some problem with Texinfo you are installing, or with TeX
> (a separate package), or maybe with Gawk (nowadays texindex is an Awk
> script).
Ok, I'll check all that. But considering that I've recently had errors with the libxml2 headers when building emacs all this is probably strongly related.
Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune
[-- Attachment #2: Type: text/html, Size: 4887 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: building the docs
2019-05-17 11:54 ` Jean-Christophe Helary
@ 2019-05-18 12:44 ` Jean-Christophe Helary
2019-05-29 6:11 ` Jean-Christophe Helary
0 siblings, 1 reply; 13+ messages in thread
From: Jean-Christophe Helary @ 2019-05-18 12:44 UTC (permalink / raw)
To: Emacs developers
>>> I just did a new checkout on emacs master, removed/reinstalled texinfo. But I have the same result.
>>> There must be something trivial that I'm missing... :(
>>
>> Looks like some problem with Texinfo you are installing, or with TeX
>> (a separate package), or maybe with Gawk (nowadays texindex is an Awk
>> script).
>
> Ok, I'll check all that. But considering that I've recently had errors with the libxml2 headers when building emacs all this is probably strongly related.
I've reinstalled the whole mactex distribution and I still get the same result...
Still investigating...
Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: building the docs
2019-05-18 12:44 ` Jean-Christophe Helary
@ 2019-05-29 6:11 ` Jean-Christophe Helary
2019-05-29 15:04 ` Eli Zaretskii
0 siblings, 1 reply; 13+ messages in thread
From: Jean-Christophe Helary @ 2019-05-29 6:11 UTC (permalink / raw)
To: Emacs developers
[-- Attachment #1: Type: text/plain, Size: 1359 bytes --]
Just so that you know, I asked the texinfo help list and it appears that the texinfo.tex file that I had was not good (although that's the one I checked out from the git repository).
Karl told me I should use the one on the ftp.gnu.org site, which I did, and all the missing index reappeared.
So there is maybe an issue with the emacs git repository file.
Jean-Christophe
> On May 18, 2019, at 21:44, Jean-Christophe Helary <brandelune@gmail.com> wrote:
>
>>>> I just did a new checkout on emacs master, removed/reinstalled texinfo. But I have the same result.
>>>> There must be something trivial that I'm missing... :(
>>>
>>> Looks like some problem with Texinfo you are installing, or with TeX
>>> (a separate package), or maybe with Gawk (nowadays texindex is an Awk
>>> script).
>>
>> Ok, I'll check all that. But considering that I've recently had errors with the libxml2 headers when building emacs all this is probably strongly related.
>
> I've reinstalled the whole mactex distribution and I still get the same result...
>
> Still investigating...
>
> Jean-Christophe Helary
> -----------------------------------------------
> http://mac4translators.blogspot.com @brandelune
>
>
Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune
[-- Attachment #2: Type: text/html, Size: 3358 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: building the docs
2019-05-29 6:11 ` Jean-Christophe Helary
@ 2019-05-29 15:04 ` Eli Zaretskii
2019-05-29 23:37 ` Paul Eggert
0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2019-05-29 15:04 UTC (permalink / raw)
To: Jean-Christophe Helary; +Cc: emacs-devel
> From: Jean-Christophe Helary <brandelune@gmail.com>
> Date: Wed, 29 May 2019 15:11:07 +0900
>
> Just so that you know, I asked the texinfo help list and it appears that the texinfo.tex file that I had was not good
> (although that's the one I checked out from the git repository).
>
> Karl told me I should use the one on the ftp.gnu.org site, which I did, and all the missing index reappeared.
>
> So there is maybe an issue with the emacs git repository file.
Paul imports the Gnulib version regularly, and Karl Berry said that
version had a problem.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: building the docs
2019-05-29 15:04 ` Eli Zaretskii
@ 2019-05-29 23:37 ` Paul Eggert
2019-05-30 1:46 ` Jean-Christophe Helary
0 siblings, 1 reply; 13+ messages in thread
From: Paul Eggert @ 2019-05-29 23:37 UTC (permalink / raw)
To: Eli Zaretskii, Jean-Christophe Helary; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 317 bytes --]
On 5/29/19 8:04 AM, Eli Zaretskii wrote:
> Paul imports the Gnulib version regularly, and Karl Berry said that
> version had a problem.
I ran 'admin/update-gnulib' and installed the resulting patch. This
upgrades master to the latest version in Gnulib, which Karl updated
recently, and so should fix the problem.
[-- Attachment #2: 0001-Update-from-Gnulib.patch --]
[-- Type: text/x-patch, Size: 25595 bytes --]
From 8986dbe3a8edb9296bdd83323b1138a756da2f7a Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Wed, 29 May 2019 16:33:51 -0700
Subject: [PATCH] Update from Gnulib
This incorporates:
2019-05-24 flexmember: update comments
2019-05-18 pthread_sigmask: fix --enable-threads=windows compilation
2019-05-14 close-stream, closein, closeout: simplify
2019-05-09 verify: remove verify_true
2019-05-09 verify: support C2X and C++17 static_assert
* build-aux/config.guess, build-aux/config.sub:
* doc/misc/texinfo.tex, lib/flexmember.h, lib/verify.h:
* m4/flexmember.m4, m4/pthread_sigmask.m4:
Copy from Gnulib
* m4/gnulib-comp.m4: Regenerate.
2019-05-26 Paul Eggert <eggert@cs.ucla.edu>
Update author/maintainer info
This mostly updates email addresses and fixes spellings of
author and maintainer names.
---
build-aux/config.guess | 61 +++++++++---------
build-aux/config.sub | 4 +-
doc/misc/texinfo.tex | 17 ++++-
lib/flexmember.h | 25 ++++++--
lib/verify.h | 110 ++++++++++++++++----------------
m4/flexmember.m4 | 8 +--
m4/gnulib-comp.m4 | 2 -
m4/pthread_sigmask.m4 | 140 ++++++++++++++++++++---------------------
8 files changed, 195 insertions(+), 172 deletions(-)
diff --git a/build-aux/config.guess b/build-aux/config.guess
index 4cd9454b35..ae713942d8 100755
--- a/build-aux/config.guess
+++ b/build-aux/config.guess
@@ -2,7 +2,7 @@
# Attempt to guess a canonical system name.
# Copyright 1992-2019 Free Software Foundation, Inc.
-timestamp='2019-04-28'
+timestamp='2019-05-28'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -1325,38 +1325,39 @@ main ()
echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
exit ;;
*:Darwin:*:*)
- UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- set_cc_for_build
- if test "$UNAME_PROCESSOR" = unknown ; then
- UNAME_PROCESSOR=powerpc
+ UNAME_PROCESSOR=`uname -p`
+ case $UNAME_PROCESSOR in
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ if command -v xcode-select > /dev/null 2> /dev/null && \
+ ! xcode-select --print-path > /dev/null 2> /dev/null ; then
+ # Avoid executing cc if there is no toolchain installed as
+ # cc will be a stub that puts up a graphical alert
+ # prompting the user to install developer tools.
+ CC_FOR_BUILD=no_compiler_found
+ else
+ set_cc_for_build
fi
- if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
- if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- case $UNAME_PROCESSOR in
- i386) UNAME_PROCESSOR=x86_64 ;;
- powerpc) UNAME_PROCESSOR=powerpc64 ;;
- esac
- fi
- # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
- if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
- (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_PPC >/dev/null
- then
- UNAME_PROCESSOR=powerpc
- fi
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+ if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_PPC >/dev/null
+ then
+ UNAME_PROCESSOR=powerpc
fi
elif test "$UNAME_PROCESSOR" = i386 ; then
- # Avoid executing cc on OS X 10.9, as it ships with a stub
- # that puts up a graphical alert prompting to install
- # developer tools. Any system running Mac OS X 10.7 or
- # later (Darwin 11 and later) is required to have a 64-bit
- # processor. This is not true of the ARM version of Darwin
- # that Apple uses in portable devices.
- UNAME_PROCESSOR=x86_64
+ # uname -m returns i386 or x86_64
+ UNAME_PROCESSOR=$UNAME_MACHINE
fi
echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
exit ;;
diff --git a/build-aux/config.sub b/build-aux/config.sub
index f53af5a2da..5b158ac41c 100755
--- a/build-aux/config.sub
+++ b/build-aux/config.sub
@@ -2,7 +2,7 @@
# Configuration validation subroutine script.
# Copyright 1992-2019 Free Software Foundation, Inc.
-timestamp='2019-01-05'
+timestamp='2019-05-23'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -1172,7 +1172,7 @@ IFS=
| asmjs \
| ba \
| be32 | be64 \
- | bfin | bs2000 \
+ | bfin | bpf | bs2000 \
| c[123]* | c30 | [cjt]90 | c4x \
| c8051 | clipper | craynv | csky | cydra \
| d10v | d30v | dlx | dsp16xx \
diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex
index ccd112941a..53f2fc4835 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{2019-04-12.13}
+\def\texinfoversion{2019-05-18.15}
%
% Copyright 1985, 1986, 1988, 1990-2019 Free Software Foundation, Inc.
%
@@ -4952,6 +4952,8 @@
\definedummyword\sup
\definedummyword\textdegree
%
+ \definedummyword\subentry
+ %
% We want to disable all macros so that they are not expanded by \write.
\macrolist
\let\value\dummyvalue
@@ -5224,10 +5226,10 @@
}
\def\indexwriteseealso#1{
- \gdef\pagenumbertext{@seealso{#1}}%
+ \gdef\pagenumbertext{\string\seealso{#1}}%
}
\def\indexwriteseeentry#1{
- \gdef\pagenumbertext{@seeentry{#1}}%
+ \gdef\pagenumbertext{\string\seeentry{#1}}%
}
% The default definitions
@@ -5315,6 +5317,15 @@
% the current value of \escapechar.
\def\escapeisbackslash{\escapechar=`\\}
+% Use \ in index files by default. texi2dvi didn't support @ as as the escape
+% character (as it checked for "\entry" in the files, and not "@entry"). When
+% the new version of texi2dvi has had a chance to become more prevalent, then
+% the escape character can change back to @ again. This should be an easy
+% change to make now because both @ and \ are only used as escape characters in
+% index files, never standing for themselves.
+%
+\set txiindexescapeisbackslash
+
% Write the entry in \indextext to the index file.
%
\def\doindwrite{%
diff --git a/lib/flexmember.h b/lib/flexmember.h
index 0d65f6da60..af17b41d29 100644
--- a/lib/flexmember.h
+++ b/lib/flexmember.h
@@ -33,11 +33,26 @@
# define FLEXALIGNOF(type) _Alignof (type)
#endif
-/* Upper bound on the size of a struct of type TYPE with a flexible
- array member named MEMBER that is followed by N bytes of other data.
- This is not simply sizeof (TYPE) + N, since it may require
- alignment on unusually picky C11 platforms, and
- FLEXIBLE_ARRAY_MEMBER may be 1 on pre-C11 platforms.
+/* Yield a properly aligned upper bound on the size of a struct of
+ type TYPE with a flexible array member named MEMBER that is
+ followed by N bytes of other data. The result is suitable as an
+ argument to malloc. For example:
+
+ struct s { int n; char d[FLEXIBLE_ARRAY_MEMBER]; };
+ struct s *p = malloc (FLEXSIZEOF (struct s, d, n * sizeof (char)));
+
+ FLEXSIZEOF (TYPE, MEMBER, N) is not simply (sizeof (TYPE) + N),
+ since FLEXIBLE_ARRAY_MEMBER may be 1 on pre-C11 platforms. Nor is
+ it simply (offsetof (TYPE, MEMBER) + N), as that might yield a size
+ that causes malloc to yield a pointer that is not properly aligned
+ for TYPE; for example, if sizeof (int) == alignof (int) == 4,
+ malloc (offsetof (struct s, d) + 3 * sizeof (char)) is equivalent
+ to malloc (7) and might yield a pointer that is not a multiple of 4
+ (which means the pointer is not properly aligned for struct s),
+ whereas malloc (FLEXSIZEOF (struct s, d, 3 * sizeof (char))) is
+ equivalent to malloc (8) and must yield a pointer that is a
+ multiple of 4.
+
Yield a value less than N if and only if arithmetic overflow occurs. */
#define FLEXSIZEOF(type, member, n) \
diff --git a/lib/verify.h b/lib/verify.h
index 6930645a35..f8e4eff026 100644
--- a/lib/verify.h
+++ b/lib/verify.h
@@ -21,29 +21,37 @@
#define _GL_VERIFY_H
-/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert works as per C11.
- This is supported by GCC 4.6.0 and later, in C mode, and its use
- here generates easier-to-read diagnostics when verify (R) fails.
-
- Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per C++11.
- This is supported by GCC 6.1.0 and later, in C++ mode.
-
- Use this only with GCC. If we were willing to slow 'configure'
- down we could also use it with other compilers, but since this
- affects only the quality of diagnostics, why bother? */
-#if (4 < __GNUC__ + (6 <= __GNUC_MINOR__) \
- && (201112L <= __STDC_VERSION__ || !defined __STRICT_ANSI__) \
- && !defined __cplusplus)
-# define _GL_HAVE__STATIC_ASSERT 1
-#endif
-#if (6 <= __GNUC__) && defined __cplusplus
-# define _GL_HAVE_STATIC_ASSERT 1
+/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert (R, DIAGNOSTIC)
+ works as per C11. This is supported by GCC 4.6.0 and later, in C
+ mode.
+
+ Define _GL_HAVE__STATIC_ASSERT1 to 1 if _Static_assert (R) works as
+ per C2X, and define _GL_HAVE_STATIC_ASSERT1 if static_assert (R)
+ works as per C++17. This is supported by GCC 9.1 and later.
+
+ Support compilers claiming conformance to the relevant standard,
+ and also support GCC when not pedantic. If we were willing to slow
+ 'configure' down we could also use it with other compilers, but
+ since this affects only the quality of diagnostics, why bother? */
+#ifndef __cplusplus
+# if (201112L <= __STDC_VERSION__ \
+ || (!defined __STRICT_ANSI__ && 4 < __GNUC__ + (6 <= __GNUC_MINOR__)))
+# define _GL_HAVE__STATIC_ASSERT 1
+# endif
+# if (202000L <= __STDC_VERSION__ \
+ || (!defined __STRICT_ANSI__ && 9 <= __GNUC__))
+# define _GL_HAVE__STATIC_ASSERT1 1
+# endif
+#else
+# if 201703L <= __cplusplus || 9 <= __GNUC__
+# define _GL_HAVE_STATIC_ASSERT1 1
+# endif
#endif
/* FreeBSD 9.1 <sys/cdefs.h>, included by <stddef.h> and lots of other
system headers, defines a conflicting _Static_assert that is no
better than ours; override it. */
-#ifndef _GL_HAVE_STATIC_ASSERT
+#ifndef _GL_HAVE__STATIC_ASSERT
# include <stddef.h>
# undef _Static_assert
#endif
@@ -141,9 +149,9 @@ #define _GL_VERIFY_H
which do not support _Static_assert, also do not warn about the
last declaration mentioned above.
- * GCC warns if -Wnested-externs is enabled and verify() is used
+ * GCC warns if -Wnested-externs is enabled and 'verify' is used
within a function body; but inside a function, you can always
- arrange to use verify_expr() instead.
+ arrange to use verify_expr instead.
* In C++, any struct definition inside sizeof is invalid.
Use a template type to work around the problem. */
@@ -167,11 +175,9 @@ #define _GL_CONCAT0(x, y) x##y
#define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER)
/* Verify requirement R at compile-time, as an integer constant expression
- that returns 1. If R is false, fail at compile-time, preferably
- with a diagnostic that includes the string-literal DIAGNOSTIC. */
+ that returns 1. If R is false, fail at compile-time. */
-#define _GL_VERIFY_TRUE(R, DIAGNOSTIC) \
- (!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC)))
+#define _GL_VERIFY_TRUE(R) (!!sizeof (_GL_VERIFY_TYPE (R)))
#ifdef __cplusplus
# if !GNULIB_defined_struct__gl_verify_type
@@ -181,40 +187,43 @@ #define _GL_VERIFY_TRUE(R, DIAGNOSTIC) \
};
# define GNULIB_defined_struct__gl_verify_type 1
# endif
-# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
- _gl_verify_type<(R) ? 1 : -1>
-#elif defined _GL_HAVE__STATIC_ASSERT
-# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
+# define _GL_VERIFY_TYPE(R) _gl_verify_type<(R) ? 1 : -1>
+#elif defined _GL_HAVE__STATIC_ASSERT1
+# define _GL_VERIFY_TYPE(R) \
struct { \
- _Static_assert (R, DIAGNOSTIC); \
+ _Static_assert (R); \
int _gl_dummy; \
}
#else
-# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
+# define _GL_VERIFY_TYPE(R) \
struct { unsigned int _gl_verify_error_if_negative: (R) ? 1 : -1; }
#endif
/* Verify requirement R at compile-time, as a declaration without a
- trailing ';'. If R is false, fail at compile-time, preferably
- with a diagnostic that includes the string-literal DIAGNOSTIC.
+ trailing ';'. If R is false, fail at compile-time.
+
+ This macro requires three or more arguments but uses at most the first
+ two, so that the _Static_assert macro optionally defined below supports
+ both the C11 two-argument syntax and the C2X one-argument syntax.
Unfortunately, unlike C11, this implementation must appear as an
ordinary declaration, and cannot appear inside struct { ... }. */
-#ifdef _GL_HAVE__STATIC_ASSERT
-# define _GL_VERIFY _Static_assert
+#if defined _GL_HAVE__STATIC_ASSERT
+# define _GL_VERIFY(R, DIAGNOSTIC, ...) _Static_assert (R, DIAGNOSTIC)
#else
-# define _GL_VERIFY(R, DIAGNOSTIC) \
+# define _GL_VERIFY(R, DIAGNOSTIC, ...) \
extern int (*_GL_GENSYM (_gl_verify_function) (void)) \
- [_GL_VERIFY_TRUE (R, DIAGNOSTIC)]
+ [_GL_VERIFY_TRUE (R)]
#endif
/* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h. */
#ifdef _GL_STATIC_ASSERT_H
-# if !defined _GL_HAVE__STATIC_ASSERT && !defined _Static_assert
-# define _Static_assert(R, DIAGNOSTIC) _GL_VERIFY (R, DIAGNOSTIC)
+# if !defined _GL_HAVE__STATIC_ASSERT1 && !defined _Static_assert
+# define _Static_assert(...) \
+ _GL_VERIFY (__VA_ARGS__, "static assertion failed", -)
# endif
-# if !defined _GL_HAVE_STATIC_ASSERT && !defined static_assert
+# if !defined _GL_HAVE_STATIC_ASSERT1 && !defined static_assert
# define static_assert _Static_assert /* C11 requires this #define. */
# endif
#endif
@@ -226,31 +235,24 @@ #define _GL_VERIFY_TRUE(R, DIAGNOSTIC) \
assert (R), there is no run-time overhead.
There are two macros, since no single macro can be used in all
- contexts in C. verify_true (R) is for scalar contexts, including
+ contexts in C. verify_expr (R, E) is for scalar contexts, including
integer constant expression contexts. verify (R) is for declaration
contexts, e.g., the top level. */
-/* Verify requirement R at compile-time, as an integer constant expression.
- Return 1. This is equivalent to verify_expr (R, 1).
-
- verify_true is obsolescent; please use verify_expr instead. */
-
-#define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")")
-
/* Verify requirement R at compile-time. Return the value of the
expression E. */
-#define verify_expr(R, E) \
- (_GL_VERIFY_TRUE (R, "verify_expr (" #R ", " #E ")") ? (E) : (E))
+#define verify_expr(R, E) (_GL_VERIFY_TRUE (R) ? (E) : (E))
/* Verify requirement R at compile-time, as a declaration without a
- trailing ';'. */
+ trailing ';'. verify (R) acts like static_assert (R) except that
+ it is portable to C11/C++14 and earlier, and its name is shorter
+ and may be more convenient. */
-#ifdef __GNUC__
-# define verify(R) _GL_VERIFY (R, "verify (" #R ")")
+#ifdef _GL_HAVE__STATIC_ASSERT1
+# define verify(R) _Static_assert (R)
#else
-/* PGI barfs if R is long. Play it safe. */
-# define verify(R) _GL_VERIFY (R, "verify (...)")
+# define verify(R) _GL_VERIFY (R, "verify (...)", -)
#endif
#ifndef __has_builtin
diff --git a/m4/flexmember.m4 b/m4/flexmember.m4
index 1347068fe3..c245ab025f 100644
--- a/m4/flexmember.m4
+++ b/m4/flexmember.m4
@@ -34,12 +34,10 @@ AC_DEFUN
AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [],
[Define to nothing if C supports flexible array members, and to
1 if it does not. That way, with a declaration like 'struct s
- { int n; double d@<:@FLEXIBLE_ARRAY_MEMBER@:>@; };', the struct hack
+ { int n; short d@<:@FLEXIBLE_ARRAY_MEMBER@:>@; };', the struct hack
can be used with pre-C99 compilers.
- When computing the size of such an object, don't use 'sizeof (struct s)'
- as it overestimates the size. Use 'offsetof (struct s, d)' instead.
- Don't use 'offsetof (struct s, d@<:@0@:>@)', as this doesn't work with
- MSVC and with C++ compilers.])
+ Use 'FLEXSIZEOF (struct s, d, N * sizeof (short))' to calculate
+ the size in bytes of such a struct containing an N-element array.])
else
AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [1])
fi
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
index f648b7a495..0a7a30e5ae 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -200,7 +200,6 @@ AC_DEFUN
gl_BYTESWAP
AC_CHECK_FUNCS_ONCE([readlinkat])
gl_CLOCK_TIME
- gl_CLOSE_STREAM
gl_MODULE_INDICATOR([close-stream])
gl_COUNT_LEADING_ZEROS
gl_COUNT_ONE_BITS
@@ -996,7 +995,6 @@ AC_DEFUN
m4/builtin-expect.m4
m4/byteswap.m4
m4/clock_time.m4
- m4/close-stream.m4
m4/count-leading-zeros.m4
m4/count-one-bits.m4
m4/count-trailing-zeros.m4
diff --git a/m4/pthread_sigmask.m4 b/m4/pthread_sigmask.m4
index cadc239a3c..648edf911f 100644
--- a/m4/pthread_sigmask.m4
+++ b/m4/pthread_sigmask.m4
@@ -1,4 +1,4 @@
-# pthread_sigmask.m4 serial 16
+# pthread_sigmask.m4 serial 17
dnl Copyright (C) 2011-2019 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -9,103 +9,101 @@ AC_DEFUN
AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
AC_CHECK_FUNCS_ONCE([pthread_sigmask])
+
+ dnl On MinGW pthread_sigmask is just a macro which always returns 0.
+ dnl It does not exist as a real function, which is required by POSIX.
+ AC_CACHE_CHECK([whether pthread_sigmask is a macro],
+ [gl_cv_func_pthread_sigmask_macro],
+ [AC_EGREP_CPP([headers_define_pthread_sigmask], [
+#include <pthread.h>
+#include <signal.h>
+#ifdef pthread_sigmask
+ headers_define_pthread_sigmask
+#endif],
+ [gl_cv_func_pthread_sigmask_macro=yes],
+ [gl_cv_func_pthread_sigmask_macro=no])
+ ])
+
LIB_PTHREAD_SIGMASK=
- dnl Test whether the gnulib module 'threadlib' is in use.
- dnl Some packages like Emacs use --avoid=threadlib.
- dnl Write the symbol in such a way that it does not cause 'aclocal' to pick
- dnl the threadlib.m4 file that is installed in $PREFIX/share/aclocal/.
- m4_ifdef([gl_][THREADLIB], [
- AC_REQUIRE([gl_][THREADLIB])
+ if test $gl_cv_func_pthread_sigmask_macro = yes; then
+ dnl pthread_sigmask is a dummy macro.
+ HAVE_PTHREAD_SIGMASK=0
+ dnl Make sure to '#undef pthread_sigmask' before defining it.
+ REPLACE_PTHREAD_SIGMASK=1
+ else
+ dnl Test whether the gnulib module 'threadlib' is in use.
+ dnl Some packages like Emacs use --avoid=threadlib.
+ dnl Write the symbol in such a way that it does not cause 'aclocal' to pick
+ dnl the threadlib.m4 file that is installed in $PREFIX/share/aclocal/.
+ m4_ifdef([gl_][THREADLIB], [
+ AC_REQUIRE([gl_][THREADLIB])
- if test "$gl_threads_api" = posix; then
- if test $ac_cv_func_pthread_sigmask = yes; then
- dnl pthread_sigmask is available without -lpthread.
- :
- else
- if test -n "$LIBMULTITHREAD"; then
- AC_CACHE_CHECK([for pthread_sigmask in $LIBMULTITHREAD],
- [gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD],
- [gl_save_LIBS="$LIBS"
- LIBS="$LIBS $LIBMULTITHREAD"
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <pthread.h>
- #include <signal.h>
- ]],
- [[return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);]])
- ],
- [gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes],
- [gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no])
- LIBS="$gl_save_LIBS"
- ])
- if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
- AC_CACHE_CHECK([whether pthread_sigmask is only a macro],
- [gl_cv_func_pthread_sigmask_is_macro],
+ if test "$gl_threads_api" = posix; then
+ if test $ac_cv_func_pthread_sigmask = yes; then
+ dnl pthread_sigmask is available without -lpthread.
+ :
+ else
+ if test -n "$LIBMULTITHREAD"; then
+ AC_CACHE_CHECK([for pthread_sigmask in $LIBMULTITHREAD],
+ [gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD],
[gl_save_LIBS="$LIBS"
LIBS="$LIBS $LIBMULTITHREAD"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[#include <pthread.h>
#include <signal.h>
- #undef pthread_sigmask
]],
[[return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);]])
],
- [gl_cv_func_pthread_sigmask_is_macro=no],
- [gl_cv_func_pthread_sigmask_is_macro=yes])
+ [gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes],
+ [gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no])
LIBS="$gl_save_LIBS"
])
- if test $gl_cv_func_pthread_sigmask_is_macro = yes; then
- dnl On MinGW pthread_sigmask is just a macro which always returns 0.
- dnl It does not exist as a real function, which is required by POSIX.
- REPLACE_PTHREAD_SIGMASK=1
- gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no
+ if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
+ dnl pthread_sigmask is available with -pthread or -lpthread.
+ LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
+ else
+ dnl pthread_sigmask is not available at all.
+ HAVE_PTHREAD_SIGMASK=0
fi
- fi
- if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
- dnl pthread_sigmask is available with -pthread or -lpthread.
- LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
else
dnl pthread_sigmask is not available at all.
HAVE_PTHREAD_SIGMASK=0
fi
+ fi
+ else
+ dnl pthread_sigmask may exist but does not interoperate with the chosen
+ dnl multithreading facility.
+ dnl If "$gl_threads_api" = pth, we could use the function pth_sigmask,
+ dnl but it is equivalent to sigprocmask, so we choose to emulate
+ dnl pthread_sigmask with sigprocmask also in this case. This yields
+ dnl fewer link dependencies.
+ if test $ac_cv_func_pthread_sigmask = yes; then
+ REPLACE_PTHREAD_SIGMASK=1
else
- dnl pthread_sigmask is not available at all.
HAVE_PTHREAD_SIGMASK=0
fi
fi
- else
- dnl pthread_sigmask may exist but does not interoperate with the chosen
- dnl multithreading facility.
- dnl If "$gl_threads_api" = pth, we could use the function pth_sigmask,
- dnl but it is equivalent to sigprocmask, so we choose to emulate
- dnl pthread_sigmask with sigprocmask also in this case. This yields fewer
- dnl link dependencies.
+ ], [
+ dnl The module 'threadlib' is not in use, due to --avoid=threadlib being
+ dnl specified.
+ dnl The package either has prepared CPPFLAGS and LIBS for use of
+ dnl POSIX:2008 threads, or wants to build single-threaded programs.
if test $ac_cv_func_pthread_sigmask = yes; then
- REPLACE_PTHREAD_SIGMASK=1
+ dnl pthread_sigmask exists and does not require extra libraries.
+ dnl Assume that it is declared.
+ :
else
+ dnl pthread_sigmask either does not exist or needs extra libraries.
HAVE_PTHREAD_SIGMASK=0
+ dnl Define the symbol rpl_pthread_sigmask, not pthread_sigmask,
+ dnl so as to not accidentally override the system's pthread_sigmask
+ dnl symbol from libpthread. This is necessary on IRIX 6.5.
+ REPLACE_PTHREAD_SIGMASK=1
fi
- fi
- ], [
- dnl The module 'threadlib' is not in use, due to --avoid=threadlib being
- dnl specified.
- dnl The package either has prepared CPPFLAGS and LIBS for use of POSIX:2008
- dnl threads, or wants to build single-threaded programs.
- if test $ac_cv_func_pthread_sigmask = yes; then
- dnl pthread_sigmask exists and does not require extra libraries.
- dnl Assume that it is declared.
- :
- else
- dnl pthread_sigmask either does not exist or needs extra libraries.
- HAVE_PTHREAD_SIGMASK=0
- dnl Define the symbol rpl_pthread_sigmask, not pthread_sigmask,
- dnl so as to not accidentally override the system's pthread_sigmask
- dnl symbol from libpthread. This is necessary on IRIX 6.5.
- REPLACE_PTHREAD_SIGMASK=1
- fi
- ])
+ ])
+ fi
AC_SUBST([LIB_PTHREAD_SIGMASK])
dnl We don't need a variable LTLIB_PTHREAD_SIGMASK, because when
--
2.21.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: building the docs
2019-05-29 23:37 ` Paul Eggert
@ 2019-05-30 1:46 ` Jean-Christophe Helary
0 siblings, 0 replies; 13+ messages in thread
From: Jean-Christophe Helary @ 2019-05-30 1:46 UTC (permalink / raw)
To: Paul Eggert; +Cc: Eli Zaretskii, Emacs developers
[-- Attachment #1: Type: text/plain, Size: 587 bytes --]
Thank you Paul !
> On May 30, 2019, at 8:37, Paul Eggert <eggert@cs.ucla.edu> wrote:
>
> On 5/29/19 8:04 AM, Eli Zaretskii wrote:
>> Paul imports the Gnulib version regularly, and Karl Berry said that
>> version had a problem.
>
> I ran 'admin/update-gnulib' and installed the resulting patch. This upgrades master to the latest version in Gnulib, which Karl updated recently, and so should fix the problem.
>
> <0001-Update-from-Gnulib.patch>
Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune
[-- Attachment #2: Type: text/html, Size: 2222 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2019-05-30 1:46 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-16 6:15 building the docs Jean-Christophe Helary
2019-05-16 6:52 ` Eli Zaretskii
2019-05-16 6:59 ` Jean-Christophe Helary
2019-05-16 13:54 ` Eli Zaretskii
2019-05-17 8:56 ` Jean-Christophe Helary
2019-05-17 9:30 ` Eli Zaretskii
2019-05-17 10:01 ` 조성빈
2019-05-17 11:54 ` Jean-Christophe Helary
2019-05-18 12:44 ` Jean-Christophe Helary
2019-05-29 6:11 ` Jean-Christophe Helary
2019-05-29 15:04 ` Eli Zaretskii
2019-05-29 23:37 ` Paul Eggert
2019-05-30 1:46 ` Jean-Christophe Helary
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).