break down coarse-grained 64-bit-off_t syscall remappings

using the existence of SYS_stat64 as the condition for remapping other
related syscalls is no longer valid, since new archs that omit the old
syscalls will not have SYS_stat or SYS_stat64, but still potentially
need SYS_fstat and others remapped. it would probably be possible to
get by with just one or two extra conditionals, but just breaking them
all down into separate conditions is robust and not significantly
heavier for the preprocessor.
This commit is contained in:
Rich Felker 2014-05-30 02:05:59 -04:00
parent 5cf9e8f860
commit 106e65d6f6
1 changed files with 16 additions and 4 deletions

View File

@ -122,14 +122,26 @@ long __syscall_ret(unsigned long), __syscall(syscall_arg_t, ...),
#ifdef SYS_stat64
#undef SYS_stat
#undef SYS_fstat
#undef SYS_lstat
#undef SYS_statfs
#undef SYS_fstatfs
#define SYS_stat SYS_stat64
#endif
#ifdef SYS_fstat64
#undef SYS_fstat
#define SYS_fstat SYS_fstat64
#endif
#ifdef SYS_lstat64
#undef SYS_lstat
#define SYS_lstat SYS_lstat64
#endif
#ifdef SYS_statfs64
#undef SYS_statfs
#define SYS_statfs SYS_statfs64
#endif
#ifdef SYS_fstatfs64
#undef SYS_fstatfs
#define SYS_fstatfs SYS_fstatfs64
#endif