diff options
Diffstat (limited to 'libc')
-rw-r--r-- | libc/inet/resolv.c | 1 | ||||
-rw-r--r-- | libc/inet/rpc/ruserpass.c | 1 | ||||
-rw-r--r-- | libc/misc/internals/tempname.c | 4 | ||||
-rw-r--r-- | libc/misc/regex/regex.c | 1 | ||||
-rw-r--r-- | libc/misc/time/time.c | 1 | ||||
-rw-r--r-- | libc/misc/wchar/wchar.c | 1 | ||||
-rw-r--r-- | libc/stdlib/realpath.c | 1 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/gethstnm.c | 37 | ||||
-rw-r--r-- | libc/sysdeps/linux/mips/__syscall_error.c | 18 | ||||
-rw-r--r-- | libc/sysdeps/linux/mips/clone.S | 1 | ||||
-rw-r--r-- | libc/sysdeps/linux/mips/sys/asm.h | 15 |
11 files changed, 36 insertions, 45 deletions
diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c index b09684ce4..6d6d18a96 100644 --- a/libc/inet/resolv.c +++ b/libc/inet/resolv.c @@ -136,7 +136,6 @@ #define __FORCE_GLIBC #include <features.h> #include <string.h> -#include <strings.h> #include <stdio.h> #include <signal.h> #include <errno.h> diff --git a/libc/inet/rpc/ruserpass.c b/libc/inet/rpc/ruserpass.c index 0adcbf1d3..97f1284b3 100644 --- a/libc/inet/rpc/ruserpass.c +++ b/libc/inet/rpc/ruserpass.c @@ -40,7 +40,6 @@ #include <stdio_ext.h> #include <stdlib.h> #include <string.h> -#include <strings.h> #include <unistd.h> libc_hidden_proto(strcat) diff --git a/libc/misc/internals/tempname.c b/libc/misc/internals/tempname.c index dc125020b..0883259bd 100644 --- a/libc/misc/internals/tempname.c +++ b/libc/misc/internals/tempname.c @@ -45,8 +45,8 @@ #include <sys/time.h> #include "tempname.h" -libc_hidden_proto(strlen) -libc_hidden_proto(strcmp) +/* Experimentally off - libc_hidden_proto(strlen) */ +/* Experimentally off - libc_hidden_proto(strcmp) */ libc_hidden_proto(sprintf) libc_hidden_proto(mkdir) libc_hidden_proto(open) diff --git a/libc/misc/regex/regex.c b/libc/misc/regex/regex.c index 192034b4e..f39492bdf 100644 --- a/libc/misc/regex/regex.c +++ b/libc/misc/regex/regex.c @@ -36,7 +36,6 @@ #include <stdbool.h> #include <stdint.h> #include <string.h> -#include <strings.h> #include <stdlib.h> #ifdef __UCLIBC_HAS_WCHAR__ #define RE_ENABLE_I18N diff --git a/libc/misc/time/time.c b/libc/misc/time/time.c index 93afa9b68..b5278bce1 100644 --- a/libc/misc/time/time.c +++ b/libc/misc/time/time.c @@ -133,7 +133,6 @@ #include <stdlib.h> #include <stddef.h> #include <string.h> -#include <strings.h> #include <time.h> #include <sys/time.h> #include <limits.h> diff --git a/libc/misc/wchar/wchar.c b/libc/misc/wchar/wchar.c index 32ad41ee6..64bab37e0 100644 --- a/libc/misc/wchar/wchar.c +++ b/libc/misc/wchar/wchar.c @@ -1191,7 +1191,6 @@ typedef struct { #include <iconv.h> #include <string.h> -#include <strings.h> #include <endian.h> #include <byteswap.h> diff --git a/libc/stdlib/realpath.c b/libc/stdlib/realpath.c index aae8580a5..b28d6f07e 100644 --- a/libc/stdlib/realpath.c +++ b/libc/stdlib/realpath.c @@ -14,7 +14,6 @@ #include <unistd.h> #include <stdio.h> #include <string.h> -#include <strings.h> #include <limits.h> /* for PATH_MAX */ #include <sys/param.h> /* for MAXPATHLEN */ #include <errno.h> diff --git a/libc/sysdeps/linux/common/gethstnm.c b/libc/sysdeps/linux/common/gethstnm.c deleted file mode 100644 index fc5a72c8d..000000000 --- a/libc/sysdeps/linux/common/gethstnm.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org> - * - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. - */ - -#include <string.h> -#include <unistd.h> -#include <sys/utsname.h> -#include <errno.h> - -libc_hidden_proto(gethostname) - -libc_hidden_proto(strlen) -libc_hidden_proto(strcpy) -libc_hidden_proto(uname) - -int -gethostname(char *name, size_t len) -{ - struct utsname uts; - - if (name == NULL) { - __set_errno(EINVAL); - return -1; - } - - if (uname(&uts) == -1) return -1; - - if (strlen(uts.nodename)+1 > len) { - __set_errno(EINVAL); - return -1; - } - strcpy(name, uts.nodename); - return 0; -} -libc_hidden_def(gethostname) diff --git a/libc/sysdeps/linux/mips/__syscall_error.c b/libc/sysdeps/linux/mips/__syscall_error.c new file mode 100644 index 000000000..5e109a83b --- /dev/null +++ b/libc/sysdeps/linux/mips/__syscall_error.c @@ -0,0 +1,18 @@ +/* Wrapper for setting errno. + * + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org> + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ + +#include <errno.h> +#include <features.h> + +/* This routine is jumped to by all the syscall handlers, to stash + * an error number into errno. */ +int __syscall_error(int err_no) attribute_hidden; +int __syscall_error(int err_no) +{ + __set_errno(err_no); + return -1; +} diff --git a/libc/sysdeps/linux/mips/clone.S b/libc/sysdeps/linux/mips/clone.S index 716cd993f..03162db43 100644 --- a/libc/sysdeps/linux/mips/clone.S +++ b/libc/sysdeps/linux/mips/clone.S @@ -125,3 +125,4 @@ __thread_start: move a0,v0 jal HIDDEN_JUMPTARGET(_exit) .end __thread_start +weak_alias(clone, __clone) diff --git a/libc/sysdeps/linux/mips/sys/asm.h b/libc/sysdeps/linux/mips/sys/asm.h index 76f6af3e1..4c8bd9cb2 100644 --- a/libc/sysdeps/linux/mips/sys/asm.h +++ b/libc/sysdeps/linux/mips/sys/asm.h @@ -469,5 +469,20 @@ symbol = value # define MFC0 dmfc0 # define MTC0 dmtc0 #endif +/* The MIPS archtectures do not have a uniform memory model. Particular + platforms may provide additional guarantees - for instance, the R4000 + LL and SC instructions implicitly perform a SYNC, and the 4K promises + strong ordering. + + However, in the absence of those guarantees, we must assume weak ordering + and SYNC explicitly where necessary. + + Some obsolete MIPS processors may not support the SYNC instruction. This + applies to "true" MIPS I processors; most of the processors which compile + using MIPS I implement parts of MIPS II. */ + +#ifndef MIPS_SYNC +# define MIPS_SYNC sync +#endif #endif /* sys/asm.h */ |