aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/advansys/adv_pci.c2
-rw-r--r--sys/dev/advansys/advlib.c10
-rw-r--r--sys/dev/advansys/adw_pci.c2
-rw-r--r--sys/dev/advansys/adwcam.c2
-rw-r--r--sys/dev/aic7xxx/aic79xx.c14
-rw-r--r--sys/dev/aic7xxx/aic79xx_osm.c4
-rw-r--r--sys/dev/aic7xxx/aic79xx_osm.h2
-rw-r--r--sys/dev/aic7xxx/aic79xx_pci.c2
-rw-r--r--sys/dev/aic7xxx/aic7xxx_osm.c4
-rw-r--r--sys/dev/arcmsr/arcmsr.c2
-rw-r--r--sys/dev/atkbdc/atkbdc.c2
-rw-r--r--sys/dev/atkbdc/psm.c2
-rw-r--r--sys/dev/em/if_em_osdep.h2
-rw-r--r--sys/dev/fb/vga.c13
-rw-r--r--sys/dev/hptmv/hptproc.c2
-rw-r--r--sys/dev/hptmv/mvOs.h4
-rw-r--r--sys/dev/isp/isp_freebsd.h2
-rw-r--r--sys/dev/mpt/mpt.h2
-rw-r--r--sys/dev/mpt/mpt_cam.c2
-rw-r--r--sys/dev/mpt/mpt_raid.c6
-rw-r--r--sys/dev/ppc/ppc.c2
-rw-r--r--sys/dev/sym/sym_hipd.c19
-rw-r--r--sys/dev/syscons/schistory.c2
-rw-r--r--sys/dev/syscons/scterm-dumb.c2
-rw-r--r--sys/dev/syscons/scterm-sc.c6
-rw-r--r--sys/dev/syscons/syscons.c4
-rw-r--r--sys/dev/syscons/sysmouse.c2
27 files changed, 62 insertions, 56 deletions
diff --git a/sys/dev/advansys/adv_pci.c b/sys/dev/advansys/adv_pci.c
index 455e2044555b4..666efdc81d6c8 100644
--- a/sys/dev/advansys/adv_pci.c
+++ b/sys/dev/advansys/adv_pci.c
@@ -288,7 +288,7 @@ adv_pci_attach(device_t dev)
adv->max_dma_count = ADV_PCI_MAX_DMA_COUNT;
adv->max_dma_addr = ADV_PCI_MAX_DMA_ADDR;
-#if CC_DISABLE_PCI_PARITY_INT
+#if defined(CC_DISABLE_PCI_PARITY_INT) && CC_DISABLE_PCI_PARITY_INT
{
u_int16_t config_msw;
diff --git a/sys/dev/advansys/advlib.c b/sys/dev/advansys/advlib.c
index e89829f962e33..565b8c2bc594b 100644
--- a/sys/dev/advansys/advlib.c
+++ b/sys/dev/advansys/advlib.c
@@ -238,7 +238,7 @@ static void adv_toggle_irq_act(struct adv_softc *adv);
/* Chip Control */
static int adv_host_req_chip_halt(struct adv_softc *adv);
static void adv_set_chip_ih(struct adv_softc *adv, u_int16_t ins_code);
-#if UNUSED
+#if 0
static u_int8_t adv_get_chip_scsi_ctrl(struct adv_softc *adv);
#endif
@@ -514,7 +514,7 @@ adv_get_eeprom_config(struct adv_softc *adv, struct
for (s_addr = cfg_beg; s_addr <= (cfg_end - 1); s_addr++, wbuf++) {
*wbuf = adv_read_eeprom_16(adv, s_addr);
sum += *wbuf;
-#if ADV_DEBUG_EEPROM
+#ifdef ADV_DEBUG_EEPROM
printf("Addr 0x%x: 0x%04x\n", s_addr, *wbuf);
#endif
}
@@ -1615,7 +1615,7 @@ adv_set_chip_ih(struct adv_softc *adv, u_int16_t ins_code)
adv_set_bank(adv, 0);
}
-#if UNUSED
+#if 0
static u_int8_t
adv_get_chip_scsi_ctrl(struct adv_softc *adv)
{
@@ -1826,12 +1826,12 @@ adv_put_ready_queue(struct adv_softc *adv, struct adv_scsi_q *scsiq,
(u_int16_t *) &scsiq->q1.cntl,
((sizeof(scsiq->q1) + sizeof(scsiq->q2)) / 2) - 1);
-#if CC_WRITE_IO_COUNT
+#ifdef CC_WRITE_IO_COUNT
adv_write_lram_16(adv, q_addr + ADV_SCSIQ_W_REQ_COUNT,
adv->req_count);
#endif
-#if CC_CLEAR_DMA_REMAIN
+#ifdef CC_CLEAR_DMA_REMAIN
adv_write_lram_32(adv, q_addr + ADV_SCSIQ_DW_REMAIN_XFER_ADDR, 0);
adv_write_lram_32(adv, q_addr + ADV_SCSIQ_DW_REMAIN_XFER_CNT, 0);
diff --git a/sys/dev/advansys/adw_pci.c b/sys/dev/advansys/adw_pci.c
index 4d40ae3eb7ccf..74ea7b5c4e16d 100644
--- a/sys/dev/advansys/adw_pci.c
+++ b/sys/dev/advansys/adw_pci.c
@@ -107,7 +107,7 @@ struct adw_pci_identity adw_pci_ident_table[] =
&adw_asc38C0800_mcode_data,
&adw_asc38C0800_default_eeprom
},
-#if NOTYET
+#ifdef NOTYET
/* XXX Disabled until I have hardware to test with */
/* asc38C1600 based controllers */
{
diff --git a/sys/dev/advansys/adwcam.c b/sys/dev/advansys/adwcam.c
index 3b9ce175eb864..5de2a48b08a84 100644
--- a/sys/dev/advansys/adwcam.c
+++ b/sys/dev/advansys/adwcam.c
@@ -1290,7 +1290,7 @@ adw_intr(void *arg)
* Handle RDMA failure by resetting the
* SCSI Bus and chip.
*/
-#if XXX
+#if 0 /* XXX */
AdvResetChipAndSB(adv_dvc_varp);
#endif
break;
diff --git a/sys/dev/aic7xxx/aic79xx.c b/sys/dev/aic7xxx/aic79xx.c
index 09a0b388a0056..b5a8b6c772943 100644
--- a/sys/dev/aic7xxx/aic79xx.c
+++ b/sys/dev/aic7xxx/aic79xx.c
@@ -174,7 +174,7 @@ static void ahd_handle_devreset(struct ahd_softc *ahd,
struct ahd_devinfo *devinfo,
u_int lun, cam_status status,
char *message, int verbose_level);
-#if AHD_TARGET_MODE
+#ifdef AHD_TARGET_MODE
static void ahd_setup_target_msgin(struct ahd_softc *ahd,
struct ahd_devinfo *devinfo,
struct scb *scb);
@@ -1237,7 +1237,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat)
ahd->msgin_index = 0;
}
}
-#if AHD_TARGET_MODE
+#ifdef AHD_TARGET_MODE
else {
if (bus_phase == P_MESGOUT) {
ahd->msg_type =
@@ -5414,7 +5414,7 @@ ahd_free(struct ahd_softc *ahd)
tstate = ahd->enabled_targets[i];
if (tstate != NULL) {
-#if AHD_TARGET_MODE
+#ifdef AHD_TARGET_MODE
int j;
for (j = 0; j < AHD_NUM_LUNS; j++) {
@@ -5430,7 +5430,7 @@ ahd_free(struct ahd_softc *ahd)
free(tstate, M_DEVBUF);
}
}
-#if AHD_TARGET_MODE
+#ifdef AHD_TARGET_MODE
if (ahd->black_hole != NULL) {
xpt_free_path(ahd->black_hole->path);
free(ahd->black_hole, M_DEVBUF);
@@ -6690,7 +6690,7 @@ ahd_chip_init(struct ahd_softc *ahd)
ahd_outb(ahd, CLRSINT3, NTRAMPERR|OSRAMPERR);
ahd_outb(ahd, CLRINT, CLRSCSIINT);
-#if NEEDS_MORE_TESTING
+#ifdef NEEDS_MORE_TESTING
/*
* Always enable abort on incoming L_Qs if this feature is
* supported. We use this to catch invalid SCB references.
@@ -7251,7 +7251,7 @@ ahd_match_scb(struct ahd_softc *ahd, struct scb *scb, int target,
if (match != 0)
match = ((lun == slun) || (lun == CAM_LUN_WILDCARD));
if (match != 0) {
-#if AHD_TARGET_MODE
+#ifdef AHD_TARGET_MODE
int group;
group = XPT_FC_GROUP(scb->io_ctx->ccb_h.func_code);
@@ -7925,7 +7925,7 @@ ahd_reset_channel(struct ahd_softc *ahd, char channel, int initiate_reset)
/* Make sure the sequencer is in a safe location. */
ahd_clear_critical_section(ahd);
-#if AHD_TARGET_MODE
+#ifdef AHD_TARGET_MODE
if ((ahd->flags & AHD_TARGETROLE) != 0) {
ahd_run_tqinfifo(ahd, /*paused*/TRUE);
}
diff --git a/sys/dev/aic7xxx/aic79xx_osm.c b/sys/dev/aic7xxx/aic79xx_osm.c
index d8f189093830d..cb4393e9c2e41 100644
--- a/sys/dev/aic7xxx/aic79xx_osm.c
+++ b/sys/dev/aic7xxx/aic79xx_osm.c
@@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$");
#define ccb_scb_ptr spriv_ptr0
-#if UNUSED
+#if 0
static void ahd_dump_targcmd(struct target_cmd *cmd);
#endif
static int ahd_modevent(module_t mod, int type, void *data);
@@ -1489,7 +1489,7 @@ ahd_detach(device_t dev)
return (0);
}
-#if UNUSED
+#if 0
static void
ahd_dump_targcmd(struct target_cmd *cmd)
{
diff --git a/sys/dev/aic7xxx/aic79xx_osm.h b/sys/dev/aic7xxx/aic79xx_osm.h
index 66153321a06e1..b68770d2fc454 100644
--- a/sys/dev/aic7xxx/aic79xx_osm.h
+++ b/sys/dev/aic7xxx/aic79xx_osm.h
@@ -118,7 +118,7 @@
#define AHD_NSEG (roundup(btoc(MAXPHYS) + 1, 16))
/* This driver supports target mode */
-#if NOT_YET
+#ifdef NOT_YET
#define AHD_TARGET_MODE 1
#endif
diff --git a/sys/dev/aic7xxx/aic79xx_pci.c b/sys/dev/aic7xxx/aic79xx_pci.c
index d59f1155feb29..d8355923205e2 100644
--- a/sys/dev/aic7xxx/aic79xx_pci.c
+++ b/sys/dev/aic7xxx/aic79xx_pci.c
@@ -622,7 +622,7 @@ ahd_check_extport(struct ahd_softc *ahd)
}
}
-#if AHD_DEBUG
+#ifdef AHD_DEBUG
if (have_seeprom != 0
&& (ahd_debug & AHD_DUMP_SEEPROM) != 0) {
uint16_t *sc_data;
diff --git a/sys/dev/aic7xxx/aic7xxx_osm.c b/sys/dev/aic7xxx/aic7xxx_osm.c
index 638a56a2e4196..362fc657bdde9 100644
--- a/sys/dev/aic7xxx/aic7xxx_osm.c
+++ b/sys/dev/aic7xxx/aic7xxx_osm.c
@@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$");
devclass_t ahc_devclass;
-#if UNUSED
+#if 0
static void ahc_dump_targcmd(struct target_cmd *cmd);
#endif
static int ahc_modevent(module_t mod, int type, void *data);
@@ -1665,7 +1665,7 @@ ahc_detach(device_t dev)
return (0);
}
-#if UNUSED
+#if 0
static void
ahc_dump_targcmd(struct target_cmd *cmd)
{
diff --git a/sys/dev/arcmsr/arcmsr.c b/sys/dev/arcmsr/arcmsr.c
index 35a8716c2508d..27b09a5fa0969 100644
--- a/sys/dev/arcmsr/arcmsr.c
+++ b/sys/dev/arcmsr/arcmsr.c
@@ -42,7 +42,7 @@
******************************************************************************************
** $FreeBSD$
*/
-#define ARCMSR_DEBUG 1
+#define ARCMSR_DEBUG0 0
/*
**********************************
*/
diff --git a/sys/dev/atkbdc/atkbdc.c b/sys/dev/atkbdc/atkbdc.c
index 6889e1ebbfd37..b32a21819b476 100644
--- a/sys/dev/atkbdc/atkbdc.c
+++ b/sys/dev/atkbdc/atkbdc.c
@@ -211,7 +211,7 @@ atkbdc_configure(void)
port0 = IO_KBD;
resource_int_value("atkbdc", 0, "port", &port0);
port1 = IO_KBD + KBD_STATUS_PORT;
-#if notyet
+#ifdef notyet
bus_space_map(tag, port0, IO_KBDSIZE, 0, &h0);
bus_space_map(tag, port1, IO_KBDSIZE, 0, &h1);
#else
diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c
index a48eda92e923c..25edbb85fa04b 100644
--- a/sys/dev/atkbdc/psm.c
+++ b/sys/dev/atkbdc/psm.c
@@ -2884,7 +2884,7 @@ mouse_ext_command(KBDC kbdc, int command)
return TRUE;
}
-#if notyet
+#ifdef notyet
/* Logitech MouseMan Cordless II */
static int
enable_lcordless(struct psm_softc *sc)
diff --git a/sys/dev/em/if_em_osdep.h b/sys/dev/em/if_em_osdep.h
index 91aac71ddf9d3..7c5e41b01835a 100644
--- a/sys/dev/em/if_em_osdep.h
+++ b/sys/dev/em/if_em_osdep.h
@@ -57,7 +57,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define MSGOUT(S, A, B) printf(S "\n", A, B)
#define DEBUGFUNC(F) DEBUGOUT(F);
-#if DBG
+#ifdef DBG
#define DEBUGOUT(S) printf(S "\n")
#define DEBUGOUT1(S,A) printf(S "\n",A)
#define DEBUGOUT2(S,A,B) printf(S "\n",A,B)
diff --git a/sys/dev/fb/vga.c b/sys/dev/fb/vga.c
index 62ba23559fe91..6650569dd4c1e 100644
--- a/sys/dev/fb/vga.c
+++ b/sys/dev/fb/vga.c
@@ -33,6 +33,9 @@ __FBSDID("$FreeBSD$");
#include "opt_vga.h"
#include "opt_fb.h"
+#ifndef FB_DEBUG
+#define FB_DEBUG 0
+#endif
#include "opt_syscons.h" /* should be removed in the future, XXX */
#include <sys/param.h>
@@ -170,7 +173,7 @@ vga_mmap(struct cdev *dev, vga_softc_t *sc, vm_offset_t offset, vm_offset_t *pad
#ifdef SLOW_VGA
#undef SLOW_VGA
#undef VGA_SLOW_IOACCESS
-#define VGA_SLOW_IOACCESS 1
+#define VGA_SLOW_IOACCESS
#endif
/* architecture dependent option */
@@ -1047,7 +1050,7 @@ probe_adapters(void)
fb_init_struct(&biosadapter[V_ADP_SECONDARY], ...);
#endif
-#if notyet
+#ifdef notyet
/*
* We cannot have two video adapter of the same type; there must be
* only one of color or mono adapter, or one each of them.
@@ -1700,7 +1703,7 @@ set_font_mode(video_adapter_t *adp, u_char *buf)
inb(adp->va_crtc_addr + 6); /* reset flip-flop */
outb(ATC, 0x20); /* enable palette */
-#if VGA_SLOW_IOACCESS
+#ifdef VGA_SLOW_IOACCESS
#ifdef VGA_ALT_SEQACCESS
outb(TSIDX, 0x00); outb(TSREG, 0x01);
#endif
@@ -1742,7 +1745,7 @@ set_normal_mode(video_adapter_t *adp, u_char *buf)
inb(adp->va_crtc_addr + 6); /* reset flip-flop */
outb(ATC, 0x20); /* enable palette */
-#if VGA_SLOW_IOACCESS
+#ifdef VGA_SLOW_IOACCESS
#ifdef VGA_ALT_SEQACCESS
outb(TSIDX, 0x00); outb(TSREG, 0x01);
#endif
@@ -2219,7 +2222,7 @@ vga_load_state(video_adapter_t *adp, void *p)
inb(crtc_addr + 6); /* reset flip-flop */
outb(ATC, 0x20); /* enable palette */
-#if notyet /* a temporary workaround for kernel panic, XXX */
+#ifdef notyet /* a temporary workaround for kernel panic, XXX */
#ifndef VGA_NO_BIOS
if (adp->va_unit == V_ADP_PRIMARY) {
writeb(BIOS_PADDRTOVADDR(0x44a), buf[0]); /* COLS */
diff --git a/sys/dev/hptmv/hptproc.c b/sys/dev/hptmv/hptproc.c
index a179e320d55e9..b38ef385688de 100644
--- a/sys/dev/hptmv/hptproc.c
+++ b/sys/dev/hptmv/hptproc.c
@@ -233,7 +233,7 @@ loop:
#endif
#endif
if (0) {} /* just to compile */
-#if DBGUG
+#ifdef DEBUG
else if (length>=9 && strncmp(buffer, "dbglevel ", 9)==0) {
buffer+=9;
length-=9;
diff --git a/sys/dev/hptmv/mvOs.h b/sys/dev/hptmv/mvOs.h
index ef78c94644f52..510f790f09154 100644
--- a/sys/dev/hptmv/mvOs.h
+++ b/sys/dev/hptmv/mvOs.h
@@ -28,7 +28,7 @@
#ifndef __INCmvOsBsdh
#define __INCmvOsBsdh
-#if DBG
+#ifdef DBG
#define MV_DEBUG_LOG
#endif
@@ -131,7 +131,7 @@ int mvLogMsg(MV_U8, MV_CHAR_PTR, ...);
/*************************************************************************
* Debug support
*************************************************************************/
-#if DEBUG
+#ifdef DEBUG
#define HPT_ASSERT(x) do { if (!(x)) { \
printf("ASSERT fail at %s line %d", __FILE__, __LINE__); \
while (1); \
diff --git a/sys/dev/isp/isp_freebsd.h b/sys/dev/isp/isp_freebsd.h
index ede1fe14b2d37..4b3a4d3f95f75 100644
--- a/sys/dev/isp/isp_freebsd.h
+++ b/sys/dev/isp/isp_freebsd.h
@@ -66,7 +66,7 @@
/*
* Efficiency- get rid of SBus code && tests unless we need them.
*/
-#if _MACHINE_ARCH == sparc64
+#ifdef __sparc64__
#define ISP_SBUS_SUPPORTED 1
#else
#define ISP_SBUS_SUPPORTED 0
diff --git a/sys/dev/mpt/mpt.h b/sys/dev/mpt/mpt.h
index 8baae3a8737d0..4a132c671aeb4 100644
--- a/sys/dev/mpt/mpt.h
+++ b/sys/dev/mpt/mpt.h
@@ -589,7 +589,7 @@ mpt_sleep(struct mpt_softc *mpt, void *ident, int priority,
}
#else
-#if LOCKING_WORKED_AS_IT_SHOULD
+#ifdef LOCKING_WORKED_AS_IT_SHOULD
#error "Shouldn't Be Here!"
#define MPT_IFLAGS INTR_TYPE_CAM | INTR_ENTROPY | INTR_MPSAFE
#define MPT_LOCK_SETUP(mpt) \
diff --git a/sys/dev/mpt/mpt_cam.c b/sys/dev/mpt/mpt_cam.c
index b9437ef87780e..9cb9b646661e6 100644
--- a/sys/dev/mpt/mpt_cam.c
+++ b/sys/dev/mpt/mpt_cam.c
@@ -320,7 +320,7 @@ mpt_timeout(void *arg)
request_t *req;
ccb = (union ccb *)arg;
-#if NOTYET
+#ifdef NOTYET
mpt = mpt_find_softc(mpt);
if (mpt == NULL)
return;
diff --git a/sys/dev/mpt/mpt_raid.c b/sys/dev/mpt/mpt_raid.c
index 4395ab309281b..447423ba26774 100644
--- a/sys/dev/mpt/mpt_raid.c
+++ b/sys/dev/mpt/mpt_raid.c
@@ -99,7 +99,7 @@ static void mpt_terminate_raid_thread(struct mpt_softc *mpt);
static void mpt_raid_thread(void *arg);
static timeout_t mpt_raid_timer;
static timeout_t mpt_raid_quiesce_timeout;
-#if UNUSED
+#if 0
static void mpt_enable_vol(struct mpt_softc *mpt,
struct mpt_raid_volume *mpt_vol, int enable);
#endif
@@ -482,7 +482,7 @@ mpt_raid_reply_handler(struct mpt_softc *mpt, request_t *req,
free_req = TRUE;
if (reply_frame != NULL)
free_req = mpt_raid_reply_frame_handler(mpt, req, reply_frame);
-#if NOTYET
+#ifdef NOTYET
else if (req->ccb != NULL) {
/* Complete Quiesce CCB with error... */
}
@@ -769,7 +769,7 @@ mpt_map_physdisk(struct mpt_softc *mpt, union ccb *ccb, u_int *tgt)
return (-1);
}
-#if UNUSED
+#if 0
static void
mpt_enable_vol(struct mpt_softc *mpt, struct mpt_raid_volume *mpt_vol,
int enable)
diff --git a/sys/dev/ppc/ppc.c b/sys/dev/ppc/ppc.c
index 7ae988bd96442..a5d4b66234123 100644
--- a/sys/dev/ppc/ppc.c
+++ b/sys/dev/ppc/ppc.c
@@ -1548,7 +1548,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
diff --git a/sys/dev/sym/sym_hipd.c b/sys/dev/sym/sym_hipd.c
index e8f10f0f05bbc..d8b1d737f48b2 100644
--- a/sys/dev/sym/sym_hipd.c
+++ b/sys/dev/sym/sym_hipd.c
@@ -111,6 +111,10 @@ typedef u_int8_t u8;
typedef u_int16_t u16;
typedef u_int32_t u32;
+#ifndef BITS_PER_LONG
+#define BITS_PER_LONG (sizeof(long) * 8)
+#endif
+
/*
* From 'cam.error_recovery_diffs.20010313.context' patch.
*/
@@ -2641,12 +2645,12 @@ static int sym_prepare_setting(hcb_p np, struct sym_nvram *nvram)
/*
* 64 bit addressing (895A/896/1010) ?
*/
- if (np->features & FE_DAC)
-#if BITS_PER_LONG > 32
- np->rv_ccntl1 |= (XTIMOD | EXTIBMV);
-#else
- np->rv_ccntl1 |= (DDAC);
-#endif
+ if (np->features & FE_DAC) {
+ if (BITS_PER_LONG > 32)
+ np->rv_ccntl1 |= (XTIMOD | EXTIBMV);
+ else
+ np->rv_ccntl1 |= (DDAC);
+ }
/*
* Phase mismatch handled by SCRIPTS (895A/896/1010) ?
@@ -8902,9 +8906,8 @@ sym_pci_attach(device_t dev)
if (np->features & FE_RAM8K) {
np->ram_ws = 8192;
np->scriptb_ba = np->scripta_ba + 4096;
-#if BITS_PER_LONG > 32
+ if (BITS_PER_LONG > 32)
np->scr_ram_seg = cpu_to_scr(np->scripta_ba >> 32);
-#endif
}
else
np->ram_ws = 4096;
diff --git a/sys/dev/syscons/schistory.c b/sys/dev/syscons/schistory.c
index c83048e13f044..860e8f95b85b5 100644
--- a/sys/dev/syscons/schistory.c
+++ b/sys/dev/syscons/schistory.c
@@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$");
#include <sys/kernel.h>
#include <sys/malloc.h>
-#if __sparc64__ || __powerpc__
+#if defined(__sparc64__) || defined(__powerpc__)
#include <machine/sc_machdep.h>
#else
#include <machine/pc/display.h>
diff --git a/sys/dev/syscons/scterm-dumb.c b/sys/dev/syscons/scterm-dumb.c
index 4e93a6af1b0d2..1c130b6af4d65 100644
--- a/sys/dev/syscons/scterm-dumb.c
+++ b/sys/dev/syscons/scterm-dumb.c
@@ -33,7 +33,7 @@ __FBSDID("$FreeBSD$");
#include <sys/systm.h>
#include <sys/consio.h>
-#if __sparc64__ || __powerpc__
+#if defined(__sparc64__) || defined(__powerpc__)
#include <machine/sc_machdep.h>
#else
#include <machine/pc/display.h>
diff --git a/sys/dev/syscons/scterm-sc.c b/sys/dev/syscons/scterm-sc.c
index 96059d4829486..aa240aa464586 100644
--- a/sys/dev/syscons/scterm-sc.c
+++ b/sys/dev/syscons/scterm-sc.c
@@ -36,7 +36,7 @@ __FBSDID("$FreeBSD$");
#include <sys/module.h>
#include <sys/consio.h>
-#if __sparc64__ || __powerpc__
+#if defined(__sparc64__) || defined(__powerpc__)
#include <machine/sc_machdep.h>
#else
#include <machine/pc/display.h>
@@ -240,7 +240,7 @@ scterm_scan_esc(scr_stat *scp, term_stat *tcp, u_char c)
sc_term_up_scroll(scp, 1, sc->scr_map[0x20],
tcp->cur_attr, 0, 0);
break;
-#if notyet
+#ifdef notyet
case 'Q':
tcp->esc = 4;
return;
@@ -665,7 +665,7 @@ scterm_scan_esc(scr_stat *scp, term_stat *tcp, u_char c)
splx(i);
break;
}
-#if notyet
+#ifdef notyet
} else if (tcp->esc == 4) { /* seen ESC Q */
/* to be filled */
#endif
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index adba5a1009be9..d7a5b14f8c55d 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -58,7 +58,7 @@ __FBSDID("$FreeBSD$");
#include <sys/power.h>
#include <machine/clock.h>
-#if __sparc64__ || __powerpc__
+#if defined(__sparc64__) || defined(__powerpc__)
#include <machine/sc_machdep.h>
#else
#include <machine/pc/display.h>
@@ -538,7 +538,7 @@ scclose(struct cdev *dev, int flag, int mode, struct thread *td)
DPRINTF(5, ("reset WAIT_REL, "));
if (finish_vt_acq(scp) == 0) /* force acknowledge */
DPRINTF(5, ("reset WAIT_ACQ, "));
-#if not_yet_done
+#ifdef not_yet_done
if (scp == &main_console) {
scp->pid = 0;
scp->proc = NULL;
diff --git a/sys/dev/syscons/sysmouse.c b/sys/dev/syscons/sysmouse.c
index 0f6cec5261820..394351e5db092 100644
--- a/sys/dev/syscons/sysmouse.c
+++ b/sys/dev/syscons/sysmouse.c
@@ -211,7 +211,7 @@ smioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td)
splx(s);
return 0;
-#if notyet
+#ifdef notyet
case MOUSE_GETVARS: /* get internal mouse variables */
case MOUSE_SETVARS: /* set internal mouse variables */
return ENODEV;