summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root>2010-10-30 14:36:53 +0000
committerroot <root>2010-10-30 14:36:53 +0000
commitcdee5e592589399934e7c9b5e24eea1f843fa155 (patch)
tree683e386e35137a28eab1a83b58c7eaaecc41965b
parentc70a5ca0aaae31cbb3948c9c37bf66000320fa4e (diff)
*** empty log message ***rel-3_7
-rw-r--r--Changes2
-rw-r--r--eio.c4
-rw-r--r--xthread.h1
3 files changed, 3 insertions, 4 deletions
diff --git a/Changes b/Changes
index 656f945..c95b2be 100644
--- a/Changes
+++ b/Changes
@@ -25,4 +25,6 @@ TODO: openbsd requites stdint.h for intptr_t - why posix?
- add OS-independent EIO_MT_* and EIO_MS_* flag enums.
- add eio_statvfs/eio_fstatvfs.
- add eio_mlock/eio_mlockall and OS-independent MCL_* flag enums.
+ - no longer set errno to 0 before making syscalls, this only lures
+ people into the trap of believing errno shows success or failure.
diff --git a/eio.c b/eio.c
index 0d30ce7..f810de2 100644
--- a/eio.c
+++ b/eio.c
@@ -1632,8 +1632,6 @@ static void eio_api_destroy (eio_req *req)
static void eio_execute (etp_worker *self, eio_req *req)
{
- errno = 0;
-
switch (req->type)
{
case EIO_READ: ALLOC (req->size);
@@ -1724,7 +1722,6 @@ static void eio_execute (etp_worker *self, eio_req *req)
else
times = 0;
-
req->result = req->type == EIO_FUTIME
? futimes (req->int1, times)
: utimes (req->ptr1, times);
@@ -1743,6 +1740,7 @@ static void eio_execute (etp_worker *self, eio_req *req)
break;
default:
+ errno = ENOSYS;
req->result = -1;
break;
}
diff --git a/xthread.h b/xthread.h
index 9cd2b6e..8400fdd 100644
--- a/xthread.h
+++ b/xthread.h
@@ -29,7 +29,6 @@ typedef int ssize_t;
#include <windows.h>
#include <pthread.h>
#define sigset_t int
-#define sigfillset(a)
#define pthread_sigmask(a,b,c)
#define sigaddset(a,b)
#define sigemptyset(s)