diff options
author | Rocco Rutte <pdmef@gmx.net> | 2008-05-22 17:01:56 +0200 |
---|---|---|
committer | Rocco Rutte <pdmef@gmx.net> | 2008-05-22 17:01:56 +0200 |
commit | 41d28a80abe4d1b5f17f180d6e483d36c6761d9e (patch) | |
tree | b91c7a3e497d13203075e47ec4ccdb418bacd4ac | |
parent | a125680aa809e232cca00d71d7c67c87c96bb73e (diff) |
Use C99 macros "PRId64"/"PRId32" to format file sizes/offsets if available.
This fixes warning about mismatching int argument sizes on amd64.
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | configure.ac | 14 | ||||
-rw-r--r-- | m4/types.m4 | 11 |
3 files changed, 26 insertions, 9 deletions
@@ -1,3 +1,13 @@ +2008-05-22 16:34 +0200 Rocco Rutte <pdmef@gmx.net> (b97e95fd5786) + + * init.h: Document that $check_mbox_size should be set before + mailboxes commands + +2008-05-22 14:06 +0200 Rocco Rutte <pdmef@gmx.net> (a697362846e9) + + * ChangeLog, UPDATING: Mention requirement to encode X-Label: headers + in UPDATING + 2008-05-21 23:20 -0700 Rocco Rutte <pdmef@gmx.net> (bba92e401440) * imap/browse.c: Guard idata->mailbox read in imap_mailbox_state. diff --git a/configure.ac b/configure.ac index b61d6daa..7381f7ab 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/m4/types.m4 b/m4/types.m4 index 5f219fbf..e9aa116d 100644 --- a/m4/types.m4 +++ b/m4/types.m4 @@ -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 ]) -]) |