summaryrefslogtreecommitdiff
path: root/include/bsd
diff options
context:
space:
mode:
authorGuillem Jover <guillem@hadrons.org>2011-05-27 21:58:20 +0200
committerGuillem Jover <guillem@hadrons.org>2011-05-29 02:39:29 +0200
commit200eeb1265ec50ef54660d054f41af71c49e57fc (patch)
tree5a6aa0883c74e76f9c7e78f5cc66ea8373f72950 /include/bsd
parentfbd622971d0a22dd94cf23c93dab72f5c6a42bf6 (diff)
downloadlibbsd-200eeb1265ec50ef54660d054f41af71c49e57fc.tar.gz
Add LIBBSD_DISABLE_DEPRECATED to deprecated headers
When enabled this will make the inclusion of deprecated headers a fatal error so that it's easier to spot.
Diffstat (limited to 'include/bsd')
-rw-r--r--include/bsd/cdefs.h4
-rw-r--r--include/bsd/inet.h4
-rw-r--r--include/bsd/ip_icmp.h4
-rw-r--r--include/bsd/queue.h4
-rw-r--r--include/bsd/random.h4
5 files changed, 20 insertions, 0 deletions
diff --git a/include/bsd/cdefs.h b/include/bsd/cdefs.h
index ac36e63..3039930 100644
--- a/include/bsd/cdefs.h
+++ b/include/bsd/cdefs.h
@@ -27,7 +27,11 @@
#ifndef LIBBSD_BSD_CDEFS_H
#define LIBBSD_BSD_CDEFS_H
+#ifdef LIBBSD_DISABLE_DEPRECATED
+#error "Deprecated header, use <bsd/sys/cdefs.h> or libbsd-overlay.pc instead."
+#else
#warning "Deprecated header, use <bsd/sys/cdefs.h> or libbsd-overlay.pc instead."
+#endif
#include <bsd/sys/cdefs.h>
diff --git a/include/bsd/inet.h b/include/bsd/inet.h
index 5f4862d..223baf5 100644
--- a/include/bsd/inet.h
+++ b/include/bsd/inet.h
@@ -27,7 +27,11 @@
#ifndef LIBBSD_INET_H
#define LIBBSD_INET_H
+#ifdef LIBBSD_DISABLE_DEPRECATED
+#error "Deprecated header, use <arpa/inet.h> instead."
+#else
#warning "Deprecated header, use <arpa/inet.h> instead."
+#endif
#include <arpa/inet.h>
diff --git a/include/bsd/ip_icmp.h b/include/bsd/ip_icmp.h
index 53e976a..65f3ff7 100644
--- a/include/bsd/ip_icmp.h
+++ b/include/bsd/ip_icmp.h
@@ -27,7 +27,11 @@
#ifndef LIBBSD_BSD_IP_ICMP_H
#define LIBBSD_BSD_IP_ICMP_H
+#ifdef LIBBSD_DISABLE_DEPRECATED
+#error "Deprecated header, use <bsd/netinet/ip_icmp.h> or libbsd-overlay.pc instead."
+#else
#warning "Deprecated header, use <bsd/netinet/ip_icmp.h> or libbsd-overlay.pc instead."
+#endif
#include <bsd/netinet/ip_icmp.h>
diff --git a/include/bsd/queue.h b/include/bsd/queue.h
index 56f5515..30775ec 100644
--- a/include/bsd/queue.h
+++ b/include/bsd/queue.h
@@ -27,7 +27,11 @@
#ifndef LIBBSD_BSD_QUEUE_H
#define LIBBSD_BSD_QUEUE_H
+#ifdef LIBBSD_DISABLE_DEPRECATED
+#error "Deprecated header, use <bsd/sys/queue.h> or libbsd-overlay.pc instead."
+#else
#warning "Deprecated header, use <bsd/sys/queue.h> or libbsd-overlay.pc instead."
+#endif
#include <bsd/sys/queue.h>
diff --git a/include/bsd/random.h b/include/bsd/random.h
index bfbd0ab..7b35f8b 100644
--- a/include/bsd/random.h
+++ b/include/bsd/random.h
@@ -27,7 +27,11 @@
#ifndef LIBBSD_RANDOM_H
#define LIBBSD_RANDOM_H
+#ifdef LIBBSD_DISABLE_DEPRECATED
+#error "Deprecated header, use <bsd/stdlib.h> instead."
+#else
#warning "Deprecated header, use <bsd/stdlib.h> instead."
+#endif
#include <bsd/stdlib.h>