diff --git a/mach/minix/libsys/_access.c b/mach/minix/libsys/_access.c index b90aec07c..5bfd12fb5 100644 --- a/mach/minix/libsys/_access.c +++ b/mach/minix/libsys/_access.c @@ -1,7 +1,8 @@ #include #define access _access +#include -int access(name, mode) +PUBLIC int access(name, mode) char *name; int mode; { diff --git a/mach/minix/libsys/_alarm.c b/mach/minix/libsys/_alarm.c index 6acc6c9f7..605ec1303 100644 --- a/mach/minix/libsys/_alarm.c +++ b/mach/minix/libsys/_alarm.c @@ -1,7 +1,8 @@ #include #define alarm _alarm +#include -unsigned int alarm(sec) +PUBLIC unsigned int alarm(sec) unsigned int sec; { return(_callm1(MM, ALARM, (int) sec, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR)); diff --git a/mach/minix/libsys/_brk.c b/mach/minix/libsys/_brk.c index 1f2e565a7..82bbe6a80 100644 --- a/mach/minix/libsys/_brk.c +++ b/mach/minix/libsys/_brk.c @@ -1,6 +1,7 @@ #include #define brk _brk #define sbrk _sbrk +#include extern char *_brksize; diff --git a/mach/minix/libsys/_chdir.c b/mach/minix/libsys/_chdir.c index 28b6f734d..0373eb374 100644 --- a/mach/minix/libsys/_chdir.c +++ b/mach/minix/libsys/_chdir.c @@ -1,7 +1,8 @@ #include #define chdir _chdir +#include -int chdir(name) +PUBLIC int chdir(name) char *name; { return(_callm3(FS, CHDIR, 0, name)); diff --git a/mach/minix/libsys/_chmod.c b/mach/minix/libsys/_chmod.c index b486669a9..4306d7b65 100644 --- a/mach/minix/libsys/_chmod.c +++ b/mach/minix/libsys/_chmod.c @@ -1,8 +1,9 @@ #include #define chmod _chmod +#include PUBLIC int chmod(name, mode) -char *name; +_CONST char *name; mode_t mode; { return(_callm3(FS, CHMOD, mode, name)); diff --git a/mach/minix/libsys/_chown.c b/mach/minix/libsys/_chown.c index d4bf691a8..53531c16f 100644 --- a/mach/minix/libsys/_chown.c +++ b/mach/minix/libsys/_chown.c @@ -1,5 +1,6 @@ #include #define chown _chown +#include PUBLIC int chown(name, owner, grp) char *name; diff --git a/mach/minix/libsys/_chroot.c b/mach/minix/libsys/_chroot.c index 50d1ef9ea..b5b3ee583 100644 --- a/mach/minix/libsys/_chroot.c +++ b/mach/minix/libsys/_chroot.c @@ -1,8 +1,9 @@ #include #define chroot _chroot +#include PUBLIC int chroot(name) -char *name; +_CONST char *name; { return(_callm3(FS, CHROOT, 0, name)); } diff --git a/mach/minix/libsys/_close.c b/mach/minix/libsys/_close.c index cedb28e15..9da9c1526 100644 --- a/mach/minix/libsys/_close.c +++ b/mach/minix/libsys/_close.c @@ -1,5 +1,6 @@ #include #define close _close +#include PUBLIC int close(fd) int fd; diff --git a/mach/minix/libsys/_creat.c b/mach/minix/libsys/_creat.c index 671c87705..b8ce7deac 100644 --- a/mach/minix/libsys/_creat.c +++ b/mach/minix/libsys/_creat.c @@ -1,8 +1,9 @@ #include #define creat _creat +#include PUBLIC int creat(name, mode) -char *name; +_CONST char *name; mode_t mode; { return(_callm3(FS, CREAT, mode, name)); diff --git a/mach/minix/libsys/_dup.c b/mach/minix/libsys/_dup.c index c70134680..1a120634e 100644 --- a/mach/minix/libsys/_dup.c +++ b/mach/minix/libsys/_dup.c @@ -1,5 +1,6 @@ #include #define dup _dup +#include #include PUBLIC int dup(fd) diff --git a/mach/minix/libsys/_dup2.c b/mach/minix/libsys/_dup2.c index 6b7046fa0..4a8e8e196 100644 --- a/mach/minix/libsys/_dup2.c +++ b/mach/minix/libsys/_dup2.c @@ -1,5 +1,6 @@ #include #define dup2 _dup2 +#include #include #include #include diff --git a/mach/minix/libsys/_execnl.c b/mach/minix/libsys/_execnl.c index 759cf0055..97a9e7549 100644 --- a/mach/minix/libsys/_execnl.c +++ b/mach/minix/libsys/_execnl.c @@ -5,6 +5,7 @@ */ #include #include +#include #define MAXSTK 256 /* maximum EXEC stack size */ #define PTRSIZE sizeof(char *) diff --git a/mach/minix/libsys/_fork.c b/mach/minix/libsys/_fork.c index 3f0c70ac5..0cf123b13 100644 --- a/mach/minix/libsys/_fork.c +++ b/mach/minix/libsys/_fork.c @@ -1,5 +1,6 @@ #include #define fork _fork +#include PUBLIC int fork() { diff --git a/mach/minix/libsys/_getegid.c b/mach/minix/libsys/_getegid.c index 7cf606457..1508cc478 100644 --- a/mach/minix/libsys/_getegid.c +++ b/mach/minix/libsys/_getegid.c @@ -1,6 +1,7 @@ #include #include #define getegid _getegid +#include PUBLIC gid_t getegid() { diff --git a/mach/minix/libsys/_geteuid.c b/mach/minix/libsys/_geteuid.c index da174682d..230b3e565 100644 --- a/mach/minix/libsys/_geteuid.c +++ b/mach/minix/libsys/_geteuid.c @@ -1,6 +1,7 @@ #include #include #define geteuid _geteuid +#include PUBLIC uid_t geteuid() { diff --git a/mach/minix/libsys/_getgid.c b/mach/minix/libsys/_getgid.c index ea29a3284..38b712336 100644 --- a/mach/minix/libsys/_getgid.c +++ b/mach/minix/libsys/_getgid.c @@ -1,6 +1,7 @@ #include #include #define getgid _getgid +#include PUBLIC gid_t getgid() { diff --git a/mach/minix/libsys/_getpid.c b/mach/minix/libsys/_getpid.c index 3ba2f5c39..6847d3caa 100644 --- a/mach/minix/libsys/_getpid.c +++ b/mach/minix/libsys/_getpid.c @@ -1,5 +1,6 @@ #include #define getpid _getpid +#include PUBLIC int getpid() { diff --git a/mach/minix/libsys/_getppid.c b/mach/minix/libsys/_getppid.c index ba128c29b..b54666acb 100644 --- a/mach/minix/libsys/_getppid.c +++ b/mach/minix/libsys/_getppid.c @@ -1,5 +1,6 @@ #include #define getppid _getppid +#include PUBLIC int getppid() { diff --git a/mach/minix/libsys/_getuid.c b/mach/minix/libsys/_getuid.c index 691863ce3..ab2b4678c 100644 --- a/mach/minix/libsys/_getuid.c +++ b/mach/minix/libsys/_getuid.c @@ -1,6 +1,7 @@ #include #include #define getuid _getuid +#include PUBLIC uid_t getuid() { diff --git a/mach/minix/libsys/_link.c b/mach/minix/libsys/_link.c index 81b1f61a7..d21642843 100644 --- a/mach/minix/libsys/_link.c +++ b/mach/minix/libsys/_link.c @@ -1,8 +1,9 @@ #include #define link _link +#include PUBLIC int link(name, name2) -char *name, *name2; +_CONST char *name, *name2; { return(_callm1(FS, LINK, _len(name), _len(name2), 0, (char *) name, (char *) name2, /* perhaps callm1 preserves these */ diff --git a/mach/minix/libsys/_lseek.c b/mach/minix/libsys/_lseek.c index 5cc9640e2..d2f3993c7 100644 --- a/mach/minix/libsys/_lseek.c +++ b/mach/minix/libsys/_lseek.c @@ -1,6 +1,7 @@ #include #include #define lseek _lseek +#include PUBLIC off_t lseek(fd, offset, whence) int fd; diff --git a/mach/minix/libsys/_mkdir.c b/mach/minix/libsys/_mkdir.c index 1e0bb7d80..7fc46fcb8 100644 --- a/mach/minix/libsys/_mkdir.c +++ b/mach/minix/libsys/_mkdir.c @@ -3,7 +3,7 @@ #include PUBLIC int mkdir(name, mode) -char *name; +_CONST char *name; int mode; { return(_callm1(FS, MKDIR, _len(name), mode, 0, (char *)name, NIL_PTR, NIL_PTR)); diff --git a/mach/minix/libsys/_mkfifo.c b/mach/minix/libsys/_mkfifo.c index 0cef8a7ca..4d41f929f 100644 --- a/mach/minix/libsys/_mkfifo.c +++ b/mach/minix/libsys/_mkfifo.c @@ -4,7 +4,7 @@ #include PUBLIC int mkfifo(name, mode) -char *name; +_CONST char *name; int mode; { mode = (mode & 0777) | S_IFIFO; diff --git a/mach/minix/libsys/_mknod.c b/mach/minix/libsys/_mknod.c index 32e6c828f..ca83f62ba 100644 --- a/mach/minix/libsys/_mknod.c +++ b/mach/minix/libsys/_mknod.c @@ -1,8 +1,9 @@ #include #define mknod _mknod +#include PUBLIC int mknod(name, mode, addr) -char *name; +_CONST char *name; int mode, addr; { return(_callm1(FS, MKNOD, _len(name), mode, addr, diff --git a/mach/minix/libsys/_mknod4.c b/mach/minix/libsys/_mknod4.c index b254e37bc..de7682b53 100644 --- a/mach/minix/libsys/_mknod4.c +++ b/mach/minix/libsys/_mknod4.c @@ -1,8 +1,9 @@ #include #define mknod4 _mknod4 +#include PUBLIC int mknod4(name, mode, addr, size) -char *name; +_CONST char *name; int mode, addr; unsigned int size; { diff --git a/mach/minix/libsys/_mount.c b/mach/minix/libsys/_mount.c index 6eb3e7489..52ba1d9e1 100644 --- a/mach/minix/libsys/_mount.c +++ b/mach/minix/libsys/_mount.c @@ -1,5 +1,6 @@ #include #define mount _mount +#include PUBLIC int mount(special, name, rwflag) char *name, *special; diff --git a/mach/minix/libsys/_open.c b/mach/minix/libsys/_open.c index cbbaaaddd..5f0f94ae3 100644 --- a/mach/minix/libsys/_open.c +++ b/mach/minix/libsys/_open.c @@ -23,7 +23,7 @@ PUBLIC int open(const char *name, int flags, ...) } #else PUBLIC int open(name, flags, mode) -char *name; +_CONST char *name; int flags, mode; { if (flags & O_CREAT) diff --git a/mach/minix/libsys/_pause.c b/mach/minix/libsys/_pause.c index c1cc651bb..2a92a9a33 100644 --- a/mach/minix/libsys/_pause.c +++ b/mach/minix/libsys/_pause.c @@ -1,5 +1,6 @@ #include #define pause _pause +#include PUBLIC int pause() { diff --git a/mach/minix/libsys/_pipe.c b/mach/minix/libsys/_pipe.c index c85f3d9d7..4cfce7554 100644 --- a/mach/minix/libsys/_pipe.c +++ b/mach/minix/libsys/_pipe.c @@ -1,5 +1,6 @@ #include #define pipe _pipe +#include PUBLIC int pipe(fild) int fild[2]; diff --git a/mach/minix/libsys/_ptrace.c b/mach/minix/libsys/_ptrace.c index 890175184..b74dfa2ae 100644 --- a/mach/minix/libsys/_ptrace.c +++ b/mach/minix/libsys/_ptrace.c @@ -1,5 +1,6 @@ #include #define ptrace _ptrace +#include PUBLIC long ptrace(req, pid, addr, data) int req, pid; diff --git a/mach/minix/libsys/_read.c b/mach/minix/libsys/_read.c index 5e20391ef..ac4e90eee 100644 --- a/mach/minix/libsys/_read.c +++ b/mach/minix/libsys/_read.c @@ -1,5 +1,6 @@ #include #define read _read +#include PUBLIC int read(fd, buffer, nbytes) int fd; diff --git a/mach/minix/libsys/_rename.c b/mach/minix/libsys/_rename.c index c1c2906de..80495e5e1 100644 --- a/mach/minix/libsys/_rename.c +++ b/mach/minix/libsys/_rename.c @@ -1,8 +1,9 @@ #include #define rename _rename +#include PUBLIC int rename(name, name2) -char *name, *name2; +_CONST char *name, *name2; { return(_callm1(FS, RENAME, _len(name), _len(name2), 0, (char *) name, (char *) name2, /* perhaps callm1 preserves these */ diff --git a/mach/minix/libsys/_rmdir.c b/mach/minix/libsys/_rmdir.c index 273ebbe06..dedcdb240 100644 --- a/mach/minix/libsys/_rmdir.c +++ b/mach/minix/libsys/_rmdir.c @@ -1,8 +1,9 @@ #include #define rmdir _rmdir +#include PUBLIC int rmdir(name) -char *name; +_CONST char *name; { return(_callm3(FS, RMDIR, 0, name)); } diff --git a/mach/minix/libsys/_setgid.c b/mach/minix/libsys/_setgid.c index 2f597166c..9972bec41 100644 --- a/mach/minix/libsys/_setgid.c +++ b/mach/minix/libsys/_setgid.c @@ -1,6 +1,7 @@ #include #include #define setgid _setgid +#include PUBLIC int setgid(grp) gid_t grp; diff --git a/mach/minix/libsys/_setuid.c b/mach/minix/libsys/_setuid.c index c5f412017..921635d2e 100644 --- a/mach/minix/libsys/_setuid.c +++ b/mach/minix/libsys/_setuid.c @@ -1,6 +1,7 @@ #include #include #define setuid _setuid +#include PUBLIC int setuid(usr) int usr; diff --git a/mach/minix/libsys/_stat.c b/mach/minix/libsys/_stat.c index 1fcd7dd50..329b0141d 100644 --- a/mach/minix/libsys/_stat.c +++ b/mach/minix/libsys/_stat.c @@ -3,7 +3,7 @@ #include PUBLIC int stat(name, buffer) -char *name; +_CONST char *name; struct stat *buffer; { return(_callm1(FS, STAT, _len(name), 0, 0, diff --git a/mach/minix/libsys/_stime.c b/mach/minix/libsys/_stime.c index 8399cd2c0..9fa8e16af 100644 --- a/mach/minix/libsys/_stime.c +++ b/mach/minix/libsys/_stime.c @@ -1,5 +1,6 @@ #include #define stime _stime +#include PUBLIC int stime(top) long *top; diff --git a/mach/minix/libsys/_sync.c b/mach/minix/libsys/_sync.c index 36186692d..c72e86207 100644 --- a/mach/minix/libsys/_sync.c +++ b/mach/minix/libsys/_sync.c @@ -1,5 +1,6 @@ #include #define sync _sync +#include PUBLIC int sync() { diff --git a/mach/minix/libsys/_umount.c b/mach/minix/libsys/_umount.c index e4132bbc2..103538c66 100644 --- a/mach/minix/libsys/_umount.c +++ b/mach/minix/libsys/_umount.c @@ -1,8 +1,9 @@ #include #define umount _umount +#include PUBLIC int umount(name) -char *name; +_CONST char *name; { return(_callm3(FS, UMOUNT, 0, name)); } diff --git a/mach/minix/libsys/_unlink.c b/mach/minix/libsys/_unlink.c index ebaea4ea7..3d225a76b 100644 --- a/mach/minix/libsys/_unlink.c +++ b/mach/minix/libsys/_unlink.c @@ -1,8 +1,9 @@ #include #define unlink _unlink +#include PUBLIC int unlink(name) -char *name; +_CONST char *name; { return(_callm3(FS, UNLINK, 0, name)); } diff --git a/mach/minix/libsys/_write.c b/mach/minix/libsys/_write.c index 9dd96af89..a64da03ae 100644 --- a/mach/minix/libsys/_write.c +++ b/mach/minix/libsys/_write.c @@ -1,5 +1,6 @@ #include #define write _write +#include PUBLIC int write(fd, buffer, nbytes) int fd;