[Top][All Lists]

[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)

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'


This occurs for two reasons:

Problem #1:

this tests for strerror(0).

NetBSD (and likely other *BSDs) do not define errno 0.
You can see a list of those defined here:

So while strerror is probably 'normal', gnulib chooses to replace it.

Problem #2:
#   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.

reply via email to

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