From owner-svn-src-stable-10@freebsd.org Wed Aug 31 18:00:43 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6B41BC894D; Wed, 31 Aug 2016 18:00:43 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A91EF7F; Wed, 31 Aug 2016 18:00:43 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7VI0g2F036937; Wed, 31 Aug 2016 18:00:42 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7VI0gWX036930; Wed, 31 Aug 2016 18:00:42 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201608311800.u7VI0gWX036930@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 31 Aug 2016 18:00:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r305138 - in stable: 10/contrib/ipfilter 10/sys/contrib/ipfilter/netinet 11/contrib/ipfilter 11/sys/contrib/ipfilter/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2016 18:00:43 -0000 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 #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 #include 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)