emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r110415: Check for OSX >= 10.4 to mat


From: Jan D.
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r110415: Check for OSX >= 10.4 to match what the maunal says and what we actually support.
Date: Sun, 07 Oct 2012 12:07:23 +0200
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 110415
committer: Jan D. <address@hidden>
branch nick: trunk
timestamp: Sun 2012-10-07 12:07:23 +0200
message:
  Check for OSX >= 10.4 to match what the maunal says and what we actually 
support.
  
  * configure.ac: Check that OSX is 10.4 or newer.
  
  * etc/NEWS (NextStep/OSX port changes): OSX 10.4 or newer is required.
  
  * src/nsfns.m (Fns_list_services): Remove comment and check for OSX < 10.4.
  (ns_do_applescript): Remove check for >= MAC_OS_X_VERSION_10_4.
  
  * src/nsimage.m (setPixmapData, getPixelAtX, setAlphaAtX): Remove onTiger.
  
  * src/nsmenu.m (fillWithWidgetValue:): Remove code for < 
MAC_OS_X_VERSION_10_2.
  
  * src/nsselect.m (ns_string_from_pasteboard): Remove check for >=
  MAC_OS_X_VERSION_10_4.
  
  * src/nsterm.h (MAC_OS_X_VERSION_10_3, onTiger): Remove.
  (EmacsApp): Remove check for >= MAC_OS_X_VERSION_10_4.
  (struct nsfont_info): Remove check for >= MAC_OS_X_VERSION_10_3.
modified:
  ChangeLog
  configure.ac
  etc/ChangeLog
  etc/NEWS
  src/ChangeLog
  src/nsfns.m
  src/nsimage.m
  src/nsmenu.m
  src/nsselect.m
  src/nsterm.h
  src/nsterm.m
=== modified file 'ChangeLog'
--- a/ChangeLog 2012-10-07 02:26:03 +0000
+++ b/ChangeLog 2012-10-07 10:07:23 +0000
@@ -1,3 +1,7 @@
+2012-10-07  Jan Djärv  <address@hidden>
+
+       * configure.ac: Check that OSX is 10.4 or newer.
+
 2012-10-07  Paul Eggert  <address@hidden>
 
        Improve sys_siglist detection.

