On Sun, Jun 6, 2010 at 1:42 PM, björn <bjorn.winck...@gmail.com> wrote:
> On 6 June 2010 18:23, Tony Mechelynck wrote:
> >[snip]
> Part of the problem is that the "right" values of long and off_t are
> the same (both 8) on my machine, so even if SIZEOF_OFF_T and
> SIZEOF_LONG were defined the test in vim.h would not define
> LONG_LONG_OFF_T as it should.

That's not a problem.  That's exactly as it should be.  LONG_LONG_OFF_T
is specifically for the case where off_t and long have different sizes.

> My config.log looks like this:
>
> configure:11865: checking for off_t
> configure:11895: gcc -c -O2 -fno-strength-reduce -Wall  -DMACOS_X_UNIX
> -no-cpp-precomp conftest.c >&5
> configure:11901: $? = 0
> configure:11916: result: yes
>
> It seems that it never even tries to figure out the proper size.

That's the only occurence of off_t?  The size checking is performed much
later than checking for the existence of off_t.

>> This results in the following src/auto/config.h lines 37-51:
>>>
>>> /* Defined to the size of a long */
>>> #define SIZEOF_LONG 4
>>>
>>> /* Defined to the size of off_t */
>>> #define SIZEOF_OFF_T 8
>
> These two are always undefined for me.
>
> To conclude; there are two problems:
>
> (1) On Mac OS X 10.6 configure fails to check the size of "long" and
> "off_t" (I'm guessing I'm not the only person having this problem, but
> I don't know.)

It sounds like your configure script is not current.  Either that or
you're checking src/auto/config.h before the configure script has been
run.  src/auto/config.h is updated by the results of the configure
script, so make sure you're checking it at the end of a build.

> (2) On Mac OS X 10.6 sizeof(long) == sizeof(off_t) so the test in
> vim.h would never do anything even if (1) was ok.  A new test is
> needed as to when LONG_LONG_OFF_T should be defined in vim.h.  I guess
> this will need to be Mac OS X specific, but I don't know for sure
> hence my first post asking for advice.

The sole purpose of LONG_LONG_OFF_T is for systems where sizeof(long) !=
sizeof(off_t), since on those systems we can't simply print off_t as a
long.  Since you've shown that the sizes are the same on your system,
and forcing use of "%lld" makes your compiler shut up, it looks like a
bug in your compiler.

-- 
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega <james...@jamessan.com>

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui