summaryrefslogtreecommitdiff
path: root/include/bsd
diff options
context:
space:
mode:
authorGuillem Jover <guillem@hadrons.org>2011-02-23 12:38:42 +0100
committerGuillem Jover <guillem@hadrons.org>2011-05-14 14:18:22 +0200
commit8b6a74775b918f203ceee3d70ca8b9f7e0256b5f (patch)
treea45c2584216c0e30a8d8c0814027cdca0f9e7203 /include/bsd
parentc594192bac39e8ec9487f729b22dc0037d58b8c5 (diff)
downloadlibbsd-8b6a74775b918f203ceee3d70ca8b9f7e0256b5f.tar.gz
Conditionalize temporary compatibility inclusions
These inclusions were in place for backward compatibility purposes, when the headers were split so that code using them would not break. Make it possible for applications to disable them by defining LIBBSD_CLEAN_INCLUDES so that buildability can be tested and fixed before they get removed in a subsequent release.
Diffstat (limited to 'include/bsd')
-rw-r--r--include/bsd/stdlib.h2
-rw-r--r--include/bsd/string.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/include/bsd/stdlib.h b/include/bsd/stdlib.h
index 6736ed1..4a185fc 100644
--- a/include/bsd/stdlib.h
+++ b/include/bsd/stdlib.h
@@ -47,8 +47,10 @@
#endif
/* FIXME: Temporary inclusions to avoid API breakage, will be removed soon. */
+#ifndef LIBBSD_CLEAN_INCLUDES
#include <bsd/stdio.h>
#include <bsd/unistd.h>
+#endif
__BEGIN_DECLS
u_int32_t arc4random();
diff --git a/include/bsd/string.h b/include/bsd/string.h
index edc16fc..f9e733f 100644
--- a/include/bsd/string.h
+++ b/include/bsd/string.h
@@ -36,8 +36,10 @@
#include <string.h>
#endif
+#ifndef LIBBSD_CLEAN_INCLUDES
/* FIXME: Temporary inclusion to avoid API breakage, will be removed soon. */
#include <bsd/stdio.h>
+#endif
__BEGIN_DECLS
size_t strlcpy(char *dst, const char *src, size_t siz);