summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Schodet2015-04-28 11:36:55 +0200
committerNicolas Schodet2019-10-07 00:44:50 +0200
commit9901e49f990b7e1ab9646295999fc5544e388f1d (patch)
treed40002e9bf6b5dbc34b15a5b28cb1a959db2a151
parentdd79e4bf43868ecdb8d34d0981d0bd8fea342799 (diff)
Fix printf on 64 bit host
-rw-r--r--ucoo/arch/host/mex/test/test_mex.cc6
-rw-r--r--ucoo/common.hh2
2 files changed, 4 insertions, 4 deletions
diff --git a/ucoo/arch/host/mex/test/test_mex.cc b/ucoo/arch/host/mex/test/test_mex.cc
index 3c844cd..f2674c9 100644
--- a/ucoo/arch/host/mex/test/test_mex.cc
+++ b/ucoo/arch/host/mex/test/test_mex.cc
@@ -50,12 +50,12 @@ printbuf (const char *head, const char *buf, int count)
/// Helper function, check for equality.
static void
-check (int64_t a, int64_t b, const char *name = NULL)
+check (intmax_t a, intmax_t b, const char *name = NULL)
{
- printf ("%s: %Lx\n", name ? name : "pop", a);
+ printf ("%s: %jd\n", name ? name : "pop", a);
if (a != b)
{
- printf (" expected: %Lx\n", b);
+ printf (" expected: %jd\n", b);
error++;
}
}
diff --git a/ucoo/common.hh b/ucoo/common.hh
index 505cf60..be6f91d 100644
--- a/ucoo/common.hh
+++ b/ucoo/common.hh
@@ -23,7 +23,7 @@
// DEALINGS IN THE SOFTWARE.
//
// }}}
-#include <stdint.h>
+#include <cstdint>
#include "ucoo/arch/arch_common.hh"