summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2017-05-05 15:50:30 +0300
committerHans Rosenfeld <hans.rosenfeld@joyent.com>2017-05-08 10:42:34 +0200
commitaf5f29ddbc34ad2a499813f913a39accc4c41f0d (patch)
tree563859f443a41451df190887b8d2fd5d14e07ff0
parent4ac5eacf59e3146224496b826f32663415769c4c (diff)
downloadillumos-joyent-af5f29ddbc34ad2a499813f913a39accc4c41f0d.tar.gz
8164 ipf: bad preprocessor use and need FALLTHROUGH
Reviewed by: Jason King <jason.brian.king+illumos@gmail.com> Reviewed by: Robert Mustacchi <rm@joyent.com> Reviewed by: Alexander Pyhalov <apyhalov@gmail.com> Approved by: Hans Rosenfeld <hans.rosenfeld@joyent.com>
-rw-r--r--usr/src/cmd/ipf/lib/common/getifname.c4
-rw-r--r--usr/src/cmd/ipf/tools/ip_fil.c8
-rw-r--r--usr/src/cmd/ipf/tools/ipfstat.c2
-rw-r--r--usr/src/cmd/ipf/tools/ipftest.c9
-rw-r--r--usr/src/cmd/ipf/tools/ipmon.c4
-rw-r--r--usr/src/cmd/ipf/tools/ipnat.c2
-rw-r--r--usr/src/cmd/ipf/tools/lexer.c1
-rw-r--r--usr/src/uts/common/inet/ipf/fil.c13
-rw-r--r--usr/src/uts/common/inet/ipf/ip_auth.c6
-rw-r--r--usr/src/uts/common/inet/ipf/ip_compat.c5
-rw-r--r--usr/src/uts/common/inet/ipf/ip_frag.c4
-rw-r--r--usr/src/uts/common/inet/ipf/ip_log.c14
-rw-r--r--usr/src/uts/common/inet/ipf/ip_nat.c6
-rw-r--r--usr/src/uts/common/inet/ipf/ip_nat6.c6
-rw-r--r--usr/src/uts/common/inet/ipf/ip_proxy.c10
-rw-r--r--usr/src/uts/common/inet/ipf/ipf.h7
-rw-r--r--usr/src/uts/common/inet/ipf/netinet/ip_compat.h2
-rw-r--r--usr/src/uts/common/inet/ipf/netinet/ip_fil.h2
-rw-r--r--usr/src/uts/common/inet/ipf/netinet/ip_frag.h5
-rw-r--r--usr/src/uts/common/inet/ipf/opts.h4
20 files changed, 53 insertions, 61 deletions
diff --git a/usr/src/cmd/ipf/lib/common/getifname.c b/usr/src/cmd/ipf/lib/common/getifname.c
index ef25075dfe..d8da60c789 100644
--- a/usr/src/cmd/ipf/lib/common/getifname.c
+++ b/usr/src/cmd/ipf/lib/common/getifname.c
@@ -7,8 +7,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include "ipf.h"
#include "kmem.h"
@@ -23,7 +21,7 @@
char *getifname(ptr)
struct ifnet *ptr;
{
-# if SOLARIS
+# ifdef SOLARIS
# include <sys/mutex.h>
# include <sys/condvar.h>
# endif
diff --git a/usr/src/cmd/ipf/tools/ip_fil.c b/usr/src/cmd/ipf/tools/ip_fil.c
index 232d3283ba..0736074059 100644
--- a/usr/src/cmd/ipf/tools/ip_fil.c
+++ b/usr/src/cmd/ipf/tools/ip_fil.c
@@ -7,11 +7,6 @@
* Use is subject to license terms.
*/
-#if !defined(lint)
-static const char sccsid[] = "@(#)ip_fil.c 2.41 6/5/96 (C) 1993-2000 Darren Reed";
-static const char rcsid[] = "@(#)$Id: ip_fil.c,v 2.133.2.9 2005/01/08 14:22:18 darrenr Exp $";
-#endif
-
#ifndef SOLARIS
#define SOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4)))
#endif
@@ -47,7 +42,7 @@ struct file;
# include <sys/ptimers.h>
#endif
#include <sys/time.h>
-#if !SOLARIS
+#if !defined(SOLARIS)
# if (NetBSD > 199609) || (OpenBSD > 199603) || (__FreeBSD_version >= 300000)
# include <sys/dirent.h>
# else
@@ -319,6 +314,7 @@ int mode;
error = EPERM;
break;
}
+ /* FALLTHROUGH */
case SIOCIPFGETNEXT :
case SIOCIPFGET :
error = fr_ipftune(cmd, (void *)data, ifs);
diff --git a/usr/src/cmd/ipf/tools/ipfstat.c b/usr/src/cmd/ipf/tools/ipfstat.c
index fd39556465..d72f6ba97a 100644
--- a/usr/src/cmd/ipf/tools/ipfstat.c
+++ b/usr/src/cmd/ipf/tools/ipfstat.c
@@ -57,7 +57,7 @@
#ifdef STATETOP
# include <ctype.h>
# include <signal.h>
-# if SOLARIS || defined(__NetBSD__) || defined(_BSDI_VERSION) || \
+# if defined(SOLARIS) || defined(__NetBSD__) || defined(_BSDI_VERSION) || \
defined(__sgi)
# ifdef ERR
# undef ERR
diff --git a/usr/src/cmd/ipf/tools/ipftest.c b/usr/src/cmd/ipf/tools/ipftest.c
index 2f886c1426..0ed8e84770 100644
--- a/usr/src/cmd/ipf/tools/ipftest.c
+++ b/usr/src/cmd/ipf/tools/ipftest.c
@@ -12,11 +12,6 @@
#include <sys/ioctl.h>
#include <sys/file.h>
-#if !defined(lint)
-static const char sccsid[] = "@(#)ipt.c 1.19 6/3/96 (C) 1993-2000 Darren Reed";
-static const char rcsid[] = "@(#)$Id: ipftest.c,v 1.44.2.4 2005/07/16 06:05:28 darrenr Exp $";
-#endif
-
extern char *optarg;
extern struct frentry *ipfilter[2][2];
extern struct ipread snoop, etherf, tcpd, pcap, iptext, iphex;
@@ -40,7 +35,7 @@ ipf_stack_t *get_ifs __P((void));
ipf_stack_t *create_ifs __P((void));
-#if defined(__NetBSD__) || defined(__OpenBSD__) || SOLARIS || \
+#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(SOLARIS) || \
(_BSDI_VERSION >= 199701) || (__FreeBSD_version >= 300000) || \
defined(__osf__) || defined(linux)
int ipftestioctl __P((int, ioctlcmd_t, ...));
@@ -321,7 +316,7 @@ char *argv[];
}
-#if defined(__NetBSD__) || defined(__OpenBSD__) || SOLARIS || \
+#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(SOLARIS) || \
(_BSDI_VERSION >= 199701) || (__FreeBSD_version >= 300000) || \
defined(__osf__) || defined(linux)
int ipftestioctl(int dev, ioctlcmd_t cmd, ...)
diff --git a/usr/src/cmd/ipf/tools/ipmon.c b/usr/src/cmd/ipf/tools/ipmon.c
index a91e23237a..398730f08e 100644
--- a/usr/src/cmd/ipf/tools/ipmon.c
+++ b/usr/src/cmd/ipf/tools/ipmon.c
@@ -130,10 +130,10 @@ struct flags tcpfl[] = {
{ 0, '\0' }
};
-#if defined(__hpux) || (SOLARIS && (SOLARIS2 < 10))
+#if defined(__hpux) || (defined(SOLARIS) && (SOLARIS2 < 10))
static char *pidfile = "/etc/ipf/ipmon.pid";
#else
-# if (BSD >= 199306) || SOLARIS
+# if (BSD >= 199306) || defined(SOLARIS)
static char *pidfile = "/var/run/ipmon.pid";
# else
static char *pidfile = "/etc/ipmon.pid";
diff --git a/usr/src/cmd/ipf/tools/ipnat.c b/usr/src/cmd/ipf/tools/ipnat.c
index 3a2610a235..941765eb43 100644
--- a/usr/src/cmd/ipf/tools/ipnat.c
+++ b/usr/src/cmd/ipf/tools/ipnat.c
@@ -76,7 +76,7 @@ static const char rcsid[] = "@(#)$Id: ipnat.c,v 1.24.2.2 2005/05/10 21:19:30 dar
#endif
-#if SOLARIS
+#ifdef SOLARIS
#define bzero(a,b) memset(a,0,b)
#endif
int use_inet6 = 0;
diff --git a/usr/src/cmd/ipf/tools/lexer.c b/usr/src/cmd/ipf/tools/lexer.c
index 48b38341d3..3db3a0888b 100644
--- a/usr/src/cmd/ipf/tools/lexer.c
+++ b/usr/src/cmd/ipf/tools/lexer.c
@@ -200,6 +200,7 @@ nextchar:
case '\n' :
lnext = 0;
nokey = 0;
+ /* FALLTHROUGH */
case '\t' :
case '\r' :
case ' ' :
diff --git a/usr/src/uts/common/inet/ipf/fil.c b/usr/src/uts/common/inet/ipf/fil.c
index 67a82d2f68..78980be106 100644
--- a/usr/src/uts/common/inet/ipf/fil.c
+++ b/usr/src/uts/common/inet/ipf/fil.c
@@ -103,7 +103,8 @@ struct file;
#include "netinet/ip_compat.h"
#ifdef USE_INET6
# include <netinet/icmp6.h>
-# if !SOLARIS && defined(_KERNEL) && !defined(__osf__) && !defined(__hpux)
+# if !defined(SOLARIS) && defined(_KERNEL) && !defined(__osf__) && \
+ !defined(__hpux)
# include <netinet6/in6_var.h>
# endif
#endif
@@ -4077,7 +4078,7 @@ size_t size;
caddr_t ca;
int err;
-# if SOLARIS
+# ifdef SOLARIS
err = COPYIN(src, (caddr_t)&ca, sizeof(ca));
if (err != 0)
return err;
@@ -4107,7 +4108,7 @@ size_t size;
caddr_t ca;
int err;
-# if SOLARIS
+# ifdef SOLARIS
err = COPYIN(dst, (caddr_t)&ca, sizeof(ca));
if (err != 0)
return err;
@@ -5977,7 +5978,7 @@ fr_info_t *fin;
int dosum;
ipf_stack_t *ifs = fin->fin_ifs;
-#if SOLARIS && defined(_KERNEL) && (SOLARIS2 >= 6)
+#if defined(SOLARIS) && defined(_KERNEL) && (SOLARIS2 >= 6)
net_handle_t net_data_p;
if (fin->fin_v == 4)
net_data_p = ifs->ifs_ipf_ipv4;
@@ -6001,7 +6002,7 @@ fr_info_t *fin;
dosum = 0;
sum = 0;
-#if SOLARIS && defined(_KERNEL) && (SOLARIS2 >= 6)
+#if defined(SOLARIS) && defined(_KERNEL) && (SOLARIS2 >= 6)
ASSERT(fin->fin_m != NULL);
if (NET_IS_HCK_L4_FULL(net_data_p, fin->fin_m) ||
NET_IS_HCK_L4_PART(net_data_p, fin->fin_m)) {
@@ -6040,7 +6041,7 @@ fr_info_t *fin;
if (dosum)
sum = fr_cksum(fin->fin_m, fin->fin_ip,
fin->fin_p, fin->fin_dp);
-#if SOLARIS && defined(_KERNEL) && (SOLARIS2 >= 6)
+#if defined(SOLARIS) && defined(_KERNEL) && (SOLARIS2 >= 6)
}
#endif
#if !defined(_KERNEL)
diff --git a/usr/src/uts/common/inet/ipf/ip_auth.c b/usr/src/uts/common/inet/ipf/ip_auth.c
index 2bdd66fee3..602c35a797 100644
--- a/usr/src/uts/common/inet/ipf/ip_auth.c
+++ b/usr/src/uts/common/inet/ipf/ip_auth.c
@@ -151,7 +151,7 @@ ipf_stack_t *ifs;
MUTEX_INIT(&ifs->ifs_ipf_authmx, "ipf auth log mutex");
RWLOCK_INIT(&ifs->ifs_ipf_auth, "ipf IP User-Auth rwlock");
-#if SOLARIS && defined(_KERNEL)
+#if defined(SOLARIS) && defined(_KERNEL)
cv_init(&ifs->ifs_ipfauthwait, "ipf auth condvar", CV_DRIVER, NULL);
#endif
#if defined(linux) && defined(_KERNEL)
@@ -334,7 +334,7 @@ fr_info_t *fin;
ip->ip_off = htons(bo);
}
#endif
-#if SOLARIS && defined(_KERNEL)
+#if defined(SOLARIS) && defined(_KERNEL)
m->b_rptr -= qpi->qpi_off;
ifs->ifs_fr_authpkts[i] = *(mblk_t **)fin->fin_mp;
cv_signal(&ifs->ifs_ipfauthwait);
@@ -687,7 +687,7 @@ ipf_stack_t *ifs;
}
if (ifs->ifs_fr_auth_init == 1) {
-# if SOLARIS && defined(_KERNEL)
+# if defined(SOLARIS) && defined(_KERNEL)
cv_destroy(&ifs->ifs_ipfauthwait);
# endif
MUTEX_DESTROY(&ifs->ifs_ipf_authmx);
diff --git a/usr/src/uts/common/inet/ipf/ip_compat.c b/usr/src/uts/common/inet/ipf/ip_compat.c
index 8d75fadda0..597e0969c3 100644
--- a/usr/src/uts/common/inet/ipf/ip_compat.c
+++ b/usr/src/uts/common/inet/ipf/ip_compat.c
@@ -3,8 +3,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#if defined(KERNEL) || defined(_KERNEL)
# undef KERNEL
# undef _KERNEL
@@ -100,7 +98,8 @@ struct file;
#include "netinet/ip_compat.h"
#ifdef USE_INET6
# include <netinet/icmp6.h>
-# if !SOLARIS && defined(_KERNEL) && !defined(__osf__) && !defined(__hpux)
+# if !defined(SOLARIS) && defined(_KERNEL) && !defined(__osf__) && \
+ !defined(__hpux)
# include <netinet6/in6_var.h>
# endif
#endif
diff --git a/usr/src/uts/common/inet/ipf/ip_frag.c b/usr/src/uts/common/inet/ipf/ip_frag.c
index 8b71871dac..0e60c4d649 100644
--- a/usr/src/uts/common/inet/ipf/ip_frag.c
+++ b/usr/src/uts/common/inet/ipf/ip_frag.c
@@ -894,8 +894,8 @@ ipf_stack_t *ifs;
/* Slowly expire held state for fragments. Timeouts are set * in */
/* expectation of this being called twice per second. */
/* ------------------------------------------------------------------------ */
-#if !defined(_KERNEL) || (!SOLARIS && !defined(__hpux) && !defined(__sgi) && \
- !defined(__osf__) && !defined(linux))
+#if !defined(_KERNEL) || (!defined(SOLARIS) && !defined(__hpux) && \
+ !defined(__sgi) && !defined(__osf__) && !defined(linux))
# if defined(_KERNEL) && ((BSD >= 199103) || defined(__sgi))
void fr_slowtimer __P((void *arg))
# else
diff --git a/usr/src/uts/common/inet/ipf/ip_log.c b/usr/src/uts/common/inet/ipf/ip_log.c
index d60a666b2d..193d9024b4 100644
--- a/usr/src/uts/common/inet/ipf/ip_log.c
+++ b/usr/src/uts/common/inet/ipf/ip_log.c
@@ -64,7 +64,7 @@ struct file;
# include <sys/proc.h>
# endif
#endif /* _KERNEL */
-#if !SOLARIS && !defined(__hpux) && !defined(linux)
+#if !defined(SOLARIS) && !defined(__hpux) && !defined(linux)
# if (NetBSD > 199609) || (OpenBSD > 199603) || (__FreeBSD_version >= 300000)
# include <sys/dirent.h>
# else
@@ -180,7 +180,7 @@ ipf_stack_t *ifs;
# endif
}
-# if SOLARIS && defined(_KERNEL)
+# if defined(SOLARIS) && defined(_KERNEL)
cv_init(&ifs->ifs_iplwait, "ipl condvar", CV_DRIVER, NULL);
# endif
MUTEX_INIT(&ifs->ifs_ipl_mutex, "ipf log mutex");
@@ -209,7 +209,7 @@ ipf_stack_t *ifs;
for (i = IPL_LOGMAX; i >= 0; i--)
(void) ipflog_clear(i, ifs);
-# if SOLARIS && defined(_KERNEL)
+# if defined(SOLARIS) && defined(_KERNEL)
cv_destroy(&ifs->ifs_iplwait);
# endif
MUTEX_DESTROY(&ifs->ifs_ipl_mutex);
@@ -241,7 +241,7 @@ u_int flags;
ipflog_t ipfl;
u_char p;
mb_t *m;
-# if SOLARIS && defined(_KERNEL)
+# if defined(SOLARIS) && defined(_KERNEL)
net_handle_t nif;
void *ifp;
# else
@@ -317,7 +317,7 @@ u_int flags;
* Get the interface number and name to which this packet is
* currently associated.
*/
-# if SOLARIS && defined(_KERNEL)
+# if defined(SOLARIS) && defined(_KERNEL)
ipfl.fl_unit = (u_int)0;
nif = NULL;
if (fin->fin_fi.fi_v == 4)
@@ -516,7 +516,7 @@ ipf_stack_t *ifs;
* Now that the log record has been completed and added to the queue,
* wake up any listeners who may want to read it.
*/
-# if SOLARIS && defined(_KERNEL)
+# if defined(SOLARIS) && defined(_KERNEL)
cv_signal(&ifs->ifs_iplwait);
MUTEX_EXIT(&ifs->ifs_ipl_mutex);
# else
@@ -573,7 +573,7 @@ ipf_stack_t *ifs;
MUTEX_ENTER(&ifs->ifs_ipl_mutex);
while (ifs->ifs_iplt[unit] == NULL) {
-# if SOLARIS && defined(_KERNEL)
+# if defined(SOLARIS) && defined(_KERNEL)
/*
* Prevent a deadlock with ipldetach() - see the "ipfilter
* kernel module mutexes and locking" comment block in solaris.c
diff --git a/usr/src/uts/common/inet/ipf/ip_nat.c b/usr/src/uts/common/inet/ipf/ip_nat.c
index b556d0983e..e8b115761e 100644
--- a/usr/src/uts/common/inet/ipf/ip_nat.c
+++ b/usr/src/uts/common/inet/ipf/ip_nat.c
@@ -4066,7 +4066,7 @@ u_32_t nflags;
#endif
}
-#if SOLARIS && defined(_KERNEL)
+#if defined(SOLARIS) && defined(_KERNEL)
net_handle_t net_data_p = ifs->ifs_ipf_ipv4;
#endif
@@ -4393,7 +4393,7 @@ u_32_t nflags;
#endif
}
-#if SOLARIS && defined(_KERNEL)
+#if defined(SOLARIS) && defined(_KERNEL)
net_handle_t net_data_p = ifs->ifs_ipf_ipv4;
#endif
@@ -4479,7 +4479,7 @@ u_32_t nflags;
fix_outcksum(csump, nat->nat_sumd[0]);
}
-#if SOLARIS && defined(_KERNEL)
+#if defined(SOLARIS) && defined(_KERNEL)
if (nflags & IPN_TCPUDP &&
NET_IS_HCK_L4_PART(net_data_p, fin->fin_m)) {
/*
diff --git a/usr/src/uts/common/inet/ipf/ip_nat6.c b/usr/src/uts/common/inet/ipf/ip_nat6.c
index 7fda6408a2..baadf581f7 100644
--- a/usr/src/uts/common/inet/ipf/ip_nat6.c
+++ b/usr/src/uts/common/inet/ipf/ip_nat6.c
@@ -2211,7 +2211,7 @@ u_32_t nflags;
int i;
ipf_stack_t *ifs = fin->fin_ifs;
-#if SOLARIS && defined(_KERNEL)
+#if defined(SOLARIS) && defined(_KERNEL)
net_handle_t net_data_p = ifs->ifs_ipf_ipv6;
#endif
@@ -2493,7 +2493,7 @@ u_32_t nflags;
ipnat_t *np;
ipf_stack_t *ifs = fin->fin_ifs;
-#if SOLARIS && defined(_KERNEL)
+#if defined(SOLARIS) && defined(_KERNEL)
net_handle_t net_data_p = ifs->ifs_ipf_ipv6;
#endif
@@ -2571,7 +2571,7 @@ u_32_t nflags;
fix_outcksum(csump, nat->nat_sumd[0]);
}
-#if SOLARIS && defined(_KERNEL)
+#if defined(SOLARIS) && defined(_KERNEL)
if (nflags & IPN_TCPUDP &&
NET_IS_HCK_L4_PART(net_data_p, fin->fin_m)) {
/*
diff --git a/usr/src/uts/common/inet/ipf/ip_proxy.c b/usr/src/uts/common/inet/ipf/ip_proxy.c
index 6f89a77073..e3d990ffd1 100644
--- a/usr/src/uts/common/inet/ipf/ip_proxy.c
+++ b/usr/src/uts/common/inet/ipf/ip_proxy.c
@@ -471,7 +471,8 @@ int appr_check(fin, nat)
fr_info_t *fin;
nat_t *nat;
{
-#if SOLARIS && defined(_KERNEL) && (SOLARIS2 >= 6) && defined(ICK_VALID)
+#if defined(SOLARIS) && defined(_KERNEL) && (SOLARIS2 >= 6) && \
+ defined(ICK_VALID)
mb_t *m;
int dosum = 1;
#endif
@@ -489,7 +490,7 @@ nat_t *nat;
#endif
ipf_stack_t *ifs = fin->fin_ifs;
-#if SOLARIS && defined(_KERNEL) && (SOLARIS2 >= 6)
+#if defined(SOLARIS) && defined(_KERNEL) && (SOLARIS2 >= 6)
net_handle_t net_data_p;
if (fin->fin_v == 4)
net_data_p = ifs->ifs_ipf_ipv4;
@@ -535,7 +536,8 @@ nat_t *nat;
case IPPROTO_TCP :
tcp = (tcphdr_t *)fin->fin_dp;
-#if SOLARIS && defined(_KERNEL) && (SOLARIS2 >= 6) && defined(ICK_VALID)
+#if defined(SOLARIS) && defined(_KERNEL) && (SOLARIS2 >= 6) && \
+ defined(ICK_VALID)
m = fin->fin_qfm;
if (dohwcksum && (m->b_ick_flag == ICK_VALID))
dosum = 0;
@@ -617,7 +619,7 @@ nat_t *nat;
}
if (tcpudp) {
-#if SOLARIS && defined(_KERNEL) && (SOLARIS2 >= 6) && defined(MENTAT)
+#if defined(SOLARIS) && defined(_KERNEL) && (SOLARIS2 >= 6) && defined(MENTAT)
if (!fin->fin_out) {
/*
* We are incapable of adjusting partial hcksum
diff --git a/usr/src/uts/common/inet/ipf/ipf.h b/usr/src/uts/common/inet/ipf/ipf.h
index 1919d5da3f..598d21f5fe 100644
--- a/usr/src/uts/common/inet/ipf/ipf.h
+++ b/usr/src/uts/common/inet/ipf/ipf.h
@@ -157,8 +157,9 @@ typedef struct {
#if defined(__NetBSD__) || defined(__OpenBSD__) || \
- (_BSDI_VERSION >= 199701) || (__FreeBSD_version >= 300000) || \
- SOLARIS || defined(__sgi) || defined(__osf__) || defined(linux)
+ (_BSDI_VERSION >= 199701) || (__FreeBSD_version >= 300000) || \
+ defined(SOLARIS) || defined(__sgi) || defined(__osf__) || \
+ defined(linux)
# include <stdarg.h>
typedef int (* ioctlfunc_t) __P((int, ioctlcmd_t, ...));
#else
@@ -305,7 +306,7 @@ extern void set_variable __P((char *, char *));
extern char *get_variable __P((char *, char **, int));
extern void resetlexer __P((void));
-#if SOLARIS
+#ifdef SOLARIS
extern int gethostname __P((char *, int ));
extern void sync __P((void));
#endif
diff --git a/usr/src/uts/common/inet/ipf/netinet/ip_compat.h b/usr/src/uts/common/inet/ipf/netinet/ip_compat.h
index 01e7c0901f..2522c4031e 100644
--- a/usr/src/uts/common/inet/ipf/netinet/ip_compat.h
+++ b/usr/src/uts/common/inet/ipf/netinet/ip_compat.h
@@ -134,7 +134,7 @@ struct file;
/* ----------------------------------------------------------------------- */
/* S O L A R I S */
/* ----------------------------------------------------------------------- */
-#if SOLARIS
+#ifdef SOLARIS
# define MENTAT 1
# include <sys/cmn_err.h>
# include <sys/isa_defs.h>
diff --git a/usr/src/uts/common/inet/ipf/netinet/ip_fil.h b/usr/src/uts/common/inet/ipf/netinet/ip_fil.h
index 2cd33bb91e..2df1a0b115 100644
--- a/usr/src/uts/common/inet/ipf/netinet/ip_fil.h
+++ b/usr/src/uts/common/inet/ipf/netinet/ip_fil.h
@@ -909,7 +909,7 @@ typedef struct ipflog {
* ipl is already a name used by something else.
*/
#ifndef IPL_NAME
-# if SOLARIS
+# ifdef SOLARIS
# define IPL_NAME "/dev/ipf"
# else
# define IPL_NAME "/dev/ipl"
diff --git a/usr/src/uts/common/inet/ipf/netinet/ip_frag.h b/usr/src/uts/common/inet/ipf/netinet/ip_frag.h
index f2ac3fd75e..bf7972ec36 100644
--- a/usr/src/uts/common/inet/ipf/netinet/ip_frag.h
+++ b/usr/src/uts/common/inet/ipf/netinet/ip_frag.h
@@ -73,8 +73,9 @@ extern void fr_fragexpire __P((ipf_stack_t *));
extern int fr_nextfrag __P((ipftoken_t *, ipfgeniter_t *, ipfr_t **, \
ipfr_t ***, ipfrwlock_t *, ipf_stack_t *));
-#if defined(_KERNEL) && ((BSD >= 199306) || SOLARIS || defined(__sgi) \
- || defined(__osf__) || (defined(__sgi) && (IRIX >= 60500)))
+#if defined(_KERNEL) && ((BSD >= 199306) || defined(SOLARIS) || \
+ defined(__sgi) || defined(__osf__) || \
+ (defined(__sgi) && (IRIX >= 60500)))
# if defined(SOLARIS2) && (SOLARIS2 < 7)
extern void fr_slowtimer __P((void *));
# else
diff --git a/usr/src/uts/common/inet/ipf/opts.h b/usr/src/uts/common/inet/ipf/opts.h
index d944df6242..a3cec03aba 100644
--- a/usr/src/uts/common/inet/ipf/opts.h
+++ b/usr/src/uts/common/inet/ipf/opts.h
@@ -9,8 +9,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#ifndef __OPTS_H__
#define __OPTS_H__
@@ -59,7 +57,7 @@
# endif
#endif
-#if defined(sun) && !SOLARIS
+#if defined(sun) && !defined(SOLARIS)
# define STRERROR(x) sys_errlist[x]
extern char *sys_errlist[];
#else