From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7325 invoked by alias); 8 Aug 2012 14:56:33 -0000 Received: (qmail 7303 invoked by uid 22791); 8 Aug 2012 14:56:30 -0000 X-SWARE-Spam-Status: No, hits=-5.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_FX,TW_TG X-Spam-Check-By: sourceware.org Received: from mail-yx0-f169.google.com (HELO mail-yx0-f169.google.com) (209.85.213.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 08 Aug 2012 14:56:11 +0000 Received: by yenr5 with SMTP id r5so968778yen.0 for ; Wed, 08 Aug 2012 07:56:11 -0700 (PDT) Received: by 10.50.1.200 with SMTP id 8mr67322igo.65.1344437770694; Wed, 08 Aug 2012 07:56:10 -0700 (PDT) Received: from anchor.twiddle.home.com ([173.160.232.49]) by mx.google.com with ESMTPS id ai6sm5255913igc.0.2012.08.08.07.56.09 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 08 Aug 2012 07:56:10 -0700 (PDT) From: Richard Henderson To: libc-ports@sourceware.org Subject: [PATCH 1/3] alpha: Purge __ASSUME_STAT64_SYSCALL Date: Wed, 08 Aug 2012 14:56:00 -0000 Message-Id: <1344437762-3593-2-git-send-email-rth@twiddle.net> In-Reply-To: <1344437762-3593-1-git-send-email-rth@twiddle.net> References: <1344437762-3593-1-git-send-email-rth@twiddle.net> X-IsSubscribed: yes Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org X-SW-Source: 2012-08/txt/msg00047.txt.bz2 --- ports/ChangeLog.alpha | 12 ++++++ ports/sysdeps/unix/sysv/linux/alpha/fxstat.c | 19 +--------- ports/sysdeps/unix/sysv/linux/alpha/fxstatat.c | 37 +++----------------- .../unix/sysv/linux/alpha/kernel-features.h | 3 -- ports/sysdeps/unix/sysv/linux/alpha/lxstat.c | 19 +--------- ports/sysdeps/unix/sysv/linux/alpha/xstat.c | 19 +--------- ports/sysdeps/unix/sysv/linux/alpha/xstatconv.c | 9 +---- ports/sysdeps/unix/sysv/linux/alpha/xstatconv.h | 7 +--- 8 files changed, 22 insertions(+), 103 deletions(-) diff --git a/ports/ChangeLog.alpha b/ports/ChangeLog.alpha index 3b94d7e..282900a 100644 --- a/ports/ChangeLog.alpha +++ b/ports/ChangeLog.alpha @@ -1,3 +1,15 @@ +2012-08-08 Richard Henderson + + * sysdeps/unix/sysv/linux/alpha/kernel-features.h + (__ASSUME_STAT64_SYSCALL): Remove. + * sysdeps/unix/sysv/linux/alpha/fxstat.c: Remove test + for __ASSUME_STAT64_SYSCALL. + * sysdeps/unsx/sysv/linux/alpha/fxstatat.c: Likewise. + * sysdeps/unsx/sysv/linux/alpha/lxstat.c: Likewise. + * sysdeps/unsx/sysv/linux/alpha/xstat.c: Likewise. + * sysdeps/unsx/sysv/linux/alpha/xstatconv.c: Likewise. + * sysdeps/unsx/sysv/linux/alpha/xstatconv.h: Likewise. + 2012-08-07 Joseph Myers * sysdeps/unix/sysv/linux/alpha/kernel-features.h diff --git a/ports/sysdeps/unix/sysv/linux/alpha/fxstat.c b/ports/sysdeps/unix/sysv/linux/alpha/fxstat.c index e53b2da..5648142 100644 --- a/ports/sysdeps/unix/sysv/linux/alpha/fxstat.c +++ b/ports/sysdeps/unix/sysv/linux/alpha/fxstat.c @@ -1,5 +1,5 @@ /* fxstat using old-style Unix stat system call. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004-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 @@ -37,7 +37,6 @@ __fxstat (int vers, int fd, struct stat *buf) int result; struct kernel_stat kbuf; -#if __ASSUME_STAT64_SYSCALL > 0 if (vers == _STAT_VER_KERNEL64) { result = INTERNAL_SYSCALL (fstat64, err, 2, fd, buf); @@ -46,22 +45,6 @@ __fxstat (int vers, int fd, struct stat *buf) __set_errno (INTERNAL_SYSCALL_ERRNO (result, err)); return -1; } -#elif defined __NR_fstat64 - if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64) - { - int errno_out; - result = INTERNAL_SYSCALL (fstat64, err, 2, fd, buf); - if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) - return result; - errno_out = INTERNAL_SYSCALL_ERRNO (result, err); - if (errno_out != ENOSYS) - { - __set_errno (errno_out); - return -1; - } - __libc_missing_axp_stat64 = 1; - } -#endif result = INTERNAL_SYSCALL (fstat, err, 2, fd, &kbuf); if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) diff --git a/ports/sysdeps/unix/sysv/linux/alpha/fxstatat.c b/ports/sysdeps/unix/sysv/linux/alpha/fxstatat.c index 417f9d3..bd20f86 100644 --- a/ports/sysdeps/unix/sysv/linux/alpha/fxstatat.c +++ b/ports/sysdeps/unix/sysv/linux/alpha/fxstatat.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. +/* Copyright (C) 2005-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 @@ -32,9 +32,6 @@ #ifdef __ASSUME_ATFCTS # define __have_atfcts 1 #endif -#ifdef __ASSUME_STAT64_SYSCALL -# define __libc_missing_axp_stat64 0 -#endif /* Get information about the file NAME in BUF. */ int @@ -99,38 +96,14 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag) file = buf; } -#ifdef __NR_stat64 - if (!__libc_missing_axp_stat64) - { - if (flag & AT_SYMLINK_NOFOLLOW) - result = INTERNAL_SYSCALL (lstat64, err, 2, file, st); - else - result = INTERNAL_SYSCALL (stat64, err, 2, file, st); - - if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) - return result; - errno_out = INTERNAL_SYSCALL_ERRNO (result, err); -# if __ASSUME_STAT64_SYSCALL == 0 - if (errno_out == ENOSYS) - __libc_missing_axp_stat64 = 1; - else -# endif - goto fail; - } -#endif /* __NR_stat64 */ - - struct kernel_stat kst; - if (flag & AT_SYMLINK_NOFOLLOW) - result = INTERNAL_SYSCALL (lstat, err, 2, file, &kst); + result = INTERNAL_SYSCALL (lstat64, err, 2, file, st); else - result = INTERNAL_SYSCALL (stat, err, 2, file, &kst); - + result = INTERNAL_SYSCALL (stat64, err, 2, file, st); if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) - return __xstat_conv (vers, &kst, st); - errno_out = INTERNAL_SYSCALL_ERRNO (result, err); + return result; - fail: + errno_out = INTERNAL_SYSCALL_ERRNO (result, err); __atfct_seterrno (errno_out, fd, buf); return -1; diff --git a/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h b/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h index 6f330b5..53c282d 100644 --- a/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h +++ b/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h @@ -23,9 +23,6 @@ /* The tgkill syscall was introduced for alpha 2.6.0-test1. */ #define __ASSUME_TGKILL 1 -/* Starting with version 2.6.4, the stat64 syscalls are available. */ -#define __ASSUME_STAT64_SYSCALL 1 - #define __ASSUME_UTIMES 1 /* Starting with version 2.6.9, SSI_IEEE_RAISE_EXCEPTION exists. */ diff --git a/ports/sysdeps/unix/sysv/linux/alpha/lxstat.c b/ports/sysdeps/unix/sysv/linux/alpha/lxstat.c index b0f1e81..4401e6a 100644 --- a/ports/sysdeps/unix/sysv/linux/alpha/lxstat.c +++ b/ports/sysdeps/unix/sysv/linux/alpha/lxstat.c @@ -1,5 +1,5 @@ /* lxstat using old-style Unix stat system call. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004-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 @@ -37,7 +37,6 @@ __lxstat (int vers, const char *name, struct stat *buf) int result; struct kernel_stat kbuf; -#if __ASSUME_STAT64_SYSCALL > 0 if (vers == _STAT_VER_KERNEL64) { result = INTERNAL_SYSCALL (lstat64, err, 2, name, buf); @@ -46,22 +45,6 @@ __lxstat (int vers, const char *name, struct stat *buf) __set_errno (INTERNAL_SYSCALL_ERRNO (result, err)); return -1; } -#elif defined __NR_lstat64 - if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64) - { - int errno_out; - result = INTERNAL_SYSCALL (lstat64, err, 2, name, buf); - if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) - return result; - errno_out = INTERNAL_SYSCALL_ERRNO (result, err); - if (errno_out != ENOSYS) - { - __set_errno (errno_out); - return -1; - } - __libc_missing_axp_stat64 = 1; - } -#endif result = INTERNAL_SYSCALL (lstat, err, 2, name, &kbuf); if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) diff --git a/ports/sysdeps/unix/sysv/linux/alpha/xstat.c b/ports/sysdeps/unix/sysv/linux/alpha/xstat.c index a25431c..fe11e52 100644 --- a/ports/sysdeps/unix/sysv/linux/alpha/xstat.c +++ b/ports/sysdeps/unix/sysv/linux/alpha/xstat.c @@ -1,5 +1,5 @@ /* xstat using old-style Unix stat system call. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004-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 @@ -37,7 +37,6 @@ __xstat (int vers, const char *name, struct stat *buf) int result; struct kernel_stat kbuf; -#if __ASSUME_STAT64_SYSCALL > 0 if (vers == _STAT_VER_KERNEL64) { result = INTERNAL_SYSCALL (stat64, err, 2, name, buf); @@ -46,22 +45,6 @@ __xstat (int vers, const char *name, struct stat *buf) __set_errno (INTERNAL_SYSCALL_ERRNO (result, err)); return -1; } -#elif defined __NR_stat64 - if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64) - { - int errno_out; - result = INTERNAL_SYSCALL (stat64, err, 2, name, buf); - if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) - return result; - errno_out = INTERNAL_SYSCALL_ERRNO (result, err); - if (errno_out != ENOSYS) - { - __set_errno (errno_out); - return -1; - } - __libc_missing_axp_stat64 = 1; - } -#endif result = INTERNAL_SYSCALL (stat, err, 2, name, &kbuf); if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)) diff --git a/ports/sysdeps/unix/sysv/linux/alpha/xstatconv.c b/ports/sysdeps/unix/sysv/linux/alpha/xstatconv.c index d1dc64f..2b27a2d 100644 --- a/ports/sysdeps/unix/sysv/linux/alpha/xstatconv.c +++ b/ports/sysdeps/unix/sysv/linux/alpha/xstatconv.c @@ -1,5 +1,5 @@ /* Convert between the kernel's `struct stat' format, and libc's. - Copyright (C) 1997, 2003, 2004 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 @@ -23,13 +23,6 @@ #include #include - -#ifdef __NR_stat64 -# if __ASSUME_STAT64_SYSCALL == 0 -int __libc_missing_axp_stat64; -# endif -#endif - int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf) { diff --git a/ports/sysdeps/unix/sysv/linux/alpha/xstatconv.h b/ports/sysdeps/unix/sysv/linux/alpha/xstatconv.h index ea4cbb0..e8754f9 100644 --- a/ports/sysdeps/unix/sysv/linux/alpha/xstatconv.h +++ b/ports/sysdeps/unix/sysv/linux/alpha/xstatconv.h @@ -1,5 +1,5 @@ /* Convert between the kernel's `struct stat' format, and libc's. - Copyright (C) 2004, 2006 Free Software Foundation, Inc. + Copyright (C) 2004-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 @@ -19,10 +19,5 @@ #include #include -#ifdef __NR_stat64 -# if __ASSUME_STAT64_SYSCALL == 0 -extern int __libc_missing_axp_stat64 attribute_hidden; -# endif -#endif extern int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf) attribute_hidden; -- 1.7.7.6