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