autoconf-patches
[Top][All Lists]
Advanced

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

Re: _XOPEN_SOURCE=500 breaks at least OSF1 V5.0 [Re: largefiles


From: Paul Eggert
Subject: Re: _XOPEN_SOURCE=500 breaks at least OSF1 V5.0 [Re: largefiles
Date: Wed, 15 Nov 2000 19:36:32 -0800 (PST)

> From: Alexandre Oliva <address@hidden>
> Date: 16 Nov 2000 01:14:50 -0200

> > int a[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1];
> 
> I have a feeling this test must, somehow, be wrong.  If the intent is
> to test whether off_t is at least 64-bits wide, I think it won't do it
> on platforms that don't have a wide-enough integer type.

That test should be OK, on any compiler that conforms to the C
standard, as the standard requires a diagnostic when no integer type
is wide enough to represent that constant.  So the only question is
buggy and/or traditional C compilers.

I've been using that code for several months and haven't run into any
compiler where the test doesn't give the right answer.  So I wouldn't
worry about the issue unless we encounter a compiler that elicits the
wrong answer.



reply via email to

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