#include #include #include #include XR_Fildes XR_Open4(name, flags, mode, kind) char *name; unsigned flags; unsigned mode; XR_FDKind kind; { return XR_Open(name, flags, mode); } XR_Fildes XR_Open(name, flags, mode) { return(open(name, flags, mode)); } int XR_FCntl4(fildes, cmd, arg, kind) XR_Fildes fildes; int cmd; int arg; XR_FDKind kind; { return XR_FCntl(fildes, cmd, arg); } int XR_IOCtl4(d, request, argp, kind) XR_Fildes d; int request; char *argp; XR_FDKind kind; { return XR_IOCtl(d, request, argp, kind); } XR_FDKind XR_GetDescriptorKind (fildes) XR_Fildes fildes; { return XR_FD_KIND_STD; } int XR_SetBlocking (fildes, blocking) XR_Fildes fildes; XR_UIOBlocking blocking; { SPCR_NotImplemented("XR_SetBlocking"); return 0; } int XR_SetGetTimeout (fildes, timeout) XR_Fildes fildes; XR_Ticks timeout; { SPCR_NotImplemented("XR_SetGetTimeout"); return 0; } int XR_SetPutTimeout (fildes, timeout) XR_Fildes fildes; XR_Ticks timeout; { SPCR_NotImplemented("XR_SetGetTimeout"); return 0; } int XR_UIORegisterInterestInEvent(id, interested) int id; bool interested; { SPCR_NotImplemented("XR_UIORegisterInterestInEvent"); return 0; } int XR_UIOAwaitEvent(event) int event; { SPCR_NotImplemented("XR_UIOAwaitEvent"); return 0; } /* * What follows is not type correct, and not terribly portable. * But it's more portable then the assembly language hack it replaces. * Note that UIO.h is NOT included here. */ #ifdef __STDC__ # define ADD_XR(pcrName) XR_ ## pcrName #else # define ADD_XR(pcrName) XR_/**/pcrName #endif # define XR_SYSCALL0(pcrName, uxname) \ int ADD_XR(pcrName) () { uxname(); } # define XR_SYSCALL1(pcrName, uxname) \ int ADD_XR(pcrName) (a1) int a1; { uxname(a1); } # define XR_SYSCALL2(pcrName, uxname) \ int ADD_XR(pcrName) (a1,a2) int a1,a2; { uxname(a1,a2); } # define XR_SYSCALL3(pcrName, uxname) \ int ADD_XR(pcrName) (a1,a2,a3) int a1,a2,a3; { uxname(a1,a2,a3); } # define XR_SYSCALL4(pcrName, uxname) \ int ADD_XR(pcrName) (a1,a2,a3,a4) int a1,a2,a3,a4; \ { uxname(a1,a2,a3,a4); } # define XR_SYSCALL5(pcrName, uxname) \ int ADD_XR(pcrName) (a1,a2,a3,a4,a5) int a1,a2,a3,a4,a5; \ { uxname(a1,a2,a3,a4,a5); } # define XR_SYSCALL6(pcrName, uxname) \ int ADD_XR(pcrName) (a1,a2,a3,a4,a5,a6) int a1,a2,a3,a4,a5,a6; \ { uxname(a1,a2,a3,a4,a5,a6); } # include "xr/UnixSysCallTranslation.h"