sys/dev __FreeBSD__ cleanups

Aaron Malone aaron at munge.net
Wed Feb 11 15:29:29 PST 2004


Trying to get the kernel to build with CCVER=gcc3;  here's a patch that
cleans up a lot (not all, yet; I'm procrastinating on the DRM stuff in
particular) of the __FreeBSD__ ifdefs.  Beware that I haven't tested
these changes in a live kernel; haven't been able to fully build one
yet. :)  But they *do* successfully build KLDs now.

-- 
Aaron Malone
aaron at xxxxxxxxx
http://munge.net/dragonfly/
Index: sys/dev/disk/ncv/ncr53c500.c
===================================================================
RCS file: /home/dcvs/src/sys/dev/disk/ncv/ncr53c500.c,v
retrieving revision 1.5
diff -u -r1.5 ncr53c500.c
--- sys/dev/disk/ncv/ncr53c500.c	27 Aug 2003 10:35:17 -0000	1.5
+++ sys/dev/disk/ncv/ncr53c500.c	11 Feb 2004 22:39:58 -0000
@@ -42,9 +42,6 @@
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/kernel.h>
-#if defined(__FreeBSD__) && __FreeBSD_version >= 500001
-#include <sys/bio.h>
-#endif	/* __FreeBSD__ */
 #include <sys/buf.h>
 #include <sys/queue.h>
 #include <sys/malloc.h>
@@ -72,7 +69,7 @@
 #include <i386/Cbus/dev/ncr53c500hwtab.h>
 #endif /* __NetBSD__ */
 
-#ifdef __FreeBSD__
+#ifdef __DragonFly__
 #include <machine/clock.h>
 #include <machine/cpu.h>
 #include <machine/bus_pio.h>
@@ -88,7 +85,7 @@
 #include "ncr53c500var.h"
 
 #include "ncr53c500hwtab.h"
-#endif /* __FreeBSD__ */
+#endif /* __DragonFly__ */
 
 #define	NCV_MAX_DATA_SIZE	(64 * 1024)
 #define	NCV_DELAY_MAX		(2 * 1000 * 1000)
Index: sys/dev/disk/ncv/ncr53c500_pccard.c
===================================================================
RCS file: /home/dcvs/src/sys/dev/disk/ncv/ncr53c500_pccard.c,v
retrieving revision 1.4
diff -u -r1.4 ncr53c500_pccard.c
--- sys/dev/disk/ncv/ncr53c500_pccard.c	27 Aug 2003 10:35:17 -0000	1.4
+++ sys/dev/disk/ncv/ncr53c500_pccard.c	11 Feb 2004 22:41:06 -0000
@@ -41,9 +41,6 @@
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/disklabel.h>
-#if defined(__FreeBSD__) && __FreeBSD_version >= 500001
-#include <sys/bio.h>
-#endif
 #include <sys/buf.h>
 #include <sys/queue.h>
 #include <sys/malloc.h>
@@ -69,9 +66,6 @@
 
 #include	<sys/kernel.h>
 #include	<sys/module.h>
-#if !defined(__FreeBSD__) || __FreeBSD_version < 500014
-#include	<sys/select.h>
-#endif
 #include	<bus/pccard/cardinfo.h>
 #include	<bus/pccard/slot.h>
 
Index: sys/dev/disk/ncv/ncr53c500var.h
===================================================================
RCS file: /home/dcvs/src/sys/dev/disk/ncv/ncr53c500var.h,v
retrieving revision 1.3
diff -u -r1.3 ncr53c500var.h
--- sys/dev/disk/ncv/ncr53c500var.h	27 Aug 2003 10:35:17 -0000	1.3
+++ sys/dev/disk/ncv/ncr53c500var.h	11 Feb 2004 22:37:14 -0000
@@ -51,7 +51,7 @@
 	void *sc_ih;
 #endif	/* __NetBSD__ */
 
-#ifdef	__FreeBSD__
+#ifdef	__DragonFly__
 	bus_space_tag_t sc_iot;
 	bus_space_tag_t sc_memt;
 	bus_space_handle_t sc_ioh;
@@ -66,7 +66,7 @@
 	struct resource *mem_res;
 
 	void *ncv_intrhand;
-#endif	/* __FreeBSD__ */
+#endif	/* __DragonFly__ */
 
 	int sc_tmaxcnt;
 	int sc_selstop;			/* sel atn stop asserted */
