Re: [PATCH] init warning
On Thu, May 22, 2008 at 08:22:09AM +0200, Rocco Rutte wrote:
> -# if SIZEOF_OFF_T == 8
> -# define OFF_T_FMT "%lld"
> +# if HAVE_C99_INTTYPES
> +# if SIZEOF_OFF_T == 8
> +# define OFF_T_FMT "%" PRId64
> +# else
> +# define OFF_T_FMT "%" PRId32
> +# endif
> # else
> -# define OFF_T_FMT "%ld"
> +# if (SIZEOF_OFF_T == 8) && (SIZEOF_LONG == 4)
> +# define OFF_T_FMT "%lld"
> +# else
> +# define OFF_T_FMT "%ld"
> +# endif
I don't think this is going to be quite sufficient. Some compilers (Windows,
especially) use %I64d as the long long format specifier. I'm not sure you
can always rely on the standard C99 format specifiers being available in
all those cases.
>>> Dan
--
http://www.MoveAnnouncer.com The web change of address service
Let webmasters know that your web site has moved