From 30e49544d57596757fed7b4fee431964c875de6c Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Fri, 30 Sep 2011 02:31:25 +0000 Subject: =?UTF-8?q?2011-09-30=09Ralf=20Cors=C3=A9pius=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * support/include/pritime.h: New. * Makefile.am: Add support/include/pritime.h --- testsuites/ChangeLog | 5 +++++ testsuites/Makefile.am | 1 + testsuites/support/include/pritime.h | 30 ++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 testsuites/support/include/pritime.h (limited to 'testsuites') diff --git a/testsuites/ChangeLog b/testsuites/ChangeLog index c08382d2e2..b777054509 100644 --- a/testsuites/ChangeLog +++ b/testsuites/ChangeLog @@ -1,3 +1,8 @@ +2011-09-30 Ralf Corsépius + + * support/include/pritime.h: New. + * Makefile.am: Add support/include/pritime.h + 2011-07-29 Jennifer Averett * support/include/test_support.h: Fixed incorrect name in prototype. diff --git a/testsuites/Makefile.am b/testsuites/Makefile.am index 70b701725d..0766c663fe 100644 --- a/testsuites/Makefile.am +++ b/testsuites/Makefile.am @@ -11,6 +11,7 @@ noinst_HEADERS = noinst_HEADERS += support/include/buffer_test_io.h noinst_HEADERS += support/include/test_support.h noinst_HEADERS += support/include/tmacros.h +noinst_HEADERS += support/include/pritime.h SUBDIRS = @subdirs@ 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 + +#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 -- cgit v1.2.3