diff options
-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 */ |