Index: include/biosdefs.h
===================================================================
--- include/biosdefs.h	(revision fa3880436faee3a802167a6643a177727fdf94ea)
+++ include/biosdefs.h	(revision 8973acd23a70305139d469bac63060280979efcb)
@@ -64,18 +64,18 @@
 struct bpb {			/* BIOS parameter block returned by B_GBPB */
 
-	uint16_t	recsiz;		/* physical sector size in bytes */
-	uint16_t	clsiz;		/* cluster size in sectors */
-	uint16_t	clsizb;		/* cluster size in bytes */
-	uint16_t	rdlen;		/* root directory length in sectors */
-	uint16_t	fsiz;		/* FAT size in sectors */
-	uint16_t	fatrec;		/* sector number of 1st sector of 2nd FAT */
-	uint16_t	datrec;		/* sector number of 1st data sector */
-	uint16_t	numcl;		/* number of data clusters on disk */
+	int16_t		recsiz;		/* physical sector size in bytes */
+	int16_t		clsiz;		/* cluster size in sectors */
+	int16_t		clsizb;		/* cluster size in bytes */
+	int16_t		rdlen;		/* root directory length in sectors */
+	int16_t		fsiz;		/* FAT size in sectors */
+	int16_t		fatrec;		/* sector number of 1st sector of 2nd FAT */
+	int16_t		datrec;		/* sector number of 1st data sector */
+	int16_t		numcl;		/* number of data clusters on disk */
 	uint16_t	bflags;		/* flags */
-	uint16_t	ntracks;	/* number of tracks */
-	uint16_t	nsides;		/* number of sides (heads) */
-	uint16_t	dspc;		/* sectors per cylinder */
-	uint16_t	dspt;		/* sectors per track */
-	uint16_t	hidden;		/* number of hidden files */
+	int16_t		ntracks;	/* number of tracks */
+	int16_t		nsides;		/* number of sides (heads) */
+	int16_t		dspc;		/* sectors per cylinder */
+	int16_t		dspt;		/* sectors per track */
+	int16_t		hidden;		/* number of hidden files */
 	int8_t	serno[3];		/* disk serial number */
 	int8_t	nada;			/* --- filler - nothing here --- */
@@ -84,5 +84,5 @@
 #define	BPBSIZE	32		/* length of a BPB */
 
-#define	B_FAT16	0x0001		/* flag for using 16 bit FAT entries */
+#define	B_FAT16	0x0001u		/* flag for using 16 bit FAT entries */
 
 /*
@@ -94,22 +94,22 @@
 struct dirent {			/* Directory entry */
 
-	int8_t	fname[8];		/* file name */
-	int8_t	fext[3];		/* file extension */
-	int8_t	atrib;			/* attribute byte */
-	int8_t	unused[10];		/* unused space */
-	uint16_t	crtime;		/* 'LLHH' creation time */
-	uint16_t	crdate;		/* 'LLHH' creation date */
-	uint16_t	bclust;		/* 'LLHH' starting cluster number */
-	int32_t	flen;			/* 'LLHH' file length */
+	int8_t	fname[8];	/* file name */
+	int8_t	fext[3];	/* file extension */
+	uint8_t	atrib;		/* attribute byte */
+	int8_t	unused[10];	/* unused space */
+	uint16_t	crtime;	/* 'LLHH' creation time */
+	uint16_t	crdate;	/* 'LLHH' creation date */
+	uint16_t	bclust;	/* 'LLHH' starting cluster number */
+	uint32_t	flen;	/* 'LLHH' file length */
 };
 
 #define	DENTSIZE	(sizeof (struct dirent))
 
-#define	F_RDONLY	0x01	/* Read only file */
-#define	F_HIDDEN	0x02	/* Hidden file */
-#define	F_SYSTEM	0x04	/* System file */
-#define	F_VOLUME	0x08	/* Volume label */
-#define	F_SUBDIR	0x10	/* Sub-directory */
-#define	F_ARCHIV	0x20	/* Archived */
+#define	F_RDONLY	0x01u	/* Read only file */
+#define	F_HIDDEN	0x02u	/* Hidden file */
+#define	F_SYSTEM	0x04u	/* System file */
+#define	F_VOLUME	0x08u	/* Volume label */
+#define	F_SUBDIR	0x10u	/* Sub-directory */
+#define	F_ARCHIV	0x20u	/* Archived */
 
 /*
@@ -123,27 +123,27 @@
 	struct	dirent	de;	/* directory entry image for file */
 	uint16_t	modefl;	/* fcb flags */
-	uint16_t	clsec;	/* current sector in cluster */
-	uint16_t	curcls;	/* current cluster */
-	uint16_t	offset;	/* current offset into sector */
-	int32_t	curlsn;		/* current logical sector number in file */
-	int32_t	curdsn;		/* current logical sector number on disk */
+	int16_t	clsec;		/* current sector in cluster */
+	int16_t	curcls;		/* current cluster */
+	int16_t	offset;		/* current offset into sector */
+	int16_t	curlsn;		/* current logical sector number in file */
+	int16_t	curdsn;		/* current logical sector number on disk */
 	int32_t	curlen;		/* current file length in bytes */
-	int32_t	asects;		/* allocated file length in sectors */
+	int16_t	asects;		/* allocated file length in sectors */
 };
 
-#define	FC_EOF	0x8000		/* end of file */
-#define	FC_BAD	0x4000		/* bad FAT entry encountered */
-#define	FC_ERR	0x2000		/* error encountered */
-#define	FC_OPN	0x1000		/* file open */
+#define	FC_EOF	0x8000u		/* end of file */
+#define	FC_BAD	0x4000u		/* bad FAT entry encountered */
+#define	FC_ERR	0x2000u		/* error encountered */
+#define	FC_OPN	0x1000u		/* file open */
 
-#define	FC_CR	0x0800		/* create mode */
-#define	FC_AP	0x0400		/* append mode */
-#define	FC_WR	0x0200		/* write mode */
-#define	FC_RD	0x0100		/* read mode */
+#define	FC_CR	0x0800u		/* create mode */
+#define	FC_AP	0x0400u		/* append mode */
+#define	FC_WR	0x0200u		/* write mode */
+#define	FC_RD	0x0100u		/* read mode */
 
-#define	FC_EX	0x0080		/* exclusive mode */
-#define	FC_TR	0x0040		/* truncate mode */
-#define	FC_NB	0x0020		/* non-blocking mode */
-#define	FC_BF	0x0010		/* binary file mode */
+#define	FC_EX	0x0080u		/* exclusive mode */
+#define	FC_TR	0x0040u		/* truncate mode */
+#define	FC_NB	0x0020u		/* non-blocking mode */
+#define	FC_BF	0x0010u		/* binary file mode */
 
 #define	FC_RW	(FC_RD | FC_WR)	/* read-write mode */
