From c1a31f9b5959a69750e5d2e75e7aaafde7f53f76 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 29 Nov 2010 12:38:32 +0000 Subject: *** empty log message *** --- Changes | 1 + demo.c | 2 +- libeio.m4 | 12 ++++++------ 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 -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 -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 -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 -int main(void) +int main (void) { int fd = 0; off64_t offset = 1; -- cgit v1.2.3