diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/csu/common/crtend.c | 33 | ||||
-rw-r--r-- | lib/libc/alpha/SYS.h | 4 | ||||
-rw-r--r-- | lib/libc/compat-43/creat.c | 2 | ||||
-rw-r--r-- | lib/libc/gen/pause.c | 2 | ||||
-rw-r--r-- | lib/libc/gen/sleep.c | 2 | ||||
-rw-r--r-- | lib/libc/gen/termios.c | 2 | ||||
-rw-r--r-- | lib/libc/gen/wait.c | 2 | ||||
-rw-r--r-- | lib/libc/gen/waitpid.c | 2 | ||||
-rw-r--r-- | lib/libc/i386/SYS.h | 4 | ||||
-rw-r--r-- | lib/libc/net/name6.c | 2 | ||||
-rw-r--r-- | lib/libc/stdlib/system.c | 2 |
11 files changed, 15 insertions, 42 deletions
diff --git a/lib/csu/common/crtend.c b/lib/csu/common/crtend.c deleted file mode 100644 index 4b33f0c7bb4fc..0000000000000 --- a/lib/csu/common/crtend.c +++ /dev/null @@ -1,33 +0,0 @@ -/*- - * Copyright 1996-1998 John D. Polstra. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $FreeBSD$ - */ - -#include <sys/cdefs.h> - -typedef void (*fptr)(void); - -static fptr ctor_end[1] __attribute__((section(".ctors"))) __unused = { 0 }; -static fptr dtor_end[1] __attribute__((section(".dtors"))) __unused = { 0 }; diff --git a/lib/libc/alpha/SYS.h b/lib/libc/alpha/SYS.h index 8e14e925733ef..923300b6afc7e 100644 --- a/lib/libc/alpha/SYS.h +++ b/lib/libc/alpha/SYS.h @@ -104,14 +104,10 @@ END(___CONCAT(_thread_sys_,name)) #define PSYSCALL(name) \ PLEAF(name,0); /* XXX # of args? */ \ - WEAK_ALIAS(__CONCAT(_,name), __CONCAT(_thread_sys_,name)); \ - WEAK_ALIAS(name, __CONCAT(_,name)); \ CALLSYS_ERROR(name) #define PRSYSCALL(name) \ PLEAF(name,0); /* XXX # of args? */ \ - WEAK_ALIAS(__CONCAT(_,name), __CONCAT(_thread_sys_,name)); \ - WEAK_ALIAS(name, __CONCAT(_,name)); \ CALLSYS_ERROR(name) \ RET; \ PEND(name) diff --git a/lib/libc/compat-43/creat.c b/lib/libc/compat-43/creat.c index 3d1730517e022..42759e7d93899 100644 --- a/lib/libc/compat-43/creat.c +++ b/lib/libc/compat-43/creat.c @@ -51,4 +51,6 @@ __creat(path, mode) return(_open(path, O_WRONLY|O_CREAT|O_TRUNC, mode)); } +#ifndef _THREAD_SAFE __weak_reference(__creat, creat); +#endif diff --git a/lib/libc/gen/pause.c b/lib/libc/gen/pause.c index 3327c9689406b..f7ddb1805b2f1 100644 --- a/lib/libc/gen/pause.c +++ b/lib/libc/gen/pause.c @@ -49,4 +49,6 @@ __pause() return sigpause(sigblock(0L)); } +#ifndef _THREAD_SAFE __weak_reference(__pause, pause); +#endif diff --git a/lib/libc/gen/sleep.c b/lib/libc/gen/sleep.c index 2508e9a21e0a3..e4c4fbdc494c7 100644 --- a/lib/libc/gen/sleep.c +++ b/lib/libc/gen/sleep.c @@ -68,4 +68,6 @@ __sleep(seconds) (time_remaining.tv_nsec != 0)); /* round up */ } +#ifndef _THREAD_SAFE __weak_reference(__sleep, sleep); +#endif diff --git a/lib/libc/gen/termios.c b/lib/libc/gen/termios.c index 466827e6106f8..f321876e94301 100644 --- a/lib/libc/gen/termios.c +++ b/lib/libc/gen/termios.c @@ -195,7 +195,9 @@ __tcdrain(fd) return (ioctl(fd, TIOCDRAIN, 0)); } +#ifndef _THREAD_SAFE __weak_reference(__tcdrain, tcdrain); +#endif int tcflush(fd, which) diff --git a/lib/libc/gen/wait.c b/lib/libc/gen/wait.c index 2f9ca6eb2f5cc..366e2623b44ea 100644 --- a/lib/libc/gen/wait.c +++ b/lib/libc/gen/wait.c @@ -49,4 +49,6 @@ __wait(istat) return (wait4(WAIT_ANY, istat, 0, (struct rusage *)0)); } +#ifndef _THREAD_SAFE __weak_reference(__wait, wait); +#endif diff --git a/lib/libc/gen/waitpid.c b/lib/libc/gen/waitpid.c index 3f679a7ebea73..350157a9c393e 100644 --- a/lib/libc/gen/waitpid.c +++ b/lib/libc/gen/waitpid.c @@ -55,4 +55,6 @@ __waitpid(pid, istat, options) return (wait4(pid, istat, options, (struct rusage *)0)); } +#ifndef _THREAD_SAFE __weak_reference(__waitpid, waitpid); +#endif diff --git a/lib/libc/i386/SYS.h b/lib/libc/i386/SYS.h index 155672f6bb82f..cadbecb1b31a2 100644 --- a/lib/libc/i386/SYS.h +++ b/lib/libc/i386/SYS.h @@ -73,10 +73,6 @@ */ #define PSYSCALL(x) 2: PIC_PROLOGUE; jmp PIC_PLT(HIDENAME(cerror)); \ ENTRY(__CONCAT(_thread_sys_,x)); \ - .weak CNAME(__CONCAT(_,x)); \ - .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(_thread_sys_,x));\ - .weak CNAME(x); \ - .set CNAME(x),CNAME(__CONCAT(_,x)); \ lea __CONCAT(SYS_,x),%eax; KERNCALL; jb 2b #define PRSYSCALL(x) PSYSCALL(x); ret #define PPSEUDO(x,y) ENTRY(__CONCAT(_thread_sys_,x)); \ diff --git a/lib/libc/net/name6.c b/lib/libc/net/name6.c index 35039e0beb69c..e87f40fbed2be 100644 --- a/lib/libc/net/name6.c +++ b/lib/libc/net/name6.c @@ -840,7 +840,7 @@ _files_ghbyaddr(const void *addr, int addrlen, int af, int *errp) static struct hostent * _nis_ghbyname(const char *name, int af, int *errp) { - struct hostent *hp; + struct hostent *hp = NULL; if (af == AF_INET) { hp = _gethostbynisname(name, af); diff --git a/lib/libc/stdlib/system.c b/lib/libc/stdlib/system.c index 236a8b0cc2ee3..c7e68bae69b72 100644 --- a/lib/libc/stdlib/system.c +++ b/lib/libc/stdlib/system.c @@ -94,4 +94,6 @@ __system(command) return(pid == -1 ? -1 : pstat); } +#ifndef _THREAD_SAFE __weak_reference(__system, system); +#endif |