diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2006-01-16 18:07:18 +0000 |
---|---|---|
committer | Peter S. Mazinger <ps.m@gmx.net> | 2006-01-16 18:07:18 +0000 |
commit | b25ad630be8b0f362fea44a97efbead83d1dd2ae (patch) | |
tree | 6f45eed6bf053c9e105d6b67bc1d765b49b58e61 /libc/unistd | |
parent | e4a6dbb41c73cf86b95beca2d0e2bb6f0530ef79 (diff) |
Last relocs jump and global data, (even locales) that I could remove are gone from libc. The remaining are left as exercise for others ;-)
Diffstat (limited to 'libc/unistd')
-rw-r--r-- | libc/unistd/exec.c | 1 | ||||
-rw-r--r-- | libc/unistd/getopt.c | 25 | ||||
-rw-r--r-- | libc/unistd/getpass.c | 2 | ||||
-rw-r--r-- | libc/unistd/usershell.c | 5 |
4 files changed, 25 insertions, 8 deletions
diff --git a/libc/unistd/exec.c b/libc/unistd/exec.c index 08ef742d3..04549dd40 100644 --- a/libc/unistd/exec.c +++ b/libc/unistd/exec.c @@ -51,6 +51,7 @@ libc_hidden_proto(execve) libc_hidden_proto(mmap) libc_hidden_proto(munmap) libc_hidden_proto(getenv) +libc_hidden_proto(__environ) /**********************************************************************/ #if defined(__ARCH_HAS_MMU__) || defined(__UCLIBC_UCLINUX_BROKEN_MUNMAP__) diff --git a/libc/unistd/getopt.c b/libc/unistd/getopt.c index d9c458595..514187995 100644 --- a/libc/unistd/getopt.c +++ b/libc/unistd/getopt.c @@ -34,13 +34,6 @@ #include <libintl.h> #endif -libc_hidden_proto(strchr) -libc_hidden_proto(strcmp) -libc_hidden_proto(strlen) -libc_hidden_proto(strncmp) -libc_hidden_proto(getenv) -libc_hidden_proto(fprintf) - #ifdef __UCLIBC_MJN3_ONLY__ #warning TODO: Enable gettext awareness. #endif /* __UCLIBC_MJN3_ONLY__ */ @@ -66,7 +59,19 @@ libc_hidden_proto(fprintf) GNU application programs can use a third alternative mode in which they can distinguish the relative order of options and other arguments. */ -#include "getopt.h" +#include <getopt.h> + +libc_hidden_proto(strchr) +libc_hidden_proto(strcmp) +libc_hidden_proto(strlen) +libc_hidden_proto(strncmp) +libc_hidden_proto(getenv) +libc_hidden_proto(fprintf) +libc_hidden_proto(optarg) +libc_hidden_proto(opterr) +libc_hidden_proto(optind) +libc_hidden_proto(optopt) +libc_hidden_proto(stderr) extern int _getopt_internal (int argc, char *const *argv, const char *optstring, const struct option *longopts, int *longind, int long_only) attribute_hidden; @@ -79,6 +84,7 @@ extern int _getopt_internal (int argc, char *const *argv, const char *optstring, each non-option ARGV-element is returned here. */ char *optarg = NULL; +libc_hidden_def(optarg) /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller @@ -94,17 +100,20 @@ char *optarg = NULL; /* 1003.2 says this must be 1 before any call. */ int optind = 1; +libc_hidden_def(optind) /* Callers store zero here to inhibit the error message for unrecognized options. */ int opterr = 1; +libc_hidden_def(opterr) /* Set to an option character which was unrecognized. This must be initialized on some systems to avoid linking in the system's own getopt implementation. */ int optopt = '?'; +libc_hidden_def(optopt) /* The next char to be scanned in the option-element in which the last option character we returned was found. diff --git a/libc/unistd/getpass.c b/libc/unistd/getpass.c index 5833bc317..455838c62 100644 --- a/libc/unistd/getpass.c +++ b/libc/unistd/getpass.c @@ -35,6 +35,8 @@ libc_hidden_proto(fputs) libc_hidden_proto(fputc) libc_hidden_proto(putc) libc_hidden_proto(__fputc_unlocked) +libc_hidden_proto(stdin) +libc_hidden_proto(stderr) /* It is desirable to use this bit on systems that have it. The only bit of terminal state we want to twiddle is echoing, which is diff --git a/libc/unistd/usershell.c b/libc/unistd/usershell.c index 51330ae78..ab84fe9f5 100644 --- a/libc/unistd/usershell.c +++ b/libc/unistd/usershell.c @@ -47,6 +47,11 @@ 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 |