summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root>2010-11-29 12:38:32 +0000
committerroot <root>2010-11-29 12:38:32 +0000
commitc1a31f9b5959a69750e5d2e75e7aaafde7f53f76 (patch)
tree04746f3b2365bfd241c713959ccad47f78667925
parentcdee5e592589399934e7c9b5e24eea1f843fa155 (diff)
*** empty log message ***
-rw-r--r--Changes1
-rw-r--r--demo.c2
-rw-r--r--libeio.m412
3 files changed, 8 insertions, 7 deletions
diff --git a/Changes b/Changes
index c95b2be..bec431b 100644
--- a/Changes
+++ b/Changes
@@ -27,4 +27,5 @@ TODO: openbsd requites stdint.h for intptr_t - why posix?
- 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.
+ - "fix" demo.c so that it works as non-root.
diff --git a/demo.c b/demo.c
index a865bcc..cbef595 100644
--- a/demo.c
+++ b/demo.c
@@ -143,7 +143,7 @@ main (void)
eio_futime (last_fd, 92345.678, 93456.789, 0, res_cb, "futime");
eio_chown ("eio-test-dir", getuid (), getgid (), 0, res_cb, "chown");
eio_fchown (last_fd, getuid (), getgid (), 0, res_cb, "fchown");
- eio_fchmod (last_fd, 0123, 0, res_cb, "fchmod");
+ eio_fchmod (last_fd, 0723, 0, res_cb, "fchmod");
eio_readdir ("eio-test-dir", 0, 0, readdir_cb, "readdir");
eio_readdir ("/nonexistant", 0, 0, readdir_cb, "readdir");
eio_fstat (last_fd, 0, stat_cb, "stat");
diff --git a/libeio.m4 b/libeio.m4
index 0a737d3..fdd936b 100644
--- a/libeio.m4
+++ b/libeio.m4
@@ -12,7 +12,7 @@ AC_CACHE_CHECK(for futimes, ac_cv_futimes, [AC_LINK_IFELSE([[
struct timeval tv[2];
int res;
int fd;
-int main(void)
+int main (void)
{
res = futimes (fd, tv);
return 0;
@@ -22,7 +22,7 @@ test $ac_cv_futimes = yes && AC_DEFINE(HAVE_FUTIMES, 1, futimes(2) is available)
AC_CACHE_CHECK(for readahead, ac_cv_readahead, [AC_LINK_IFELSE([
#include <fcntl.h>
-int main(void)
+int main (void)
{
int fd = 0;
size_t count = 2;
@@ -35,7 +35,7 @@ test $ac_cv_readahead = yes && AC_DEFINE(HAVE_READAHEAD, 1, readahead(2) is avai
AC_CACHE_CHECK(for fdatasync, ac_cv_fdatasync, [AC_LINK_IFELSE([
#include <unistd.h>
-int main(void)
+int main (void)
{
int fd = 0;
fdatasync (fd);
@@ -46,7 +46,7 @@ test $ac_cv_fdatasync = yes && AC_DEFINE(HAVE_FDATASYNC, 1, fdatasync(2) is avai
AC_CACHE_CHECK(for pread and pwrite, ac_cv_preadwrite, [AC_LINK_IFELSE([
#include <unistd.h>
-int main(void)
+int main (void)
{
int fd = 0;
size_t count = 1;
@@ -72,7 +72,7 @@ AC_CACHE_CHECK(for sendfile, ac_cv_sendfile, [AC_LINK_IFELSE([
#else
# error unsupported architecture
#endif
-int main(void)
+int main (void)
{
int fd = 0;
off_t offset = 1;
@@ -92,7 +92,7 @@ test $ac_cv_sendfile = yes && AC_DEFINE(HAVE_SENDFILE, 1, sendfile(2) is availab
AC_CACHE_CHECK(for sync_file_range, ac_cv_sync_file_range, [AC_LINK_IFELSE([
#include <fcntl.h>
-int main(void)
+int main (void)
{
int fd = 0;
off64_t offset = 1;