diff options
Diffstat (limited to 'testsuites/include/pritime.h')
-rw-r--r-- | testsuites/include/pritime.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/testsuites/include/pritime.h b/testsuites/include/pritime.h new file mode 100644 index 0000000..fea5e62 --- /dev/null +++ b/testsuites/include/pritime.h @@ -0,0 +1,27 @@ +/* + * 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> +#include <rtems/score/cpuopts.h> + +#if __RTEMS_SIZEOF_TIME_T__ == 8 +#define PRIdtime_t PRId64 +#elif __RTEMS_SIZEOF_TIME_T__ == 4 +#define PRIdtime_t PRId32 +#else +#error "unsupported size of time_t" +#endif + +#endif |