Author: dim
Date: Wed Aug 31 18:00:41 2016
New Revision: 305138
URL: https://svnweb.freebsd.org/changeset/base/305138

Log:
  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

Modified:
  stable/10/contrib/ipfilter/opts.h
  stable/10/sys/contrib/ipfilter/netinet/ip_compat.h
  stable/10/sys/contrib/ipfilter/netinet/ip_fil.h
  stable/10/sys/contrib/ipfilter/netinet/ip_log.c
  stable/10/sys/contrib/ipfilter/netinet/ip_nat.h
  stable/10/sys/contrib/ipfilter/netinet/ip_proxy.h
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/contrib/ipfilter/opts.h
  stable/11/sys/contrib/ipfilter/netinet/ip_compat.h
  stable/11/sys/contrib/ipfilter/netinet/ip_fil.h
  stable/11/sys/contrib/ipfilter/netinet/ip_log.c
  stable/11/sys/contrib/ipfilter/netinet/ip_nat.h
  stable/11/sys/contrib/ipfilter/netinet/ip_proxy.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/10/contrib/ipfilter/opts.h
==============================================================================
--- stable/10/contrib/ipfilter/opts.h   Wed Aug 31 17:52:11 2016        
(r305137)
+++ stable/10/contrib/ipfilter/opts.h   Wed Aug 31 18:00:41 2016        
(r305138)
@@ -12,7 +12,11 @@
 #define        __OPTS_H__
 
 #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
 #define        OPT_REMOVE      0x000001
 #define        OPT_DEBUG       0x000002

Modified: stable/10/sys/contrib/ipfilter/netinet/ip_compat.h
==============================================================================
--- stable/10/sys/contrib/ipfilter/netinet/ip_compat.h  Wed Aug 31 17:52:11 
2016        (r305137)
+++ stable/10/sys/contrib/ipfilter/netinet/ip_compat.h  Wed Aug 31 18:00:41 
2016        (r305138)
@@ -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)

Modified: stable/10/sys/contrib/ipfilter/netinet/ip_fil.h
==============================================================================
--- stable/10/sys/contrib/ipfilter/netinet/ip_fil.h     Wed Aug 31 17:52:11 
2016        (r305137)
+++ stable/10/sys/contrib/ipfilter/netinet/ip_fil.h     Wed Aug 31 18:00:41 
2016        (r305138)
@@ -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

Modified: stable/10/sys/contrib/ipfilter/netinet/ip_log.c
==============================================================================
--- stable/10/sys/contrib/ipfilter/netinet/ip_log.c     Wed Aug 31 17:52:11 
2016        (r305137)
+++ stable/10/sys/contrib/ipfilter/netinet/ip_log.c     Wed Aug 31 18:00:41 
2016        (r305138)
@@ -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>

Modified: stable/10/sys/contrib/ipfilter/netinet/ip_nat.h
==============================================================================
--- stable/10/sys/contrib/ipfilter/netinet/ip_nat.h     Wed Aug 31 17:52:11 
2016        (r305137)
+++ stable/10/sys/contrib/ipfilter/netinet/ip_nat.h     Wed Aug 31 18:00:41 
2016        (r305138)
@@ -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)

Modified: stable/10/sys/contrib/ipfilter/netinet/ip_proxy.h
==============================================================================
--- stable/10/sys/contrib/ipfilter/netinet/ip_proxy.h   Wed Aug 31 17:52:11 
2016        (r305137)
+++ stable/10/sys/contrib/ipfilter/netinet/ip_proxy.h   Wed Aug 31 18:00:41 
2016        (r305138)
@@ -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)
_______________________________________________
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"

Reply via email to