[PATCH v4 1/5] Introduce xstrndup function

Dmitry V. Levin ldv at altlinux.org
Tue Jun 20 00:23:58 UTC 2017


On Mon, Jun 19, 2017 at 12:45:48PM +0900, Masatake YAMATO wrote:
> * defs.h (xstrndup): New prototype.
> * xmalloc.c (xstrndup): New function.
> * configure.ac (AC_CHECK_FUNC): check the avaiabllity of strndup.
> 
> Changes in version 4 (suggested by ldv):
> 
> 	* Use strndup if available.
> 	* Fix a typo in log.
> 
> Signed-off-by: Masatake YAMATO <yamato at redhat.com>
> ---
>  configure.ac |  1 +
>  defs.h       |  1 +
>  xmalloc.c    | 21 +++++++++++++++++++++
>  3 files changed, 23 insertions(+)
> 
> diff --git a/configure.ac b/configure.ac
> index b4cf4cb..9bf89fc 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -282,6 +282,7 @@ AC_CHECK_FUNCS(m4_normalize([
>  	readahead
>  	signalfd
>  	stpcpy
> +	strndup
>  	strerror
>  	strsignal
>  	sync_file_range

We keep this list sorted.  Corrected and applied, thanks!


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20170620/cf4b8b62/attachment.bin>


More information about the Strace-devel mailing list