diff options
author | Joel Sherrill <joel.sherrill@oarcorp.com> | 2015-03-22 10:27:00 -0500 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2015-03-24 08:17:04 -0500 |
commit | 0771936eab1dc559b925c3cbc05f596780ca5cd8 (patch) | |
tree | d9b7a205c0024e0b95fcb262e625ee91f8b41aac | |
parent | testsuites/sptests/sp54/init.c: Add cast to avoid warning (diff) | |
download | rtems-0771936eab1dc559b925c3cbc05f596780ca5cd8.tar.bz2 |
libdl/rtl-shell.c: Adjust printf() format for off_t based on target
-rw-r--r-- | cpukit/libdl/rtl-shell.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/cpukit/libdl/rtl-shell.c b/cpukit/libdl/rtl-shell.c index 57aef6d439..20a6aabe05 100644 --- a/cpukit/libdl/rtl-shell.c +++ b/cpukit/libdl/rtl-shell.c @@ -21,13 +21,15 @@ #include <inttypes.h> -//#if SIZEOF_OFF_T == 8 +/* + * Flag the targets where off_t is 32 bits. This is not a compiler type + * so we can't rely on prerdefines. + */ +#if defined(__m32r__) || defined(__moxie__) +#define PRIdoff_t PRIo32 +#else #define PRIdoff_t PRIo64 -//#elif SIZEOF_OFF_T == 4 -//#define PRIdoff_t PRIo32 -//#else -//#error "unsupported size of off_t" -//#endif +#endif #include <stdio.h> #include <string.h> |