Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
zsh/system's $errnos empty with recent gcc
- X-seq: zsh-workers 39213
- From: Stephane Chazelas <stephane.chazelas@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: zsh/system's $errnos empty with recent gcc
- Date: Wed, 7 Sep 2016 10:28:41 +0100
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author