diff options
author | bde <bde@FreeBSD.org> | 1995-04-25 12:18:05 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1995-04-25 12:18:05 +0000 |
commit | e565b4e20cc93af3226a11de3ed04a0fa45f91fe (patch) | |
tree | f54d020d7ed762dd341f6156035c9e90ccf7f435 /sys/i386/isa/pcvt/pcvt_hdr.h | |
parent | f844ce25301ca304c84cd37781b85582a0918861 (diff) | |
download | FreeBSD-src-e565b4e20cc93af3226a11de3ed04a0fa45f91fe.zip FreeBSD-src-e565b4e20cc93af3226a11de3ed04a0fa45f91fe.tar.gz |
Fix benign type mismatches int console functions. dev_t was assumed
to be `int' or smaller and some functions returned `int' instead
of `void'. The first bug was detected when console functions were
defined in a place central enough for type checking to actually
work and the second bug was introduced when the interface was
changed to match what the console functions in other drivers actually
return.
Diffstat (limited to 'sys/i386/isa/pcvt/pcvt_hdr.h')
-rw-r--r-- | sys/i386/isa/pcvt/pcvt_hdr.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/sys/i386/isa/pcvt/pcvt_hdr.h b/sys/i386/isa/pcvt/pcvt_hdr.h index 517969a..0419d71 100644 --- a/sys/i386/isa/pcvt/pcvt_hdr.h +++ b/sys/i386/isa/pcvt/pcvt_hdr.h @@ -1184,6 +1184,16 @@ extern u_char *saved_charsets[NVGAFONTS]; #define U_short int #define U_char int +/* + * In FreeBSD >= 2.0, dev_t has type `unsigned long', so promoting it + * doesn't cause any problems in prototypes. + */ + +#if PCVT_FREEBSD >= 200 +#undef Dev_t +#define Dev_t dev_t +#endif + /* in FreeBSD > 102 arguments for timeout()/untimeout() are a special type */ #if PCVT_FREEBSD > 102 @@ -1211,10 +1221,19 @@ struct tty *pcdevtotty ( Dev_t dev ); #endif /* PCVT_FREEBSD > 205 */ int pcrint ( void ); int pcparam ( struct tty *tp, struct termios *t ); + +/* + * In FreeBSD > 2.0.6, driver console functions are declared in i386/cons.h + * and some return void, so don't declare them here. + */ +#if PCVT_FREEBSD <= 205 int pccnprobe ( struct consdev *cp ); int pccninit ( struct consdev *cp ); -int pccnputc ( Dev_t dev, U_char c ); int pccngetc ( Dev_t dev ); +int pccncheckc ( Dev_t dev ); +int pccnputc ( Dev_t dev, U_char c ); +#endif + void pcstart ( struct tty *tp ); void pcstop ( struct tty *tp, int flag ); |