summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/compat/linux/linux_getcwd.c2
-rw-r--r--sys/compat/linux/linux_signal.c2
-rw-r--r--sys/ddb/db_access.c4
-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
-rw-r--r--sys/fs/ntfs/ntfs_subr.c4
-rw-r--r--sys/fs/ntfs/ntfs_vnops.c4
-rw-r--r--sys/isa/vga_isa.c2
-rw-r--r--sys/kern/kern_pmc.c2
-rw-r--r--sys/net/if_ppp.c8
-rw-r--r--sys/netinet/ip_input.c2
-rw-r--r--sys/rpc/rpcclnt.c6
-rw-r--r--sys/sys/kbio.h6
-rw-r--r--sys/sys/mouse.h2
-rw-r--r--sys/sys/pmc.h2
40 files changed, 87 insertions, 77 deletions
diff --git a/sys/compat/linux/linux_getcwd.c b/sys/compat/linux/linux_getcwd.c
index 53aae45..1e2dabae 100644
--- a/sys/compat/linux/linux_getcwd.c
+++ b/sys/compat/linux/linux_getcwd.c
@@ -392,7 +392,7 @@ linux_getcwd_common (lvp, rvp, bpp, bufp, limit, flags, td)
error = linux_getcwd_scandir(&lvp, &uvp, &bp, bufp, td);
if (error)
goto out;
-#if DIAGNOSTIC
+#ifdef DIAGNOSTIC
if (lvp != NULL)
panic("getcwd: oops, forgot to null lvp");
if (bufp && (bp <= bufp)) {
diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c
index fc25e3f..1fc5bb4 100644
--- a/sys/compat/linux/linux_signal.c
+++ b/sys/compat/linux/linux_signal.c
@@ -81,7 +81,7 @@ bsd_to_linux_sigset(sigset_t *bss, l_sigset_t *lss)
lss->__bits[1] = bss->__bits[1];
for (b = 1; b <= LINUX_SIGTBLSZ; b++) {
if (SIGISMEMBER(*bss, b)) {
-#if __alpha__
+#ifdef __alpha__
l = _SIG_IDX(b);
#else
l = bsd_to_linux_signal[_SIG_IDX(b)];
diff --git a/sys/ddb/db_access.c b/sys/ddb/db_access.c
index 2d17504..2f4d049 100644
--- a/sys/ddb/db_access.c
+++ b/sys/ddb/db_access.c
@@ -49,6 +49,10 @@ static unsigned db_extend[] = { /* table for sign-extending */
0xFF800000U
};
+#ifndef BYTE_MSF
+#define BYTE_MSF 0
+#endif
+
db_expr_t
db_get_value(addr, size, is_signed)
db_addr_t addr;
diff --git a/sys/dev/advansys/adv_pci.c b/sys/dev/advansys/adv_pci.c
index 455e204..666efdc 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 e89829f..565b8c2 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 4d40ae3..74ea7b5 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 3b9ce17..5de2a48 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 09a0b38..b5a8b6c 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 d8f1890..cb4393e 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 6615332..b68770d 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 d59f115..d835592 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 638a56a..362fc65 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 35a8716..27b09a5 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 6889e1e..b32a218 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 a48eda9..25edbb8 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 91aac71..7c5e41b 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 62ba235..6650569 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 a179e32..b38ef38 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 ef78c94..510f790 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 ede1fe1..4b3a4d3 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 8baae3a..4a132c6 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 b9437ef..9cb9b64 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 4395ab3..447423b 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 7ae988b..a5d4b66 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 e8f10f0..d8b1d73 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 c83048e..860e8f9 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 4e93a6a..1c130b6 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 96059d4..aa240aa 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 adba5a1..d7a5b14 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 0f6cec5..394351e 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;
diff --git a/sys/fs/ntfs/ntfs_subr.c b/sys/fs/ntfs/ntfs_subr.c
index adbe8c643..fb94ea0 100644
--- a/sys/fs/ntfs/ntfs_subr.c
+++ b/sys/fs/ntfs/ntfs_subr.c
@@ -1815,7 +1815,7 @@ ntfs_readattr(
return (error);
}
-#if UNUSED_CODE
+#if 0
int
ntfs_parserun(
cn_t * cn,
@@ -1905,7 +1905,7 @@ ntfs_procfixups(
return (0);
}
-#if UNUSED_CODE
+#if 0
int
ntfs_runtocn(
cn_t * cn,
diff --git a/sys/fs/ntfs/ntfs_vnops.c b/sys/fs/ntfs/ntfs_vnops.c
index 48db359..d5a017f 100644
--- a/sys/fs/ntfs/ntfs_vnops.c
+++ b/sys/fs/ntfs/ntfs_vnops.c
@@ -434,7 +434,7 @@ ntfs_open(ap)
struct thread *a_td;
} */ *ap;
{
-#if NTFS_DEBUG
+#ifdef NTFS_DEBUG
register struct vnode *vp = ap->a_vp;
register struct ntnode *ip = VTONT(vp);
@@ -465,7 +465,7 @@ ntfs_close(ap)
struct thread *a_td;
} */ *ap;
{
-#if NTFS_DEBUG
+#ifdef NTFS_DEBUG
register struct vnode *vp = ap->a_vp;
register struct ntnode *ip = VTONT(vp);
diff --git a/sys/isa/vga_isa.c b/sys/isa/vga_isa.c
index 594e3d0..d69236d 100644
--- a/sys/isa/vga_isa.c
+++ b/sys/isa/vga_isa.c
@@ -152,7 +152,7 @@ isavga_attach(device_t dev)
if (0 && bootverbose)
(*vidsw[sc->adp->va_index]->diag)(sc->adp, bootverbose);
-#if experimental
+#if 0 /* experimental */
device_add_child(dev, "fb", -1);
bus_generic_attach(dev);
#endif
diff --git a/sys/kern/kern_pmc.c b/sys/kern/kern_pmc.c
index ed4de59..6d5d7af 100644
--- a/sys/kern/kern_pmc.c
+++ b/sys/kern/kern_pmc.c
@@ -33,7 +33,7 @@ __FBSDID("$FreeBSD$");
#include <sys/pmckern.h>
#include <sys/smp.h>
-#if HWPMC_HOOKS
+#ifdef HWPMC_HOOKS
#define PMC_KERNEL_VERSION PMC_VERSION
#else
#define PMC_KERNEL_VERSION 0
diff --git a/sys/net/if_ppp.c b/sys/net/if_ppp.c
index 3d5cd13..7bf26f3 100644
--- a/sys/net/if_ppp.c
+++ b/sys/net/if_ppp.c
@@ -104,14 +104,14 @@
#include <net/netisr.h>
#include <net/bpf.h>
-#if INET
+#ifdef INET
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/in_var.h>
#include <netinet/ip.h>
#endif
-#if IPX
+#ifdef IPX
#include <netipx/ipx.h>
#include <netipx/ipx_if.h>
#endif
@@ -193,10 +193,10 @@ extern struct compressor ppp_bsd_compress;
extern struct compressor ppp_deflate, ppp_deflate_draft;
static struct compressor *ppp_compressors[8] = {
-#if DO_BSD_COMPRESS && defined(PPP_BSDCOMP)
+#if defined(PPP_BSDCOMP)
&ppp_bsd_compress,
#endif
-#if DO_DEFLATE && defined(PPP_DEFLATE)
+#if defined(PPP_DEFLATE)
&ppp_deflate,
&ppp_deflate_draft,
#endif
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 9d1a43d..199590a 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -695,7 +695,7 @@ ours:
goto bad;
}
#endif
-#if FAST_IPSEC
+#ifdef FAST_IPSEC
/*
* enforce IPsec policy checking if we are seeing last header.
* note that we do not visit this with protocols with pcb layer
diff --git a/sys/rpc/rpcclnt.c b/sys/rpc/rpcclnt.c
index 698c956..a70a287 100644
--- a/sys/rpc/rpcclnt.c
+++ b/sys/rpc/rpcclnt.c
@@ -409,7 +409,7 @@ rpcclnt_connect(rpc, td)
if (error)
goto bad;
-#if __OpenBSD__
+#ifdef __OpenBSD__
MGET(m, M_TRYWAIT, MT_SONAME);
sin = mtod(m, struct sockaddr_in *);
sin->sin_len = m->m_len = sizeof(struct sockaddr_in);
@@ -428,7 +428,7 @@ rpcclnt_connect(rpc, td)
if (error)
goto bad;
-#if __OpenBSD__
+#ifdef __OpenBSD__
MGET(mopt, M_TRYWAIT, MT_SOOPTS);
mopt->m_len = sizeof(int);
ip = mtod(mopt, int *);
@@ -1388,7 +1388,7 @@ rpcclnt_timer(arg)
struct thread *td = curthread;
#endif
-#if __OpenBSD__
+#ifdef __OpenBSD__
s = splsoftnet();
#else
s = splnet();
diff --git a/sys/sys/kbio.h b/sys/sys/kbio.h
index a4b1f04..97522197 100644
--- a/sys/sys/kbio.h
+++ b/sys/sys/kbio.h
@@ -21,7 +21,7 @@
#define KDMKTONE _IO('K', 8 /*, int */)
/* see console.h for the definitions of the following ioctls */
-#if notdef
+#ifdef notdef
#define KDGETMODE _IOR('K', 9, int)
#define KDSETMODE _IO('K', 10 /*, int */)
#define KDSBORDER _IO('K', 13 /*, int */)
@@ -75,7 +75,7 @@ typedef struct keyboard_info keyboard_info_t;
#define KBRELKBD _IOW('K', 69, keyboard_info_t) /* release keyboard */
/* see console.h for the definition of the following ioctl */
-#if notdef
+#ifdef notdef
#define KDRASTER _IOW('K', 100, scr_size_t)
#endif
@@ -216,7 +216,7 @@ typedef struct fkeyarg fkeyarg_t;
#define GETFKEY _IOWR('k', 0, fkeyarg_t)
#define SETFKEY _IOWR('k', 1, fkeyarg_t)
-#if notdef /* see console.h */
+#ifdef notdef /* see console.h */
#define GIO_SCRNMAP _IOR('k', 2, scrmap_t)
#define PIO_SCRNMAP _IOW('k', 3, scrmap_t)
#endif
diff --git a/sys/sys/mouse.h b/sys/sys/mouse.h
index 054ce20..fe066ef 100644
--- a/sys/sys/mouse.h
+++ b/sys/sys/mouse.h
@@ -41,7 +41,7 @@
#define MOUSE_READSTATE _IOWR('M', 8, mousedata_t)
#define MOUSE_READDATA _IOWR('M', 9, mousedata_t)
-#if notyet
+#ifdef notyet
#define MOUSE_SETRESOLUTION _IOW('M', 10, int)
#define MOUSE_SETSCALING _IOW('M', 11, int)
#define MOUSE_SETRATE _IOW('M', 12, int)
diff --git a/sys/sys/pmc.h b/sys/sys/pmc.h
index 0195a8d..3ce513d 100644
--- a/sys/sys/pmc.h
+++ b/sys/sys/pmc.h
@@ -894,7 +894,7 @@ extern struct pmc_mdep *md;
/* driver statistics */
extern struct pmc_op_getdriverstats pmc_stats;
-#if DEBUG
+#if defined(DEBUG) && DEBUG
/* debug flags, major flag groups */
struct pmc_debugflags {
OpenPOWER on IntegriCloud