From: Stephane Chazelas <stephane.chazelas@gmail.com>
To: zsh-workers@zsh.org
Subject: zsh/system's $errnos empty with recent gcc
Date: Wed, 7 Sep 2016 10:28:41 +0100 [thread overview]
Message-ID: <20160907092841.GA11851@chaz.gmail.com> (raw)
At least on Ubuntu 16.04 and Debian unstable, $errnos comes out
empty.
It's down to the generation of errnames.c. Part of that
involves calling $CPP on an awk generated file, and post-process
$CPP's output with a second awk script.
It looks like the $CPP output has changed recently. I had a very
similar issue when compiling pdksh, passing the -P (to remove
the #<n> line numbers) fixed it there and it does fix it for
zsh as well.
I don't know how portable -P is (it is for gcc anyway), but it
would make sense to use it when available here. That probably
calls for a new autoconf check. Alternatively, we could modify
the awk script to take that new gcc output into account.
This:
#include <errno.h>
XXNAMES XXENOSYS ENOSYS
going through gcc -E now gives:
[...]
# 2 "a.c"
XXNAMES XXENOSYS
# 2 "a.c" 3 4
38
While before it would give:
[...]
# 2 "a.c" 2
XXNAMES XXENOSYS 38
With gcc -E -P, it gives:
[...]
XXNAMES XXENOSYS 38
Like before. which is the format expected by errnames2.awk.
--
Stephane
next reply other threads:[~2016-09-07 9:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-07 9:28 Stephane Chazelas [this message]
2016-09-07 10:06 ` Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160907092841.GA11851@chaz.gmail.com \
--to=stephane.chazelas@gmail.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
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 NNTP newsgroup(s).