diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2010-05-29 02:31:09 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2010-05-29 02:31:09 +0000 |
commit | 21d9736a2ff5dae65cf0e6bbdc1b1e99c25bc439 (patch) | |
tree | c0284bdacf5548994616cff7d7b05db5f6eba704 /cpukit/libfs | |
parent | 2010-05-28 Ralf Corsépius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-21d9736a2ff5dae65cf0e6bbdc1b1e99c25bc439.tar.bz2 |
2010-05-29 Ralf Corsépius <ralf.corsepius@rtems.org>
* libfs/src/nfsclient/src/dirutils.c: Add PRIomode_t, PRIdoff_t.
* configure.ac: Add AC_CHECK_SIZEOF(mode_t), AC_CHECK_SIZEOF(off_t).
Diffstat (limited to 'cpukit/libfs')
-rw-r--r-- | cpukit/libfs/src/nfsclient/src/dirutils.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/cpukit/libfs/src/nfsclient/src/dirutils.c b/cpukit/libfs/src/nfsclient/src/dirutils.c index bd84e8aa2a..99c65876f3 100644 --- a/cpukit/libfs/src/nfsclient/src/dirutils.c +++ b/cpukit/libfs/src/nfsclient/src/dirutils.c @@ -66,6 +66,24 @@ #include <stdlib.h> #include <limits.h> /* PATH_MAX */ +#include <inttypes.h> /* PRI* */ + +#if SIZEOF_MODE_T == 8 +#define PRIomode_t PRIo64 +#elif SIZEOF_MODE_T == 4 +#define PRIomode_t PRIo32 +#else +#error "unsupport size of mode_t" +#endif + +#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 + #ifdef HAVE_CEXP #include <cexpHelp.h> #endif @@ -109,7 +127,7 @@ char *t; t = "@"; break; } - printf("%10li, %10lib, %5i.%-5i 0%04o %s%s\n", + printf("%10li, %10" PRIdoff_t "b, %5i.%-5i 0%04" PRIomode_t " %s%s\n", buf->st_ino, buf->st_size, buf->st_uid, |