=== modified file 'configure.ac'
--- a/configure.ac      2012-10-07 02:26:03 +0000
+++ b/configure.ac      2012-10-07 10:07:23 +0000
@@ -1510,10 +1510,26 @@
   AC_CHECK_HEADER([AppKit/AppKit.h], [HAVE_NS=yes],
                  [AC_MSG_ERROR([`--with-ns' was specified, but the include
   files are missing or cannot be compiled.])])
+
+  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AppKit/AppKit.h>],
+                                     [
+#ifdef MAC_OS_X_VERSION_MAX_ALLOWED
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
+ ; /* OK */
+#else
+#error "OSX 10.4 or newer required"
+#endif
+#endif
+                   ])],
+                   ns_osx_have_104=yes,
+                   ns_osx_have_104=no)
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <Foundation/NSObjCRuntime.h>],
                                      [NSInteger i;])],
                    ns_have_nsinteger=yes,
                    ns_have_nsinteger=no)
+  if test $ns_osx_have_104 = no; then
+     AC_MSG_ERROR([`OSX 10.4 or newer is required']);
+  fi
   if test $ns_have_nsinteger = yes; then
     AC_DEFINE(NS_HAVE_NSINTEGER, 1, [Define to 1 if `NSInteger' is defined.])
   fi

=== modified file 'etc/ChangeLog'
--- a/etc/ChangeLog     2012-10-05 07:38:05 +0000
+++ b/etc/ChangeLog     2012-10-07 10:07:23 +0000
@@ -1,3 +1,7 @@
+2012-10-07  Jan Djärv  <address@hidden>
+
+       * NEWS (NextStep/OSX port changes): OSX 10.4 or newer is required.
+
 2012-10-05  Douglas Lewan  <address@hidden>  (tiny change)
 
        * tutorials/TUTORIAL.pt_BR: Fix typo.  (Bug#12557)

=== modified file 'etc/NEWS'
--- a/etc/NEWS  2012-10-06 18:34:23 +0000
+++ b/etc/NEWS  2012-10-07 10:07:23 +0000
@@ -191,6 +191,8 @@
 
 ** NextStep/OSX port changes.
 ---
+*** OSX 10.4 or newer is required to build Emacs.
+---
 *** Fullscreen and frame parameter fullscreen is supported.
 ---
 *** A file dialog is used when open/saved is done from the menu/toolbar.

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-10-07 09:17:17 +0000
+++ b/src/ChangeLog     2012-10-07 10:07:23 +0000
@@ -1,5 +1,23 @@
 2012-10-07  Jan Djärv  <address@hidden>
 
+       * nsterm.m (ns_update_auto_hide_menu_bar): Remove defintion of
+       MAC_OS_X_VERSION_10_6.
+       (syms_of_nsterm): Remove comment about Panther and above for 
ns-antialias-text.
+
+       * nsterm.h (MAC_OS_X_VERSION_10_3, onTiger): Remove.
+       (EmacsApp): Remove check for >= MAC_OS_X_VERSION_10_4.
+       (struct nsfont_info): Remove check for >= MAC_OS_X_VERSION_10_3.
+
+       * nsselect.m (ns_string_from_pasteboard): Remove check for >=
+       MAC_OS_X_VERSION_10_4.
+
+       * nsmenu.m (fillWithWidgetValue:): Remove code for < 
MAC_OS_X_VERSION_10_2.
+
+       * nsimage.m (setPixmapData, getPixelAtX, setAlphaAtX): Remove onTiger.
+
+       * nsfns.m (Fns_list_services): Remove comment and check for OSX < 10.4.
+       (ns_do_applescript): Remove check for >= MAC_OS_X_VERSION_10_4.
+
        * nsterm.m (ns_in_resize): Remove (Bug#12479).
        (ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove.
        (ns_clear_frame, sendEvent, windowDidResize, drawRect:): Remove 
ns_in_resize

=== modified file 'src/nsfns.m'
--- a/src/nsfns.m       2012-10-07 09:17:17 +0000
+++ b/src/nsfns.m       2012-10-07 10:07:23 +0000
@@ -1949,32 +1949,29 @@
 
   check_ns ();
   svcs = [[NSMenu alloc] initWithTitle: @"Services"];
-  [NSApp setServicesMenu: svcs];  /* this and next rebuild on <10.4 */
+  [NSApp setServicesMenu: svcs];
   [NSApp registerServicesMenuSendTypes: ns_send_types
                            returnTypes: ns_return_types];
 
 /* On Tiger, services menu updating was made lazier (waits for user to
    actually click on the menu), so we have to force things along: */
 #ifdef NS_IMPL_COCOA
-  if (NSAppKitVersionNumber >= 744.0)
+  delegate = [svcs delegate];
+  if (delegate != nil)
     {
-      delegate = [svcs delegate];
-      if (delegate != nil)
+      if ([delegate respondsToSelector: @selector (menuNeedsUpdate:)])
+        [delegate menuNeedsUpdate: svcs];
+      if ([delegate respondsToSelector:
+                       @selector (menu:updateItem:atIndex:shouldCancel:)])
         {
-          if ([delegate respondsToSelector: @selector (menuNeedsUpdate:)])
-              [delegate menuNeedsUpdate: svcs];
-          if ([delegate respondsToSelector:
-                            @selector (menu:updateItem:atIndex:shouldCancel:)])
-            {
-              int i, len = [delegate numberOfItemsInMenu: svcs];
-              for (i =0; i<len; i++)
-                  [svcs addItemWithTitle: @"" action: NULL keyEquivalent: @""];
-              for (i =0; i<len; i++)
-                  if (![delegate menu: svcs
-                           updateItem: (NSMenuItem *)[svcs itemAtIndex: i]
-                              atIndex: i shouldCancel: NO])
-                    break;
-            }
+          int i, len = [delegate numberOfItemsInMenu: svcs];
+          for (i =0; i<len; i++)
+            [svcs addItemWithTitle: @"" action: NULL keyEquivalent: @""];
+          for (i =0; i<len; i++)
+            if (![delegate menu: svcs
+                     updateItem: (NSMenuItem *)[svcs itemAtIndex: i]
+                        atIndex: i shouldCancel: NO])
+              break;
         }
     }
 #endif
@@ -2075,7 +2072,7 @@
          *result = Qt;
          // script returned an AppleScript result
          if ((typeUnicodeText == [returnDescriptor descriptorType]) ||
-#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 
MAC_OS_X_VERSION_10_4
+#if defined (NS_IMPL_COCOA)
              (typeUTF16ExternalRepresentation
               == [returnDescriptor descriptorType]) ||
 #endif

=== modified file 'src/nsimage.m'
--- a/src/nsimage.m     2012-09-24 21:38:23 +0000
+++ b/src/nsimage.m     2012-10-07 10:07:23 +0000
@@ -403,7 +403,6 @@
       if ([rep respondsToSelector: @selector (getBitmapDataPlanes:)])
         {
           bmRep = (NSBitmapImageRep *) rep;
-          onTiger = [bmRep respondsToSelector: @selector (colorAtX:y:)];
 
           if ([bmRep numberOfPlanes] >= 3)
               [bmRep getBitmapDataPlanes: pixmapData];
@@ -435,7 +434,7 @@
        | (pixmapData[0][loc] << 16) | (pixmapData[1][loc] << 8)
        | (pixmapData[2][loc]);
     }
-  else if (onTiger)
+  else
     {
       NSColor *color = [bmRep colorAtX: x y: y];
       CGFloat r, g, b, a;
@@ -445,7 +444,6 @@
         | ((int)(b * 255.0));
 
     }
-  return 0;
 }
 
 - (void) setPixelAtX: (int)x Y: (int)y toRed: (unsigned char)r
@@ -463,7 +461,7 @@
       pixmapData[2][loc] = b;
       pixmapData[3][loc] = a;
     }
-  else if (onTiger)
+  else
     {
       [bmRep setColor:
                [NSColor colorWithCalibratedRed: (r/255.0) green: (g/255.0)
@@ -483,7 +481,7 @@
 
       pixmapData[3][loc] = a;
     }
-  else if (onTiger)
+  else
     {
       NSColor *color = [bmRep colorAtX: x y: y];
       color = [color colorWithAlphaComponent: (a / 255.0)];

=== modified file 'src/nsmenu.m'
--- a/src/nsmenu.m      2012-09-23 19:36:31 +0000
+++ b/src/nsmenu.m      2012-10-07 10:07:23 +0000
@@ -722,11 +722,6 @@
 #ifdef NS_IMPL_GNUSTEP
   if ([[self window] isVisible])
     [self sizeToFit];
-#else
-#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_2
-  if ([self supermenu] == nil)
-    [self sizeToFit];
-#endif
 #endif
 }
 

=== modified file 'src/nsselect.m'
--- a/src/nsselect.m    2012-09-15 07:06:56 +0000
+++ b/src/nsselect.m    2012-10-07 10:07:23 +0000
@@ -295,7 +295,7 @@
       utfStr = [mstr UTF8String];
       length = [mstr lengthOfBytesUsingEncoding: NSUTF8StringEncoding];
 
-#if ! defined (NS_IMPL_COCOA) || MAC_OS_X_VERSION_MAX_ALLOWED < 
MAC_OS_X_VERSION_10_4
+#if ! defined (NS_IMPL_COCOA)
       if (!utfStr)
         {
           utfStr = [mstr cString];
@@ -306,7 +306,7 @@
   NS_HANDLER
     {
       message1 ("ns_string_from_pasteboard: UTF8String failed\n");
-#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 
MAC_OS_X_VERSION_10_4
+#if defined (NS_IMPL_COCOA)
       utfStr = "Conversion failed";
 #else
       utfStr = [str lossyCString];

=== modified file 'src/nsterm.h'
--- a/src/nsterm.h      2012-10-06 17:31:11 +0000
+++ b/src/nsterm.h      2012-10-07 10:07:23 +0000
@@ -26,9 +26,6 @@
 #ifdef HAVE_NS
 
 #ifdef NS_IMPL_COCOA
-#ifndef MAC_OS_X_VERSION_10_3
-#define MAC_OS_X_VERSION_10_3 1030
-#endif
 #ifndef MAC_OS_X_VERSION_10_4
 #define MAC_OS_X_VERSION_10_4 1040
 #endif
@@ -286,7 +283,6 @@
   int refCount;
   NSBitmapImageRep *bmRep; /* used for accessing pixel data */
   unsigned char *pixmapData[5]; /* shortcut to access pixel data */
-  BOOL onTiger;
   NSColor *stippleMask;
 }
 + allocInitFromFile: (Lisp_Object)file;
@@ -355,7 +351,7 @@
 
 /* ==========================================================================
 
-   Rendering on Panther and above
+   Rendering
 
    ========================================================================== 
*/
 
@@ -380,7 +376,7 @@
 extern EmacsMenu *mainMenu, *svcsMenu, *dockMenu;
 
 /* Apple removed the declaration, but kept the implementation */
-#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 
MAC_OS_X_VERSION_10_4
+#if defined (NS_IMPL_COCOA)
 @interface NSApplication (EmacsApp)
 - (void)setAppleMenu: (NSMenu *)menu;
 @end
@@ -483,10 +479,9 @@
   float size;
 #ifdef __OBJC__
   NSFont *nsfont;
-  /* cgfont and synthItal are used only on OS X 10.3+ */
-#if defined (NS_IMPL_COCOA) && (MAC_OS_X_VERSION_MAX_ALLOWED >= 
MAC_OS_X_VERSION_10_3)
+#if defined (NS_IMPL_COCOA)
   CGFontRef cgfont;
-#else /* GNUstep or OS X < 10.3 */
+#else /* GNUstep */
   void *cgfont;
 #endif
 #else /* ! OBJC */

=== modified file 'src/nsterm.m'
--- a/src/nsterm.m      2012-10-07 09:17:17 +0000
+++ b/src/nsterm.m      2012-10-07 10:07:23 +0000
@@ -569,9 +569,6 @@
 static void
 ns_update_auto_hide_menu_bar (void)
 {
-#ifndef MAC_OS_X_VERSION_10_6
-#define MAC_OS_X_VERSION_10_6 1060
-#endif
 #ifdef NS_IMPL_COCOA
 #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
   block_input ();
@@ -7087,7 +7084,7 @@
   ns_function_modifier = Qnone;
 
   DEFVAR_LISP ("ns-antialias-text", ns_antialias_text,
-               "Non-nil (the default) means to render text antialiased. Only 
has an effect on OS X Panther and above.");
+               "Non-nil (the default) means to render text antialiased.");
   ns_antialias_text = Qt;
 
   DEFVAR_LISP ("ns-confirm-quit", ns_confirm_quit,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]