summaryrefslogtreecommitdiff
path: root/lib/libc/gen
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/gen')
-rw-r--r--lib/libc/gen/exec.c5
-rw-r--r--lib/libc/gen/getdomainname.c3
-rw-r--r--lib/libc/gen/getgrouplist.c3
-rw-r--r--lib/libc/gen/gethostname.c3
-rw-r--r--lib/libc/gen/getlogin.c3
-rw-r--r--lib/libc/gen/getpagesize.c3
-rw-r--r--lib/libc/gen/initgroups.c3
-rw-r--r--lib/libc/gen/isatty.c4
-rw-r--r--lib/libc/gen/sysconf.c3
-rw-r--r--lib/libc/gen/ttyname.c11
10 files changed, 27 insertions, 14 deletions
diff --git a/lib/libc/gen/exec.c b/lib/libc/gen/exec.c
index 1e2f7d97dd2..73297ae9a79 100644
--- a/lib/libc/gen/exec.c
+++ b/lib/libc/gen/exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec.c,v 1.21 2013/09/30 12:02:33 millert Exp $ */
+/* $OpenBSD: exec.c,v 1.22 2015/09/12 14:56:50 guenther Exp $ */
/*-
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
@@ -67,6 +67,7 @@ execl(const char *name, const char *arg, ...)
va_end(ap);
return (execve(name, argv, environ));
}
+DEF_WEAK(execl);
int
execle(const char *name, const char *arg, ...)
@@ -242,10 +243,12 @@ retry: (void)execve(bp, argv, envp);
done:
return (-1);
}
+DEF_WEAK(execvpe);
int
execvp(const char *name, char *const *argv)
{
return execvpe(name, argv, environ);
}
+DEF_WEAK(execvp);
diff --git a/lib/libc/gen/getdomainname.c b/lib/libc/gen/getdomainname.c
index 83aaf9449b3..b0d8dcf0ed0 100644
--- a/lib/libc/gen/getdomainname.c
+++ b/lib/libc/gen/getdomainname.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getdomainname.c,v 1.8 2015/01/14 23:03:50 deraadt Exp $ */
+/* $OpenBSD: getdomainname.c,v 1.9 2015/09/12 14:56:50 guenther Exp $ */
/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
@@ -45,3 +45,4 @@ getdomainname(char *name, size_t namelen)
return (-1);
return (0);
}
+DEF_WEAK(getdomainname);
diff --git a/lib/libc/gen/getgrouplist.c b/lib/libc/gen/getgrouplist.c
index 79f6da75e8b..7a904a2fd9a 100644
--- a/lib/libc/gen/getgrouplist.c
+++ b/lib/libc/gen/getgrouplist.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getgrouplist.c,v 1.25 2015/06/03 02:24:36 millert Exp $ */
+/* $OpenBSD: getgrouplist.c,v 1.26 2015/09/12 14:56:50 guenther Exp $ */
/*
* Copyright (c) 2008 Ingo Schwarze <schwarze@usta.de>
* Copyright (c) 1991, 1993
@@ -239,3 +239,4 @@ out:
*grpcnt = ngroups;
return (ret);
}
+DEF_WEAK(getgrouplist);
diff --git a/lib/libc/gen/gethostname.c b/lib/libc/gen/gethostname.c
index 4ae3439683e..aa1e4ce6cf3 100644
--- a/lib/libc/gen/gethostname.c
+++ b/lib/libc/gen/gethostname.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gethostname.c,v 1.8 2015/01/14 23:03:50 deraadt Exp $ */
+/* $OpenBSD: gethostname.c,v 1.9 2015/09/12 14:56:50 guenther Exp $ */
/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
@@ -45,3 +45,4 @@ gethostname(char *name, size_t namelen)
return (-1);
return (0);
}
+DEF_WEAK(gethostname);
diff --git a/lib/libc/gen/getlogin.c b/lib/libc/gen/getlogin.c
index 6ec91052a19..ff2837ae99d 100644
--- a/lib/libc/gen/getlogin.c
+++ b/lib/libc/gen/getlogin.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getlogin.c,v 1.12 2013/09/30 12:02:33 millert Exp $ */
+/* $OpenBSD: getlogin.c,v 1.13 2015/09/12 14:56:50 guenther Exp $ */
/*
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
@@ -83,6 +83,7 @@ getlogin_r(char *name, size_t namelen)
_THREAD_PRIVATE_MUTEX_UNLOCK(logname);
return 0;
}
+DEF_WEAK(getlogin_r);
int
setlogin(const char *name)
diff --git a/lib/libc/gen/getpagesize.c b/lib/libc/gen/getpagesize.c
index 37d02554b97..3c81d64209e 100644
--- a/lib/libc/gen/getpagesize.c
+++ b/lib/libc/gen/getpagesize.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getpagesize.c,v 1.7 2015/01/14 23:03:50 deraadt Exp $ */
+/* $OpenBSD: getpagesize.c,v 1.8 2015/09/12 14:56:50 guenther Exp $ */
/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
@@ -49,3 +49,4 @@ getpagesize(void)
}
return (pagsz);
}
+DEF_WEAK(getpagesize);
diff --git a/lib/libc/gen/initgroups.c b/lib/libc/gen/initgroups.c
index 9d7727a9c2b..b8c32ad653e 100644
--- a/lib/libc/gen/initgroups.c
+++ b/lib/libc/gen/initgroups.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: initgroups.c,v 1.9 2015/01/16 16:48:51 deraadt Exp $ */
+/* $OpenBSD: initgroups.c,v 1.10 2015/09/12 14:56:50 guenther Exp $ */
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
@@ -45,3 +45,4 @@ initgroups(const char *uname, gid_t agroup)
return (-1);
return (0);
}
+DEF_WEAK(initgroups);
diff --git a/lib/libc/gen/isatty.c b/lib/libc/gen/isatty.c
index c0b543698db..ba45a987738 100644
--- a/lib/libc/gen/isatty.c
+++ b/lib/libc/gen/isatty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isatty.c,v 1.10 2015/05/17 01:56:02 deraadt Exp $ */
+/* $OpenBSD: isatty.c,v 1.11 2015/09/12 14:56:50 guenther Exp $ */
/*
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
@@ -29,9 +29,11 @@
*/
#include <fcntl.h>
+#include <unistd.h>
int
isatty(int fd)
{
return fcntl(fd, F_ISATTY) != -1;
}
+DEF_WEAK(isatty);
diff --git a/lib/libc/gen/sysconf.c b/lib/libc/gen/sysconf.c
index bdf99a17711..3f39418f026 100644
--- a/lib/libc/gen/sysconf.c
+++ b/lib/libc/gen/sysconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sysconf.c,v 1.22 2015/01/16 18:18:58 millert Exp $ */
+/* $OpenBSD: sysconf.c,v 1.23 2015/09/12 14:56:50 guenther Exp $ */
/*-
* Copyright (c) 1993
* The Regents of the University of California. All rights reserved.
@@ -468,3 +468,4 @@ sysconf(int name)
}
return (sysctl(mib, namelen, &value, &len, NULL, 0) == -1 ? -1 : value);
}
+DEF_WEAK(sysconf);
diff --git a/lib/libc/gen/ttyname.c b/lib/libc/gen/ttyname.c
index e8a27d64479..f54ddf09d30 100644
--- a/lib/libc/gen/ttyname.c
+++ b/lib/libc/gen/ttyname.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ttyname.c,v 1.14 2015/06/19 23:54:15 jca Exp $ */
+/* $OpenBSD: ttyname.c,v 1.15 2015/09/12 14:56:50 guenther Exp $ */
/*
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
@@ -42,7 +42,7 @@
#include "thread_private.h"
static char buf[TTY_NAME_MAX];
-static int oldttyname(int, struct stat *, char *, size_t);
+static int oldttyname(struct stat *, char *, size_t);
char *
ttyname(int fd)
@@ -62,6 +62,7 @@ ttyname(int fd)
return bufp;
}
+DEF_WEAK(ttyname);
int
ttyname_r(int fd, char *buf, size_t len)
@@ -106,12 +107,12 @@ ttyname_r(int fd, char *buf, size_t len)
}
(void)(db->close)(db);
}
- return (oldttyname(fd, &sb, buf, len));
+ return (oldttyname(&sb, buf, len));
}
+DEF_WEAK(ttyname_r);
-/* ARGSUSED */
static int
-oldttyname(int fd, struct stat *sb, char *buf, size_t len)
+oldttyname(struct stat *sb, char *buf, size_t len)
{
struct dirent *dirp;
DIR *dp;