Index: sys/dev/disk/nsp/nsp.c
===================================================================
RCS file: /home/dcvs/src/sys/dev/disk/nsp/nsp.c,v
retrieving revision 1.5
diff -u -r1.5 nsp.c
--- sys/dev/disk/nsp/nsp.c	27 Aug 2003 10:35:17 -0000	1.5
+++ sys/dev/disk/nsp/nsp.c	11 Feb 2004 22:38:00 -0000
@@ -71,7 +71,7 @@
 #include <i386/Cbus/dev/nspvar.h>
 #endif /* __NetBSD__ */
 
-#ifdef __FreeBSD__
+#ifdef __DragonFly__
 #include <machine/clock.h>
 #include <machine/cpu.h>
 #include <machine/bus_pio.h>
@@ -84,7 +84,7 @@
 #include <bus/cam/scsi/scsi_low.h>
 #include "nspreg.h"
 #include "nspvar.h"
-#endif /* __FreeBSD__ */
+#endif /* __DragonFly__ */
 
 /***************************************************
  * USER SETTINGS
Index: sys/dev/disk/nsp/nspvar.h
===================================================================
RCS file: /home/dcvs/src/sys/dev/disk/nsp/nspvar.h,v
retrieving revision 1.3
diff -u -r1.3 nspvar.h
--- sys/dev/disk/nsp/nspvar.h	27 Aug 2003 10:35:17 -0000	1.3
+++ sys/dev/disk/nsp/nspvar.h	11 Feb 2004 22:36:33 -0000
@@ -53,7 +53,7 @@
 	void *sc_ih;
 #endif	/* __NetBSD__ */
 
-#ifdef __FreeBSD__
+#ifdef __DragonFly__
 	bus_space_tag_t sc_iot;
 	bus_space_handle_t sc_ioh;
 	bus_space_tag_t sc_memt;
@@ -67,7 +67,7 @@
 	struct resource *mem_res;
 
 	void *nsp_intrhand;
-#endif	/* __FreeBSD__ */
+#endif	/* __DragonFly__ */
 
 	int sc_tmaxcnt;				/* timeout count */
 	int sc_seltout;				/* selection timeout counter */
Index: sys/dev/disk/stg/tmc18c30.c
===================================================================
RCS file: /home/dcvs/src/sys/dev/disk/stg/tmc18c30.c,v
retrieving revision 1.6
diff -u -r1.6 tmc18c30.c
--- sys/dev/disk/stg/tmc18c30.c	21 Dec 2003 12:34:08 -0000	1.6
+++ sys/dev/disk/stg/tmc18c30.c	11 Feb 2004 22:41:56 -0000
@@ -44,9 +44,6 @@
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/kernel.h>
-#if defined(__FreeBSD__) && __FreeBSD_version >= 500001
-#include <sys/bio.h>
-#endif	/* __FreeBSD__ */
 #include <sys/buf.h>
 #include <sys/queue.h>
 #include <sys/malloc.h>
@@ -70,7 +67,7 @@
 #include <i386/Cbus/dev/tmc18c30var.h>
 #endif /* __NetBSD__ */
 
-#ifdef __FreeBSD__
+#ifdef __DragonFly__
 #include <machine/clock.h>
 #include <machine/cpu.h>
 #include <machine/bus_pio.h>
@@ -82,7 +79,7 @@
 #include <bus/cam/scsi/scsi_low.h>
 #include "tmc18c30reg.h"
 #include "tmc18c30var.h"
