[Top][All Lists]

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

Re: [PATCH] realloc: fix undef typo

From: Bruno Haible
Subject: Re: [PATCH] realloc: fix undef typo
Date: Sun, 11 Apr 2021 00:22:43 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-206-generic; KDE/5.18.0; x86_64; ; )

Hi Paul,

> diff --git a/lib/realloc.c b/lib/realloc.c
> index 51d8d2108..ab027d7f7 100644
> --- a/lib/realloc.c
> +++ b/lib/realloc.c
> @@ -24,6 +24,7 @@
>  /* Only the AC_FUNC_REALLOC macro defines 'realloc' already in config.h.  */
>  #ifdef realloc
>  # define NEED_REALLOC_GNU 1
> +# undef realloc
>  /* Whereas the gnulib module 'realloc-gnu' defines HAVE_REALLOC_GNU.  */

This is not right. In several libraries (e.g. GNU libunistring), the
config.h header does

  #define realloc someprefix_realloc

and later (with the help of libtool or of the 'lib-symbol-visibility'
module) the symbols someprefix_* are unexported from the shared library
being created.

The patch above has the effect that libunistring.so will now export
'realloc'. Which is not right.

The comment above that line references the AC_FUNC_REALLOC macro.
I doubt there are many packages that still use AC_FUNC_REALLOC the
"old" way, without gnulib. (Maybe gawk still does?)


reply via email to

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