summaryrefslogtreecommitdiffstats
path: root/c/src
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-07-01 21:33:38 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-07-01 21:33:38 +0000
commita05de51283471eca79b981be665008a898613d03 (patch)
tree8bad03cf71d0c8da7005804e9463229e4998b529 /c/src
parentFixed typo. (diff)
downloadrtems-a05de51283471eca79b981be665008a898613d03.tar.bz2
Added _stat_r and changed spacing.
Diffstat (limited to 'c/src')
-rw-r--r--c/src/lib/libc/newlibifr.c80
1 files changed, 47 insertions, 33 deletions
diff --git a/c/src/lib/libc/newlibifr.c b/c/src/lib/libc/newlibifr.c
index 1879239f9e..5d870c91a6 100644
--- a/c/src/lib/libc/newlibifr.c
+++ b/c/src/lib/libc/newlibifr.c
@@ -23,56 +23,70 @@
#include "internal.h"
#include "libio.h"
-_ssize_t
-_read_r(struct _reent *ptr,
- int fd,
- void *buf,
- size_t nbytes)
+_ssize_t _read_r(
+ struct _reent *ptr,
+ int fd,
+ void *buf,
+ size_t nbytes
+)
{
- return __rtems_read(fd, buf, nbytes);
+ return __rtems_read(fd, buf, nbytes);
}
-long
-_write_r(struct _reent *ptr,
- int fd,
- const void *buf,
- size_t nbytes
+long _write_r(
+ struct _reent *ptr,
+ int fd,
+ const void *buf,
+ size_t nbytes
)
{
- return __rtems_write(fd, buf, nbytes);
+ return __rtems_write(fd, buf, nbytes);
}
-int
-_open_r(struct _reent *ptr,
- const char *buf,
- int flags,
- int mode)
+int _open_r(
+ struct _reent *ptr,
+ const char *buf,
+ int flags,
+ int mode
+)
{
- return __rtems_open(buf, flags, mode);
+ return __rtems_open(buf, flags, mode);
}
-int
-_close_r(struct _reent *ptr,
- int fd)
+int _close_r(
+ struct _reent *ptr,
+ int fd
+)
{
- return __rtems_close(fd);
+ return __rtems_close(fd);
}
-off_t
-_lseek_r(struct _reent *ptr,
- int fd,
- off_t offset,
- int whence)
+off_t _lseek_r(
+ struct _reent *ptr,
+ int fd,
+ off_t offset,
+ int whence
+)
{
- return __rtems_lseek(fd, offset, whence);
+ return __rtems_lseek(fd, offset, whence);
}
-int
-_fstat_r(struct _reent *ptr,
- int fd,
- struct stat *buf)
+int _stat_r(
+ struct _reent *ptr,
+ const char *path,
+ struct stat *buf
+)
+{
+ return stat(path, buf);
+}
+
+int _fstat_r(
+ struct _reent *ptr,
+ int fd,
+ struct stat *buf
+)
{
- return __rtems_fstat(fd, buf);
+ return __rtems_fstat(fd, buf);
}
pid_t _getpid_r(struct _reent *ptr)