-#endif /* __FreeBSD__ */
+#endif /* __DragonFly__ */
 
 /***************************************************
  * USER SETTINGS
Index: sys/dev/disk/stg/tmc18c30_isa.c
===================================================================
RCS file: /home/dcvs/src/sys/dev/disk/stg/tmc18c30_isa.c,v
retrieving revision 1.4
diff -u -r1.4 tmc18c30_isa.c
--- sys/dev/disk/stg/tmc18c30_isa.c	27 Aug 2003 10:35:17 -0000	1.4
+++ sys/dev/disk/stg/tmc18c30_isa.c	11 Feb 2004 22:42:14 -0000
@@ -46,9 +46,6 @@
 #include <sys/module.h>
 #include <sys/bus.h>
 #include <sys/disklabel.h>
-#if defined(__FreeBSD__) && __FreeBSD_version >= 500001
-#include <sys/bio.h>
-#endif
 #include <sys/buf.h>
 #include <sys/queue.h>
 #include <sys/malloc.h>
Index: sys/dev/disk/stg/tmc18c30_pccard.c
===================================================================
RCS file: /home/dcvs/src/sys/dev/disk/stg/tmc18c30_pccard.c,v
retrieving revision 1.4
diff -u -r1.4 tmc18c30_pccard.c
--- sys/dev/disk/stg/tmc18c30_pccard.c	27 Aug 2003 10:35:17 -0000	1.4
+++ sys/dev/disk/stg/tmc18c30_pccard.c	11 Feb 2004 22:42:29 -0000
@@ -43,9 +43,6 @@
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/disklabel.h>
-#if defined(__FreeBSD__) && __FreeBSD_version >= 500001
-#include <sys/bio.h>
-#endif
 #include <sys/buf.h>
 #include <sys/queue.h>
 #include <sys/malloc.h>
@@ -69,9 +66,6 @@
 
 #include	<sys/kernel.h>
 #include	<sys/module.h>
-#if !defined(__FreeBSD__) || __FreeBSD_version < 500014
-#include	<sys/select.h>
-#endif
 #include	<bus/pccard/cardinfo.h>
 #include	<bus/pccard/slot.h>
 
Index: sys/dev/disk/stg/tmc18c30var.h
===================================================================
RCS file: /home/dcvs/src/sys/dev/disk/stg/tmc18c30var.h,v
retrieving revision 1.3
diff -u -r1.3 tmc18c30var.h
--- sys/dev/disk/stg/tmc18c30var.h	27 Aug 2003 10:35:17 -0000	1.3
+++ sys/dev/disk/stg/tmc18c30var.h	11 Feb 2004 22:42:39 -0000
@@ -53,7 +53,7 @@
 	void *sc_ih;
 #endif	/* __NetBSD__ */
 
-#ifdef	__FreeBSD__
+#ifdef	__DragonFly__
 	bus_space_tag_t sc_iot;
 	bus_space_tag_t sc_memt;
 	bus_space_handle_t sc_ioh;
@@ -66,7 +66,7 @@
 	struct resource *mem_res;
 
 	void *stg_intrhand;
-#endif	/* __FreeBSD__ */
+#endif	/* __DragonFly__ */
 
 	int sc_tmaxcnt;
 	u_int sc_chip;			/* chip type */
Index: sys/dev/netif/snc/dp83932var.h
===================================================================
RCS file: /home/dcvs/src/sys/dev/netif/snc/dp83932var.h,v
retrieving revision 1.3
diff -u -r1.3 dp83932var.h
--- sys/dev/netif/snc/dp83932var.h	27 Aug 2003 09:38:32 -0000	1.3
+++ sys/dev/netif/snc/dp83932var.h	11 Feb 2004 23:03:07 -0000
@@ -38,7 +38,7 @@
 #ifdef __NetBSD__
 #define	splhardnet	splnet
 #endif
-#ifdef __FreeBSD__
+#ifdef __DragonFly__
 #define	splhardnet	splimp
 #ifndef NBPG
 #define NBPG PAGE_SIZE
Index: sys/dev/netif/wi/if_wireg.h
===================================================================
RCS file: /home/dcvs/src/sys/dev/netif/wi/if_wireg.h,v
retrieving revision 1.2
diff -u -r1.2 if_wireg.h
--- sys/dev/netif/wi/if_wireg.h	17 Jun 2003 04:28:33 -0000	1.2
+++ sys/dev/netif/wi/if_wireg.h	11 Feb 2004 23:08:26 -0000
@@ -87,8 +87,8 @@
 #ifdef __NetBSD__
 #define OS_STRING_NAME	"NetBSD"
 #endif
-#ifdef __FreeBSD__
-#define OS_STRING_NAME	"FreeBSD"
+#ifdef __DragonFly__
+#define OS_STRING_NAME	"DragonFly"
 #endif
 #ifdef __OpenBSD__
 #define OS_STRING_NAME	"OpenBSD"
