Commit 41d28a80 authored by Rocco Rutte's avatar Rocco Rutte

Use C99 macros "PRId64"/"PRId32" to format file sizes/offsets if available.

This fixes warning about mismatching int argument sizes on amd64.
parent a125680a
2008-05-22 16:34 +0200 Rocco Rutte <[email protected]> (b97e95fd5786)
* init.h: Document that $check_mbox_size should be set before
mailboxes commands
2008-05-22 14:06 +0200 Rocco Rutte <[email protected]> (a697362846e9)
* ChangeLog, UPDATING: Mention requirement to encode X-Label: headers
in UPDATING
2008-05-21 23:20 -0700 Rocco Rutte <[email protected]> (bba92e401440)
* imap/browse.c: Guard idata->mailbox read in imap_mailbox_state.
......
......@@ -88,10 +88,18 @@ AH_TEMPLATE([ICONV_NONTRANS],
AH_BOTTOM([/* fseeko portability defines */
#ifdef HAVE_FSEEKO
# define LOFF_T off_t
# if SIZEOF_OFF_T == 8
# define OFF_T_FMT "%lld"
# if HAVE_C99_INTTYPES && HAVE_INTTYPES_H
# 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
# endif
#else
# define LOFF_T long
......
......@@ -10,11 +10,11 @@ AC_DEFUN([MUTT_C99_INTTYPES],
[dnl
AC_CHECK_HEADERS([inttypes.h])
AC_CHECK_TYPE([uint32_t],
[AC_DEFINE(HAVE_C99_INTTYPES, 1, [Define if you have the C99 integer types])],
[AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)])
[AC_DEFINE(HAVE_C99_INTTYPES, 1, [Define if you have the C99 integer types])])
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)])
AH_VERBATIM([X_HAVE_C99_INTTYPES],
[#ifndef HAVE_C99_INTTYPES
# if SIZEOF_SHORT == 4
......@@ -33,4 +33,3 @@ typedef unsigned long long uint64_t;
# endif
#endif
])
])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment