From 76f2bcc7d673d0a1b06ea4b2545b4096979ad518 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sun, 22 Jun 2014 00:29:32 -0400 Subject: consolidate __xstat abi-compat functions into a single source file these are mostly intended for use with dynamic linking (although they can also be used statically with object files compiled against glibc headers), so having them broken down into separate source files to optimize for static linking is unlikely to be worth the cost having more files in the source tree (which contributes to libc.a overhead, compile time, link time, ar/linker command line size exhaustion, and so on). --- src/stat/__fxstat.c | 9 --------- src/stat/__fxstatat.c | 9 --------- src/stat/__lxstat.c | 9 --------- src/stat/__xstat.c | 18 ++++++++++++++++++ 4 files changed, 18 insertions(+), 27 deletions(-) delete mode 100644 src/stat/__fxstat.c delete mode 100644 src/stat/__fxstatat.c delete mode 100644 src/stat/__lxstat.c (limited to 'src/stat') diff --git a/src/stat/__fxstat.c b/src/stat/__fxstat.c deleted file mode 100644 index fd39ee3d..00000000 --- a/src/stat/__fxstat.c +++ /dev/null @@ -1,9 +0,0 @@ -#include -#include "libc.h" - -int __fxstat(int ver, int fd, struct stat *buf) -{ - return fstat(fd, buf); -} - -LFS64(__fxstat); diff --git a/src/stat/__fxstatat.c b/src/stat/__fxstatat.c deleted file mode 100644 index e389dec7..00000000 --- a/src/stat/__fxstatat.c +++ /dev/null @@ -1,9 +0,0 @@ -#include -#include "libc.h" - -int __fxstatat(int ver, int fd, const char *path, struct stat *buf, int flag) -{ - return fstatat(fd, path, buf, flag); -} - -LFS64(__fxstatat); diff --git a/src/stat/__lxstat.c b/src/stat/__lxstat.c deleted file mode 100644 index e9992ed2..00000000 --- a/src/stat/__lxstat.c +++ /dev/null @@ -1,9 +0,0 @@ -#include -#include "libc.h" - -int __lxstat(int ver, const char *path, struct stat *buf) -{ - return lstat(path, buf); -} - -LFS64(__lxstat); diff --git a/src/stat/__xstat.c b/src/stat/__xstat.c index 42011d5f..8138cbe8 100644 --- a/src/stat/__xstat.c +++ b/src/stat/__xstat.c @@ -1,9 +1,27 @@ #include #include "libc.h" +int __fxstat(int ver, int fd, struct stat *buf) +{ + return fstat(fd, buf); +} + +int __fxstatat(int ver, int fd, const char *path, struct stat *buf, int flag) +{ + return fstatat(fd, path, buf, flag); +} + +int __lxstat(int ver, const char *path, struct stat *buf) +{ + return lstat(path, buf); +} + int __xstat(int ver, const char *path, struct stat *buf) { return stat(path, buf); } +LFS64(__fxstat); +LFS64(__fxstatat); +LFS64(__lxstat); LFS64(__xstat); -- cgit v1.2.1