Index: sys/dev/raid/asr/i2oadptr.h
===================================================================
RCS file: /home/dcvs/src/sys/dev/raid/asr/i2oadptr.h,v
retrieving revision 1.3
diff -u -r1.3 i2oadptr.h
--- sys/dev/raid/asr/i2oadptr.h	7 Aug 2003 21:17:08 -0000	1.3
+++ sys/dev/raid/asr/i2oadptr.h	11 Feb 2004 23:06:17 -0000
@@ -82,7 +82,7 @@
 #if !defined(I2O_ADPTR_HDR)
 #define I2O_ADPTR_HDR
 
-#if ((defined(KERNEL) || defined(_KERNEL)) && defined(__FreeBSD__))
+#if ((defined(KERNEL) || defined(_KERNEL)) && defined(__DragonFly__))
 # if (KERN_VERSION < 3)
 #  include "i2omsg.h"
 # else
Index: sys/dev/raid/asr/i2obscsi.h
===================================================================
RCS file: /home/dcvs/src/sys/dev/raid/asr/i2obscsi.h,v
retrieving revision 1.3
diff -u -r1.3 i2obscsi.h
--- sys/dev/raid/asr/i2obscsi.h	7 Aug 2003 21:17:08 -0000	1.3
+++ sys/dev/raid/asr/i2obscsi.h	11 Feb 2004 23:06:21 -0000
@@ -82,7 +82,7 @@
 #if !defined(I2O_BASE_SCSI_HDR)
 #define I2O_BASE_SCSI_HDR
 
-#if ((defined(KERNEL) || defined(_KERNEL)) && defined(__FreeBSD__))
+#if ((defined(KERNEL) || defined(_KERNEL)) && defined(__DragonFly__))
 # if (KERN_VERSION < 3)
 #  include "i2omsg.h"          /* Include the Base Message file */
 # else
Index: sys/dev/raid/asr/i2oexec.h
===================================================================
RCS file: /home/dcvs/src/sys/dev/raid/asr/i2oexec.h,v
retrieving revision 1.3
diff -u -r1.3 i2oexec.h
--- sys/dev/raid/asr/i2oexec.h	7 Aug 2003 21:17:08 -0000	1.3
+++ sys/dev/raid/asr/i2oexec.h	11 Feb 2004 23:06:30 -0000
@@ -91,7 +91,7 @@
 
 #define I2OEXEC_REV 1_5_4  /* I2OExec header file revision string */
 
-#if ((defined(KERNEL) || defined(_KERNEL)) && defined(__FreeBSD__))
+#if ((defined(KERNEL) || defined(_KERNEL)) && defined(__DragonFly__))
 # if (!defined(KERN_VERSION))
 #  include <sys/sysctl.h>
 # endif
Index: sys/dev/raid/asr/i2omsg.h
===================================================================
RCS file: /home/dcvs/src/sys/dev/raid/asr/i2omsg.h,v
retrieving revision 1.3
diff -u -r1.3 i2omsg.h
--- sys/dev/raid/asr/i2omsg.h	7 Aug 2003 21:17:08 -0000	1.3
+++ sys/dev/raid/asr/i2omsg.h	11 Feb 2004 23:06:34 -0000
@@ -115,7 +115,7 @@
 
 
 
-#if ((defined(KERNEL) || defined(_KERNEL)) && defined(__FreeBSD__))
+#if ((defined(KERNEL) || defined(_KERNEL)) && defined(__DragonFly__))
 # if (KERN_VERSION < 3)
 #  include "i2otypes.h"
 # else
Index: sys/dev/raid/asr/i2otypes.h
===================================================================
RCS file: /home/dcvs/src/sys/dev/raid/asr/i2otypes.h,v
retrieving revision 1.3
diff -u -r1.3 i2otypes.h
--- sys/dev/raid/asr/i2otypes.h	7 Aug 2003 21:17:08 -0000	1.3
+++ sys/dev/raid/asr/i2otypes.h	11 Feb 2004 23:06:37 -0000
@@ -86,7 +86,7 @@
 
 /* include architecture/compiler dependencies */
 
-#if ((defined(KERNEL) || defined(_KERNEL)) && defined(__FreeBSD__))
+#if ((defined(KERNEL) || defined(_KERNEL)) && defined(__DragonFly__))
 # if (KERN_VERSION < 3)
 #  include "i2odep.h"
 # else
