[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_SYS_LARGEFILE bug in autoconf cvs 20001215
From: |
Paul Eggert |
Subject: |
Re: AC_SYS_LARGEFILE bug in autoconf cvs 20001215 |
Date: |
Tue, 19 Dec 2000 20:01:24 -0800 (PST) |
> From: Pavel Roskin <address@hidden>
> cc: <address@hidden>
> Date: Tue, 19 Dec 2000 18:27:35 -0500 (EST)
>
> Hello, Frank!
>
> > but generate almost the same warnings on both OS:
> > line 2: warning 602: Integer constant exceeds its storage.
> > line 2: warning 602: Integer constant exceeds its storage.
>
> I know about this problem. AC_SYS_LARGEFILE should be radically reworked.
But we just reworked it! (:-)
What sort of reworking did you have in mind?
> We have better means to calculate sizeof(off_t) (I mean AC_CHECK_SIZEOF),
> so I'll just have to find out why it was not used here originally.
I didn't want to assume that CHAR_BIT == 8. No sense making an
assumption that isn't needed. Furthermore, you don't want to check
that off_t is _exactly_ 64 bits, only that it's _at least_ 64 bits.
Here's a patch that should catch those compiler glitches. It is
relative to my autoconf 2.13 version. I don't have an HPUX 11 or AIX
4 or AIX 5 host to check it on, though.
2000-12-19 Paul Eggert <address@hidden>
* largefile.m4 (AC_SYS_LARGEFILE_TEST_INCLUDES):
Check that the compiler can do 64-bit arithmetic correctly.
===================================================================
RCS file: largefile.m4,v
retrieving revision 1.16
retrieving revision 1.17
diff -pu -r1.16 -r1.17
--- largefile.m4 2000/12/02 00:41:26 1.16
+++ largefile.m4 2000/12/20 03:53:11 1.17
@@ -11,7 +11,9 @@ dnl Internal subroutine of AC_SYS_LARGEF
dnl AC_SYS_LARGEFILE_TEST_INCLUDES
AC_DEFUN(AC_SYS_LARGEFILE_TEST_INCLUDES,
[[#include <sys/types.h>
- int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
+ int arithmetic_OK[9223372036854775807 % 2147483629 == 721 ? 1 : -1];
+ int range_OK[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
+ int size_OK[sizeof 9223372036854775807 <= sizeof (off_t) ? 1 : -1];
]])
dnl Internal subroutine of AC_SYS_LARGEFILE.