summaryrefslogtreecommitdiffstats
path: root/lib/libc/hidden
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2015-09-12 16:23:14 +0000
committerguenther <guenther@openbsd.org>2015-09-12 16:23:14 +0000
commit38a75b98f3fd53b60cfeaff8ed9b08fd7afaad1c (patch)
tree8b99daf217719f1c27cb0c1e00e3a53852fc2809 /lib/libc/hidden
parentsys/syscall_mi is only included by MD trap.c files, which have reason to (diff)
downloadwireguard-openbsd-38a75b98f3fd53b60cfeaff8ed9b08fd7afaad1c.tar.xz
wireguard-openbsd-38a75b98f3fd53b60cfeaff8ed9b08fd7afaad1c.zip
Wrap <inttypes.h> and finish wrapping of <wchar.h> so that calls go direct
and the symbols not in the C standard are weak
Diffstat (limited to 'lib/libc/hidden')
-rw-r--r--lib/libc/hidden/inttypes.h30
-rw-r--r--lib/libc/hidden/wchar.h98
2 files changed, 79 insertions, 49 deletions
diff --git a/lib/libc/hidden/inttypes.h b/lib/libc/hidden/inttypes.h
new file mode 100644
index 00000000000..25427145fe5
--- /dev/null
+++ b/lib/libc/hidden/inttypes.h
@@ -0,0 +1,30 @@
+/* $OpenBSD: inttypes.h,v 1.1 2015/09/12 16:23:14 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_INTTYPES_H_
+#define _LIBC_INTTYPES_H_
+
+#include_next <inttypes.h>
+
+PROTO_STD_DEPRECATED(imaxabs);
+PROTO_STD_DEPRECATED(imaxdiv);
+PROTO_NORMAL(strtoimax);
+PROTO_NORMAL(strtoumax);
+PROTO_NORMAL(wcstoimax);
+PROTO_NORMAL(wcstoumax);
+
+#endif /* _LIBC_INTTYPES_H_ */
diff --git a/lib/libc/hidden/wchar.h b/lib/libc/hidden/wchar.h
index 290eec61c48..36b02094790 100644
--- a/lib/libc/hidden/wchar.h
+++ b/lib/libc/hidden/wchar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: wchar.h,v 1.2 2015/09/10 18:13:46 guenther Exp $ */
+/* $OpenBSD: wchar.h,v 1.3 2015/09/12 16:23:14 guenther Exp $ */
/*
* Copyright (c) 2015 Philip Guenther <guenther@openbsd.org>
*
@@ -20,7 +20,7 @@
#include_next <wchar.h>
-/*PROTO_NORMAL(btowc);*/
+PROTO_NORMAL(btowc);
PROTO_NORMAL(fgetwc);
PROTO_NORMAL(fgetws);
PROTO_NORMAL(fputwc);
@@ -30,12 +30,12 @@ PROTO_NORMAL(fwprintf);
PROTO_NORMAL(fwscanf);
PROTO_NORMAL(getwc);
PROTO_NORMAL(getwchar);
-/*PROTO_NORMAL(mbrlen);*/
-/*PROTO_NORMAL(mbrtowc);*/
-/*PROTO_NORMAL(mbsinit);*/
-/*PROTO_NORMAL(mbsnrtowcs);*/
-/*PROTO_NORMAL(mbsrtowcs);*/
-PROTO_NORMAL(open_wmemstream);
+PROTO_NORMAL(mbrlen);
+PROTO_NORMAL(mbrtowc);
+PROTO_NORMAL(mbsinit);
+PROTO_NORMAL(mbsnrtowcs);
+PROTO_NORMAL(mbsrtowcs);
+PROTO_DEPRECATED(open_wmemstream);
PROTO_NORMAL(putwc);
PROTO_NORMAL(putwchar);
PROTO_NORMAL(swprintf);
@@ -47,47 +47,47 @@ PROTO_NORMAL(vswprintf);
PROTO_NORMAL(vswscanf);
PROTO_NORMAL(vwprintf);
PROTO_NORMAL(vwscanf);
-/*PROTO_NORMAL(wcrtomb);*/
-/*PROTO_NORMAL(wcscasecmp);*/
-/*PROTO_NORMAL(wcscat);*/
-/*PROTO_NORMAL(wcschr);*/
-/*PROTO_NORMAL(wcscmp);*/
-/*PROTO_NORMAL(wcscoll);*/
-/*PROTO_NORMAL(wcscpy);*/
-/*PROTO_NORMAL(wcscspn);*/
-/*PROTO_NORMAL(wcsdup);*/
-/*PROTO_NORMAL(wcsftime);*/
-/*PROTO_NORMAL(wcslcat);*/
-/*PROTO_NORMAL(wcslcpy);*/
-/*PROTO_NORMAL(wcslen);*/
-/*PROTO_NORMAL(wcsncasecmp);*/
-/*PROTO_NORMAL(wcsncat);*/
-/*PROTO_NORMAL(wcsncmp);*/
-/*PROTO_NORMAL(wcsncpy);*/
-/*PROTO_NORMAL(wcsnrtombs);*/
-/*PROTO_NORMAL(wcspbrk);*/
-/*PROTO_NORMAL(wcsrchr);*/
-/*PROTO_NORMAL(wcsrtombs);*/
-/*PROTO_NORMAL(wcsspn);*/
-/*PROTO_NORMAL(wcsstr);*/
-/*PROTO_NORMAL(wcstod);*/
-/*PROTO_NORMAL(wcstof);*/
-/*PROTO_NORMAL(wcstok);*/
-/*PROTO_NORMAL(wcstol);*/
-/*PROTO_NORMAL(wcstold);*/
-/*PROTO_NORMAL(wcstoll);*/
-/*PROTO_NORMAL(wcstoul);*/
-/*PROTO_NORMAL(wcstoull);*/
-/*PROTO_NORMAL(wcswcs);*/
-/*PROTO_NORMAL(wcswidth);*/
-/*PROTO_NORMAL(wcsxfrm);*/
-/*PROTO_NORMAL(wctob);*/
-/*PROTO_NORMAL(wcwidth);*/
-/*PROTO_NORMAL(wmemchr);*/
-/*PROTO_NORMAL(wmemcmp);*/
-/*PROTO_NORMAL(wmemcpy);*/
-/*PROTO_NORMAL(wmemmove);*/
-/*PROTO_NORMAL(wmemset);*/
+PROTO_NORMAL(wcrtomb);
+PROTO_NORMAL(wcscasecmp);
+PROTO_NORMAL(wcscat);
+PROTO_NORMAL(wcschr);
+PROTO_NORMAL(wcscmp);
+PROTO_STD_DEPRECATED(wcscoll);
+PROTO_STD_DEPRECATED(wcscpy);
+PROTO_NORMAL(wcscspn);
+PROTO_NORMAL(wcsdup);
+PROTO_STD_DEPRECATED(wcsftime);
+PROTO_NORMAL(wcslcat);
+PROTO_NORMAL(wcslcpy);
+PROTO_NORMAL(wcslen);
+PROTO_NORMAL(wcsncasecmp);
+PROTO_NORMAL(wcsncat);
+PROTO_NORMAL(wcsncmp);
+PROTO_NORMAL(wcsncpy);
+PROTO_NORMAL(wcsnrtombs);
+PROTO_NORMAL(wcspbrk);
+PROTO_NORMAL(wcsrchr);
+PROTO_NORMAL(wcsrtombs);
+PROTO_NORMAL(wcsspn);
+PROTO_NORMAL(wcsstr);
+PROTO_NORMAL(wcstod);
+PROTO_NORMAL(wcstof);
+PROTO_STD_DEPRECATED(wcstok);
+PROTO_NORMAL(wcstol);
+PROTO_NORMAL(wcstold);
+PROTO_NORMAL(wcstoll);
+PROTO_NORMAL(wcstoul);
+PROTO_NORMAL(wcstoull);
+PROTO_DEPRECATED(wcswcs);
+PROTO_NORMAL(wcswidth);
+PROTO_STD_DEPRECATED(wcsxfrm);
+PROTO_NORMAL(wctob);
+PROTO_NORMAL(wcwidth);
+PROTO_NORMAL(wmemchr);
+PROTO_NORMAL(wmemcmp);
+PROTO_NORMAL(wmemcpy);
+PROTO_NORMAL(wmemmove);
+PROTO_NORMAL(wmemset);
PROTO_NORMAL(wprintf);
PROTO_NORMAL(wscanf);