Index: sys/dev/raid/asr/i2outil.h
===================================================================
RCS file: /home/dcvs/src/sys/dev/raid/asr/i2outil.h,v
retrieving revision 1.3
diff -u -r1.3 i2outil.h
--- sys/dev/raid/asr/i2outil.h	7 Aug 2003 21:17:08 -0000	1.3
+++ sys/dev/raid/asr/i2outil.h	11 Feb 2004 23:06:41 -0000
@@ -91,7 +91,7 @@
 
 #define I2OUTIL_REV 1_5_4  /* I2OUtil header file revision string */
 
-#if ((defined(KERNEL) || defined(_KERNEL)) && defined(__FreeBSD__))
+#if ((defined(KERNEL) || defined(_KERNEL)) && defined(__DragonFly__))
 # if (KERN_VERSION < 3)
 #  include "i2omsg.h"      /* Include the Base Message file */
 # else
Index: sys/dev/raid/asr/osd_defs.h
===================================================================
RCS file: /home/dcvs/src/sys/dev/raid/asr/osd_defs.h,v
retrieving revision 1.2
diff -u -r1.2 osd_defs.h
--- sys/dev/raid/asr/osd_defs.h	17 Jun 2003 04:28:22 -0000	1.2
+++ sys/dev/raid/asr/osd_defs.h	11 Feb 2004 23:06:50 -0000
@@ -57,7 +57,7 @@
 # define _DPT_LINUX
 #elif (defined(__bsdi__))
 # define _DPT_BSDI
-#elif (defined(__FreeBSD__))
+#elif (defined(__DragonFly__))
 # undef _DPT_FREE_BSD
 # define _DPT_FREE_BSD
 #else
Index: sys/dev/raid/asr/osd_util.h
===================================================================
RCS file: /home/dcvs/src/sys/dev/raid/asr/osd_util.h,v
retrieving revision 1.4
diff -u -r1.4 osd_util.h
--- sys/dev/raid/asr/osd_util.h	15 Nov 2003 21:05:41 -0000	1.4
+++ sys/dev/raid/asr/osd_util.h	11 Feb 2004 23:07:00 -0000
@@ -79,7 +79,7 @@
 
 #if (defined(KERNEL) && defined(__bsdi__))
 # include        "i386/isa/dpt_osd_defs.h"
-#elif ((defined(KERNEL) || defined(_KERNEL)) && defined(__FreeBSD__))
+#elif ((defined(KERNEL) || defined(_KERNEL)) && defined(__DragonFly__))
 # if (KERN_VERSION < 3)
 #  include        "i386/isa/dpt_osd_defs.h"
 # else
Index: sys/dev/raid/asr/sys_info.h
===================================================================
RCS file: /home/dcvs/src/sys/dev/raid/asr/sys_info.h,v
retrieving revision 1.4
diff -u -r1.4 sys_info.h
--- sys/dev/raid/asr/sys_info.h	15 Nov 2003 21:05:41 -0000	1.4
+++ sys/dev/raid/asr/sys_info.h	11 Feb 2004 23:07:11 -0000
@@ -54,7 +54,7 @@
 
 #if (defined(KERNEL) && defined(__bsdi__))
 # include        "i386/isa/dpt_osd_util.h"
-#elif ((defined(KERNEL) || defined(_KERNEL)) && defined(__FreeBSD__))
+#elif ((defined(KERNEL) || defined(_KERNEL)) && defined(__DragonFly__))
 # if (KERN_VERSION < 3)
 #  include        "i386/isa/dpt_osd_util.h"
 # else
Index: sys/dev/raid/twe/twe_compat.h
===================================================================
RCS file: /home/dcvs/src/sys/dev/raid/twe/twe_compat.h,v
retrieving revision 1.5
diff -u -r1.5 twe_compat.h
--- sys/dev/raid/twe/twe_compat.h	5 Jan 2004 17:40:00 -0000	1.5
+++ sys/dev/raid/twe/twe_compat.h	11 Feb 2004 22:43:48 -0000
@@ -31,9 +31,9 @@
  * Portability and compatibility interfaces.
  */
 
-#ifdef __FreeBSD__
+#ifdef __DragonFly__
 /******************************************************************************
- * FreeBSD
+ * DragonFly
  */
 #define TWE_SUPPORTED_PLATFORM
 
