From 63a4c9adf227a6f6a5f7f70f6dc3f8863f846927 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Wed, 12 Sep 2018 00:28:34 -0400 Subject: remove spurious inclusion of libc.h for LFS64 ABI aliases the LFS64 macro was not self-documenting and barely saved any characters. simply use weak_alias directly so that it's clear what's being done, and doesn't depend on a header to provide a strange macro. --- src/stat/__xstat.c | 9 ++++----- src/stat/fstat.c | 3 +-- src/stat/fstatat.c | 3 +-- src/stat/lstat.c | 3 +-- src/stat/stat.c | 3 +-- src/stat/statvfs.c | 9 ++++----- 6 files changed, 12 insertions(+), 18 deletions(-) (limited to 'src/stat') diff --git a/src/stat/__xstat.c b/src/stat/__xstat.c index 73c873ae..f6303430 100644 --- a/src/stat/__xstat.c +++ b/src/stat/__xstat.c @@ -1,5 +1,4 @@ #include -#include "libc.h" int __fxstat(int ver, int fd, struct stat *buf) { @@ -21,10 +20,10 @@ int __xstat(int ver, const char *path, struct stat *buf) return stat(path, buf); } -LFS64(__fxstat); -LFS64(__fxstatat); -LFS64(__lxstat); -LFS64(__xstat); +weak_alias(__fxstat, __fxstat64); +weak_alias(__fxstatat, __fxstatat64); +weak_alias(__lxstat, __lxstat64); +weak_alias(__xstat, __xstat64); int __xmknod(int ver, const char *path, mode_t mode, dev_t *dev) { diff --git a/src/stat/fstat.c b/src/stat/fstat.c index f6d16522..4f13f4f0 100644 --- a/src/stat/fstat.c +++ b/src/stat/fstat.c @@ -2,7 +2,6 @@ #include #include #include "syscall.h" -#include "libc.h" int fstat(int fd, struct stat *st) { @@ -19,4 +18,4 @@ int fstat(int fd, struct stat *st) #endif } -LFS64(fstat); +weak_alias(fstat, fstat64); diff --git a/src/stat/fstatat.c b/src/stat/fstatat.c index 863d5268..582db442 100644 --- a/src/stat/fstatat.c +++ b/src/stat/fstatat.c @@ -1,10 +1,9 @@ #include #include "syscall.h" -#include "libc.h" int fstatat(int fd, const char *restrict path, struct stat *restrict buf, int flag) { return syscall(SYS_fstatat, fd, path, buf, flag); } -LFS64(fstatat); +weak_alias(fstatat, fstatat64); diff --git a/src/stat/lstat.c b/src/stat/lstat.c index 5e8b84fc..5b89f290 100644 --- a/src/stat/lstat.c +++ b/src/stat/lstat.c @@ -1,7 +1,6 @@ #include #include #include "syscall.h" -#include "libc.h" int lstat(const char *restrict path, struct stat *restrict buf) { @@ -12,4 +11,4 @@ int lstat(const char *restrict path, struct stat *restrict buf) #endif } -LFS64(lstat); +weak_alias(lstat, lstat64); diff --git a/src/stat/stat.c b/src/stat/stat.c index b4433a0a..0bec9d6f 100644 --- a/src/stat/stat.c +++ b/src/stat/stat.c @@ -1,7 +1,6 @@ #include #include #include "syscall.h" -#include "libc.h" int stat(const char *restrict path, struct stat *restrict buf) { @@ -12,4 +11,4 @@ int stat(const char *restrict path, struct stat *restrict buf) #endif } -LFS64(stat); +weak_alias(stat, stat64); diff --git a/src/stat/statvfs.c b/src/stat/statvfs.c index 66b95123..f65d1b54 100644 --- a/src/stat/statvfs.c +++ b/src/stat/statvfs.c @@ -1,7 +1,6 @@ #include #include #include "syscall.h" -#include "libc.h" static int __statfs(const char *path, struct statfs *buf) { @@ -58,7 +57,7 @@ int fstatvfs(int fd, struct statvfs *buf) return 0; } -LFS64(statvfs); -LFS64(statfs); -LFS64(fstatvfs); -LFS64(fstatfs); +weak_alias(statvfs, statvfs64); +weak_alias(statfs, statfs64); +weak_alias(fstatvfs, fstatvfs64); +weak_alias(fstatfs, fstatfs64); -- cgit v1.2.1