about summary refs log tree commit diff
path: root/src/stat/__xstat.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2014-06-22 00:29:32 -0400
committerRich Felker <dalias@aerifal.cx>2014-06-22 00:29:32 -0400
commit76f2bcc7d673d0a1b06ea4b2545b4096979ad518 (patch)
tree3e42eba2c2fa2c6d54bd5d16ee83b5be9464e571 /src/stat/__xstat.c
parent5474a346691c2c7483b40bc4595017c3df5a7aa1 (diff)
downloadmusl-76f2bcc7d673d0a1b06ea4b2545b4096979ad518.tar.gz
musl-76f2bcc7d673d0a1b06ea4b2545b4096979ad518.tar.xz
musl-76f2bcc7d673d0a1b06ea4b2545b4096979ad518.zip
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).
Diffstat (limited to 'src/stat/__xstat.c')
-rw-r--r--src/stat/__xstat.c18
1 files changed, 18 insertions, 0 deletions
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 <sys/stat.h>
 #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);