@@ -181,7 +181,7 @@
 # define TWE_BIO_STATS_END(bp)		devstat_end_transaction_bio(&((struct twed_softc *)TWE_BIO_SOFTC(bp))->twed_stats, bp)
 #endif
 
-#endif /* FreeBSD */
+#endif /* DragonFly */
 
 #ifndef TWE_SUPPORTED_PLATFORM
 #error platform not supported
Index: sys/dev/sound/usb/uaudio.c
===================================================================
RCS file: /home/dcvs/src/sys/dev/sound/usb/uaudio.c,v
retrieving revision 1.4
diff -u -r1.4 uaudio.c
--- sys/dev/sound/usb/uaudio.c	7 Aug 2003 21:17:13 -0000	1.4
+++ sys/dev/sound/usb/uaudio.c	11 Feb 2004 23:11:05 -0000
@@ -60,7 +60,7 @@
 #include <sys/proc.h>
 #if defined(__NetBSD__) || defined(__OpenBSD__)
 #include <sys/device.h>
-#elif defined(__FreeBSD__)
+#elif defined(__DragonFly__)
 #include <sys/module.h>
 #include <sys/bus.h>
 #include <sys/conf.h>
@@ -73,7 +73,7 @@
 #include <dev/audio_if.h>
 #include <dev/mulaw.h>
 #include <dev/auconv.h>
-#elif defined(__FreeBSD__)
+#elif defined(__DragonFly__)
 #include <dev/sound/pcm/sound.h>	/* XXXXX */
 #include <dev/sound/chip.h>
 #endif
@@ -117,7 +117,7 @@
 	int		minval, maxval;
 	u_int		delta;
 	u_int		mul;
-#if defined(__FreeBSD__) /* XXXXX */
+#if defined(__DragonFly__) /* XXXXX */
 	unsigned	ctl;
 #else
 	u_int8_t	class;
@@ -171,7 +171,7 @@
 	} chanbufs[UAUDIO_NCHANBUFS];
 
 	struct uaudio_softc *sc; /* our softc */
-#if defined(__FreeBSD__)
+#if defined(__DragonFly__)
 	u_int32_t format;
 	int	precision;
 	int	channels;
@@ -358,7 +358,7 @@
 	"uaudio"
 };
 
-#elif defined(__FreeBSD__)
+#elif defined(__DragonFly__)
 Static int	audio_attach_mi(device_t);
 Static void	uaudio_init_params(struct uaudio_softc * sc, struct chan *ch);
 
@@ -382,7 +382,7 @@
 
 USB_DECLARE_DRIVER(uaudio);
 
-#elif defined(__FreeBSD__)
+#elif defined(__DragonFly__)
 
 USB_DECLARE_DRIVER_INIT(uaudio,
 		DEVMETHOD(device_suspend, bus_generic_suspend),
@@ -424,7 +424,7 @@
 	usbd_devinfo(uaa->device, 0, devinfo);
 	USB_ATTACH_SETUP;
 
-#if !defined(__FreeBSD__)
+#if !defined(__DragonFly__)
 	printf(": %s\n", devinfo);
 #endif
 
@@ -486,7 +486,7 @@
 		printf("%s: %d mixer controls\n", USBDEVNAME(sc->sc_dev),
 		    sc->sc_nctls);
 
-#if !defined(__FreeBSD__)
+#if !defined(__DragonFly__)
 	usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
 			   USBDEV(sc->sc_dev));
 #endif
@@ -496,7 +496,7 @@
 	audio_attach_mi(&uaudio_hw_if, sc, &sc->sc_dev);
 #elif defined(__NetBSD__)
 	sc->sc_audiodev = audio_attach_mi(&uaudio_hw_if, sc, &sc->sc_dev);
-#elif defined(__FreeBSD__)
+#elif defined(__DragonFly__)
 	sc->sc_dying = 0;
 	if (audio_attach_mi(sc->sc_dev)) {
 		printf("audio_attach_mi failed\n");
@@ -547,7 +547,7 @@
 
 	return (rv);
 }
