DEVEL15-printf-format-macros-20090515

LICENSE IPL10
FIXES 124776

The Windows format macro for AFS_INT64_FMT was wrong.
It is "I64" not "l64".

Also added macros for AFS_SIZET_FMT.  Although not currently
in use.  size_t varies in size on Windows just like pointers.


(cherry picked from commit b41d124409)
This commit is contained in:
Jeffrey Altman 2009-05-15 13:30:18 +00:00
parent fe8c1d0064
commit bec8721b20

View File

@ -280,11 +280,13 @@ typedef struct afsUUID afsUUID;
* windows use a different format string * windows use a different format string
*/ */
#ifdef AFS_NT40_ENV #ifdef AFS_NT40_ENV
#define AFS_INT64_FMT "l64d" #define AFS_INT64_FMT "I64d"
#define AFS_PTR_FMT "p" #define AFS_PTR_FMT "Ip"
#define AFS_SIZET_FMT "Iu"
#else #else
#define AFS_INT64_FMT "lld" #define AFS_INT64_FMT "lld"
#define AFS_PTR_FMT "x" #define AFS_PTR_FMT "x"
#define AFS_SIZET_FMT "u"
#endif #endif
/* Functions to safely cast afs_int32 and afs_uint32 so they can be used in /* Functions to safely cast afs_int32 and afs_uint32 so they can be used in