summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2015-08-31 02:53:56 +0000
committerguenther <guenther@openbsd.org>2015-08-31 02:53:56 +0000
commit9b9d2a55a62c8e82206c25f94fcc7f4e2765250e (patch)
tree4e1fa28e81f1f4b2467c7facbde18ea61addb735 /lib/libc/stdio
parentspaces snuck in (diff)
downloadwireguard-openbsd-9b9d2a55a62c8e82206c25f94fcc7f4e2765250e.tar.xz
wireguard-openbsd-9b9d2a55a62c8e82206c25f94fcc7f4e2765250e.zip
Add framework for resolving (pun intended) libc namespace issues, using
wrapper .h files and asm labels to let internal calls resolve directly and not be overridable or use the PLT. Then, apply that framework to most of the functions in stdio.h, string.h, err.h, and wchar.h. Delete the should-have-been-hidden-all-along _v?(err|warn)[cx]? symbols while here. tests clean on i386, amd64, sparc64, powerpc, and mips64 naming feedback from kettenis@ and millert@ ok kettenis@
Diffstat (limited to 'lib/libc/stdio')
-rw-r--r--lib/libc/stdio/asprintf.c4
-rw-r--r--lib/libc/stdio/clrerr.c3
-rw-r--r--lib/libc/stdio/dprintf.c3
-rw-r--r--lib/libc/stdio/fclose.c3
-rw-r--r--lib/libc/stdio/fdopen.c3
-rw-r--r--lib/libc/stdio/feof.c3
-rw-r--r--lib/libc/stdio/ferror.c3
-rw-r--r--lib/libc/stdio/fflush.c3
-rw-r--r--lib/libc/stdio/fgetc.c3
-rw-r--r--lib/libc/stdio/fgetln.c3
-rw-r--r--lib/libc/stdio/fgetpos.c3
-rw-r--r--lib/libc/stdio/fgets.c3
-rw-r--r--lib/libc/stdio/fgetwc.c3
-rw-r--r--lib/libc/stdio/fgetws.c3
-rw-r--r--lib/libc/stdio/fileno.c3
-rw-r--r--lib/libc/stdio/fmemopen.c3
-rw-r--r--lib/libc/stdio/fopen.c3
-rw-r--r--lib/libc/stdio/fprintf.c4
-rw-r--r--lib/libc/stdio/fpurge.c3
-rw-r--r--lib/libc/stdio/fputc.c3
-rw-r--r--lib/libc/stdio/fputs.c3
-rw-r--r--lib/libc/stdio/fputwc.c3
-rw-r--r--lib/libc/stdio/fputws.c3
-rw-r--r--lib/libc/stdio/fread.c3
-rw-r--r--lib/libc/stdio/freopen.c3
-rw-r--r--lib/libc/stdio/fscanf.c4
-rw-r--r--lib/libc/stdio/fseek.c4
-rw-r--r--lib/libc/stdio/fsetpos.c3
-rw-r--r--lib/libc/stdio/ftell.c4
-rw-r--r--lib/libc/stdio/funopen.c3
-rw-r--r--lib/libc/stdio/fwide.c3
-rw-r--r--lib/libc/stdio/fwprintf.c3
-rw-r--r--lib/libc/stdio/fwrite.c3
-rw-r--r--lib/libc/stdio/fwscanf.c3
-rw-r--r--lib/libc/stdio/getc.c4
-rw-r--r--lib/libc/stdio/getchar.c4
-rw-r--r--lib/libc/stdio/getdelim.c3
-rw-r--r--lib/libc/stdio/getline.c3
-rw-r--r--lib/libc/stdio/getw.c3
-rw-r--r--lib/libc/stdio/getwc.c3
-rw-r--r--lib/libc/stdio/getwchar.c3
-rw-r--r--lib/libc/stdio/mktemp.c4
-rw-r--r--lib/libc/stdio/open_memstream.c3
-rw-r--r--lib/libc/stdio/open_wmemstream.c3
-rw-r--r--lib/libc/stdio/perror.c3
-rw-r--r--lib/libc/stdio/printf.c4
-rw-r--r--lib/libc/stdio/putc.c4
-rw-r--r--lib/libc/stdio/putchar.c4
-rw-r--r--lib/libc/stdio/puts.c3
-rw-r--r--lib/libc/stdio/putw.c3
-rw-r--r--lib/libc/stdio/putwc.c3
-rw-r--r--lib/libc/stdio/putwchar.c3
-rw-r--r--lib/libc/stdio/remove.c3
-rw-r--r--lib/libc/stdio/rewind.c3
-rw-r--r--lib/libc/stdio/rget.c3
-rw-r--r--lib/libc/stdio/scanf.c4
-rw-r--r--lib/libc/stdio/setbuf.c3
-rw-r--r--lib/libc/stdio/setbuffer.c4
-rw-r--r--lib/libc/stdio/setvbuf.c3
-rw-r--r--lib/libc/stdio/snprintf.c4
-rw-r--r--lib/libc/stdio/sscanf.c5
-rw-r--r--lib/libc/stdio/swprintf.c3
-rw-r--r--lib/libc/stdio/swscanf.c3
-rw-r--r--lib/libc/stdio/tempnam.c4
-rw-r--r--lib/libc/stdio/tmpfile.c3
-rw-r--r--lib/libc/stdio/tmpnam.c4
-rw-r--r--lib/libc/stdio/ungetc.c3
-rw-r--r--lib/libc/stdio/ungetwc.c3
-rw-r--r--lib/libc/stdio/vasprintf.c3
-rw-r--r--lib/libc/stdio/vdprintf.c3
-rw-r--r--lib/libc/stdio/vfprintf.c3
-rw-r--r--lib/libc/stdio/vfscanf.c3
-rw-r--r--lib/libc/stdio/vfwprintf.c3
-rw-r--r--lib/libc/stdio/vfwscanf.c3
-rw-r--r--lib/libc/stdio/vprintf.c3
-rw-r--r--lib/libc/stdio/vscanf.c3
-rw-r--r--lib/libc/stdio/vsnprintf.c3
-rw-r--r--lib/libc/stdio/vsscanf.c4
-rw-r--r--lib/libc/stdio/vswprintf.c3
-rw-r--r--lib/libc/stdio/vswscanf.c3
-rw-r--r--lib/libc/stdio/vwprintf.c3
-rw-r--r--lib/libc/stdio/vwscanf.c3
-rw-r--r--lib/libc/stdio/wbuf.c3
-rw-r--r--lib/libc/stdio/wprintf.c3
-rw-r--r--lib/libc/stdio/wscanf.c3
85 files changed, 174 insertions, 100 deletions
diff --git a/lib/libc/stdio/asprintf.c b/lib/libc/stdio/asprintf.c
index 861bb0a797d..bd12726fbf0 100644
--- a/lib/libc/stdio/asprintf.c
+++ b/lib/libc/stdio/asprintf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: asprintf.c,v 1.20 2015/08/20 21:49:29 deraadt Exp $ */
+/* $OpenBSD: asprintf.c,v 1.21 2015/08/31 02:53:57 guenther Exp $ */
/*
* Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -23,7 +23,6 @@
#include <stdarg.h>
#include "local.h"
-/* PRINTFLIKE2 */
int
asprintf(char **str, const char *fmt, ...)
{
@@ -61,3 +60,4 @@ err:
errno = ENOMEM;
return (-1);
}
+DEF_WEAK(asprintf);
diff --git a/lib/libc/stdio/clrerr.c b/lib/libc/stdio/clrerr.c
index ac08c72cd11..8ee1bb1ff45 100644
--- a/lib/libc/stdio/clrerr.c
+++ b/lib/libc/stdio/clrerr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clrerr.c,v 1.9 2009/11/09 00:18:27 kurt Exp $ */
+/* $OpenBSD: clrerr.c,v 1.10 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -42,3 +42,4 @@ clearerr(FILE *fp)
__sclearerr(fp);
FUNLOCKFILE(fp);
}
+DEF_STRONG(clearerr);
diff --git a/lib/libc/stdio/dprintf.c b/lib/libc/stdio/dprintf.c
index dbf7d3457ff..e8e7f5453e9 100644
--- a/lib/libc/stdio/dprintf.c
+++ b/lib/libc/stdio/dprintf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dprintf.c,v 1.1 2013/01/30 00:08:13 brad Exp $ */
+/* $OpenBSD: dprintf.c,v 1.2 2015/08/31 02:53:57 guenther Exp $ */
/* $FreeBSD: src/lib/libc/stdio/dprintf.c,v 1.2 2012/11/17 01:49:39 svnexp Exp $ */
/*-
@@ -46,3 +46,4 @@ dprintf(int fd, const char * __restrict fmt, ...)
va_end(ap);
return ret;
}
+DEF_WEAK(dprintf);
diff --git a/lib/libc/stdio/fclose.c b/lib/libc/stdio/fclose.c
index c72af540586..4bd162abc84 100644
--- a/lib/libc/stdio/fclose.c
+++ b/lib/libc/stdio/fclose.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fclose.c,v 1.9 2009/11/09 00:18:27 kurt Exp $ */
+/* $OpenBSD: fclose.c,v 1.10 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -61,3 +61,4 @@ fclose(FILE *fp)
FUNLOCKFILE(fp);
return (r);
}
+DEF_STRONG(fclose);
diff --git a/lib/libc/stdio/fdopen.c b/lib/libc/stdio/fdopen.c
index 1c0c8132fd2..f98cffac8c3 100644
--- a/lib/libc/stdio/fdopen.c
+++ b/lib/libc/stdio/fdopen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fdopen.c,v 1.7 2014/08/31 02:21:18 guenther Exp $ */
+/* $OpenBSD: fdopen.c,v 1.8 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -89,3 +89,4 @@ fdopen(int fd, const char *mode)
fp->_close = __sclose;
return (fp);
}
+DEF_WEAK(fdopen);
diff --git a/lib/libc/stdio/feof.c b/lib/libc/stdio/feof.c
index 0036bab7d0e..0d6718a68c4 100644
--- a/lib/libc/stdio/feof.c
+++ b/lib/libc/stdio/feof.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: feof.c,v 1.8 2009/11/09 00:18:27 kurt Exp $ */
+/* $OpenBSD: feof.c,v 1.9 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -49,3 +49,4 @@ feof(FILE *fp)
FUNLOCKFILE(fp);
return (ret);
}
+DEF_STRONG(feof);
diff --git a/lib/libc/stdio/ferror.c b/lib/libc/stdio/ferror.c
index 00b9c8b2c68..61c86b52ca6 100644
--- a/lib/libc/stdio/ferror.c
+++ b/lib/libc/stdio/ferror.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ferror.c,v 1.8 2009/11/09 00:18:27 kurt Exp $ */
+/* $OpenBSD: ferror.c,v 1.9 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -49,3 +49,4 @@ ferror(FILE *fp)
FUNLOCKFILE(fp);
return (ret);
}
+DEF_STRONG(ferror);
diff --git a/lib/libc/stdio/fflush.c b/lib/libc/stdio/fflush.c
index 3e30f1086ff..fd1a4b3504b 100644
--- a/lib/libc/stdio/fflush.c
+++ b/lib/libc/stdio/fflush.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fflush.c,v 1.8 2009/11/09 00:18:27 kurt Exp $ */
+/* $OpenBSD: fflush.c,v 1.9 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -52,6 +52,7 @@ fflush(FILE *fp)
FUNLOCKFILE(fp);
return (r);
}
+DEF_STRONG(fflush);
int
__sflush(FILE *fp)
diff --git a/lib/libc/stdio/fgetc.c b/lib/libc/stdio/fgetc.c
index c5d7dde2d06..bfe9266953c 100644
--- a/lib/libc/stdio/fgetc.c
+++ b/lib/libc/stdio/fgetc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fgetc.c,v 1.8 2009/11/09 00:18:27 kurt Exp $ */
+/* $OpenBSD: fgetc.c,v 1.9 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -38,3 +38,4 @@ fgetc(FILE *fp)
{
return (getc(fp));
}
+DEF_STRONG(fgetc);
diff --git a/lib/libc/stdio/fgetln.c b/lib/libc/stdio/fgetln.c
index 1109cf25c01..ae2eb10f96c 100644
--- a/lib/libc/stdio/fgetln.c
+++ b/lib/libc/stdio/fgetln.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fgetln.c,v 1.13 2015/01/05 21:58:52 millert Exp $ */
+/* $OpenBSD: fgetln.c,v 1.14 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -142,3 +142,4 @@ error:
*lenp = 0;
return (NULL);
}
+DEF_WEAK(fgetln);
diff --git a/lib/libc/stdio/fgetpos.c b/lib/libc/stdio/fgetpos.c
index e6188e5a6b1..05ba0b005b1 100644
--- a/lib/libc/stdio/fgetpos.c
+++ b/lib/libc/stdio/fgetpos.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fgetpos.c,v 1.6 2005/08/08 08:05:36 espie Exp $ */
+/* $OpenBSD: fgetpos.c,v 1.7 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -41,3 +41,4 @@ fgetpos(FILE *fp, fpos_t *pos)
{
return((*pos = ftello(fp)) == (fpos_t)-1);
}
+DEF_STRONG(fgetpos);
diff --git a/lib/libc/stdio/fgets.c b/lib/libc/stdio/fgets.c
index 0ba8770e33b..5966c0bf903 100644
--- a/lib/libc/stdio/fgets.c
+++ b/lib/libc/stdio/fgets.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fgets.c,v 1.14 2009/11/09 00:18:27 kurt Exp $ */
+/* $OpenBSD: fgets.c,v 1.15 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -103,3 +103,4 @@ fgets(char *buf, int n, FILE *fp)
FUNLOCKFILE(fp);
return (buf);
}
+DEF_STRONG(fgets);
diff --git a/lib/libc/stdio/fgetwc.c b/lib/libc/stdio/fgetwc.c
index c16ffaf2997..6c850cc9680 100644
--- a/lib/libc/stdio/fgetwc.c
+++ b/lib/libc/stdio/fgetwc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fgetwc.c,v 1.4 2009/11/09 00:18:27 kurt Exp $ */
+/* $OpenBSD: fgetwc.c,v 1.5 2015/08/31 02:53:57 guenther Exp $ */
/* $NetBSD: fgetwc.c,v 1.3 2003/03/07 07:11:36 tshiozak Exp $ */
/*-
@@ -88,3 +88,4 @@ fgetwc(FILE *fp)
return (r);
}
+DEF_STRONG(fgetwc);
diff --git a/lib/libc/stdio/fgetws.c b/lib/libc/stdio/fgetws.c
index e8cd2490089..0e66552ea45 100644
--- a/lib/libc/stdio/fgetws.c
+++ b/lib/libc/stdio/fgetws.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fgetws.c,v 1.6 2009/11/09 00:18:27 kurt Exp $ */
+/* $OpenBSD: fgetws.c,v 1.7 2015/08/31 02:53:57 guenther Exp $ */
/* $NetBSD: fgetws.c,v 1.1 2003/03/07 07:11:37 tshiozak Exp $ */
/*-
@@ -77,3 +77,4 @@ error:
FUNLOCKFILE(fp);
return (NULL);
}
+DEF_STRONG(fgetws);
diff --git a/lib/libc/stdio/fileno.c b/lib/libc/stdio/fileno.c
index 58628da3c10..f7baee597a6 100644
--- a/lib/libc/stdio/fileno.c
+++ b/lib/libc/stdio/fileno.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fileno.c,v 1.8 2009/11/09 00:18:27 kurt Exp $ */
+/* $OpenBSD: fileno.c,v 1.9 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -49,3 +49,4 @@ fileno(FILE *fp)
FUNLOCKFILE(fp);
return (ret);
}
+DEF_WEAK(fileno);
diff --git a/lib/libc/stdio/fmemopen.c b/lib/libc/stdio/fmemopen.c
index 8cda0476340..00c27646b96 100644
--- a/lib/libc/stdio/fmemopen.c
+++ b/lib/libc/stdio/fmemopen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fmemopen.c,v 1.2 2013/03/27 15:06:25 mpi Exp $ */
+/* $OpenBSD: fmemopen.c,v 1.3 2015/08/31 02:53:57 guenther Exp $ */
/*
* Copyright (c) 2011 Martin Pieuchot <mpi@openbsd.org>
@@ -181,3 +181,4 @@ fmemopen(void *buf, size_t size, const char *mode)
return (fp);
}
+DEF_WEAK(fmemopen);
diff --git a/lib/libc/stdio/fopen.c b/lib/libc/stdio/fopen.c
index 14650523e08..6936321d643 100644
--- a/lib/libc/stdio/fopen.c
+++ b/lib/libc/stdio/fopen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fopen.c,v 1.7 2008/05/03 18:46:41 chl Exp $ */
+/* $OpenBSD: fopen.c,v 1.8 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -84,3 +84,4 @@ fopen(const char *file, const char *mode)
(void) __sseek((void *)fp, (fpos_t)0, SEEK_END);
return (fp);
}
+DEF_STRONG(fopen);
diff --git a/lib/libc/stdio/fprintf.c b/lib/libc/stdio/fprintf.c
index a391142ea25..abc04b01951 100644
--- a/lib/libc/stdio/fprintf.c
+++ b/lib/libc/stdio/fprintf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fprintf.c,v 1.7 2011/05/30 18:48:33 martynas Exp $ */
+/* $OpenBSD: fprintf.c,v 1.8 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -34,7 +34,6 @@
#include <stdio.h>
#include <stdarg.h>
-/* PRINTFLIKE2 */
int
fprintf(FILE *fp, const char *fmt, ...)
{
@@ -46,3 +45,4 @@ fprintf(FILE *fp, const char *fmt, ...)
va_end(ap);
return (ret);
}
+DEF_STRONG(fprintf);
diff --git a/lib/libc/stdio/fpurge.c b/lib/libc/stdio/fpurge.c
index 65bd74994f4..8dd8a916118 100644
--- a/lib/libc/stdio/fpurge.c
+++ b/lib/libc/stdio/fpurge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fpurge.c,v 1.9 2009/11/09 00:18:27 kurt Exp $ */
+/* $OpenBSD: fpurge.c,v 1.10 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -59,3 +59,4 @@ fpurge(FILE *fp)
FUNLOCKFILE(fp);
return (0);
}
+DEF_WEAK(fpurge);
diff --git a/lib/libc/stdio/fputc.c b/lib/libc/stdio/fputc.c
index 98e39603f04..de365c224f3 100644
--- a/lib/libc/stdio/fputc.c
+++ b/lib/libc/stdio/fputc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fputc.c,v 1.10 2009/11/09 00:18:27 kurt Exp $ */
+/* $OpenBSD: fputc.c,v 1.11 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -39,3 +39,4 @@ fputc(int c, FILE *fp)
{
return (putc(c, fp));
}
+DEF_STRONG(fputc);
diff --git a/lib/libc/stdio/fputs.c b/lib/libc/stdio/fputs.c
index ea8556a29cf..05ead5c83b6 100644
--- a/lib/libc/stdio/fputs.c
+++ b/lib/libc/stdio/fputs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fputs.c,v 1.10 2009/11/09 00:18:27 kurt Exp $ */
+/* $OpenBSD: fputs.c,v 1.11 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -56,3 +56,4 @@ fputs(const char *s, FILE *fp)
FUNLOCKFILE(fp);
return (ret);
}
+DEF_STRONG(fputs);
diff --git a/lib/libc/stdio/fputwc.c b/lib/libc/stdio/fputwc.c
index 9db70d061ae..fa3f3704445 100644
--- a/lib/libc/stdio/fputwc.c
+++ b/lib/libc/stdio/fputwc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fputwc.c,v 1.4 2009/11/09 00:18:27 kurt Exp $ */
+/* $OpenBSD: fputwc.c,v 1.5 2015/08/31 02:53:57 guenther Exp $ */
/* $NetBSD: fputwc.c,v 1.3 2003/03/07 07:11:37 tshiozak Exp $ */
/*-
@@ -86,3 +86,4 @@ fputwc(wchar_t wc, FILE *fp)
return (r);
}
+DEF_STRONG(fputwc);
diff --git a/lib/libc/stdio/fputws.c b/lib/libc/stdio/fputws.c
index 108846e7099..8961571188d 100644
--- a/lib/libc/stdio/fputws.c
+++ b/lib/libc/stdio/fputws.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fputws.c,v 1.7 2013/11/12 07:04:35 deraadt Exp $ */
+/* $OpenBSD: fputws.c,v 1.8 2015/08/31 02:53:57 guenther Exp $ */
/* $NetBSD: fputws.c,v 1.1 2003/03/07 07:11:37 tshiozak Exp $ */
/*-
@@ -55,3 +55,4 @@ fputws(ws, fp)
return (0);
}
+DEF_STRONG(fputws);
diff --git a/lib/libc/stdio/fread.c b/lib/libc/stdio/fread.c
index 6e957623e1f..35c73322a58 100644
--- a/lib/libc/stdio/fread.c
+++ b/lib/libc/stdio/fread.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fread.c,v 1.13 2014/12/08 20:40:53 tedu Exp $ */
+/* $OpenBSD: fread.c,v 1.14 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -101,3 +101,4 @@ fread(void *buf, size_t size, size_t count, FILE *fp)
FUNLOCKFILE(fp);
return (count);
}
+DEF_STRONG(fread);
diff --git a/lib/libc/stdio/freopen.c b/lib/libc/stdio/freopen.c
index 82717b1e26c..442370d870b 100644
--- a/lib/libc/stdio/freopen.c
+++ b/lib/libc/stdio/freopen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: freopen.c,v 1.14 2014/08/31 02:21:18 guenther Exp $ */
+/* $OpenBSD: freopen.c,v 1.15 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -169,3 +169,4 @@ freopen(const char *file, const char *mode, FILE *fp)
FUNLOCKFILE(fp);
return (fp);
}
+DEF_STRONG(freopen);
diff --git a/lib/libc/stdio/fscanf.c b/lib/libc/stdio/fscanf.c
index 5fd10d4a464..e401398d8eb 100644
--- a/lib/libc/stdio/fscanf.c
+++ b/lib/libc/stdio/fscanf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fscanf.c,v 1.10 2011/05/30 18:48:33 martynas Exp $ */
+/* $OpenBSD: fscanf.c,v 1.11 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -34,7 +34,6 @@
#include <stdio.h>
#include <stdarg.h>
-/* SCANFLIKE2 */
int
fscanf(FILE *fp, const char *fmt, ...)
{
@@ -46,3 +45,4 @@ fscanf(FILE *fp, const char *fmt, ...)
va_end(ap);
return (ret);
}
+DEF_STRONG(fscanf);
diff --git a/lib/libc/stdio/fseek.c b/lib/libc/stdio/fseek.c
index cdd40b62f8a..f2e975df69e 100644
--- a/lib/libc/stdio/fseek.c
+++ b/lib/libc/stdio/fseek.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fseek.c,v 1.11 2012/05/21 22:24:19 matthew Exp $ */
+/* $OpenBSD: fseek.c,v 1.12 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -243,9 +243,11 @@ dumb:
FUNLOCKFILE(fp);
return (0);
}
+DEF_WEAK(fseeko);
int
fseek(FILE *fp, long offset, int whence)
{
return (fseeko(fp, offset, whence));
}
+DEF_STRONG(fseek);
diff --git a/lib/libc/stdio/fsetpos.c b/lib/libc/stdio/fsetpos.c
index 9624fe56542..d389f5efa7f 100644
--- a/lib/libc/stdio/fsetpos.c
+++ b/lib/libc/stdio/fsetpos.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fsetpos.c,v 1.6 2005/08/08 08:05:36 espie Exp $ */
+/* $OpenBSD: fsetpos.c,v 1.7 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -41,3 +41,4 @@ fsetpos(FILE *iop, const fpos_t *pos)
{
return (fseeko(iop, (off_t)*pos, SEEK_SET));
}
+DEF_STRONG(fsetpos);
diff --git a/lib/libc/stdio/ftell.c b/lib/libc/stdio/ftell.c
index 0a2016ce10b..a75ebbbaad7 100644
--- a/lib/libc/stdio/ftell.c
+++ b/lib/libc/stdio/ftell.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ftell.c,v 1.10 2012/05/21 22:24:19 matthew Exp $ */
+/* $OpenBSD: ftell.c,v 1.11 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -83,6 +83,7 @@ ftello(FILE *fp)
out: FUNLOCKFILE(fp);
return (pos);
}
+DEF_WEAK(ftello);
long
ftell(FILE *fp)
@@ -94,3 +95,4 @@ ftell(FILE *fp)
}
return ((long)offset);
}
+DEF_STRONG(ftell);
diff --git a/lib/libc/stdio/funopen.c b/lib/libc/stdio/funopen.c
index b85ee96a1f7..b6fc464b4aa 100644
--- a/lib/libc/stdio/funopen.c
+++ b/lib/libc/stdio/funopen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: funopen.c,v 1.8 2005/08/08 08:05:36 espie Exp $ */
+/* $OpenBSD: funopen.c,v 1.9 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -66,3 +66,4 @@ funopen(const void *cookie, int (*readfn)(void *, char *, int),
fp->_close = closefn;
return (fp);
}
+DEF_WEAK(funopen);
diff --git a/lib/libc/stdio/fwide.c b/lib/libc/stdio/fwide.c
index 93cddc68e9d..27ca0f8ac59 100644
--- a/lib/libc/stdio/fwide.c
+++ b/lib/libc/stdio/fwide.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fwide.c,v 1.4 2009/11/09 00:18:27 kurt Exp $ */
+/* $OpenBSD: fwide.c,v 1.5 2015/08/31 02:53:57 guenther Exp $ */
/* $NetBSD: fwide.c,v 1.2 2003/01/18 11:29:54 thorpej Exp $ */
/*-
@@ -62,3 +62,4 @@ fwide(FILE *fp, int mode)
return mode;
}
+DEF_STRONG(fwide);
diff --git a/lib/libc/stdio/fwprintf.c b/lib/libc/stdio/fwprintf.c
index 4474e8b3566..61a017b652d 100644
--- a/lib/libc/stdio/fwprintf.c
+++ b/lib/libc/stdio/fwprintf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fwprintf.c,v 1.3 2011/04/28 17:38:46 stsp Exp $ */
+/* $OpenBSD: fwprintf.c,v 1.4 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -46,3 +46,4 @@ fwprintf(FILE * __restrict fp, const wchar_t * __restrict fmt, ...)
va_end(ap);
return (ret);
}
+DEF_STRONG(fwprintf);
diff --git a/lib/libc/stdio/fwrite.c b/lib/libc/stdio/fwrite.c
index f0a17bfb9a8..fcabc7c3c06 100644
--- a/lib/libc/stdio/fwrite.c
+++ b/lib/libc/stdio/fwrite.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fwrite.c,v 1.11 2014/05/01 16:40:36 deraadt Exp $ */
+/* $OpenBSD: fwrite.c,v 1.12 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -86,3 +86,4 @@ fwrite(const void *buf, size_t size, size_t count, FILE *fp)
return (count);
return ((n - uio.uio_resid) / size);
}
+DEF_STRONG(fwrite);
diff --git a/lib/libc/stdio/fwscanf.c b/lib/libc/stdio/fwscanf.c
index b716cbff3d3..648e1bfb5fd 100644
--- a/lib/libc/stdio/fwscanf.c
+++ b/lib/libc/stdio/fwscanf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fwscanf.c,v 1.2 2012/12/05 23:20:01 deraadt Exp $ */
+/* $OpenBSD: fwscanf.c,v 1.3 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 2002 Tim J. Robbins
@@ -42,3 +42,4 @@ fwscanf(FILE * __restrict fp, const wchar_t * __restrict fmt, ...)
return (r);
}
+DEF_STRONG(fwscanf);
diff --git a/lib/libc/stdio/getc.c b/lib/libc/stdio/getc.c
index 6879cbb7913..53cd3d84797 100644
--- a/lib/libc/stdio/getc.c
+++ b/lib/libc/stdio/getc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getc.c,v 1.9 2009/11/09 00:18:27 kurt Exp $ */
+/* $OpenBSD: getc.c,v 1.10 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -44,6 +44,7 @@ getc_unlocked(FILE *fp)
{
return (__sgetc(fp));
}
+DEF_WEAK(getc_unlocked);
/*
* A subroutine version of the macro getc.
@@ -60,3 +61,4 @@ getc(FILE *fp)
FUNLOCKFILE(fp);
return (c);
}
+DEF_STRONG(getc);
diff --git a/lib/libc/stdio/getchar.c b/lib/libc/stdio/getchar.c
index 550817de028..0bf6ce1ad19 100644
--- a/lib/libc/stdio/getchar.c
+++ b/lib/libc/stdio/getchar.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getchar.c,v 1.7 2005/08/08 08:05:36 espie Exp $ */
+/* $OpenBSD: getchar.c,v 1.8 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -43,6 +43,7 @@ getchar_unlocked(void)
{
return (getc_unlocked(stdin));
}
+DEF_WEAK(getchar_unlocked);
/*
@@ -56,3 +57,4 @@ getchar(void)
{
return (getc(stdin));
}
+DEF_STRONG(getchar);
diff --git a/lib/libc/stdio/getdelim.c b/lib/libc/stdio/getdelim.c
index faf245ca6b1..58ff0a1be12 100644
--- a/lib/libc/stdio/getdelim.c
+++ b/lib/libc/stdio/getdelim.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getdelim.c,v 1.3 2015/02/06 23:21:58 millert Exp $ */
+/* $OpenBSD: getdelim.c,v 1.4 2015/08/31 02:53:57 guenther Exp $ */
/* $NetBSD: getdelim.c,v 1.13 2011/07/22 23:12:30 joerg Exp $ */
/*
@@ -132,3 +132,4 @@ error:
FUNLOCKFILE(fp);
return -1;
}
+DEF_WEAK(getdelim);
diff --git a/lib/libc/stdio/getline.c b/lib/libc/stdio/getline.c
index 55ad39675b9..68c10104933 100644
--- a/lib/libc/stdio/getline.c
+++ b/lib/libc/stdio/getline.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getline.c,v 1.1 2012/03/21 23:44:35 fgsch Exp $ */
+/* $OpenBSD: getline.c,v 1.2 2015/08/31 02:53:57 guenther Exp $ */
/* $NetBSD: getline.c,v 1.3 2009/12/02 08:46:33 roy Exp $ */
/*
@@ -35,3 +35,4 @@ getline(char **__restrict buf, size_t *__restrict buflen, FILE *__restrict fp)
{
return getdelim(buf, buflen, '\n', fp);
}
+DEF_WEAK(getline);
diff --git a/lib/libc/stdio/getw.c b/lib/libc/stdio/getw.c
index 6bfb97eb9fd..a6688be7c74 100644
--- a/lib/libc/stdio/getw.c
+++ b/lib/libc/stdio/getw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getw.c,v 1.5 2005/08/08 08:05:36 espie Exp $ */
+/* $OpenBSD: getw.c,v 1.6 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -40,3 +40,4 @@ getw(FILE *fp)
return (fread((void *)&x, sizeof(x), 1, fp) == 1 ? x : EOF);
}
+DEF_WEAK(getw);
diff --git a/lib/libc/stdio/getwc.c b/lib/libc/stdio/getwc.c
index e9bbb7c2421..24d1bed3f60 100644
--- a/lib/libc/stdio/getwc.c
+++ b/lib/libc/stdio/getwc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getwc.c,v 1.1 2005/06/17 20:40:32 espie Exp $ */
+/* $OpenBSD: getwc.c,v 1.2 2015/08/31 02:53:57 guenther Exp $ */
/* $NetBSD: getwc.c,v 1.2 2003/01/18 11:29:55 thorpej Exp $ */
/*-
@@ -43,3 +43,4 @@ getwc(FILE *fp)
return fgetwc(fp);
}
+DEF_STRONG(getwc);
diff --git a/lib/libc/stdio/getwchar.c b/lib/libc/stdio/getwchar.c
index 2a112ed8fbe..644b553ce6c 100644
--- a/lib/libc/stdio/getwchar.c
+++ b/lib/libc/stdio/getwchar.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getwchar.c,v 1.1 2005/06/17 20:40:32 espie Exp $ */
+/* $OpenBSD: getwchar.c,v 1.2 2015/08/31 02:53:57 guenther Exp $ */
/* $NetBSD: getwchar.c,v 1.2 2003/01/18 11:29:55 thorpej Exp $ */
/*-
@@ -43,3 +43,4 @@ getwchar()
return fgetwc(stdin);
}
+DEF_STRONG(getwchar);
diff --git a/lib/libc/stdio/mktemp.c b/lib/libc/stdio/mktemp.c
index 956608c151d..43b38dd8b6d 100644
--- a/lib/libc/stdio/mktemp.c
+++ b/lib/libc/stdio/mktemp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mktemp.c,v 1.35 2014/10/31 15:54:14 millert Exp $ */
+/* $OpenBSD: mktemp.c,v 1.36 2015/08/31 02:53:57 guenther Exp $ */
/*
* Copyright (c) 1996-1998, 2008 Theo de Raadt
* Copyright (c) 1997, 2008-2009 Todd C. Miller
@@ -110,8 +110,6 @@ mktemp_internal(char *path, int slen, int mode, int flags)
return(-1);
}
-char *_mktemp(char *);
-
char *
_mktemp(char *path)
{
diff --git a/lib/libc/stdio/open_memstream.c b/lib/libc/stdio/open_memstream.c
index d38c210df9e..f708acc5032 100644
--- a/lib/libc/stdio/open_memstream.c
+++ b/lib/libc/stdio/open_memstream.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: open_memstream.c,v 1.5 2015/02/05 12:59:57 millert Exp $ */
+/* $OpenBSD: open_memstream.c,v 1.6 2015/08/31 02:53:57 guenther Exp $ */
/*
* Copyright (c) 2011 Martin Pieuchot <mpi@openbsd.org>
@@ -156,3 +156,4 @@ open_memstream(char **pbuf, size_t *psize)
return (fp);
}
+DEF_WEAK(open_memstream);
diff --git a/lib/libc/stdio/open_wmemstream.c b/lib/libc/stdio/open_wmemstream.c
index 7de134f6864..f714e9edf46 100644
--- a/lib/libc/stdio/open_wmemstream.c
+++ b/lib/libc/stdio/open_wmemstream.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: open_wmemstream.c,v 1.6 2015/02/05 12:59:57 millert Exp $ */
+/* $OpenBSD: open_wmemstream.c,v 1.7 2015/08/31 02:53:57 guenther Exp $ */
/*
* Copyright (c) 2011 Martin Pieuchot <mpi@openbsd.org>
@@ -167,3 +167,4 @@ open_wmemstream(wchar_t **pbuf, size_t *psize)
return (fp);
}
+DEF_WEAK(open_wmemstream);
diff --git a/lib/libc/stdio/perror.c b/lib/libc/stdio/perror.c
index 8728718c5d5..fdd6120e4f2 100644
--- a/lib/libc/stdio/perror.c
+++ b/lib/libc/stdio/perror.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: perror.c,v 1.8 2005/08/08 08:05:36 espie Exp $ */
+/* $OpenBSD: perror.c,v 1.9 2015/08/31 02:53:57 guenther Exp $ */
/*
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
@@ -60,3 +60,4 @@ perror(const char *s)
v->iov_len = 1;
(void)writev(STDERR_FILENO, iov, (v - iov) + 1);
}
+DEF_STRONG(perror);
diff --git a/lib/libc/stdio/printf.c b/lib/libc/stdio/printf.c
index 09bb3d7f7db..d8b6f09fcac 100644
--- a/lib/libc/stdio/printf.c
+++ b/lib/libc/stdio/printf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: printf.c,v 1.8 2011/05/30 18:48:33 martynas Exp $ */
+/* $OpenBSD: printf.c,v 1.9 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -34,7 +34,6 @@
#include <stdio.h>
#include <stdarg.h>
-/* PRINTFLIKE1 */
int
printf(const char *fmt, ...)
{
@@ -46,3 +45,4 @@ printf(const char *fmt, ...)
va_end(ap);
return (ret);
}
+DEF_STRONG(printf);
diff --git a/lib/libc/stdio/putc.c b/lib/libc/stdio/putc.c
index 762fecb2d38..9fca905075b 100644
--- a/lib/libc/stdio/putc.c
+++ b/lib/libc/stdio/putc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: putc.c,v 1.12 2009/11/21 10:11:54 guenther Exp $ */
+/* $OpenBSD: putc.c,v 1.13 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -50,6 +50,7 @@ putc_unlocked(int c, FILE *fp)
_SET_ORIENTATION(fp, -1);
return (__sputc(c, fp));
}
+DEF_WEAK(putc_unlocked);
/*
* A subroutine version of the macro putc.
@@ -66,3 +67,4 @@ putc(int c, FILE *fp)
FUNLOCKFILE(fp);
return (ret);
}
+DEF_STRONG(putc);
diff --git a/lib/libc/stdio/putchar.c b/lib/libc/stdio/putchar.c
index 233cdfd0268..43287ae071b 100644
--- a/lib/libc/stdio/putchar.c
+++ b/lib/libc/stdio/putchar.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: putchar.c,v 1.7 2005/08/08 08:05:36 espie Exp $ */
+/* $OpenBSD: putchar.c,v 1.8 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -44,6 +44,7 @@ putchar_unlocked(int c)
return (putc_unlocked(c,so));
}
+DEF_WEAK(putchar_unlocked);
#undef putchar
@@ -57,3 +58,4 @@ putchar(int c)
return (putc(c, so));
}
+DEF_STRONG(putchar);
diff --git a/lib/libc/stdio/puts.c b/lib/libc/stdio/puts.c
index 655aed7ec9d..57d4b786f89 100644
--- a/lib/libc/stdio/puts.c
+++ b/lib/libc/stdio/puts.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: puts.c,v 1.11 2009/11/21 09:53:44 guenther Exp $ */
+/* $OpenBSD: puts.c,v 1.12 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -60,3 +60,4 @@ puts(const char *s)
FUNLOCKFILE(stdout);
return (ret ? EOF : '\n');
}
+DEF_STRONG(puts);
diff --git a/lib/libc/stdio/putw.c b/lib/libc/stdio/putw.c
index 47941a476c1..be17ead9e05 100644
--- a/lib/libc/stdio/putw.c
+++ b/lib/libc/stdio/putw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: putw.c,v 1.10 2009/11/21 09:53:44 guenther Exp $ */
+/* $OpenBSD: putw.c,v 1.11 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -52,3 +52,4 @@ putw(int w, FILE *fp)
FUNLOCKFILE(fp);
return (ret);
}
+DEF_WEAK(putw);
diff --git a/lib/libc/stdio/putwc.c b/lib/libc/stdio/putwc.c
index 8e2ff2dca45..44096903a8f 100644
--- a/lib/libc/stdio/putwc.c
+++ b/lib/libc/stdio/putwc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: putwc.c,v 1.1 2005/06/17 20:40:32 espie Exp $ */
+/* $OpenBSD: putwc.c,v 1.2 2015/08/31 02:53:57 guenther Exp $ */
/* $NetBSD: putwc.c,v 1.3 2003/01/18 11:29:56 thorpej Exp $ */
/*-
@@ -43,3 +43,4 @@ putwc(wchar_t wc, FILE *fp)
return fputwc(wc, fp);
}
+DEF_STRONG(putwc);
diff --git a/lib/libc/stdio/putwchar.c b/lib/libc/stdio/putwchar.c
index 940ec05ab59..ae01a17045e 100644
--- a/lib/libc/stdio/putwchar.c
+++ b/lib/libc/stdio/putwchar.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: putwchar.c,v 1.1 2005/06/17 20:40:32 espie Exp $ */
+/* $OpenBSD: putwchar.c,v 1.2 2015/08/31 02:53:57 guenther Exp $ */
/* $NetBSD: putwchar.c,v 1.3 2003/01/18 11:29:56 thorpej Exp $ */
/*-
@@ -43,3 +43,4 @@ putwchar(wchar_t wc)
return fputwc(wc, stdout);
}
+DEF_STRONG(putwchar);
diff --git a/lib/libc/stdio/remove.c b/lib/libc/stdio/remove.c
index d09d76f9df2..e08e5997658 100644
--- a/lib/libc/stdio/remove.c
+++ b/lib/libc/stdio/remove.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: remove.c,v 1.7 2005/08/08 08:05:36 espie Exp $ */
+/* $OpenBSD: remove.c,v 1.8 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -47,3 +47,4 @@ remove(const char *file)
return (rmdir(file));
return (unlink(file));
}
+DEF_STRONG(remove);
diff --git a/lib/libc/stdio/rewind.c b/lib/libc/stdio/rewind.c
index 28119b6a884..4a52ed064a5 100644
--- a/lib/libc/stdio/rewind.c
+++ b/lib/libc/stdio/rewind.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rewind.c,v 1.5 2005/08/08 08:05:36 espie Exp $ */
+/* $OpenBSD: rewind.c,v 1.6 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -41,3 +41,4 @@ rewind(FILE *fp)
clearerr(fp);
errno = 0; /* not required, but seems reasonable */
}
+DEF_STRONG(rewind);
diff --git a/lib/libc/stdio/rget.c b/lib/libc/stdio/rget.c
index 4cd97cbe9a4..368815b1614 100644
--- a/lib/libc/stdio/rget.c
+++ b/lib/libc/stdio/rget.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rget.c,v 1.7 2005/08/08 08:05:36 espie Exp $ */
+/* $OpenBSD: rget.c,v 1.8 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -49,3 +49,4 @@ __srget(FILE *fp)
}
return (EOF);
}
+DEF_STRONG(__srget);
diff --git a/lib/libc/stdio/scanf.c b/lib/libc/stdio/scanf.c
index 90cf12a3ba7..4d81c986bd3 100644
--- a/lib/libc/stdio/scanf.c
+++ b/lib/libc/stdio/scanf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scanf.c,v 1.10 2011/05/30 18:48:33 martynas Exp $ */
+/* $OpenBSD: scanf.c,v 1.11 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -34,7 +34,6 @@
#include <stdio.h>
#include <stdarg.h>
-/* SCANFLIKE1 */
int
scanf(const char *fmt, ...)
{
@@ -46,3 +45,4 @@ scanf(const char *fmt, ...)
va_end(ap);
return (ret);
}
+DEF_STRONG(scanf);
diff --git a/lib/libc/stdio/setbuf.c b/lib/libc/stdio/setbuf.c
index 883b89532b8..ababa94bd36 100644
--- a/lib/libc/stdio/setbuf.c
+++ b/lib/libc/stdio/setbuf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: setbuf.c,v 1.5 2005/08/08 08:05:36 espie Exp $ */
+/* $OpenBSD: setbuf.c,v 1.6 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -39,3 +39,4 @@ setbuf(FILE *fp, char *buf)
{
(void) setvbuf(fp, buf, buf ? _IOFBF : _IONBF, BUFSIZ);
}
+DEF_STRONG(setbuf);
diff --git a/lib/libc/stdio/setbuffer.c b/lib/libc/stdio/setbuffer.c
index 8725ff79558..b67d7659494 100644
--- a/lib/libc/stdio/setbuffer.c
+++ b/lib/libc/stdio/setbuffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: setbuffer.c,v 1.5 2005/08/08 08:05:36 espie Exp $ */
+/* $OpenBSD: setbuffer.c,v 1.6 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -39,6 +39,7 @@ setbuffer(FILE *fp, char *buf, int size)
(void)setvbuf(fp, buf, buf ? _IOFBF : _IONBF, size);
}
+DEF_WEAK(setbuffer);
/*
* set line buffering
@@ -49,3 +50,4 @@ setlinebuf(FILE *fp)
return (setvbuf(fp, (char *)NULL, _IOLBF, (size_t)0));
}
+DEF_WEAK(setlinebuf);
diff --git a/lib/libc/stdio/setvbuf.c b/lib/libc/stdio/setvbuf.c
index dc79adc8244..02879a771a6 100644
--- a/lib/libc/stdio/setvbuf.c
+++ b/lib/libc/stdio/setvbuf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: setvbuf.c,v 1.12 2015/01/13 07:18:21 guenther Exp $ */
+/* $OpenBSD: setvbuf.c,v 1.13 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -158,3 +158,4 @@ nbf:
return (ret);
}
+DEF_STRONG(setvbuf);
diff --git a/lib/libc/stdio/snprintf.c b/lib/libc/stdio/snprintf.c
index 7b087e95dd1..1d7e7c9e80a 100644
--- a/lib/libc/stdio/snprintf.c
+++ b/lib/libc/stdio/snprintf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: snprintf.c,v 1.18 2011/05/30 18:48:33 martynas Exp $ */
+/* $OpenBSD: snprintf.c,v 1.19 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -37,7 +37,6 @@
#include <stdarg.h>
#include "local.h"
-/* PRINTFLIKE3 */
int
snprintf(char *str, size_t n, const char *fmt, ...)
{
@@ -66,3 +65,4 @@ snprintf(char *str, size_t n, const char *fmt, ...)
*f._p = '\0';
return (ret);
}
+DEF_STRONG(snprintf);
diff --git a/lib/libc/stdio/sscanf.c b/lib/libc/stdio/sscanf.c
index e371ca693c1..30394cb5cc6 100644
--- a/lib/libc/stdio/sscanf.c
+++ b/lib/libc/stdio/sscanf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sscanf.c,v 1.14 2011/11/08 18:30:42 guenther Exp $ */
+/* $OpenBSD: sscanf.c,v 1.15 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -36,7 +36,6 @@
#include <stdarg.h>
#include "local.h"
-/* ARGSUSED */
static int
eofread(void *cookie, char *buf, int len)
{
@@ -44,7 +43,6 @@ eofread(void *cookie, char *buf, int len)
return (0);
}
-/* SCANFLIKE2 */
int
sscanf(const char *str, const char *fmt, ...)
{
@@ -64,3 +62,4 @@ sscanf(const char *str, const char *fmt, ...)
va_end(ap);
return (ret);
}
+DEF_STRONG(sscanf);
diff --git a/lib/libc/stdio/swprintf.c b/lib/libc/stdio/swprintf.c
index 8928aeabb86..02ba508a445 100644
--- a/lib/libc/stdio/swprintf.c
+++ b/lib/libc/stdio/swprintf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: swprintf.c,v 1.5 2012/12/05 23:20:01 deraadt Exp $ */
+/* $OpenBSD: swprintf.c,v 1.6 2015/08/31 02:53:57 guenther Exp $ */
/* $NetBSD: swprintf.c,v 1.1 2005/05/14 23:51:02 christos Exp $ */
/*-
@@ -43,3 +43,4 @@ swprintf(wchar_t * __restrict s, size_t n, const wchar_t * __restrict fmt, ...)
return (ret);
}
+DEF_STRONG(swprintf);
diff --git a/lib/libc/stdio/swscanf.c b/lib/libc/stdio/swscanf.c
index a85e9ee2ba8..6758a6d2f67 100644
--- a/lib/libc/stdio/swscanf.c
+++ b/lib/libc/stdio/swscanf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: swscanf.c,v 1.2 2012/12/05 23:20:01 deraadt Exp $ */
+/* $OpenBSD: swscanf.c,v 1.3 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 2002 Tim J. Robbins
@@ -42,3 +42,4 @@ swscanf(const wchar_t * __restrict str, const wchar_t * __restrict fmt, ...)
return (r);
}
+DEF_STRONG(swscanf);
diff --git a/lib/libc/stdio/tempnam.c b/lib/libc/stdio/tempnam.c
index 56d667dadd4..854b871cb40 100644
--- a/lib/libc/stdio/tempnam.c
+++ b/lib/libc/stdio/tempnam.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tempnam.c,v 1.18 2015/03/23 22:15:11 jsg Exp $ */
+/* $OpenBSD: tempnam.c,v 1.19 2015/08/31 02:53:57 guenther Exp $ */
/*
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
@@ -39,8 +39,6 @@
__warn_references(tempnam,
"warning: tempnam() possibly used unsafely; consider using mkstemp()");
-extern char *_mktemp(char *);
-
char *
tempnam(const char *dir, const char *pfx)
{
diff --git a/lib/libc/stdio/tmpfile.c b/lib/libc/stdio/tmpfile.c
index 39f7e929a1a..6ee28caf0f6 100644
--- a/lib/libc/stdio/tmpfile.c
+++ b/lib/libc/stdio/tmpfile.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmpfile.c,v 1.10 2005/10/10 12:00:52 espie Exp $ */
+/* $OpenBSD: tmpfile.c,v 1.11 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -79,3 +79,4 @@ tmpfile(void)
}
return (fp);
}
+DEF_STRONG(tmpfile);
diff --git a/lib/libc/stdio/tmpnam.c b/lib/libc/stdio/tmpnam.c
index 32e0a220202..d6dc10eec03 100644
--- a/lib/libc/stdio/tmpnam.c
+++ b/lib/libc/stdio/tmpnam.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmpnam.c,v 1.10 2005/08/08 08:05:36 espie Exp $ */
+/* $OpenBSD: tmpnam.c,v 1.11 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
* The Regents of the University of California. All rights reserved.
@@ -39,8 +39,6 @@
__warn_references(tmpnam,
"warning: tmpnam() possibly used unsafely; consider using mkstemp()");
-extern char *_mktemp(char *);
-
char *
tmpnam(char *s)
{
diff --git a/lib/libc/stdio/ungetc.c b/lib/libc/stdio/ungetc.c
index ec98f26c22e..cb49c9bd195 100644
--- a/lib/libc/stdio/ungetc.c
+++ b/lib/libc/stdio/ungetc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ungetc.c,v 1.13 2014/10/11 04:05:10 deraadt Exp $ */
+/* $OpenBSD: ungetc.c,v 1.14 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -143,3 +143,4 @@ inc_ret: fp->_r++;
FUNLOCKFILE(fp);
return (c);
}
+DEF_STRONG(ungetc);
diff --git a/lib/libc/stdio/ungetwc.c b/lib/libc/stdio/ungetwc.c
index c0321e9e1e5..9b312df15b1 100644
--- a/lib/libc/stdio/ungetwc.c
+++ b/lib/libc/stdio/ungetwc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ungetwc.c,v 1.5 2011/10/16 13:20:51 stsp Exp $ */
+/* $OpenBSD: ungetwc.c,v 1.6 2015/08/31 02:53:57 guenther Exp $ */
/* $NetBSD: ungetwc.c,v 1.2 2003/01/18 11:29:59 thorpej Exp $ */
/*-
@@ -75,3 +75,4 @@ ungetwc(wint_t wc, FILE *fp)
FUNLOCKFILE(fp);
return (r);
}
+DEF_STRONG(ungetwc);
diff --git a/lib/libc/stdio/vasprintf.c b/lib/libc/stdio/vasprintf.c
index 2cc3c7d9356..11d90a4b187 100644
--- a/lib/libc/stdio/vasprintf.c
+++ b/lib/libc/stdio/vasprintf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vasprintf.c,v 1.17 2015/08/20 21:49:29 deraadt Exp $ */
+/* $OpenBSD: vasprintf.c,v 1.18 2015/08/31 02:53:57 guenther Exp $ */
/*
* Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -56,3 +56,4 @@ err:
errno = ENOMEM;
return (-1);
}
+DEF_WEAK(vasprintf);
diff --git a/lib/libc/stdio/vdprintf.c b/lib/libc/stdio/vdprintf.c
index 49c19697710..e76fcd4987b 100644
--- a/lib/libc/stdio/vdprintf.c
+++ b/lib/libc/stdio/vdprintf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vdprintf.c,v 1.1 2013/01/30 00:08:13 brad Exp $ */
+/* $OpenBSD: vdprintf.c,v 1.2 2015/08/31 02:53:57 guenther Exp $ */
/* $FreeBSD: src/lib/libc/stdio/vdprintf.c,v 1.4 2012/11/17 01:49:40 svnexp Exp $ */
/*-
@@ -71,3 +71,4 @@ vdprintf(int fd, const char * __restrict fmt, va_list ap)
return fflush(&f) ? EOF : ret;
}
+DEF_WEAK(vdprintf);
diff --git a/lib/libc/stdio/vfprintf.c b/lib/libc/stdio/vfprintf.c
index 5f4fb7fa9bb..df26c324588 100644
--- a/lib/libc/stdio/vfprintf.c
+++ b/lib/libc/stdio/vfprintf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfprintf.c,v 1.67 2014/12/21 00:23:30 daniel Exp $ */
+/* $OpenBSD: vfprintf.c,v 1.68 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
@@ -268,6 +268,7 @@ vfprintf(FILE *fp, const char *fmt0, __va_list ap)
FUNLOCKFILE(fp);
return (ret);
}
+DEF_STRONG(vfprintf);
int
__vfprintf(FILE *fp, const char *fmt0, __va_list ap)
diff --git a/lib/libc/stdio/vfscanf.c b/lib/libc/stdio/vfscanf.c
index abefe32cbb7..83a3bfb6c05 100644
--- a/lib/libc/stdio/vfscanf.c
+++ b/lib/libc/stdio/vfscanf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfscanf.c,v 1.31 2014/03/19 05:17:01 guenther Exp $ */
+/* $OpenBSD: vfscanf.c,v 1.32 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -967,3 +967,4 @@ vfscanf(FILE *fp, const char *fmt0, __va_list ap)
FUNLOCKFILE(fp);
return (r);
}
+DEF_STRONG(vfscanf);
diff --git a/lib/libc/stdio/vfwprintf.c b/lib/libc/stdio/vfwprintf.c
index a6f41232c53..4a8cbcfe094 100644
--- a/lib/libc/stdio/vfwprintf.c
+++ b/lib/libc/stdio/vfwprintf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfwprintf.c,v 1.12 2014/12/21 00:23:30 daniel Exp $ */
+/* $OpenBSD: vfwprintf.c,v 1.13 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
@@ -1072,6 +1072,7 @@ vfwprintf(FILE * __restrict fp, const wchar_t * __restrict fmt0, __va_list ap)
return (r);
}
+DEF_STRONG(vfwprintf);
/*
* Type ids for argument type table.
diff --git a/lib/libc/stdio/vfwscanf.c b/lib/libc/stdio/vfwscanf.c
index cbb36be34a2..f2ec3fb68b2 100644
--- a/lib/libc/stdio/vfwscanf.c
+++ b/lib/libc/stdio/vfwscanf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfwscanf.c,v 1.4 2014/03/19 05:17:01 guenther Exp $ */
+/* $OpenBSD: vfwscanf.c,v 1.5 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -796,3 +796,4 @@ vfwscanf(FILE * __restrict fp, const wchar_t * __restrict fmt, __va_list ap)
FUNLOCKFILE(fp);
return (r);
}
+DEF_STRONG(vfwscanf);
diff --git a/lib/libc/stdio/vprintf.c b/lib/libc/stdio/vprintf.c
index fcc622ca799..5d858b60e5b 100644
--- a/lib/libc/stdio/vprintf.c
+++ b/lib/libc/stdio/vprintf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vprintf.c,v 1.8 2006/01/06 18:53:04 millert Exp $ */
+/* $OpenBSD: vprintf.c,v 1.9 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -38,3 +38,4 @@ vprintf(const char *fmt, __va_list ap)
{
return (vfprintf(stdout, fmt, ap));
}
+DEF_STRONG(vprintf);
diff --git a/lib/libc/stdio/vscanf.c b/lib/libc/stdio/vscanf.c
index 228498e75cc..e56738de6b6 100644
--- a/lib/libc/stdio/vscanf.c
+++ b/lib/libc/stdio/vscanf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vscanf.c,v 1.8 2006/01/06 18:53:04 millert Exp $ */
+/* $OpenBSD: vscanf.c,v 1.9 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -39,3 +39,4 @@ vscanf(const char *fmt, __va_list ap)
return (vfscanf(stdin, fmt, ap));
}
+DEF_STRONG(vscanf);
diff --git a/lib/libc/stdio/vsnprintf.c b/lib/libc/stdio/vsnprintf.c
index 8b1a088da85..e14b2a1adb3 100644
--- a/lib/libc/stdio/vsnprintf.c
+++ b/lib/libc/stdio/vsnprintf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vsnprintf.c,v 1.15 2009/11/09 00:18:28 kurt Exp $ */
+/* $OpenBSD: vsnprintf.c,v 1.16 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -62,3 +62,4 @@ vsnprintf(char *str, size_t n, const char *fmt, __va_list ap)
*f._p = '\0';
return (ret);
}
+DEF_STRONG(vsnprintf);
diff --git a/lib/libc/stdio/vsscanf.c b/lib/libc/stdio/vsscanf.c
index 71eb7529879..86e0b4c1e0b 100644
--- a/lib/libc/stdio/vsscanf.c
+++ b/lib/libc/stdio/vsscanf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vsscanf.c,v 1.12 2011/11/08 18:30:42 guenther Exp $ */
+/* $OpenBSD: vsscanf.c,v 1.13 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -35,7 +35,6 @@
#include <string.h>
#include "local.h"
-/* ARGSUSED */
static int
eofread(void *cookie, char *buf, int len)
{
@@ -57,3 +56,4 @@ vsscanf(const char *str, const char *fmt, __va_list ap)
f._lb._base = NULL;
return (__svfscanf(&f, fmt, ap));
}
+DEF_STRONG(vsscanf);
diff --git a/lib/libc/stdio/vswprintf.c b/lib/libc/stdio/vswprintf.c
index d79563f5568..641db4ae73b 100644
--- a/lib/libc/stdio/vswprintf.c
+++ b/lib/libc/stdio/vswprintf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vswprintf.c,v 1.5 2015/08/20 21:49:29 deraadt Exp $ */
+/* $OpenBSD: vswprintf.c,v 1.6 2015/08/31 02:53:57 guenther Exp $ */
/* $NetBSD: vswprintf.c,v 1.1 2005/05/14 23:51:02 christos Exp $ */
/*
@@ -94,3 +94,4 @@ vswprintf(wchar_t * __restrict s, size_t n, const wchar_t * __restrict fmt,
return (ret);
}
+DEF_STRONG(vswprintf);
diff --git a/lib/libc/stdio/vswscanf.c b/lib/libc/stdio/vswscanf.c
index cbaa25091ba..e87dfebd141 100644
--- a/lib/libc/stdio/vswscanf.c
+++ b/lib/libc/stdio/vswscanf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vswscanf.c,v 1.2 2012/12/05 23:20:01 deraadt Exp $ */
+/* $OpenBSD: vswscanf.c,v 1.3 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -86,3 +86,4 @@ vswscanf(const wchar_t * __restrict str, const wchar_t * __restrict fmt,
return (r);
}
+DEF_STRONG(vswscanf);
diff --git a/lib/libc/stdio/vwprintf.c b/lib/libc/stdio/vwprintf.c
index 49569c1a27e..9598d331a3f 100644
--- a/lib/libc/stdio/vwprintf.c
+++ b/lib/libc/stdio/vwprintf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vwprintf.c,v 1.3 2011/04/28 17:38:46 stsp Exp $ */
+/* $OpenBSD: vwprintf.c,v 1.4 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -40,3 +40,4 @@ vwprintf(const wchar_t * __restrict fmt, __va_list ap)
{
return (vfwprintf(stdout, fmt, ap));
}
+DEF_STRONG(vwprintf);
diff --git a/lib/libc/stdio/vwscanf.c b/lib/libc/stdio/vwscanf.c
index 7039f02d7fe..bd824b4d4bb 100644
--- a/lib/libc/stdio/vwscanf.c
+++ b/lib/libc/stdio/vwscanf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vwscanf.c,v 1.2 2012/12/05 23:20:01 deraadt Exp $ */
+/* $OpenBSD: vwscanf.c,v 1.3 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 2002 Tim J. Robbins
@@ -36,3 +36,4 @@ vwscanf(const wchar_t * __restrict fmt, __va_list ap)
return (vfwscanf(stdin, fmt, ap));
}
+DEF_STRONG(vwscanf);
diff --git a/lib/libc/stdio/wbuf.c b/lib/libc/stdio/wbuf.c
index 6aa00e1d6c4..2d077505b80 100644
--- a/lib/libc/stdio/wbuf.c
+++ b/lib/libc/stdio/wbuf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wbuf.c,v 1.12 2009/11/09 00:18:28 kurt Exp $ */
+/* $OpenBSD: wbuf.c,v 1.13 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -82,3 +82,4 @@ __swbuf(int c, FILE *fp)
return (EOF);
return (c);
}
+DEF_STRONG(__swbuf);
diff --git a/lib/libc/stdio/wprintf.c b/lib/libc/stdio/wprintf.c
index 9f7abb64e3b..95243828f00 100644
--- a/lib/libc/stdio/wprintf.c
+++ b/lib/libc/stdio/wprintf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wprintf.c,v 1.3 2011/04/28 17:38:46 stsp Exp $ */
+/* $OpenBSD: wprintf.c,v 1.4 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -46,3 +46,4 @@ wprintf(const wchar_t * __restrict fmt, ...)
va_end(ap);
return (ret);
}
+DEF_STRONG(wprintf);
diff --git a/lib/libc/stdio/wscanf.c b/lib/libc/stdio/wscanf.c
index 06c0829ab34..c73c9299851 100644
--- a/lib/libc/stdio/wscanf.c
+++ b/lib/libc/stdio/wscanf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wscanf.c,v 1.2 2012/12/05 23:20:01 deraadt Exp $ */
+/* $OpenBSD: wscanf.c,v 1.3 2015/08/31 02:53:57 guenther Exp $ */
/*-
* Copyright (c) 2002 Tim J. Robbins
@@ -42,3 +42,4 @@ wscanf(const wchar_t * __restrict fmt, ...)
return (r);
}
+DEF_STRONG(wscanf);