bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#647: 23.0.60; NSInteger changes in nsterm.h break the GNUstep build


From: Chong Yidong
Subject: bug#647: 23.0.60; NSInteger changes in nsterm.h break the GNUstep build
Date: Mon, 04 Aug 2008 12:05:54 -0400

Could you apply the following patch and see if it does the right thing?
It tries to detect the existence of NSInteger in configure.

*** trunk/configure.in.~1.552.~ 2008-07-31 12:18:39.000000000 -0400
--- trunk/configure.in  2008-08-04 12:02:38.000000000 -0400
***************
*** 2046,2051 ****
--- 2046,2055 ----
    if test "${NS_IMPL_GNUSTEP}" = "yes"; then
      AC_DEFINE(NS_IMPL_GNUSTEP, 1, [Define to 1 if you are using NS windowing 
under GNUstep.])
    fi
+   AC_TRY_COMPILE([#include <Foundation/NSObjCRuntime.h>], [NSInteger i;], 
NS_HAVE_NSINTEGER=yes, NS_HAVE_NSINTEGER=no)
+   if test "${NS_HAVE_NSINTEGER}" = "yes"; then
+     AC_DEFINE(NS_HAVE_NSINTEGER, 1, [Define to 1 if `NSInteger' is defined.])
+   fi
    # We also have mouse menus.
    HAVE_MENUS=yes
  fi
*** trunk/configure~    2008-08-04 12:03:19.000000000 -0400
--- trunk/configure     2008-08-04 12:03:27.000000000 -0400
***************
*** 14849,14854 ****
--- 14849,14902 ----
  _ACEOF
  
    fi
+   cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ #include <Foundation/NSObjCRuntime.h>
+ int
+ main ()
+ {
+ NSInteger i;
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+ if { (ac_try="$ac_compile"
+ case "(($ac_try" in
+   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+   *) ac_try_echo=$ac_try;;
+ esac
+ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+   (eval "$ac_compile") 2>conftest.er1
+   ac_status=$?
+   grep -v '^ *+' conftest.er1 >conftest.err
+   rm -f conftest.er1
+   cat conftest.err >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+        } && test -s conftest.$ac_objext; then
+   NS_HAVE_NSINTEGER=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+ 
+       NS_HAVE_NSINTEGER=no
+ fi
+ 
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   if test "${NS_HAVE_NSINTEGER}" = "yes"; then
+ 
+ cat >>confdefs.h <<\_ACEOF
+ #define NS_HAVE_NSINTEGER 1
+ _ACEOF
+ 
+   fi
    # We also have mouse menus.
    HAVE_MENUS=yes
  fi
*** trunk/src/nsterm.h.~1.9.~   2008-08-02 18:22:33.000000000 -0400
--- trunk/src/nsterm.h  2008-08-04 12:02:47.000000000 -0400
***************
*** 364,370 ****
  @end
  #endif
  
! #if defined (NS_IMPL_GNUSTEP) || ( defined (NS_IMPL_COCOA) && 
MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4)
  typedef long NSInteger;
  typedef unsigned long NSUInteger;
  #endif /* NS_IMPL_GNUSTEP || (NS_IMPL_COCOA and <= 10.4) */
--- 364,370 ----
  @end
  #endif
  
! #ifndef NS_HAVE_NSINTEGER
  typedef long NSInteger;
  typedef unsigned long NSUInteger;
  #endif /* NS_IMPL_GNUSTEP || (NS_IMPL_COCOA and <= 10.4) */






reply via email to

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