This commit is contained in:
ceriel 1991-09-19 12:46:16 +00:00
parent 6e485ef169
commit 4bd8dcde59
41 changed files with 54 additions and 17 deletions

View file

@ -1,7 +1,8 @@
#include <lib.h> #include <lib.h>
#define access _access #define access _access
#include <unistd.h>
int access(name, mode) PUBLIC int access(name, mode)
char *name; char *name;
int mode; int mode;
{ {

View file

@ -1,7 +1,8 @@
#include <lib.h> #include <lib.h>
#define alarm _alarm #define alarm _alarm
#include <unistd.h>
unsigned int alarm(sec) PUBLIC unsigned int alarm(sec)
unsigned int sec; unsigned int sec;
{ {
return(_callm1(MM, ALARM, (int) sec, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR)); return(_callm1(MM, ALARM, (int) sec, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR));

View file

@ -1,6 +1,7 @@
#include <lib.h> #include <lib.h>
#define brk _brk #define brk _brk
#define sbrk _sbrk #define sbrk _sbrk
#include <unistd.h>
extern char *_brksize; extern char *_brksize;

View file

@ -1,7 +1,8 @@
#include <lib.h> #include <lib.h>
#define chdir _chdir #define chdir _chdir
#include <unistd.h>
int chdir(name) PUBLIC int chdir(name)
char *name; char *name;
{ {
return(_callm3(FS, CHDIR, 0, name)); return(_callm3(FS, CHDIR, 0, name));

View file

@ -1,8 +1,9 @@
#include <lib.h> #include <lib.h>
#define chmod _chmod #define chmod _chmod
#include <sys/stat.h>
PUBLIC int chmod(name, mode) PUBLIC int chmod(name, mode)
char *name; _CONST char *name;
mode_t mode; mode_t mode;
{ {
return(_callm3(FS, CHMOD, mode, name)); return(_callm3(FS, CHMOD, mode, name));

View file

@ -1,5 +1,6 @@
#include <lib.h> #include <lib.h>
#define chown _chown #define chown _chown
#include <unistd.h>
PUBLIC int chown(name, owner, grp) PUBLIC int chown(name, owner, grp)
char *name; char *name;

View file

@ -1,8 +1,9 @@
#include <lib.h> #include <lib.h>
#define chroot _chroot #define chroot _chroot
#include <unistd.h>
PUBLIC int chroot(name) PUBLIC int chroot(name)
char *name; _CONST char *name;
{ {
return(_callm3(FS, CHROOT, 0, name)); return(_callm3(FS, CHROOT, 0, name));
} }

View file

@ -1,5 +1,6 @@
#include <lib.h> #include <lib.h>
#define close _close #define close _close
#include <unistd.h>
PUBLIC int close(fd) PUBLIC int close(fd)
int fd; int fd;

View file

@ -1,8 +1,9 @@
#include <lib.h> #include <lib.h>
#define creat _creat #define creat _creat
#include <fcntl.h>
PUBLIC int creat(name, mode) PUBLIC int creat(name, mode)
char *name; _CONST char *name;
mode_t mode; mode_t mode;
{ {
return(_callm3(FS, CREAT, mode, name)); return(_callm3(FS, CREAT, mode, name));

View file

@ -1,5 +1,6 @@
#include <lib.h> #include <lib.h>
#define dup _dup #define dup _dup
#include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
PUBLIC int dup(fd) PUBLIC int dup(fd)

View file

@ -1,5 +1,6 @@
#include <lib.h> #include <lib.h>
#define dup2 _dup2 #define dup2 _dup2
#include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <limits.h> #include <limits.h>
#include <errno.h> #include <errno.h>

View file

@ -5,6 +5,7 @@
*/ */
#include <lib.h> #include <lib.h>
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h>
#define MAXSTK 256 /* maximum EXEC stack size */ #define MAXSTK 256 /* maximum EXEC stack size */
#define PTRSIZE sizeof(char *) #define PTRSIZE sizeof(char *)

View file

@ -1,5 +1,6 @@
#include <lib.h> #include <lib.h>
#define fork _fork #define fork _fork
#include <unistd.h>
PUBLIC int fork() PUBLIC int fork()
{ {

View file

@ -1,6 +1,7 @@
#include <lib.h> #include <lib.h>
#include <sys/types.h> #include <sys/types.h>
#define getegid _getegid #define getegid _getegid
#include <unistd.h>
PUBLIC gid_t getegid() PUBLIC gid_t getegid()
{ {

View file

@ -1,6 +1,7 @@
#include <lib.h> #include <lib.h>
#include <sys/types.h> #include <sys/types.h>
#define geteuid _geteuid #define geteuid _geteuid
#include <unistd.h>
PUBLIC uid_t geteuid() PUBLIC uid_t geteuid()
{ {

View file

@ -1,6 +1,7 @@
#include <lib.h> #include <lib.h>
#include <sys/types.h> #include <sys/types.h>
#define getgid _getgid #define getgid _getgid
#include <unistd.h>
PUBLIC gid_t getgid() PUBLIC gid_t getgid()
{ {

View file

@ -1,5 +1,6 @@
#include <lib.h> #include <lib.h>
#define getpid _getpid #define getpid _getpid
#include <unistd.h>
PUBLIC int getpid() PUBLIC int getpid()
{ {

View file

@ -1,5 +1,6 @@
#include <lib.h> #include <lib.h>
#define getppid _getppid #define getppid _getppid
#include <unistd.h>
PUBLIC int getppid() PUBLIC int getppid()
{ {

View file

@ -1,6 +1,7 @@
#include <lib.h> #include <lib.h>
#include <sys/types.h> #include <sys/types.h>
#define getuid _getuid #define getuid _getuid
#include <unistd.h>
PUBLIC uid_t getuid() PUBLIC uid_t getuid()
{ {

View file

@ -1,8 +1,9 @@
#include <lib.h> #include <lib.h>
#define link _link #define link _link
#include <unistd.h>
PUBLIC int link(name, name2) PUBLIC int link(name, name2)
char *name, *name2; _CONST char *name, *name2;
{ {
return(_callm1(FS, LINK, _len(name), _len(name2), 0, return(_callm1(FS, LINK, _len(name), _len(name2), 0,
(char *) name, (char *) name2, /* perhaps callm1 preserves these */ (char *) name, (char *) name2, /* perhaps callm1 preserves these */

View file

@ -1,6 +1,7 @@
#include <lib.h> #include <lib.h>
#include <sys/types.h> #include <sys/types.h>
#define lseek _lseek #define lseek _lseek
#include <unistd.h>
PUBLIC off_t lseek(fd, offset, whence) PUBLIC off_t lseek(fd, offset, whence)
int fd; int fd;

View file

@ -3,7 +3,7 @@
#include <sys/stat.h> #include <sys/stat.h>
PUBLIC int mkdir(name, mode) PUBLIC int mkdir(name, mode)
char *name; _CONST char *name;
int mode; int mode;
{ {
return(_callm1(FS, MKDIR, _len(name), mode, 0, (char *)name, NIL_PTR, NIL_PTR)); return(_callm1(FS, MKDIR, _len(name), mode, 0, (char *)name, NIL_PTR, NIL_PTR));

View file

@ -4,7 +4,7 @@
#include <sys/stat.h> #include <sys/stat.h>
PUBLIC int mkfifo(name, mode) PUBLIC int mkfifo(name, mode)
char *name; _CONST char *name;
int mode; int mode;
{ {
mode = (mode & 0777) | S_IFIFO; mode = (mode & 0777) | S_IFIFO;

View file

@ -1,8 +1,9 @@
#include <lib.h> #include <lib.h>
#define mknod _mknod #define mknod _mknod
#include <unistd.h>
PUBLIC int mknod(name, mode, addr) PUBLIC int mknod(name, mode, addr)
char *name; _CONST char *name;
int mode, addr; int mode, addr;
{ {
return(_callm1(FS, MKNOD, _len(name), mode, addr, return(_callm1(FS, MKNOD, _len(name), mode, addr,

View file

@ -1,8 +1,9 @@
#include <lib.h> #include <lib.h>
#define mknod4 _mknod4 #define mknod4 _mknod4
#include <unistd.h>
PUBLIC int mknod4(name, mode, addr, size) PUBLIC int mknod4(name, mode, addr, size)
char *name; _CONST char *name;
int mode, addr; int mode, addr;
unsigned int size; unsigned int size;
{ {

View file

@ -1,5 +1,6 @@
#include <lib.h> #include <lib.h>
#define mount _mount #define mount _mount
#include <unistd.h>
PUBLIC int mount(special, name, rwflag) PUBLIC int mount(special, name, rwflag)
char *name, *special; char *name, *special;

View file

@ -23,7 +23,7 @@ PUBLIC int open(const char *name, int flags, ...)
} }
#else #else
PUBLIC int open(name, flags, mode) PUBLIC int open(name, flags, mode)
char *name; _CONST char *name;
int flags, mode; int flags, mode;
{ {
if (flags & O_CREAT) if (flags & O_CREAT)

View file

@ -1,5 +1,6 @@
#include <lib.h> #include <lib.h>
#define pause _pause #define pause _pause
#include <unistd.h>
PUBLIC int pause() PUBLIC int pause()
{ {

View file

@ -1,5 +1,6 @@
#include <lib.h> #include <lib.h>
#define pipe _pipe #define pipe _pipe
#include <unistd.h>
PUBLIC int pipe(fild) PUBLIC int pipe(fild)
int fild[2]; int fild[2];

View file

@ -1,5 +1,6 @@
#include <lib.h> #include <lib.h>
#define ptrace _ptrace #define ptrace _ptrace
#include <unistd.h>
PUBLIC long ptrace(req, pid, addr, data) PUBLIC long ptrace(req, pid, addr, data)
int req, pid; int req, pid;

View file

@ -1,5 +1,6 @@
#include <lib.h> #include <lib.h>
#define read _read #define read _read
#include <unistd.h>
PUBLIC int read(fd, buffer, nbytes) PUBLIC int read(fd, buffer, nbytes)
int fd; int fd;

View file

@ -1,8 +1,9 @@
#include <lib.h> #include <lib.h>
#define rename _rename #define rename _rename
#include <stdio.h>
PUBLIC int rename(name, name2) PUBLIC int rename(name, name2)
char *name, *name2; _CONST char *name, *name2;
{ {
return(_callm1(FS, RENAME, _len(name), _len(name2), 0, return(_callm1(FS, RENAME, _len(name), _len(name2), 0,
(char *) name, (char *) name2, /* perhaps callm1 preserves these */ (char *) name, (char *) name2, /* perhaps callm1 preserves these */

View file

@ -1,8 +1,9 @@
#include <lib.h> #include <lib.h>
#define rmdir _rmdir #define rmdir _rmdir
#include <unistd.h>
PUBLIC int rmdir(name) PUBLIC int rmdir(name)
char *name; _CONST char *name;
{ {
return(_callm3(FS, RMDIR, 0, name)); return(_callm3(FS, RMDIR, 0, name));
} }

View file

@ -1,6 +1,7 @@
#include <lib.h> #include <lib.h>
#include <sys/types.h> #include <sys/types.h>
#define setgid _setgid #define setgid _setgid
#include <unistd.h>
PUBLIC int setgid(grp) PUBLIC int setgid(grp)
gid_t grp; gid_t grp;

View file

@ -1,6 +1,7 @@
#include <lib.h> #include <lib.h>
#include <sys/types.h> #include <sys/types.h>
#define setuid _setuid #define setuid _setuid
#include <unistd.h>
PUBLIC int setuid(usr) PUBLIC int setuid(usr)
int usr; int usr;

View file

@ -3,7 +3,7 @@
#include <sys/stat.h> #include <sys/stat.h>
PUBLIC int stat(name, buffer) PUBLIC int stat(name, buffer)
char *name; _CONST char *name;
struct stat *buffer; struct stat *buffer;
{ {
return(_callm1(FS, STAT, _len(name), 0, 0, return(_callm1(FS, STAT, _len(name), 0, 0,

View file

@ -1,5 +1,6 @@
#include <lib.h> #include <lib.h>
#define stime _stime #define stime _stime
#include <unistd.h>
PUBLIC int stime(top) PUBLIC int stime(top)
long *top; long *top;

View file

@ -1,5 +1,6 @@
#include <lib.h> #include <lib.h>
#define sync _sync #define sync _sync
#include <unistd.h>
PUBLIC int sync() PUBLIC int sync()
{ {

View file

@ -1,8 +1,9 @@
#include <lib.h> #include <lib.h>
#define umount _umount #define umount _umount
#include <unistd.h>
PUBLIC int umount(name) PUBLIC int umount(name)
char *name; _CONST char *name;
{ {
return(_callm3(FS, UMOUNT, 0, name)); return(_callm3(FS, UMOUNT, 0, name));
} }

View file

@ -1,8 +1,9 @@
#include <lib.h> #include <lib.h>
#define unlink _unlink #define unlink _unlink
#include <unistd.h>
PUBLIC int unlink(name) PUBLIC int unlink(name)
char *name; _CONST char *name;
{ {
return(_callm3(FS, UNLINK, 0, name)); return(_callm3(FS, UNLINK, 0, name));
} }

View file

@ -1,5 +1,6 @@
#include <lib.h> #include <lib.h>
#define write _write #define write _write
#include <unistd.h>
PUBLIC int write(fd, buffer, nbytes) PUBLIC int write(fd, buffer, nbytes)
int fd; int fd;