diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2016-02-18 14:24:40 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2016-02-18 14:24:40 -0800 |
commit | e65e81b172ceed17621c0f0ca4392a531018071e (patch) | |
tree | e019ca547c7a00e9cbd3917960f0064d7030c2e4 /configure.in | |
parent | 28ec7d1ddfbf3f1d01a03c772132ba1b9fa08d50 (diff) | |
download | nasm-e65e81b172ceed17621c0f0ca4392a531018071e.tar.gz |
nasmlib: allow writing of sparse files
On systems that support it, allow the writing of sparse files.
This can be useful for some file formats (like binary, or ELF if the
alignments are very large) that can contain large amounts of zeroes.
This is not inherently portable code, so condition it on certain known
systems.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/configure.in b/configure.in index e762777f..98e151ca 100644 --- a/configure.in +++ b/configure.in @@ -111,6 +111,9 @@ AC_CHECK_HEADERS(strings.h) dnl Look for <stdbool.h> AC_HEADER_STDBOOL +dnl Look for <io.h> +AC_CHECK_HEADERS(io.h) + dnl Look for <unistd.h> AC_CHECK_HEADERS(unistd.h) @@ -135,6 +138,11 @@ AC_CHECK_FUNCS(canonicalize_file_name) AC_CHECK_FUNCS(_fullpath) AC_CHECK_FUNCS(pathconf) +AC_TYPE_OFF_T +AC_FUNC_FSEEKO +AC_CHECK_FUNCS([ftruncate _chsize _chsize_s]) +AC_CHECK_FUNCS([fileno]) + PA_HAVE_FUNC(__builtin_ctz, (0U)) PA_HAVE_FUNC(__builtin_ctzl, (0UL)) PA_HAVE_FUNC(__builtin_ctzll, (0ULL)) |