summaryrefslogtreecommitdiff
path: root/sys/src/cmd/unix/u9fs/cygwin.c
diff options
context:
space:
mode:
authorftrvxmtrx <ftrvxmtrx@gmail.com>2015-06-09 00:15:59 +0200
committerftrvxmtrx <ftrvxmtrx@gmail.com>2015-06-09 00:15:59 +0200
commit0fc761bc845bd9795f05206e24621c0f5e76423e (patch)
tree2bad439a40d10f7970e167c138d36fbb50586ee8 /sys/src/cmd/unix/u9fs/cygwin.c
parent7a95bef00e41cbab2d97f6392b221e6192335343 (diff)
unix is BUGGERED. remove it
Diffstat (limited to 'sys/src/cmd/unix/u9fs/cygwin.c')
-rw-r--r--sys/src/cmd/unix/u9fs/cygwin.c62
1 files changed, 0 insertions, 62 deletions
diff --git a/sys/src/cmd/unix/u9fs/cygwin.c b/sys/src/cmd/unix/u9fs/cygwin.c
deleted file mode 100644
index 773d02cfb..000000000
--- a/sys/src/cmd/unix/u9fs/cygwin.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/* compatability layer for u9fs support on CYGWIN */
-
-#include <unistd.h>
-#include <errno.h>
-
-ssize_t
-pread(int fd, void *p, size_t n, off_t off)
-{
- off_t ooff;
- int oerrno;
-
- if ((ooff = lseek(fd, off, SEEK_SET)) == -1)
- return -1;
-
- n = read(fd, p, n);
-
- oerrno = errno;
- lseek(fd, ooff, SEEK_SET);
- errno = oerrno;
-
- return n;
-}
-
-ssize_t
-pwrite(int fd, const void *p, size_t n, off_t off)
-{
- off_t ooff;
- int oerrno;
-
- if ((ooff = lseek(fd, off, SEEK_SET)) == -1)
- return -1;
-
- n = write(fd, p, n);
-
- oerrno = errno;
- lseek(fd, ooff, SEEK_SET);
- errno = oerrno;
-
- return n;
-}
-
-int
-setreuid(int ruid, int euid)
-{
- if (ruid != -1)
- if (setuid(ruid) == -1)
- return(-1);
- if (euid != -1)
- if (seteuid(euid) == -1)
- return(-1);
-}
-
-int
-setregid(int rgid, int egid)
-{
- if (rgid != -1)
- if (setgid(rgid) == -1)
- return(-1);
- if (egid != -1)
- if (setegid(egid) == -1)
- return(-1);
-}