From 0cd2bd96c35994238be7039d952ff0ab592195ba Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 13 Oct 1998 18:04:16 +0000 Subject: Added rest of opendir family and made it compile. --- c/src/exec/libcsupport/src/telldir.c | 17 ++++++++++++++++- c/src/lib/libc/Makefile.in | 5 +++-- c/src/lib/libc/telldir.c | 17 ++++++++++++++++- cpukit/libcsupport/src/telldir.c | 17 ++++++++++++++++- 4 files changed, 51 insertions(+), 5 deletions(-) diff --git a/c/src/exec/libcsupport/src/telldir.c b/c/src/exec/libcsupport/src/telldir.c index 9825f04939..d52819cddd 100644 --- a/c/src/exec/libcsupport/src/telldir.c +++ b/c/src/exec/libcsupport/src/telldir.c @@ -18,7 +18,22 @@ #include #include -#include "libio_.h" +#include +#include "libio.h" + +/* + * This is technically a violation of boundaries but will be fixed + * in a future release when file system code is in place. This + * will be in libio_.h then. + */ + +extern unsigned32 rtems_libio_number_iops; +extern rtems_libio_t *rtems_libio_iops; +extern rtems_libio_t *rtems_libio_last_iop; + +#define rtems_libio_iop(fd) \ + ((((unsigned32)(fd)) < rtems_libio_number_iops) ? \ + &rtems_libio_iops[fd] : 0) long telldir( diff --git a/c/src/lib/libc/Makefile.in b/c/src/lib/libc/Makefile.in index 67466de316..c9fbf72795 100644 --- a/c/src/lib/libc/Makefile.in +++ b/c/src/lib/libc/Makefile.in @@ -14,7 +14,7 @@ LIB=${ARCH}/${LIBNAME} # define TARGET_PIECES later based on RTEMS_CPU definition # C and C++ source names, if any, go here -- minus the .c or .cc -C_PIECES=__times _execve getdents malloc syscalls \ +C_PIECES=__times _execve malloc syscalls \ no_libc support libio hosterr tcattr tcdrain \ cfiospeed termios $(TARGET_PIECES) C_FILES=$(C_PIECES:%=%.c) @@ -35,7 +35,8 @@ include $(RTEMS_ROOT)/make/lib.cfg ifeq ($(RTEMS_CPU),unix) TARGET_PIECES=unixlibc else -TARGET_PIECES=__brk __gettod newlibc newlibif newlibifr readdir opendir +TARGET_PIECES=__brk __gettod newlibc newlibif newlibifr \ + getdents readdir opendir closedir rewinddir scandir seekdir telldir endif # diff --git a/c/src/lib/libc/telldir.c b/c/src/lib/libc/telldir.c index 9825f04939..d52819cddd 100644 --- a/c/src/lib/libc/telldir.c +++ b/c/src/lib/libc/telldir.c @@ -18,7 +18,22 @@ #include #include -#include "libio_.h" +#include +#include "libio.h" + +/* + * This is technically a violation of boundaries but will be fixed + * in a future release when file system code is in place. This + * will be in libio_.h then. + */ + +extern unsigned32 rtems_libio_number_iops; +extern rtems_libio_t *rtems_libio_iops; +extern rtems_libio_t *rtems_libio_last_iop; + +#define rtems_libio_iop(fd) \ + ((((unsigned32)(fd)) < rtems_libio_number_iops) ? \ + &rtems_libio_iops[fd] : 0) long telldir( diff --git a/cpukit/libcsupport/src/telldir.c b/cpukit/libcsupport/src/telldir.c index 9825f04939..d52819cddd 100644 --- a/cpukit/libcsupport/src/telldir.c +++ b/cpukit/libcsupport/src/telldir.c @@ -18,7 +18,22 @@ #include #include -#include "libio_.h" +#include +#include "libio.h" + +/* + * This is technically a violation of boundaries but will be fixed + * in a future release when file system code is in place. This + * will be in libio_.h then. + */ + +extern unsigned32 rtems_libio_number_iops; +extern rtems_libio_t *rtems_libio_iops; +extern rtems_libio_t *rtems_libio_last_iop; + +#define rtems_libio_iop(fd) \ + ((((unsigned32)(fd)) < rtems_libio_number_iops) ? \ + &rtems_libio_iops[fd] : 0) long telldir( -- cgit v1.2.3