summaryrefslogtreecommitdiffstats
path: root/testsuites/support
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2011-09-30 02:31:25 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2011-09-30 02:31:25 +0000
commit30e49544d57596757fed7b4fee431964c875de6c (patch)
tree307c79bdcabade9f7c070f5057a150a852646b06 /testsuites/support
parent2011-09-30 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-30e49544d57596757fed7b4fee431964c875de6c.tar.bz2
2011-09-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* support/include/pritime.h: New. * Makefile.am: Add support/include/pritime.h
Diffstat (limited to 'testsuites/support')
-rw-r--r--testsuites/support/include/pritime.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/testsuites/support/include/pritime.h b/testsuites/support/include/pritime.h
new file mode 100644
index 0000000000..97117b94fa
--- /dev/null
+++ b/testsuites/support/include/pritime.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2011 by
+ * Ralf Corsépius, Ulm, Germany. All rights reserved.
+ *
+ * Permission to use, copy, modify, and distribute this software
+ * is freely granted, provided that this notice is preserved.
+ */
+
+/*
+ * Helper macro to print "time_t"
+ */
+
+#ifndef _PRITIME_H
+#define _PRITIME_H
+
+#include <inttypes.h>
+
+#ifndef SIZEOF_TIME_T
+#error "missing SIZEOF_TIME_T"
+#endif
+
+#if SIZEOF_TIME_T == 8
+#define PRIdtime_t PRId64
+#elif SIZEOF_TIME_T == 4
+#define PRIdtime_t PRId32
+#else
+#error "unsupported size of time_t"
+#endif
+
+#endif