# HG changeset patch # User Paul Boddie # Date 1670714518 -3600 # Node ID 3e13e20943e8bd2c4f994d2ad05331d199f37705 # Parent 1f1b2b1839cd712a0ff195faae6a67a053957eeb Adjusted the IPC type for device numbers along with various format specifiers, attempting to fix warnings for the mipsel (MIPS32 little endian) architecture. diff -r 1f1b2b1839cd -r 3e13e20943e8 fsaccess/op_list_objects.c --- a/fsaccess/op_list_objects.c Sat Dec 10 01:31:35 2022 +0100 +++ b/fsaccess/op_list_objects.c Sun Dec 11 00:21:58 2022 +0100 @@ -38,7 +38,7 @@ static void _show_object(const char *basename, struct stat *st) { - printf("%s%s %5d %5d %6ld %6ld %s\n", + printf("%s%s %5d %5d %6ld %6d %s\n", S_ISDIR(st->st_mode) ? "d" : "-", get_permission_string(st->st_mode), st->st_uid, diff -r 1f1b2b1839cd -r 3e13e20943e8 fsaccess/op_stat_objects.c --- a/fsaccess/op_stat_objects.c Sat Dec 10 01:31:35 2022 +0100 +++ b/fsaccess/op_stat_objects.c Sun Dec 11 00:21:58 2022 +0100 @@ -26,9 +26,12 @@ #include #include +#include #include "ops.h" +#define FMT64d "%" pFMT64 "d" + /* Show statistics for files and directories. */ @@ -57,7 +60,7 @@ printf("%s %ld %ld %x %d %d ", path, st.st_size, st.st_blocks, st.st_mode, st.st_uid, st.st_gid); - printf("%ld %ld %ld %x %x ", + printf(FMT64d " %ld %d %x %x ", st.st_dev, st.st_ino, st.st_nlink, major(st.st_rdev), minor(st.st_rdev)); diff -r 1f1b2b1839cd -r 3e13e20943e8 libsystypes/include/systypes/base.h --- a/libsystypes/include/systypes/base.h Sat Dec 10 01:31:35 2022 +0100 +++ b/libsystypes/include/systypes/base.h Sun Dec 11 00:21:58 2022 +0100 @@ -76,13 +76,15 @@ /* Equivalent types are defined in sys/types.h typically. In newlib, they are defined in sys/_types.h if not defined elsewhere (such as in - machine/_types.h). + machine/_types.h). In uclibc, the following file is informative: + + pkg/l4re-core/uclibc/lib/contrib/uclibc/libc/sysdeps/linux/common/bits/types.h These types are intended for IPC, permitting different parties to employ different library implementations where these types may be different. */ -typedef unsigned long int sys_dev_t; /* device number */ +typedef l4_uint64_t sys_dev_t; /* device number */ typedef unsigned long int sys_ino_t; /* inode number */ typedef unsigned int sys_mode_t; /* file permissions */ typedef unsigned long int sys_nlink_t; /* link count */ diff -r 1f1b2b1839cd -r 3e13e20943e8 tests/dstest_file_readdir.cc --- a/tests/dstest_file_readdir.cc Sat Dec 10 01:31:35 2022 +0100 +++ b/tests/dstest_file_readdir.cc Sun Dec 11 00:21:58 2022 +0100 @@ -29,6 +29,9 @@ #include #include +#include + +#define FMT64d "%" pFMT64 "d" @@ -85,7 +88,7 @@ printf("%s %ld %ld %x %d %d ", path, st.st_size, st.st_blocks, st.st_mode, st.st_uid, st.st_gid); - printf("%ld %ld %ld %x %x ", + printf(FMT64d " %ld %d %x %x ", st.st_dev, st.st_ino, st.st_nlink, major(st.st_rdev), minor(st.st_rdev));