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.18-717-gc8590f9


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  c8590f9d9edc8d2b8540586648fc9a0130da469e (commit)
      from  dd1d85e5ddd6baaf99f53964a718fab85b160149 (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://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c8590f9d9edc8d2b8540586648fc9a0130da469e

commit c8590f9d9edc8d2b8540586648fc9a0130da469e
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Tue Dec 31 03:12:54 2013 -0500

    tst-fanotify: check for linux/fanotify.h existence
    
    We support older kernels that lack this header, so check for it
    before we try to use it.
    
    Reported-by: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>

diff --git a/ChangeLog b/ChangeLog
index 3a785ab..d2c23e7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-12-31  Mike Frysinger  <vapier@gentoo.org>
+
+	* sysdeps/unix/sysv/linux/configure: Regenerated.
+	* sysdeps/unix/sysv/linux/configure.ac: Call AC_CHECK_HEADER on
+	the linux/fanotify.h header.
+	* sysdeps/unix/sysv/linux/tst-fanotify.c: Check if
+	HAVE_LINUX_FANOTIFY_H is defined.
+
 2013-12-31  Siddhesh Poyarekar  <siddhesh@redhat.com>
 
 	* benchtests/cos-inputs: New inputs.
diff --git a/sysdeps/unix/sysv/linux/configure b/sysdeps/unix/sysv/linux/configure
index 643da86..ab0f03c 100644
--- a/sysdeps/unix/sysv/linux/configure
+++ b/sysdeps/unix/sysv/linux/configure
@@ -1,3 +1,34 @@
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
 # This file is generated from configure.ac by Autoconf.  DO NOT EDIT!
  # Local configure fragment for sysdeps/unix/sysv/linux.
 
@@ -267,6 +298,16 @@ else
 *** compatible kernel version" "$LINENO" 5
 fi
 
+# Until we start requiring 2.6.37+ headers, we need to check for the
+# availability of linux/fanotify.h for testing purposes.
+ac_fn_c_check_header_compile "$LINENO" "linux/fanotify.h" "ac_cv_header_linux_fanotify_h" "/* No default includes.  */
+"
+if test "x$ac_cv_header_linux_fanotify_h" = xyes; then :
+  DEFINES="$DEFINES -DHAVE_LINUX_FANOTIFY_H=1"
+fi
+
+
+
 # The result of the above test for the use of the FDE code is invalid if
 # the user overrides the decision about the minimum ABI.
 if test "$oldest_abi" != default && test "2.2.4" \< "$oldest_abi"; then
diff --git a/sysdeps/unix/sysv/linux/configure.ac b/sysdeps/unix/sysv/linux/configure.ac
index 1be921f..6d6053f 100644
--- a/sysdeps/unix/sysv/linux/configure.ac
+++ b/sysdeps/unix/sysv/linux/configure.ac
@@ -105,6 +105,12 @@ else
 *** compatible kernel version])
 fi
 
+# Until we start requiring 2.6.37+ headers, we need to check for the
+# availability of linux/fanotify.h for testing purposes.
+AC_CHECK_HEADER(linux/fanotify.h,
+  [DEFINES="$DEFINES -DHAVE_LINUX_FANOTIFY_H=1"], ,
+  [/* No default includes.  */])
+
 # The result of the above test for the use of the FDE code is invalid if
 # the user overrides the decision about the minimum ABI.
 if test "$oldest_abi" != default && test "2.2.4" \< "$oldest_abi"; then
diff --git a/sysdeps/unix/sysv/linux/tst-fanotify.c b/sysdeps/unix/sysv/linux/tst-fanotify.c
index ad9836b..7b27545 100644
--- a/sysdeps/unix/sysv/linux/tst-fanotify.c
+++ b/sysdeps/unix/sysv/linux/tst-fanotify.c
@@ -19,6 +19,18 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <stdio.h>
+
+#ifndef HAVE_LINUX_FANOTIFY_H
+
+static int
+do_test (void)
+{
+  puts ("SKIP: missing support for fanotify due to old kernel headers");
+  return 0;
+}
+
+#else
+
 #include <sys/fanotify.h>
 
 static int
@@ -56,5 +68,7 @@ do_test (void)
   return 0;
 }
 
+#endif
+
 #define TEST_FUNCTION do_test ()
 #include "../test-skeleton.c"

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

Summary of changes:
 ChangeLog                              |    8 ++++++
 sysdeps/unix/sysv/linux/configure      |   41 ++++++++++++++++++++++++++++++++
 sysdeps/unix/sysv/linux/configure.ac   |    6 ++++
 sysdeps/unix/sysv/linux/tst-fanotify.c |   14 +++++++++++
 4 files changed, 69 insertions(+), 0 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]