From: Alejandro Colomar Date: Tue, 21 May 2024 10:50:27 +0000 (+0200) Subject: lib/string/strcpy/strncat.[ch]: STRNCAT(): Add macro X-Git-Tag: 4.17.0-rc1~186 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a9faf86f0a5a301b2c0b56d84288b81f318a55f;p=thirdparty%2Fshadow.git lib/string/strcpy/strncat.[ch]: STRNCAT(): Add macro Signed-off-by: Alejandro Colomar --- diff --git a/lib/Makefile.am b/lib/Makefile.am index aaee71672..21900733e 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -152,6 +152,8 @@ libshadow_la_SOURCES = \ string/sprintf/xasprintf.h \ string/strcpy/stpecpy.c \ string/strcpy/stpecpy.h \ + string/strcpy/strncat.c \ + string/strcpy/strncat.h \ string/strcpy/strncpy.c \ string/strcpy/strncpy.h \ string/strcpy/strtcpy.c \ diff --git a/lib/string/strcpy/strncat.c b/lib/string/strcpy/strncat.c new file mode 100644 index 000000000..d55f17293 --- /dev/null +++ b/lib/string/strcpy/strncat.c @@ -0,0 +1,7 @@ +// SPDX-FileCopyrightText: 2024, Alejandro Colomar +// SPDX-License-Identifier: BSD-3-Clause + + +#include + +#include "string/strcpy/strncat.h" diff --git a/lib/string/strcpy/strncat.h b/lib/string/strcpy/strncat.h new file mode 100644 index 000000000..6bb9907bb --- /dev/null +++ b/lib/string/strcpy/strncat.h @@ -0,0 +1,19 @@ +// SPDX-FileCopyrightText: 2024, Alejandro Colomar +// SPDX-License-Identifier: BSD-3-Clause + + +#ifndef SHADOW_INCLUDE_LIB_STRING_STRCPY_STRNCAT_H_ +#define SHADOW_INCLUDE_LIB_STRING_STRCPY_STRNCAT_H_ + + +#include + +#include + +#include "sizeof.h" + + +#define STRNCAT(dst, src) strncat(dst, src, NITEMS(src)) + + +#endif // include guard