this probably saves a few bytes, avoids duplicating the clunky
lseek/_llseek syscall convention in two places, and sets the stage for
fixing broken seeks on x32 and mipsn32.
hidden int __mkostemps(char *, int, int);
hidden int __execvpe(const char *, char *const *, char *const *);
hidden int __aio_close(int);
+hidden off_t __lseek(int, off_t, int);
#endif
#include "stdio_impl.h"
+#include <unistd.h>
off_t __stdio_seek(FILE *f, off_t off, int whence)
{
- off_t ret;
-#ifdef SYS__llseek
- if (syscall(SYS__llseek, f->fd, off>>32, off, &ret, whence)<0)
- ret = -1;
-#else
- ret = syscall(SYS_lseek, f->fd, off, whence);
-#endif
- return ret;
+ return __lseek(f->fd, off, whence);
}
#include <unistd.h>
#include "syscall.h"
-off_t lseek(int fd, off_t offset, int whence)
+off_t __lseek(int fd, off_t offset, int whence)
{
#ifdef SYS__llseek
off_t result;
#endif
}
-weak_alias(lseek, lseek64);
+weak_alias(__lseek, lseek);
+weak_alias(__lseek, lseek64);