Package: libaio
Version: 0.3.107-7
Severity: wishlist
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu maverick ubuntu-patch

*** /tmp/tmp2LpteU
In Ubuntu, we've applied the attached patch to achieve the following:

 - Set package priority to optional.
 - debian/patches/90_ppc-name-clashing.patch: Avoid name clashing.
 - debian/patches/91_ubuntu_arches.patch: More Ubuntu arches support.

We thought you might be interested in some of these patches.

Personally, I can't comment much on the contents (we've been carrying
them for a while).

SR

-- 
Stefano Rivera
  http://tumbleweed.org.za/
  H: +27 21 465 6908 C: +27 72 419 8559  UCT: x3127
diff -u libaio-0.3.107/debian/control libaio-0.3.107/debian/control
--- libaio-0.3.107/debian/control
+++ libaio-0.3.107/debian/control
@@ -1,6 +1,6 @@
 Source: libaio
 Maintainer: Guillem Jover <guil...@debian.org>
-Priority: extra
+Priority: optional
 Section: libs
 Vcs-Browser: http://git.hadrons.org/?p=debian/pkgs/libaio.git
 Vcs-Git: git://git.hadrons.org/git/debian/pkgs/libaio.git
diff -u libaio-0.3.107/debian/changelog libaio-0.3.107/debian/changelog
diff -u libaio-0.3.107/debian/patches/series libaio-0.3.107/debian/patches/series
--- libaio-0.3.107/debian/patches/series
+++ libaio-0.3.107/debian/patches/series
@@ -5,0 +6,2 @@
+90_ppc-name-clashing.patch
+91_ubuntu_arches.patch
only in patch2:
unchanged:
--- 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 @@
+--- a/src/libaio.h
++++ b/src/libaio.h
+@@ -57,11 +57,13 @@
+ #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
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -5,7 +5,7 @@
+ libdevdir=$(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 := -lgcc
+--- a/src/syscall.h
++++ b/src/syscall.h
+@@ -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__)
+--- /dev/null
++++ b/src/syscall-sparc64.h
+@@ -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;						  \
++}
only in patch2:
unchanged:
--- 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 @@
+--- a/src/syscall-ppc.h
++++ b/src/syscall-ppc.h
+@@ -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);	\
+ }

Attachment: signature.asc
Description: Digital signature

Reply via email to