From 9676611494d6dc1bf2a87fd4e2646dc366bb1e5e Mon Sep 17 00:00:00 2001 From: mirabilos Date: Thu, 26 Jan 2017 11:50:31 +0100 Subject: [PATCH] doc: Fix incorrect AC_SYS_LARGEFILE documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The output goes to DEFS or config.h, by calling AC_DEFINE_UNQUOTED. Building on top of Eric Blake’s clarification, emphasise the need to ensure "config.h" comes first; also, untangle what options are added where (CC vs. preprocessor). Reported as Debian #158969 by Florian Weimer . Signed-off-by: mirabilos --- doc/autoconf.texi | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/doc/autoconf.texi b/doc/autoconf.texi index e5103232..cbd7c8e3 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -8588,10 +8588,18 @@ if the system supports @samp{#!}, @samp{no} if not. @cindex LFS Arrange for 64-bit file offsets, known as @uref{http://@/www.unix-systems@/.org/@/version2/@/whatsnew/@/lfs20mar.html, -large-file support}. On some hosts, one must use special compiler -options to build programs that can access large files. Append any such -options to the output variable @code{CC}. Define address@hidden and @code{_LARGE_FILES} if necessary. +large-file support}: + address@hidden @bullet address@hidden +Some hosts need the preprocessor macros @code{_FILE_OFFSET_BITS} and/or address@hidden defined; do so by calling @code{AC_DEFINE_UNQUOTED} +(mind the warning two paragraphs below). + address@hidden +Some hosts require special compiler options to build programs that can +access large files; append any such options to the output variable @code{CC}. address@hidden itemize Large-file support can be disabled by configuring with the @option{--disable-largefile} option. @@ -8601,7 +8609,7 @@ If you use this macro, check that your program works even when large-file support is enabled. For example, it is not correct to print an arbitrary @code{off_t} value @code{X} with @code{printf ("%ld", (long int) X)}. Also, when using this macro in concert with address@hidden, be sure that @file{config.h} is included address@hidden, ensure that @file{config.h} is included before any system header. The LFS introduced the @code{fseeko} and @code{ftello} functions to @@ -8643,7 +8651,7 @@ If possible, enable extensions to C or Posix on hosts that normally disable the extensions, typically due to standards-conformance namespace issues. This should be called before any macros that run the C compiler. Also, when using this macro in concert with address@hidden, be sure that @file{config.h} is included address@hidden, ensure that @file{config.h} is included before any system header. The following preprocessor macros are defined where appropriate: -- 2.11.0