]> git.eshelyaron.com Git - emacs.git/commitdiff
Work around performance bug on OS X 10.8 and earlier.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 20 Sep 2013 03:41:37 +0000 (20:41 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 20 Sep 2013 03:41:37 +0000 (20:41 -0700)
Perhaps Apple will fix this bug some day.
See the thread starting with Daniel Colascione's email in:
http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00343.html
* configure.ac (FORTIFY_SOUR): New verbatim section.

ChangeLog
configure.ac

index 7d21714922c4caf41641a59ec16808a2c0697077..07967de1cbe29532dddb741ac52deba5a8580319 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-09-20  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Work around performance bug on OS X 10.8 and earlier.
+       Perhaps Apple will fix this bug some day.
+       See the thread starting with Daniel Colascione's email in:
+       http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00343.html
+       * configure.ac (FORTIFY_SOUR): New verbatim section.
+
 2013-09-19  Paul Eggert  <eggert@cs.ucla.edu>
 
        Merge from gnulib, incorporating:
index fe326623571e91b8c1a3fea91e5df0554752da5e..8ff33e779a84028a90deb4f304e104b3ce48329a 100644 (file)
@@ -4703,6 +4703,24 @@ AC_SUBST(CYGWIN_OBJ)
 AC_SUBST(PRE_ALLOC_OBJ)
 AC_SUBST(POST_ALLOC_OBJ)
 
+dnl Call this 'FORTIFY_SOUR' so that it sorts before the 'FORTIFY_SOURCE'
+dnl verbatim defined above.  The tricky name is apropos, as this hack
+dnl makes Fortify go sour!
+AH_VERBATIM([FORTIFY_SOUR],
+[/* Without the following workaround, Emacs runs slowly on OS X 10.8.
+   The workaround disables some useful run-time checking, so it
+   should be conditional to the platforms with the performance bug.
+   Perhaps Apple will fix this some day; also see m4/extern-inline.m4.  */
+#if defined __APPLE__ && defined __GNUC__
+# ifndef _DONT_USE_CTYPE_INLINE_
+#  define _DONT_USE_CTYPE_INLINE_
+# endif
+# ifndef _FORTIFY_SOURCE
+#  define _FORTIFY_SOURCE 0
+# endif
+#endif
+])
+
 # Configure gnulib.  Although this does not affect CFLAGS or LIBS permanently.
 # it temporarily reverts them to their pre-pkg-config values,
 # because gnulib needs to work with both src (which uses the