summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changes3
-rw-r--r--configure.ac2
-rw-r--r--eio.c6
-rw-r--r--eio.h2
-rw-r--r--libeio.m44
5 files changed, 15 insertions, 2 deletions
diff --git a/Changes b/Changes
index 2685024..05996cb 100644
--- a/Changes
+++ b/Changes
@@ -3,6 +3,8 @@ Revision history for libeio
TODO: maybe add mincore support? available on at least darwin, solaris, linux, freebsd
TODO: openbsd requires stdint.h for intptr_t - why posix?
+TODO: make mtouch/readdir maybe others cancellable in-request
+TODO: fadvise request
1.0
- use nonstandard but maybe-working-on-bsd fork technique.
- support a max_idle value of 0.
@@ -38,3 +40,4 @@ TODO: openbsd requires stdint.h for intptr_t - why posix?
- mknod used int3 for dev_t (ยง2 bit), not offs (64 bit).
- fix memory corruption in eio_readdirx for the flags
combination EIO_READDIR_STAT_ORDER | EIO_READDIR_DIRS_FIRST.
+ - port to openbsd (another blatantly broken non-UNIX/POSIX platform).
diff --git a/configure.ac b/configure.ac
index 9faffad..523ddf1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,7 +13,7 @@ AC_PROG_LIBTOOL
AC_PROG_CC
if test "x$GCC" = xyes ; then
- CFLAGS="-O3 $CFLAGS"
+ CFLAGS="$OPTIMIZE -O3 $CFLAGS"
fi
m4_include([libeio.m4])
diff --git a/eio.c b/eio.c
index d19df11..4ab2dd3 100644
--- a/eio.c
+++ b/eio.c
@@ -60,6 +60,12 @@
#include <fcntl.h>
#include <assert.h>
+/* intptr_t comes from unistd.h, says POSIX/UNIX/tradition */
+/* intptr_t only comes form stdint.h, says idiot openbsd coder */
+#if HAVE_STDINT_H
+# include <stdint.h>
+#endif
+
#ifndef EIO_FINISH
# define EIO_FINISH(req) ((req)->finish) && !EIO_CANCELLED (req) ? (req)->finish (req) : 0
#endif
diff --git a/eio.h b/eio.h
index 001d3b9..d0348b7 100644
--- a/eio.h
+++ b/eio.h
@@ -200,7 +200,7 @@ struct eio_req
void *data;
eio_cb finish;
- void (*destroy)(eio_req *req); /* called when requets no longer needed */
+ void (*destroy)(eio_req *req); /* called when request no longer needed */
void (*feed)(eio_req *req); /* only used for group requests */
EIO_REQ_MEMBERS
diff --git a/libeio.m4 b/libeio.m4
index 5302cfc..32b81c2 100644
--- a/libeio.m4
+++ b/libeio.m4
@@ -1,3 +1,7 @@
+dnl openbsd in it's neverending brokenness requires stdint.h for intptr_t,
+dnl but that header isn't very portable...
+AC_CHECK_HEADERS([stdint.h])
+
AC_SEARCH_LIBS(
pthread_create,
[pthread pthreads pthreadVC2],