Sisyphus repositório
Última atualização: 22 janeiro 2022 | SRPMs: 17486 | Visitas: 22814675
en ru br
ALT Linux repositórios
S:0.3.112-alt1
5.0: 0.3.107-alt1
4.1: 0.3.106-alt2
4.0: 0.3.106-alt1
3.0: 0.3.104-alt1

Group :: Sistema/Bibliotecas
RPM: libaio

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: libaio-0.3.112.patch
Download


 .gear/libaio.spec            | 95 ++++++++++++++++++++++++++++++++++++++++++++
 .gear/rules                  |  5 +++
 .gear/tags/list              |  1 +
 .gear/upstream/filter-tag    |  1 +
 .gear/upstream/remotes       |  3 ++
 .gear/upstream/transform-tag |  1 +
 Makefile                     |  5 ++-
 harness/main.c               | 10 +++++
 man/io.3                     | 87 ++++++++++++++++++++--------------------
 man/io_cancel.3              | 36 ++++++++---------
 man/io_fsync.3               | 46 ++++++++++-----------
 man/io_getevents.3           | 78 ++++++++++++++++++------------------
 man/io_prep_fsync.3          | 71 +++++++++++++++++----------------
 man/io_prep_pread.3          | 72 +++++++++++++++------------------
 man/io_prep_pwrite.3         | 70 +++++++++++++++-----------------
 man/io_queue_init.3          | 38 +++++++++---------
 man/io_queue_release.3       | 38 +++++++++---------
 man/io_queue_run.3           | 46 ++++++++++-----------
 man/io_queue_wait.3          | 50 +++++++++++------------
 man/io_set_callback.3        | 38 +++++++++---------
 man/io_submit.3              | 62 ++++++++++++++---------------
 src/Makefile                 | 12 +++---
 src/libaio.h                 | 10 ++++-
 src/syscall-m68k.h           |  5 +++
 src/syscall-mips.h           | 54 +++++++++++++++++++++++++
 src/syscall-parisc.h         |  6 +++
 src/syscall-sh.h             |  6 +++
 src/syscall-x86_64.h         | 12 ++++++
 src/syscall.h                |  8 ++++
 29 files changed, 586 insertions(+), 380 deletions(-)
