summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2015-09-14 12:22:49 +0000
committerguenther <guenther@openbsd.org>2015-09-14 12:22:49 +0000
commit25d6a9e8745149f542b49284c3d114a2900c9b85 (patch)
tree9f6f805af9581e350bbee37a721eed5b96cf8c7c /lib/libc
parentWrap <locale.h> so internal calls go direct (diff)
downloadwireguard-openbsd-25d6a9e8745149f542b49284c3d114a2900c9b85.tar.xz
wireguard-openbsd-25d6a9e8745149f542b49284c3d114a2900c9b85.zip
Wrap <langinfo.h> and <regexp.h> so internal calls go direct and
the symbols are weak
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/hidden/langinfo.h25
-rw-r--r--lib/libc/hidden/regex.h28
-rw-r--r--lib/libc/locale/nl_langinfo.c3
-rw-r--r--lib/libc/regex/regfree.c3
4 files changed, 57 insertions, 2 deletions
diff --git a/lib/libc/hidden/langinfo.h b/lib/libc/hidden/langinfo.h
new file mode 100644
index 00000000000..d60afe22cc6
--- /dev/null
+++ b/lib/libc/hidden/langinfo.h
@@ -0,0 +1,25 @@
+/* $OpenBSD: langinfo.h,v 1.1 2015/09/14 12:22:49 guenther Exp $ */
+/*
+ * Copyright (c) 2015 Philip Guenther <guenther@openbsd.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _LIBC_LANGINFO_H_
+#define _LIBC_LANGINFO_H_
+
+#include_next <langinfo.h>
+
+PROTO_NORMAL(nl_langinfo);
+
+#endif /* _LIBC_LANGINFO_H_ */
diff --git a/lib/libc/hidden/regex.h b/lib/libc/hidden/regex.h
new file mode 100644
index 00000000000..47f035088a6
--- /dev/null
+++ b/lib/libc/hidden/regex.h
@@ -0,0 +1,28 @@
+/* $OpenBSD: regex.h,v 1.1 2015/09/14 12:22:49 guenther Exp $ */
+/*
+ * Copyright (c) 2015 Philip Guenther <guenther@openbsd.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _LIBC_REGEX_H_
+#define _LIBC_REGEX_H_
+
+#include_next <regex.h>
+
+PROTO_DEPRECATED(regcomp);
+PROTO_DEPRECATED(regerror);
+PROTO_DEPRECATED(regexec);
+PROTO_NORMAL(regfree);
+
+#endif /* !_LIBC_REGEX_H_ */
diff --git a/lib/libc/locale/nl_langinfo.c b/lib/libc/locale/nl_langinfo.c
index eee8d08c9d7..a11b1cb65be 100644
--- a/lib/libc/locale/nl_langinfo.c
+++ b/lib/libc/locale/nl_langinfo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nl_langinfo.c,v 1.6 2005/11/16 16:48:15 espie Exp $ */
+/* $OpenBSD: nl_langinfo.c,v 1.7 2015/09/14 12:22:49 guenther Exp $ */
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
@@ -112,3 +112,4 @@ nl_langinfo(nl_item item)
return (char *) s;
}
+DEF_WEAK(nl_langinfo);
diff --git a/lib/libc/regex/regfree.c b/lib/libc/regex/regfree.c
index 42506cec7fc..82f506ab826 100644
--- a/lib/libc/regex/regfree.c
+++ b/lib/libc/regex/regfree.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: regfree.c,v 1.8 2013/04/17 17:39:29 tedu Exp $ */
+/* $OpenBSD: regfree.c,v 1.9 2015/09/14 12:22:49 guenther Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994 Henry Spencer.
* Copyright (c) 1992, 1993, 1994
@@ -70,3 +70,4 @@ regfree(regex_t *preg)
free(g->must);
free((char *)g);
}
+DEF_WEAK(regfree);