8b9a1c
To: vim_dev@googlegroups.com
8b9a1c
Subject: Patch 7.4.055
8b9a1c
Fcc: outbox
8b9a1c
From: Bram Moolenaar <Bram@moolenaar.net>
8b9a1c
Mime-Version: 1.0
8b9a1c
Content-Type: text/plain; charset=UTF-8
8b9a1c
Content-Transfer-Encoding: 8bit
8b9a1c
------------
8b9a1c
8b9a1c
Patch 7.4.055
8b9a1c
Problem:    Mac: Where availability macros are defined depends on the system.
8b9a1c
Solution:   Add a configure check. (Felix Bünemann) 
8b9a1c
Files:      src/config.h.in, src/configure.in, src/auto/configure,
8b9a1c
            src/os_mac.h
8b9a1c
8b9a1c
*** ../vim-7.4.054/src/config.h.in	2013-02-26 14:18:19.000000000 +0100
8b9a1c
--- src/config.h.in	2013-11-02 20:52:08.000000000 +0100
8b9a1c
***************
8b9a1c
*** 442,444 ****
8b9a1c
--- 442,447 ----
8b9a1c
  
8b9a1c
  /* Define if you want Cygwin to use the WIN32 clipboard, not compatible with X11*/
8b9a1c
  #undef FEAT_CYGWIN_WIN32_CLIPBOARD
8b9a1c
+ 
8b9a1c
+ /* Define if we have AvailabilityMacros.h on Mac OS X */
8b9a1c
+ #undef HAVE_AVAILABILITYMACROS_H
8b9a1c
*** ../vim-7.4.054/src/configure.in	2013-10-02 18:22:58.000000000 +0200
8b9a1c
--- src/configure.in	2013-11-02 20:58:58.000000000 +0100
8b9a1c
***************
8b9a1c
*** 206,211 ****
8b9a1c
--- 206,215 ----
8b9a1c
      dnl TODO: use -arch i386 on Intel machines
8b9a1c
      CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
8b9a1c
  
8b9a1c
+     dnl Mac OS X 10.9+ no longer include AvailabilityMacros.h in Carbon
8b9a1c
+     dnl so we need to include it to have access to version macros.
8b9a1c
+     AC_CHECK_HEADER(AvailabilityMacros.h, [AC_DEFINE(HAVE_AVAILABILITYMACROS_H, 1, [ Define if we have AvailabilityMacros.h on Mac OS X ])])
8b9a1c
+ 
8b9a1c
      dnl If Carbon is found, assume we don't want X11
8b9a1c
      dnl unless it was specifically asked for (--with-x)
8b9a1c
      dnl or Motif, Athena or GTK GUI is used.
8b9a1c
*** ../vim-7.4.054/src/auto/configure	2013-10-02 18:22:58.000000000 +0200
8b9a1c
--- src/auto/configure	2013-11-02 21:00:40.000000000 +0100
8b9a1c
***************
8b9a1c
*** 4223,4229 ****
8b9a1c
      OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
8b9a1c
          CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
8b9a1c
  
8b9a1c
!                 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8b9a1c
  for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8b9a1c
  		  inttypes.h stdint.h unistd.h
8b9a1c
  do :
8b9a1c
--- 4223,4229 ----
8b9a1c
      OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
8b9a1c
          CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
8b9a1c
  
8b9a1c
!             # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8b9a1c
  for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8b9a1c
  		  inttypes.h stdint.h unistd.h
8b9a1c
  do :
8b9a1c
***************
8b9a1c
*** 4241,4247 ****
8b9a1c
  done
8b9a1c
  
8b9a1c
  
8b9a1c
! ac_fn_c_check_header_mongrel "$LINENO" "Carbon/Carbon.h" "ac_cv_header_Carbon_Carbon_h" "$ac_includes_default"
8b9a1c
  if test "x$ac_cv_header_Carbon_Carbon_h" = x""yes; then :
8b9a1c
    CARBON=yes
8b9a1c
  fi
8b9a1c
--- 4241,4256 ----
8b9a1c
  done
8b9a1c
  
8b9a1c
  
8b9a1c
! ac_fn_c_check_header_mongrel "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default"
8b9a1c
! if test "x$ac_cv_header_AvailabilityMacros_h" = x""yes; then :
8b9a1c
! 
8b9a1c
! $as_echo "#define HAVE_AVAILABILITYMACROS_H 1" >>confdefs.h
8b9a1c
! 
8b9a1c
! fi
8b9a1c
! 
8b9a1c
! 
8b9a1c
! 
8b9a1c
!                 ac_fn_c_check_header_mongrel "$LINENO" "Carbon/Carbon.h" "ac_cv_header_Carbon_Carbon_h" "$ac_includes_default"
8b9a1c
  if test "x$ac_cv_header_Carbon_Carbon_h" = x""yes; then :
8b9a1c
    CARBON=yes
8b9a1c
  fi
8b9a1c
*** ../vim-7.4.054/src/os_mac.h	2013-05-06 04:06:04.000000000 +0200
8b9a1c
--- src/os_mac.h	2013-11-02 20:59:46.000000000 +0100
8b9a1c
***************
8b9a1c
*** 16,21 ****
8b9a1c
--- 16,26 ----
8b9a1c
  # define OPAQUE_TOOLBOX_STRUCTS 0
8b9a1c
  #endif
8b9a1c
  
8b9a1c
+ /* Include MAC_OS_X_VERSION_* macros */
8b9a1c
+ #ifdef HAVE_AVAILABILITYMACROS_H
8b9a1c
+ # include <AvailabilityMacros.h>
8b9a1c
+ #endif
8b9a1c
+ 
8b9a1c
  /*
8b9a1c
   * Macintosh machine-dependent things.
8b9a1c
   *
8b9a1c
***************
8b9a1c
*** 263,269 ****
8b9a1c
  #endif
8b9a1c
  
8b9a1c
  /* Some "prep work" definition to be able to compile the MacOS X
8b9a1c
!  * version with os_unix.x instead of os_mac.c. Based on the result
8b9a1c
   * of ./configure for console MacOS X.
8b9a1c
   */
8b9a1c
  
8b9a1c
--- 268,274 ----
8b9a1c
  #endif
8b9a1c
  
8b9a1c
  /* Some "prep work" definition to be able to compile the MacOS X
8b9a1c
!  * version with os_unix.c instead of os_mac.c. Based on the result
8b9a1c
   * of ./configure for console MacOS X.
8b9a1c
   */
8b9a1c
  
8b9a1c
*** ../vim-7.4.054/src/version.c	2013-11-02 04:39:34.000000000 +0100
8b9a1c
--- src/version.c	2013-11-02 21:01:10.000000000 +0100
8b9a1c
***************
8b9a1c
*** 740,741 ****
8b9a1c
--- 740,743 ----
8b9a1c
  {   /* Add new patch number below this line */
8b9a1c
+ /**/
8b9a1c
+     55,
8b9a1c
  /**/
8b9a1c
8b9a1c
-- 
8b9a1c
You can be stopped by the police for biking over 65 miles per hour.
8b9a1c
You are not allowed to walk across a street on your hands.
8b9a1c
		[real standing laws in Connecticut, United States of America]
8b9a1c
8b9a1c
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
8b9a1c
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
8b9a1c
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
8b9a1c
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///