main.hh
changeset 760 d736dc9e9e51
parent 654 7421cb63defa
child 890 499486ece119
equal deleted inserted replaced
759:16050b4303a0 760:d736dc9e9e51
    46 
    46 
    47 
    47 
    48 
    48 
    49 
    49 
    50  /* Get the definition of INT16_MAX, INT16_MIN, UINT64_MAX, INT64_MAX, INT64_MIN, ... */
    50  /* Get the definition of INT16_MAX, INT16_MIN, UINT64_MAX, INT64_MAX, INT64_MIN, ... */
    51 
    51 #ifndef __STDC_LIMIT_MACROS
    52 #define __STDC_LIMIT_MACROS /* required to have UINTxx_MAX defined when including stdint.h from C++ source code. */
    52 #define __STDC_LIMIT_MACROS /* required to have UINTxx_MAX defined when including stdint.h from C++ source code. */
       
    53 #endif
    53 #include <stdint.h>         
    54 #include <stdint.h>         
    54 #include <limits>
    55 #include <limits>
    55 
    56 
    56 #ifndef   UINT64_MAX 
    57 #ifndef   UINT64_MAX 
    57   #define UINT64_MAX (std::numeric_limits< uint64_t >::max())
    58   #define UINT64_MAX (std::numeric_limits< uint64_t >::max())
   122 /* get the printf format macros for printing variables of fixed data size
   123 /* get the printf format macros for printing variables of fixed data size
   123  * e.g.  int64_t v; printf("value=%"PRId64" !!\n", v);
   124  * e.g.  int64_t v; printf("value=%"PRId64" !!\n", v);
   124  * e.g. uint64_t v; printf("value=%"PRIu64" !!\n", v);
   125  * e.g. uint64_t v; printf("value=%"PRIu64" !!\n", v);
   125  * e.g. uint64_t v; printf("value=%"PRIx64" !!\n", v);  // hexadecimal format
   126  * e.g. uint64_t v; printf("value=%"PRIx64" !!\n", v);  // hexadecimal format
   126  */
   127  */
       
   128 #ifndef __STDC_FORMAT_MACROS
   127 #define __STDC_FORMAT_MACROS
   129 #define __STDC_FORMAT_MACROS
       
   130 #endif
   128 #include <inttypes.h>
   131 #include <inttypes.h>
   129 
   132 
   130 
   133 
   131 #endif // #ifndef _MAIN_HH
   134 #endif // #ifndef _MAIN_HH