]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Add have_pipe2.
authorAdhemerval Zanella <azanella@linux.vnet.ibm.com>
Fri, 30 Dec 2011 01:42:16 +0000 (20:42 -0500)
committerAdhemerval Zanella <azanella@linux.vnet.ibm.com>
Fri, 30 Dec 2011 01:42:16 +0000 (20:42 -0500)
ChangeLog
include/unistd.h
io/Makefile
io/have_pipe2.c [new file with mode: 0644]

index c70747e20e2b0b49baad40cc1ae442a61f791cd5..203d087cd38bdc2f5ea417fa35424830f41bb587 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-12-28  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
+
+       * include/unistd.h: Defining __have_pipe2 as external variable.
+       * io/Makefile: Added have_pipe2 object.
+       * io/have_pipe2.c: Declaring __have_pipe2 variable.
+
 2011-11-16  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
 
        * sysdeps/powerpc/Makefile: Added locale-defines.sym generation.
index 0ad29832804b7ca1824cac1ec68d7b19aef594a8..6b7aa7920c71e35972fa8a31ce60acb87e3fb747 100644 (file)
@@ -171,10 +171,7 @@ extern int __libc_pause (void);
 extern int __pause_nocancel (void) attribute_hidden;
 
 extern int __have_sock_cloexec;
-/* At lot of other functionality became available at the same time as
-   SOCK_CLOEXEC.  Avoid defining separate variables for all of them
-   unless it is really necessary.  */
-#define __have_pipe2 __have_sock_cloexec
+extern int __have_pipe2;
 
 extern int __getlogin_r_loginuid (char *name, size_t namesize)
      attribute_hidden;
index caaa51b351a99a4f4a35b7362c7032f05b0ba3c4..de33202ec5b752db04288798f0daf691bcd24ae9 100644 (file)
@@ -54,7 +54,7 @@ routines :=                                                           \
        sendfile sendfile64 \
        utimensat futimens
 
-aux := have_o_cloexec
+aux := have_o_cloexec have_pipe2
 
 # These routines will be omitted from the libc shared object.
 # Instead the static object files will be included in a special archive
diff --git a/io/have_pipe2.c b/io/have_pipe2.c
new file mode 100644 (file)
index 0000000..f08efa8
--- /dev/null
@@ -0,0 +1,24 @@
+/* Copyright (C) 2011 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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <unistd.h>
+#include <kernel-features.h>
+
+#ifndef __ASSUME_PIPE2
+int __have_pipe2;
+#endif