jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone

Blame SOURCES/7.4.475

3ef2ca
To: vim_dev@googlegroups.com
3ef2ca
Subject: Patch 7.4.475
3ef2ca
Fcc: outbox
3ef2ca
From: Bram Moolenaar <Bram@moolenaar.net>
3ef2ca
Mime-Version: 1.0
3ef2ca
Content-Type: text/plain; charset=UTF-8
3ef2ca
Content-Transfer-Encoding: 8bit
3ef2ca
------------
3ef2ca
3ef2ca
Patch 7.4.475
3ef2ca
Problem:    Can't compile on a system where Xutf8SetWMProperties() is not in
3ef2ca
	    the X11 library.  Issue 265.
3ef2ca
Solution:   Add a configure check.
3ef2ca
Files:	    src/configure.in, src/auto/configure, src/config.h.in,
3ef2ca
	    src/os_unix.c
3ef2ca
3ef2ca
3ef2ca
*** ../vim-7.4.474/src/configure.in	2014-08-17 17:05:39.159057796 +0200
3ef2ca
--- src/configure.in	2014-10-11 14:40:18.557274620 +0200
3ef2ca
***************
3ef2ca
*** 3730,3750 ****
3ef2ca
  dnl Check for multibyte locale functions
3ef2ca
  dnl Find out if _Xsetlocale() is supported by libX11.
3ef2ca
  dnl Check if X_LOCALE should be defined.
3ef2ca
! 
3ef2ca
! if test "$enable_multibyte" = "yes"; then
3ef2ca
    cflags_save=$CFLAGS
3ef2ca
!   ldflags_save=$LDFLAGS
3ef2ca
!   if test "x$x_includes" != "xNONE" ; then
3ef2ca
!     CFLAGS="$CFLAGS -I$x_includes"
3ef2ca
!     LDFLAGS="$X_LIBS $LDFLAGS -lX11"
3ef2ca
!     AC_MSG_CHECKING(whether X_LOCALE needed)
3ef2ca
!     AC_TRY_COMPILE([#include <X11/Xlocale.h>],,
3ef2ca
! 	AC_TRY_LINK_FUNC([_Xsetlocale], [AC_MSG_RESULT(yes)
3ef2ca
! 		AC_DEFINE(X_LOCALE)], AC_MSG_RESULT(no)),
3ef2ca
! 	AC_MSG_RESULT(no))
3ef2ca
!   fi
3ef2ca
    CFLAGS=$cflags_save
3ef2ca
!   LDFLAGS=$ldflags_save
3ef2ca
  fi
3ef2ca
  
3ef2ca
  dnl Link with xpg4, it is said to make Korean locale working
3ef2ca
--- 3730,3753 ----
3ef2ca
  dnl Check for multibyte locale functions
3ef2ca
  dnl Find out if _Xsetlocale() is supported by libX11.
3ef2ca
  dnl Check if X_LOCALE should be defined.
3ef2ca
! if test "x$with_x" = "xyes"; then
3ef2ca
    cflags_save=$CFLAGS
3ef2ca
!   libs_save=$LIBS
3ef2ca
!   LIBS="$LIBS $X_LIBS $GUI_LIB_LOC $GUI_X_LIBS $X_PRE_LIBS $X_LIB $X_EXTRA_LIBS"
3ef2ca
!   CFLAGS="$CFLAGS $X_CFLAGS"
3ef2ca
! 
3ef2ca
!   AC_MSG_CHECKING(whether X_LOCALE needed)
3ef2ca
!   AC_TRY_COMPILE([#include <X11/Xlocale.h>],,
3ef2ca
!       AC_TRY_LINK_FUNC([_Xsetlocale], [AC_MSG_RESULT(yes)
3ef2ca
! 	      AC_DEFINE(X_LOCALE)], AC_MSG_RESULT(no)),
3ef2ca
!       AC_MSG_RESULT(no))
3ef2ca
! 
3ef2ca
!   AC_MSG_CHECKING(whether Xutf8SetWMProperties() can be used)
3ef2ca
!   AC_TRY_LINK_FUNC([Xutf8SetWMProperties], [AC_MSG_RESULT(yes)
3ef2ca
! 	      AC_DEFINE(HAVE_XUTF8SETWMPROPERTIES)], AC_MSG_RESULT(no))
3ef2ca
! 
3ef2ca
    CFLAGS=$cflags_save
3ef2ca
!   LIBS=$libs_save
3ef2ca
  fi
3ef2ca
  
3ef2ca
  dnl Link with xpg4, it is said to make Korean locale working
3ef2ca
*** ../vim-7.4.474/src/auto/configure	2014-08-17 17:05:39.163057796 +0200
3ef2ca
--- src/auto/configure	2014-10-11 14:40:51.421274692 +0200
3ef2ca
***************
3ef2ca
*** 12732,12747 ****
3ef2ca
  fi
3ef2ca
  
3ef2ca
  
3ef2ca
! 
3ef2ca
! if test "$enable_multibyte" = "yes"; then
3ef2ca
    cflags_save=$CFLAGS
3ef2ca
!   ldflags_save=$LDFLAGS
3ef2ca
!   if test "x$x_includes" != "xNONE" ; then
3ef2ca
!     CFLAGS="$CFLAGS -I$x_includes"
3ef2ca
!     LDFLAGS="$X_LIBS $LDFLAGS -lX11"
3ef2ca
!     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X_LOCALE needed" >&5
3ef2ca
  $as_echo_n "checking whether X_LOCALE needed... " >&6; }
3ef2ca
!     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3ef2ca
  /* end confdefs.h.  */
3ef2ca
  #include <X11/Xlocale.h>
3ef2ca
  int
3ef2ca
--- 12732,12746 ----
3ef2ca
  fi
3ef2ca
  
3ef2ca
  
3ef2ca
! if test "x$with_x" = "xyes"; then
3ef2ca
    cflags_save=$CFLAGS
3ef2ca
!   libs_save=$LIBS
3ef2ca
!   LIBS="$LIBS $X_LIBS $GUI_LIB_LOC $GUI_X_LIBS $X_PRE_LIBS $X_LIB $X_EXTRA_LIBS"
3ef2ca
!   CFLAGS="$CFLAGS $X_CFLAGS"
3ef2ca
! 
3ef2ca
!   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X_LOCALE needed" >&5
3ef2ca
  $as_echo_n "checking whether X_LOCALE needed... " >&6; }
3ef2ca
!   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3ef2ca
  /* end confdefs.h.  */
3ef2ca
  #include <X11/Xlocale.h>
3ef2ca
  int
3ef2ca
***************
3ef2ca
*** 12774,12780 ****
3ef2ca
  if ac_fn_c_try_link "$LINENO"; then :
3ef2ca
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3ef2ca
  $as_echo "yes" >&6; }
3ef2ca
! 		$as_echo "#define X_LOCALE 1" >>confdefs.h
3ef2ca
  
3ef2ca
  else
3ef2ca
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3ef2ca
--- 12773,12779 ----
3ef2ca
  if ac_fn_c_try_link "$LINENO"; then :
3ef2ca
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3ef2ca
  $as_echo "yes" >&6; }
3ef2ca
! 	      $as_echo "#define X_LOCALE 1" >>confdefs.h
3ef2ca
  
3ef2ca
  else
3ef2ca
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3ef2ca
***************
3ef2ca
*** 12787,12795 ****
3ef2ca
  $as_echo "no" >&6; }
3ef2ca
  fi
3ef2ca
  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3ef2ca
!   fi
3ef2ca
    CFLAGS=$cflags_save
3ef2ca
!   LDFLAGS=$ldflags_save
3ef2ca
  fi
3ef2ca
  
3ef2ca
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _xpg4_setrunelocale in -lxpg4" >&5
3ef2ca
--- 12786,12826 ----
3ef2ca
  $as_echo "no" >&6; }
3ef2ca
  fi
3ef2ca
  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3ef2ca
! 
3ef2ca
!   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Xutf8SetWMProperties() can be used" >&5
3ef2ca
! $as_echo_n "checking whether Xutf8SetWMProperties() can be used... " >&6; }
3ef2ca
!   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3ef2ca
! /* end confdefs.h.  */
3ef2ca
! 
3ef2ca
! /* Override any GCC internal prototype to avoid an error.
3ef2ca
!    Use char because int might match the return type of a GCC
3ef2ca
!    builtin and then its argument prototype would still apply.  */
3ef2ca
! #ifdef __cplusplus
3ef2ca
! extern "C"
3ef2ca
! #endif
3ef2ca
! char Xutf8SetWMProperties ();
3ef2ca
! int
3ef2ca
! main ()
3ef2ca
! {
3ef2ca
! return Xutf8SetWMProperties ();
3ef2ca
!   ;
3ef2ca
!   return 0;
3ef2ca
! }
3ef2ca
! _ACEOF
3ef2ca
! if ac_fn_c_try_link "$LINENO"; then :
3ef2ca
!   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3ef2ca
! $as_echo "yes" >&6; }
3ef2ca
! 	      $as_echo "#define HAVE_XUTF8SETWMPROPERTIES 1" >>confdefs.h
3ef2ca
! 
3ef2ca
! else
3ef2ca
!   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3ef2ca
! $as_echo "no" >&6; }
3ef2ca
! fi
3ef2ca
! rm -f core conftest.err conftest.$ac_objext \
3ef2ca
!     conftest$ac_exeext conftest.$ac_ext
3ef2ca
! 
3ef2ca
    CFLAGS=$cflags_save
3ef2ca
!   LIBS=$libs_save
3ef2ca
  fi
3ef2ca
  
3ef2ca
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _xpg4_setrunelocale in -lxpg4" >&5
3ef2ca
*** ../vim-7.4.474/src/config.h.in	2014-04-02 14:05:33.995887839 +0200
3ef2ca
--- src/config.h.in	2014-10-11 14:40:03.841274588 +0200
3ef2ca
***************
3ef2ca
*** 446,448 ****
3ef2ca
--- 446,451 ----
3ef2ca
  
3ef2ca
  /* Define if we have AvailabilityMacros.h on Mac OS X */
3ef2ca
  #undef HAVE_AVAILABILITYMACROS_H
3ef2ca
+ 
3ef2ca
+ /* Define if Xutf8SetWMProperties() is in an X library. */
3ef2ca
+ #undef HAVE_XUTF8SETWMPROPERTIES
3ef2ca
*** ../vim-7.4.474/src/os_unix.c	2014-08-29 12:58:38.242430208 +0200
3ef2ca
--- src/os_unix.c	2014-10-11 14:47:04.601275507 +0200
3ef2ca
***************
3ef2ca
*** 1960,1968 ****
3ef2ca
      return retval;
3ef2ca
  }
3ef2ca
  
3ef2ca
! /* Are Xutf8 functions available?  Avoid error from old compilers. */
3ef2ca
  #if defined(X_HAVE_UTF8_STRING) && defined(FEAT_MBYTE)
3ef2ca
! # if X_HAVE_UTF8_STRING
3ef2ca
  #  define USE_UTF8_STRING
3ef2ca
  # endif
3ef2ca
  #endif
3ef2ca
--- 1960,1971 ----
3ef2ca
      return retval;
3ef2ca
  }
3ef2ca
  
3ef2ca
! /* Xutf8 functions are not avaialble on older systems. Note that on some
3ef2ca
!  * systems X_HAVE_UTF8_STRING may be defined in a header file but
3ef2ca
!  * Xutf8SetWMProperties() is not in the X11 library.  Configure checks for
3ef2ca
!  * that and defines HAVE_XUTF8SETWMPROPERTIES. */
3ef2ca
  #if defined(X_HAVE_UTF8_STRING) && defined(FEAT_MBYTE)
3ef2ca
! # if X_HAVE_UTF8_STRING && HAVE_XUTF8SETWMPROPERTIES
3ef2ca
  #  define USE_UTF8_STRING
3ef2ca
  # endif
3ef2ca
  #endif
3ef2ca
*** ../vim-7.4.474/src/version.c	2014-10-11 12:48:22.541259950 +0200
3ef2ca
--- src/version.c	2014-10-11 14:42:47.821274946 +0200
3ef2ca
***************
3ef2ca
*** 743,744 ****
3ef2ca
--- 743,746 ----
3ef2ca
  {   /* Add new patch number below this line */
3ef2ca
+ /**/
3ef2ca
+     475,
3ef2ca
  /**/
3ef2ca
3ef2ca
-- 
3ef2ca
hundred-and-one symptoms of being an internet addict:
3ef2ca
253. You wait for a slow loading web page before going to the toilet.
3ef2ca
3ef2ca
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
3ef2ca
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
3ef2ca
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
3ef2ca
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///