mirror of
https://https.git.savannah.gnu.org/git/gnulib.git
synced 2026-06-15 15:25:49 +00:00
4672014aff
* lib/string.in.h (strncpy): New declaration. * lib/strncpy.c: New file, based on lib/wcsncpy-impl.h. * m4/strncpy.m4: New file, based on m4/strncat.m4. * m4/string_h.m4 (gl_STRING_H): Test whether strncpy is declared. (gl_STRING_H_REQUIRE_DEFAULTS): Initialize GNULIB_STRNCPY. (gl_STRING_H_DEFAULTS): Initialize REPLACE_STRNCPY. * modules/string-h (Makefile.am): Substitute GNULIB_STRNCPY, REPLACE_STRNCPY. * modules/strncpy (Status, Notice): Remove. (Files): Add lib/strncpy.c, m4/strncpy.m4, m4/mmap-anon.m4. (configure.ac): Invoke gl_FUNC_STRNCPY. Arrange to define GNULIB_STRNCPY. Add GL_COND_OBJ_STRNCPY conditional. (Makefile.am): Arrange to conditionally compile strncpy.c. * tests/test-string-h-c++.cc: Check signature of strncpy. * doc/posix-functions/strncpy.texi: Mention the FreeBSD bug.
33 lines
441 B
Plaintext
33 lines
441 B
Plaintext
Description:
|
|
Copy the initial part of a string.
|
|
|
|
Files:
|
|
lib/strncpy.c
|
|
m4/strncpy.m4
|
|
m4/mmap-anon.m4
|
|
|
|
Depends-on:
|
|
string-h
|
|
|
|
configure.ac:
|
|
gl_FUNC_STRNCPY
|
|
gl_CONDITIONAL([GL_COND_OBJ_STRNCPY], [test $REPLACE_STRNCPY = 1])
|
|
AM_COND_IF([GL_COND_OBJ_STRNCPY], [
|
|
gl_PREREQ_STRNCPY
|
|
])
|
|
gl_STRING_MODULE_INDICATOR([strncpy])
|
|
|
|
Makefile.am:
|
|
if GL_COND_OBJ_STRNCPY
|
|
lib_SOURCES += strncpy.c
|
|
endif
|
|
|
|
Include:
|
|
<string.h>
|
|
|
|
License:
|
|
LGPLv2+
|
|
|
|
Maintainer:
|
|
all
|