summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2010-03-09 21:01:12 +0000
committered <ed@FreeBSD.org>2010-03-09 21:01:12 +0000
commitc5fa503cec8f3106fda29df1e39eab08c5416bc9 (patch)
tree03454dfe6e9ec5f335216e8c94654eaf5981da2a
parent4d3d204932053d26cf21ca49d47afc35db8ee63d (diff)
downloadFreeBSD-src-c5fa503cec8f3106fda29df1e39eab08c5416bc9.zip
FreeBSD-src-c5fa503cec8f3106fda29df1e39eab08c5416bc9.tar.gz
Add warnings to <regexp.h> and <sys/timeb.h>.
These header files only provide functionality that can be used in combination with libcompat. In order to prevent people from including them without any actual use (which happens a lot with <sys/timeb.h>), put a warning here to make people more aware. This means we have to lower WARNS for libcompat, which is no big deal.
-rw-r--r--include/regexp.h4
-rw-r--r--lib/libcompat/Makefile2
-rw-r--r--sys/sys/timeb.h4
3 files changed, 9 insertions, 1 deletions
diff --git a/include/regexp.h b/include/regexp.h
index 3a8d325..39cdf3a 100644
--- a/include/regexp.h
+++ b/include/regexp.h
@@ -37,6 +37,10 @@
#ifndef _REGEXP_H_
#define _REGEXP_H_
+#ifdef __GNUC__
+#warning "this file includes <regexp.h> which is deprecated, use <regex.h> instead"
+#endif
+
/*
* Definitions etc. for regexp(3) routines.
*
diff --git a/lib/libcompat/Makefile b/lib/libcompat/Makefile
index 2ca46f0..3a9d666 100644
--- a/lib/libcompat/Makefile
+++ b/lib/libcompat/Makefile
@@ -5,7 +5,7 @@ LIB=compat
CFLAGS+=-DLIBC_SCCS -DSYSLIBC_SCCS -I${.CURDIR}/../libc/locale
NO_PIC=
-WARNS?= 1
+WARNS?= 0
.PATH: ${.CURDIR}/4.1/${MACHINE_ARCH} ${.CURDIR}/4.1 \
${.CURDIR}/4.3/${MACHINE_ARCH} ${.CURDIR}/4.3 \
diff --git a/sys/sys/timeb.h b/sys/sys/timeb.h
index 59aa466..810c523 100644
--- a/sys/sys/timeb.h
+++ b/sys/sys/timeb.h
@@ -38,6 +38,10 @@
#ifndef _SYS_TIMEB_H_
#define _SYS_TIMEB_H_
+#ifdef __GNUC__
+#warning "this file includes <sys/timeb.h> which is deprecated"
+#endif
+
#include <sys/_types.h>
#ifndef _TIME_T_DECLARED
OpenPOWER on IntegriCloud