Blame SOURCES/7.4.254

22c937
To: vim_dev@googlegroups.com
22c937
Subject: Patch 7.4.2
22c937
Fcc: outbox
22c937
From: Bram Moolenaar <Bram@moolenaar.net>
22c937
Mime-Version: 1.0
22c937
Content-Type: text/plain; charset=UTF-8
22c937
Content-Transfer-Encoding: 8bit
22c937
------------
22c937
22c937
Patch 7.4.254
22c937
Problem:    Smack support detection is incomplete.
22c937
Solution:   Check for attr/xattr.h and specific macro.
22c937
Files:	    src/configure.in, src/auto/configure
22c937
22c937
22c937
*** ../vim-7.4.253/src/configure.in	2014-04-05 12:02:20.747100138 +0200
22c937
--- src/configure.in	2014-04-10 11:02:59.256035996 +0200
22c937
***************
22c937
*** 396,405 ****
22c937
    AC_MSG_RESULT(no)
22c937
    AC_CHECK_HEADER([linux/xattr.h], true, enable_smack="no")
22c937
  else
22c937
!    AC_MSG_RESULT(yes)
22c937
  fi
22c937
  if test "$enable_smack" = "yes"; then
22c937
!   AC_CHECK_LIB(attr, llistxattr,
22c937
  	  [LIBS="$LIBS -lattr"
22c937
  	   found_smack="yes"
22c937
  	   AC_DEFINE(HAVE_SMACK)])
22c937
--- 396,414 ----
22c937
    AC_MSG_RESULT(no)
22c937
    AC_CHECK_HEADER([linux/xattr.h], true, enable_smack="no")
22c937
  else
22c937
!   AC_MSG_RESULT(yes)
22c937
  fi
22c937
  if test "$enable_smack" = "yes"; then
22c937
!   AC_CHECK_HEADER([attr/xattr.h], true, enable_smack="no")
22c937
! fi
22c937
! if test "$enable_smack" = "yes"; then
22c937
!   AC_MSG_CHECKING(for XATTR_NAME_SMACKEXEC in linux/xattr.h)
22c937
!   AC_EGREP_CPP(XATTR_NAME_SMACKEXEC, [#include <linux/xattr.h>],
22c937
! 	       AC_MSG_RESULT(yes),
22c937
! 	       AC_MSG_RESULT(no); enable_smack = "no")
22c937
! fi
22c937
! if test "$enable_smack" = "yes"; then
22c937
!   AC_CHECK_LIB(attr, setxattr,
22c937
  	  [LIBS="$LIBS -lattr"
22c937
  	   found_smack="yes"
22c937
  	   AC_DEFINE(HAVE_SMACK)])
22c937
*** ../vim-7.4.253/src/auto/configure	2014-04-05 12:02:20.751100138 +0200
22c937
--- src/auto/configure	2014-04-10 11:03:04.220036007 +0200
22c937
***************
22c937
*** 4611,4623 ****
22c937
  
22c937
  
22c937
  else
22c937
!    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22c937
  $as_echo "yes" >&6; }
22c937
  fi
22c937
  if test "$enable_smack" = "yes"; then
22c937
!   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for llistxattr in -lattr" >&5
22c937
! $as_echo_n "checking for llistxattr in -lattr... " >&6; }
22c937
! if ${ac_cv_lib_attr_llistxattr+:} false; then :
22c937
    $as_echo_n "(cached) " >&6
22c937
  else
22c937
    ac_check_lib_save_LIBS=$LIBS
22c937
--- 4611,4651 ----
22c937
  
22c937
  
22c937
  else
22c937
!   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22c937
  $as_echo "yes" >&6; }
22c937
  fi
22c937
  if test "$enable_smack" = "yes"; then
22c937
!   ac_fn_c_check_header_mongrel "$LINENO" "attr/xattr.h" "ac_cv_header_attr_xattr_h" "$ac_includes_default"
22c937
! if test "x$ac_cv_header_attr_xattr_h" = xyes; then :
22c937
!   true
22c937
! else
22c937
!   enable_smack="no"
22c937
! fi
22c937
! 
22c937
! 
22c937
! fi
22c937
! if test "$enable_smack" = "yes"; then
22c937
!   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR_NAME_SMACKEXEC in linux/xattr.h" >&5
22c937
! $as_echo_n "checking for XATTR_NAME_SMACKEXEC in linux/xattr.h... " >&6; }
22c937
!   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22c937
! /* end confdefs.h.  */
22c937
! #include <linux/xattr.h>
22c937
! _ACEOF
22c937
! if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22c937
!   $EGREP "XATTR_NAME_SMACKEXEC" >/dev/null 2>&1; then :
22c937
!   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22c937
! $as_echo "yes" >&6; }
22c937
! else
22c937
!   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22c937
! $as_echo "no" >&6; }; enable_smack = "no"
22c937
! fi
22c937
! rm -f conftest*
22c937
! 
22c937
! fi
22c937
! if test "$enable_smack" = "yes"; then
22c937
!   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setxattr in -lattr" >&5
22c937
! $as_echo_n "checking for setxattr in -lattr... " >&6; }
22c937
! if ${ac_cv_lib_attr_setxattr+:} false; then :
22c937
    $as_echo_n "(cached) " >&6
22c937
  else
22c937
    ac_check_lib_save_LIBS=$LIBS
22c937
***************
22c937
*** 4631,4657 ****
22c937
  #ifdef __cplusplus
22c937
  extern "C"
22c937
  #endif
22c937
! char llistxattr ();
22c937
  int
22c937
  main ()
22c937
  {
22c937
! return llistxattr ();
22c937
    ;
22c937
    return 0;
22c937
  }
22c937
  _ACEOF
22c937
  if ac_fn_c_try_link "$LINENO"; then :
22c937
!   ac_cv_lib_attr_llistxattr=yes
22c937
  else
22c937
!   ac_cv_lib_attr_llistxattr=no
22c937
  fi
22c937
  rm -f core conftest.err conftest.$ac_objext \
22c937
      conftest$ac_exeext conftest.$ac_ext
22c937
  LIBS=$ac_check_lib_save_LIBS
22c937
  fi
22c937
! { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_llistxattr" >&5
22c937
! $as_echo "$ac_cv_lib_attr_llistxattr" >&6; }
22c937
! if test "x$ac_cv_lib_attr_llistxattr" = xyes; then :
22c937
    LIBS="$LIBS -lattr"
22c937
  	   found_smack="yes"
22c937
  	   $as_echo "#define HAVE_SMACK 1" >>confdefs.h
22c937
--- 4659,4685 ----
22c937
  #ifdef __cplusplus
22c937
  extern "C"
22c937
  #endif
22c937
! char setxattr ();
22c937
  int
22c937
  main ()
22c937
  {
22c937
! return setxattr ();
22c937
    ;
22c937
    return 0;
22c937
  }
22c937
  _ACEOF
22c937
  if ac_fn_c_try_link "$LINENO"; then :
22c937
!   ac_cv_lib_attr_setxattr=yes
22c937
  else
22c937
!   ac_cv_lib_attr_setxattr=no
22c937
  fi
22c937
  rm -f core conftest.err conftest.$ac_objext \
22c937
      conftest$ac_exeext conftest.$ac_ext
22c937
  LIBS=$ac_check_lib_save_LIBS
22c937
  fi
22c937
! { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_setxattr" >&5
22c937
! $as_echo "$ac_cv_lib_attr_setxattr" >&6; }
22c937
! if test "x$ac_cv_lib_attr_setxattr" = xyes; then :
22c937
    LIBS="$LIBS -lattr"
22c937
  	   found_smack="yes"
22c937
  	   $as_echo "#define HAVE_SMACK 1" >>confdefs.h
22c937
*** ../vim-7.4.253/src/version.c	2014-04-06 21:33:39.675363743 +0200
22c937
--- src/version.c	2014-04-10 11:00:57.200035730 +0200
22c937
***************
22c937
*** 736,737 ****
22c937
--- 736,739 ----
22c937
  {   /* Add new patch number below this line */
22c937
+ /**/
22c937
+     254,
22c937
  /**/
22c937
22c937
-- 
22c937
George:  "I just got a new set of golf clubs for my wife!"
22c937
  John:  "Great trade!"
22c937
22c937
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
22c937
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
22c937
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
22c937
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///