bug-gnulib
[Top][All Lists]
Advanced

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

Re: Feature Request: Implement glibc reallocarray() function


From: Bruno Haible
Subject: Re: Feature Request: Implement glibc reallocarray() function
Date: Mon, 07 Aug 2017 17:08:07 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-83-generic; KDE/5.18.0; x86_64; ; )

Hi Darshit,

> Glibc 2.26 introduced the reallocarray() function which acts as a safe 
> realloc counterpart to calloc(). ... If others here agree, I'd like to see 
> this 
> function within in gnulib.

Yes, a portable replacement of this function belongs in gnulib.
It falls both in the categories "Enhancements of ISO C or POSIX functions" and
"Portable general use facilities" of the gnulib scope [1].

> If someone will willing to help me out / give me pointers on what would 
> be required to implement this within gnulib, I will happily port the 
> code from glibc to gnulib and submit a completed patch.

Nice! Thanks. You can start out by looking at the implementation of module 
'strsep'
or by reading the chapter "Writing modules" [2].

Bruno

[1] 
https://www.gnu.org/software/gnulib/manual/html_node/Various-Kinds-of-Modules.html
[2] https://www.gnu.org/software/gnulib/manual/html_node/Writing-modules.html




reply via email to

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