summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/bsd/err.h8
-rw-r--r--include/bsd/getopt.h5
-rw-r--r--include/bsd/stdio.h5
-rw-r--r--include/bsd/stdlib.h9
-rw-r--r--include/bsd/string.h6
-rw-r--r--include/bsd/sys/cdefs.h4
-rw-r--r--include/bsd/unistd.h6
7 files changed, 42 insertions, 1 deletions
diff --git a/include/bsd/err.h b/include/bsd/err.h
index 489138b..b622655 100644
--- a/include/bsd/err.h
+++ b/include/bsd/err.h
@@ -29,9 +29,15 @@
#define LIBBSD_ERR_H
#include <sys/cdefs.h>
-#include <err.h>
+
#include <stdarg.h>
+#ifdef LIBBSD_TRANSPARENT
+#include_next <err.h>
+#else
+#include <err.h>
+#endif
+
__BEGIN_DECLS
extern void warnc (int code, const char *format, ...);
extern void vwarnc (int code, const char *format, va_list ap);
diff --git a/include/bsd/getopt.h b/include/bsd/getopt.h
index 699a00e..b0057cf 100644
--- a/include/bsd/getopt.h
+++ b/include/bsd/getopt.h
@@ -29,7 +29,12 @@
#define LIBBSD_GETOPT_H
#include <sys/cdefs.h>
+
+#ifdef LIBBSD_TRANSPARENT
+#include_next <getopt.h>
+#else
#include <getopt.h>
+#endif
__BEGIN_DECLS
extern int optreset;
diff --git a/include/bsd/stdio.h b/include/bsd/stdio.h
index 882f374..dfde0c3 100644
--- a/include/bsd/stdio.h
+++ b/include/bsd/stdio.h
@@ -29,7 +29,12 @@
#include <sys/cdefs.h>
#include <sys/types.h>
+
+#ifdef LIBBSD_TRANSPARENT
+#include_next <stdio.h>
+#else
#include <stdio.h>
+#endif
__BEGIN_DECLS
const char *fmtcheck(const char *, const char *);
diff --git a/include/bsd/stdlib.h b/include/bsd/stdlib.h
index bf30f36..6736ed1 100644
--- a/include/bsd/stdlib.h
+++ b/include/bsd/stdlib.h
@@ -32,10 +32,19 @@
#include <sys/cdefs.h>
#include <sys/stat.h>
#include <stdint.h>
+
+#ifdef LIBBSD_TRANSPARENT
+#include_next <stdlib.h>
+#else
#include <stdlib.h>
+#endif
/* For compatibility with NetBSD, which defines humanize_number here. */
+#ifdef LIBBSD_TRANSPARENT
#include <libutil.h>
+#else
+#include <bsd/libutil.h>
+#endif
/* FIXME: Temporary inclusions to avoid API breakage, will be removed soon. */
#include <bsd/stdio.h>
diff --git a/include/bsd/string.h b/include/bsd/string.h
index cf72cc0..edc16fc 100644
--- a/include/bsd/string.h
+++ b/include/bsd/string.h
@@ -30,6 +30,12 @@
#include <sys/cdefs.h>
#include <sys/types.h>
+#ifdef LIBBSD_TRANSPARENT
+#include_next <string.h>
+#else
+#include <string.h>
+#endif
+
/* FIXME: Temporary inclusion to avoid API breakage, will be removed soon. */
#include <bsd/stdio.h>
diff --git a/include/bsd/sys/cdefs.h b/include/bsd/sys/cdefs.h
index 4d9aa49..87d8a48 100644
--- a/include/bsd/sys/cdefs.h
+++ b/include/bsd/sys/cdefs.h
@@ -27,7 +27,11 @@
#ifndef LIBBSD_CDEFS_H
#define LIBBSD_CDEFS_H
+#ifdef LIBBSD_TRANSPARENT
+#include_next <sys/cdefs.h>
+#else
#include <sys/cdefs.h>
+#endif
#ifndef __dead2
# define __dead2
diff --git a/include/bsd/unistd.h b/include/bsd/unistd.h
index 2a22fbc..ac56787 100644
--- a/include/bsd/unistd.h
+++ b/include/bsd/unistd.h
@@ -30,6 +30,12 @@
#include <sys/cdefs.h>
#include <sys/stat.h>
+#ifdef LIBBSD_TRANSPARENT
+#include_next <unistd.h>
+#else
+#include <unistd.h>
+#endif
+
#ifndef S_ISTXT
#define S_ISTXT S_ISVTX
#endif