summaryrefslogtreecommitdiffstats
path: root/sys/contrib
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2016-08-31 18:00:41 +0000
committerdim <dim@FreeBSD.org>2016-08-31 18:00:41 +0000
commit741d22d0325077858ccd9576a75daf0d600f42db (patch)
treeed5647b4f763c247ffbbad31519753bb69de04fb /sys/contrib
parent9dae47b3c1884545f91d86bb78c2b763c40fd6a7 (diff)
downloadFreeBSD-src-741d22d0325077858ccd9576a75daf0d600f42db.zip
FreeBSD-src-741d22d0325077858ccd9576a75daf0d600f42db.tar.gz
MFC r304953:
Define ipfilter's SOLARIS macro in a defined and portable way. Reviewed by: cy Differential Revision: https://reviews.freebsd.org/D7671 MFC r304959 (by kib): Complete r304953. Sponsored by: The FreeBSD Foundation MFC r304964: Follow-up to r304953, in which I broke the build: apparently the SOLARIS macro is defined in lots of different places in ipfilter, so replace all of the nonportable definitions with portable ones. Pointy hat to: dim
Diffstat (limited to 'sys/contrib')
-rw-r--r--sys/contrib/ipfilter/netinet/ip_compat.h8
-rw-r--r--sys/contrib/ipfilter/netinet/ip_fil.h6
-rw-r--r--sys/contrib/ipfilter/netinet/ip_log.c6
-rw-r--r--sys/contrib/ipfilter/netinet/ip_nat.h8
-rw-r--r--sys/contrib/ipfilter/netinet/ip_proxy.h8
5 files changed, 29 insertions, 7 deletions
diff --git a/sys/contrib/ipfilter/netinet/ip_compat.h b/sys/contrib/ipfilter/netinet/ip_compat.h
index bcb47e9..a689771 100644
--- a/sys/contrib/ipfilter/netinet/ip_compat.h
+++ b/sys/contrib/ipfilter/netinet/ip_compat.h
@@ -32,7 +32,13 @@
# define __KERNEL__
#endif
-#define SOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4)))
+#ifndef SOLARIS
+# if defined(sun) && (defined(__svr4__) || defined(__SVR4))
+# define SOLARIS 1
+# else
+# define SOLARIS 0
+# endif
+#endif
#if defined(__SVR4) || defined(__svr4__) || defined(__sgi)
diff --git a/sys/contrib/ipfilter/netinet/ip_fil.h b/sys/contrib/ipfilter/netinet/ip_fil.h
index b065139..076433c 100644
--- a/sys/contrib/ipfilter/netinet/ip_fil.h
+++ b/sys/contrib/ipfilter/netinet/ip_fil.h
@@ -29,7 +29,11 @@
#endif
#ifndef SOLARIS
-# define SOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4)))
+# if defined(sun) && (defined(__svr4__) || defined(__SVR4))
+# define SOLARIS 1
+# else
+# define SOLARIS 0
+# endif
#endif
#ifndef __P
diff --git a/sys/contrib/ipfilter/netinet/ip_log.c b/sys/contrib/ipfilter/netinet/ip_log.c
index d898d96..d1fd01f 100644
--- a/sys/contrib/ipfilter/netinet/ip_log.c
+++ b/sys/contrib/ipfilter/netinet/ip_log.c
@@ -19,7 +19,11 @@
# include <osreldate.h>
#endif
#ifndef SOLARIS
-# define SOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4)))
+# if defined(sun) && (defined(__svr4__) || defined(__SVR4))
+# define SOLARIS 1
+# else
+# define SOLARIS 0
+# endif
#endif
#include <sys/errno.h>
#include <sys/types.h>
diff --git a/sys/contrib/ipfilter/netinet/ip_nat.h b/sys/contrib/ipfilter/netinet/ip_nat.h
index a57bf0c..6e245f8 100644
--- a/sys/contrib/ipfilter/netinet/ip_nat.h
+++ b/sys/contrib/ipfilter/netinet/ip_nat.h
@@ -13,8 +13,12 @@
#ifndef __IP_NAT_H__
#define __IP_NAT_H__
-#ifndef SOLARIS
-#define SOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4)))
+#ifndef SOLARIS
+# if defined(sun) && (defined(__svr4__) || defined(__SVR4))
+# define SOLARIS 1
+# else
+# define SOLARIS 0
+# endif
#endif
#if defined(__STDC__) || defined(__GNUC__) || defined(_AIX51)
diff --git a/sys/contrib/ipfilter/netinet/ip_proxy.h b/sys/contrib/ipfilter/netinet/ip_proxy.h
index 1a1fdfa..832a379 100644
--- a/sys/contrib/ipfilter/netinet/ip_proxy.h
+++ b/sys/contrib/ipfilter/netinet/ip_proxy.h
@@ -12,8 +12,12 @@
#ifndef __IP_PROXY_H__
#define __IP_PROXY_H__
-#ifndef SOLARIS
-#define SOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4)))
+#ifndef SOLARIS
+# if defined(sun) && (defined(__svr4__) || defined(__SVR4))
+# define SOLARIS 1
+# else
+# define SOLARIS 0
+# endif
#endif
#if defined(__STDC__) || defined(__GNUC__) || defined(_AIX51)
OpenPOWER on IntegriCloud