Use inttypes.h to get uint64_t print format string
Code generators should not include _pli_types.h to get standard int types and strings. Use the inttypes.h header file instead.
This commit is contained in:
parent
c899a6a52e
commit
cdfe3a8289
|
|
@ -13,7 +13,7 @@ AC_CANONICAL_HOST
|
||||||
# Combined check for Microsoft-related bogosities; sets WIN32 if found
|
# Combined check for Microsoft-related bogosities; sets WIN32 if found
|
||||||
AX_WIN32
|
AX_WIN32
|
||||||
|
|
||||||
AC_CHECK_HEADERS(malloc.h stdint.h)
|
AC_CHECK_HEADERS(malloc.h stdint.h inttypes.h)
|
||||||
|
|
||||||
# may modify CPPFLAGS and CFLAGS
|
# may modify CPPFLAGS and CFLAGS
|
||||||
AX_CPP_PRECOMP
|
AX_CPP_PRECOMP
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@
|
||||||
/*
|
/*
|
||||||
* This file includes functions for evaluating REAL expressions.
|
* This file includes functions for evaluating REAL expressions.
|
||||||
*/
|
*/
|
||||||
# include "_pli_types.h" /* To get the UINT64 format */
|
|
||||||
# include "vvp_config.h"
|
# include "vvp_config.h"
|
||||||
# include "vvp_priv.h"
|
# include "vvp_priv.h"
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
|
|
@ -31,6 +30,15 @@
|
||||||
#ifdef HAVE_STDINT_H
|
#ifdef HAVE_STDINT_H
|
||||||
# include <stdint.h>
|
# include <stdint.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_INTTYPES_H
|
||||||
|
# ifndef __STDC_FORMAT_MACROS
|
||||||
|
# define __STDC_FORMAT_MACROS 1
|
||||||
|
# endif
|
||||||
|
# include <inttypes.h>
|
||||||
|
#else
|
||||||
|
#endif
|
||||||
|
|
||||||
# include <math.h>
|
# include <math.h>
|
||||||
# include <assert.h>
|
# include <assert.h>
|
||||||
|
|
||||||
|
|
@ -64,7 +72,7 @@ static int draw_number_bool64(ivl_expr_t exp)
|
||||||
}
|
}
|
||||||
|
|
||||||
res = allocate_word();
|
res = allocate_word();
|
||||||
fprintf(vvp_out, " %%ix/load %d, %" PLI_UINT64_FMT ";\n", res, val);
|
fprintf(vvp_out, " %%ix/load %d, %" PRIu64 ";\n", res, val);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue