From c03792fcd7235b07f6ef28159d9bb3d37d282392 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Tue, 8 Feb 2011 06:37:34 +0000 Subject: =?UTF-8?q?2011-02-08=09Ralf=20Cors=C3=A9pius=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * include/pmacros.h: Add PRIxblksize_t, PRIxblkcnt_t. * configure.ac: Add AC_CHECK_SIZEOF([blksize_t]), AC_CHECK_SIZEOF([blkcnt_t]). --- testsuites/psxtests/configure.ac | 2 ++ testsuites/psxtests/include/pmacros.h | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) (limited to 'testsuites') diff --git a/testsuites/psxtests/configure.ac b/testsuites/psxtests/configure.ac index 517e881d5a..3768c53f82 100644 --- a/testsuites/psxtests/configure.ac +++ b/testsuites/psxtests/configure.ac @@ -75,6 +75,8 @@ AC_CHECK_DECLS([seteuid],[],[],[#include ]) # FIXME: We should get rid of this. It's a cludge. AC_CHECK_SIZEOF([off_t]) +AC_CHECK_SIZEOF([blksize_t]) +AC_CHECK_SIZEOF([blkcnt_t]) # Explicitly list all Makefiles here AC_CONFIG_FILES([Makefile diff --git a/testsuites/psxtests/include/pmacros.h b/testsuites/psxtests/include/pmacros.h index 378e93a6e9..921f33a271 100644 --- a/testsuites/psxtests/include/pmacros.h +++ b/testsuites/psxtests/include/pmacros.h @@ -101,6 +101,26 @@ #error "unsupported size of off_t" #endif +#if SIZEOF_BLKSIZE_T == 8 +#define PRIxblksize_t PRIx64 +#elif SIZEOF_BLKSIZE_T == 4 +#define PRIxblksize_t PRIx32 +#else +/* Warn and fall back to "long" */ +#warning "unsupported size of blksize_t" +#define PRIxblksize_t "lx" +#endif + +#if SIZEOF_BLKSIZE_T == 8 +#define PRIxblkcnt_t PRIx64 +#elif SIZEOF_BLKSIZE_T == 4 +#define PRIxblkcnt_t PRIx32 +#else +/* Warn and fall back to "long" */ +#warning "unsupported size of blkcnt_t" +#define PRIxblkcnt_t "lx" +#endif + #endif /* end of file */ -- cgit v1.2.3