Index: libcio/blkrd.c
===================================================================
--- libcio/blkrd.c	(revision 7258c6ac4de2518c5430095742a27be7af0c89d7)
+++ libcio/blkrd.c	(revision e225e77aba20391e2188eb15a49190b1d473d368)
@@ -31,4 +31,6 @@
 #include "errdefs.h"
 #include "fspars.h"
+
+#include "memory.h"
 
 /* 
Index: libcio/blkwr.c
===================================================================
--- libcio/blkwr.c	(revision 7258c6ac4de2518c5430095742a27be7af0c89d7)
+++ libcio/blkwr.c	(revision e225e77aba20391e2188eb15a49190b1d473d368)
@@ -24,7 +24,13 @@
 #include "fspars.h"
 
+#include "memory.h"
+
 extern	int16_t	_nsic(struct fcb *fcp, struct bpb *bpp, int8_t *fp);
 extern	int16_t	_alcnew(struct fcb *fcp);
 extern	int16_t	_newcls(void);
+
+extern	int16_t micons(int16_t wi);
+extern	uint16_t _cl2lsn(struct bpb *bpp, uint16_t clnum);
+extern	void _ptcl12(uint16_t *fat, uint16_t cl, uint16_t val);
 
 extern	int32_t	_berrno;		/* last file system bios error number */
Index: libcio/clusmap.c
===================================================================
--- libcio/clusmap.c	(revision 7258c6ac4de2518c5430095742a27be7af0c89d7)
+++ libcio/clusmap.c	(revision e225e77aba20391e2188eb15a49190b1d473d368)
@@ -21,4 +21,6 @@
 extern	int16_t	_filecl(struct fcb *fp);
 extern	int16_t	_noper(void);
+
+extern	void xtrap15(void);
 
 /* 
Index: libcio/filesys.c
===================================================================
--- libcio/filesys.c	(revision 7258c6ac4de2518c5430095742a27be7af0c89d7)
+++ libcio/filesys.c	(revision e225e77aba20391e2188eb15a49190b1d473d368)
@@ -34,4 +34,7 @@
 extern	int8_t	*FilName(int8_t *s, int8_t *p);
 extern	int8_t	*FilExt(int8_t *s, int8_t *p);
+
+extern	void _clsdir(void);
+extern	void _clsfat(void);
 
 #if DEBUGIT
Index: libcio/fopen.c
===================================================================
--- libcio/fopen.c	(revision 7258c6ac4de2518c5430095742a27be7af0c89d7)
+++ libcio/fopen.c	(revision e225e77aba20391e2188eb15a49190b1d473d368)
@@ -12,4 +12,7 @@
 
 extern	int32_t	lseek(int16_t fd, int32_t pos, int16_t how);
+
+extern	int16_t close(int16_t fd);
+extern	int16_t open(int8_t *name, int16_t flag, int16_t mode);
 
 FILE *_opener(int8_t *name, int8_t *mode, int16_t aflag)
@@ -31,10 +34,10 @@
 
 	case 'r':	/* read mode */
-		if ((fp->_unit = open(name, (plusopt ? O_RDWR : O_RDONLY)|aflag)) EQ -1)
+		if ((fp->_unit = open(name, (plusopt ? O_RDWR : O_RDONLY), aflag)) EQ -1)
 			return(NULL);
 		break;
 
 	case 'w':	/* write mode */
-		if ((fp->_unit = open(name, (plusopt ? O_RDWR : O_WRONLY)|aflag|O_CREAT|O_TRUNC)) EQ -1)
+		if ((fp->_unit = open(name, (plusopt ? O_RDWR : O_WRONLY)|O_CREAT|O_TRUNC, aflag)) EQ -1)
 			return(NULL);
 
@@ -42,5 +45,5 @@
 	
 	case 'a':	/* append mode */
-		if ((fp->_unit = open(name, (plusopt ? O_RDWR : O_WRONLY)|aflag|O_CREAT)) EQ -1)
+		if ((fp->_unit = open(name, (plusopt ? O_RDWR : O_WRONLY)|O_CREAT, aflag)) EQ -1)
 			return(NULL);
 
Index: libcio/fscanf.c
===================================================================
--- libcio/fscanf.c	(revision 7258c6ac4de2518c5430095742a27be7af0c89d7)
+++ libcio/fscanf.c	(revision e225e77aba20391e2188eb15a49190b1d473d368)
@@ -8,4 +8,7 @@
 #include "stdio.h"
 #include "stddefs.h"
+
+extern int16_t agetc(FILE *ptr);
+extern int16_t scanfmt(int16_t (*getsub)(), int8_t *fmt, int16_t **args);
 
 static int16_t scnlast;
