libc/ChangeLog

Backport form mainline:
2006-01-08  Roland McGrath  <roland@redhat.com>

        * sysdeps/unix/sysv/linux/futimes.c [!__NR_fcntl && __NR_fcntl64]: Use
        fcntl64 syscall instead.

2006-01-08  Roland McGrath  <roland@redhat.com>

        * sysdeps/unix/sysv/linux/alpha/adjtime.c: Use <> instead of "" in
        #include for kernel-features.h.
	* sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.

2005-11-08  H.J. Lu  <hongjiu.lu@intel.com>

	* sysdeps/wordsize-32/Makefile (CPPFLAGS-divdi3.c): Set to
	-Din_divdi3_c.
	* sysdeps/wordsize-32/symbol-hacks.h: Skip if in_divdi3_c is defined.

2005-11-07  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>

        * elf/elf.h (R_M32R_REL32): New macro.

Only for M32R target:
2005-11-01  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>

	* sysdeps/unix/sysv/linux/i386/fcntl.c: Include "kernel-features.h"
	instead of "../kernel-features.h".
	(ports/sysdeps/unix/sysv/linux/m32r/fcntl.c include this file.)

Index: elf/elf.h
===================================================================
RCS file: /cvs/glibc/libc/elf/elf.h,v
retrieving revision 1.143
diff -u -p -r1.143 elf.h
--- elf/elf.h	12 Nov 2004 21:51:33 -0000	1.143
+++ elf/elf.h	9 May 2006 05:46:38 -0000
@@ -2525,6 +2525,7 @@ typedef Elf32_Addr Elf32_Conflict;
 #define R_M32R_SDA16_RELA	42	/* 16 bit offset in SDA */
 #define R_M32R_RELA_GNU_VTINHERIT	43
 #define R_M32R_RELA_GNU_VTENTRY	44
+#define R_M32R_REL32		45	/* PC relative 32 bit */
 
 #define R_M32R_GOT24		48	/* 24 bit GOT entry */
 #define R_M32R_26_PLTREL	49	/* 26 bit PC relative to PLT shifted */
Index: sysdeps/unix/sysv/linux/futimes.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/futimes.c,v
retrieving revision 1.6.4.1
diff -u -p -r1.6.4.1 futimes.c
--- sysdeps/unix/sysv/linux/futimes.c	16 Feb 2005 10:47:26 -0000	1.6.4.1
+++ sysdeps/unix/sysv/linux/futimes.c	9 May 2006 05:46:42 -0000
@@ -88,7 +88,11 @@ __futimes (int fd, const struct timeval 
       case ENOENT:
 	/* Validate the file descriptor by letting fcntl set errno to
 	   EBADF if it's bogus.  Otherwise it's a /proc issue.  */
+#ifdef __NR_fcntl
 	if (INLINE_SYSCALL (fcntl, 3, fd, F_GETFD, 0) != -1)
+#elif defined __NR_fcntl64
+	if (INLINE_SYSCALL (fcntl64, 3, fd, F_GETFD, 0) != -1)
+#endif
 	  __set_errno (ENOSYS);
 	break;
       }
Index: sysdeps/unix/sysv/linux/i386/fcntl.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/i386/fcntl.c,v
retrieving revision 1.23
diff -u -p -r1.23 fcntl.c
--- sysdeps/unix/sysv/linux/i386/fcntl.c	16 Jul 2004 18:11:11 -0000	1.23
+++ sysdeps/unix/sysv/linux/i386/fcntl.c	9 May 2006 05:46:42 -0000
@@ -23,7 +23,7 @@
 #include <stdarg.h>
 
 #include <sys/syscall.h>
-#include "../kernel-features.h"
+#include "kernel-features.h"
 
 #if __ASSUME_FCNTL64 == 0
 /* This variable is shared with all files that check for fcntl64.  */
Index: sysdeps/wordsize-32/Makefile
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/wordsize-32/Makefile,v
retrieving revision 1.5
diff -u -p -r1.5 Makefile
--- sysdeps/wordsize-32/Makefile	19 Sep 2002 06:47:56 -0000	1.5
+++ sysdeps/wordsize-32/Makefile	9 May 2006 05:46:43 -0000
@@ -2,5 +2,6 @@ ifeq ($(subdir),csu)
 ifeq (yes,$(build-shared))
 sysdep_routines += divdi3
 shared-only-routines += divdi3
+CPPFLAGS-divdi3.c = -Din_divdi3_c
 endif
 endif
Index: sysdeps/wordsize-32/symbol-hacks.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/wordsize-32/symbol-hacks.h,v
retrieving revision 1.1
diff -u -p -r1.1 symbol-hacks.h
--- sysdeps/wordsize-32/symbol-hacks.h	8 Mar 2004 20:59:34 -0000	1.1
+++ sysdeps/wordsize-32/symbol-hacks.h	9 May 2006 05:46:43 -0000
@@ -22,7 +22,7 @@
    therefore we get PLTs.  Unnecessarily so.  Changing gcc is a big
    task which might not be worth it so we play tricks with the
    assembler.  */
-#if !defined __ASSEMBLER__ && !defined NOT_IN_libc && defined SHARED
+#if !defined __ASSEMBLER__ && !defined in_divdi3_c && !defined NOT_IN_libc && defined SHARED
 asm ("__divdi3 = __divdi3_internal");
 asm ("__udivdi3 = __udivdi3_internal");
 asm ("__moddi3 = __moddi3_internal");
