remove spurious inclusion of libc.h for LFS64 ABI aliases
authorRich Felker <dalias@aerifal.cx>
Wed, 12 Sep 2018 04:28:34 +0000 (00:28 -0400)
committerRich Felker <dalias@aerifal.cx>
Wed, 12 Sep 2018 18:34:38 +0000 (14:34 -0400)
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.

48 files changed:
src/aio/aio.c
src/aio/aio_suspend.c
src/aio/lio_listio.c
src/dirent/alphasort.c
src/dirent/readdir.c
src/dirent/readdir_r.c
src/dirent/scandir.c
src/dirent/versionsort.c
src/fcntl/creat.c
src/fcntl/open.c
src/fcntl/openat.c
src/fcntl/posix_fadvise.c
src/fcntl/posix_fallocate.c
src/internal/libc.h
src/legacy/ftw.c
src/linux/fallocate.c
src/linux/getdents.c
src/linux/prlimit.c
src/linux/sendfile.c
src/misc/getrlimit.c
src/misc/lockf.c
src/misc/nftw.c
src/misc/setrlimit.c
src/mman/mmap.c
src/regex/glob.c
src/stat/__xstat.c
src/stat/fstat.c
src/stat/fstatat.c
src/stat/lstat.c
src/stat/stat.c
src/stat/statvfs.c
src/stdio/fgetpos.c
src/stdio/fopen.c
src/stdio/freopen.c
src/stdio/fseek.c
src/stdio/fsetpos.c
src/stdio/ftell.c
src/stdio/tmpfile.c
src/temp/mkostemp.c
src/temp/mkstemp.c
src/temp/mkstemps.c
src/unistd/ftruncate.c
src/unistd/lseek.c
src/unistd/pread.c
src/unistd/preadv.c
src/unistd/pwrite.c
src/unistd/pwritev.c
src/unistd/truncate.c

index a5f6443299d4a5c1298bda57fc4fc8f21c414aaa..628e8420284c5d8359d08507d978399e601b6f2c 100644 (file)
@@ -370,9 +370,9 @@ int __aio_close(int fd)
        return fd;
 }
 
-LFS64(aio_cancel);
-LFS64(aio_error);
-LFS64(aio_fsync);
-LFS64(aio_read);
-LFS64(aio_write);
-LFS64(aio_return);
+weak_alias(aio_cancel, aio_cancel64);
+weak_alias(aio_error, aio_error64);
+weak_alias(aio_fsync, aio_fsync64);
+weak_alias(aio_read, aio_read64);
+weak_alias(aio_write, aio_write64);
+weak_alias(aio_return, aio_return64);
index 0b3abe56f845e40c58c412c9617e8edfe4445a3c..9b24b6af2487a199591530fec4b2d7e13a7ba4c0 100644 (file)
@@ -73,4 +73,4 @@ int aio_suspend(const struct aiocb *const cbs[], int cnt, const struct timespec
        }
 }
 
-LFS64(aio_suspend);
+weak_alias(aio_suspend, aio_suspend64);
index bd64546493e45ab33e64474b96dc78531e8cfce6..7b6a03d3c1f7d1edf3197c53d19146dd0563dc2b 100644 (file)
@@ -140,4 +140,4 @@ int lio_listio(int mode, struct aiocb *restrict const *restrict cbs, int cnt, st
        return 0;
 }
 
-LFS64(lio_listio);
+weak_alias(lio_listio, lio_listio64);
index 42050fb7cb52eda81b04d923f674d7c9c80f6acc..bee672ebda0c510b2ea57335c69b06baf421f401 100644 (file)
@@ -1,10 +1,9 @@
 #include <string.h>
 #include <dirent.h>
-#include "libc.h"
 
 int alphasort(const struct dirent **a, const struct dirent **b)
 {
        return strcoll((*a)->d_name, (*b)->d_name);
 }
 
-LFS64(alphasort);
+weak_alias(alphasort, alphasort64);
index eef92f797abc4b005411e000d452432c0faf0903..569fc70577378836df852b9187a53d1bddbc3cde 100644 (file)
@@ -3,7 +3,6 @@
 #include <stddef.h>
 #include "__dirent.h"
 #include "syscall.h"
-#include "libc.h"
 
 typedef char dirstream_buf_alignment_check[1-2*(int)(
        offsetof(struct __dirstream, buf) % sizeof(off_t))];
@@ -27,4 +26,4 @@ struct dirent *readdir(DIR *dir)
        return de;
 }
 
