autoconf-patches
[Top][All Lists]
Advanced

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

Re: autoconf problem with large files on HP-UX?


From: Paul Eggert
Subject: Re: autoconf problem with large files on HP-UX?
Date: Tue, 6 Feb 2001 11:31:51 -0800 (PST)

> From: Jim Meyering <address@hidden>
> Date: 04 Feb 2001 10:09:06 +0100
> 
> If anyone knows of a system that does have large file support,
> and a compiler that supports that, but where the compiler does not
> accept a ULL suffix on integer constants, I'll have to use the
> uglier patch.

Sorry I didn't get to look at this until just now.  How about the
following patch instead?  I've been using this idea with autoconf 2.13
and the GNU tar test releases.

Unlike the other patches, this patch doesn't need ULL, so it doesn't
need to worry about whether the compiler supports ULL.  It also makes
some additional arithmetic checks, just in case the compiler has some
other plausible bugs in this area.

If you like it, please install it, as I still haven't gotten CVS
access to work through my company's firewall.  Thanks.


2001-02-06  Paul Eggert  <address@hidden>

        * acspecific.m4 (AC_SYS_LARGEFILE_TEST_INCLUDES): Don't reject
        C++ compilers that are masquerading as C compilers, and that
        incorrectly reject large integers.

===================================================================
RCS file: acspecific.m4,v
retrieving revision 2.49.3.0
retrieving revision 2.49.3.1
diff -pu -r2.49.3.0 -r2.49.3.1
--- acspecific.m4       2001/01/24 08:51:20     2.49.3.0
+++ acspecific.m4       2001/02/06 18:00:29     2.49.3.1
@@ -376,7 +376,14 @@ with arguments. Remove this warning when
 # -------------------------------
 m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES],
 address@hidden:@include <sys/types.h>
-int a[[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1]];[]dnl
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
address@hidden:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1]];[]dnl
 ])
 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]