-#elif defined(__FreeBSD__)
+#elif defined(__DragonFly__)
 
 USB_DETACH(uaudio)
 {
@@ -698,7 +698,7 @@
 		DPRINTF(("uaudio_mixer_add_ctl: wValue=%04x",mc->wValue[0]));
 		for (i = 1; i < mc->nchan; i++)
 			DPRINTF((",%04x", mc->wValue[i]));
-#if defined(__FreeBSD__)
+#if defined(__DragonFly__)
 		DPRINTF((" wIndex=%04x type=%d "
 			 "min=%d max=%d\n",
 			 mc->wIndex, mc->type, 
@@ -844,11 +844,11 @@
 
 	bm = d1->bmControls;
 	mix.wIndex = MAKE(d->bUnitId, sc->sc_ac_iface);
-#if !defined(__FreeBSD__)
+#if !defined(__DragonFly__)
 	mix.class = -1;
 #endif
 	mix.type = MIX_SIGNED_16;
-#if !defined(__FreeBSD__)	/* XXXXX */
+#if !defined(__DragonFly__)	/* XXXXX */
 	mix.ctlunit = AudioNvolume;
 #endif
 
@@ -875,7 +875,7 @@
 						mix.wValue[k++] = 
 							MAKE(p+c+1, o+1);
 				}
-#if !defined(__FreeBSD__)
+#if !defined(__DragonFly__)
 			sprintf(mix.ctlname, "mix%d-%s", d->bUnitId,
 				uaudio_id_name(sc, dps, d->baSourceId[i]));
 #endif
@@ -912,7 +912,7 @@
 	uByte *ctls = d->bmaControls;
 	int ctlsize = d->bControlSize;
 	int nchan = (d->bLength - 7) / ctlsize;
-#if !defined(__FreeBSD__)
+#if !defined(__DragonFly__)
 	int srcId = d->bSourceId;
 #endif
 	u_int fumask, mmask, cmask;
@@ -930,7 +930,7 @@
 		cmask |= GET(chan);
 	}
 
-#if !defined(__FreeBSD__)
+#if !defined(__DragonFly__)
 	DPRINTFN(1,("uaudio_add_feature: bUnitId=%d bSourceId=%d, "
 		    "%d channels, mmask=0x%04x, cmask=0x%04x\n", 
 		    d->bUnitId, srcId, nchan, mmask, cmask));
@@ -960,13 +960,13 @@
 		}
 #undef GET
 
