patches/glibc/2.2.5/glibc-2.2.5-alpha-pwrite64.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Feb 24 11:00:05 2007 +0000 (2007-02-24)
changeset 1 eeea35fbf182
permissions -rw-r--r--
Add the full crosstool-NG sources to the new repository of its own.
You might just say: 'Yeah! crosstool-NG's got its own repo!".
Unfortunately, that's because the previous repo got damaged beyond repair and I had no backup.
That means I'm putting backups in place in the afternoon.
That also means we've lost history... :-(
     1 Fix for this error:
     2 
     3 ../sysdeps/unix/sysv/linux/pread.c: In function `__libc_pread':
     4 ../sysdeps/unix/sysv/linux/pread.c:52: error: `__NR_pread' undeclared (first use in this function)
     5 ../sysdeps/unix/sysv/linux/pread.c:52: error: (Each undeclared identifier is reported only once
     6 ../sysdeps/unix/sysv/linux/pread.c:52: error: for each function it appears in.)
     7 make[2]: *** [/home/dank/crosstool-0.28/build/alpha-unknown-linux-gnu/gcc-3.4.1-glibc-2.2.5/build-glibc/posix/pread.o] Error 1
     8 make[2]: Leaving directory `/home/dank/crosstool-0.28/build/alpha-unknown-linux-gnu/gcc-3.4.1-glibc-2.2.5/glibc-2.2.5/posix'
     9 make[1]: *** [posix/subdir_lib] Error 2
    10 make[1]: Leaving directory `/home/dank/crosstool-0.28/build/alpha-unknown-linux-gnu/gcc-3.4.1-glibc-2.2.5/glibc-2.2.5'
    11 make: *** [all] Error 2
    12 
    13 [ Same as glibc-2.3.2-alpha-pwrite.patch except for copyright date ]
    14 
    15 extracted from GLIBC CVS by Dan Kegel
    16 wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/alpha/sysdep.h.diff?r1=1.14&r2=1.15&cvsroot=glibc'
    17 (to match context of...)
    18 wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/alpha/sysdep.h.diff?r1=1.16&r2=1.17&cvsroot=glibc'
    19 and rediffed.
    20 
    21 cf. 
    22 http://sources.redhat.com/ml/libc-alpha/2003-10/msg00038.html
    23 
    24 Originally thought we needed this hunk, too:
    25 http://sources.redhat.com/ml/libc-alpha/2003-10/msg00037.html
    26 but it seems the sysdep.h change is sufficient, and works better 
    27 when compiling against linux-2.4.
    28 
    29 ===================================================================
    30 --- glibc-2.3.2/sysdeps/unix/sysv/linux/alpha/sysdep.h.old	2004-05-24 22:21:44.000000000 -0700
    31 +++ glibc-2.3.2/sysdeps/unix/sysv/linux/alpha/sysdep.h	2004-05-24 22:22:48.000000000 -0700
    32 @@ -1,3 +1,3 @@
    33 -/* Copyright (C) 1992, 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
    34 +/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2004 Free Software Foundation, Inc.
    35     This file is part of the GNU C Library.
    36     Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
    37 @@ -60,6 +60,21 @@
    38  #define __NR_osf_getsysinfo	256
    39  #define __NR_osf_setsysinfo	257
    40  
    41 +/* Help old kernel headers where particular syscalls are not available.  */
    42 +#ifndef __NR_semtimedop
    43 +# define __NR_semtimedop	423
    44 +#endif
    45 +
    46 +/* This is a kludge to make syscalls.list find these under the names
    47 +   pread and pwrite, since some kernel headers define those names
    48 +   and some define the *64 names for the same system calls.  */
    49 +#if !defined __NR_pread && defined __NR_pread64
    50 +# define __NR_pread __NR_pread64
    51 +#endif
    52 +#if !defined __NR_pwrite && defined __NR_pwrite64
    53 +# define __NR_pwrite __NR_pwrite64
    54 +#endif
    55 +
    56  /*
    57   * In order to get the hidden arguments for rt_sigaction set up
    58   * properly, we need to call the assembly version.  Detect this in the