Skip to content
Snippets Groups Projects
Commit 542dee07 authored by chrfranke's avatar chrfranke
Browse files

Fixed inclusion of PRI?64 macros from inttypes.h

git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@2314 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent b9533f2f
No related branches found
No related tags found
No related merge requests found
CHANGELOG for smartmontools
$Id: CHANGELOG,v 1.584 2006/10/27 21:49:41 chrfranke Exp $
$Id: CHANGELOG,v 1.585 2006/10/29 20:35:35 chrfranke Exp $
The most recent version of this file is:
http://smartmontools.cvs.sourceforge.net/smartmontools/sm5/CHANGELOG?view=markup
......@@ -33,6 +33,8 @@ NOTES FOR FUTURE RELEASES: see TODO file.
<DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE>
[CF] Fixed inclusion of PRI?64 macros from inttypes.h.
[CF] Windows: Added WRITE LOG to support selective self tests.
[CF] Fix selective self test log revision number if '-T permissive'
......
......@@ -20,15 +20,18 @@
#ifndef INT64_H_
#define INT64_H_
#define INT64_H_CVSID "$Id: int64.h,v 1.15 2006/10/27 20:24:27 chrfranke Exp $\n"
#define INT64_H_CVSID "$Id: int64.h,v 1.16 2006/10/29 20:35:35 chrfranke Exp $\n"
// 64 bit integer typedefs
// 64 bit integer typedefs and format strings
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
// The ISO C99 standard specifies that in C++ implementations the PRI* macros
// from <inttypes.h> should only be defined if explicitly requested
#define __STDC_FORMAT_MACROS 1
#include <inttypes.h> // PRId64, PRIu64, PRIx64 (also includes <stdint.h>)
#else
#ifdef HAVE_STDINT_H
#include <stdint.h>
#include <stdint.h> // int64_t, uint64_t (usually included above)
#else
#ifdef HAVE_SYS_INTTYPES_H
#include <sys/inttypes.h>
......@@ -56,24 +59,12 @@ typedef unsigned long long uint64_t;
#endif // HAVE_STDINT_H
#endif // HAVE_INTTYPES_H
// 64 bit integer format strings
#if defined(_WIN32)
#ifdef _WIN32
// for MSVCRT.DLL (used by both MSVC 6.0 and MinGW)
#define PRId64 "I64d"
#define PRIu64 "I64u"
#define PRIx64 "I64x"
#endif // _WIN32 && _MSC_VER
#ifdef LINUX_X86_64
// For Linux x86_64
#undef PRId64
#undef PRIu64
#undef PRIx64
#define PRId64 "ld"
#define PRIu64 "lu"
#define PRIx64 "lx"
#endif
#endif // _WIN32
// If macros not defined in inttypes.h, fix here. Default is GCC
// style
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment