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>
#define access _access
#include <unistd.h>
int access(name, mode)
PUBLIC int access(name, mode)
char *name;
int mode;
{

View file

@ -1,7 +1,8 @@
#include <lib.h>
#define alarm _alarm
#include <unistd.h>
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));

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,8 +1,9 @@
#include <lib.h>
#define link _link
#include <unistd.h>
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 */

View file

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

View file

@ -3,7 +3,7 @@
#include <sys/stat.h>
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));

View file

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

View file

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

View file

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

View file

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

View file

@ -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)

View file

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

View file

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

View file

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

View file

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

View file

@ -1,8 +1,9 @@
#include <lib.h>
#define rename _rename
#include <stdio.h>
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 */

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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