diff --git a/.gear/libaio.spec b/.gear/libaio.spec
new file mode 100644
index 0000000..95e746a
--- /dev/null
+++ b/.gear/libaio.spec
@@ -0,0 +1,95 @@
+Name: libaio
+Version: 0.3.112
+Release: alt1
+
+Summary: Linux-native asynchronous I/O access library
+License: LGPLv2+
+Group: System/Libraries
+Url: https://pagure.io/libaio
+Source: %name-%version.tar
+
+Patch: %name-%version.patch
+
+%description
+The Linux-native asynchronous I/O facility ("async I/O", or "aio") has a richer
+API and capability set than the simple POSIX async I/O facility. This library,
+libaio, provides the Linux-native API for async I/O. The POSIX async I/O
+facility requires this library in order to provide kernel-accelerated async I/O
+capabilities, as do applications which require the Linux-native async I/O API.
+
+%package devel
+Summary: Development files for Linux-native asynchronous I/O access
+Group: Development/C
+Requires: libaio = %version-%release
+
+%description devel
+This package provides header files to include and libraries to link with
+for the Linux-native asynchronous I/O facility ("async I/O", or "aio").
+
+%package devel-static
+Summary: Linux-native asynchronous I/O access static library
+Group: Development/C
+Requires: libaio-devel = %version-%release
+
+%description devel-static
+This package contains static library for
+the Linux-native asynchronous I/O facility ("async I/O", or "aio").
+
+%prep
+%setup
+%patch -p1
+
+%build
+%make_build
+
+%install
+%makeinstall_std \
+	prefix=%_prefix libdir=/%_lib usrlibdir=%_libdir
+
+%files
+/%_lib/*.so.*
+
+%files devel
+%_libdir/*.so
+%_includedir/*
+
+%files devel-static
+%_libdir/*.a
+
+%changelog
+* Thu Jun 24 2021 Alexey Shabalin <shaba@altlinux.org> 0.3.112-alt1
+- new version 0.3.112
+
+* Wed Jun 27 2018 Alexey Shabalin <shaba@altlinux.ru> 0.3.111-alt1
+- 0.3.111
+- add package with static library
+- add patches from debian for support more arches
+
+* Sat Jan 28 2017 Michael Shigorin <mike@altlinux.org> 0.3.110-alt1.1
+- E2K: partially added mcst patch.
+
+* Tue Aug 19 2014 Gleb F-Malinovskiy <glebfm@altlinux.org> 0.3.110-alt1
+- New version.
+
+* Thu Aug 11 2011 Dmitry V. Levin <ldv@altlinux.org> 0.3.109-alt2
+- Imported manpage fixes from Debian.
+- Made %name.so symlink relative.
+- Rebuilt for debuginfo.
+
+* Mon Oct 18 2010 Victor Forsiuk <force@altlinux.org> 0.3.109-alt1
+- 0.3.109
+
+* Wed Aug 26 2009 Victor Forsyuk <force@altlinux.org> 0.3.107-alt2
+- Move library to /lib (close: ALT#21230).
+
+* Mon Dec 15 2008 Victor Forsyuk <force@altlinux.org> 0.3.107-alt1
+- 0.3.107
+
+* Mon Apr 07 2008 Victor Forsyuk <force@altlinux.org> 0.3.106-alt2
+- One-letter spec fix, library symlink should be owned only by -devel.
+
+* Mon Apr 10 2006 Victor Forsyuk <force@altlinux.ru> 0.3.106-alt1
+- 0.3.106
+
+* Fri Jul 29 2005 Victor Forsyuk <force@altlinux.ru> 0.3.104-alt1
+- Initial build.
diff --git a/.gear/rules b/.gear/rules
new file mode 100644
index 0000000..ed8cbb6
--- /dev/null
+++ b/.gear/rules
@@ -0,0 +1,5 @@
+tar: @name@-@version@:.
+diff: @name@-@version@:. . name=@name@-@version@.patch
+spec: .gear/libaio.spec
+
+
diff --git a/.gear/tags/list b/.gear/tags/list
new file mode 100644
index 0000000..d0fff7a
--- /dev/null
+++ b/.gear/tags/list
@@ -0,0 +1 @@
+d025927efa75a0d1b46ca3a5ef331caa2f46ee0e libaio-0.3.112
diff --git a/.gear/upstream/filter-tag b/.gear/upstream/filter-tag
new file mode 100755
index 0000000..b205ea5
--- /dev/null
+++ b/.gear/upstream/filter-tag
@@ -0,0 +1 @@
+grep libaio-
diff --git a/.gear/upstream/remotes b/.gear/upstream/remotes
new file mode 100644
index 0000000..bbfd2bb
--- /dev/null
+++ b/.gear/upstream/remotes
@@ -0,0 +1,3 @@
+[remote "upstream"]
+	url = https://pagure.io/libaio.git
+	fetch = +refs/heads/*:refs/remotes/upstream/*
diff --git a/.gear/upstream/transform-tag b/.gear/upstream/transform-tag
new file mode 100755
index 0000000..2440c5f
--- /dev/null
+++ b/.gear/upstream/transform-tag
@@ -0,0 +1 @@
+sed -e 's,libaio-,,'
diff --git a/Makefile b/Makefile
index c1fb831..859fc0b 100644
--- a/Makefile
+++ b/Makefile
@@ -4,9 +4,12 @@ VERSION=$(shell awk '/Version:/ { print $$2 }' $(SPECFILE))
 TAG = $(NAME)-$(VERSION)
 RPMBUILD=$(shell `which rpmbuild >&/dev/null` && echo "rpmbuild" || echo "rpm")
 
+DESTDIR=
 prefix=/usr
 includedir=$(prefix)/include
 libdir=$(prefix)/lib
+libdir=$(prefix)/lib
+usrlibdir=$(prefix)/lib
 
 default: all
 
@@ -14,7 +17,7 @@ all:
 	@$(MAKE) -C src
 
 install:
-	@$(MAKE) -C src install prefix=$(DESTDIR)$(prefix) includedir=$(DESTDIR)$(includedir) libdir=$(DESTDIR)$(libdir)
+	@$(MAKE) -C src install DESTDIR=$(DESTDIR) prefix=$(prefix) includedir=$(includedir) libdir=$(libdir) usrlibdir=$(usrlibdir)
 
 check:
 	@$(MAKE) -C harness check
diff --git a/harness/main.c b/harness/main.c
index 9ecd5da..ce760cd 100644
--- a/harness/main.c
+++ b/harness/main.c
@@ -12,7 +12,17 @@
 #include <libaio.h>
 
 #if __LP64__ == 0
+#if defined(__i386__) || defined(__powerpc__) || defined(__mips__)
 #define KERNEL_RW_POINTER	((void *)0xc0010000)
+#elif defined(__arm__) || defined(__m68k__) || defined(__s390__) || defined(__sh__) || defined(__x86_64__)
+#define KERNEL_RW_POINTER	((void *)0x00010000)
+#elif defined(__hppa__)
+#define KERNEL_RW_POINTER	((void *)0x10100000)
+#elif defined(__sparc__)
+#define KERNEL_RW_POINTER	((void *)0xf0010000)
+#else
+#error Unknown kernel memory address.
+#endif
 #else
 //#warning Not really sure where kernel memory is.  Guessing.
 #define KERNEL_RW_POINTER	((void *)0xffffffff81000000)
diff --git a/man/io.3 b/man/io.3
index d910a68..79ffd8c 100644
--- a/man/io.3
+++ b/man/io.3
@@ -1,12 +1,12 @@
-.TH io 3 2002-09-12 "Linux 2.4" Linux IO"
+.TH io 3 2009-06-10 "Linux 2.4" "Linux AIO"
 .SH NAME
 io \- Asynchronous IO
-.SH SYNOPSYS
+.SH SYNOPSIS
 .nf
 .B #include <errno.h>
 .sp
 .br 
-.B #include <libio.h>
+.B #include <libaio.h>
 .sp
 .fi
 .SH DESCRIPTION
@@ -17,9 +17,9 @@ then immediately resume normal work while the I/O operations are
 executed in parallel.  
 
 These functions are part of the library with realtime functions named
-.IR "libaio"
-.  They are not actually part of the 
-.IR "libc" 
+.IR libaio .
+They are not actually part of the 
+.I "libc"
 binary.
 The implementation of these functions can be done using support in the
 kernel.
@@ -27,9 +27,9 @@ kernel.
 All IO operations operate on files which were opened previously.  There
 might be arbitrarily many operations running for one file.  The
 asynchronous I/O operations are controlled using a data structure named
-.IR "struct iocb"
+.B "struct iocb"
 It is defined in
-.IR "libio.h"
+.I "libaio.h"
 as follows.
 
 .nf
@@ -74,7 +74,7 @@ struct iocb {
 
 .fi
 .TP
-.IR "int aio_fildes"
+.BI int " aio_fildes"
 This element specifies the file descriptor to be used for the
 operation.  It must be a legal descriptor, otherwise the operation will
 fail.
@@ -82,54 +82,51 @@ fail.
 The device on which the file is opened must allow the seek operation.
 I.e., it is not possible to use any of the IO operations on devices
 like terminals where an 
-.IR "lseek"
+.BR lseek (2)
 call would lead to an error.
 .TP
-.IR "long u.c.offset"
+.BI long " u.c.offset"
 This element specifies the offset in the file at which the operation (input
 or output) is performed.  Since the operations are carried out in arbitrary
 order and more than one operation for one file descriptor can be
 started, one cannot expect a current read/write position of the file
 descriptor.
 .TP
-.IR "void *buf"
+.BI "void *" buf
 This is a pointer to the buffer with the data to be written or the place
 where the read data is stored.
 .TP
-.IR "long u.c.nbytes"
+.BI long " u.c.nbytes"
 This element specifies the length of the buffer pointed to by 
-.IR "io_buf"
-.
+.IR io_buf .
 .TP
-.IR "int aio_reqprio"
+.BI int " aio_reqprio"
 Is not currently used.
 .TP
 .B "IO_CMD_PREAD"
 Start a read operation.  Read from the file at position
-.IR "u.c.offset"
+.I u.c.offset
 and store the next 
-.IR "u.c.nbytes"
+.I u.c.nbytes
 bytes in the
 buffer pointed to by 
-.IR "buf"
-.
+.IR buf .
 .TP
 .B "IO_CMD_PWRITE"
 Start a write operation.  Write 
-.IR "u.c.nbytes" 
+.I u.c.nbytes
 bytes starting at
-.IR "buf"
+.I buf
 into the file starting at position 
-.IR "u.c.offset"
-.
+.IR u.c.offset .
 .TP
 .B "IO_CMD_NOP"
 Do nothing for this control block.  This value is useful sometimes when
 an array of 
-.IR "struct iocb"
+.I struct iocb
 values contains holes, i.e., some of the
 values must not be handled although the whole array is presented to the
-.IR "io_submit"
+.I io_submit
 function.
 .TP 
 .B "IO_CMD_FSYNC"
@@ -175,11 +172,11 @@ static const char *srcname = NULL;
 static void io_error(const char *func, int rc)
 {
     if (rc == -ENOSYS)
-	fprintf(stderr, "AIO not in this kernel\n");
+	fprintf(stderr, "AIO not in this kernel\\n");
     else if (rc < 0 && -rc < sys_nerr)
-	fprintf(stderr, "%s: %s\n", func, sys_errlist[-rc]);
+	fprintf(stderr, "%s: %s\\n", func, sys_errlist[-rc]);
     else
-	fprintf(stderr, "%s: error %d\n", func, rc);
+	fprintf(stderr, "%s: error %d\\n", func, rc);
 
     if (dstfd > 0)
 	close(dstfd);
@@ -198,7 +195,7 @@ static void wr_done(io_context_t ctx, struct iocb *iocb, long res, long res2)
 	io_error("aio write", res2);
     }
     if (res != iocb->u.c.nbytes) {
-	fprintf(stderr, "write missed bytes expect %d got %d\n", iocb->u.c.nbytes, res2);
+	fprintf(stderr, "write missed bytes expect %d got %d\\n", iocb->u.c.nbytes, res2);
 	exit(1);
     }
     --tocopy;
@@ -224,7 +221,7 @@ static void rd_done(io_context_t ctx, struct iocb *iocb, long res, long res2)
     if (res2 != 0)
 	io_error("aio read", res2);
     if (res != iosize) {
-	fprintf(stderr, "read missing bytes expect %d got %d\n", iocb->u.c.nbytes, res);
+	fprintf(stderr, "read missing bytes expect %d got %d\\n", iocb->u.c.nbytes, res);
 	exit(1);
     }
 
@@ -284,7 +281,7 @@ int main(int argc, char *const *argv)
 		char *buf = (char *) malloc(iosize);
 
 		if (NULL == buf || NULL == io) {
-		    fprintf(stderr, "out of memory\n");
+		    fprintf(stderr, "out of memory\\n");
 		    exit(1);
 		}
 
@@ -336,16 +333,16 @@ int main(int argc, char *const *argv)
  */
 .fi
 .SH "SEE ALSO"
-.BR io_cancel(3),
-.BR io_fsync(3),
-.BR io_getevents(3),
-.BR io_prep_fsync(3),
-.BR io_prep_pread(3),
-.BR io_prep_pwrite(3),
-.BR io_queue_init(3),
-.BR io_queue_release(3),
-.BR io_queue_run(3),
-.BR io_queue_wait(3),
-.BR io_set_callback(3),
-.BR io_submit(3),
-.BR errno(3)
+.BR io_cancel (3),
+.BR io_fsync (3),
+.BR io_getevents (3),
+.BR io_prep_fsync (3),
+.BR io_prep_pread (3),
+.BR io_prep_pwrite (3),
+.BR io_queue_init (3),
+.BR io_queue_release (3),
+.BR io_queue_run (3),
+.BR io_queue_wait (3),
+.BR io_set_callback (3),
+.BR io_submit (3),
+.BR errno (3).
diff --git a/man/io_cancel.3 b/man/io_cancel.3
index 9a16084..2f9b4f8 100644
--- a/man/io_cancel.3
+++ b/man/io_cancel.3
@@ -1,4 +1,4 @@
-.TH io_cancel 2 2002-09-03 "Linux 2.4" "Linux AIO"
+.TH io_cancel 2 2009-06-10 "Linux 2.4" "Linux AIO"
 .SH NAME
 io_cancel \- Cancel io requests
 .SH SYNOPSIS
@@ -9,7 +9,7 @@ io_cancel \- Cancel io requests
 .B #include <libaio.h>
 .sp
 .br
