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);
}
}
-LFS64(aio_suspend);
+weak_alias(aio_suspend, aio_suspend64);
return 0;
}
-LFS64(lio_listio);
+weak_alias(lio_listio, lio_listio64);
#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);
#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))];
return de;
}
-LFS64(readdir);
+weak_alias(readdir, readdir64);
return 0;
}
-LFS64_2(readdir_r, readdir64_r);
+weak_alias(readdir_r, readdir64_r);
#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 *),
return cnt;
}
-LFS64(scandir);
+weak_alias(scandir, scandir64);
#define _GNU_SOURCE
#include <string.h>
#include <dirent.h>
-#include "libc.h"
int versionsort(const struct dirent **a, const struct dirent **b)
{
}
#undef versionsort64
-LFS64(versionsort);
+weak_alias(versionsort, versionsort64);
#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);
#include <fcntl.h>
#include <stdarg.h>
#include "syscall.h"
-#include "libc.h"
int open(const char *filename, int flags, ...)
{
return __syscall_ret(fd);
}
-LFS64(open);
+weak_alias(open, open64);
#include <fcntl.h>
#include <stdarg.h>
#include "syscall.h"
-#include "libc.h"
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);
#include <fcntl.h>
#include "syscall.h"
-#include "libc.h"
int posix_fadvise(int fd, off_t base, off_t len, int advice)
{
#endif
}
-LFS64(posix_fadvise);
+weak_alias(posix_fadvise, posix_fadvise64);
#include <fcntl.h>
#include "syscall.h"
-#include "libc.h"
int posix_fallocate(int fd, off_t base, off_t len)
{
__SYSCALL_LL_E(len));
}
-LFS64(posix_fallocate);
+weak_alias(posix_fallocate, posix_fallocate64);
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
#include <ftw.h>
-#include "libc.h"
int ftw(const char *path, int (*fn)(const char *, const struct stat *, int), int fd_limit)
{
return nftw(path, (int (*)())fn, fd_limit, FTW_PHYS);
}
-LFS64(ftw);
+weak_alias(ftw, ftw64);
#define _GNU_SOURCE
#include <fcntl.h>
#include "syscall.h"
-#include "libc.h"
int fallocate(int fd, int mode, off_t base, off_t len)
{
}
#undef fallocate64
-LFS64(fallocate);
+weak_alias(fallocate, fallocate64);
#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);
#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)
}
#undef prlimit64
-LFS64(prlimit);
+weak_alias(prlimit, prlimit64);
#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);
#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)
return 0;
}
-LFS64(getrlimit);
+weak_alias(getrlimit, getrlimit64);
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
-#include "libc.h"
int lockf(int fd, int op, off_t size)
{
return -1;
}
-LFS64(lockf);
+weak_alias(lockf, lockf64);
#include <string.h>
#include <limits.h>
#include <pthread.h>
-#include "libc.h"
struct history
{
return r;
}
-LFS64(nftw);
+weak_alias(nftw, nftw64);
return 0;
}
-LFS64(setrlimit);
+weak_alias(setrlimit, setrlimit64);
#include <stdint.h>
#include <limits.h>
#include "syscall.h"
-#include "libc.h"
static void dummy(void) { }
weak_alias(dummy, __vm_wait);
weak_alias(__mmap, mmap);
-LFS64(mmap);
+weak_alias(mmap, mmap64);
#include <stdlib.h>
#include <errno.h>
#include <stddef.h>
-#include "libc.h"
struct match
{
g->gl_pathv = NULL;
}
-LFS64(glob);
-LFS64(globfree);
+weak_alias(glob, glob64);
+weak_alias(globfree, globfree64);
#include <sys/stat.h>
-#include "libc.h"
int __fxstat(int ver, int fd, 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)
{
#include <errno.h>
#include <fcntl.h>
#include "syscall.h"
-#include "libc.h"
int fstat(int fd, struct stat *st)
{
#endif
}
-LFS64(fstat);
+weak_alias(fstat, fstat64);
#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);
#include <sys/stat.h>
#include <fcntl.h>
#include "syscall.h"
-#include "libc.h"
int lstat(const char *restrict path, struct stat *restrict buf)
{
#endif
}
-LFS64(lstat);
+weak_alias(lstat, lstat64);
#include <sys/stat.h>
#include <fcntl.h>
#include "syscall.h"
-#include "libc.h"
int stat(const char *restrict path, struct stat *restrict buf)
{
#endif
}
-LFS64(stat);
+weak_alias(stat, stat64);
#include <sys/statvfs.h>
#include <sys/statfs.h>
#include "syscall.h"
-#include "libc.h"
static int __statfs(const char *path, struct statfs *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);
#include "stdio_impl.h"
-#include "libc.h"
int fgetpos(FILE *restrict f, fpos_t *restrict pos)
{
return 0;
}
-LFS64(fgetpos);
+weak_alias(fgetpos, fgetpos64);
#include <fcntl.h>
#include <string.h>
#include <errno.h>
-#include "libc.h"
FILE *fopen(const char *restrict filename, const char *restrict mode)
{
return 0;
}
-LFS64(fopen);
+weak_alias(fopen, fopen64);
#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
return NULL;
}
-LFS64(freopen);
+weak_alias(freopen, freopen64);
#include "stdio_impl.h"
-#include "libc.h"
int __fseeko_unlocked(FILE *f, off_t off, int whence)
{
weak_alias(__fseeko, fseeko);
-LFS64(fseeko);
+weak_alias(fseeko, fseeko64);
#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);
#include "stdio_impl.h"
#include <limits.h>
#include <errno.h>
-#include "libc.h"
off_t __ftello_unlocked(FILE *f)
{
weak_alias(__ftello, ftello);
-LFS64(ftello);
+weak_alias(ftello, ftello64);
#include <fcntl.h>
#include <stdlib.h>
#include "stdio_impl.h"
-#include "libc.h"
#define MAXTRIES 100
return 0;
}
-LFS64(tmpfile);
+weak_alias(tmpfile, tmpfile64);
#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);
#include <stdlib.h>
-#include "libc.h"
int mkstemp(char *template)
{
return __mkostemps(template, 0, 0);
}
-LFS64(mkstemp);
+weak_alias(mkstemp, mkstemp64);
#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);
#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);
#include <unistd.h>
#include "syscall.h"
-#include "libc.h"
off_t lseek(int fd, off_t offset, int whence)
{
#endif
}
-LFS64(lseek);
+weak_alias(lseek, lseek64);
#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);
#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)
{
(long)(ofs), (long)(ofs>>32));
}
-LFS64(preadv);
+weak_alias(preadv, preadv64);
#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);
#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)
{
(long)(ofs), (long)(ofs>>32));
}
-LFS64(pwritev);
+weak_alias(pwritev, pwritev64);
#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);