-LFS64(readdir);
+weak_alias(readdir, readdir64);
index daa6c6ed608449051ae46fcf800fa521dbc24fa1..6293a5146196420a9959275946168a1f2e42573e 100644 (file)
@@ -26,4 +26,4 @@ int readdir_r(DIR *restrict dir, struct dirent *restrict buf, struct dirent **re
        return 0;
 }
 
-LFS64_2(readdir_r, readdir64_r);
+weak_alias(readdir_r, readdir64_r);
index 3af2b50f81920aeba1fa2731b44cf8aa19fa5140..7ee195dd8ab31d3cbaf38179aab9a3936b58d711 100644 (file)
@@ -4,7 +4,6 @@
 #include <stdint.h>
 #include <errno.h>
 #include <stddef.h>
-#include "libc.h"
 
 int scandir(const char *path, struct dirent ***res,
        int (*sel)(const struct dirent *),
@@ -45,4 +44,4 @@ int scandir(const char *path, struct dirent ***res,
        return cnt;
 }
 
-LFS64(scandir);
+weak_alias(scandir, scandir64);
index 410cb703456f30413db70c32ec1877b90f6e23c3..d4c489230abb864c167d910078a4cda9c6ef2655 100644 (file)
@@ -1,7 +1,6 @@
 #define _GNU_SOURCE
 #include <string.h>
 #include <dirent.h>
-#include "libc.h"
 
 int versionsort(const struct dirent **a, const struct dirent **b)
 {
@@ -9,4 +8,4 @@ int versionsort(const struct dirent **a, const struct dirent **b)
 }
 
 #undef versionsort64
-LFS64(versionsort);
+weak_alias(versionsort, versionsort64);
index be05faae96cc6c841adc1a2a944d3c8cca9deb1f..8f8aab64631cf4c74f1768cf06a4035c7541e97f 100644 (file)
@@ -1,9 +1,8 @@
 #include <fcntl.h>
-#include "libc.h"
 
 int creat(const char *filename, mode_t mode)
 {
        return open(filename, O_CREAT|O_WRONLY|O_TRUNC, mode);
 }
 
-LFS64(creat);
+weak_alias(creat, creat64);
index 3928a6e6696f05106e81bfd70a84210ce431e62a..1d817a2d6c485b24571ffb422fba520705932517 100644 (file)
@@ -1,7 +1,6 @@
 #include <fcntl.h>
 #include <stdarg.h>
 #include "syscall.h"
-#include "libc.h"
 
 int open(const char *filename, int flags, ...)
 {
@@ -21,4 +20,4 @@ int open(const char *filename, int flags, ...)
        return __syscall_ret(fd);
 }
 
-LFS64(open);
+weak_alias(open, open64);
index e741336c6f5587d3c4e8db596b41e48f73601a3b..ad165ec323f77ac3c91b91573f46a3a5802af6c3 100644 (file)
@@ -1,7 +1,6 @@
 #include <fcntl.h>
 #include <stdarg.h>
 #include "syscall.h"
-#include "libc.h"
 
 int openat(int fd, const char *filename, int flags, ...)
 {
@@ -17,4 +16,4 @@ int openat(int fd, const char *filename, int flags, ...)
        return syscall_cp(SYS_openat, fd, filename, flags|O_LARGEFILE, mode);
 }
 
-LFS64(openat);
+weak_alias(openat, openat64);
index c1a0ef5a2079dd0606e7e0166c622e52c2090628..75b8e1aed87f7e1799f755140c79014d1b06027d 100644 (file)
@@ -1,6 +1,5 @@
 #include <fcntl.h>
 #include "syscall.h"
-#include "libc.h"
 
 int posix_fadvise(int fd, off_t base, off_t len, int advice)
 {
@@ -16,4 +15,4 @@ int posix_fadvise(int fd, off_t base, off_t len, int advice)
 #endif
 }
 
-LFS64(posix_fadvise);
+weak_alias(posix_fadvise, posix_fadvise64);
index 91d8063ca45815757bdb63478e91f85b1a4f8990..c57a24aef4d9aa7da437bac0d4ec32522c8cfc01 100644 (file)
@@ -1,6 +1,5 @@
 #include <fcntl.h>
 #include "syscall.h"
-#include "libc.h"
 
 int posix_fallocate(int fd, off_t base, off_t len)
 {
@@ -8,4 +7,4 @@ int posix_fallocate(int fd, off_t base, off_t len)
                __SYSCALL_LL_E(len));
 }
 
