summaryrefslogtreecommitdiff
path: root/lib/libc/hidden
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/hidden')
-rw-r--r--lib/libc/hidden/errno.h35
-rw-r--r--lib/libc/hidden/signal.h27
-rw-r--r--lib/libc/hidden/stdio.h13
3 files changed, 72 insertions, 3 deletions
diff --git a/lib/libc/hidden/errno.h b/lib/libc/hidden/errno.h
new file mode 100644
index 00000000000..ee18c32f089
--- /dev/null
+++ b/lib/libc/hidden/errno.h
@@ -0,0 +1,35 @@
+/* $OpenBSD: errno.h,v 1.1 2015/09/06 20:26:20 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_ERRNO_H_
+#define _LIBC_ERRNO_H_
+
+/* we want the const-correct declarations inside libc */
+#define __SYS_ERRLIST
+
+#include_next <errno.h>
+#include "namespace.h"
+
+extern const int sys_nerr;
+extern const char *const sys_errlist[];
+
+extern PROTO_NORMAL(sys_nerr);
+extern PROTO_NORMAL(sys_errlist);
+
+/*PROTO_OVERRIDABLE(__errno);*/
+
+#endif /* _LIBC_ERRNO_H_ */
diff --git a/lib/libc/hidden/signal.h b/lib/libc/hidden/signal.h
new file mode 100644
index 00000000000..f3535fcabea
--- /dev/null
+++ b/lib/libc/hidden/signal.h
@@ -0,0 +1,27 @@
+/* $OpenBSD: signal.h,v 1.1 2015/09/06 20:26:20 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_SIGNAL_H
+#define _LIBC_SIGNAL_H
+
+#include_next <signal.h>
+#include "namespace.h"
+
+extern PROTO_NORMAL(sys_siglist);
+extern PROTO_NORMAL(sys_signame);
+
+#endif /* !_LIBC_SIGNAL_H */
diff --git a/lib/libc/hidden/stdio.h b/lib/libc/hidden/stdio.h
index 8a5530cd54f..440a6bbfc8b 100644
--- a/lib/libc/hidden/stdio.h
+++ b/lib/libc/hidden/stdio.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdio.h,v 1.1 2015/08/31 02:53:56 guenther Exp $ */
+/* $OpenBSD: stdio.h,v 1.2 2015/09/06 20:26:20 guenther Exp $ */
/*
* Copyright (c) 2015 Philip Guenther <guenther@openbsd.org>
*
@@ -14,12 +14,13 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $OpenBSD: stdio.h,v 1.1 2015/08/31 02:53:56 guenther Exp $ */
-/* $NetBSD: stdio.h,v 1.18 1996/04/25 18:29:21 jtc Exp $ */
#ifndef _LIBC_STDIO_H_
#define _LIBC_STDIO_H_
+/* we want the const-correct declarations inside libc */
+#define __SYS_ERRLIST
+
#include_next <stdio.h>
#include "namespace.h"
@@ -27,6 +28,12 @@ __BEGIN_HIDDEN_DECLS
char *_mktemp(char *);
__END_HIDDEN_DECLS
+extern const int sys_nerr;
+extern const char *const sys_errlist[];
+
+extern PROTO_NORMAL(sys_nerr);
+extern PROTO_NORMAL(sys_errlist);
+
PROTO_NORMAL(__srget);
PROTO_NORMAL(__swbuf);
PROTO_NORMAL(asprintf);