This is the mail archive of the glibc-cvs@sourceware.org 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]

Community source repository for glibc add-on ports branch, master, updated. glibc-2.15-238-gdc2a97c


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  dc2a97c6eda5fd6ed87b15f7eda3c923260cdee1 (commit)
      from  21ed706977cedab44cc7edd99bc7a6da53a5a4f0 (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=dc2a97c6eda5fd6ed87b15f7eda3c923260cdee1

commit dc2a97c6eda5fd6ed87b15f7eda3c923260cdee1
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Sat May 19 19:10:13 2012 +0000

    Clean up MIPS ftruncate64/truncate64.

diff --git a/ChangeLog.mips b/ChangeLog.mips
index db16b4b..b5fdbda 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,28 @@
+2012-05-19  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/mips/ftruncate64.c: Move to ...
+	* sysdeps/unix/sysv/linux/mips/mips32/ftruncate64.c: ... here.
+	(kernel-features.h): Don't include.
+	[__NR_ftruncate64]: Make code unconditional.
+	[!__NR_ftruncate64]: Remove conditional code.
+	[!__ASSUME_TRUNCATE64_SYSCALL]: Likewise.
+	* sysdeps/unix/sysv/linux/mips/truncate64.c: Move to ...
+	* sysdeps/unix/sysv/linux/mips/mips32/truncate64.c: ... here.
+	(kernel-features.h): Don't include.
+	[__NR_truncate64]: Make code unconditional.
+	[!__NR_truncate64]: Remove conditional code.
+	[!__ASSUME_TRUNCATE64_SYSCALL]: Likewise.
+	* sysdeps/unix/sysv/linux/mips/mips64/syscalls.list (ftruncate):
+	Add syscall.
+	(truncate): Likewise.
+	* sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list
+	(ftruncate): Remove syscall.
+	(truncate): Likewise.
+	* sysdeps/unix/sysv/linux/mips/mips64/n32/ftruncate64.c: Move to ...
+	* sysdeps/unix/sysv/linux/mips/mips64/ftruncate64.c: ... here.
+	* sysdeps/unix/sysv/linux/mips/mips64/n32/truncate64.c: Move to ...
+	* sysdeps/unix/sysv/linux/mips/mips64/truncate64.c: ... here.
+
 2012-05-16  Joseph Myers  <joseph@codesourcery.com>
 
 	* sysdeps/unix/sysv/linux/mips/bits/stat.h (struct stat)
diff --git a/sysdeps/unix/sysv/linux/mips/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/ftruncate64.c
deleted file mode 100644
index 982650c..0000000
--- a/sysdeps/unix/sysv/linux/mips/ftruncate64.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/* Copyright (C) 1997,1998,1999,2000,2001,2002,2003,2005,2006
-	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
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library.  If not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <sys/types.h>
-#include <errno.h>
-#include <endian.h>
-#include <unistd.h>
-
-#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
-}
-weak_alias (__ftruncate64, ftruncate64)
-
-#else
-/* Use the generic implementation.  */
-# include <misc/ftruncate64.c>
-#endif
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/mips32/ftruncate64.c
new file mode 100644
index 0000000..9838182
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips32/ftruncate64.c
@@ -0,0 +1,36 @@
+/* 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library.  If not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <sys/types.h>
+#include <errno.h>
+#include <endian.h>
+#include <unistd.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+/* Truncate the file FD refers to to LENGTH bytes.  */
+int
+__ftruncate64 (int fd, off64_t length)
+{
+  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)
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/truncate64.c b/sysdeps/unix/sysv/linux/mips/mips32/truncate64.c
new file mode 100644
index 0000000..3fad93f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips32/truncate64.c
@@ -0,0 +1,36 @@
+/* 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library.  If not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <sys/types.h>
+#include <endian.h>
+#include <errno.h>
+#include <unistd.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+/* Truncate the file FD refers to to LENGTH bytes.  */
+int
+truncate64 (const char *path, off64_t length)
+{
+  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;
+}
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/mips64/ftruncate64.c
similarity index 100%
rename from sysdeps/unix/sysv/linux/mips/mips64/n32/ftruncate64.c
rename to sysdeps/unix/sysv/linux/mips/mips64/ftruncate64.c
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list
index 0d37a9b..7ad5523 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list
@@ -2,8 +2,6 @@
 
 readahead	-	readahead	i:iii	__readahead	readahead
 sync_file_range	-	sync_file_range	Ci:iiii	sync_file_range
-ftruncate	-	ftruncate	i:ii	__ftruncate	ftruncate ftruncate64 __ftruncate64
-truncate	-	truncate	i:si	truncate	truncate64
 
 prlimit64	EXTRA	prlimit64	i:iipp	prlimit64
 
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list
index cac273c..867323a 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list
@@ -2,6 +2,9 @@
 
 lseek		-	lseek		Ci:iii	__libc_lseek	__lseek lseek __llseek llseek __libc_lseek64 __lseek64 lseek64
 
+ftruncate	-	ftruncate	i:ii	__ftruncate	ftruncate ftruncate64 __ftruncate64
+truncate	-	truncate	i:si	truncate	truncate64
+
 # Semaphore and shm system calls.  msgctl, shmctl, and semctl have C
 # wrappers (to set __IPC_64).
 msgget		-	msgget		i:ii	__msgget	msgget
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/truncate64.c b/sysdeps/unix/sysv/linux/mips/mips64/truncate64.c
similarity index 100%
rename from sysdeps/unix/sysv/linux/mips/mips64/n32/truncate64.c
rename to sysdeps/unix/sysv/linux/mips/mips64/truncate64.c
diff --git a/sysdeps/unix/sysv/linux/mips/truncate64.c b/sysdeps/unix/sysv/linux/mips/truncate64.c
deleted file mode 100644
index 7c11b63..0000000
--- a/sysdeps/unix/sysv/linux/mips/truncate64.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/* Copyright (C) 1997,1998,1999,2000,2002,2003,2005,2006
-   	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
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library.  If not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <sys/types.h>
-#include <endian.h>
-#include <errno.h>
-#include <unistd.h>
-
-#include <sysdep.h>
-#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
-}
-
-#else
-/* Use the generic implementation.  */
-# include <misc/truncate64.c>
-#endif

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog.mips                                     |   25 +++++++
 sysdeps/unix/sysv/linux/mips/ftruncate64.c         |   75 --------------------
 .../sysv/linux/{arm => mips/mips32}/ftruncate64.c  |    0
 .../sysv/linux/{arm => mips/mips32}/truncate64.c   |    0
 .../sysv/linux/mips/mips64/{n32 => }/ftruncate64.c |    0
 .../unix/sysv/linux/mips/mips64/n32/syscalls.list  |    2 -
 sysdeps/unix/sysv/linux/mips/mips64/syscalls.list  |    3 +
 .../sysv/linux/mips/mips64/{n32 => }/truncate64.c  |    0
 sysdeps/unix/sysv/linux/mips/truncate64.c          |   75 --------------------
 9 files changed, 28 insertions(+), 152 deletions(-)
 delete mode 100644 sysdeps/unix/sysv/linux/mips/ftruncate64.c
 copy sysdeps/unix/sysv/linux/{arm => mips/mips32}/ftruncate64.c (100%)
 copy sysdeps/unix/sysv/linux/{arm => mips/mips32}/truncate64.c (100%)
 rename sysdeps/unix/sysv/linux/mips/mips64/{n32 => }/ftruncate64.c (100%)
 rename sysdeps/unix/sysv/linux/mips/mips64/{n32 => }/truncate64.c (100%)
 delete mode 100644 sysdeps/unix/sysv/linux/mips/truncate64.c


hooks/post-receive
-- 
Community source repository for glibc add-on ports


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