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