-#if !defined(__FreeBSD__)
+#if !defined(__DragonFly__)
 		mix.class = -1;	/* XXX */
 #endif
 		switch (ctl) {
 		case MUTE_CONTROL:
 			mix.type = MIX_ON_OFF;
-#if defined(__FreeBSD__)
+#if defined(__DragonFly__)
 			mix.ctl = SOUND_MIXER_NRDEVICES;
 #else
 			sprintf(mix.ctlname, "fea%d-%s-%s", unit,
@@ -977,7 +977,7 @@
 			break;
 		case VOLUME_CONTROL:
 			mix.type = MIX_SIGNED_16;
-#if defined(__FreeBSD__)
+#if defined(__DragonFly__)
 			/* mix.ctl = SOUND_MIXER_VOLUME; */
 			mix.ctl = SOUND_MIXER_PCM;
 #else
@@ -989,7 +989,7 @@
 			break;
 		case BASS_CONTROL:
 			mix.type = MIX_SIGNED_8;
-#if defined(__FreeBSD__)
+#if defined(__DragonFly__)
 			mix.ctl = SOUND_MIXER_BASS;
 #else
 			sprintf(mix.ctlname, "fea%d-%s-%s", unit,
@@ -1000,7 +1000,7 @@
 			break;
 		case MID_CONTROL:
 			mix.type = MIX_SIGNED_8;
-#if defined(__FreeBSD__)
+#if defined(__DragonFly__)
 			mix.ctl = SOUND_MIXER_NRDEVICES;	/* XXXXX */
 #else
 			sprintf(mix.ctlname, "fea%d-%s-%s", unit,
@@ -1011,7 +1011,7 @@
 			break;
 		case TREBLE_CONTROL:
 			mix.type = MIX_SIGNED_8;
-#if defined(__FreeBSD__)
+#if defined(__DragonFly__)
 			mix.ctl = SOUND_MIXER_TREBLE;
 #else
 			sprintf(mix.ctlname, "fea%d-%s-%s", unit,
@@ -1025,7 +1025,7 @@
 			break;
 		case AGC_CONTROL:
 			mix.type = MIX_ON_OFF;
-#if defined(__FreeBSD__)
+#if defined(__DragonFly__)
 			mix.ctl = SOUND_MIXER_NRDEVICES;	/* XXXXX */
 #else
 			sprintf(mix.ctlname, "fea%d-%s-%s", unit,
@@ -1036,7 +1036,7 @@
 			break;
 		case DELAY_CONTROL:
 			mix.type = MIX_UNSIGNED_16;
-#if defined(__FreeBSD__)
+#if defined(__DragonFly__)
 			mix.ctl = SOUND_MIXER_NRDEVICES;	/* XXXXX */
 #else
 			sprintf(mix.ctlname, "fea%d-%s-%s", unit,
@@ -1047,7 +1047,7 @@
 			break;
 		case BASS_BOOST_CONTROL:
 			mix.type = MIX_ON_OFF;
-#if defined(__FreeBSD__)
+#if defined(__DragonFly__)
 			mix.ctl = SOUND_MIXER_NRDEVICES;	/* XXXXX */
 #else
 			sprintf(mix.ctlname, "fea%d-%s-%s", unit,
@@ -1058,7 +1058,7 @@
 			break;
 		case LOUDNESS_CONTROL:
 			mix.type = MIX_ON_OFF;
-#if defined(__FreeBSD__)
+#if defined(__DragonFly__)
 			mix.ctl = SOUND_MIXER_LOUD;	/* Is this correct ? */
 #else
 			sprintf(mix.ctlname, "fea%d-%s-%s", unit,
@@ -1097,11 +1097,11 @@
 	mix.wIndex = MAKE(d->bUnitId, sc->sc_ac_iface);
 	mix.nchan = 1;
 	mix.wValue[0] = MAKE(UD_MODE_SELECT_CONTROL, 0);
-#if !defined(__FreeBSD__)
+#if !defined(__DragonFly__)
 	mix.class = -1;
 #endif
 	mix.type = MIX_ON_OFF;	/* XXX */
-#if !defined(__FreeBSD__)
+#if !defined(__DragonFly__)
 	mix.ctlunit = "";
 	sprintf(mix.ctlname, "pro%d-mode", d->bUnitId);
 #endif
@@ -1132,11 +1132,11 @@
 		mix.wIndex = MAKE(d->bUnitId, sc->sc_ac_iface);
 		mix.nchan = 1;
 		mix.wValue[0] = MAKE(XX_ENABLE_CONTROL, 0);
-#if !defined(__FreeBSD__)
+#if !defined(__DragonFly__)
 		mix.class = -1;
 #endif
 		mix.type = MIX_ON_OFF;
-#if !defined(__FreeBSD__)
+#if !defined(__DragonFly__)
 		mix.ctlunit = "";
 		sprintf(mix.ctlname, "pro%d.%d-enable", d->bUnitId, ptype);
 #endif
@@ -1181,11 +1181,11 @@
 		mix.wIndex = MAKE(d->bUnitId, sc->sc_ac_iface);
 		mix.nchan = 1;
 		mix.wValue[0] = MAKE(UA_EXT_ENABLE, 0);
-#if !defined(__FreeBSD__)
+#if !defined(__DragonFly__)
 		mix.class = -1;
 #endif
 		mix.type = MIX_ON_OFF;
-#if !defined(__FreeBSD__)
+#if !defined(__DragonFly__)
 		mix.ctlunit = "";
 		sprintf(mix.ctlname, "ext%d-enable", d->bUnitId);
 #endif
@@ -2201,7 +2201,7 @@
 #endif
 
 	ch->transferred += cb->size;
-#if defined(__FreeBSD__)
+#if defined(__DragonFly__)
 	/* s = spltty(); */
 	s = splhigh();
 	chn_intr(ch->pcm_ch);
@@ -2320,7 +2320,7 @@
 
 	/* Call back to upper layer */
 	ch->transferred += cb->size;
-#if defined(__FreeBSD__)
+#if defined(__DragonFly__)
 	s = spltty();
 	chn_intr(ch->pcm_ch);
 	splx(s);
@@ -2547,7 +2547,7 @@
 }
 
 
-#if defined(__FreeBSD__)
+#if defined(__DragonFly__)
 /************************************************************/
 void
 uaudio_init_params(struct uaudio_softc *sc, struct chan *ch)




More information about the Submit mailing list