diff options
author | bde <bde@FreeBSD.org> | 1996-06-17 16:47:43 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1996-06-17 16:47:43 +0000 |
commit | 209ea16ce9d259ba9f096249394d073e50356282 (patch) | |
tree | 1bd914359c715d8b8789bccdfdb2e26d583502ab | |
parent | 8accda5bc327454e7946565276e3c52b82a4877f (diff) | |
download | FreeBSD-src-209ea16ce9d259ba9f096249394d073e50356282.zip FreeBSD-src-209ea16ce9d259ba9f096249394d073e50356282.tar.gz |
Reduced nesting of #includes in random.h and adjusted isa/random_machdep.c
to match (pc98/random_machdep.c probably requires a similar change). This
is a problem area for the PC98 merge - all PC98 ifdefs in <machine/*.h> are
kludges to work around incorrect layering.
-rw-r--r-- | sys/i386/include/random.h | 32 | ||||
-rw-r--r-- | sys/i386/isa/random_machdep.c | 3 | ||||
-rw-r--r-- | sys/kern/kern_random.c | 3 | ||||
-rw-r--r-- | sys/sys/random.h | 32 |
4 files changed, 34 insertions, 36 deletions
diff --git a/sys/i386/include/random.h b/sys/i386/include/random.h index 73957b9..8d91cbf 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.4 1996/01/30 22:54:53 mpp Exp $ + * $Id: random.h,v 1.5 1996/06/14 11:01:04 asami Exp $ * * Version 0.95, last modified 18-Oct-95 * @@ -48,29 +48,27 @@ */ #ifndef _MACHINE_RANDOM_H_ -#define _MACHINE_RANDOM_H_ 1 +#define _MACHINE_RANDOM_H_ -#if defined(KERNEL) -#ifdef PC98 -#include <pc98/pc98/icu.h> -#include <pc98/pc98/pc98_device.h> -#else -#include <i386/isa/icu.h> -#include <i386/isa/isa_device.h> -#endif -#endif -#include <sys/ioctl.h> +#include <sys/ioccom.h> #define MEM_SETIRQ _IOW('r', 1, u_int16_t) /* set interrupt */ #define MEM_CLEARIRQ _IOW('r', 2, u_int16_t) /* clear interrupt */ #define MEM_RETURNIRQ _IOR('r', 3, u_int16_t) /* return interrupt */ -#if defined(KERNEL) +#ifdef KERNEL + +/* XXX include from the wrong place(s) for inthand2_t. */ +#ifdef PC98 +#include <pc98/pc98/pc98_device.h> +#else +#include <i386/isa/isa_device.h> +#endif /* Interrupts to be used in the randomizing process */ -extern inthand2_t *sec_intr_handler[ICU_LEN]; -extern int sec_intr_unit[ICU_LEN]; +extern inthand2_t *sec_intr_handler[]; +extern int sec_intr_unit[]; /* Exported functions */ @@ -90,6 +88,6 @@ u_int read_random_unlimited(char *buf, u_int size); u_int write_random(const char *buf, u_int nbytes); #endif -#endif +#endif /* KERNEL */ -#endif +#endif /* !_MACHINE_RANDOM_H_ */ diff --git a/sys/i386/isa/random_machdep.c b/sys/i386/isa/random_machdep.c index 8944a9d..2b713ba 100644 --- a/sys/i386/isa/random_machdep.c +++ b/sys/i386/isa/random_machdep.c @@ -1,7 +1,7 @@ /* * random_machdep.c -- A strong random number generator * - * $Id: random_machdep.c,v 1.7 1996/06/08 08:18:00 bde Exp $ + * $Id: random_machdep.c,v 1.8 1996/06/12 05:03:48 gpalmer Exp $ * * Version 0.95, last modified 18-Oct-95 * @@ -48,6 +48,7 @@ #include <machine/clock.h> #include <machine/random.h> +#include <i386/isa/icu.h> #include <i386/isa/isa.h> #include <i386/isa/isa_device.h> #include <i386/isa/timerreg.h> diff --git a/sys/kern/kern_random.c b/sys/kern/kern_random.c index 8944a9d..2b713ba 100644 --- a/sys/kern/kern_random.c +++ b/sys/kern/kern_random.c @@ -1,7 +1,7 @@ /* * random_machdep.c -- A strong random number generator * - * $Id: random_machdep.c,v 1.7 1996/06/08 08:18:00 bde Exp $ + * $Id: random_machdep.c,v 1.8 1996/06/12 05:03:48 gpalmer Exp $ * * Version 0.95, last modified 18-Oct-95 * @@ -48,6 +48,7 @@ #include <machine/clock.h> #include <machine/random.h> +#include <i386/isa/icu.h> #include <i386/isa/isa.h> #include <i386/isa/isa_device.h> #include <i386/isa/timerreg.h> diff --git a/sys/sys/random.h b/sys/sys/random.h index 73957b9..8d91cbf 100644 --- a/sys/sys/random.h +++ b/sys/sys/random.h @@ -1,7 +1,7 @@ /* * random.h -- A strong random number generator * - * $Id: random.h,v 1.4 1996/01/30 22:54:53 mpp Exp $ + * $Id: random.h,v 1.5 1996/06/14 11:01:04 asami Exp $ * * Version 0.95, last modified 18-Oct-95 * @@ -48,29 +48,27 @@ */ #ifndef _MACHINE_RANDOM_H_ -#define _MACHINE_RANDOM_H_ 1 +#define _MACHINE_RANDOM_H_ -#if defined(KERNEL) -#ifdef PC98 -#include <pc98/pc98/icu.h> -#include <pc98/pc98/pc98_device.h> -#else -#include <i386/isa/icu.h> -#include <i386/isa/isa_device.h> -#endif -#endif -#include <sys/ioctl.h> +#include <sys/ioccom.h> #define MEM_SETIRQ _IOW('r', 1, u_int16_t) /* set interrupt */ #define MEM_CLEARIRQ _IOW('r', 2, u_int16_t) /* clear interrupt */ #define MEM_RETURNIRQ _IOR('r', 3, u_int16_t) /* return interrupt */ -#if defined(KERNEL) +#ifdef KERNEL + +/* XXX include from the wrong place(s) for inthand2_t. */ +#ifdef PC98 +#include <pc98/pc98/pc98_device.h> +#else +#include <i386/isa/isa_device.h> +#endif /* Interrupts to be used in the randomizing process */ -extern inthand2_t *sec_intr_handler[ICU_LEN]; -extern int sec_intr_unit[ICU_LEN]; +extern inthand2_t *sec_intr_handler[]; +extern int sec_intr_unit[]; /* Exported functions */ @@ -90,6 +88,6 @@ u_int read_random_unlimited(char *buf, u_int size); u_int write_random(const char *buf, u_int nbytes); #endif -#endif +#endif /* KERNEL */ -#endif +#endif /* !_MACHINE_RANDOM_H_ */ |