On 13 August 2016 at 13:50, Eli Zaretskii <[email protected]> wrote: >> From: Gavin Smith <[email protected]> >> Date: Sat, 13 Aug 2016 12:28:47 +0100 >> Cc: [email protected] >> >> The first pretest for the next Texinfo release has been uploaded to >> >> http://alpha.gnu.org/gnu/texinfo/texinfo-6.1.90.tar.xz >> ftp://alpha.gnu.org/gnu/texinfo/texinfo-6.1.90.tar.xz >> >> Please send bug reports and general feedback to [email protected]. > > I've built this with MinGW on MS-Windows with locally installed > ActiveState Perl as backend for the xspara extensions. During the > build I see the following warnings: > > In file included from XSParagraph.xs:8:0: > D:/usr/Perl/lib/CORE/XSUB.h:564:0: warning: "realloc" redefined > # define realloc PerlMem_realloc > ^ > In file included from D:/usr/Perl/lib/CORE/perl.h:766:0, > from XSParagraph.xs:7: > ./lib/stdlib.h:1060:0: note: this is the location of the previous definition > # define realloc rpl_realloc > ^ > > This happens while compiling XSParagraph.c and xspara.c. The > rpl_realloc thing comes from gnulib, I think. It would be good to > avoid these warnings.
Previously reported (by you) at https://lists.gnu.org/archive/html/bug-texinfo/2016-02/msg00037.html. The gnulib definition comes in from the "realloc-posix" module, which is a dependency of "getdelim", which in turn is a dependency of "getline", which we ask for explicitly. The purpose of realloc-posix is for errno to be set properly to ENOMEM. The dependency was introduced on 2007-09-09. (http://git.savannah.gnu.org/cgit/gnulib.git/log/modules/getdelim). An email here about it: http://lists.gnu.org/archive/html/bug-gnulib/2007-09/msg00067.html I think that the Perl realloc is using the system realloc directly, and gnulib realloc (rpl_realloc) isn't being used at all. The only solution I can think of is removing the dependency on "realloc-posix" by "getdelim". "getdelim" doesn't appear to check errno itself for ENOMEM - "realloc-posix" would be for calling code that wanted to see what errno was after getdelim was called. Here's a listing of all the requiring modules for each module for the XSParagraph subdirectory (which I printed with a change to gnulib-tool that I made myself), printed in square brackets. Only getline and vasprintf were explicitly requested. Module list with included dependencies (indented): absolute-header [ include_next ] alloca-opt [ vasnprintf ] errno [ vasprintf getdelim vasnprintf ] extensions [ getline vasprintf getdelim stdio memchr string ] extern-inline [ xsize string unistd ] float [ vasnprintf ] getdelim [ getline ] getline include_next [ errno stdio float stddef stdint sys_types wchar stdlib string unistd ] memchr [ vasnprintf ] multiarch [ stdint ] realloc-posix [ getdelim ] size_max [ xsize ] snippet/_Noreturn [ stdlib ] snippet/arg-nonnull [ stdio wchar stdlib string unistd ] snippet/c++defs [ stdio wchar stdlib string unistd ] snippet/warn-on-use [ stdio wchar stdlib string unistd ] ssize_t [ stdio sys_types unistd ] stddef [ stdio wchar stdlib string unistd ] stdint [ getdelim vasnprintf ] stdio [ getline vasprintf getdelim ] stdlib [ realloc-posix ] string [ memchr ] sys_types [ stdio stdint unistd ] unistd [ stdlib ] vasnprintf [ vasprintf ] vasprintf verify [ vasnprintf ] wchar [ vasnprintf ] xsize [ vasnprintf ]
