Re: autoconf: AC_SYS_LARGEFILE documentation misleading

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dixi quod…

> What do you think about this? I tried several variants and ended

Arrgh, forgot the attachment, sorry.

bye,
//mirabilos
-- 
15:41⎜<Lo-lan-do:#fusionforge> Somebody write a testsuite for helloworld :-)
From 9676611494d6dc1bf2a87fd4e2646dc366bb1e5e Mon Sep 17 00:00:00 2001
From: mirabilos <tg@xxxxxxxxxx>
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 <fw@xxxxxxxxxxxxx>.
Signed-off-by: mirabilos <tg@xxxxxxxxxx>
---
 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
-@code{_FILE_OFFSET_BITS} and @code{_LARGE_FILES} if necessary.
+large-file support}:
+
+@itemize @bullet
+@item
+Some hosts need the preprocessor macros @code{_FILE_OFFSET_BITS} and/or
+@code{_LARGE_FILES} defined; do so by calling @code{AC_DEFINE_UNQUOTED}
+(mind the warning two paragraphs below).
+
+@item
+Some hosts require special compiler options to build programs that can
+access large files; append any such options to the output variable @code{CC}.
+@end 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
-@code{AC_CONFIG_HEADERS}, be sure that @file{config.h} is included
+@code{AC_CONFIG_HEADERS}, 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
-@code{AC_CONFIG_HEADERS}, be sure that @file{config.h} is included
+@code{AC_CONFIG_HEADERS}, ensure that @file{config.h} is included
 before any system header.  The following preprocessor macros are defined
 where appropriate:
 
-- 
2.11.0

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux