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]

GNU C Library master sources branch, master, updated. glibc-2.15-848-gdc70356


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 "GNU C Library master sources".

The branch, master has been updated
       via  dc70356cbfc649af8e39c9a8d509fefd766fa8ef (commit)
      from  9fb1a21f4d33c4c82719d6130e149eb2c5a51ae8 (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.git;a=commitdiff;h=dc70356cbfc649af8e39c9a8d509fefd766fa8ef

commit dc70356cbfc649af8e39c9a8d509fefd766fa8ef
Author: Thomas Schwinge <thomas@codesourcery.com>
Date:   Sat May 12 10:53:04 2012 +0800

    Avoid dup3 PLT usage.
    
    Fixes fallout from 5aa3a74a59916b489e9cf7c4dce9eb149e106c6c.

diff --git a/ChangeLog b/ChangeLog
index 0c4a814..8a10d6a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-05-12  Thomas Schwinge  <thomas@codesourcery.com>
+
+	* io/dup3.c (dup3): Rename to __dup3, add weak alias for dup3.
+	* sysdeps/unix/syscalls.list (dup3): Likewise.
+	* libio/freopen.c (freopen): Invoke __dup3 instead of dup3.
+	* libio/freopen64.c (freopen64): Invoke __dup3 instead of dup3.
+
 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
 
 	* elf/stackguard-macros.h (STACK_CHK_GUARD) [__x86_64__]: Use
diff --git a/io/dup3.c b/io/dup3.c
index 90a3d60..7e97bf7 100644
--- a/io/dup3.c
+++ b/io/dup3.c
@@ -24,7 +24,7 @@
    open the same file as FD is which setting flags according to
    FLAGS.  Return FD2 or -1.  */
 int
-dup3 (fd, fd2, flags)
+__dup3 (fd, fd2, flags)
      int fd;
      int fd2;
      int flags;
@@ -42,7 +42,8 @@ dup3 (fd, fd2, flags)
   __set_errno (ENOSYS);
   return -1;
 }
-libc_hidden_def (dup3)
+libc_hidden_def (__dup3)
+weak_alias (__dup3, dup3)
 stub_warning (dup3)
 
 #include <stub-tag.h>
diff --git a/libio/freopen.c b/libio/freopen.c
index 025c55b..fa89c27 100644
--- a/libio/freopen.c
+++ b/libio/freopen.c
@@ -89,9 +89,9 @@ freopen (filename, mode, fp)
 	  else
 	    newfd =
 # endif
-	      dup3 (_IO_fileno (result), fd,
-		    (result->_flags2 & _IO_FLAGS2_CLOEXEC) != 0
-		    ? O_CLOEXEC : 0);
+	      __dup3 (_IO_fileno (result), fd,
+                      (result->_flags2 & _IO_FLAGS2_CLOEXEC) != 0
+                      ? O_CLOEXEC : 0);
 #else
 # define newfd 1
 #endif
diff --git a/libio/freopen64.c b/libio/freopen64.c
index 24d0360..c28a992 100644
--- a/libio/freopen64.c
+++ b/libio/freopen64.c
@@ -73,9 +73,9 @@ freopen64 (filename, mode, fp)
 	  else
 	    newfd =
 # endif
-	      dup3 (_IO_fileno (result), fd,
-		    (result->_flags2 & _IO_FLAGS2_CLOEXEC) != 0
-		    ? O_CLOEXEC : 0);
+	      __dup3 (_IO_fileno (result), fd,
+                      (result->_flags2 & _IO_FLAGS2_CLOEXEC) != 0
+                      ? O_CLOEXEC : 0);
 #else
 # define newfd 1
 #endif
diff --git a/sysdeps/unix/syscalls.list b/sysdeps/unix/syscalls.list
index 5c696b3..39c40ed 100644
--- a/sysdeps/unix/syscalls.list
+++ b/sysdeps/unix/syscalls.list
@@ -10,7 +10,7 @@ chroot		-	chroot		i:s	chroot
 close		-	close		Ci:i	__libc_close	__close close
 dup		-	dup		i:i	__dup		dup
 dup2		-	dup2		i:ii	__dup2		dup2
-dup3		-	dup3		i:iii	dup3
+dup3		-	dup3		i:iii	__dup3		dup3
 fchdir		-	fchdir		i:i	__fchdir	fchdir
 fchmod		-	fchmod		i:ii	__fchmod	fchmod
 fchown		-	fchown		i:iii	__fchown	fchown

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

Summary of changes:
 ChangeLog                  |    7 +++++++
 io/dup3.c                  |    5 +++--
 libio/freopen.c            |    6 +++---
 libio/freopen64.c          |    6 +++---
 sysdeps/unix/syscalls.list |    2 +-
 5 files changed, 17 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


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