mirror of
https://gitlab.freedesktop.org/libbsd/libbsd.git
synced 2025-02-13 12:01:21 +01:00
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.
This commit is contained in:
parent
fbd622971d
commit
200eeb1265
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -27,7 +27,11 @@
|
||||
#ifndef LIBBSD_LIBUTIL_H
|
||||
#define LIBBSD_LIBUTIL_H
|
||||
|
||||
#ifdef LIBBSD_DISABLE_DEPRECATED
|
||||
#error "Deprecated header, use <bsd/libutil.h> or libbsd-overlay.pc instead."
|
||||
#else
|
||||
#warning "Deprecated header, use <bsd/libutil.h> or libbsd-overlay.pc instead."
|
||||
#endif
|
||||
|
||||
#include <bsd/libutil.h>
|
||||
|
||||
|
@ -27,7 +27,11 @@
|
||||
#ifndef LIBBSD_NLIST_H
|
||||
#define LIBBSD_NLIST_H
|
||||
|
||||
#ifdef LIBBSD_DISABLE_DEPRECATED
|
||||
#error "Deprecated header, use <bsd/nlist.h> or libbsd-overlay.pc instead."
|
||||
#else
|
||||
#warning "Deprecated header, use <bsd/nlist.h> or libbsd-overlay.pc instead."
|
||||
#endif
|
||||
|
||||
#include <bsd/nlist.h>
|
||||
|
||||
|
@ -27,7 +27,11 @@
|
||||
#ifndef LIBBSD_VIS_H
|
||||
#define LIBBSD_VIS_H
|
||||
|
||||
#ifdef LIBBSD_DISABLE_DEPRECATED
|
||||
#error "Deprecated header, use <bsd/vis.h> or libbsd-overlay.pc instead."
|
||||
#else
|
||||
#warning "Deprecated header, use <bsd/vis.h> or libbsd-overlay.pc instead."
|
||||
#endif
|
||||
|
||||
#include <bsd/vis.h>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user