-.BI "int io_cancel(io_context_t ctx, struct iocb *iocb)"
+.BI "int io_cancel(io_context_t " ctx ", struct iocb *" iocb ");"
 .br
 .sp
 struct iocb {
@@ -33,7 +33,7 @@ have to be overwritten soon.  As an example, assume an application, which
 writes data in files in a situation where new incoming data would have
 to be written in a file which will be updated by an enqueued request.
 .SH "RETURN VALUES"
-0 is returned on success , otherwise returns Errno.
+\fI0\fP is returned on success, otherwise returns \fIerrno\fP.
 .SH ERRORS
 .TP
 .B EFAULT 
@@ -44,22 +44,22 @@ If aio_context specified by ctx_id is
 invalid.  
 .TP
 .B EAGAIN
-If the iocb specified was not
+If the \fIiocb\fP specified was not
 cancelled.  
 .TP
 .B ENOSYS 
-if not implemented.
+If not implemented.
 .SH "SEE ALSO"
-.BR io(3),
-.BR io_fsync(3),
-.BR io_getevents(3),
-.BR io_prep_fsync(3),
-.BR io_prep_pread(3),
-.BR io_prep_pwrite(3),
-.BR io_queue_init(3),
-.BR io_queue_release(3),
-.BR io_queue_run(3),
-.BR io_queue_wait(3),
-.BR io_set_callback(3),
-.BR io_submit(3),
-.BR errno(3)
+.BR io (3),
+.BR io_fsync (3),
+.BR io_getevents (3),
+.BR io_prep_fsync (3),
+.BR io_prep_pread (3),
+.BR io_prep_pwrite (3),
+.BR io_queue_init (3),
+.BR io_queue_release (3),
+.BR io_queue_run (3),
+.BR io_queue_wait (3),
+.BR io_set_callback (3),
+.BR io_submit (3),
+.BR errno (3).
diff --git a/man/io_fsync.3 b/man/io_fsync.3
index 53eb63d..2e18566 100644
--- a/man/io_fsync.3
+++ b/man/io_fsync.3
@@ -1,13 +1,13 @@
-./" static inline int io_fsync(io_context_t ctx, struct iocb *iocb, io_callback_t cb, int fd)
-./" {
-./" 	io_prep_fsync(iocb, fd);
-./" 	io_set_callback(iocb, cb);
-./" 	return io_submit(ctx, 1, &iocb);
-./" }
-.TH io_fsync 3 2002-09-12 "Linux 2.4" Linux AIO"
+.\" static inline int io_fsync(io_context_t ctx, struct iocb *iocb, io_callback_t cb, int fd)
+.\" {
+.\" 	io_prep_fsync(iocb, fd);
+.\" 	io_set_callback(iocb, cb);
+.\" 	return io_submit(ctx, 1, &iocb);
+.\" }
+.TH io_fsync 3 2009-06-10 "Linux 2.4" Linux AIO"
 .SH NAME
 io_fsync \- Synchronize a file's complete in-core state with that on disk
-.SH SYNOPSYS
+.SH SYNOPSIS
 .nf
 .B #include <errno.h>
 .sp
@@ -15,7 +15,7 @@ io_fsync \- Synchronize a file's complete in-core state with that on disk
 .B #include <libaio.h>
 .sp
 .br
-.BI "int io_fsync(io_context_t ctx, struct iocb *iocb, io_callback_t cb, int fd)"
+.BI "int io_fsync(io_context_t " ctx ", struct iocb *" iocb ", io_callback_t " cb ", int " fd ");"
 .sp
 struct iocb {
 	void		*data;
@@ -49,7 +49,7 @@ file descriptor have terminated and the file is synchronized.  This also
 means that requests for this very same file descriptor which are queued
 after the synchronization request are not affected.
 .SH "RETURN VALUES"
-Returns 0, otherwise returns errno.
+Returns \fI0\fP, otherwise returns \fIerrno\fP.
 .SH ERRORS
 .TP
 .B EFAULT
@@ -58,7 +58,7 @@ referenced data outside of the program's accessible address space.
 .TP
 .B EINVAL
 .I ctx
-refers to an unitialized aio context, the iocb pointed to by 
+refers to an uninitialized aio context, the iocb pointed to by
 .I iocbs
 contains an improperly initialized iocb, 
 .TP
@@ -68,15 +68,15 @@ The iocb contains a file descriptor that does not exist.
 .B EINVAL
 The file specified in the iocb does not support the given io operation.
 .SH "SEE ALSO"
-.BR io(3),
-.BR io_cancel(3),
-.BR io_getevents(3),
-.BR io_prep_pread(3),
-.BR io_prep_pwrite(3),
-.BR io_queue_init(3),
-.BR io_queue_release(3),
-.BR io_queue_run(3),
-.BR io_queue_wait(3),
-.BR io_set_callback(3),
-.BR io_submit(3),
-.BR errno(3)
+.BR io (3),
+.BR io_cancel (3),
+.BR io_getevents (3),
+.BR io_prep_pread (3),
+.BR io_prep_pwrite (3),
+.BR io_queue_init (3),
+.BR io_queue_release (3),
+.BR io_queue_run (3),
+.BR io_queue_wait (3),
+.BR io_set_callback (3),
+.BR io_submit (3),
+.BR errno (3).
diff --git a/man/io_getevents.3 b/man/io_getevents.3
index 5062daa..0eaaa6c 100644
--- a/man/io_getevents.3
+++ b/man/io_getevents.3
@@ -1,22 +1,22 @@
-./"/* io_getevents:
-./" *      Attempts to read at least min_nr events and up to nr events from
-./" *      the completion queue for the aio_context specified by ctx_id.  May
-./" *      fail with -EINVAL if ctx_id is invalid, if min_nr is out of range,
-./" *      if nr is out of range, if when is out of range.  May fail with
-./" *      -EFAULT if any of the memory specified to is invalid.  May return
-./" *      0 or < min_nr if no events are available and the timeout specified
-./" *      by when has elapsed, where when == NULL specifies an infinite
-./" *      timeout.  Note that the timeout pointed to by when is relative and
-./" *      will be updated if not NULL and the operation blocks.  Will fail
-./" *      with -ENOSYS if not implemented.
-./" */
-./"asmlinkage long sys_io_getevents(io_context_t ctx_id,
-./"                                 long min_nr,
-./"                                 long nr,
-./"                                 struct io_event *events,
-./"                                 struct timespec *timeout)
-./"
-.TH io_getevents 2 2002-09-03 "Linux 2.4" "Linux AIO"
+.\"/* io_getevents:
+.\" *      Attempts to read at least min_nr events and up to nr events from
+.\" *      the completion queue for the aio_context specified by ctx_id.  May
+.\" *      fail with -EINVAL if ctx_id is invalid, if min_nr is out of range,
+.\" *      if nr is out of range, if when is out of range.  May fail with
+.\" *      -EFAULT if any of the memory specified to is invalid.  May return
+.\" *      0 or < min_nr if no events are available and the timeout specified
+.\" *      by when has elapsed, where when == NULL specifies an infinite
+.\" *      timeout.  Note that the timeout pointed to by when is relative and
+.\" *      will be updated if not NULL and the operation blocks.  Will fail
+.\" *      with -ENOSYS if not implemented.
+.\" */
+.\"asmlinkage long sys_io_getevents(io_context_t ctx_id,
+.\"                                 long min_nr,
+.\"                                 long nr,
+.\"                                 struct io_event *events,
+.\"                                 struct timespec *timeout)
+.\"
+.TH io_getevents 2 2009-06-10 "Linux 2.4" "Linux AIO"
 .SH NAME
 io_getevents, aio_pgetevents \- Read resulting events from io requests
 .SH SYNOPSIS
@@ -42,19 +42,19 @@ struct io_event {
         unsigned        PADDED(res2, __pad4);
 };
 .sp
-.BI "int io_getevents(io_context_t " ctx ",  long " nr ", struct io_event *" events "[], struct timespec *" timeout ");"
+.BI "int io_getevents(io_context_t " ctx ", long " nr ", struct io_event *" events "[], struct timespec *" timeout ");"
 .BI "int io_pgetevents(io_context_t " ctx ",  long " nr ", struct io_event *" events "[], struct timespec *" timeout ", sigset_t *" sigmask ");"
 .fi
 .SH DESCRIPTION
 Attempts to read  up to nr events from
-the completion queue for the aio_context specified by ctx.  
+the completion queue for the aio_context specified by \fIctx\fP.
 .SH "RETURN VALUES"
 May return
-0 if no events are available and the timeout specified
+\fI0\fP if no events are available and the timeout specified
 by when has elapsed, where when == NULL specifies an infinite
 timeout.  Note that the timeout pointed to by when is relative and
 will be updated if not NULL and the operation blocks.  Will fail
-with ENOSYS if not implemented.
+with \fBENOSYS\fP if not implemented.
 .SS io_pgetevents()
 The relationship between
 .BR io_getevents ()
@@ -112,23 +112,23 @@ behaves the same as
 .SH ERRORS
 .TP
 .B EINVAL 
-if ctx_id is invalid, if min_nr is out of range,
+If ctx_id is invalid, if min_nr is out of range,
 if nr is out of range, if when is out of range.  
 .TP
 .B EFAULT 
-if any of the memory specified to is invalid.  
+If any of the memory specified to is invalid.
 .SH "SEE ALSO"
-.BR io(3),
-.BR io_cancel(3),
-.BR io_fsync(3),
-.BR io_prep_fsync(3),
-.BR io_prep_pread(3),
-.BR io_prep_pwrite(3),
-.BR io_queue_init(3),
-.BR io_queue_release(3),
-.BR io_queue_run(3),
-.BR io_queue_wait(3),
-.BR io_set_callback(3),
-.BR io_submit(3),
-.BR errno(3),
-.BR pselect(2)
+.BR io (3),
+.BR io_cancel (3),
+.BR io_fsync (3),
+.BR io_prep_fsync (3),
+.BR io_prep_pread (3),
+.BR io_prep_pwrite (3),
+.BR io_queue_init (3),
+.BR io_queue_release (3),
+.BR io_queue_run (3),
+.BR io_queue_wait (3),
+.BR io_set_callback (3),
+.BR io_submit (3),
+.BR errno (3),
+.BR pselect (2).
diff --git a/man/io_prep_fsync.3 b/man/io_prep_fsync.3
index 4cf935a..0b68433 100644
--- a/man/io_prep_fsync.3
+++ b/man/io_prep_fsync.3
@@ -1,14 +1,14 @@
-./" static inline void io_prep_fsync(struct iocb *iocb, int fd)
-./" {
-./" 	memset(iocb, 0, sizeof(*iocb));
-./" 	iocb->aio_fildes = fd;
-./" 	iocb->aio_lio_opcode = IO_CMD_FSYNC;
-./" 	iocb->aio_reqprio = 0;
-./" }
-.TH io_prep_fsync 3 2002-09-12 "Linux 2.4" Linux AIO"
+.\" static inline void io_prep_fsync(struct iocb *iocb, int fd)
+.\" {
+.\" 	memset(iocb, 0, sizeof(*iocb));
+.\" 	iocb->aio_fildes = fd;
+.\" 	iocb->aio_lio_opcode = IO_CMD_FSYNC;
+.\" 	iocb->aio_reqprio = 0;
+.\" }
+.TH io_prep_fsync 3 2009-06-10 "Linux 2.4" Linux AIO"
 .SH NAME
 io_prep_fsync \- Synchronize a file's complete in-core state with that on disk
-.SH SYNOPSYS
+.SH SYNOPSIS
 .nf
 .B #include <errno.h>
 .br
@@ -16,7 +16,7 @@ io_prep_fsync \- Synchronize a file's complete in-core state with that on disk
 .B #include <libaio.h>
 .br
 .sp
-.BI "static inline void io_prep_fsync(struct iocb *iocb, int fd)"
+.BI "static inline void io_prep_fsync(struct iocb *" iocb ", int " fd ");"
 .sp
 struct iocb {
 	void		*data;
@@ -28,7 +28,8 @@ struct iocb {
 .sp
 .fi
 .SH DESCRIPTION
-This is an inline convenience function for setting up an iocbv for a FSYNC request.
+This is an inline convenience function for setting up an \fIiocbv\fP for a
+\fBFSYNC\fP request.
 .br
 The file for which
 .TP 
@@ -36,33 +37,33 @@ The file for which
 is a descriptor is set up with
 the command
 .TP 
-.IR "iocb->aio_lio_opcode = IO_CMD_FSYNC:
+.IR "iocb->aio_lio_opcode = IO_CMD_FSYNC"
 .
 .PP
-The io_prep_fsync() function shall set up an IO_CMD_FSYNC operation
+The \fBio_prep_fsync\fP() function shall set up an \fBIO_CMD_FSYNC\fP operation
 to asynchronously force all I/O
 operations associated with the file indicated by the file
-descriptor aio_fildes member of the iocb structure referenced by
+descriptor \fIaio_fildes\fP member of the \fIiocb\fP structure referenced by
 the iocb argument and queued at the time of the call to
-io_submit() to the synchronized I/O completion state. The function
+\fBio_submit\fP() to the synchronized I/O completion state. The function
 call shall return when the synchronization request has been
 initiated or queued to the file or device (even when the data
 cannot be synchronized immediately).
 
 All currently queued I/O operations shall be completed as if by a call
-to fsync(); that is, as defined for synchronized I/O file
+to \fBfsync\fP(); that is, as defined for synchronized I/O file
 integrity completion. If the
-operation queued by io_prep_fsync() fails, then, as for fsync(),
+operation queued by \fBio_prep_fsync\fP() fails, then, as for \fBfsync\fP(),
 outstanding I/O operations are not guaranteed to have
 been completed.
 
-If io_prep_fsync() succeeds, then it is only the I/O that was queued
-at the time of the call to io_submit() that is guaranteed to be
+If \fBio_prep_fsync\fP() succeeds, then it is only the I/O that was queued
+at the time of the call to \fBio_submit\fP() that is guaranteed to be
 forced to the relevant completion state. The completion of
 subsequent I/O on the file descriptor is not guaranteed to be
 completed in a synchronized fashion.
 .PP
-This function returns immediately . To schedule the operation, the
+This function returns immediately. To schedule the operation, the
 function
 .IR io_submit
 must be called.
@@ -70,20 +71,20 @@ must be called.
 Simultaneous asynchronous operations using the same iocb produce
 undefined results.
 .SH "RETURN VALUES"
-None
+None.
 .SH ERRORS
-None
+None.
 .SH "SEE ALSO"
-.BR io(3),
-.BR io_cancel(3),
-.BR io_fsync(3),
-.BR io_getevents(3),
-.BR io_prep_pread(3),
-.BR io_prep_pwrite(3),
-.BR io_queue_init(3),
-.BR io_queue_release(3),
-.BR io_queue_run(3),
-.BR io_queue_wait(3),
-.BR io_set_callback(3),
-.BR io_submit(3),
-.BR errno(3)
+.BR io (3),
+.BR io_cancel (3),
+.BR io_fsync (3),
+.BR io_getevents (3),
+.BR io_prep_pread (3),
+.BR io_prep_pwrite (3),
+.BR io_queue_init (3),
+.BR io_queue_release (3),
+.BR io_queue_run (3),
+.BR io_queue_wait (3),
+.BR io_set_callback (3),
+.BR io_submit (3),
+.BR errno (3).
diff --git a/man/io_prep_pread.3 b/man/io_prep_pread.3
index 5938aec..2dd1157 100644
--- a/man/io_prep_pread.3
+++ b/man/io_prep_pread.3
@@ -1,17 +1,17 @@
-./" static inline void io_prep_pread(struct iocb *iocb, int fd, void *buf, size_t count, long long offset)
-./" {
-./" 	memset(iocb, 0, sizeof(*iocb));
-./" 	iocb->aio_fildes = fd;
-./" 	iocb->aio_lio_opcode = IO_CMD_PREAD;
-./" 	iocb->aio_reqprio = 0;
-./" 	iocb->u.c.buf = buf;
-./" 	iocb->u.c.nbytes = count;
-./" 	iocb->u.c.offset = offset;
-./" }
-.TH io_prep_pread 3 2002-09-12 "Linux 2.4" Linux AIO"
+.\" static inline void io_prep_pread(struct iocb *iocb, int fd, void *buf, size_t count, long long offset)
+.\" {
+.\" 	memset(iocb, 0, sizeof(*iocb));
+.\" 	iocb->aio_fildes = fd;
+.\" 	iocb->aio_lio_opcode = IO_CMD_PREAD;
+.\" 	iocb->aio_reqprio = 0;
+.\" 	iocb->u.c.buf = buf;
+.\" 	iocb->u.c.nbytes = count;
+.\" 	iocb->u.c.offset = offset;
+.\" }
+.TH io_prep_pread 3 2009-06-10 "Linux 2.4" Linux AIO"
 .SH NAME
 io_prep_pread \- Set up asynchronous read
-.SH SYNOPSYS
+.SH SYNOPSIS
 .nf
 .B #include <errno.h>
 .sp
@@ -19,7 +19,7 @@ io_prep_pread \- Set up asynchronous read
 .B #include <libaio.h>
 .br
 .sp
-.BI "inline void io_prep_pread(struct iocb *iocb, int fd, void *buf, size_t count, long long offset)
+.BI "inline void io_prep_pread(struct iocb *" iocb ", int " fd ", void *" buf ", size_t " count ", long long " offset ");"
 "
 .sp
 struct iocb {
@@ -31,49 +31,43 @@ struct iocb {
 };
 .fi
 .SH DESCRIPTION
-.IR io_prep_pread 
+.B io_prep_pread
 is an inline convenience function designed to facilitate the initialization of
 the iocb for an asynchronous read operation.
 
 The first
-.TP
 .IR "iocb->u.c.nbytes = count"
 bytes of the file for which
-.TP
 .IR "iocb->aio_fildes = fd"
 is a descriptor are written to the buffer
 starting at
-.TP
-.IR "iocb->u.c.buf = buf"
-.
-.br
+.IR "iocb->u.c.buf = buf" .
 Reading starts at the absolute position
-.TP
 .IR "ioc->u.c.offset = offset"
 in the file.
 .PP
-This function returns immediately . To schedule the operation, the
+This function returns immediately. To schedule the operation, the
 function 
-.IR io_submit
+.B io_submit
 must be called.
 .PP
-Simultaneous asynchronous operations using the same iocb produce
+Simultaneous asynchronous operations using the same \fIiocb\fP produce
 undefined results.
 .SH "RETURN VALUES"
-None
+None.
 .SH ERRORS
-None
+None.
 .SH "SEE ALSO"
-.BR io(3),
-.BR io_cancel(3),
-.BR io_fsync(3),
-.BR io_getevents(3),
-.BR io_prep_fsync(3),
-.BR io_prep_pwrite(3),
-.BR io_queue_init(3),
-.BR io_queue_release(3),
-.BR io_queue_run(3),
-.BR io_queue_wait(3),
-.BR io_set_callback(3),
-.BR io_submit(3),
-.BR errno(3)
+.BR io (3),
+.BR io_cancel (3),
+.BR io_fsync (3),
+.BR io_getevents (3),
+.BR io_prep_fsync (3),
+.BR io_prep_pwrite (3),
+.BR io_queue_init (3),
+.BR io_queue_release (3),
+.BR io_queue_run (3),
+.BR io_queue_wait (3),
+.BR io_set_callback (3),
+.BR io_submit (3),
+.BR errno (3).
diff --git a/man/io_prep_pwrite.3 b/man/io_prep_pwrite.3
index 68b3500..cf7d273 100644
--- a/man/io_prep_pwrite.3
+++ b/man/io_prep_pwrite.3
@@ -1,17 +1,17 @@
-./" static inline void io_prep_pwrite(struct iocb *iocb, int fd, void *buf, size_t count, long long offset)
-./" {
-./" 	memset(iocb, 0, sizeof(*iocb));
-./" 	iocb->aio_fildes = fd;
-./" 	iocb->aio_lio_opcode = IO_CMD_PWRITE;
-./" 	iocb->aio_reqprio = 0;
-./" 	iocb->u.c.buf = buf;
-./" 	iocb->u.c.nbytes = count;
-./" 	iocb->u.c.offset = offset;
-./" }
-.TH io_prep_pwrite 3 2002-09-12 "Linux 2.4" Linux AIO"
+.\" static inline void io_prep_pwrite(struct iocb *iocb, int fd, void *buf, size_t count, long long offset)
+.\" {
+.\" 	memset(iocb, 0, sizeof(*iocb));
+.\" 	iocb->aio_fildes = fd;
+.\" 	iocb->aio_lio_opcode = IO_CMD_PWRITE;
+.\" 	iocb->aio_reqprio = 0;
+.\" 	iocb->u.c.buf = buf;
+.\" 	iocb->u.c.nbytes = count;
+.\" 	iocb->u.c.offset = offset;
+.\" }
+.TH io_prep_pwrite 3 2009-06-10 "Linux 2.4" Linux AIO"
 .SH NAME
 io_prep_pwrite \- Set up iocb for asynchronous writes
-.SH SYNOPSYS
+.SH SYNOPSIS
 .nf
 .B #include <errno.h>
 .br
@@ -19,8 +19,8 @@ io_prep_pwrite \- Set up iocb for asynchronous writes
 .B #include <libaio.h>
 .br
 .sp
-.BI "inline void io_prep_pwrite(struct iocb *iocb, int fd, void *buf, size_t count, long long offset)
-"
+.BI "inline void io_prep_pwrite(struct iocb *" iocb ", int " fd ", void *" buf ", size_t " count ", long long " offset ");"
+.
 .sp
 struct iocb {
 	void		*data;
@@ -31,26 +31,20 @@ struct iocb {
 };
 .fi
 .SH DESCRIPTION
-io_prep_write is a convenicence function for setting up parallel writes.
+\fBio_prep_write\fP is a convenicence function for setting up parallel writes.
 
 The first
-.TP
 .IR "iocb->u.c.nbytes = count"
 bytes of the file for which
-.TP
 .IR "iocb->aio_fildes = fd"
 is a descriptor are written from the buffer
 starting at
-.TP
-.IR "iocb->u.c.buf = buf"
-.
-.br
+.IR "iocb->u.c.buf = buf" .
 Writing starts at the absolute position
-.TP
 .IR "ioc->u.c.offset = offset"
 in the file.
 .PP
-This function returns immediately . To schedule the operation, the
+This function returns immediately. To schedule the operation, the
 function
 .IR io_submit
 must be called.
@@ -58,20 +52,20 @@ must be called.
 Simultaneous asynchronous operations using the same iocb produce
 undefined results.
 .SH "RETURN VALUES"
-None
+None.
 .SH ERRORS
-None
+None.
 .SH "SEE ALSO"
-.BR io(3),
-.BR io_cancel(3),
-.BR io_fsync(3),
-.BR io_getevents(3),
-.BR io_prep_fsync(3),
-.BR io_prep_pread(3),
-.BR io_queue_init(3),
-.BR io_queue_release(3),
-.BR io_queue_run(3),
-.BR io_queue_wait(3),
-.BR io_set_callback(3),
-.BR io_submit(3),
-.BR errno(3)
+.BR io (3),
+.BR io_cancel (3),
+.BR io_fsync (3),
+.BR io_getevents (3),
+.BR io_prep_fsync (3),
+.BR io_prep_pread (3),
+.BR io_queue_init (3),
+.BR io_queue_release (3),
+.BR io_queue_run (3),
+.BR io_queue_wait (3),
+.BR io_set_callback (3),
+.BR io_submit (3),
+.BR errno (3).
diff --git a/man/io_queue_init.3 b/man/io_queue_init.3
index 317f631..4ded1c2 100644
--- a/man/io_queue_init.3
+++ b/man/io_queue_init.3
@@ -1,4 +1,4 @@
-.TH io_queue_init 2 2002-09-03 "Linux 2.4" "Linux AIO"
+.TH io_queue_init 2 2009-06-10 "Linux 2.4" "Linux AIO"
 .SH NAME
 io_queue_init \- Initialize asynchronous io state machine
 
@@ -10,7 +10,7 @@ io_queue_init \- Initialize asynchronous io state machine
 .B #include <libaio.h>
 .br
 .sp
-.BI "int io_queue_init(int maxevents, io_context_t  *ctx );"
+.BI "int io_queue_init(int " maxevents ", io_context_t *" ctx ");"
 .sp
 .fi
 .SH DESCRIPTION
@@ -27,7 +27,7 @@ If the operation is successful, *cxtp is filled with the resulting handle.
 .SH "RETURN VALUES"
 On success,
 .B io_queue_init
-returns 0.  Otherwise, -error is return, where
+returns \fI0\fP.  Otherwise, -error is return, where
 error is one of the Exxx values defined in the Errors section.
 .SH ERRORS
 .TP
@@ -37,27 +37,27 @@ referenced data outside of the program's accessible address space.
 .TP
 .B EINVAL
 .I maxevents
-is <= 0 or 
+is <= \fI0\fP or
 .IR ctx
-is an invalid memory locattion.
+is an invalid memory location.
 .TP
 .B ENOSYS 
-Not implemented
+Not implemented.
 .TP
 .B EAGAIN
 .IR "maxevents > max_aio_reqs"
 where max_aio_reqs is a tunable value.
 .SH "SEE ALSO"
-.BR io(3),
-.BR io_cancel(3),
-.BR io_fsync(3),
-.BR io_getevents(3),
-.BR io_prep_fsync(3),
-.BR io_prep_pread(3),
-.BR io_prep_pwrite(3),
-.BR io_queue_release(3),
-.BR io_queue_run(3),
-.BR io_queue_wait(3),
-.BR io_set_callback(3),
-.BR io_submit(3),
-.BR errno(3)
+.BR io (3),
+.BR io_cancel (3),
+.BR io_fsync (3),
+.BR io_getevents (3),
+.BR io_prep_fsync (3),
+.BR io_prep_pread (3),
+.BR io_prep_pwrite (3),
+.BR io_queue_release (3),
+.BR io_queue_run (3),
+.BR io_queue_wait (3),
+.BR io_set_callback (3),
+.BR io_submit (3),
+.BR errno (3).
diff --git a/man/io_queue_release.3 b/man/io_queue_release.3
index 06b9ec0..ae9abcb 100644
--- a/man/io_queue_release.3
+++ b/man/io_queue_release.3
@@ -1,4 +1,4 @@
-.TH io_queue_release 2 2002-09-03 "Linux 2.4" "Linux AIO"
+.TH io_queue_release 2 2009-06-10 "Linux 2.4" "Linux AIO"
 .SH NAME
 io_queue_release \- Release the context associated with the userspace handle
 .SH SYNOPSIS
@@ -8,41 +8,41 @@ io_queue_release \- Release the context associated with the userspace handle
 .B #include <libaio.h>
 .br
 .sp
-.BI "int io_queue_release(io_context_t ctx)"
+.BI "int io_queue_release(io_context_t " ctx ");"
 .sp
 .SH DESCRIPTION
 .B io_queue_release
-destroys the context associated with the userspace handle.    May cancel any outstanding
+destroys the context associated with the userspace handle. May cancel any outstanding
 AIOs and block on completion.
 
 .B cts.
 .SH "RETURN VALUES"
 On success,
 .B io_queue_release
-returns 0.  Otherwise, -error is return, where
+returns \fI0\fP. Otherwise, -error is return, where
 error is one of the Exxx values defined in the Errors section.
 .SH ERRORS
 .TP
 .B EINVAL
 .I ctx 
-refers to an unitialized aio context, the iocb pointed to by
+refers to an uninitialized aio context, the \fIiocb\fP pointed to by
 .I iocbs 
-contains an improperly initialized iocb,
+contains an improperly initialized \fIiocb\fP.
 .TP
 .B ENOSYS 
-Not implemented
+Not implemented.
 .SH "SEE ALSO"
-.BR io(3),
-.BR io_cancel(3),
-.BR io_fsync(3),
-.BR io_getevents(3),
-.BR io_prep_fsync(3),
-.BR io_prep_pread(3),
-.BR io_prep_pwrite(3),
-.BR io_queue_init(3),
-.BR io_queue_run(3),
+.BR io (3),
+.BR io_cancel (3),
+.BR io_fsync (3),
+.BR io_getevents (3),
+.BR io_prep_fsync (3),
+.BR io_prep_pread (3),
+.BR io_prep_pwrite (3),
+.BR io_queue_init (3),
+.BR io_queue_run (3),
 .BR io_queue_wait(3),
-.BR io_set_callback(3),
-.BR io_submit(3),
-.BR errno(3)
+.BR io_set_callback (3),
+.BR io_submit (3),
+.BR errno (3).
 
diff --git a/man/io_queue_run.3 b/man/io_queue_run.3
index 57dd417..4aca1a9 100644
--- a/man/io_queue_run.3
+++ b/man/io_queue_run.3
@@ -1,4 +1,4 @@
-.TH io_queue_run 2 2002-09-03 "Linux 2.4" "Linux AIO"
+.TH io_queue_run 2 2009-06-10 "Linux 2.4" "Linux AIO"
 .SH NAME
 io_queue_run \- Handle completed io requests
 .SH SYNOPSIS
@@ -9,17 +9,17 @@ io_queue_run \- Handle completed io requests
 .B #include <libaio.h>
 .br
 .sp
-.BI "int io_queue_run(io_context_t  ctx );"
+.BI "int io_queue_run(io_context_t " ctx_id ");"
 .sp
 .fi
 .SH DESCRIPTION
 .B io_queue_run
-Attempts to read  all the events events from
-the completion queue for the aio_context specified by ctx_id.
+Attempts to read all the events events from
+the completion queue for the aio_context specified by \fIctx_id\fP.
 .SH "RETURN VALUES"
 May return
-0 if no events are available.
-Will fail with -ENOSYS if not implemented.
+\fI0\fP if no events are available.
+Will fail with -\fBENOSYS\fP if not implemented.
 .SH ERRORS
 .TP
 .B EFAULT
@@ -27,24 +27,24 @@ Will fail with -ENOSYS if not implemented.
 referenced data outside of the program's accessible address space.
 .TP
 .B EINVAL
-.I ctx 
-refers to an unitialized aio context, the iocb pointed to by
+.I ctx_id
+refers to an uninitialized aio context, the \fIiocb\fP pointed to by
 .I iocbs 
-contains an improperly initialized iocb,
+contains an improperly initialized iocb.
 .TP
 .B ENOSYS 
-Not implemented
+Not implemented.
 .SH "SEE ALSO"
-.BR io(3),
-.BR io_cancel(3),
-.BR io_fsync(3),
-.BR io_getevents(3),
-.BR io_prep_fsync(3),
-.BR io_prep_pread(3),
-.BR io_prep_pwrite(3),
-.BR io_queue_init(3),
-.BR io_queue_release(3),
-.BR io_queue_wait(3),
-.BR io_set_callback(3),
-.BR io_submit(3),
-.BR errno(3)
+.BR io (3),
+.BR io_cancel (3),
+.BR io_fsync (3),
+.BR io_getevents (3),
+.BR io_prep_fsync (3),
+.BR io_prep_pread (3),
+.BR io_prep_pwrite (3),
+.BR io_queue_init (3),
+.BR io_queue_release (3),
+.BR io_queue_wait (3),
+.BR io_set_callback (3),
+.BR io_submit (3),
+.BR errno (3).
diff --git a/man/io_queue_wait.3 b/man/io_queue_wait.3
index 2306663..a6228bd 100644
--- a/man/io_queue_wait.3
+++ b/man/io_queue_wait.3
@@ -1,4 +1,4 @@
-.TH io_queue_wait 2 2002-09-03 "Linux 2.4" "Linux AIO"
+.TH io_queue_wait 2 2009-06-10 "Linux 2.4" "Linux AIO"
 .SH NAME
 io_queue_wait \- Wait for io requests to complete
 .SH SYNOPSIS
@@ -9,22 +9,22 @@ io_queue_wait \- Wait for io requests to complete
 .B #include <libaio.h>
 .br
 .sp
-.BI "int io_queue_wait(io_context_t ctx, const struct timespec *timeout);"
+.BI "int io_queue_wait(io_context_t " ctx_id ", const struct timespec *" timeout ");"
 .fi
 .SH DESCRIPTION
-Attempts to read  an event from
-the completion queue for the aio_context specified by ctx_id.
+Attempts to read an event from
+the completion queue for the aio_context specified by \fIctx_id\fP.
 .SH "RETURN VALUES"
 May return
-0 if no events are available and the timeout specified
+\fI0\fP if no events are available and the timeout specified
 by when has elapsed, where when == NULL specifies an infinite
-timeout.  Note that the timeout pointed to by when is relative and
+\fItimeout\fP. Note that the \fItimeout\fP pointed to by when is relative and
 will be updated if not NULL and the operation blocks.  Will fail
-with -ENOSYS if not implemented.
+with -\fBENOSYS\fP if not implemented.
 .SH "RETURN VALUES"
 On success,
 .B io_queue_wait
-returns 0.  Otherwise, -error is return, where
+returns \fI0\fP. Otherwise, -error is return, where
 error is one of the Exxx values defined in the Errors section.
 .SH ERRORS
 .TP
@@ -33,24 +33,24 @@ error is one of the Exxx values defined in the Errors section.
 referenced data outside of the program's accessible address space.
 .TP
 .B EINVAL
-.I ctx 
-refers to an unitialized aio context, the iocb pointed to by
+.I ctx_id
+refers to an uninitialized aio context, the \fIiocb\fP pointed to by
 .I iocbs 
-contains an improperly initialized iocb,
+contains an improperly initialized iocb.
 .TP
 .B ENOSYS 
-Not implemented
+Not implemented.
 .SH "SEE ALSO"
-.BR io(3),
-.BR io_cancel(3),
-.BR io_fsync(3),
-.BR io_getevents(3),
-.BR io_prep_fsync(3),
-.BR io_prep_pread(3),
-.BR io_prep_pwrite(3),
-.BR io_queue_init(3),
-.BR io_queue_release(3),
-.BR io_queue_run(3),
-.BR io_set_callback(3),
-.BR io_submit(3),
-.BR errno(3)
+.BR io (3),
+.BR io_cancel (3),
+.BR io_fsync (3),
+.BR io_getevents (3),
+.BR io_prep_fsync (3),
+.BR io_prep_pread (3),
+.BR io_prep_pwrite (3),
+.BR io_queue_init (3),
+.BR io_queue_release (3),
+.BR io_queue_run (3),
+.BR io_set_callback (3),
+.BR io_submit (3),
+.BR errno (3).
diff --git a/man/io_set_callback.3 b/man/io_set_callback.3
index a8ca789..2ea4a74 100644
--- a/man/io_set_callback.3
+++ b/man/io_set_callback.3
@@ -1,8 +1,8 @@
-./"static inline void io_set_callback(struct iocb *iocb, io_callback_t cb)
-.TH io_set_callback 3 2002-09-12 "Linux 2.4" Linux AIO"
+.\"static inline void io_set_callback(struct iocb *iocb, io_callback_t cb)
+.TH io_set_callback 3 2009-06-10 "Linux 2.4" Linux AIO"
 .SH NAME
 io_set_callback \- Set up io completion callback function
-.SH SYNOPSYS
+.SH SYNOPSIS
 .nf
 .B #include <errno.h>
 .br
@@ -10,7 +10,7 @@ io_set_callback \- Set up io completion callback function
 .B #include <libaio.h>
 .br
 .sp
-.BI "static inline void io_set_callback(struct iocb *iocb, io_callback_t cb)"
+.BI "static inline void io_set_callback(struct iocb *" iocb ", io_callback_t " cb ");"
 .sp
 struct iocb {
 	void		*data;
@@ -25,20 +25,22 @@ typedef void (*io_callback_t)(io_context_t ctx, struct iocb *iocb, long res, lon
 .fi
 .SH DESCRIPTION
 The callback is not done if the caller uses raw events from 
-io_getevents, only with the library helpers
+\fBio_getevents\fP, only with the library helpers.
 .SH "RETURN VALUES"
+None.
 .SH ERRORS
+None.
 .SH "SEE ALSO"
-.BR io(3),
-.BR io_cancel(3),
-.BR io_fsync(3),
-.BR io_getevents(3),
-.BR io_prep_fsync(3),
-.BR io_prep_pread(3),
-.BR io_prep_pwrite(3),
-.BR io_queue_init(3),
-.BR io_queue_release(3),
-.BR io_queue_run(3),
-.BR io_queue_wait(3),
-.BR io_submit(3),
-.BR errno(3)
+.BR io (3),
+.BR io_cancel (3),
+.BR io_fsync (3),
+.BR io_getevents (3),
+.BR io_prep_fsync (3),
+.BR io_prep_pread (3),
+.BR io_prep_pwrite (3),
+.BR io_queue_init (3),
+.BR io_queue_release (3),
+.BR io_queue_run (3),
+.BR io_queue_wait (3),
+.BR io_submit (3),
+.BR errno (3).
diff --git a/man/io_submit.3 b/man/io_submit.3
index b6966ef..ac73fd7 100644
--- a/man/io_submit.3
+++ b/man/io_submit.3
@@ -1,16 +1,16 @@
-./"/* sys_io_submit:
-./" *      Queue the nr iocbs pointed to by iocbpp for processing.  Returns
-./" *      the number of iocbs queued.  May return -EINVAL if the aio_context
-./" *      specified by ctx_id is invalid, if nr is < 0, if the iocb at
-./" *      *iocbpp[0] is not properly initialized, if the operation specified
-./" *      is invalid for the file descriptor in the iocb.  May fail with
-./" *      -EFAULT if any of the data structures point to invalid data.  May
-./" *      fail with -EBADF if the file descriptor specified in the first
-./" *      iocb is invalid.  May fail with -EAGAIN if insufficient resources
-./" *      are available to queue any iocbs.  Will return 0 if nr is 0.  Will
-./" *      fail with -ENOSYS if not implemented.
-./" */
-.TH io_submit 2 2002-09-02 "Linux 2.4" "Linux AIO"
+.\"/* sys_io_submit:
+.\" *      Queue the nr iocbs pointed to by iocbpp for processing.  Returns
+.\" *      the number of iocbs queued.  May return -EINVAL if the aio_context
+.\" *      specified by ctx_id is invalid, if nr is < 0, if the iocb at
+.\" *      *iocbpp[0] is not properly initialized, if the operation specified
+.\" *      is invalid for the file descriptor in the iocb.  May fail with
+.\" *      -EFAULT if any of the data structures point to invalid data.  May
+.\" *      fail with -EBADF if the file descriptor specified in the first
+.\" *      iocb is invalid.  May fail with -EAGAIN if insufficient resources
+.\" *      are available to queue any iocbs.  Will return 0 if nr is 0.  Will
+.\" *      fail with -ENOSYS if not implemented.
+.\" */
+.TH io_submit 2 2009-06-10 "Linux 2.4" "Linux AIO"
 .SH NAME
 io_submit \- Submit io requests
 .SH SYNOPSIS
@@ -49,12 +49,12 @@ gets the
 .IR "nr"
 requests from the array pointed to
 by 
-.IR "iocbs"
-.  The operation to be performed is determined by the
+.IR "iocbs" .
+The operation to be performed is determined by the
 .IR "aio_lio_opcode"
 member in each element of 
-.IR "iocbs"
-.  If this
+.IR "iocbs" .
+If this
 field is 
 .B "IO_CMD_PREAD"
 a read operation is enqueued, similar to a call
@@ -110,7 +110,7 @@ referenced data outside of the program's accessible address space.
 .TP
 .B EINVAL
 .I ctx
-refers to an unitialized aio context, the iocb pointed to by 
+refers to an uninitialized aio context, the iocb pointed to by
 .I iocbs
 contains an improperly initialized iocb, 
 .TP
@@ -120,16 +120,16 @@ The iocb contains a file descriptor that does not exist.
 .B EINVAL
 The file specified in the iocb does not support the given io operation.
 .SH "SEE ALSO"
-.BR io(3),
-.BR io_cancel(3),
-.BR io_fsync(3),
-.BR io_getevents(3),
-.BR io_prep_fsync(3),
-.BR io_prep_pread(3),
-.BR io_prep_pwrite(3),
-.BR io_queue_init(3),
-.BR io_queue_release(3),
-.BR io_queue_run(3),
-.BR io_queue_wait(3),
-.BR io_set_callback(3),
-.BR errno(3)
+.BR io (3),
+.BR io_cancel (3),
+.BR io_fsync (3),
+.BR io_getevents (3),
+.BR io_prep_fsync (3),
+.BR io_prep_pread (3),
+.BR io_prep_pwrite (3),
+.BR io_queue_init (3),
+.BR io_queue_release (3),
+.BR io_queue_run (3),
+.BR io_queue_wait (3),
+.BR io_set_callback (3),
+.BR errno (3).
diff --git a/src/Makefile b/src/Makefile
index 37ae219..8554d3c 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,6 +1,8 @@
+DESTDIR=
 prefix=/usr
 includedir=$(prefix)/include
 libdir=$(prefix)/lib
+usrlibdir=$(prefix)/lib
 
 CFLAGS ?= -g -fomit-frame-pointer -O2
 CFLAGS += -Wall -I. -fPIC
@@ -58,12 +60,12 @@ $(libname): $(libaio_sobjs) libaio.map
 	$(CC) $(SO_CFLAGS) -Wl,--version-script=libaio.map -Wl,-soname=$(soname) -o $@ $(libaio_sobjs) $(LINK_FLAGS)
 
 install: $(all_targets)
-	install -D -m 644 libaio.h $(includedir)/libaio.h
-	install -D -m 644 libaio.a $(libdir)/libaio.a
+	install -D -m 644 libaio.h $(DESTDIR)$(includedir)/libaio.h
+	install -D -m 644 libaio.a $(DESTDIR)$(usrlibdir)/libaio.a
 ifeq ($(ENABLE_SHARED),1)
-	install -D -m 755 $(libname) $(libdir)/$(libname)
-	ln -sf $(libname) $(libdir)/$(soname)
-	ln -sf $(libname) $(libdir)/libaio.so
+	install -D -m 644 $(libname) $(DESTDIR)$(libdir)/$(libname)
+	ln -sfr $(DESTDIR)$(libdir)/$(libname) $(DESTDIR)$(libdir)/$(soname)
+	ln -sfr $(DESTDIR)$(libdir)/$(libname) $(DESTDIR)$(usrlibdir)/libaio.so
 endif
 
 $(libaio_objs): libaio.h
diff --git a/src/libaio.h b/src/libaio.h
index 2bc24e0..fdbab20 100644
--- a/src/libaio.h
+++ b/src/libaio.h
@@ -52,7 +52,9 @@ typedef enum io_iocb_cmd {
 
 /* little endian, 32 bits */
 #if defined(__i386__) || (defined(__arm__) && !defined(__ARMEB__)) || \
-    defined(__sh__) || defined(__bfin__) || defined(__MIPSEL__) || \
+    (defined(__sh__) && defined(__LITTLE_ENDIAN__)) || \
+    defined(__bfin__) || \
+    (defined(__MIPSEL__) && !defined(__mips64)) || \
     defined(__cris__) || (defined(__riscv) && __riscv_xlen == 32) || \
     (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
          __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ && __SIZEOF_LONG__ == 4)
@@ -61,7 +63,8 @@ typedef enum io_iocb_cmd {
 #define PADDEDul(x, y)	unsigned long x; unsigned y
 
 /* little endian, 64 bits */
-#elif defined(__ia64__) || defined(__x86_64__) || defined(__alpha__) || \
+#elif defined(__ia64__) || defined(__x86_64__) || defined(__alpha__) || defined(__e2k__) || \
+      (defined(__mips64) && defined(__MIPSEL__)) || \
       (defined(__aarch64__) && defined(__AARCH64EL__)) || \
       (defined(__riscv) && __riscv_xlen == 64) || \
       (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
@@ -72,7 +75,9 @@ typedef enum io_iocb_cmd {
 
 /* big endian, 64 bits */
 #elif defined(__powerpc64__) || defined(__s390x__) || \
+      (defined(__hppa__) && defined(__arch64__)) || \
       (defined(__sparc__) && defined(__arch64__)) || \
+      (defined(__mips64) && defined(__MIPSEB__)) || \
       (defined(__aarch64__) && defined(__AARCH64EB__)) || \
       (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
            __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ && __SIZEOF_LONG__ == 8)
@@ -83,6 +88,7 @@ typedef enum io_iocb_cmd {
 /* big endian, 32 bits */
 #elif defined(__PPC__) || defined(__s390__) || \
       (defined(__arm__) && defined(__ARMEB__)) || \
+      (defined(__sh__) && defined (__BIG_ENDIAN__)) || \
       defined(__sparc__) || defined(__MIPSEB__) || defined(__m68k__) || \
       defined(__hppa__) || defined(__frv__) || defined(__avr32__) || \
       (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
diff --git a/src/syscall-m68k.h b/src/syscall-m68k.h
new file mode 100644
index 0000000..2dd4a9b
--- /dev/null
+++ b/src/syscall-m68k.h
@@ -0,0 +1,5 @@
+#define __NR_io_setup		241
+#define __NR_io_destroy		242
+#define __NR_io_getevents	243
+#define __NR_io_submit		244
+#define __NR_io_cancel		245
diff --git a/src/syscall-mips.h b/src/syscall-mips.h
new file mode 100644
index 0000000..2c4245e
--- /dev/null
+++ b/src/syscall-mips.h
@@ -0,0 +1,54 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 1995, 96, 97, 98, 99, 2000 by Ralf Baechle
+ * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
+ */
+
+#ifndef _MIPS_SIM_ABI32
+#define _MIPS_SIM_ABI32			1
+#define _MIPS_SIM_NABI32		2
+#define _MIPS_SIM_ABI64			3
+#endif
+
+#if _MIPS_SIM == _MIPS_SIM_ABI32
+
+/*
+ * Linux o32 style syscalls are in the range from 4000 to 4999.
+ */
+#define __NR_Linux			4000
+#define __NR_io_setup			(__NR_Linux + 241)
+#define __NR_io_destroy			(__NR_Linux + 242)
+#define __NR_io_getevents		(__NR_Linux + 243)
+#define __NR_io_submit			(__NR_Linux + 244)
+#define __NR_io_cancel			(__NR_Linux + 245)
+
+#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
+
+#if _MIPS_SIM == _MIPS_SIM_ABI64
+
+/*
+ * Linux 64-bit syscalls are in the range from 5000 to 5999.
+ */
+#define __NR_Linux			5000
+#define __NR_io_setup			(__NR_Linux + 200)
+#define __NR_io_destroy			(__NR_Linux + 201)
+#define __NR_io_getevents		(__NR_Linux + 202)
+#define __NR_io_submit			(__NR_Linux + 203)
+#define __NR_io_cancel			(__NR_Linux + 204)
+#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
+
+#if _MIPS_SIM == _MIPS_SIM_NABI32
+
+/*
+ * Linux N32 syscalls are in the range from 6000 to 6999.
+ */
+#define __NR_Linux			6000
+#define __NR_io_setup			(__NR_Linux + 200)
+#define __NR_io_destroy			(__NR_Linux + 201)
+#define __NR_io_getevents		(__NR_Linux + 202)
+#define __NR_io_submit			(__NR_Linux + 203)
+#define __NR_io_cancel			(__NR_Linux + 204)
+#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
diff --git a/src/syscall-parisc.h b/src/syscall-parisc.h
new file mode 100644
index 0000000..252dccb
--- /dev/null
+++ b/src/syscall-parisc.h
@@ -0,0 +1,6 @@
+#define __NR_Linux                0
+#define __NR_io_setup           (__NR_Linux + 215)
+#define __NR_io_destroy         (__NR_Linux + 216)
+#define __NR_io_getevents       (__NR_Linux + 217)
+#define __NR_io_submit          (__NR_Linux + 218)
+#define __NR_io_cancel          (__NR_Linux + 219)
diff --git a/src/syscall-sh.h b/src/syscall-sh.h
new file mode 100644
index 0000000..6c00573
--- /dev/null
+++ b/src/syscall-sh.h
@@ -0,0 +1,6 @@
+/* Copy from ./arch/sh/include/asm/unistd_32.h */
+#define __NR_io_setup       245
+#define __NR_io_destroy     246
+#define __NR_io_getevents   247
+#define __NR_io_submit      248
+#define __NR_io_cancel      249
diff --git a/src/syscall-x86_64.h b/src/syscall-x86_64.h
index 0eccef3..fc2dd98 100644
--- a/src/syscall-x86_64.h
+++ b/src/syscall-x86_64.h
@@ -1,6 +1,18 @@
+#ifndef __NR_io_setup
 #define __NR_io_setup		206
+#endif
+#ifndef __NR_io_destroy
 #define __NR_io_destroy		207
+#endif
+#ifndef __NR_io_getevents
 #define __NR_io_getevents	208
+#endif
+#ifndef __NR_io_submit
 #define __NR_io_submit		209
+#endif
+#ifndef __NR_io_cancel
 #define __NR_io_cancel		210
+#endif
+#ifndef __NR_io_pgetevents
 #define __NR_io_pgetevents	333
+#endif
diff --git a/src/syscall.h b/src/syscall.h
index b53da4c..b86d745 100644
--- a/src/syscall.h
+++ b/src/syscall.h
@@ -27,6 +27,14 @@
 #include "syscall-arm.h"
 #elif defined(__sparc__)
 #include "syscall-sparc.h"
+#elif defined(__m68k__)
+#include "syscall-m68k.h"
+#elif defined(__hppa__)
+#include "syscall-parisc.h"
+#elif defined(__mips__)
+#include "syscall-mips.h"
+#elif defined(__sh__)
+#include "syscall-sh.h"
 #elif defined(__aarch64__) || defined(__riscv)
 #include "syscall-generic.h"
 #else
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009