summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2005-12-06 11:19:37 +0000
committerru <ru@FreeBSD.org>2005-12-06 11:19:37 +0000
commit3db1ffb04091aeb5cbd6b87a4fa136442d8d3bc9 (patch)
treed4aab888a37abefaa2332f515bb2be9862352b91
parentf5b3d1a6c477ee8fd2cbe84115ae58ada92829f8 (diff)
downloadFreeBSD-src-3db1ffb04091aeb5cbd6b87a4fa136442d8d3bc9.zip
FreeBSD-src-3db1ffb04091aeb5cbd6b87a4fa136442d8d3bc9.tar.gz
Fix -Wundef warnings from compiling GENERIC and LINT kernels of
all architectures.
-rw-r--r--sys/alpha/alpha/trap.c2
-rw-r--r--sys/dev/aic7xxx/aic79xx_osm.h2
-rw-r--r--sys/dev/fb/fbreg.h6
-rw-r--r--sys/dev/snc/dp83932.c6
-rw-r--r--sys/dev/snc/dp83932var.h2
-rw-r--r--sys/ia64/ia64/machdep.c6
-rw-r--r--sys/pc98/cbus/gdc.c6
-rw-r--r--sys/pc98/cbus/ppc.c2
8 files changed, 16 insertions, 16 deletions
diff --git a/sys/alpha/alpha/trap.c b/sys/alpha/alpha/trap.c
index 7a62956f..7d8f8bf 100644
--- a/sys/alpha/alpha/trap.c
+++ b/sys/alpha/alpha/trap.c
@@ -656,7 +656,7 @@ syscall(code, framep)
framep->tf_regs[FRAME_TRAPARG_A0] = 0;
framep->tf_regs[FRAME_TRAPARG_A1] = 0;
framep->tf_regs[FRAME_TRAPARG_A2] = 0;
-#if notdef /* can't happen, ever. */
+#ifdef notdef /* can't happen, ever. */
if ((framep->tf_regs[FRAME_PS] & ALPHA_PSL_USERMODE) == 0)
panic("syscall");
#endif
diff --git a/sys/dev/aic7xxx/aic79xx_osm.h b/sys/dev/aic7xxx/aic79xx_osm.h
index b68770d..7e2291f 100644
--- a/sys/dev/aic7xxx/aic79xx_osm.h
+++ b/sys/dev/aic7xxx/aic79xx_osm.h
@@ -144,7 +144,7 @@ struct scb_platform_data {
};
/***************************** Core Includes **********************************/
-#if AHD_REG_PRETTY_PRINT
+#ifdef AHD_REG_PRETTY_PRINT
#define AIC_DEBUG_REGISTERS 1
#else
#define AIC_DEBUG_REGISTERS 0
diff --git a/sys/dev/fb/fbreg.h b/sys/dev/fb/fbreg.h
index 1e82946..684dfc1 100644
--- a/sys/dev/fb/fbreg.h
+++ b/sys/dev/fb/fbreg.h
@@ -43,14 +43,14 @@
#define fillw_io(p, d, c) fillw((p), (void *)(d), (c))
void generic_bcopy(const void *s, void *d, size_t c);
void generic_bzero(void *d, size_t c);
-#elif __amd64__
+#elif defined(__amd64__)
#define bcopy_io(s, d, c) bcopy((void *)(s), (void *)(d), (c))
#define bcopy_toio(s, d, c) bcopy((void *)(s), (void *)(d), (c))
#define bcopy_fromio(s, d, c) bcopy((void *)(s), (void *)(d), (c))
#define bzero_io(d, c) bzero((void *)(d), (c))
#define fill_io(p, d, c) fill((p), (void *)(d), (c))
#define fillw_io(p, d, c) fillw((p), (void *)(d), (c))
-#elif __ia64__
+#elif defined(__ia64__)
#include <machine/bus.h>
#define bcopy_fromio(s, d, c) \
bus_space_read_region_1(IA64_BUS_SPACE_MEM, s, 0, (void*)(d), c)
@@ -75,7 +75,7 @@ fillw(int val, uint16_t *buf, size_t size)
while (size--)
*buf++ = val;
}
-#elif __powerpc__
+#elif defined(__powerpc__)
#define bcopy_io(s, d, c) ofwfb_bcopy((void *)(s), (void *)(d), (c))
#define bcopy_toio(s, d, c) ofwfb_bcopy((void *)(s), (void *)(d), (c))
diff --git a/sys/dev/snc/dp83932.c b/sys/dev/snc/dp83932.c
index ce7c920..e6c0dd6 100644
--- a/sys/dev/snc/dp83932.c
+++ b/sys/dev/snc/dp83932.c
@@ -70,7 +70,7 @@
#include <sys/socket.h>
#include <sys/syslog.h>
#include <sys/errno.h>
-#if NRND > 0
+#if defined(NRND) && NRND > 0
#include <sys/rnd.h>
#endif
@@ -202,7 +202,7 @@ sncconfig(sc, media, nmedia, defmedia, myea)
ether_ifattach(ifp, myea);
-#if NRND > 0
+#if defined(NRND) && NRND > 0
rnd_attach_source(&sc->rnd_source, device_get_nameunit(sc->sc_dev),
RND_TYPE_NET, 0);
#endif
@@ -890,7 +890,7 @@ sncintr(arg)
}
sncstart(sc->sc_ifp);
-#if NRND > 0
+#if defined(NRND) && NRND > 0
if (isr)
rnd_add_uint32(&sc->rnd_source, isr);
#endif
diff --git a/sys/dev/snc/dp83932var.h b/sys/dev/snc/dp83932var.h
index 9570162..59ffefb 100644
--- a/sys/dev/snc/dp83932var.h
+++ b/sys/dev/snc/dp83932var.h
@@ -226,7 +226,7 @@ typedef struct snc_softc {
void *sc_sh; /* shutdownhook cookie */
int gone;
-#if NRND > 0
+#if defined(NRND) && NRND > 0
rndsource_element_t rnd_source;
#endif
} snc_softc_t;
diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c
index 19c4f83..f184a85 100644
--- a/sys/ia64/ia64/machdep.c
+++ b/sys/ia64/ia64/machdep.c
@@ -345,7 +345,7 @@ cpu_switch(struct thread *old, struct thread *new)
struct pcb *oldpcb, *newpcb;
oldpcb = old->td_pcb;
-#if COMPAT_IA32
+#ifdef COMPAT_IA32
ia32_savectx(oldpcb);
#endif
if (PCPU_GET(fpcurthread) == old)
@@ -355,7 +355,7 @@ cpu_switch(struct thread *old, struct thread *new)
oldpcb->pcb_current_pmap =
pmap_switch(newpcb->pcb_current_pmap);
PCPU_SET(curthread, new);
-#if COMPAT_IA32
+#ifdef COMPAT_IA32
ia32_restorectx(newpcb);
#endif
if (PCPU_GET(fpcurthread) == new)
@@ -375,7 +375,7 @@ cpu_throw(struct thread *old __unused, struct thread *new)
newpcb = new->td_pcb;
(void)pmap_switch(newpcb->pcb_current_pmap);
PCPU_SET(curthread, new);
-#if COMPAT_IA32
+#ifdef COMPAT_IA32
ia32_restorectx(newpcb);
#endif
restorectx(newpcb);
diff --git a/sys/pc98/cbus/gdc.c b/sys/pc98/cbus/gdc.c
index c7dd61e..f5719f0 100644
--- a/sys/pc98/cbus/gdc.c
+++ b/sys/pc98/cbus/gdc.c
@@ -94,7 +94,7 @@ static int gdc_attach_unit(int unit, gdc_softc_t *sc, int flags);
static int gdc_alloc_resource(device_t dev);
static int gdc_release_resource(device_t dev);
-#if FB_INSTALL_CDEV
+#ifdef FB_INSTALL_CDEV
static d_open_t gdcopen;
static d_close_t gdcclose;
@@ -1463,7 +1463,7 @@ gdc_dev_ioctl(video_adapter_t *adp, u_long cmd, caddr_t arg)
static int
gdc_diag(video_adapter_t *adp, int level)
{
-#if FB_DEBUG > 1
+#if defined(FB_DEBUG) && FB_DEBUG > 1
int i;
#endif
@@ -1472,7 +1472,7 @@ gdc_diag(video_adapter_t *adp, int level)
fb_dump_adp_info(DRIVER_NAME, adp, level);
-#if FB_DEBUG > 1
+#if defined(FB_DEBUG) && FB_DEBUG > 1
for (i = 0; bios_vmode[i].vi_mode != EOT; ++i) {
if (bios_vmode[i].vi_mode == NA)
continue;
diff --git a/sys/pc98/cbus/ppc.c b/sys/pc98/cbus/ppc.c
index e04e3fb..664336e 100644
--- a/sys/pc98/cbus/ppc.c
+++ b/sys/pc98/cbus/ppc.c
@@ -1554,7 +1554,7 @@ ppcintr(void *arg)
ctr = r_ctr(ppc);
ecr = r_ecr(ppc);
-#if PPC_DEBUG > 1
+#if defined(PPC_DEBUG) && PPC_DEBUG > 1
printf("![%x/%x/%x]", ctr, ecr, str);
#endif
OpenPOWER on IntegriCloud