[Libsysio-commit] libsysio/dev/stdfd Makefile.am,1.2,1.2.2.1 stdfd.c,1.2,1.2.2.1
Brought to you by:
lward
From: <rk...@us...> - 2003-04-28 20:18:58
|
Update of /cvsroot/libsysio/libsysio/dev/stdfd In directory sc8-pr-cvs1:/tmp/cvs-serv16719 Modified Files: Tag: cplant Makefile.am stdfd.c Log Message: add cplant yod read/write defs Index: Makefile.am =================================================================== RCS file: /cvsroot/libsysio/libsysio/dev/stdfd/Makefile.am,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** Makefile.am 24 Mar 2003 22:09:02 -0000 1.2 --- Makefile.am 28 Apr 2003 20:18:53 -0000 1.2.2.1 *************** *** 6,7 **** --- 6,15 ---- include $(top_srcdir)/Rules.make + + if WITH_CPLANT_YOD + YOD_DRIVER_FLAGS = -DCPLANT_YOD $(PORTALS_INCLUDE) $(YOD_DRIVER_INCLUDE) + else + YOD_DRIVER_FLAGS = + endif + + AM_CPPFLAGS += $(YOD_DRIVER_FLAGS) Index: stdfd.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/dev/stdfd/stdfd.c,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** stdfd.c 24 Mar 2003 22:09:02 -0000 1.2 --- stdfd.c 28 Apr 2003 20:18:54 -0000 1.2.2.1 *************** *** 59,62 **** --- 59,70 ---- #include "stdfd.h" + #ifdef CPLANT_YOD + #define dowrite(f, b, n) rpc_write(f, b, n) + #define doread(f, b, n) rpc_read(f, b, n) + #else + #define dowrite(f, b, n) syscall(SYS_write, f, b, n) + #define doread(f, b, n) syscall(SYS_read, f, b, n) + #endif + /* * Pre-opened standard file descriptors driver. *************** *** 154,158 **** { ! return syscall(SYS_read, fd, buf, nbytes); } --- 162,166 ---- { ! return doread(fd, buf, nbytes); } *************** *** 172,176 **** { ! return syscall(SYS_write, fd, buf, nbytes); } --- 180,184 ---- { ! return dowrite(fd, buf, nbytes); } |