summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-12-13 21:38:57 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-12-13 21:38:57 +0000
commitf32600208f4e9db972eb47f7d4959994b31199e6 (patch)
tree2a9b75b74b8cf126b816ee32a36727977b5c3de3
parent01015a4321d2af6b665a90a20ea349f02bde6f81 (diff)
Convert all users of earlier hiddens
-rw-r--r--libc/inet/rpc/rcmd.c2
-rw-r--r--libc/inet/rpc/xdr_rec.c2
-rw-r--r--libc/inet/rpc/xdr_stdio.c2
-rw-r--r--libc/misc/dirent/opendir.c2
-rw-r--r--libc/misc/dirent/rewinddir.c2
-rw-r--r--libc/misc/dirent/scandir.c2
-rw-r--r--libc/misc/dirent/scandir64.c2
-rw-r--r--libc/misc/dirent/seekdir.c2
-rw-r--r--libc/misc/error/error.c1
-rw-r--r--libc/misc/file/lockf.c4
-rw-r--r--libc/misc/file/lockf64.c5
-rw-r--r--libc/misc/ftw/ftw.c4
-rw-r--r--libc/misc/glob/glob.c2
-rw-r--r--libc/misc/glob/glob64.c4
-rw-r--r--libc/misc/internals/__uClibc_main.c4
-rw-r--r--libc/misc/locale/locale.c1
-rw-r--r--libc/misc/mntent/mntent.c1
-rw-r--r--libc/misc/syslog/syslog.c2
-rw-r--r--libc/misc/utmp/utent.c12
-rw-r--r--libc/misc/utmp/wtent.c4
-rw-r--r--libc/misc/wchar/wstdio.c1
-rw-r--r--libc/pwd_grp/lckpwdf.c6
-rw-r--r--libc/stdio/_cs_funcs.c8
-rw-r--r--libc/stdio/_fopen.c2
-rw-r--r--libc/stdio/_trans2w.c2
-rw-r--r--libc/stdio/fdopen.c2
-rw-r--r--libc/stdio/fseeko.c6
-rw-r--r--libc/stdio/fsetpos.c8
-rw-r--r--libc/stdio/fsetpos64.c2
-rw-r--r--libc/stdio/rewind.c2
-rw-r--r--libc/sysdeps/linux/common/getcwd.c2
-rw-r--r--libc/sysdeps/linux/common/getdents.c2
-rw-r--r--libc/sysdeps/linux/common/getdents64.c2
-rw-r--r--libc/sysdeps/linux/common/pread_write.c12
-rw-r--r--libc/sysdeps/linux/powerpc/pread_write.c12
-rw-r--r--libc/termios/ttyname.c2
-rw-r--r--libc/unistd/getpass.c1
37 files changed, 71 insertions, 61 deletions
diff --git a/libc/inet/rpc/rcmd.c b/libc/inet/rpc/rcmd.c
index 36e942f9e..d43bd0663 100644
--- a/libc/inet/rpc/rcmd.c
+++ b/libc/inet/rpc/rcmd.c
@@ -169,7 +169,7 @@ int rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
sigsetmask(oldmask); /* sigsetmask */
return -1;
}
- fcntl(s, F_SETOWN, pid); /* __fcntl */
+ __fcntl(s, F_SETOWN, pid); /* __fcntl */
sin.sin_family = hp->h_addrtype;
bcopy(hp->h_addr_list[0], &sin.sin_addr,
MIN (sizeof (sin.sin_addr), hp->h_length));
diff --git a/libc/inet/rpc/xdr_rec.c b/libc/inet/rpc/xdr_rec.c
index a8d95e162..a19438489 100644
--- a/libc/inet/rpc/xdr_rec.c
+++ b/libc/inet/rpc/xdr_rec.c
@@ -317,7 +317,7 @@ xdrrec_getpos (const XDR *xdrs)
RECSTREAM *rstrm = (RECSTREAM *) xdrs->x_private;
long pos;
- pos = lseek ((int) (long) rstrm->tcp_handle, (long) 0, 1);
+ pos = __lseek ((int) (long) rstrm->tcp_handle, (long) 0, 1);
if (pos != -1)
switch (xdrs->x_op)
{
diff --git a/libc/inet/rpc/xdr_stdio.c b/libc/inet/rpc/xdr_stdio.c
index bd9ee4f1b..fe2a53dd0 100644
--- a/libc/inet/rpc/xdr_stdio.c
+++ b/libc/inet/rpc/xdr_stdio.c
@@ -39,6 +39,8 @@
#define fread __fread
#define fwrite __fwrite
+#define fseek __fseek
+#define fflush __fflush
#include <rpc/types.h>
#include <stdio.h>
diff --git a/libc/misc/dirent/opendir.c b/libc/misc/dirent/opendir.c
index efa6daba6..82e7f364f 100644
--- a/libc/misc/dirent/opendir.c
+++ b/libc/misc/dirent/opendir.c
@@ -29,7 +29,7 @@ DIR attribute_hidden *__opendir(const char *name)
/* According to POSIX, directory streams should be closed when
* exec. From "Anna Pluzhnikov" <besp@midway.uchicago.edu>.
*/
- if (fcntl(fd, F_SETFD, FD_CLOEXEC) < 0)
+ if (__fcntl(fd, F_SETFD, FD_CLOEXEC) < 0)
return NULL;
if (!(ptr = malloc(sizeof(*ptr)))) {
__close(fd);
diff --git a/libc/misc/dirent/rewinddir.c b/libc/misc/dirent/rewinddir.c
index f41ecc389..18d6547a8 100644
--- a/libc/misc/dirent/rewinddir.c
+++ b/libc/misc/dirent/rewinddir.c
@@ -12,7 +12,7 @@ void rewinddir(DIR * dir)
return;
}
__pthread_mutex_lock(&(dir->dd_lock));
- lseek(dir->dd_fd, 0, SEEK_SET);
+ __lseek(dir->dd_fd, 0, SEEK_SET);
dir->dd_nextoff = dir->dd_nextloc = dir->dd_size = 0;
__pthread_mutex_unlock(&(dir->dd_lock));
}
diff --git a/libc/misc/dirent/scandir.c b/libc/misc/dirent/scandir.c
index cc76bed5e..72929fb57 100644
--- a/libc/misc/dirent/scandir.c
+++ b/libc/misc/dirent/scandir.c
@@ -49,7 +49,7 @@ int scandir(const char *dir, struct dirent ***namelist,
__set_errno (0);
pos = 0;
- while ((current = readdir (dp)) != NULL)
+ while ((current = __readdir (dp)) != NULL)
if (selector == NULL || (*selector) (current))
{
struct dirent *vnew;
diff --git a/libc/misc/dirent/scandir64.c b/libc/misc/dirent/scandir64.c
index 377f55fe6..7a661996b 100644
--- a/libc/misc/dirent/scandir64.c
+++ b/libc/misc/dirent/scandir64.c
@@ -64,7 +64,7 @@ int scandir64(const char *dir, struct dirent64 ***namelist,
__set_errno (0);
pos = 0;
- while ((current = readdir64 (dp)) != NULL)
+ while ((current = __readdir64 (dp)) != NULL)
if (selector == NULL || (*selector) (current))
{
struct dirent64 *vnew;
diff --git a/libc/misc/dirent/seekdir.c b/libc/misc/dirent/seekdir.c
index 507131097..6e841291a 100644
--- a/libc/misc/dirent/seekdir.c
+++ b/libc/misc/dirent/seekdir.c
@@ -10,7 +10,7 @@ void seekdir(DIR * dir, long int offset)
return;
}
__pthread_mutex_lock(&(dir->dd_lock));
- dir->dd_nextoff = lseek(dir->dd_fd, offset, SEEK_SET);
+ dir->dd_nextoff = __lseek(dir->dd_fd, offset, SEEK_SET);
dir->dd_size = dir->dd_nextloc = 0;
__pthread_mutex_unlock(&(dir->dd_lock));
}
diff --git a/libc/misc/error/error.c b/libc/misc/error/error.c
index 5427e9568..119396570 100644
--- a/libc/misc/error/error.c
+++ b/libc/misc/error/error.c
@@ -24,6 +24,7 @@
#define strerror __strerror
#define vfprintf __vfprintf
+#define fflush __fflush
#include <stdio.h>
#include <stdarg.h>
diff --git a/libc/misc/file/lockf.c b/libc/misc/file/lockf.c
index dd5b90b3e..63d6a39c9 100644
--- a/libc/misc/file/lockf.c
+++ b/libc/misc/file/lockf.c
@@ -41,7 +41,7 @@ int attribute_hidden __lockf (int fd, int cmd, off_t len)
/* Test the lock: return 0 if FD is unlocked or locked by this process;
return -1, set errno to EACCES, if another process holds the lock. */
fl.l_type = F_RDLCK;
- if (fcntl (fd, F_GETLK, &fl) < 0)
+ if (__fcntl (fd, F_GETLK, &fl) < 0)
return -1;
if (fl.l_type == F_UNLCK || fl.l_pid == __getpid ())
return 0;
@@ -66,6 +66,6 @@ int attribute_hidden __lockf (int fd, int cmd, off_t len)
return -1;
}
- return fcntl(fd, cmd, &fl);
+ return __fcntl(fd, cmd, &fl);
}
strong_alias(__lockf,lockf)
diff --git a/libc/misc/file/lockf64.c b/libc/misc/file/lockf64.c
index 23f88f179..8440202d5 100644
--- a/libc/misc/file/lockf64.c
+++ b/libc/misc/file/lockf64.c
@@ -41,11 +41,12 @@
#include <sys/syscall.h>
#ifdef __NR_fcntl64
-extern int fcntl64 (int fd, int cmd, ...);
#define flock flock64
-#define fcntl fcntl64
+#define fcntl __fcntl64
#define F_GETLK F_GETLK64
#define F_SETLK F_SETLK64
+#else
+#define fcntl __fcntl
#endif
/* lockf is a simplified interface to fcntl's locking facilities. */
diff --git a/libc/misc/ftw/ftw.c b/libc/misc/ftw/ftw.c
index 30009def9..4bd186561 100644
--- a/libc/misc/ftw/ftw.c
+++ b/libc/misc/ftw/ftw.c
@@ -219,7 +219,7 @@ open_dir_stream (struct ftw_data *data, struct dir_data *dirp)
struct dirent *d;
size_t actsize = 0;
- while ((d = readdir (st)) != NULL)
+ while ((d = __readdir (st)) != NULL)
{
size_t this_len = _D_EXACT_NAMLEN (d);
if (actsize + this_len + 2 >= bufsize)
@@ -443,7 +443,7 @@ ftw_dir (struct ftw_data *data, struct STAT *st)
*startp++ = '/';
data->ftw.base = startp - data->dirbuf;
- while (dir.stream != NULL && (d = readdir (dir.stream)) != NULL)
+ while (dir.stream != NULL && (d = __readdir (dir.stream)) != NULL)
{
result = process_entry (data, &dir, d->d_name, _D_EXACT_NAMLEN (d));
if (result != 0)
diff --git a/libc/misc/glob/glob.c b/libc/misc/glob/glob.c
index 795030388..aa90ae418 100644
--- a/libc/misc/glob/glob.c
+++ b/libc/misc/glob/glob.c
@@ -428,7 +428,7 @@ glob_in_dir (pattern, directory, flags, errfunc, pglob)
}
else
{
- struct dirent *d = readdir ((DIR *) stream);
+ struct dirent *d = __readdir ((DIR *) stream);
if (d == NULL)
break;
if (! (d->d_ino != 0))
diff --git a/libc/misc/glob/glob64.c b/libc/misc/glob/glob64.c
index 5829fec14..17e6838aa 100644
--- a/libc/misc/glob/glob64.c
+++ b/libc/misc/glob/glob64.c
@@ -19,7 +19,7 @@
#include <sys/stat.h>
#define dirent dirent64
-#define readdir(dirp) readdir64 (dirp)
+#define __readdir(dirp) __readdir64(dirp)
#define glob_t glob64_t
#define glob(pattern, flags, errfunc, pglob) \
@@ -28,7 +28,7 @@
#undef stat
#define stat stat64
-#define lstat lstat64
+#define __lstat __lstat64
#define __GLOB64 1
diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c
index 3760ae275..f3fda108b 100644
--- a/libc/misc/internals/__uClibc_main.c
+++ b/libc/misc/internals/__uClibc_main.c
@@ -81,14 +81,12 @@ const char *__progname = 0;
# define O_NOFOLLOW 0
#endif
-extern int __libc_fcntl(int fd, int cmd, ...);
-
#ifdef __ARCH_HAS_MMU__
static void __check_one_fd(int fd, int mode)
{
/* Check if the specified fd is already open */
- if (unlikely(__libc_fcntl(fd, F_GETFD)==-1 && *(__errno_location())==EBADF))
+ if (unlikely(__fcntl(fd, F_GETFD)==-1 && *(__errno_location())==EBADF))
{
/* The descriptor is probably not open, so try to use /dev/null */
struct stat st;
diff --git a/libc/misc/locale/locale.c b/libc/misc/locale/locale.c
index bf0628ee1..0d7060950 100644
--- a/libc/misc/locale/locale.c
+++ b/libc/misc/locale/locale.c
@@ -48,6 +48,7 @@
#define stpcpy __stpcpy
#define strtok_r __strtok_r
+/* #define fflush __fflush */
#define _GNU_SOURCE
diff --git a/libc/misc/mntent/mntent.c b/libc/misc/mntent/mntent.c
index 7e9febb1f..49251479d 100644
--- a/libc/misc/mntent/mntent.c
+++ b/libc/misc/mntent/mntent.c
@@ -1,6 +1,7 @@
#define strtok_r __strtok_r
#define strstr __strstr
#define atoi __atoi
+#define fseek __fseek
#include <stdio.h>
#include <stdlib.h>
diff --git a/libc/misc/syslog/syslog.c b/libc/misc/syslog/syslog.c
index 649f36d65..a4bb56bfc 100644
--- a/libc/misc/syslog/syslog.c
+++ b/libc/misc/syslog/syslog.c
@@ -153,7 +153,7 @@ retry:
UNLOCK;
return;
}
- /* fcntl(LogFile, F_SETFD, 1); */
+ /* __fcntl(LogFile, F_SETFD, 1); */
}
}
diff --git a/libc/misc/utmp/utent.c b/libc/misc/utmp/utent.c
index 374b53b93..3ad5bc828 100644
--- a/libc/misc/utmp/utent.c
+++ b/libc/misc/utmp/utent.c
@@ -49,9 +49,9 @@ void attribute_hidden __setutent(void)
}
}
/* Make sure the file will be closed on exec() */
- ret = fcntl(static_fd, F_GETFD, 0);
+ ret = __fcntl(static_fd, F_GETFD, 0);
if (ret >= 0) {
- ret = fcntl(static_fd, F_GETFD, 0);
+ ret = __fcntl(static_fd, F_GETFD, 0);
}
if (ret < 0) {
bummer:
@@ -61,7 +61,7 @@ bummer:
return;
}
}
- lseek(static_fd, 0, SEEK_SET);
+ __lseek(static_fd, 0, SEEK_SET);
UNLOCK;
return;
}
@@ -151,14 +151,14 @@ struct utmp *pututline (const struct utmp *utmp_entry)
LOCK;
/* Ignore the return value. That way, if they've already positioned
the file pointer where they want it, everything will work out. */
- lseek(static_fd, (off_t) - sizeof(struct utmp), SEEK_CUR);
+ __lseek(static_fd, (off_t) - sizeof(struct utmp), SEEK_CUR);
if (__getutid(utmp_entry) != NULL) {
- lseek(static_fd, (off_t) - sizeof(struct utmp), SEEK_CUR);
+ __lseek(static_fd, (off_t) - sizeof(struct utmp), SEEK_CUR);
if (__write(static_fd, utmp_entry, sizeof(struct utmp)) != sizeof(struct utmp))
return NULL;
} else {
- lseek(static_fd, (off_t) 0, SEEK_END);
+ __lseek(static_fd, (off_t) 0, SEEK_END);
if (__write(static_fd, utmp_entry, sizeof(struct utmp)) != sizeof(struct utmp))
return NULL;
}
diff --git a/libc/misc/utmp/wtent.c b/libc/misc/utmp/wtent.c
index bfedeaa70..35947f19e 100644
--- a/libc/misc/utmp/wtent.c
+++ b/libc/misc/utmp/wtent.c
@@ -52,9 +52,9 @@ extern void updwtmp(const char *wtmp_file, const struct utmp *lutmp)
fd = __open(wtmp_file, O_APPEND | O_WRONLY, 0);
if (fd >= 0) {
- if (lockf(fd, F_LOCK, 0)==0) {
+ if (__lockf(fd, F_LOCK, 0)==0) {
__write(fd, (const char *) lutmp, sizeof(struct utmp));
- lockf(fd, F_ULOCK, 0);
+ __lockf(fd, F_ULOCK, 0);
__close(fd);
}
}
diff --git a/libc/misc/wchar/wstdio.c b/libc/misc/wchar/wstdio.c
index 91917683a..b4ca4973f 100644
--- a/libc/misc/wchar/wstdio.c
+++ b/libc/misc/wchar/wstdio.c
@@ -53,6 +53,7 @@
#define wcsrtombs __wcsrtombs
#define mbrtowc __mbrtowc
#define wcrtomb __wcrtomb
+#define fflush_unlocked __fflush_unlocked
#define _GNU_SOURCE
#include <stdio.h>
diff --git a/libc/pwd_grp/lckpwdf.c b/libc/pwd_grp/lckpwdf.c
index 72f8e3c83..f99e9f026 100644
--- a/libc/pwd_grp/lckpwdf.c
+++ b/libc/pwd_grp/lckpwdf.c
@@ -73,7 +73,7 @@ int lckpwdf (void)
}
/* Make sure file gets correctly closed when process finished. */
- flags = fcntl (lock_fd, F_GETFD, 0);
+ flags = __fcntl (lock_fd, F_GETFD, 0);
if (flags == -1) {
/* Cannot get file flags. */
__close(lock_fd);
@@ -82,7 +82,7 @@ int lckpwdf (void)
return -1;
}
flags |= FD_CLOEXEC; /* Close on exit. */
- if (fcntl (lock_fd, F_SETFD, flags) < 0) {
+ if (__fcntl (lock_fd, F_SETFD, flags) < 0) {
/* Cannot set new flags. */
__close(lock_fd);
lock_fd = -1;
@@ -131,7 +131,7 @@ int lckpwdf (void)
__memset (&fl, '\0', sizeof (struct flock));
fl.l_type = F_WRLCK;
fl.l_whence = SEEK_SET;
- result = fcntl (lock_fd, F_SETLKW, &fl);
+ result = __fcntl (lock_fd, F_SETLKW, &fl);
/* Clear alarm. */
alarm (0);
diff --git a/libc/stdio/_cs_funcs.c b/libc/stdio/_cs_funcs.c
index 3bec64c19..ef92048c0 100644
--- a/libc/stdio/_cs_funcs.c
+++ b/libc/stdio/_cs_funcs.c
@@ -30,9 +30,9 @@ int attribute_hidden _cs_seek(void *cookie, register __offmax_t *pos, int whence
__offmax_t res;
#ifdef __UCLIBC_HAS_LFS__
- res = lseek64(*((int *) cookie), *pos, whence);
+ res = __lseek64(*((int *) cookie), *pos, whence);
#else
- res = lseek(*((int *) cookie), *pos, whence);
+ res = __lseek(*((int *) cookie), *pos, whence);
#endif
return (res >= 0) ? ((*pos = res), 0) : ((int) res);
@@ -54,9 +54,9 @@ int attribute_hidden __stdio_seek(FILE *stream, register __offmax_t *pos, int wh
__offmax_t res;
#ifdef __UCLIBC_HAS_LFS__
- res = lseek64(stream->__filedes, *pos, whence);
+ res = __lseek64(stream->__filedes, *pos, whence);
#else
- res = lseek(stream->__filedes, *pos, whence);
+ res = __lseek(stream->__filedes, *pos, whence);
#endif
return (res >= 0) ? ((*pos = res), 0) : ((int) res);
diff --git a/libc/stdio/_fopen.c b/libc/stdio/_fopen.c
index 46ea8a212..b4f4d46c7 100644
--- a/libc/stdio/_fopen.c
+++ b/libc/stdio/_fopen.c
@@ -121,7 +121,7 @@ FILE attribute_hidden *_stdio_fopen(intptr_t fname_or_mode,
/* NOTE: fopencookie needs changing if the basic check changes! */
if (((i & (((int) fname_or_mode) + 1)) != i) /* Basic agreement? */
|| (((open_mode & ~((__mode_t) fname_or_mode)) & O_APPEND)
- && fcntl(filedes, F_SETFL, O_APPEND)) /* Need O_APPEND. */
+ && __fcntl(filedes, F_SETFL, O_APPEND)) /* Need O_APPEND. */
) {
goto DO_EINVAL;
}
diff --git a/libc/stdio/_trans2w.c b/libc/stdio/_trans2w.c
index e85f45a24..650a5e1a0 100644
--- a/libc/stdio/_trans2w.c
+++ b/libc/stdio/_trans2w.c
@@ -64,7 +64,7 @@ int attribute_hidden __stdio_trans2w(FILE * __restrict stream)
* the end even if not reading.*/
if (((__STDIO_STREAM_BUFFER_RAVAIL(stream))
|| (stream->__modeflags & __FLAG_UNGOT))
- && fseek(stream, 0L,
+ && __fseek(stream, 0L,
((stream->__modeflags & __FLAG_APPEND)
? SEEK_END : SEEK_CUR))
) {
diff --git a/libc/stdio/fdopen.c b/libc/stdio/fdopen.c
index 9b08b4b71..bca7f23fb 100644
--- a/libc/stdio/fdopen.c
+++ b/libc/stdio/fdopen.c
@@ -11,7 +11,7 @@ FILE attribute_hidden *__fdopen(int filedes, const char *mode)
{
intptr_t cur_mode;
- return (((cur_mode = fcntl(filedes, F_GETFL))) != -1)
+ return (((cur_mode = __fcntl(filedes, F_GETFL))) != -1)
? _stdio_fopen(cur_mode, mode, NULL, filedes)
: NULL;
}
diff --git a/libc/stdio/fseeko.c b/libc/stdio/fseeko.c
index c795356e7..190485775 100644
--- a/libc/stdio/fseeko.c
+++ b/libc/stdio/fseeko.c
@@ -74,8 +74,8 @@ int attribute_hidden FSEEK(register FILE *stream, OFFSET_TYPE offset, int whence
}
#ifdef __DO_LARGEFILE
-weak_alias(__fseeko64,fseeko64)
+strong_alias(__fseeko64,fseeko64)
#else
-weak_alias(__fseek,fseek)
-weak_alias(fseek,fseeko)
+strong_alias(__fseek,fseek)
+weak_alias(__fseek,fseeko)
#endif
diff --git a/libc/stdio/fsetpos.c b/libc/stdio/fsetpos.c
index 2b02f25e0..f33043f3b 100644
--- a/libc/stdio/fsetpos.c
+++ b/libc/stdio/fsetpos.c
@@ -7,6 +7,10 @@
#include "_stdio.h"
+#ifndef __DO_LARGEFILE
+#define FSEEK __fseek
+#endif
+
int fsetpos(FILE *stream, register const fpos_t *pos)
{
#ifdef __STDIO_MBSTATE
@@ -16,7 +20,7 @@ int fsetpos(FILE *stream, register const fpos_t *pos)
__STDIO_AUTO_THREADLOCK(stream);
- if ((retval = fseek(stream, pos->__pos, SEEK_SET)) == 0) {
+ if ((retval = FSEEK(stream, pos->__pos, SEEK_SET)) == 0) {
__COPY_MBSTATE(&(stream->__state), &(pos->__mbstate));
stream->__ungot_width[0]= pos->__mblen_pending;
}
@@ -27,7 +31,7 @@ int fsetpos(FILE *stream, register const fpos_t *pos)
#else
- return fseek(stream, pos->__pos, SEEK_SET);
+ return FSEEK(stream, pos->__pos, SEEK_SET);
#endif
}
diff --git a/libc/stdio/fsetpos64.c b/libc/stdio/fsetpos64.c
index 92906e302..bf7d574cb 100644
--- a/libc/stdio/fsetpos64.c
+++ b/libc/stdio/fsetpos64.c
@@ -10,5 +10,5 @@
#define __DO_LARGEFILE
#define fsetpos fsetpos64
#define fpos_t fpos64_t
-#define fseek fseeko64
+#define FSEEK __fseeko64
#include "fsetpos.c"
diff --git a/libc/stdio/rewind.c b/libc/stdio/rewind.c
index aa4534aa7..8e0acc2d0 100644
--- a/libc/stdio/rewind.c
+++ b/libc/stdio/rewind.c
@@ -14,7 +14,7 @@ void attribute_hidden __rewind(register FILE *stream)
__STDIO_AUTO_THREADLOCK(stream);
__STDIO_STREAM_CLEAR_ERROR(stream); /* Clear the error indicator */
- fseek(stream, 0L, SEEK_SET); /* first since fseek could set it. */
+ __fseek(stream, 0L, SEEK_SET); /* first since fseek could set it. */
__STDIO_AUTO_THREADUNLOCK(stream);
}
diff --git a/libc/sysdeps/linux/common/getcwd.c b/libc/sysdeps/linux/common/getcwd.c
index c35e7f312..874474d87 100644
--- a/libc/sysdeps/linux/common/getcwd.c
+++ b/libc/sysdeps/linux/common/getcwd.c
@@ -66,7 +66,7 @@ static char *search_dir(dev_t this_dev, ino_t this_ino, char *path_buf, int path
goto oops;
}
- while ((d = readdir(dp)) != 0) {
+ while ((d = __readdir(dp)) != 0) {
#ifdef FAST_DIR_SEARCH_POSSIBLE
if (slow_search || this_ino == d->d_ino) {
#endif
diff --git a/libc/sysdeps/linux/common/getdents.c b/libc/sysdeps/linux/common/getdents.c
index 25b77fe39..4db513a62 100644
--- a/libc/sysdeps/linux/common/getdents.c
+++ b/libc/sysdeps/linux/common/getdents.c
@@ -75,7 +75,7 @@ ssize_t attribute_hidden __getdents (int fd, char *buf, size_t nbytes)
/* Our heuristic failed. We read too many entries. Reset
the stream. */
assert (last_offset != -1);
- lseek(fd, last_offset, SEEK_SET);
+ __lseek(fd, last_offset, SEEK_SET);
if ((char *) dp == buf) {
/* The buffer the user passed in is too small to hold even
diff --git a/libc/sysdeps/linux/common/getdents64.c b/libc/sysdeps/linux/common/getdents64.c
index d6410262d..f65e9e70b 100644
--- a/libc/sysdeps/linux/common/getdents64.c
+++ b/libc/sysdeps/linux/common/getdents64.c
@@ -80,7 +80,7 @@ ssize_t attribute_hidden __getdents64 (int fd, char *buf, size_t nbytes)
/* Our heuristic failed. We read too many entries. Reset
the stream. */
assert (last_offset != -1);
- lseek64(fd, last_offset, SEEK_SET);
+ __lseek64(fd, last_offset, SEEK_SET);
if ((char *) dp == buf) {
/* The buffer the user passed in is too small to hold even
diff --git a/libc/sysdeps/linux/common/pread_write.c b/libc/sysdeps/linux/common/pread_write.c
index 05eff4bc9..0019e05f6 100644
--- a/libc/sysdeps/linux/common/pread_write.c
+++ b/libc/sysdeps/linux/common/pread_write.c
@@ -100,11 +100,11 @@ static ssize_t __fake_pread_write(int fd, void *buf,
/* Since we must not change the file pointer preserve the
* value so that we can restore it later. */
- if ((old_offset=lseek(fd, 0, SEEK_CUR)) == (off_t) -1)
+ if ((old_offset=__lseek(fd, 0, SEEK_CUR)) == (off_t) -1)
return -1;
/* Set to wanted position. */
- if (lseek (fd, offset, SEEK_SET) == (off_t) -1)
+ if (__lseek (fd, offset, SEEK_SET) == (off_t) -1)
return -1;
if (do_pwrite==1) {
@@ -118,7 +118,7 @@ static ssize_t __fake_pread_write(int fd, void *buf,
/* Now we have to restore the position. If this fails we
* have to return this as an error. */
save_errno = errno;
- if (lseek(fd, old_offset, SEEK_SET) == (off_t) -1)
+ if (__lseek(fd, old_offset, SEEK_SET) == (off_t) -1)
{
if (result == -1)
__set_errno(save_errno);
@@ -138,11 +138,11 @@ static ssize_t __fake_pread_write64(int fd, void *buf,
/* Since we must not change the file pointer preserve the
* value so that we can restore it later. */
- if ((old_offset=lseek64(fd, 0, SEEK_CUR)) == (off64_t) -1)
+ if ((old_offset=__lseek64(fd, 0, SEEK_CUR)) == (off64_t) -1)
return -1;
/* Set to wanted position. */
- if (lseek64(fd, offset, SEEK_SET) == (off64_t) -1)
+ if (__lseek64(fd, offset, SEEK_SET) == (off64_t) -1)
return -1;
if (do_pwrite==1) {
@@ -155,7 +155,7 @@ static ssize_t __fake_pread_write64(int fd, void *buf,
/* Now we have to restore the position. */
save_errno = errno;
- if (lseek64 (fd, old_offset, SEEK_SET) == (off64_t) -1) {
+ if (__lseek64 (fd, old_offset, SEEK_SET) == (off64_t) -1) {
if (result == -1)
__set_errno (save_errno);
return -1;
diff --git a/libc/sysdeps/linux/powerpc/pread_write.c b/libc/sysdeps/linux/powerpc/pread_write.c
index 7f8923720..8115d4d01 100644
--- a/libc/sysdeps/linux/powerpc/pread_write.c
+++ b/libc/sysdeps/linux/powerpc/pread_write.c
@@ -96,11 +96,11 @@ static ssize_t __fake_pread_write(int fd, void *buf,
/* Since we must not change the file pointer preserve the
* value so that we can restore it later. */
- if ((old_offset=lseek(fd, 0, SEEK_CUR)) == (off_t) -1)
+ if ((old_offset=__lseek(fd, 0, SEEK_CUR)) == (off_t) -1)
return -1;
/* Set to wanted position. */
- if (lseek (fd, offset, SEEK_SET) == (off_t) -1)
+ if (__lseek (fd, offset, SEEK_SET) == (off_t) -1)
return -1;
if (do_pwrite==1) {
@@ -114,7 +114,7 @@ static ssize_t __fake_pread_write(int fd, void *buf,
/* Now we have to restore the position. If this fails we
* have to return this as an error. */
save_errno = errno;
- if (lseek(fd, old_offset, SEEK_SET) == (off_t) -1)
+ if (__lseek(fd, old_offset, SEEK_SET) == (off_t) -1)
{
if (result == -1)
__set_errno(save_errno);
@@ -134,11 +134,11 @@ static ssize_t __fake_pread_write64(int fd, void *buf,
/* Since we must not change the file pointer preserve the
* value so that we can restore it later. */
- if ((old_offset=lseek64(fd, 0, SEEK_CUR)) == (off64_t) -1)
+ if ((old_offset=__lseek64(fd, 0, SEEK_CUR)) == (off64_t) -1)
return -1;
/* Set to wanted position. */
- if (lseek64(fd, offset, SEEK_SET) == (off64_t) -1)
+ if (__lseek64(fd, offset, SEEK_SET) == (off64_t) -1)
return -1;
if (do_pwrite==1) {
@@ -151,7 +151,7 @@ static ssize_t __fake_pread_write64(int fd, void *buf,
/* Now we have to restore the position. */
save_errno = errno;
- if (lseek64 (fd, old_offset, SEEK_SET) == (off64_t) -1) {
+ if (__lseek64 (fd, old_offset, SEEK_SET) == (off64_t) -1) {
if (result == -1)
__set_errno (save_errno);
return -1;
diff --git a/libc/termios/ttyname.c b/libc/termios/ttyname.c
index 979694632..a176dd7d4 100644
--- a/libc/termios/ttyname.c
+++ b/libc/termios/ttyname.c
@@ -73,7 +73,7 @@ int attribute_hidden __ttyname_r(int fd, char *ubuf, size_t ubuflen)
continue;
}
- while ((d = readdir(fp)) != NULL) {
+ while ((d = __readdir(fp)) != NULL) {
/* This should never trigger for standard names, but we
* check it to be safe. */
if (__strlen(d->d_name) > len) { /* Too big? */
diff --git a/libc/unistd/getpass.c b/libc/unistd/getpass.c
index 8a23c99bf..a51c8e87f 100644
--- a/libc/unistd/getpass.c
+++ b/libc/unistd/getpass.c
@@ -20,6 +20,7 @@
#define tcsetattr __tcsetattr
#define tcgetattr __tcgetattr
#define fileno __fileno
+#define fflush __fflush
#include <stdio.h>
#include <string.h>