This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] libgloss/libnosys: Add fcntl and ioctl.


2006-05-10 Shaun Jackman <sjackman@gmail.com>

	* libnosys/Makefile.in (OBJS): Add fcntl.o and ioctl.o.
	* libnosys/fcntl.c: New file.
	* libnosys/ioctl.c: Ditto.

Index: libnosys/Makefile.in
===================================================================
RCS file: /cvs/src/src/libgloss/libnosys/Makefile.in,v
retrieving revision 1.6
diff -u -r1.6 Makefile.in
--- libnosys/Makefile.in	30 Nov 2005 23:43:57 -0000	1.6
+++ libnosys/Makefile.in	10 May 2006 20:03:09 -0000
@@ -65,10 +65,10 @@
	else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`

# object files needed
-OBJS = chown.o close.o environ.o errno.o execve.o fork.o fstat.o \
-	getpid.o gettod.o isatty.o kill.o link.o lseek.o open.o \
-	read.o readlink.o sbrk.o stat.o symlink.o times.o unlink.o \
-	wait.o write.o _exit.o
+OBJS = chown.o close.o environ.o errno.o execve.o fcntl.o fork.o \
+	fstat.o getpid.o gettod.o ioctl.o isatty.o kill.o link.o lseek.o \
+	open.o read.o readlink.o sbrk.o stat.o symlink.o times.o \
+	unlink.o wait.o write.o _exit.o

# Object files specific to particular targets.
EVALOBJS = ${OBJS}
--- /dev/null	2006-05-06 15:33:38.911298368 -0600
+++ libnosys/fcntl.c	2006-05-10 14:00:06.000000000 -0600
@@ -0,0 +1,27 @@
+/*
+ * Stub version of fcntl.
+ */
+
+#include "config.h"
+#include <_ansi.h>
+#include <_syslist.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#undef errno
+extern int errno;
+#include "warning.h"
+
+int
+_DEFUN (_fcntl, (fildes, cmd),
+        int          fildes _AND
+        int cmd _DOTS)
+{
+	(void)fildes;
+	(void)cmd;
+	errno = ENOSYS;
+	return -1;
+}
+
+stub_warning(_fcntl)
--- /dev/null	2006-05-06 15:33:38.911298368 -0600
+++ libnosys/ioctl.c	2006-05-10 14:01:11.000000000 -0600
@@ -0,0 +1,32 @@
+/*
+ * Stub version of ioctl.
+ */
+
+#include "config.h"
+#include <_ansi.h>
+#include <_syslist.h>
+#include <errno.h>
+#if HAVE_STROPTS_H
+/* SUSv3 says stropts.h is the correct header... */
+# include <stropts.h>
+#else
+/* ... but sys/ioctl.h is typical. */
+# include <sys/ioctl.h>
+#endif
+
+#undef errno
+extern int errno;
+#include "warning.h"
+
+int
+_DEFUN (_ioctl, (fildes, request),
+        int          fildes _AND
+        int request _DOTS)
+{
+	(void)fildes;
+	(void)request;
+	errno = ENOSYS;
+	return -1;
+}
+
+stub_warning(_ioctl)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]