-LFS64(posix_fallocate);
+weak_alias(posix_fallocate, posix_fallocate64);
index 83ad398383321d76d4106d2a30f6f9eecf62be3e..e4fe9e9ba350f85d2ae75db65875f6add5427c5c 100644 (file)
@@ -59,10 +59,4 @@ hidden void __unlock(volatile int *);
 hidden void __synccall(void (*)(void *), void *);
 hidden int __setxid(int, int, int, int);
 
-#undef LFS64_2
-#define LFS64_2(x, y) weak_alias(x, y)
-
-#undef LFS64
-#define LFS64(x) LFS64_2(x, x##64)
-
 #endif
index 0429aba495d0d5fca18945bc1607b1a65078589c..506bd29cedf3b4b5e8fe9a37fef2a177f7a36d11 100644 (file)
@@ -1,5 +1,4 @@
 #include <ftw.h>
-#include "libc.h"
 
 int ftw(const char *path, int (*fn)(const char *, const struct stat *, int), int fd_limit)
 {
@@ -9,4 +8,4 @@ int ftw(const char *path, int (*fn)(const char *, const struct stat *, int), int
        return nftw(path, (int (*)())fn, fd_limit, FTW_PHYS);
 }
 
-LFS64(ftw);
+weak_alias(ftw, ftw64);
index ae766d5e5fa4e63a547babe811e39efb2e69e2d6..7d68bc8f64f6e5c8d1e62148f560d6904fd52fd8 100644 (file)
@@ -1,7 +1,6 @@
 #define _GNU_SOURCE
 #include <fcntl.h>
 #include "syscall.h"
-#include "libc.h"
 
 int fallocate(int fd, int mode, off_t base, off_t len)
 {
@@ -10,4 +9,4 @@ int fallocate(int fd, int mode, off_t base, off_t len)
 }
 
 #undef fallocate64
-LFS64(fallocate);
+weak_alias(fallocate, fallocate64);
index cab29952dfd721963ab9c4fb13a96038c7163ae8..de6de3b425bcc23063d2198762ff42e80edeec4e 100644 (file)
@@ -1,11 +1,10 @@
 #define _BSD_SOURCE
 #include <dirent.h>
 #include "syscall.h"
-#include "libc.h"
 
 int getdents(int fd, struct dirent *buf, size_t len)
 {
        return syscall(SYS_getdents, fd, buf, len);
 }
 
-LFS64(getdents);
+weak_alias(getdents, getdents64);
index 0fe28e10664e9047b1ca1a75bdab78c3e0407723..3df9ffba7af848c0b4fc0b231cbf2ca477b75166 100644 (file)
@@ -1,7 +1,6 @@
 #define _GNU_SOURCE
 #include <sys/resource.h>
 #include "syscall.h"
-#include "libc.h"
 
 #define FIX(x) do{ if ((x)>=SYSCALL_RLIM_INFINITY) (x)=RLIM_INFINITY; }while(0)
 
@@ -24,4 +23,4 @@ int prlimit(pid_t pid, int resource, const struct rlimit *new_limit, struct rlim
 }
 
 #undef prlimit64
-LFS64(prlimit);
+weak_alias(prlimit, prlimit64);
index d63f4197bb8b8db64470e02b4b157d05058feaef..9afe6dd61c203122e671ee0e5743d4b022834485 100644 (file)
@@ -1,10 +1,9 @@
 #include <sys/sendfile.h>
 #include "syscall.h"
-#include "libc.h"
 
 ssize_t sendfile(int out_fd, int in_fd, off_t *ofs, size_t count)
 {
        return syscall(SYS_sendfile, out_fd, in_fd, ofs, count);
 }
 
-LFS64(sendfile);
+weak_alias(sendfile, sendfile64);
index b073677f1a77a7a6062813cba43da1c44528798e..2ab2f0f4faadddb5c45942bad18d7ef079ed4afb 100644 (file)
@@ -1,7 +1,6 @@
 #include <sys/resource.h>
 #include <errno.h>
 #include "syscall.h"
-#include "libc.h"
 
 #define FIX(x) do{ if ((x)>=SYSCALL_RLIM_INFINITY) (x)=RLIM_INFINITY; }while(0)
 
@@ -24,4 +23,4 @@ int getrlimit(int resource, struct rlimit *rlim)
        return 0;
 }
 
