From 200eeb1265ec50ef54660d054f41af71c49e57fc Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Fri, 27 May 2011 21:58:20 +0200 Subject: [PATCH] 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. --- include/bsd/cdefs.h | 4 ++++ include/bsd/inet.h | 4 ++++ include/bsd/ip_icmp.h | 4 ++++ include/bsd/queue.h | 4 ++++ include/bsd/random.h | 4 ++++ include/libutil.h | 4 ++++ include/nlist.h | 4 ++++ include/vis.h | 4 ++++ 8 files changed, 32 insertions(+) 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 or libbsd-overlay.pc instead." +#else #warning "Deprecated header, use or libbsd-overlay.pc instead." +#endif #include 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 instead." +#else #warning "Deprecated header, use instead." +#endif #include 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 or libbsd-overlay.pc instead." +#else #warning "Deprecated header, use or libbsd-overlay.pc instead." +#endif #include 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 or libbsd-overlay.pc instead." +#else #warning "Deprecated header, use or libbsd-overlay.pc instead." +#endif #include 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 instead." +#else #warning "Deprecated header, use instead." +#endif #include diff --git a/include/libutil.h b/include/libutil.h index f2196f7..a995c4a 100644 --- a/include/libutil.h +++ b/include/libutil.h @@ -27,7 +27,11 @@ #ifndef LIBBSD_LIBUTIL_H #define LIBBSD_LIBUTIL_H +#ifdef LIBBSD_DISABLE_DEPRECATED +#error "Deprecated header, use or libbsd-overlay.pc instead." +#else #warning "Deprecated header, use or libbsd-overlay.pc instead." +#endif #include diff --git a/include/nlist.h b/include/nlist.h index 9c5c5eb..ee576ae 100644 --- a/include/nlist.h +++ b/include/nlist.h @@ -27,7 +27,11 @@ #ifndef LIBBSD_NLIST_H #define LIBBSD_NLIST_H +#ifdef LIBBSD_DISABLE_DEPRECATED +#error "Deprecated header, use or libbsd-overlay.pc instead." +#else #warning "Deprecated header, use or libbsd-overlay.pc instead." +#endif #include diff --git a/include/vis.h b/include/vis.h index 564c10d..16f7976 100644 --- a/include/vis.h +++ b/include/vis.h @@ -27,7 +27,11 @@ #ifndef LIBBSD_VIS_H #define LIBBSD_VIS_H +#ifdef LIBBSD_DISABLE_DEPRECATED +#error "Deprecated header, use or libbsd-overlay.pc instead." +#else #warning "Deprecated header, use or libbsd-overlay.pc instead." +#endif #include