bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] free: preserve errno


From: Pádraig Brady
Subject: Re: [PATCH] free: preserve errno
Date: Thu, 17 Dec 2020 14:21:30 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Thunderbird/84.0

On 17/12/2020 09:54, Paul Eggert wrote:
* lib/free.c (rpl_free): Preserve errno.  Check for null only if
CANNOT_FREE_NULL is defined, as an optimization for POSIX 2008
platforms that do not preserve errno.
* m4/free.m4 (gl_FUNC_FREE): Check whether free preserves errno.
Also, define CANNOT_FREE_NULL if free cannot free NULL.
* modules/free (configure.ac): Also replace 'free' if
it does not preserve errno.

coreutils is now failing to build with:

  lib/free.c:28:1: error: no previous declaration
    for 'rpl_free' [-Werror=missing-declarations]
   28 | rpl_free (void *p)
      | ^~~~~~~~

In early 2008 coreutils removed use of the then deprecated "free" module,
but I now see 'canonicalize' explicitly depends on this now undeprecated module.

I've worked around the issue,
but I'm not sure how you'd prefer to handle it in gnulib.

thanks,
Pádraig



reply via email to

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