diff options
author | Bruce Evans <bde@FreeBSD.org> | 1996-09-21 14:59:43 +0000 |
---|---|---|
committer | Bruce Evans <bde@FreeBSD.org> | 1996-09-21 14:59:43 +0000 |
commit | ebedb5ad97718c0a271659c2563834837607f03f (patch) | |
tree | e03f53db0e9dc53fdad8b0a593af598744be17da /sys/i386 | |
parent | 83f52dababadc2c364a5ad22dbef8ea4e197530c (diff) | |
download | src-ebedb5ad97718c0a271659c2563834837607f03f.tar.gz src-ebedb5ad97718c0a271659c2563834837607f03f.zip |
Cleaned up all headers that include <sys/ioctl.h> or <sys/ioccom.h>:
- don't include <sys/ioctl.h> in any header. Include <sys/ioccom.h>
instead. This was already done in 4.4Lite for the most important
ioctl headers. Header spam currently increases kernel build
times by 10-20%. There are more than 30000 #includes (not counting
duplicates) for compiling LINT.
- include <sys/types.h> if and only it is necessary to make the header
almost self-sufficient (some ioctl headers still need structs from
elsewhere).
- uniformized idempotency ifdefs. Copied the style in the 4.4Lite
ioctl headers.
Notes
Notes:
svn path=/head/; revision=18444
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/ibcs2/ibcs2_socksys.h | 8 | ||||
-rw-r--r-- | sys/i386/include/apm_bios.h | 13 | ||||
-rw-r--r-- | sys/i386/include/asc_ioctl.h | 9 | ||||
-rw-r--r-- | sys/i386/include/console.h | 16 | ||||
-rw-r--r-- | sys/i386/include/gsc.h | 9 | ||||
-rw-r--r-- | sys/i386/include/ioctl_ctx.h | 11 | ||||
-rw-r--r-- | sys/i386/include/ioctl_fd.h | 12 | ||||
-rw-r--r-- | sys/i386/include/ioctl_meteor.h | 11 | ||||
-rw-r--r-- | sys/i386/include/joystick.h | 9 | ||||
-rw-r--r-- | sys/i386/include/lpt.h | 11 | ||||
-rw-r--r-- | sys/i386/include/pcaudioio.h | 10 | ||||
-rw-r--r-- | sys/i386/include/pcvt_ioctl.h | 4 | ||||
-rw-r--r-- | sys/i386/include/perfmon.h | 11 | ||||
-rw-r--r-- | sys/i386/include/random.h | 4 | ||||
-rw-r--r-- | sys/i386/include/soundcard.h | 12 | ||||
-rw-r--r-- | sys/i386/include/speaker.h | 12 | ||||
-rw-r--r-- | sys/i386/include/spigot.h | 10 | ||||
-rw-r--r-- | sys/i386/isa/b004.h | 10 | ||||
-rw-r--r-- | sys/i386/isa/gpib.h | 8 |
19 files changed, 108 insertions, 82 deletions
diff --git a/sys/i386/ibcs2/ibcs2_socksys.h b/sys/i386/ibcs2/ibcs2_socksys.h index f0f29f216399..33358055263d 100644 --- a/sys/i386/ibcs2/ibcs2_socksys.h +++ b/sys/i386/ibcs2/ibcs2_socksys.h @@ -23,11 +23,11 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#ifndef _IBCS2_SOCKSYS_H -#define _IBCS2_SOCKSYS_H 1 +#ifndef _I386_IBCS2_IBCS2_SOCKSYS_H_ +#define _I386_IBCS2_IBCS2_SOCKSYS_H_ #include <sys/ioccom.h> + #include <i386/ibcs2/ibcs2_types.h> #define SOCKSYS_ACCEPT 1 @@ -123,4 +123,4 @@ struct ibcs2_socksys_args { int ibcs2_socksys __P((struct proc *, struct ibcs2_socksys_args *, int *)); -#endif /* _IBCS2_SOCKSYS_H */ +#endif /* !_I386_IBCS2_IBCS2_SOCKSYS_H_ */ diff --git a/sys/i386/include/apm_bios.h b/sys/i386/include/apm_bios.h index 8e2cbf64a443..288f4b8512f3 100644 --- a/sys/i386/include/apm_bios.h +++ b/sys/i386/include/apm_bios.h @@ -12,11 +12,16 @@ * * Aug, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD) * - * $Id: apm_bios.h,v 1.10 1996/04/23 16:02:53 nate Exp $ + * $Id: apm_bios.h,v 1.11 1996/09/12 11:08:04 asami Exp $ */ -#ifndef _MACHINE_APM_BIOS_H_ -#define _MACHINE_APM_BIOS_H_ 1 +#ifndef _MACHINE_APM_BIOS_H_ +#define _MACHINE_APM_BIOS_H_ + +#ifndef KERNEL +#include <sys/types.h> +#endif +#include <sys/ioccom.h> #ifdef KERNEL @@ -192,4 +197,4 @@ typedef struct apm_info { #endif /* !ASSEMBLER && !INITIALIZER */ -#endif /* _MACHINE_APM_BIOS_H_ */ +#endif /* !_MACHINE_APM_BIOS_H_ */ diff --git a/sys/i386/include/asc_ioctl.h b/sys/i386/include/asc_ioctl.h index 6d3342993330..ac92eddd6e07 100644 --- a/sys/i386/include/asc_ioctl.h +++ b/sys/i386/include/asc_ioctl.h @@ -29,11 +29,10 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _I386_ASC_IOCTL_H_ -#define _I386_ASC_IOCTL_H_ +#ifndef _MACHINE_ASC_IOCTL_H_ +#define _MACHINE_ASC_IOCTL_H_ -#include <sys/types.h> -#include <sys/ioctl.h> +#include <sys/ioccom.h> #define ASC_GRES _IOR('S', 1, int) /* get resolution / dpi */ #define ASC_SRES _IOW('S', 2, int) /* set resolution / dpi */ @@ -49,4 +48,4 @@ #define ASC_SRESSW _IO('S', 11) /* set resolution by switch */ -#endif +#endif /* !_MACHINE_ASC_IOCTL_H_ */ diff --git a/sys/i386/include/console.h b/sys/i386/include/console.h index 43b70f03a91b..9fc33d3e75db 100644 --- a/sys/i386/include/console.h +++ b/sys/i386/include/console.h @@ -25,13 +25,15 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: console.h,v 1.21 1996/06/14 11:00:57 asami Exp $ + * $Id: console.h,v 1.23 1996/06/25 08:54:34 sos Exp $ */ -#ifndef _CONSOLE_H_ -#define _CONSOLE_H_ +#ifndef _MACHINE_CONSOLE_H_ +#define _MACHINE_CONSOLE_H_ +#ifndef KERNEL #include <sys/types.h> +#endif #include <sys/ioccom.h> #define KDGKBMODE _IOR('K', 6, int) @@ -80,7 +82,7 @@ #ifdef PC98 #define ADJUST_CLOCK _IO('t',100) /* for 98note resume */ -#endif /* for PC98 */ +#endif #define VT_OPENQRY _IOR('v', 1, int) #define VT_SETMODE _IOW('v', 2, vtmode_t) @@ -336,7 +338,7 @@ typedef struct ssaver ssaver_t; #define M_HGC_P0 0xe0 /* hercules graphics - page 0 @ B0000 */ #define M_HGC_P1 0xe1 /* hercules graphics - page 1 @ B8000 */ #define M_MCA_MODE 0xff /* monochrome adapter mode */ -#endif +#endif /* PC98 */ #ifdef PC98 #define SW_PC98_80x25 _IO('S', M_PC98_80x25) @@ -378,6 +380,6 @@ typedef struct ssaver ssaver_t; #define SW_CG640x480 _IO('S', M_VGA12) #define SW_VGA13 _IO('S', M_VGA13) #define SW_VGA_CG320 _IO('S', M_VGA13) -#endif +#endif /* PC98 */ -#endif +#endif /* !_MACHINE_CONSOLE_H_ */ diff --git a/sys/i386/include/gsc.h b/sys/i386/include/gsc.h index aa225a843880..e84e63c3568e 100644 --- a/sys/i386/include/gsc.h +++ b/sys/i386/include/gsc.h @@ -29,11 +29,10 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _GSC_IOCTL_H_ -#define _GSC_IOCTL_H_ +#ifndef _MACHINE_GSC_H_ +#define _MACHINE_GSC_H_ -#include <sys/types.h> -#include <sys/ioctl.h> +#include <sys/ioccom.h> #define GSC_GRES _IOR('S', 1, int) /* get resolution / dpi */ #define GSC_SRES _IOW('S', 2, int) /* set resolution / dpi */ @@ -49,4 +48,4 @@ #define GSC_SRESSW _IO('S', 11) /* set resolution by switch */ -#endif +#endif /* !_MACHINE_GSC_H_ */ diff --git a/sys/i386/include/ioctl_ctx.h b/sys/i386/include/ioctl_ctx.h index a330664c8579..bf76f570ac68 100644 --- a/sys/i386/include/ioctl_ctx.h +++ b/sys/i386/include/ioctl_ctx.h @@ -7,17 +7,18 @@ * of this software, nor does the author assume any responsibility * for damages incurred with its use * - * $Id: ioctl_ctx.h,v 1.1 1994/10/01 17:59:38 davidg Exp $ + * $Id: ioctl_ctx.h,v 1.2 1995/05/30 08:00:40 rgrimes Exp $ */ /* * ioctl constants for Cortex-I frame grabber */ -#ifndef _MACHINE_IOCTL_CTX_H_ -#define _MACHINE_IOCTL_CTX_H_ +#ifndef _MACHINE_IOCTL_CTX_H_ +#define _MACHINE_IOCTL_CTX_H_ + +#include <sys/ioccom.h> -#include <sys/ioctl.h> typedef char _CTX_LUTBUF[256]; /* look up table buffer */ #define CTX_LIVE _IO('x', 1) /* live video */ @@ -27,4 +28,4 @@ typedef char _CTX_LUTBUF[256]; /* look up table buffer */ #define CTX_SET_LUT _IOW('x', 5, _CTX_LUTBUF) /* set lookup table */ #define CTX_GET_LUT _IOR('x', 6, _CTX_LUTBUF) /* get lookup table */ -#endif /* ifndef _MACHINE_IOCTL_CTX_H */ +#endif /* !_MACHINE_IOCTL_CTX_H_ */ diff --git a/sys/i386/include/ioctl_fd.h b/sys/i386/include/ioctl_fd.h index 2a9212b7a4b3..1f6b6d57b322 100644 --- a/sys/i386/include/ioctl_fd.h +++ b/sys/i386/include/ioctl_fd.h @@ -24,14 +24,16 @@ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * - * $Id: ioctl_fd.h,v 1.7 1994/10/30 19:17:39 joerg Exp $ + * $Id: ioctl_fd.h,v 1.8 1996/01/30 22:54:34 mpp Exp $ */ -#ifndef _IOCTL_FD_H -#define _IOCTL_FD_H +#ifndef _MACHINE_IOCTL_FD_H_ +#define _MACHINE_IOCTL_FD_H_ +#ifndef KERNEL #include <sys/types.h> -#include <sys/ioctl.h> +#endif +#include <sys/ioccom.h> #define FD_FORMAT_VERSION 110 /* used to validate before formatting */ #define FD_MAX_NSEC 36 /* highest known number of spt - allow for */ @@ -120,4 +122,4 @@ struct fd_type { /* for some controllers 1MPBS instead */ #endif /* FDC_500KBPS */ -#endif /* !def _IOCTL_FD_H */ +#endif /* !_MACHINE_IOCTL_FD_H_ */ diff --git a/sys/i386/include/ioctl_meteor.h b/sys/i386/include/ioctl_meteor.h index f4325504e723..919100f8d534 100644 --- a/sys/i386/include/ioctl_meteor.h +++ b/sys/i386/include/ioctl_meteor.h @@ -32,10 +32,13 @@ * ioctl constants for Matrox Meteor Capture card. */ -#ifndef _MACHINE_IOCTL_METEOR_H -#define _MACHINE_IOCTL_METEOR_H +#ifndef _MACHINE_IOCTL_METEOR_H_ +#define _MACHINE_IOCTL_METEOR_H_ -#include <sys/ioctl.h> +#ifndef KERNEL +#include <sys/types.h> +#endif +#include <sys/ioccom.h> struct meteor_capframe { short command; /* see below for valid METEORCAPFRM commands */ @@ -179,4 +182,4 @@ struct meteor_mem { caddr_t buf; /* The real space (virtual addr) */ } ; -#endif /* ifndef _MACHINE_IOCTL_METEOR_H */ +#endif /* !_MACHINE_IOCTL_METEOR_H_ */ diff --git a/sys/i386/include/joystick.h b/sys/i386/include/joystick.h index d070ac050714..051d991ee5f1 100644 --- a/sys/i386/include/joystick.h +++ b/sys/i386/include/joystick.h @@ -1,8 +1,7 @@ -#ifndef _JOY_IOCTL_H_ -#define _JOY_IOCTL_H_ +#ifndef _MACHINE_JOYSTICK_H_ +#define _MACHINE_JOYSTICK_H_ -#include <sys/types.h> -#include <sys/ioctl.h> +#include <sys/ioccom.h> struct joystick { int x; @@ -18,4 +17,4 @@ struct joystick { #define JOY_GET_X_OFFSET _IOR('J', 5, int) /* get offset on X-axis */ #define JOY_GET_Y_OFFSET _IOR('J', 6, int) /* get offset on Y-axis */ -#endif /* _JOY_IOCTL_H_ */ +#endif /* !_MACHINE_JOYSTICK_H_ */ diff --git a/sys/i386/include/lpt.h b/sys/i386/include/lpt.h index a203c7d69d54..14ea3d325534 100644 --- a/sys/i386/include/lpt.h +++ b/sys/i386/include/lpt.h @@ -11,15 +11,14 @@ * * Geoff Rehmet, Rhodes University, South Africa <csgr@cs.ru.ac.za> * - * $Id: lpt.h,v 1.2 1994/08/02 07:38:52 davidg Exp $ + * $Id: lpt.h,v 1.3 1995/05/30 08:00:41 rgrimes Exp $ */ -#ifndef _LPT_PRINTER_H_ -#define _LPT_PRINTER_H_ +#ifndef _MACHINE_LPT_H_ +#define _MACHINE_LPT_H_ -#include <sys/types.h> -#include <sys/ioctl.h> +#include <sys/ioccom.h> #define LPT_IRQ _IOW('p', 1, long) /* set interrupt status */ -#endif +#endif /* !_MACHINE_LPT_H_ */ diff --git a/sys/i386/include/pcaudioio.h b/sys/i386/include/pcaudioio.h index b2b79c82b660..c580fd42f979 100644 --- a/sys/i386/include/pcaudioio.h +++ b/sys/i386/include/pcaudioio.h @@ -25,11 +25,13 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: pcaudioio.h,v 1.5 1996/01/30 22:54:42 mpp Exp $ + * $Id: pcaudioio.h,v 1.6 1996/07/17 20:18:42 joerg Exp $ */ -#ifndef _PCAUDIOIO_H_ -#define _PCAUDIOIO_H_ +#ifndef _MACHINE_PCAUDIOIO_H_ +#define _MACHINE_PCAUDIOIO_H_ + +#include <sys/ioccom.h> typedef struct audio_prinfo { unsigned sample_rate; /* samples per second */ @@ -77,4 +79,4 @@ typedef struct audio_info { #define AUDIO_COMPAT_DRAIN _IO('P', 1) #define AUDIO_COMPAT_FLUSH _IO('P', 0) -#endif /*!_PCAUDIOIO_H*/ +#endif /* !_MACHINE_PCAUDIOIO_H_ */ diff --git a/sys/i386/include/pcvt_ioctl.h b/sys/i386/include/pcvt_ioctl.h index 9a369da9546e..ac26796e234c 100644 --- a/sys/i386/include/pcvt_ioctl.h +++ b/sys/i386/include/pcvt_ioctl.h @@ -73,7 +73,7 @@ #if !defined(KERNEL) && !defined(_KERNEL) #include <sys/types.h> #endif -#include <sys/ioctl.h> +#include <sys/ioccom.h> /*---------------------------------------------------------------------------* * IOCTLs for MF II and AT Keyboards @@ -578,4 +578,4 @@ typedef struct keymap keymap_t; /* end of USL VT compatibility stuff */ -#endif /* ! _MACHINE_PCVT_IOCTL_H_ */ +#endif /* !_MACHINE_PCVT_IOCTL_H_ */ diff --git a/sys/i386/include/perfmon.h b/sys/i386/include/perfmon.h index 8aec6dfab2d3..8e5023c5409b 100644 --- a/sys/i386/include/perfmon.h +++ b/sys/i386/include/perfmon.h @@ -26,7 +26,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: perfmon.h,v 1.1 1996/03/26 19:57:56 wollman Exp $ */ /* @@ -34,12 +34,13 @@ * Pentium Pro CPUs. */ -#ifndef _MACHINE_PERFMON_H_ -#define _MACHINE_PERFMON_H_ 1 +#ifndef _MACHINE_PERFMON_H_ +#define _MACHINE_PERFMON_H_ #ifndef KERNEL -#include <sys/ioccom.h> +#include <sys/types.h> #endif +#include <sys/ioccom.h> #define NPMC 2 @@ -258,4 +259,4 @@ int perfmon_ioctl __P((dev_t, int, caddr_t, int, struct proc *)); #define PMC5_DATA_RW 40 #define PMC5_DATA_RW_MISS 41 -#endif /* _MACHINE_PERFMON_H_ */ +#endif /* !_MACHINE_PERFMON_H_ */ diff --git a/sys/i386/include/random.h b/sys/i386/include/random.h index 266cc91cd83f..c328d1b60123 100644 --- a/sys/i386/include/random.h +++ b/sys/i386/include/random.h @@ -1,7 +1,7 @@ /* * random.h -- A strong random number generator * - * $Id: random.h,v 1.6 1996/06/17 16:47:39 bde Exp $ + * $Id: random.h,v 1.7 1996/09/03 10:22:30 asami Exp $ * * Version 0.95, last modified 18-Oct-95 * @@ -47,7 +47,7 @@ * */ -#ifndef _MACHINE_RANDOM_H_ +#ifndef _MACHINE_RANDOM_H_ #define _MACHINE_RANDOM_H_ #include <sys/ioccom.h> diff --git a/sys/i386/include/soundcard.h b/sys/i386/include/soundcard.h index 3dcdaa111b36..666a4b86f092 100644 --- a/sys/i386/include/soundcard.h +++ b/sys/i386/include/soundcard.h @@ -1,5 +1,3 @@ -#ifndef SOUNDCARD_H -#define SOUNDCARD_H /* * Copyright by Hannu Savolainen 1993 * @@ -37,10 +35,13 @@ * hannu@voxware.pp.fi */ +#ifndef _MACHINE_SOUNDCARD_H_ +#define _MACHINE_SOUNDCARD_H_ + #define SOUND_VERSION 301 #define VOXWARE -#include <sys/ioctl.h> +#include <sys/ioccom.h> /* * Supported card ID numbers (Should be somewhere else?) @@ -1044,5 +1045,6 @@ void seqbuf_dump(void); /* This function must be provided by programs */ perror("Write patch: /dev/sequencer");} #define SEQ_WRPATCH2(patchx, len) (seqbuf_dump(), write(seqfd, (char*)(patchx), len)) -#endif -#endif +#endif /* !KERNEL_SPAM */ + +#endif /* !_MACHINE_SOUNDCARD_H_ */ diff --git a/sys/i386/include/speaker.h b/sys/i386/include/speaker.h index f097e4807cf8..7a233c712a0c 100644 --- a/sys/i386/include/speaker.h +++ b/sys/i386/include/speaker.h @@ -4,13 +4,13 @@ * v1.4 by Eric S. Raymond (esr@snark.thyrsus.com) Aug 1993 * modified for FreeBSD by Andrew A. Chernov <ache@astral.msk.su> * - * $Id$ + * $Id: speaker.h,v 1.2 1994/08/02 07:39:05 davidg Exp $ */ -#ifndef _SPEAKER_H_ -#define _SPEAKER_H_ +#ifndef _MACHINE_SPEAKER_H_ +#define _MACHINE_SPEAKER_H_ -#include <sys/ioctl.h> +#include <sys/ioccom.h> #define SPKRTONE _IOW('S', 1, tone_t) /* emit tone */ #define SPKRTUNE _IO('S', 2) /* emit tone sequence*/ @@ -27,6 +27,4 @@ tone_t; * see the spkr(4) man page for details. */ -#endif /* _SPEAKER_H_ */ - -/* speaker.h ends here */ +#endif /* !_MACHINE_SPEAKER_H_ */ diff --git a/sys/i386/include/spigot.h b/sys/i386/include/spigot.h index b7e34700d474..32dcd3758912 100644 --- a/sys/i386/include/spigot.h +++ b/sys/i386/include/spigot.h @@ -25,6 +25,12 @@ * * Version 1.2, Aug 30, 1995. */ + +#ifndef _MACHINE_SPIGOT_H_ +#define _MACHINE_SPIGOT_H_ + +#include <sys/ioccom.h> + struct spigot_info { unsigned long maddr; unsigned short irq; @@ -85,4 +91,6 @@ unsigned char spigot_status(void); * * spigot_status() will return the above status bits. */ -#endif +#endif /* !KERNEL */ + +#endif /* !_MACHINE_SPIGOT_H_ */ diff --git a/sys/i386/isa/b004.h b/sys/i386/isa/b004.h index 6fc8a1e384a8..8ae161f02527 100644 --- a/sys/i386/isa/b004.h +++ b/sys/i386/isa/b004.h @@ -1,6 +1,3 @@ -#ifndef _B004_H -#define _B004_H - /* * b004.h * @@ -41,7 +38,10 @@ * Works for FreeBSD 1.1.5 */ -#include <sys/ioctl.h> +#ifndef _I386_ISA_B004_H_ +#define _I386_ISA_B004_H_ + +#include <sys/ioccom.h> /* * device status FLAGS @@ -151,4 +151,4 @@ struct b004_struct { #define B004_ASSERT_ANALYSE 0x01 /* switch transputer to analyse-mode */ #define B004_DEASSERT_ANALYSE 0x00 -#endif +#endif /* !_I386_ISA_B004_H_ */ diff --git a/sys/i386/isa/gpib.h b/sys/i386/isa/gpib.h index 557880a4b127..065c086c0cc0 100644 --- a/sys/i386/isa/gpib.h +++ b/sys/i386/isa/gpib.h @@ -1,3 +1,8 @@ +#ifndef _I386_ISA_GPIB_H_ +#define _I386_ISA_GPIB_H_ + +#include <sys/ioccom.h> + /* gpib data structures */ struct gpibdata { char *data; /* data string for ins and outs */ @@ -5,7 +10,6 @@ struct gpibdata { int *count; } ; - /* IOCTL commands */ #define GPIBWRITE _IOW('g',1,struct gpibdata) #define GPIBREAD _IOW('g',2,struct gpibdata) @@ -17,3 +21,5 @@ struct gpibdata { #define GPIBMREMOTE _IOW('g',8,struct gpibdata) #define GPIBMLOCAL _IOW('g',9,struct gpibdata) #define GPIBSPOLL _IOW('g',10,struct gpibdata) + +#endif /* !_I386_ISA_GPIB_H_ */ |