Define macros necessary for <inttypes.h> on C++

NASM currently doesn't compile with a C++ compiler, but the error
messages are sometimes useful.  Define macros necessary for
<inttypes.h> to work with a C++ compiler.
This commit is contained in:
H. Peter Anvin 2007-10-11 12:50:24 -07:00
parent 51cbf4a1fa
commit 687b363477

View File

@ -24,6 +24,13 @@
# include "config.h"
#endif
/* This is required to get the standard <inttypes.h> macros when compiling
with a C++ compiler. This must be defined *before* <inttypes.h> is
included, directly or indirectly. */
#define __STDC_CONSTANT_MACROS 1
#define __STDC_LIMIT_MACROS 1
#define __STDC_FORMAT_MACROS 1
#ifdef __GNUC__
# if __GNUC__ >= 4
# define HAVE_GNUC_4