[PATCH] Add mkfifo to libc/posix
Shaun Jackman
sjackman@gmail.com
Fri Jun 2 16:15:00 GMT 2006
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);
+}
More information about the Newlib
mailing list