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] Add mkfifo to libc/posix


2006-06-02 Shaun Jackman <sjackman@gmail.com>

	* libc/posix/Makefile.am (GENERAL_SOURCES): Add mkfifo.c.
	* libc/posix/mkfifo.c: New file.

Index: libc/posix/Makefile.am
===================================================================
RCS file: /cvs/src/src/newlib/libc/posix/Makefile.am,v
retrieving revision 1.6
diff -u -r1.6 Makefile.am
--- libc/posix/Makefile.am	1 May 2006 22:01:02 -0000	1.6
+++ libc/posix/Makefile.am	2 Jun 2006 15:57:08 -0000
@@ -6,7 +6,7 @@

GENERAL_SOURCES = \
	closedir.c creat.c isatty.c \
-	opendir.c readdir.c \
+	mkfifo.c opendir.c readdir.c \
	readdir_r.c rewinddir.c telldir.c

ELIX_2_SOURCES = \
--- /dev/null	2006-05-29 10:11:53.893844952 -0600
+++ libc/posix/mkfifo.c	2006-03-28 16:09:00.000000000 -0700
@@ -0,0 +1,14 @@
+/** mkfifo(3)
+ * Written by Shaun Jackman <sjackman@gmail.com>.
+ * Copyright 2006 Pathway Connectivity
+ *
+ * Permission to use, copy, modify, and distribute this software
+ * is freely granted, provided that this notice is preserved.
+ */
+
+#include <sys/stat.h>
+
+int mkfifo(const char *path, mode_t mode)
+{
+	return mknod(path, S_IFIFO | mode, 0);
+}


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