--- libaio-0.3.107.orig/debian/libaio-dev.manpages +++ libaio-0.3.107/debian/libaio-dev.manpages @@ -0,0 +1,9 @@ +man/io.3 +man/io_fsync.3 +man/io_prep_*.3 +man/io_queue_*.3 +man/io_set_*.3 +man/aio.3 +man/aio_init.3 +man/aio*64.3 +man/lio*.3 --- libaio-0.3.107.orig/debian/changelog +++ libaio-0.3.107/debian/changelog @@ -0,0 +1,266 @@ +libaio (0.3.107-1ubuntu1) intrepid; urgency=low + + * Merge from debian unstable, remaining changes: + - Set package priority to optional. + - libaio1: Add conflicts and replaces. + - Build packages on lpia as well. + - debian/patches/90_ppc-name-clashing.patch: Avoid name clashing. + - debian/patches/91_ubuntu_arches.patch: More Ubuntu arches support. + - Move Vcs-* fields to XS-Original-Vcs-* ditto. + + -- Soren Hansen Wed, 25 Jun 2008 18:56:08 +0200 + +libaio (0.3.107-1) unstable; urgency=low + + * New upstream release. + * Run the test suite on install, and support nocheck DEB_BUILD_OPTIONS + to disable it. + + -- Guillem Jover Tue, 24 Jun 2008 09:03:54 +0300 + +libaio (0.3.106-9) unstable; urgency=low + + * Fix misspelled words (linux -> Linux and aio -> AIO). + * Update packaging Vcs fields to the new URL. + * Improve debian/copyright: + - Change 'Copyright Holder' to 'Copyright Holders'. + - Use UTF-8 copyright sign. + - Update upstream download url. + - Refer to LGPL-2.1 from common-licenses instead of just LGPL. + * Add a debian/README.source file. + * Now using Standards-Version 3.8.0. + * Refresh patches with -pab. (Closes: #484962) + * Update watch file URL. (Closes: #450017) + + -- Guillem Jover Sun, 22 Jun 2008 07:42:52 +0300 + +libaio (0.3.106-8ubuntu1) hardy; urgency=low + + * Merge from debian unstable, remaining changes: + - Set package priority to optional. + - libaio1: Add conflicts and replaces. + - Build packages on lpia as well. + - debian/patches/90_ppc-name-clashing.patch: Avoid name clashing. + - debian/patches/91_ubuntu_arches.patch: More Ubuntu arches support. + - DebianMaintainerField. + * Move Vcs-* fields to XSBC-Original-Vcs-* ditto. + + -- Soren Hansen Tue, 11 Dec 2007 15:52:47 +0100 + +libaio (0.3.106-8) unstable; urgency=low + + * Install shared library under /lib, needed by multipath binaries which + reside under /sbin. (Closes: #441244) + - debian/patches/02_libdevdir.patch: New file. + * Add a debugging symbols library package. + * Add Vcs-Browser and Vcs-Git fields. + + -- Guillem Jover Tue, 11 Sep 2007 04:29:22 +0300 + +libaio (0.3.106-7) unstable; urgency=low + + * Add a new library udeb needed for multipath support. (Closes: #440320) + + -- Guillem Jover Thu, 06 Sep 2007 03:11:08 +0300 + +libaio (0.3.106-6) unstable; urgency=low + + * Link against libgcc to avoid unresolved symbols on at least hppa. + - debian/01_link_libgcc.patch: New file. + Thanks to Steve Langasek for the analysis. + * Add shlibs:Depends substvar back into libaio1 Depends, since we link + against an external library now (although it might not be used on any + architecture). + + -- Guillem Jover Mon, 06 Aug 2007 04:50:18 +0300 + +libaio (0.3.106-5ubuntu2) gutsy; urgency=low + + * Build packages on lpia as well. + + -- Adam Conrad Thu, 16 Aug 2007 21:28:32 +1000 + +libaio (0.3.106-5ubuntu1) gutsy; urgency=low + + * Merge with Debian; remaining changes: + - Set package priority to optional. + - libaio1: Add depends, conflicts, replaces. + - debian/patches/90_ppc-name-clashing.patch: Avoid name clashing. + - debian/patches/91_ubuntu_arches.patch: More Ubuntu arches support. + + -- Matthias Klose Fri, 20 Jul 2007 11:17:40 +0200 + +libaio (0.3.106-5) unstable; urgency=low + + * Do not ignore 'make clean' errors on clean. + * Support build-arch and build-indep in debian/rules: + - Rename install to install-arch. + - Rename build to build-arch. + - Add an empty build target that depends on build-arch and build-indep. + * Switch directory variables to simply expanded ones in debian/rules. + * Use binary:Version instead of the deprecated Source-Version substvar. + * Remove Tag field as it does not seem to make much sense to include it + in the packages. + + -- Guillem Jover Tue, 17 Jul 2007 09:19:26 +0300 + +libaio (0.3.106-4ubuntu1) gutsy; urgency=low + + * Merge with Debian, including all changes left out in earlier merges; + remaining changes: + - Set package priority to optional. + - libaio1: Add depends, conflicts, replaces. + - debian/patches/90_ppc-name-clashing.patch: Avoid name clashing. + - debian/patches/91_ubuntu_arches.patch: More Ubuntu arches support. + + -- Matthias Klose Thu, 24 May 2007 10:52:08 +0200 + +libaio (0.3.106-4) unstable; urgency=low + + * Add armeb and armel to the Architecture fields. + + -- Guillem Jover Fri, 19 Jan 2007 06:48:26 +0200 + +libaio (0.3.106-3ubuntu2) feisty; urgency=low + + * Rebuild for changes in the amd64 toolchain. + * Set Ubuntu maintainer address. + + -- Matthias Klose Mon, 5 Mar 2007 01:19:47 +0000 + +libaio (0.3.106-3ubuntu1) feisty; urgency=low + + * Merge parisc support from debian sid. + * Drop all the other debian changes. + + -- Fabio M. Di Nitto Tue, 14 Nov 2006 17:33:32 -0800 + +libaio (0.3.106-3) unstable; urgency=low + + * Fix a typo in the arm io_syscall5 macro, making the library end up + with unresolvable symbols. (Closes: #393156) + Thanks to Marcin Juszkiewicz . + + -- Guillem Jover Mon, 16 Oct 2006 10:44:02 +0300 + +libaio (0.3.106-2) unstable; urgency=low + + * Use quilt for patching: + - Add new debian/patches/series file. + - Add Build-Depends on 'quilt (>= 0.40)'. + - Include quilt.make from debian/rules. + * Add support for arm, hppa, m68k, mips, mipsel and sparc. Those have yet + to be tested with the harness test suite and pass it. + * Add a Tag: field to all binary packages. + + -- Guillem Jover Tue, 19 Sep 2006 00:48:10 +0300 + +libaio (0.3.106-1) unstable; urgency=low + + * New Upstream Release. (Closes: #384268) + - Fix .endp being outside of procedure on ia64 with new binutils. + (Closes: #385373) + + -- Guillem Jover Fri, 1 Sep 2006 05:51:36 +0300 + +libaio (0.3.106-0ubuntu1) edgy; urgency=low + + * New upstream release. + + -- Fabio M. Di Nitto Wed, 12 Jul 2006 10:48:45 +0200 + +libaio (0.3.104-2) unstable; urgency=low + + * New Maintainer. + * Provide a new binary package libaio-dev, with the static library + the .so symlink and the manpages. (Closes: #318795) + * Add debian/libaio-dev.install. + * Add debian/libaio-dev.manpages. + * Rename the binary package libaio to libaio1 to match the soname, no + transition package as no one depends on it. + * Rename debian/lintian.override to debian/libaio1.lintian. + * Remove shlib-missing-in-control-file lintian override as we provide + now the shlibs file. + * Only put "usr/share/lintian/override" in libaio1.dirs. + * Remove temporal debhelper leftover files: + - debian/libaio-0.3.104.postinst.debhelper + - debian/libaio-0.3.104.postrm.debhelper + * Add amd64 to the Architecture fields. (Closes: #335352) + * Switch to debhelper compat level 5. + * Now using Standards-Version 3.7.2. + * Change Priority from optional to extra. + * Specify in the package description that this library is for Linux. + * Remove unneeded debian/dirs file. + * Remove debian/debianize.patch, we actually want the .so symlink + and the .a library when doing "make install". + * Clean up debian/rules: + - Do not use stamp files. + - Remove unused comments. + - Remove unused configure target. + - Do not pass DESTDIR to make as it is not using it. + * Complete debian/copyright: + - Add copyright holder information. + - Add the LGPL license snippet. + - Specify a download url which actually works. + * Add a watch file. + + -- Guillem Jover Thu, 24 Aug 2006 05:45:36 +0300 + +libaio (0.3.104-1ubuntu6) dapper; urgency=low + + The "MOMMY MOMMY! David scares the hell out of me!" release. + + * Add support for sparc and sparc64. + + Thanks to David S. Miller for an 11KB asm patch that he + wrote/tested/smashed in LESS than 8 minutes! (including + the MTA times to deliver to my inbox.. go figure). + + -- Fabio M. Di Nitto Thu, 02 Mar 2006 09:40:20 +0100 + +libaio (0.3.104-1ubuntu5) dapper; urgency=low + + * Ship libaio1.shlibs. Thanks Kyle for noticing it! + + -- Fabio M. Di Nitto Wed, 04 Jan 2006 07:25:25 +0100 + +libaio (0.3.104-1ubuntu4) breezy; urgency=low + + * Apply patch from upstream CVS to fix FTBFS on ia64. + + -- Fabio M. Di Nitto Tue, 16 Aug 2005 13:27:56 +0200 + +libaio (0.3.104-1ubuntu3) breezy; urgency=low + + * Apply patch to syscall-ppc.h to avoid name clashing. + (Thanks to Christoph Hellwig) + + -- Fabio M. Di Nitto Tue, 16 Aug 2005 11:35:27 +0200 + +libaio (0.3.104-1ubuntu2) breezy; urgency=low + + * Switch to Architecture: any. + + -- Fabio M. Di Nitto Tue, 26 Jul 2005 05:59:06 +0200 + +libaio (0.3.104-1ubuntu1) breezy; urgency=low + + * Package cleanup: + - Bump compat to version 4. + - Split libaio in libaio1 and libaio-dev (Policy compliant). + - Make libaio1 C/R/P with libaio (Due to package renaming). + - Make libaio1 Depends: ${shlibs:Depends} + - Remove unneeded debian/debianize.patch. + - Update debian/* to reflect package split up. + - Remove debian/ leftovers. + - Do not install lintian overrides (package is lintian clean). + - Patch src/Makefile to make the library shared. + + -- Fabio M. Di Nitto Mon, 25 Jul 2005 15:10:11 +0200 + +libaio (0.3.104-1) unstable; urgency=low + + * Initial Release. + + -- William Lee Irwin III Fri, 22 Apr 2005 14:49:28 -0700 + --- libaio-0.3.107.orig/debian/docs +++ libaio-0.3.107/debian/docs @@ -0,0 +1 @@ +TODO --- libaio-0.3.107.orig/debian/copyright +++ libaio-0.3.107/debian/copyright @@ -0,0 +1,32 @@ +This package was debianized by William Lee Irwin III on +Fri, 22 Apr 2005 14:49:28 -0700. + +Currently maintained by Guillem Jover . + +It was downloaded from: + + cvs -d :pserver:anonymous@rhlinux.redhat.com:/usr/local/CVS co libaio + +Copyright Holders: + + Copyright © 2002-2003 Benjamin LaHaise + Copyright © 2003-2004 Jeff Moyer + +License: + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU Lesser General +Public License can be found in '/usr/share/common-licenses/LGPL-2.1'. --- libaio-0.3.107.orig/debian/watch +++ libaio-0.3.107/debian/watch @@ -0,0 +1,3 @@ +# Site Directory Pattern Version Script +version=3 +http://download.fedoraproject.org/pub/fedora/linux/development/source/SRPMS/ libaio-([\d\.]+)-[\d\.]+\.src.rpm debian uupdate --- libaio-0.3.107.orig/debian/compat +++ libaio-0.3.107/debian/compat @@ -0,0 +1 @@ +5 --- libaio-0.3.107.orig/debian/libaio1.dirs +++ libaio-0.3.107/debian/libaio1.dirs @@ -0,0 +1 @@ +usr/share/lintian/overrides --- libaio-0.3.107.orig/debian/libaio-dev.install +++ libaio-0.3.107/debian/libaio-dev.install @@ -0,0 +1,3 @@ +usr/include +usr/lib/lib*.so +usr/lib/lib*.a --- libaio-0.3.107.orig/debian/libaio1.lintian +++ libaio-0.3.107/debian/libaio1.lintian @@ -0,0 +1 @@ +libaio1: shared-lib-without-dependency-information ./lib/libaio.so.1.0.1 --- libaio-0.3.107.orig/debian/rules +++ libaio-0.3.107/debian/rules @@ -0,0 +1,84 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +lib := libaio1 +libdbg := $(lib)-dbg +libudeb := $(lib)-udeb +libdev := libaio-dev + +include /usr/share/quilt/quilt.make + +build-indep: + +build-arch: patch + dh_testdir + + $(MAKE) + +build: build-indep build-arch + +clean: unpatch + dh_testdir + dh_testroot + + [ ! -f Makefile ] || $(MAKE) clean + + dh_clean + +check-arch: build-arch + dh_testdir + +ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) + $(MAKE) partcheck +endif + +install-arch: check-arch + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + $(MAKE) install \ + DESTDIR=$(CURDIR)/debian/tmp \ + libdir=/lib + + install -D -m 644 debian/$(lib).lintian \ + $(CURDIR)/debian/$(lib)/usr/share/lintian/overrides/$(lib) + +binary: binary-indep binary-arch + +binary-indep: + # Nothing to do. + +binary-arch: install-arch + dh_testdir + dh_testroot + dh_install --sourcedir=$(CURDIR)/debian/tmp + dh_installchangelogs ChangeLog + dh_installdocs + dh_installexamples + dh_installman + dh_link + dh_strip --dbg-package=$(libdbg) + dh_compress + dh_fixperms + dh_makeshlibs --add-udeb '$(libudeb)' + dh_shlibdeps + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +.PHONY: clean build-indep build-arch build +.PHONY: install-arch binary-indep binary-arch binary + --- libaio-0.3.107.orig/debian/libaio1-udeb.install +++ libaio-0.3.107/debian/libaio1-udeb.install @@ -0,0 +1 @@ +lib/lib*.so.* --- libaio-0.3.107.orig/debian/libaio1.install +++ libaio-0.3.107/debian/libaio1.install @@ -0,0 +1 @@ +lib/lib*.so.* --- libaio-0.3.107.orig/debian/README.source +++ libaio-0.3.107/debian/README.source @@ -0,0 +1,3 @@ +This package uses quilt to manage all modifications to the upstream +source. Please refer to /usr/share/doc/quilt/README.source for more +information. --- libaio-0.3.107.orig/debian/control +++ libaio-0.3.107/debian/control @@ -0,0 +1,48 @@ +Source: libaio +Maintainer: Ubuntu Core Developers +XSBC-Original-Maintainer: Guillem Jover +Priority: optional +Section: libs +XS-Original-Vcs-Browser: http://git.hadrons.org/?p=debian/pkgs/libaio.git +XS-Original-Vcs-Git: git://git.hadrons.org/debian/pkgs/libaio.git +Build-Depends: debhelper (>= 5), quilt (>= 0.40) +Standards-Version: 3.8.0 + +Package: libaio1 +Architecture: i386 amd64 ia64 s390 alpha powerpc arm armeb armel hppa lpia m68k mips mipsel sparc +Depends: ${shlibs:Depends} +Conflicts: libaio +Replaces: libaio +Description: Linux kernel AIO access library - shared library + This library enables userspace to use Linux kernel asynchronous I/O + system calls, important for the performance of databases and other + advanced applications. + +Package: libaio1-udeb +XB-Package-Type: udeb +Section: debian-installer +Architecture: i386 amd64 ia64 s390 alpha powerpc arm armeb armel hppa lpia m68k mips mipsel sparc +Depends: ${shlibs:Depends} +Description: Linux kernel AIO access library - shared library + This library enables userspace to use Linux kernel asynchronous I/O + system calls, important for the performance of databases and other + advanced applications. + +Package: libaio1-dbg +Section: libdevel +Architecture: i386 amd64 ia64 s390 alpha powerpc arm armeb armel hppa lpia m68k mips mipsel sparc +Depends: libaio1 (= ${binary:Version}) +Description: Linux kernel AIO access library - debugging symbols + This library enables userspace to use Linux kernel asynchronous I/O + system calls, important for the performance of databases and other + advanced applications. + +Package: libaio-dev +Section: libdevel +Architecture: i386 amd64 ia64 s390 alpha powerpc arm armeb armel hppa lpia m68k mips mipsel sparc +Depends: libaio1 (= ${binary:Version}) +Description: Linux kernel AIO access library - development files + This library enables userspace to use Linux kernel asynchronous I/O + system calls, important for the performance of databases and other + advanced applications. + --- libaio-0.3.107.orig/debian/patches/02_libdevdir.patch +++ libaio-0.3.107/debian/patches/02_libdevdir.patch @@ -0,0 +1,60 @@ +Index: b/Makefile +=================================================================== +--- a/Makefile ++++ b/Makefile +@@ -5,9 +5,11 @@ RELEASE=$(shell awk '/Release:/ { print + CVSTAG = $(NAME)_$(subst .,-,$(VERSION))_$(subst .,-,$(RELEASE)) + RPMBUILD=$(shell `which rpmbuild >&/dev/null` && echo "rpmbuild" || echo "rpm") + ++DESTDIR= + prefix=/usr + includedir=$(prefix)/include + libdir=$(prefix)/lib ++libdevdir=$(prefix)/lib + + default: all + +@@ -15,7 +17,12 @@ all: + @$(MAKE) -C src + + install: +- @$(MAKE) -C src install prefix=$(prefix) includedir=$(includedir) libdir=$(libdir) ++ @$(MAKE) -C src install \ ++ DESTDIR=$(DESTDIR) \ ++ prefix=$(prefix) \ ++ includedir=$(includedir) \ ++ libdir=$(libdir) \ ++ libdevdir=$(libdevdir) + + check: + @$(MAKE) -C harness check +Index: b/src/Makefile +=================================================================== +--- a/src/Makefile ++++ b/src/Makefile +@@ -1,6 +1,8 @@ ++DESTDIR= + prefix=/usr + includedir=$(prefix)/include + libdir=$(prefix)/lib ++libdevdir=$(prefix)/lib + + ARCH := $(shell uname -m | sed -e s/i.86/i386/) + CFLAGS := -nostdlib -nostartfiles -Wall -I. -g -fomit-frame-pointer -O2 -fPIC +@@ -51,11 +53,11 @@ $(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 755 $(libname) $(libdir)/$(libname) +- ln -sf $(libname) $(libdir)/$(soname) +- ln -sf $(libname) $(libdir)/libaio.so ++ install -D -m 644 libaio.h $(DESTDIR)$(includedir)/libaio.h ++ install -D -m 644 libaio.a $(DESTDIR)$(libdevdir)/libaio.a ++ install -D -m 755 $(libname) $(DESTDIR)$(libdir)/$(libname) ++ ln -sf $(libdir)/$(libname) $(DESTDIR)$(libdir)/$(soname) ++ ln -sf $(libdir)/$(libname) $(DESTDIR)$(libdevdir)/libaio.so + + $(libaio_objs): libaio.h + --- libaio-0.3.107.orig/debian/patches/series +++ libaio-0.3.107/debian/patches/series @@ -0,0 +1,5 @@ +00_arches.patch +01_link_libgcc.patch +02_libdevdir.patch +90_ppc-name-clashing.patch +91_ubuntu_arches.patch --- libaio-0.3.107.orig/debian/patches/00_arches.patch +++ libaio-0.3.107/debian/patches/00_arches.patch @@ -0,0 +1,784 @@ +Index: b/src/syscall-m68k.h +=================================================================== +--- /dev/null ++++ b/src/syscall-m68k.h +@@ -0,0 +1,78 @@ ++#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 ++ ++#define io_syscall1(type,fname,sname,atype,a) \ ++type fname(atype a) \ ++{ \ ++register long __res __asm__ ("%d0") = __NR_##sname; \ ++register long __a __asm__ ("%d1") = (long)(a); \ ++__asm__ __volatile__ ("trap #0" \ ++ : "+d" (__res) \ ++ : "d" (__a) ); \ ++return (type) __res; \ ++} ++ ++#define io_syscall2(type,fname,sname,atype,a,btype,b) \ ++type fname(atype a,btype b) \ ++{ \ ++register long __res __asm__ ("%d0") = __NR_##sname; \ ++register long __a __asm__ ("%d1") = (long)(a); \ ++register long __b __asm__ ("%d2") = (long)(b); \ ++__asm__ __volatile__ ("trap #0" \ ++ : "+d" (__res) \ ++ : "d" (__a), "d" (__b) \ ++ ); \ ++return (type) __res; \ ++} ++ ++#define io_syscall3(type,fname,sname,atype,a,btype,b,ctype,c) \ ++type fname(atype a,btype b,ctype c) \ ++{ \ ++register long __res __asm__ ("%d0") = __NR_##sname; \ ++register long __a __asm__ ("%d1") = (long)(a); \ ++register long __b __asm__ ("%d2") = (long)(b); \ ++register long __c __asm__ ("%d3") = (long)(c); \ ++__asm__ __volatile__ ("trap #0" \ ++ : "+d" (__res) \ ++ : "d" (__a), "d" (__b), \ ++ "d" (__c) \ ++ ); \ ++return (type) __res; \ ++} ++ ++#define io_syscall4(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d) \ ++type fname (atype a, btype b, ctype c, dtype d) \ ++{ \ ++register long __res __asm__ ("%d0") = __NR_##sname; \ ++register long __a __asm__ ("%d1") = (long)(a); \ ++register long __b __asm__ ("%d2") = (long)(b); \ ++register long __c __asm__ ("%d3") = (long)(c); \ ++register long __d __asm__ ("%d4") = (long)(d); \ ++__asm__ __volatile__ ("trap #0" \ ++ : "+d" (__res) \ ++ : "d" (__a), "d" (__b), \ ++ "d" (__c), "d" (__d) \ ++ ); \ ++return (type) __res; \ ++} ++ ++#define io_syscall5(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d,etype,e) \ ++type fname (atype a,btype b,ctype c,dtype d,etype e) \ ++{ \ ++register long __res __asm__ ("%d0") = __NR_##sname; \ ++register long __a __asm__ ("%d1") = (long)(a); \ ++register long __b __asm__ ("%d2") = (long)(b); \ ++register long __c __asm__ ("%d3") = (long)(c); \ ++register long __d __asm__ ("%d4") = (long)(d); \ ++register long __e __asm__ ("%d5") = (long)(e); \ ++__asm__ __volatile__ ("trap #0" \ ++ : "+d" (__res) \ ++ : "d" (__a), "d" (__b), \ ++ "d" (__c), "d" (__d), "d" (__e) \ ++ ); \ ++return (type) __res; \ ++} ++ +Index: b/src/syscall-sparc.h +=================================================================== +--- /dev/null ++++ b/src/syscall-sparc.h +@@ -0,0 +1,130 @@ ++/* $Id: unistd.h,v 1.74 2002/02/08 03:57:18 davem Exp $ */ ++ ++/* ++ * System calls under the Sparc. ++ * ++ * Don't be scared by the ugly clobbers, it is the only way I can ++ * think of right now to force the arguments into fixed registers ++ * before the trap into the system call with gcc 'asm' statements. ++ * ++ * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) ++ * ++ * SunOS compatibility based upon preliminary work which is: ++ * ++ * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu) ++ */ ++ ++ ++#define __NR_io_setup 268 ++#define __NR_io_destroy 269 ++#define __NR_io_submit 270 ++#define __NR_io_cancel 271 ++#define __NR_io_getevents 272 ++ ++ ++#define io_syscall1(type,fname,sname,type1,arg1) \ ++type fname(type1 arg1) \ ++{ \ ++long __res; \ ++register long __g1 __asm__ ("g1") = __NR_##sname; \ ++register long __o0 __asm__ ("o0") = (long)(arg1); \ ++__asm__ __volatile__ ("t 0x10\n\t" \ ++ "bcc 1f\n\t" \ ++ "mov %%o0, %0\n\t" \ ++ "sub %%g0, %%o0, %0\n\t" \ ++ "1:\n\t" \ ++ : "=r" (__res), "=&r" (__o0) \ ++ : "1" (__o0), "r" (__g1) \ ++ : "cc"); \ ++if (__res < -255 || __res >= 0) \ ++ return (type) __res; \ ++return -1; \ ++} ++ ++#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ ++type fname(type1 arg1,type2 arg2) \ ++{ \ ++long __res; \ ++register long __g1 __asm__ ("g1") = __NR_##sname; \ ++register long __o0 __asm__ ("o0") = (long)(arg1); \ ++register long __o1 __asm__ ("o1") = (long)(arg2); \ ++__asm__ __volatile__ ("t 0x10\n\t" \ ++ "bcc 1f\n\t" \ ++ "mov %%o0, %0\n\t" \ ++ "sub %%g0, %%o0, %0\n\t" \ ++ "1:\n\t" \ ++ : "=r" (__res), "=&r" (__o0) \ ++ : "1" (__o0), "r" (__o1), "r" (__g1) \ ++ : "cc"); \ ++if (__res < -255 || __res >= 0) \ ++ return (type) __res; \ ++return -1; \ ++} ++ ++#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ ++type fname(type1 arg1,type2 arg2,type3 arg3) \ ++{ \ ++long __res; \ ++register long __g1 __asm__ ("g1") = __NR_##sname; \ ++register long __o0 __asm__ ("o0") = (long)(arg1); \ ++register long __o1 __asm__ ("o1") = (long)(arg2); \ ++register long __o2 __asm__ ("o2") = (long)(arg3); \ ++__asm__ __volatile__ ("t 0x10\n\t" \ ++ "bcc 1f\n\t" \ ++ "mov %%o0, %0\n\t" \ ++ "sub %%g0, %%o0, %0\n\t" \ ++ "1:\n\t" \ ++ : "=r" (__res), "=&r" (__o0) \ ++ : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__g1) \ ++ : "cc"); \ ++if (__res < -255 || __res>=0) \ ++ return (type) __res; \ ++return -1; \ ++} ++ ++#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ ++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ ++{ \ ++long __res; \ ++register long __g1 __asm__ ("g1") = __NR_##sname; \ ++register long __o0 __asm__ ("o0") = (long)(arg1); \ ++register long __o1 __asm__ ("o1") = (long)(arg2); \ ++register long __o2 __asm__ ("o2") = (long)(arg3); \ ++register long __o3 __asm__ ("o3") = (long)(arg4); \ ++__asm__ __volatile__ ("t 0x10\n\t" \ ++ "bcc 1f\n\t" \ ++ "mov %%o0, %0\n\t" \ ++ "sub %%g0, %%o0, %0\n\t" \ ++ "1:\n\t" \ ++ : "=r" (__res), "=&r" (__o0) \ ++ : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__g1) \ ++ : "cc"); \ ++if (__res < -255 || __res>=0) \ ++ return (type) __res; \ ++return -1; \ ++} ++ ++#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ ++ type5,arg5) \ ++type fname(type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ ++{ \ ++long __res; \ ++register long __g1 __asm__ ("g1") = __NR_##sname; \ ++register long __o0 __asm__ ("o0") = (long)(arg1); \ ++register long __o1 __asm__ ("o1") = (long)(arg2); \ ++register long __o2 __asm__ ("o2") = (long)(arg3); \ ++register long __o3 __asm__ ("o3") = (long)(arg4); \ ++register long __o4 __asm__ ("o4") = (long)(arg5); \ ++__asm__ __volatile__ ("t 0x10\n\t" \ ++ "bcc 1f\n\t" \ ++ "mov %%o0, %0\n\t" \ ++ "sub %%g0, %%o0, %0\n\t" \ ++ "1:\n\t" \ ++ : "=r" (__res), "=&r" (__o0) \ ++ : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__o4), "r" (__g1) \ ++ : "cc"); \ ++if (__res < -255 || __res>=0) \ ++ return (type) __res; \ ++return -1; \ ++} ++ +Index: b/src/syscall.h +=================================================================== +--- a/src/syscall.h ++++ b/src/syscall.h +@@ -22,6 +22,16 @@ + #include "syscall-s390.h" + #elif defined(__alpha__) + #include "syscall-alpha.h" ++#elif defined(__arm__) ++#include "syscall-arm.h" ++#elif defined(__m68k__) ++#include "syscall-m68k.h" ++#elif defined(__sparc__) ++#include "syscall-sparc.h" ++#elif defined(__hppa__) ++#include "syscall-parisc.h" ++#elif defined(__mips__) ++#include "syscall-mips.h" + #else + #error "add syscall-arch.h" + #endif +Index: b/src/syscall-mips.h +=================================================================== +--- /dev/null ++++ b/src/syscall-mips.h +@@ -0,0 +1,223 @@ ++/* ++ * 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. ++ * ++ * Changed system calls macros _syscall5 - _syscall7 to push args 5 to 7 onto ++ * the stack. Robin Farine for ACN S.A, Copyright (C) 1996 by ACN S.A ++ */ ++ ++#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 */ ++ ++#define io_syscall1(type,fname,sname,atype,a) \ ++type fname(atype a) \ ++{ \ ++ register unsigned long __a0 asm("$4") = (unsigned long) a; \ ++ register unsigned long __a3 asm("$7"); \ ++ unsigned long __v0; \ ++ \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ "li\t$2, %3\t\t\t# " #fname "\n\t" \ ++ "syscall\n\t" \ ++ "move\t%0, $2\n\t" \ ++ ".set\treorder" \ ++ : "=&r" (__v0), "=r" (__a3) \ ++ : "r" (__a0), "i" (__NR_##sname) \ ++ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ ++ "memory"); \ ++ \ ++ if (__a3 == 0) \ ++ return (type) __v0; \ ++ return (type) -1; \ ++} ++ ++#define io_syscall2(type,fname,sname,atype,a,btype,b) \ ++type fname(atype a, btype b) \ ++{ \ ++ register unsigned long __a0 asm("$4") = (unsigned long) a; \ ++ register unsigned long __a1 asm("$5") = (unsigned long) b; \ ++ register unsigned long __a3 asm("$7"); \ ++ unsigned long __v0; \ ++ \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ "li\t$2, %4\t\t\t# " #fname "\n\t" \ ++ "syscall\n\t" \ ++ "move\t%0, $2\n\t" \ ++ ".set\treorder" \ ++ : "=&r" (__v0), "=r" (__a3) \ ++ : "r" (__a0), "r" (__a1), "i" (__NR_##sname) \ ++ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ ++ "memory"); \ ++ \ ++ if (__a3 == 0) \ ++ return (type) __v0; \ ++ return (type) -1; \ ++} ++ ++#define io_syscall3(type,fname,sname,atype,a,btype,b,ctype,c) \ ++type fname(atype a, btype b, ctype c) \ ++{ \ ++ register unsigned long __a0 asm("$4") = (unsigned long) a; \ ++ register unsigned long __a1 asm("$5") = (unsigned long) b; \ ++ register unsigned long __a2 asm("$6") = (unsigned long) c; \ ++ register unsigned long __a3 asm("$7"); \ ++ unsigned long __v0; \ ++ \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ "li\t$2, %5\t\t\t# " #fname "\n\t" \ ++ "syscall\n\t" \ ++ "move\t%0, $2\n\t" \ ++ ".set\treorder" \ ++ : "=&r" (__v0), "=r" (__a3) \ ++ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname) \ ++ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ ++ "memory"); \ ++ \ ++ if (__a3 == 0) \ ++ return (type) __v0; \ ++ return (type) -1; \ ++} ++ ++#define io_syscall4(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d) \ ++type fname(atype a, btype b, ctype c, dtype d) \ ++{ \ ++ register unsigned long __a0 asm("$4") = (unsigned long) a; \ ++ register unsigned long __a1 asm("$5") = (unsigned long) b; \ ++ register unsigned long __a2 asm("$6") = (unsigned long) c; \ ++ register unsigned long __a3 asm("$7") = (unsigned long) d; \ ++ unsigned long __v0; \ ++ \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ "li\t$2, %5\t\t\t# " #fname "\n\t" \ ++ "syscall\n\t" \ ++ "move\t%0, $2\n\t" \ ++ ".set\treorder" \ ++ : "=&r" (__v0), "+r" (__a3) \ ++ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname) \ ++ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ ++ "memory"); \ ++ \ ++ if (__a3 == 0) \ ++ return (type) __v0; \ ++ return (type) -1; \ ++} ++ ++#if (_MIPS_SIM == _MIPS_SIM_ABI32) ++ ++/* ++ * Using those means your brain needs more than an oil change ;-) ++ */ ++ ++#define io_syscall5(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d,etype,e) \ ++type fname(atype a, btype b, ctype c, dtype d, etype e) \ ++{ \ ++ register unsigned long __a0 asm("$4") = (unsigned long) a; \ ++ register unsigned long __a1 asm("$5") = (unsigned long) b; \ ++ register unsigned long __a2 asm("$6") = (unsigned long) c; \ ++ register unsigned long __a3 asm("$7") = (unsigned long) d; \ ++ unsigned long __v0; \ ++ \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ "lw\t$2, %6\n\t" \ ++ "subu\t$29, 32\n\t" \ ++ "sw\t$2, 16($29)\n\t" \ ++ "li\t$2, %5\t\t\t# " #fname "\n\t" \ ++ "syscall\n\t" \ ++ "move\t%0, $2\n\t" \ ++ "addiu\t$29, 32\n\t" \ ++ ".set\treorder" \ ++ : "=&r" (__v0), "+r" (__a3) \ ++ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname), \ ++ "m" ((unsigned long)e) \ ++ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ ++ "memory"); \ ++ \ ++ if (__a3 == 0) \ ++ return (type) __v0; \ ++ return (type) -1; \ ++} ++ ++#endif /* (_MIPS_SIM == _MIPS_SIM_ABI32) */ ++ ++#if (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) ++ ++#define io_syscall5(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d,etype,e) \ ++type fname (atype a,btype b,ctype c,dtype d,etype e) \ ++{ \ ++ register unsigned long __a0 asm("$4") = (unsigned long) a; \ ++ register unsigned long __a1 asm("$5") = (unsigned long) b; \ ++ register unsigned long __a2 asm("$6") = (unsigned long) c; \ ++ register unsigned long __a3 asm("$7") = (unsigned long) d; \ ++ register unsigned long __a4 asm("$8") = (unsigned long) e; \ ++ unsigned long __v0; \ ++ \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ "li\t$2, %6\t\t\t# " #fname "\n\t" \ ++ "syscall\n\t" \ ++ "move\t%0, $2\n\t" \ ++ ".set\treorder" \ ++ : "=&r" (__v0), "+r" (__a3) \ ++ : "r" (__a0), "r" (__a1), "r" (__a2), "r" (__a4), "i" (__NR_##sname) \ ++ : "$2", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ ++ "memory"); \ ++ \ ++ if (__a3 == 0) \ ++ return (type) __v0; \ ++ return (type) -1; \ ++} ++ ++#endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */ ++ +Index: b/src/libaio.h +=================================================================== +--- a/src/libaio.h ++++ b/src/libaio.h +@@ -73,6 +73,40 @@ typedef enum io_iocb_cmd { + #define PADDED(x, y) unsigned y; x + #define PADDEDptr(x, y) unsigned y; x + #define PADDEDul(x, y) unsigned y; unsigned long x ++#elif defined(__arm__) ++# if defined (__ARMEB__) /* big endian, 32 bits */ ++#define PADDED(x, y) unsigned y; x ++#define PADDEDptr(x, y) unsigned y; x ++#define PADDEDul(x, y) unsigned y; unsigned long x ++# else /* little endian, 32 bits */ ++#define PADDED(x, y) x; unsigned y ++#define PADDEDptr(x, y) x; unsigned y ++#define PADDEDul(x, y) unsigned long x; unsigned y ++# endif ++#elif defined(__m68k__) /* big endian, 32 bits */ ++#define PADDED(x, y) unsigned y; x ++#define PADDEDptr(x, y) unsigned y; x ++#define PADDEDul(x, y) unsigned y; unsigned long x ++#elif defined(__sparc__) /* big endian, 32 bits */ ++#define PADDED(x, y) unsigned y; x ++#define PADDEDptr(x, y) unsigned y; x ++#define PADDEDul(x, y) unsigned y; unsigned long x ++#elif defined(__hppa__) /* big endian, 32 bits */ ++#define PADDED(x, y) unsigned y; x ++#define PADDEDptr(x, y) unsigned y; x ++#define PADDEDul(x, y) unsigned y; unsigned long x ++#elif defined(__mips__) ++# if defined (__MIPSEB__) /* big endian, 32 bits */ ++#define PADDED(x, y) unsigned y; x ++#define PADDEDptr(x, y) unsigned y; x ++#define PADDEDul(x, y) unsigned y; unsigned long x ++# elif defined(__MIPSEL__) /* little endian, 32 bits */ ++#define PADDED(x, y) x; unsigned y ++#define PADDEDptr(x, y) x; unsigned y ++#define PADDEDul(x, y) unsigned long x; unsigned y ++# else ++# error "neither mipseb nor mipsel?" ++# endif + #else + #error endian? + #endif +Index: b/src/syscall-parisc.h +=================================================================== +--- /dev/null ++++ b/src/syscall-parisc.h +@@ -0,0 +1,146 @@ ++/* ++ * Linux system call numbers. ++ * ++ * Cary Coutant says that we should just use another syscall gateway ++ * page to avoid clashing with the HPUX space, and I think he's right: ++ * it will would keep a branch out of our syscall entry path, at the ++ * very least. If we decide to change it later, we can ``just'' tweak ++ * the LINUX_GATEWAY_ADDR define at the bottom and make __NR_Linux be ++ * 1024 or something. Oh, and recompile libc. =) ++ * ++ * 64-bit HPUX binaries get the syscall gateway address passed in a register ++ * from the kernel at startup, which seems a sane strategy. ++ */ ++ ++#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) ++ ++#define SYS_ify(syscall_name) __NR_##syscall_name ++ ++/* Assume all syscalls are done from PIC code just to be ++ * safe. The worst case scenario is that you lose a register ++ * and save/restore r19 across the syscall. */ ++#define PIC ++ ++/* Definition taken from glibc 2.3.3 ++ * sysdeps/unix/sysv/linux/hppa/sysdep.h ++ */ ++ ++#ifdef PIC ++/* WARNING: CANNOT BE USED IN A NOP! */ ++# define K_STW_ASM_PIC " copy %%r19, %%r4\n" ++# define K_LDW_ASM_PIC " copy %%r4, %%r19\n" ++# define K_USING_GR4 "%r4", ++#else ++# define K_STW_ASM_PIC " \n" ++# define K_LDW_ASM_PIC " \n" ++# define K_USING_GR4 ++#endif ++ ++/* GCC has to be warned that a syscall may clobber all the ABI ++ registers listed as "caller-saves", see page 8, Table 2 ++ in section 2.2.6 of the PA-RISC RUN-TIME architecture ++ document. However! r28 is the result and will conflict with ++ the clobber list so it is left out. Also the input arguments ++ registers r20 -> r26 will conflict with the list so they ++ are treated specially. Although r19 is clobbered by the syscall ++ we cannot say this because it would violate ABI, thus we say ++ r4 is clobbered and use that register to save/restore r19 ++ across the syscall. */ ++ ++#define K_CALL_CLOB_REGS "%r1", "%r2", K_USING_GR4 \ ++ "%r20", "%r29", "%r31" ++ ++#undef K_INLINE_SYSCALL ++#define K_INLINE_SYSCALL(name, nr, args...) ({ \ ++ long __sys_res; \ ++ { \ ++ register unsigned long __res __asm__("r28"); \ ++ K_LOAD_ARGS_##nr(args) \ ++ /* FIXME: HACK stw/ldw r19 around syscall */ \ ++ __asm__ volatile( \ ++ K_STW_ASM_PIC \ ++ " ble 0x100(%%sr2, %%r0)\n" \ ++ " ldi %1, %%r20\n" \ ++ K_LDW_ASM_PIC \ ++ : "=r" (__res) \ ++ : "i" (SYS_ify(name)) K_ASM_ARGS_##nr \ ++ : "memory", K_CALL_CLOB_REGS K_CLOB_ARGS_##nr \ ++ ); \ ++ __sys_res = (long)__res; \ ++ } \ ++ __sys_res; \ ++}) ++ ++#define K_LOAD_ARGS_0() ++#define K_LOAD_ARGS_1(r26) \ ++ register unsigned long __r26 __asm__("r26") = (unsigned long)(r26); \ ++ K_LOAD_ARGS_0() ++#define K_LOAD_ARGS_2(r26,r25) \ ++ register unsigned long __r25 __asm__("r25") = (unsigned long)(r25); \ ++ K_LOAD_ARGS_1(r26) ++#define K_LOAD_ARGS_3(r26,r25,r24) \ ++ register unsigned long __r24 __asm__("r24") = (unsigned long)(r24); \ ++ K_LOAD_ARGS_2(r26,r25) ++#define K_LOAD_ARGS_4(r26,r25,r24,r23) \ ++ register unsigned long __r23 __asm__("r23") = (unsigned long)(r23); \ ++ K_LOAD_ARGS_3(r26,r25,r24) ++#define K_LOAD_ARGS_5(r26,r25,r24,r23,r22) \ ++ register unsigned long __r22 __asm__("r22") = (unsigned long)(r22); \ ++ K_LOAD_ARGS_4(r26,r25,r24,r23) ++#define K_LOAD_ARGS_6(r26,r25,r24,r23,r22,r21) \ ++ register unsigned long __r21 __asm__("r21") = (unsigned long)(r21); \ ++ K_LOAD_ARGS_5(r26,r25,r24,r23,r22) ++ ++/* Even with zero args we use r20 for the syscall number */ ++#define K_ASM_ARGS_0 ++#define K_ASM_ARGS_1 K_ASM_ARGS_0, "r" (__r26) ++#define K_ASM_ARGS_2 K_ASM_ARGS_1, "r" (__r25) ++#define K_ASM_ARGS_3 K_ASM_ARGS_2, "r" (__r24) ++#define K_ASM_ARGS_4 K_ASM_ARGS_3, "r" (__r23) ++#define K_ASM_ARGS_5 K_ASM_ARGS_4, "r" (__r22) ++#define K_ASM_ARGS_6 K_ASM_ARGS_5, "r" (__r21) ++ ++/* The registers not listed as inputs but clobbered */ ++#define K_CLOB_ARGS_6 ++#define K_CLOB_ARGS_5 K_CLOB_ARGS_6, "%r21" ++#define K_CLOB_ARGS_4 K_CLOB_ARGS_5, "%r22" ++#define K_CLOB_ARGS_3 K_CLOB_ARGS_4, "%r23" ++#define K_CLOB_ARGS_2 K_CLOB_ARGS_3, "%r24" ++#define K_CLOB_ARGS_1 K_CLOB_ARGS_2, "%r25" ++#define K_CLOB_ARGS_0 K_CLOB_ARGS_1, "%r26" ++ ++#define io_syscall1(type,fname,sname,type1,arg1) \ ++type fname(type1 arg1) \ ++{ \ ++ return K_INLINE_SYSCALL(sname, 1, arg1); \ ++} ++ ++#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ ++type fname(type1 arg1, type2 arg2) \ ++{ \ ++ return K_INLINE_SYSCALL(sname, 2, arg1, arg2); \ ++} ++ ++#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ ++type fname(type1 arg1, type2 arg2, type3 arg3) \ ++{ \ ++ return K_INLINE_SYSCALL(sname, 3, arg1, arg2, arg3); \ ++} ++ ++#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ ++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ ++{ \ ++ return K_INLINE_SYSCALL(sname, 4, arg1, arg2, arg3, arg4); \ ++} ++ ++#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \ ++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \ ++{ \ ++ return K_INLINE_SYSCALL(sname, 5, arg1, arg2, arg3, arg4, arg5); \ ++} ++ +Index: b/src/syscall-arm.h +=================================================================== +--- /dev/null ++++ b/src/syscall-arm.h +@@ -0,0 +1,116 @@ ++/* ++ * linux/include/asm-arm/unistd.h ++ * ++ * Copyright (C) 2001-2005 Russell King ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ * ++ * Please forward _all_ changes to this file to rmk@arm.linux.org.uk, ++ * no matter what the change is. Thanks! ++ */ ++ ++#define __NR_OABI_SYSCALL_BASE 0x900000 ++ ++#if defined(__thumb__) || defined(__ARM_EABI__) ++#define __NR_SYSCALL_BASE 0 ++#else ++#define __NR_SYSCALL_BASE __NR_OABI_SYSCALL_BASE ++#endif ++ ++#define __NR_io_setup (__NR_SYSCALL_BASE+243) ++#define __NR_io_destroy (__NR_SYSCALL_BASE+244) ++#define __NR_io_getevents (__NR_SYSCALL_BASE+245) ++#define __NR_io_submit (__NR_SYSCALL_BASE+246) ++#define __NR_io_cancel (__NR_SYSCALL_BASE+247) ++ ++#define __sys2(x) #x ++#define __sys1(x) __sys2(x) ++ ++#if defined(__thumb__) || defined(__ARM_EABI__) ++#define __SYS_REG(name) register long __sysreg __asm__("r7") = __NR_##name; ++#define __SYS_REG_LIST(regs...) "r" (__sysreg) , ##regs ++#define __syscall(name) "swi\t0" ++#else ++#define __SYS_REG(name) ++#define __SYS_REG_LIST(regs...) regs ++#define __syscall(name) "swi\t" __sys1(__NR_##name) "" ++#endif ++ ++#define io_syscall1(type,fname,sname,type1,arg1) \ ++type fname(type1 arg1) { \ ++ __SYS_REG(sname) \ ++ register long __r0 __asm__("r0") = (long)arg1; \ ++ register long __res_r0 __asm__("r0"); \ ++ __asm__ __volatile__ ( \ ++ __syscall(sname) \ ++ : "=r" (__res_r0) \ ++ : __SYS_REG_LIST( "0" (__r0) ) \ ++ : "memory" ); \ ++ return (type) __res_r0; \ ++} ++ ++#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ ++type fname(type1 arg1,type2 arg2) { \ ++ __SYS_REG(sname) \ ++ register long __r0 __asm__("r0") = (long)arg1; \ ++ register long __r1 __asm__("r1") = (long)arg2; \ ++ register long __res_r0 __asm__("r0"); \ ++ __asm__ __volatile__ ( \ ++ __syscall(sname) \ ++ : "=r" (__res_r0) \ ++ : __SYS_REG_LIST( "0" (__r0), "r" (__r1) ) \ ++ : "memory" ); \ ++ return (type) __res_r0; \ ++} ++ ++#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ ++type fname(type1 arg1,type2 arg2,type3 arg3) { \ ++ __SYS_REG(sname) \ ++ register long __r0 __asm__("r0") = (long)arg1; \ ++ register long __r1 __asm__("r1") = (long)arg2; \ ++ register long __r2 __asm__("r2") = (long)arg3; \ ++ register long __res_r0 __asm__("r0"); \ ++ __asm__ __volatile__ ( \ ++ __syscall(sname) \ ++ : "=r" (__res_r0) \ ++ : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2) ) \ ++ : "memory" ); \ ++ return (type) __res_r0; \ ++} ++ ++#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4)\ ++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \ ++ __SYS_REG(sname) \ ++ register long __r0 __asm__("r0") = (long)arg1; \ ++ register long __r1 __asm__("r1") = (long)arg2; \ ++ register long __r2 __asm__("r2") = (long)arg3; \ ++ register long __r3 __asm__("r3") = (long)arg4; \ ++ register long __res_r0 __asm__("r0"); \ ++ __asm__ __volatile__ ( \ ++ __syscall(sname) \ ++ : "=r" (__res_r0) \ ++ : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), "r" (__r3) ) \ ++ : "memory" ); \ ++ return (type) __res_r0; \ ++} ++ ++#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \ ++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) {\ ++ __SYS_REG(sname) \ ++ register long __r0 __asm__("r0") = (long)arg1; \ ++ register long __r1 __asm__("r1") = (long)arg2; \ ++ register long __r2 __asm__("r2") = (long)arg3; \ ++ register long __r3 __asm__("r3") = (long)arg4; \ ++ register long __r4 __asm__("r4") = (long)arg5; \ ++ register long __res_r0 __asm__("r0"); \ ++ __asm__ __volatile__ ( \ ++ __syscall(sname) \ ++ : "=r" (__res_r0) \ ++ : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), \ ++ "r" (__r3), "r" (__r4) ) \ ++ : "memory" ); \ ++ return (type) __res_r0; \ ++} ++ --- libaio-0.3.107.orig/debian/patches/01_link_libgcc.patch +++ libaio-0.3.107/debian/patches/01_link_libgcc.patch @@ -0,0 +1,13 @@ +Index: b/src/Makefile +=================================================================== +--- a/src/Makefile ++++ b/src/Makefile +@@ -6,7 +6,7 @@ ARCH := $(shell uname -m | sed -e s/i.86 + CFLAGS := -nostdlib -nostartfiles -Wall -I. -g -fomit-frame-pointer -O2 -fPIC + SO_CFLAGS=-shared $(CFLAGS) + L_CFLAGS=$(CFLAGS) +-LINK_FLAGS= ++LINK_FLAGS := -lgcc + + soname=libaio.so.1 + minor=0 --- libaio-0.3.107.orig/debian/patches/91_ubuntu_arches.patch +++ libaio-0.3.107/debian/patches/91_ubuntu_arches.patch @@ -0,0 +1,141 @@ +--- 0.3.106-3/src/libaio.h 2005-04-01 21:31:32.000000000 +0100 ++++ 0.3.106-3ubuntu2/src/libaio.h 2007-03-05 23:14:02.000000000 +0000 +@@ -56,11 +56,13 @@ typedef enum io_iocb_cmd { + #define PADDED(x, y) x, y + #define PADDEDptr(x, y) x + #define PADDEDul(x, y) unsigned long x +-#elif defined(__powerpc64__) /* big endian, 64 bits */ ++#elif defined(__powerpc64__) || \ ++ (defined(__sparc__) && defined(__arch64__)) || \ ++ (defined(__hppa__) && defined(__arch64__)) /* big endian, 64 bits */ + #define PADDED(x, y) unsigned y; x + #define PADDEDptr(x,y) x + #define PADDEDul(x, y) unsigned long x +-#elif defined(__PPC__) /* big endian, 32 bits */ ++#elif defined(__PPC__) || defined(__sparc__) || defined(__hppa__) /* big endian, 32 bits */ + #define PADDED(x, y) unsigned y; x + #define PADDEDptr(x, y) unsigned y; x + #define PADDEDul(x, y) unsigned y; unsigned long x +--- 0.3.106-3/src/Makefile 2005-01-25 19:49:48.000000000 +0000 ++++ 0.3.106-3ubuntu2/src/Makefile 2007-03-05 23:14:02.000000000 +0000 +@@ -3,7 +3,7 @@ includedir=$(prefix)/include + libdir=$(prefix)/lib + + ARCH := $(shell uname -m | sed -e s/i.86/i386/) +-CFLAGS := -nostdlib -nostartfiles -Wall -I. -g -fomit-frame-pointer -O2 -fPIC ++CFLAGS := -Wall -I. -g -fomit-frame-pointer -O2 -fPIC + SO_CFLAGS=-shared $(CFLAGS) + L_CFLAGS=$(CFLAGS) + LINK_FLAGS= +--- 0.3.106-3/src/syscall.h~ 2007-05-24 11:14:11.000000000 +0200 ++++ 0.3.106-3/src/syscall.h 2007-05-24 11:15:22.000000000 +0200 +@@ -26,6 +26,8 @@ + #include "syscall-arm.h" + #elif defined(__m68k__) + #include "syscall-m68k.h" ++#elif defined(__sparc__) && defined(__arch64__) ++#include "syscall-sparc64.h" + #elif defined(__sparc__) + #include "syscall-sparc.h" + #elif defined(__hppa__) +--- 0.3.106-3/src/syscall-sparc64.h 1970-01-01 01:00:00.000000000 +0100 ++++ 0.3.106-3ubuntu2/src/syscall-sparc64.h 2007-03-05 23:14:02.000000000 +0000 +@@ -0,0 +1,98 @@ ++#define __NR_io_setup 268 ++#define __NR_io_destroy 269 ++#define __NR_io_submit 270 ++#define __NR_io_cancel 271 ++#define __NR_io_getevents 272 ++ ++#define io_syscall1(type,fname,sname,type1,arg1) \ ++type fname(type1 arg1) \ ++{ \ ++ unsigned long __res; \ ++ register unsigned long __g1 __asm__("g1") = __NR_##sname; \ ++ register unsigned long __o0 __asm__("o0") = (unsigned long) arg1; \ ++ __asm__ __volatile__("t 0x6d\n\t" \ ++ "sub %%g0, %%o0, %0\n\t" \ ++ "movcc %%xcc, %%o0, %0\n" \ ++ "1:" \ ++ : "=r" (__res), "=&r" (__o0) \ ++ : "1" (__o0), "r" (__g1) \ ++ : "cc"); \ ++ return (type) __res; \ ++} ++ ++#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ ++type fname(type1 arg1, type2 arg2) \ ++{ \ ++ unsigned long __res; \ ++ register unsigned long __g1 __asm__("g1") = __NR_##sname; \ ++ register unsigned long __o0 __asm__("o0") = (unsigned long) arg1; \ ++ register unsigned long __o1 __asm__("o1") = (unsigned long) arg2; \ ++ __asm__ __volatile__("t 0x6d\n\t" \ ++ "sub %%g0, %%o0, %0\n\t" \ ++ "movcc %%xcc, %%o0, %0\n" \ ++ "1:" \ ++ : "=r" (__res), "=&r" (__o0) \ ++ : "1" (__o0), "r" (__o1), "r" (__g1) \ ++ : "cc"); \ ++ return (type) __res; \ ++} ++ ++#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ ++type fname(type1 arg1, type2 arg2, type3 arg3) \ ++{ \ ++ unsigned long __res; \ ++ register unsigned long __g1 __asm__("g1") = __NR_##sname; \ ++ register unsigned long __o0 __asm__("o0") = (unsigned long) arg1; \ ++ register unsigned long __o1 __asm__("o1") = (unsigned long) arg2; \ ++ register unsigned long __o2 __asm__("o2") = (unsigned long) arg3; \ ++ __asm__ __volatile__("t 0x6d\n\t" \ ++ "sub %%g0, %%o0, %0\n\t" \ ++ "movcc %%xcc, %%o0, %0\n" \ ++ "1:" \ ++ : "=r" (__res), "=&r" (__o0) \ ++ : "1" (__o0), "r" (__o1), "r" (__o2), \ ++ "r" (__g1) \ ++ : "cc"); \ ++ return (type) __res; \ ++} ++ ++#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ ++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ ++{ \ ++ unsigned long __res; \ ++ register unsigned long __g1 __asm__("g1") = __NR_##sname; \ ++ register unsigned long __o0 __asm__("o0") = (unsigned long) arg1; \ ++ register unsigned long __o1 __asm__("o1") = (unsigned long) arg2; \ ++ register unsigned long __o2 __asm__("o2") = (unsigned long) arg3; \ ++ register unsigned long __o3 __asm__("o3") = (unsigned long) arg4; \ ++ __asm__ __volatile__("t 0x6d\n\t" \ ++ "sub %%g0, %%o0, %0\n\t" \ ++ "movcc %%xcc, %%o0, %0\n" \ ++ "1:" \ ++ : "=r" (__res), "=&r" (__o0) \ ++ : "1" (__o0), "r" (__o1), "r" (__o2), \ ++ "r" (__o3), "r" (__g1) \ ++ : "cc"); \ ++ return (type) __res; \ ++} ++ ++#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \ ++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \ ++{ \ ++ unsigned long __res; \ ++ register unsigned long __g1 __asm__("g1") = __NR_##sname; \ ++ register unsigned long __o0 __asm__("o0") = (unsigned long) arg1; \ ++ register unsigned long __o1 __asm__("o1") = (unsigned long) arg2; \ ++ register unsigned long __o2 __asm__("o2") = (unsigned long) arg3; \ ++ register unsigned long __o3 __asm__("o3") = (unsigned long) arg4; \ ++ register unsigned long __o4 __asm__("o4") = (unsigned long) arg5; \ ++ __asm__ __volatile__("t 0x6d\n\t" \ ++ "sub %%g0, %%o0, %0\n\t" \ ++ "movcc %%xcc, %%o0, %0\n" \ ++ "1:" \ ++ : "=r" (__res), "=&r" (__o0) \ ++ : "1" (__o0), "r" (__o1), "r" (__o2), \ ++ "r" (__o3), "r" (__o4), "r" (__g1) \ ++ : "cc"); \ ++ return (type) __res; \ ++} --- libaio-0.3.107.orig/debian/patches/90_ppc-name-clashing.patch +++ libaio-0.3.107/debian/patches/90_ppc-name-clashing.patch @@ -0,0 +1,46 @@ +--- 0.3.106-3/src/syscall-ppc.h 2004-10-13 19:10:27.000000000 +0100 ++++ 0.3.106-3ubuntu2/src/syscall-ppc.h 2007-03-05 23:14:02.000000000 +0000 +@@ -10,7 +10,7 @@ + * an error return status). + */ + +-#define __syscall_nr(nr, type, name, args...) \ ++#define __aio_syscall_nr(nr, type, name, args...) \ + unsigned long __sc_ret, __sc_err; \ + { \ + register unsigned long __sc_0 __asm__ ("r0"); \ +@@ -66,29 +66,29 @@ + #define io_syscall1(type,fname,sname,type1,arg1) \ + type fname(type1 arg1) \ + { \ +- __syscall_nr(1, type, sname, arg1); \ ++ __aio_syscall_nr(1, type, sname, arg1); \ + } + + #define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ + type fname(type1 arg1, type2 arg2) \ + { \ +- __syscall_nr(2, type, sname, arg1, arg2); \ ++ __aio_syscall_nr(2, type, sname, arg1, arg2); \ + } + + #define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ + type fname(type1 arg1, type2 arg2, type3 arg3) \ + { \ +- __syscall_nr(3, type, sname, arg1, arg2, arg3); \ ++ __aio_syscall_nr(3, type, sname, arg1, arg2, arg3); \ + } + + #define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ + type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ + { \ +- __syscall_nr(4, type, sname, arg1, arg2, arg3, arg4); \ ++ __aio_syscall_nr(4, type, sname, arg1, arg2, arg3, arg4); \ + } + + #define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \ + type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \ + { \ +- __syscall_nr(5, type, sname, arg1, arg2, arg3, arg4, arg5); \ ++ __aio_syscall_nr(5, type, sname, arg1, arg2, arg3, arg4, arg5); \ + }