summaryrefslogtreecommitdiffstats
path: root/libc/unistd/usershell.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/unistd/usershell.c')
-rw-r--r--libc/unistd/usershell.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/libc/unistd/usershell.c b/libc/unistd/usershell.c
index bc29cf247..e053d94b7 100644
--- a/libc/unistd/usershell.c
+++ b/libc/unistd/usershell.c
@@ -30,11 +30,6 @@
* November 2002, Erik Andersen <andersen@codepoet.org>
*/
-#define __fsetlocking __fsetlocking_internal
-#define fileno __fileno
-#define fgets_unlocked __fgets_unlocked
-
-#define _GNU_SOURCE
#include <sys/param.h>
#include <sys/file.h>
#include <sys/stat.h>
@@ -45,6 +40,18 @@
#include <unistd.h>
#include <paths.h>
+libc_hidden_proto(fstat)
+libc_hidden_proto(fopen)
+libc_hidden_proto(fclose)
+libc_hidden_proto(__fsetlocking)
+libc_hidden_proto(fileno)
+libc_hidden_proto(fgets_unlocked)
+#ifdef __UCLIBC_HAS_XLOCALE__
+libc_hidden_proto(__ctype_b_loc)
+#else
+libc_hidden_proto(__ctype_b)
+#endif
+
/*
* Local shells should NOT be added here. They should be added in
* /etc/shells.
@@ -104,7 +111,7 @@ static char ** initshells(void)
if ((fp = fopen(_PATH_SHELLS, "r")) == NULL)
return (char **) validsh;
- if (__fstat(fileno(fp), &statb) == -1) {
+ if (fstat(fileno(fp), &statb) == -1) {
goto cleanup;
}
if ((strings = malloc((unsigned)statb.st_size + 1)) == NULL) {