Index: libcio/fseek.c
===================================================================
--- libcio/fseek.c	(revision 7258c6ac4de2518c5430095742a27be7af0c89d7)
+++ libcio/fseek.c	(revision e225e77aba20391e2188eb15a49190b1d473d368)
@@ -12,4 +12,6 @@
 
 extern	int32_t	lseek(int16_t fd, int32_t pos, int16_t how);
+
+extern	int16_t flush_(FILE *ptr, int16_t data);
 
 /*
Index: libcio/fsinit.c
===================================================================
--- libcio/fsinit.c	(revision 7258c6ac4de2518c5430095742a27be7af0c89d7)
+++ libcio/fsinit.c	(revision e225e77aba20391e2188eb15a49190b1d473d368)
@@ -13,4 +13,6 @@
 #include "stdio.h"
 #include "stddefs.h"
+
+#include "memory.h"
 
 extern	int16_t	_bpbin, _dirin, _fatin, _dirmod, _fatmod;
Index: libcio/fstubs.c
===================================================================
--- libcio/fstubs.c	(revision 7258c6ac4de2518c5430095742a27be7af0c89d7)
+++ libcio/fstubs.c	(revision e225e77aba20391e2188eb15a49190b1d473d368)
@@ -11,4 +11,6 @@
 #include "io.h"
 #include "stddefs.h"
+
+extern void xtrap15(void);
 
 /*
Index: libcio/getc.c
===================================================================
--- libcio/getc.c	(revision 7258c6ac4de2518c5430095742a27be7af0c89d7)
+++ libcio/getc.c	(revision e225e77aba20391e2188eb15a49190b1d473d368)
@@ -8,4 +8,7 @@
 #include "stdio.h"
 #include "stddefs.h"
+
+extern int16_t read(int16_t fd, int8_t *buff, uint16_t len);
+extern void getbuff(FILE *ptr);
 
 int16_t getc(FILE *ptr)
Index: libcio/open.c
===================================================================
--- libcio/open.c	(revision 7258c6ac4de2518c5430095742a27be7af0c89d7)
+++ libcio/open.c	(revision e225e77aba20391e2188eb15a49190b1d473d368)
@@ -12,4 +12,6 @@
 #include "stddefs.h"
 
+#include "strings.h"
+
 extern	int16_t	_badfd(void);
 extern	int16_t	_noper(void);
Index: libcio/read.c
===================================================================
--- libcio/read.c	(revision 7258c6ac4de2518c5430095742a27be7af0c89d7)
+++ libcio/read.c	(revision e225e77aba20391e2188eb15a49190b1d473d368)
@@ -53,4 +53,7 @@
 
 int16_t	_filerd(struct fcb *fp, int8_t *buffer, uint16_t len);
+
+extern	int16_t ReadRN(struct fcb *fcp, int8_t *buf);
+extern	int16_t blkrd(struct fcb *fcp, int8_t *buf, int16_t ns);
 
 static int16_t (*t_read[])() = {
Index: libcio/unlink.c
===================================================================
--- libcio/unlink.c	(revision 7258c6ac4de2518c5430095742a27be7af0c89d7)
+++ libcio/unlink.c	(revision e225e77aba20391e2188eb15a49190b1d473d368)
@@ -18,4 +18,6 @@
 
 extern	int16_t	DelFile(struct fcb *fcp);
+
+extern	int16_t fcbinit(int8_t *name, struct fcb *fcp);
 
 /*
Index: libcio/write.c
===================================================================
--- libcio/write.c	(revision 7258c6ac4de2518c5430095742a27be7af0c89d7)
+++ libcio/write.c	(revision e225e77aba20391e2188eb15a49190b1d473d368)
@@ -12,4 +12,6 @@
 #include "errno.h"
 #include "stddefs.h"
+
+#include "memory.h"
 
 int16_t	_filewr(struct fcb *fp, int8_t *buffer, uint16_t len);
@@ -28,4 +30,7 @@
 extern	void	*memset(void *vp, int8_t c, int16_t n);
 
+extern	int16_t _seek(struct fcb *fcp);
+extern	uint16_t _cl2lsn(struct bpb *bpp, uint16_t clnum);
+
 extern	int16_t	_fatmod;
 
Index: libcio/writern.c
===================================================================
--- libcio/writern.c	(revision 7258c6ac4de2518c5430095742a27be7af0c89d7)
+++ libcio/writern.c	(revision e225e77aba20391e2188eb15a49190b1d473d368)
@@ -31,4 +31,6 @@
 #if	TBUFFER
 extern	int32_t	_secwr(int8_t *buf, int16_t rec);
+
+extern	int16_t _alcnew(struct fcb *fcp);
 #endif
 
