From 9201d894910e26e87fbfc0af24d9460797b1890f Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 17 Mar 2009 22:25:30 +0000 Subject: * configure.ac: Check for chsize and posix_fallocate. Replace ftruncate. * ftruncate.c: New file, from gnulib. * output.cc (posix_fallocate): Define dummy version if not HAVE_POSIX_FALLOCATE. (Output_file::map): Call posix_fallocate rather than lseek and write. * gold.h (ftruncate): Declare if not HAVE_FTRUNCATE. * configure, Makefile.in, config.in: Rebuild. --- gold/gold.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gold/gold.h') diff --git a/gold/gold.h b/gold/gold.h index a0cc62d..780561d 100644 --- a/gold/gold.h +++ b/gold/gold.h @@ -121,6 +121,10 @@ struct hash extern "C" ssize_t pread(int, void*, size_t, off_t); #endif +#ifndef HAVE_FTRUNCATE +extern "C" int ftruncate(int, off_t); +#endif + namespace gold { -- cgit v1.1