mirror of
https://git.savannah.gnu.org/git/gnulib.git
synced 2025-08-14 14:01:48 +03:00
* 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.
33 lines
543 B
Plaintext
33 lines
543 B
Plaintext
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
|