# HG changeset patch # User Mario de Sousa # Date 1346328270 -3600 # Node ID e01ede1c9862853378baa79988419850e7f0ec26 # Parent e7ac0fe9a287e4d953c657d8b51a4aac39523937 Allow the use of PRId64, PRIu64 and PRIx64 printf formating macros globally. diff -r e7ac0fe9a287 -r e01ede1c9862 main.hh --- a/main.hh Wed Aug 29 21:52:33 2012 +0100 +++ b/main.hh Thu Aug 30 13:04:30 2012 +0100 @@ -48,8 +48,6 @@ - - /* Get the definition of INT16_MAX, INT16_MIN, UINT64_MAX, INT64_MAX, INT64_MIN, ... */ #define __STDC_LIMIT_MACROS /* required to have UINTxx_MAX defined when including stdint.h from C++ source code. */ @@ -122,6 +120,13 @@ +/* get the printf format macros for printing variables of fixed data size + * e.g. int64_t v; printf("value=%"PRId64" !!\n", v); + * e.g. uint64_t v; printf("value=%"PRIu64" !!\n", v); + * e.g. uint64_t v; printf("value=%"PRIx64" !!\n", v); // hexadecimal format + */ +#define __STDC_FORMAT_MACROS +#include #endif // #ifndef _MAIN_HH \ No newline at end of file