diff options
author | Tristan Gingold <tgingold@free.fr> | 2021-04-30 21:08:26 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2021-04-30 21:08:26 +0200 |
commit | 2a33708a633734c0ac463ce5ec922009475525e6 (patch) | |
tree | f542516b6b292369512954bb1e4bc8f1a73a7383 /ghw | |
parent | 9fb3ee1a53f26909a14090a7f7fc70bf149a670e (diff) | |
download | ghdl-2a33708a633734c0ac463ce5ec922009475525e6.tar.gz ghdl-2a33708a633734c0ac463ce5ec922009475525e6.tar.bz2 ghdl-2a33708a633734c0ac463ce5ec922009475525e6.zip |
ghw: avoid a warning
Diffstat (limited to 'ghw')
-rw-r--r-- | ghw/ghwdump.c | 2 | ||||
-rw-r--r-- | ghw/libghw.h | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/ghw/ghwdump.c b/ghw/ghwdump.c index fa385af52..e6f24ca87 100644 --- a/ghw/ghwdump.c +++ b/ghw/ghwdump.c @@ -292,7 +292,7 @@ main (int argc, char **argv) case ghw_res_snapshot: case ghw_res_cycle: if (flag_disp_time) - printf ("Time is %lld fs\n", hp->snap_time); + printf ("Time is " GHWPRI64 " fs\n", hp->snap_time); if (flag_disp_signals) { if (!filter_done) diff --git a/ghw/libghw.h b/ghw/libghw.h index a6d22d0c0..4668b9252 100644 --- a/ghw/libghw.h +++ b/ghw/libghw.h @@ -30,8 +30,9 @@ in stdint.h. Header inttypes.h includes stdint.h and provides macro for printf and co specifiers. Use it if known to be available. */ -#if defined(__cplusplus) || \ - (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \ +#if defined(__cplusplus) || \ + defined(__linux__) || \ + (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \ defined(HAVE_INTTYPES_H) /* Use C99 standard header. */ #include <inttypes.h> |