diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2010-05-29 05:31:46 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2010-05-29 05:31:46 +0000 |
commit | 700b9116a80ae8457538e2c617ddb715ac54abaf (patch) | |
tree | 182fdd94017fbc7f98ddf2a87bb5dbaa19708b0d /testsuites | |
parent | 2010-05-29 Ralf Corsépius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-700b9116a80ae8457538e2c617ddb715ac54abaf.tar.bz2 |
2010-05-29 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac: Add AC_CHECK_SIZEOF(off_t).
* include/pmacros.h: Add PRIdoff_t.
Diffstat (limited to 'testsuites')
-rw-r--r-- | testsuites/psxtests/configure.ac | 3 | ||||
-rw-r--r-- | testsuites/psxtests/include/pmacros.h | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/testsuites/psxtests/configure.ac b/testsuites/psxtests/configure.ac index 976b1b6088..01d8201b79 100644 --- a/testsuites/psxtests/configure.ac +++ b/testsuites/psxtests/configure.ac @@ -53,6 +53,9 @@ AC_CHECK_DECLS([adjtime],[],[],[[#include <sys/time.h>]]) # RTEMS provides a stub, despite newlib doesn't have sys/mman.h AC_CHECK_DECLS([mprotect],[],[],[[#include <sys/mman.h>]]) +# FIXME: We should get rid of this. It's a cludge. +AC_CHECK_SIZEOF([off_t]) + # Explicitly list all Makefiles here AC_CONFIG_FILES([Makefile psx01/Makefile diff --git a/testsuites/psxtests/include/pmacros.h b/testsuites/psxtests/include/pmacros.h index be9f35c8e5..378e93a6e9 100644 --- a/testsuites/psxtests/include/pmacros.h +++ b/testsuites/psxtests/include/pmacros.h @@ -93,6 +93,14 @@ #define empty_line() puts( "" ) +#if SIZEOF_OFF_T == 8 +#define PRIdoff_t PRIo64 +#elif SIZEOF_OFF_T == 4 +#define PRIdoff_t PRIo32 +#else +#error "unsupported size of off_t" +#endif + #endif /* end of file */ |