[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
strerror replacement problems on all BSDs
From: |
coypu |
Subject: |
strerror replacement problems on all BSDs |
Date: |
Wed, 23 Mar 2016 21:16:54 +0000 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Hello,
I've come across a problem with code using gnulib.
it attempts to replace strerror with strerror_rpl, resulting in errors
like the following:
undefined reference to `rpl_strerror'
https://lists.gnupg.org/pipermail/gnutls-devel/2013-November/006594.html
This occurs for two reasons:
Problem #1:
m4/strerror.m4:56-96
this tests for strerror(0).
NetBSD (and likely other *BSDs) do not define errno 0.
You can see a list of those defined here:
http://nxr.netbsd.org/xref/src/sys/sys/errno.h
So while strerror is probably 'normal', gnulib chooses to replace it.
Problem #2:
lib/string.in.h:958-959
# undef strerror
# define strerror rpl_strerror
it redefines strerror as rpl_strerror, but then does not proceed to
define rpl_strerror
I do not understand the sed magic that follows, but it does not override
this definition.
- strerror replacement problems on all BSDs,
coypu <=