Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2002-06-28 02:48:05 +0400
committerJeff Johnston <jjohnstn@redhat.com>2002-06-28 02:48:05 +0400
commit533b4e664428a0ddd218eb62f0dc78f0a87ff079 (patch)
tree0365a7f691b361fcf0a9793b7b5c7d33a5a95149 /newlib/libc/sys
parentbf75aae8b39dfe7a23c21389e84daa5a35a03ae9 (diff)
2002-06-27 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/sys/_types.h: Define _ssize_t as int if int is 32-bits, otherwise define it as long. * libc/include/sys/types.h: Include <_ansi.h> and <sys/_types.h> and define ssize_t as _ssize_t. * libc/reent/readr.c: Change return type to _ssize_t. * libc/reent/writer.c: Ditto. * libc/sys/linux/Makefile.am: Add aio.c. * libc/sys/linux/Makefile.in: Regenerated. * libc/sys/linux/aio.c: New file. * libc/sys/linux/sys/cdefs.h: Add __restrict_arr definition. * libm/common/fdlibm.h: Undef __P before defining it.
Diffstat (limited to 'newlib/libc/sys')
-rw-r--r--newlib/libc/sys/linux/Makefile.am1
-rw-r--r--newlib/libc/sys/linux/Makefile.in22
-rw-r--r--newlib/libc/sys/linux/aio.c67
-rw-r--r--newlib/libc/sys/linux/sys/cdefs.h2
4 files changed, 82 insertions, 10 deletions
diff --git a/newlib/libc/sys/linux/Makefile.am b/newlib/libc/sys/linux/Makefile.am
index a21963ca6..6f05fc881 100644
--- a/newlib/libc/sys/linux/Makefile.am
+++ b/newlib/libc/sys/linux/Makefile.am
@@ -10,6 +10,7 @@ SUBLIBS = \
$(LINUX_MACH_LIB)
LIB_SOURCES = \
+ aio.c \
brk.c \
cfspeed.c \
clock_getres.c \
diff --git a/newlib/libc/sys/linux/Makefile.in b/newlib/libc/sys/linux/Makefile.in
index f740b67a1..4b7df11c6 100644
--- a/newlib/libc/sys/linux/Makefile.in
+++ b/newlib/libc/sys/linux/Makefile.in
@@ -107,6 +107,7 @@ SUBLIBS = \
LIB_SOURCES = \
+ aio.c \
brk.c \
cfspeed.c \
clock_getres.c \
@@ -208,15 +209,16 @@ LIBRARIES = $(noinst_LIBRARIES)
DEFS = @DEFS@ -I. -I$(srcdir)
CPPFLAGS = @CPPFLAGS@
LIBS = @LIBS@
-@USE_LIBTOOL_FALSE@lib_a_OBJECTS = brk.$(OBJEXT) cfspeed.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@clock_getres.$(OBJEXT) clock_gettime.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@clock_settime.$(OBJEXT) flockfile.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@ftok.$(OBJEXT) funlockfile.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@getdate.$(OBJEXT) getdate_err.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@gethostname.$(OBJEXT) getoptlong.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@getreent.$(OBJEXT) ids.$(OBJEXT) inode.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@io.$(OBJEXT) io64.$(OBJEXT) ipc.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@linux.$(OBJEXT) mmap.$(OBJEXT) mq_close.$(OBJEXT) \
+@USE_LIBTOOL_FALSE@lib_a_OBJECTS = aio.$(OBJEXT) brk.$(OBJEXT) \
+@USE_LIBTOOL_FALSE@cfspeed.$(OBJEXT) clock_getres.$(OBJEXT) \
+@USE_LIBTOOL_FALSE@clock_gettime.$(OBJEXT) clock_settime.$(OBJEXT) \
+@USE_LIBTOOL_FALSE@flockfile.$(OBJEXT) ftok.$(OBJEXT) \
+@USE_LIBTOOL_FALSE@funlockfile.$(OBJEXT) getdate.$(OBJEXT) \
+@USE_LIBTOOL_FALSE@getdate_err.$(OBJEXT) gethostname.$(OBJEXT) \
+@USE_LIBTOOL_FALSE@getoptlong.$(OBJEXT) getreent.$(OBJEXT) \
+@USE_LIBTOOL_FALSE@ids.$(OBJEXT) inode.$(OBJEXT) io.$(OBJEXT) \
+@USE_LIBTOOL_FALSE@io64.$(OBJEXT) ipc.$(OBJEXT) linux.$(OBJEXT) \
+@USE_LIBTOOL_FALSE@mmap.$(OBJEXT) mq_close.$(OBJEXT) \
@USE_LIBTOOL_FALSE@mq_getattr.$(OBJEXT) mq_notify.$(OBJEXT) \
@USE_LIBTOOL_FALSE@mq_open.$(OBJEXT) mq_receive.$(OBJEXT) \
@USE_LIBTOOL_FALSE@mq_send.$(OBJEXT) mq_setattr.$(OBJEXT) \
@@ -238,7 +240,7 @@ LIBS = @LIBS@
@USE_LIBTOOL_FALSE@usleep.$(OBJEXT) wait.$(OBJEXT)
LTLIBRARIES = $(noinst_LTLIBRARIES)
-@USE_LIBTOOL_TRUE@liblinux_la_OBJECTS = brk.lo cfspeed.lo \
+@USE_LIBTOOL_TRUE@liblinux_la_OBJECTS = aio.lo brk.lo cfspeed.lo \
@USE_LIBTOOL_TRUE@clock_getres.lo clock_gettime.lo clock_settime.lo \
@USE_LIBTOOL_TRUE@flockfile.lo ftok.lo funlockfile.lo getdate.lo \
@USE_LIBTOOL_TRUE@getdate_err.lo gethostname.lo getoptlong.lo \
diff --git a/newlib/libc/sys/linux/aio.c b/newlib/libc/sys/linux/aio.c
new file mode 100644
index 000000000..7351a0342
--- /dev/null
+++ b/newlib/libc/sys/linux/aio.c
@@ -0,0 +1,67 @@
+/* libc/sys/linux/aio.c - asychronous I/O */
+
+/* Copyright 2002, Red Hat Inc. */
+
+/* Currently asynchronous I/O is not implemented. */
+
+#include <sys/types.h>
+#include <aio.h>
+#include <errno.h>
+
+int
+aio_cancel (int fd, struct aiocb *cb)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+int
+aio_error (const struct aiocb *cb)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+int
+aio_fsync (int op, struct aiocb *cb)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+int
+aio_read (struct aiocb *cb)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+ssize_t
+aio_return (struct aiocb *cb)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+int
+aio_suspend (const struct aiocb *const list[], int nent,
+ const struct timespec *timeout)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+int
+aio_write (struct aiocb *cb)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+int
+lio_listio (int mode, struct aiocb * const list[], int nent,
+ struct sigevent *sig)
+{
+ errno = ENOSYS;
+ return -1;
+}
diff --git a/newlib/libc/sys/linux/sys/cdefs.h b/newlib/libc/sys/linux/sys/cdefs.h
index f0b6a27b4..1108a7dab 100644
--- a/newlib/libc/sys/linux/sys/cdefs.h
+++ b/newlib/libc/sys/linux/sys/cdefs.h
@@ -65,6 +65,7 @@
#define __attribute_pure__
#define __attribute_format_strfmon__(a,b)
#define __flexarr [0]
+#define __restrict_arr
#ifdef __cplusplus
# define __BEGIN_DECLS extern "C" {
@@ -80,6 +81,7 @@
# define __ptrvalue /* nothing */
#endif
+
#ifdef __GNUC__
#define __strong_reference(sym,aliassym) \
extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym)));