This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] pread64/pwrite64 on SPARC64

On Tue, Oct 07, Jakub Jelinek wrote:

> On Tue, Oct 07, 2003 at 01:16:39PM +0200, Thorsten Kukuk wrote:
> > 
> > Hi,
> > 
> > the following patch is necessary to be able to compile current glibc
> > on SPARC64 again. But make check still shows a lot of seg.faults and
> > bus errors.
> This is not the right fix.
> You need something like e.g. s/u/s/l/x86_64/sysdep.h does:

I copied this and it compiles, too:

2003-10-08  Thorsten Kukuk  <>

	* sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h (pread, pwrite):  
	Define __NR_pread/__NR_pwrite if not done in kernel headers

--- sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h
+++ sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h	2003/10/08 07:40:39
@@ -29,6 +29,16 @@
 #undef SYS_ify
 #define SYS_ify(syscall_name) __NR_##syscall_name
+/* This is a kludge to make syscalls.list find these under the names
+   pread and pwrite, since some kernel headers define those names
+   and some define the *64 names for the same system calls.  */
+#if !defined __NR_pread && defined __NR_pread64
+# define __NR_pread __NR_pread64
+#if !defined __NR_pwrite && defined __NR_pwrite64
+# define __NR_pwrite __NR_pwrite64
 #ifdef __ASSEMBLER__
 #define LOADSYSCALL(x) mov __NR_##x, %g1

Thorsten Kukuk
SuSE Linux AG        Deutschherrnstr. 15-19        D-90429 Nuernberg
Key fingerprint = A368 676B 5E1B 3E46 CFCE  2D97 F8FD 4E23 56C6 FB4B

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]