Hash :
f4d71054
Author :
Date :
2017-05-13T02:54:37
truncate: New module. * lib/unistd.in.h (truncate): New declaration. * lib/truncate.c: New file. * m4/truncate.m4: New file. * m4/unistd_h.m4 (gl_UNISTD_H): Test whether 'truncate' is declared. (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_TRUNCATE, HAVE_TRUNCATE, REPLACE_TRUNCATE. * modules/unistd (Makefile.am): Substitute GNULIB_TRUNCATE, HAVE_TRUNCATE, REPLACE_TRUNCATE. * modules/truncate: New file. * tests/test-unistd-c++.cc (truncate): Test signature. * doc/posix-functions/truncate.texi: Mention the new module.
Description:
truncate() function: truncate a file to a specified length.
Files:
lib/truncate.c
m4/truncate.m4
Depends-on:
unistd
sys_types
largefile
open [test $HAVE_TRUNCATE = 0 || test $REPLACE_TRUNCATE = 1]
ftruncate [test $HAVE_TRUNCATE = 0 || test $REPLACE_TRUNCATE = 1]
configure.ac:
gl_FUNC_TRUNCATE
if test $HAVE_TRUNCATE = 0 || test $REPLACE_TRUNCATE = 1; then
AC_LIBOBJ([truncate])
gl_PREREQ_TRUNCATE
fi
gl_UNISTD_MODULE_INDICATOR([truncate])
Makefile.am:
Include:
<unistd.h>
License:
GPL
Maintainer:
all