This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
Community source repository for glibc add-on ports branch, master, updated. glibc-2.15-237-g21ed706
- From: jsm28 at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 19 May 2012 17:56:20 -0000
- Subject: Community source repository for glibc add-on ports branch, master, updated. glibc-2.15-237-g21ed706
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Community source repository for glibc add-on ports".
The branch, master has been updated
via 21ed706977cedab44cc7edd99bc7a6da53a5a4f0 (commit)
from 18bbce4028351206e06e4cf8bda1395760d71d25 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc-ports.git;a=commitdiff;h=21ed706977cedab44cc7edd99bc7a6da53a5a4f0
commit 21ed706977cedab44cc7edd99bc7a6da53a5a4f0
Author: Joseph Myers <joseph@codesourcery.com>
Date: Sat May 19 17:56:01 2012 +0000
Remove compatibility code for old ARM kernels.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index b75bd86..bfb87aa 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,31 @@
+2012-05-19 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/ftruncate64.c (kernel-features.h):
+ Don't include.
+ [__NR_ftruncate64]: Make code unconditional.
+ [!__NR_ftruncate64]: Remove conditional code.
+ [!__ASSUME_TRUNCATE64_SYSCALL]: Likewise.
+ * sysdeps/unix/sysv/linux/arm/mmap.S (kernel-features.h): Don't
+ include.
+ [__ASSUME_MMAP2_SYSCALL]:
+ Make code unconditional.
+ [!__ASSUME_MMAP2_SYSCALL]: Remove conditional code.
+ * sysdeps/unix/sysv/linux/arm/posix_fadvise64.c
+ (kernel-features.h): Don't include.
+ [__NR_arm_fadvise64_64]: Make code unconditional.
+ [!__ASSUME_FADVISE64_64_SYSCALL]: Remove conditional code.
+ * sysdeps/unix/sysv/linux/arm/truncate64.c (kernel-features.h):
+ Don't include.
+ [__NR_truncate64]: Make code unconditional.
+ [!__NR_truncate64]: Remove conditional code.
+ [!__ASSUME_TRUNCATE64_SYSCALL]: Likewise.
+ * sysdeps/unix/sysv/linux/arm/vfork.S (kernel-features.h): Don't
+ include.
+ [__NR_vfork]: Make code unconditional.
+ [__ASSUME_VFORK_SYSCALL]: Likewise.
+ [!__ASSUME_VFORK_SYSCALL]: Remove conditional code.
+ [!__NR_vfork]: Likewise.
+
2012-05-16 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/kernel-features.h
diff --git a/sysdeps/unix/sysv/linux/arm/ftruncate64.c b/sysdeps/unix/sysv/linux/arm/ftruncate64.c
index ad5eb18..9838182 100644
--- a/sysdeps/unix/sysv/linux/arm/ftruncate64.c
+++ b/sysdeps/unix/sysv/linux/arm/ftruncate64.c
@@ -1,5 +1,4 @@
-/* Copyright (C) 1997,1998,1999,2000,2001,2003, 2005
- Free Software Foundation, Inc.
+/* Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,53 +23,14 @@
#include <sysdep.h>
#include <sys/syscall.h>
-#include "kernel-features.h"
-
-#ifdef __NR_ftruncate64
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-/* The variable is shared between all wrappers around *truncate64 calls. */
-extern int __have_no_truncate64;
-#endif
-
-
/* Truncate the file FD refers to to LENGTH bytes. */
int
__ftruncate64 (int fd, off64_t length)
{
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
- if (! __have_no_truncate64)
-#endif
- {
- unsigned int low = length & 0xffffffff;
- unsigned int high = length >> 32;
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
- int saved_errno = errno;
-#endif
- int result = INLINE_SYSCALL (ftruncate64, 4, fd, 0,
- __LONG_LONG_PAIR (high, low));
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
- if (result != -1 || errno != ENOSYS)
-#endif
- return result;
-
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
- __set_errno (saved_errno);
- __have_no_truncate64 = 1;
-#endif
- }
-
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
- if ((off_t) length != length)
- {
- __set_errno (EINVAL);
- return -1;
- }
- return __ftruncate (fd, (off_t) length);
-#endif
+ unsigned int low = length & 0xffffffff;
+ unsigned int high = length >> 32;
+ int result = INLINE_SYSCALL (ftruncate64, 4, fd, 0,
+ __LONG_LONG_PAIR (high, low));
+ return result;
}
weak_alias (__ftruncate64, ftruncate64)
-
-#else
-/* Use the generic implementation. */
-# include <misc/ftruncate64.c>
-#endif
diff --git a/sysdeps/unix/sysv/linux/arm/mmap.S b/sysdeps/unix/sysv/linux/arm/mmap.S
index 62bf8ee..3276a3b 100644
--- a/sysdeps/unix/sysv/linux/arm/mmap.S
+++ b/sysdeps/unix/sysv/linux/arm/mmap.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000, 2003, 2005, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,20 +16,12 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
-#include <kernel-features.h>
#define EINVAL 22
.text
ENTRY (__mmap)
-# ifdef __ASSUME_MMAP2_SYSCALL
- /* This code is actually a couple of cycles slower than the
- sys_mmap version below, so it might seem like a loss. But the
- code path inside the kernel is sufficiently much shorter to
- make it a net gain to use mmap2 when it's known to be
- available. */
-
/* shuffle args */
str r5, [sp, #-4]!
cfi_adjust_cfa_offset (4)
@@ -66,38 +58,6 @@ ENTRY (__mmap)
.Linval:
mov r0, #-EINVAL
b 2b
-# else
- /* Because we can only get five args through the syscall interface, and
- mmap() takes six, we need to build a parameter block and pass its
- address instead. The 386 port does a similar trick. */
-
- /* This code previously moved sp into ip and stored the args using
- stmdb ip!, {a1-a4}. It did not modify sp, so the stack never had
- to be restored after the syscall completed. It saved an
- instruction and meant no stack cleanup work was required.
-
- This will not work in the case of a mmap call being interrupted
- by a signal. If the signal handler uses any stack the arguments
- to mmap will be trashed. The results of a restart of mmap are
- then unpredictable. */
-
- /* store args on the stack */
- stmdb sp!, {a1-a4}
- cfi_adjust_cfa_offset (16)
-
- /* do the syscall */
- mov a1, sp
- DO_CALL (mmap, 0)
-
- /* pop args off the stack. */
- add sp, sp, #16
- cfi_adjust_cfa_offset (-16)
-
- cmn r0, $4096
- RETINSTR(cc, lr)
- b PLTJMP(syscall_error);
-#endif
-
PSEUDO_END (__mmap)
weak_alias (__mmap, mmap)
diff --git a/sysdeps/unix/sysv/linux/arm/posix_fadvise64.c b/sysdeps/unix/sysv/linux/arm/posix_fadvise64.c
index 174c3bb..75b06ab 100644
--- a/sysdeps/unix/sysv/linux/arm/posix_fadvise64.c
+++ b/sysdeps/unix/sysv/linux/arm/posix_fadvise64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,7 +18,6 @@
#include <errno.h>
#include <fcntl.h>
#include <sysdep.h>
-#include <kernel-features.h>
int __posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise);
int __posix_fadvise64_l32 (int fd, off64_t offset, size_t len, int advise);
@@ -29,34 +28,13 @@ int __posix_fadvise64_l32 (int fd, off64_t offset, size_t len, int advise);
int
__posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise)
{
-#ifdef __NR_arm_fadvise64_64
INTERNAL_SYSCALL_DECL (err);
int ret = INTERNAL_SYSCALL (arm_fadvise64_64, err, 6, fd, advise,
__LONG_LONG_PAIR ((long)(offset >> 32), (long)offset),
__LONG_LONG_PAIR ((long)(len >> 32), (long)len));
if (!INTERNAL_SYSCALL_ERROR_P (ret, err))
return 0;
-# ifndef __ASSUME_FADVISE64_64_SYSCALL
- if (INTERNAL_SYSCALL_ERRNO (ret, err) != ENOSYS)
-# endif
- return INTERNAL_SYSCALL_ERRNO (ret, err);
-#endif
-#ifndef __ASSUME_FADVISE64_64_SYSCALL
-# ifdef __NR_fadvise64
- if (len != (off_t) len)
- return EOVERFLOW;
-
- INTERNAL_SYSCALL_DECL (err2);
- int ret2 = INTERNAL_SYSCALL (fadvise64, err2, 6, fd, 0,
- __LONG_LONG_PAIR ((long)(offset >> 32), (long)offset),
- (off_t) len, advise);
- if (!INTERNAL_SYSCALL_ERROR_P (ret2, err2))
- return 0;
- return INTERNAL_SYSCALL_ERRNO (ret2, err2);
-# else
- return ENOSYS;
-# endif
-#endif
+ return INTERNAL_SYSCALL_ERRNO (ret, err);
}
#include <shlib-compat.h>
diff --git a/sysdeps/unix/sysv/linux/arm/truncate64.c b/sysdeps/unix/sysv/linux/arm/truncate64.c
index 409bf19..3fad93f 100644
--- a/sysdeps/unix/sysv/linux/arm/truncate64.c
+++ b/sysdeps/unix/sysv/linux/arm/truncate64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,51 +24,13 @@
#include <sys/syscall.h>
#include <bp-checks.h>
-#include "kernel-features.h"
-
-#ifdef __NR_truncate64
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-/* The variable is shared between all wrappers around *truncate64 calls. */
-int __have_no_truncate64;
-#endif
-
/* Truncate the file FD refers to to LENGTH bytes. */
int
truncate64 (const char *path, off64_t length)
{
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
- if (! __have_no_truncate64)
-#endif
- {
- unsigned int low = length & 0xffffffff;
- unsigned int high = length >> 32;
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
- int saved_errno = errno;
-#endif
- int result = INLINE_SYSCALL (truncate64, 4, CHECK_STRING (path), 0,
- __LONG_LONG_PAIR (high, low));
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
- if (result != -1 || errno != ENOSYS)
-#endif
- return result;
-
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
- __set_errno (saved_errno);
- __have_no_truncate64 = 1;
-#endif
- }
-
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
- if ((off_t) length != length)
- {
- __set_errno (EINVAL);
- return -1;
- }
- return __truncate (path, (off_t) length);
-#endif
+ unsigned int low = length & 0xffffffff;
+ unsigned int high = length >> 32;
+ int result = INLINE_SYSCALL (truncate64, 4, CHECK_STRING (path), 0,
+ __LONG_LONG_PAIR (high, low));
+ return result;
}
-
-#else
-/* Use the generic implementation. */
-# include <misc/truncate64.c>
-#endif
diff --git a/sysdeps/unix/sysv/linux/arm/vfork.S b/sysdeps/unix/sysv/linux/arm/vfork.S
index 99c366d..abd46c1 100644
--- a/sysdeps/unix/sysv/linux/arm/vfork.S
+++ b/sysdeps/unix/sysv/linux/arm/vfork.S
@@ -19,7 +19,6 @@
#include <sysdep.h>
#define _ERRNO_H 1
#include <bits/errno.h>
-#include <kernel-features.h>
/* Clone the calling process, but without copying the whole address space.
The calling process is suspended until the new process exits or is
@@ -27,8 +26,6 @@
and the process ID of the new process to the old process. */
ENTRY (__vfork)
-
-#ifdef __NR_vfork
#ifdef SAVE_PID
SAVE_PID
#endif
@@ -56,25 +53,7 @@ ENTRY (__vfork)
cmn a1, #4096
RETINSTR(cc, lr)
-# ifdef __ASSUME_VFORK_SYSCALL
b PLTJMP(SYSCALL_ERROR)
-# else
- /* Check if vfork syscall is known at all. */
- cmn a1, #ENOSYS
- bne PLTJMP(SYSCALL_ERROR)
-# endif
-#endif
-
-#ifndef __ASSUME_VFORK_SYSCALL
- /* If we don't have vfork, fork is close enough. */
- DO_CALL (fork, 0)
- cmn a1, #4096
- RETINSTR(cc, lr)
- b PLTJMP(SYSCALL_ERROR)
-#elif !defined __NR_vfork
-# error "__NR_vfork not available and __ASSUME_VFORK_SYSCALL defined"
-#endif
-
PSEUDO_END (__vfork)
libc_hidden_def (__vfork)
-----------------------------------------------------------------------
Summary of changes:
ChangeLog.arm | 28 +++++++++++++
sysdeps/unix/sysv/linux/arm/ftruncate64.c | 52 +++----------------------
sysdeps/unix/sysv/linux/arm/mmap.S | 42 +-------------------
sysdeps/unix/sysv/linux/arm/posix_fadvise64.c | 26 +-----------
sysdeps/unix/sysv/linux/arm/truncate64.c | 50 +++---------------------
sysdeps/unix/sysv/linux/arm/vfork.S | 21 ----------
6 files changed, 43 insertions(+), 176 deletions(-)
hooks/post-receive
--
Community source repository for glibc add-on ports