Fix -Wundef warnings from compiling GENERIC and LINT kernels of
all architectures.
This commit is contained in:
parent
bbce982bd5
commit
44e09d2fa2
@ -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
|
||||
|
@ -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
|
||||
|
@ -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))
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user