mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-08-26 16:03:26 +08:00
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).
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
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).
|
||||
|
||||
2010-05-28 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* libfs/src/rfs/rtems-rfs-rtems.c: Use size_t for node_len.
|
||||
|
||||
@@ -248,6 +248,12 @@ AC_CHECK_HEADERS([sys/queue.h],[NEED_SYS_QUEUE_H=no],[NEED_SYS_QUEUE_H=yes])
|
||||
# configuration-time diagnostics and are not really used.
|
||||
AC_CHECK_DECLS([_POSIX_LOGIN_NAME_MAX],,,[#include <limits.h>])
|
||||
AC_CHECK_DECLS([CHAR_BIT],,,[#include <limits.h>])
|
||||
|
||||
# FIXME: We should get rid of this.
|
||||
# So far, only used in libfs/src/nfsclient/src/dirutils.c
|
||||
AC_CHECK_SIZEOF([mode_t])
|
||||
AC_CHECK_SIZEOF([off_t])
|
||||
|
||||
# FIXME: Mandatory in SUSv4, optional in SUSv3.
|
||||
# Not implemented in GCC/newlib, so far.
|
||||
AC_CHECK_DECLS([WORD_BIT],,,[#include <limits.h>])
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user