Changeset 5404:d612ef757ee9

Show
Ignore:
Timestamp:
2008-05-22 08:01:56 (7 months ago)
Author:
Rocco Rutte <pdmef@…>
Branch:
HEAD
Message:

Use C99 macros "PRId64"/"PRId32" to format file sizes/offsets if available.
This fixes warning about mismatching int argument sizes on amd64.

Files:
3 modified

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r5402 r5404  
     12008-05-22 16:34 +0200  Rocco Rutte  <pdmef@gmx.net>  (b97e95fd5786) 
     2 
     3        * init.h: Document that $check_mbox_size should be set before 
     4        mailboxes commands 
     5 
     62008-05-22 14:06 +0200  Rocco Rutte  <pdmef@gmx.net>  (a697362846e9) 
     7 
     8        * ChangeLog, UPDATING: Mention requirement to encode X-Label: headers 
     9        in UPDATING 
     10 
    1112008-05-21 23:20 -0700  Rocco Rutte  <pdmef@gmx.net>  (bba92e401440) 
    212 
  • configure.ac

    r5383 r5404  
    8989#ifdef HAVE_FSEEKO 
    9090# define LOFF_T off_t 
    91 # if SIZEOF_OFF_T == 8 
    92 #  define OFF_T_FMT "%lld" 
     91# if HAVE_C99_INTTYPES && HAVE_INTTYPES_H 
     92#  if SIZEOF_OFF_T == 8 
     93#   define OFF_T_FMT "%" PRId64 
     94#  else 
     95#   define OFF_T_FMT "%" PRId32 
     96#  endif 
    9397# else 
    94 #  define OFF_T_FMT "%ld" 
     98#  if (SIZEOF_OFF_T == 8) && (SIZEOF_LONG == 4) 
     99#   define OFF_T_FMT "%lld" 
     100#  else 
     101#   define OFF_T_FMT "%ld" 
     102#  endif 
    95103# endif 
    96104#else 
  • m4/types.m4

    r3869 r5404  
    1111AC_CHECK_HEADERS([inttypes.h]) 
    1212AC_CHECK_TYPE([uint32_t], 
    13   [AC_DEFINE(HAVE_C99_INTTYPES, 1, [Define if you have the C99 integer types])], 
    14   [AC_CHECK_SIZEOF(short) 
    15    AC_CHECK_SIZEOF(int) 
    16    AC_CHECK_SIZEOF(long) 
    17    AC_CHECK_SIZEOF(long long)]) 
     13  [AC_DEFINE(HAVE_C99_INTTYPES, 1, [Define if you have the C99 integer types])]) 
     14AC_CHECK_SIZEOF(short) 
     15AC_CHECK_SIZEOF(int) 
     16AC_CHECK_SIZEOF(long) 
     17AC_CHECK_SIZEOF(long long)]) 
    1818AH_VERBATIM([X_HAVE_C99_INTTYPES], 
    1919  [#ifndef HAVE_C99_INTTYPES 
     
    3434#endif 
    3535  ]) 
    36 ])