-LFS64(getrlimit);
+weak_alias(getrlimit, getrlimit64);
index d8f82efd3b1d2395bfdd6ef9464e2bc0b28feb0f..16a80bec13206fe99ec5d0000f838a2fbb0b007d 100644 (file)
@@ -1,7 +1,6 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <errno.h>
-#include "libc.h"
 
 int lockf(int fd, int op, off_t size)
 {
@@ -30,4 +29,4 @@ int lockf(int fd, int op, off_t size)
        return -1;
 }
 
-LFS64(lockf);
+weak_alias(lockf, lockf64);
index eb9014bc1dcaae05fd052f188c6322dcbf2df525..0a46410071fed029f1962bb7f76e04530ecf7f80 100644 (file)
@@ -6,7 +6,6 @@
 #include <string.h>
 #include <limits.h>
 #include <pthread.h>
-#include "libc.h"
 
 struct history
 {
@@ -126,4 +125,4 @@ int nftw(const char *path, int (*fn)(const char *, const struct stat *, int, str
        return r;
 }
 
-LFS64(nftw);
+weak_alias(nftw, nftw64);
index 8a50f4107545b4e1abe09d34a28eb7bff11a28cf..7a66ab29756b4a179a8077d7b4f50598b639e9da 100644 (file)
@@ -47,4 +47,4 @@ int setrlimit(int resource, const struct rlimit *rlim)
        return 0;
 }
 
-LFS64(setrlimit);
+weak_alias(setrlimit, setrlimit64);
index 15924033f3e3c501fc48ba7a3be581abd336687e..eff88d82a8fcff843247a5436f42016690daac24 100644 (file)
@@ -4,7 +4,6 @@
 #include <stdint.h>
 #include <limits.h>
 #include "syscall.h"
-#include "libc.h"
 
 static void dummy(void) { }
 weak_alias(dummy, __vm_wait);
@@ -39,4 +38,4 @@ void *__mmap(void *start, size_t len, int prot, int flags, int fd, off_t off)
 
 weak_alias(__mmap, mmap);
 
-LFS64(mmap);
+weak_alias(mmap, mmap64);
index 856719853897d29435e5b7c6122ffeff93f5bcd0..746da77d0f43a943632b2b320deb73d28cc10215 100644 (file)
@@ -7,7 +7,6 @@
 #include <stdlib.h>
 #include <errno.h>
 #include <stddef.h>
-#include "libc.h"
 
 struct match
 {
@@ -240,5 +239,5 @@ void globfree(glob_t *g)
        g->gl_pathv = NULL;
 }
 
-LFS64(glob);
-LFS64(globfree);
+weak_alias(glob, glob64);
+weak_alias(globfree, globfree64);
index 73c873aea226a1128b65c8d0719d5b06d3415ca9..f6303430da91b4522c9d7c4abfd4d0327bae6db6 100644 (file)
@@ -1,5 +1,4 @@
 #include <sys/stat.h>
-#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)
 {
index f6d165223556e6ccc3d98c5c2052fb6e22efbc71..4f13f4f0e39eacfb63010353810c5387bba817f6 100644 (file)
@@ -2,7 +2,6 @@
 #include <errno.h>
 #include <fcntl.h>
 #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);
index 863d5268e880d0c53361af6773859ef4994e8e8e..582db44292d9965b6a38532d02d739b4d86bc5bb 100644 (file)
@@ -1,10 +1,9 @@
 #include <sys/stat.h>
 #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);
index 5e8b84fcffad624fb426986681996a575b3f87f8..5b89f290dc1292c2c1e4abf0fc079f7e031c377e 100644 (file)
@@ -1,7 +1,6 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #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);
index b4433a0a7cd13893b6889e89cfc3eac7e98178d1..0bec9d6fa972e7dab9c1611a867214fa85f28917 100644 (file)
@@ -1,7 +1,6 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #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);
index 66b951239dd9910d2a7dfc8a6281dd4f23a2ba7c..f65d1b548d41eae429223ddca818b3a71ba8d6b7 100644 (file)
@@ -1,7 +1,6 @@
 #include <sys/statvfs.h>
 #include <sys/statfs.h>
 #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);
index 6b45f57f38a540eda6a0f65b85bc341a77e50f68..50813d2c50eeabac931539e3b72aa97a412fb31e 100644 (file)
@@ -1,5 +1,4 @@
 #include "stdio_impl.h"
-#include "libc.h"
 
 int fgetpos(FILE *restrict f, fpos_t *restrict pos)
 {
@@ -9,4 +8,4 @@ int fgetpos(FILE *restrict f, fpos_t *restrict pos)
        return 0;
 }
 
-LFS64(fgetpos);
+weak_alias(fgetpos, fgetpos64);
index 2a20c7f2869d97d368369ac291ae7832e3fbbaa6..e1b91e12d826357fd5058b913ba75b386be8a606 100644 (file)
@@ -2,7 +2,6 @@
 #include <fcntl.h>
 #include <string.h>
 #include <errno.h>
-#include "libc.h"
 
 FILE *fopen(const char *restrict filename, const char *restrict mode)
 {
@@ -31,4 +30,4 @@ FILE *fopen(const char *restrict filename, const char *restrict mode)
        return 0;
 }
 
-LFS64(fopen);
+weak_alias(fopen, fopen64);
index 6d6d21d2a2147f6246ff5f768e5047035585719c..615d4b47bdbe8ef32bc84a4c58b708dc78aa8299 100644 (file)
@@ -1,7 +1,6 @@
 #include "stdio_impl.h"
 #include <fcntl.h>
 #include <unistd.h>
-#include "libc.h"
 
 /* The basic idea of this implementation is to open a new FILE,
  * hack the necessary parts of the new FILE into the old one, then
@@ -51,4 +50,4 @@ fail:
        return NULL;
 }
 
-LFS64(freopen);
+weak_alias(freopen, freopen64);
index 26d9f7ef460c0602d32f6f9d4c30b6e7ec3d6148..67d75f7a7627a5e870a57ea5dfc59bc7d7b30115 100644 (file)
@@ -1,5 +1,4 @@
 #include "stdio_impl.h"
-#include "libc.h"
 
 int __fseeko_unlocked(FILE *f, off_t off, int whence)
 {
@@ -41,4 +40,4 @@ int fseek(FILE *f, long off, int whence)
 
 weak_alias(__fseeko, fseeko);
 
-LFS64(fseeko);
+weak_alias(fseeko, fseeko64);
index cea5ddbb5c9eb9146c9e2d10aca57c6859426e5a..77ab8d820603401a71804a85cc4d005eaa22ad60 100644 (file)
@@ -1,9 +1,8 @@
 #include "stdio_impl.h"
-#include "libc.h"
 
 int fsetpos(FILE *f, const fpos_t *pos)
 {
        return __fseeko(f, *(const long long *)pos, SEEK_SET);
 }
 
-LFS64(fsetpos);
+weak_alias(fsetpos, fsetpos64);
index aad352bdd1e530365d9bed1cb91fb2069e186d3a..5ca416549dd901cb8ced1160c276136066b09987 100644 (file)
@@ -1,7 +1,6 @@
 #include "stdio_impl.h"
 #include <limits.h>
 #include <errno.h>
-#include "libc.h"
 
 off_t __ftello_unlocked(FILE *f)
 {
@@ -35,4 +34,4 @@ long ftell(FILE *f)
 
 weak_alias(__ftello, ftello);
 
-LFS64(ftello);
+weak_alias(ftello, ftello64);
index 7013f64508e19a4e85ea5780fca315415dcf5368..ae493987b8a7d43f89c4e1eed86cdd81fba7756c 100644 (file)
@@ -2,7 +2,6 @@
 #include <fcntl.h>
 #include <stdlib.h>
 #include "stdio_impl.h"
-#include "libc.h"
 
 #define MAXTRIES 100
 
@@ -29,4 +28,4 @@ FILE *tmpfile(void)
        return 0;
 }
 
-LFS64(tmpfile);
+weak_alias(tmpfile, tmpfile64);
index 4fe5713789e366409453c775b68ea40a8bb22039..d8dcb8052da56afe647a862af2f54322b97ee0c1 100644 (file)
@@ -1,10 +1,9 @@
 #define _BSD_SOURCE
 #include <stdlib.h>
-#include "libc.h"
 
 int mkostemp(char *template, int flags)
 {
        return __mkostemps(template, 0, flags);
 }
 
-LFS64(mkostemp);
+weak_alias(mkostemp, mkostemp64);
index 19d4014816f973b78f162c916e2a1e6e36b43436..166b8afe49bb204e0c23cf35000d1b55a444b2c3 100644 (file)
@@ -1,9 +1,8 @@
 #include <stdlib.h>
-#include "libc.h"
 
 int mkstemp(char *template)
 {
        return __mkostemps(template, 0, 0);
 }
 
-LFS64(mkstemp);
+weak_alias(mkstemp, mkstemp64);
index f2ab1bd33d3a1d1d4a8c56f24a4df20e67a1a7d9..6b7531b5e9a9764e44128fd70fa27d5ee2e415cc 100644 (file)
@@ -1,10 +1,9 @@
 #define _BSD_SOURCE
 #include <stdlib.h>
-#include "libc.h"
 
 int mkstemps(char *template, int len)
 {
        return __mkostemps(template, len, 0);
 }
 
-LFS64(mkstemps);
+weak_alias(mkstemps, mkstemps64);
index 467135f009971316101b6e38e5384707baa508c4..b41be0fa6f9ec6090aefbd1ef70735553f3dc19c 100644 (file)
@@ -1,10 +1,9 @@
 #include <unistd.h>
 #include "syscall.h"
-#include "libc.h"
 
 int ftruncate(int fd, off_t length)
 {
        return syscall(SYS_ftruncate, fd, __SYSCALL_LL_O(length));
 }
 
-LFS64(ftruncate);
+weak_alias(ftruncate, ftruncate64);
index 0a5ed392bc03c231208933ff3c2376bcfcb5f3b3..bf8cd8528e13b28dae03b771f2aa311555124bdf 100644 (file)
@@ -1,6 +1,5 @@
 #include <unistd.h>
 #include "syscall.h"
-#include "libc.h"
 
 off_t lseek(int fd, off_t offset, int whence)
 {
@@ -12,4 +11,4 @@ off_t lseek(int fd, off_t offset, int whence)
 #endif
 }
 
-LFS64(lseek);
+weak_alias(lseek, lseek64);
index 5483eb9d71f0f8172287cb95e975b8d151a45a5a..5681b045d6b96cf76a25af80449af5103c392592 100644 (file)
@@ -1,10 +1,9 @@
 #include <unistd.h>
 #include "syscall.h"
-#include "libc.h"
 
 ssize_t pread(int fd, void *buf, size_t size, off_t ofs)
 {
        return syscall_cp(SYS_pread, fd, buf, size, __SYSCALL_LL_PRW(ofs));
 }
 
-LFS64(pread);
+weak_alias(pread, pread64);
index 46d9ece7bbeeba5586b4fc9c1e95b3a8d36e8e77..8376d60f2a83cd974f640400e5cff91b463bbc51 100644 (file)
@@ -2,7 +2,6 @@
 #include <sys/uio.h>
 #include <unistd.h>
 #include "syscall.h"
-#include "libc.h"
 
 ssize_t preadv(int fd, const struct iovec *iov, int count, off_t ofs)
 {
@@ -10,4 +9,4 @@ ssize_t preadv(int fd, const struct iovec *iov, int count, off_t ofs)
                (long)(ofs), (long)(ofs>>32));
 }
 
-LFS64(preadv);
+weak_alias(preadv, preadv64);
index 4bf3d7dfcdaa1171fab942005fee289a35cd59f8..ca3765762274f3b3506239377ecf72091f5b948b 100644 (file)
@@ -1,10 +1,9 @@
 #include <unistd.h>
 #include "syscall.h"
-#include "libc.h"
 
 ssize_t pwrite(int fd, const void *buf, size_t size, off_t ofs)
 {
        return syscall_cp(SYS_pwrite, fd, buf, size, __SYSCALL_LL_PRW(ofs));
 }
 
-LFS64(pwrite);
+weak_alias(pwrite, pwrite64);
index aec5d3235a0f45d4bf5b12c803afb67033a9e9b0..f5a612c486e132f41ab73670c4c7e24c28f0f27a 100644 (file)
@@ -2,7 +2,6 @@
 #include <sys/uio.h>
 #include <unistd.h>
 #include "syscall.h"
-#include "libc.h"
 
 ssize_t pwritev(int fd, const struct iovec *iov, int count, off_t ofs)
 {
@@ -10,4 +9,4 @@ ssize_t pwritev(int fd, const struct iovec *iov, int count, off_t ofs)
                (long)(ofs), (long)(ofs>>32));
 }
 
-LFS64(pwritev);
+weak_alias(pwritev, pwritev64);
index 8e65655cd2bd1347af21edee8318f4aba92678c9..97296800765721306967e633f75dcc79194f4071 100644 (file)
@@ -1,10 +1,9 @@
 #include <unistd.h>
 #include "syscall.h"
-#include "libc.h"
 
 int truncate(const char *path, off_t length)
 {
        return syscall(SYS_truncate, path, __SYSCALL_LL_O(length));
 }
 
-LFS64(truncate);
+weak_alias(truncate, truncate64);