diff options
| -rw-r--r-- | ChangeLog | 11 | ||||
| -rw-r--r-- | configure.in | 25 |
2 files changed, 25 insertions, 11 deletions
| @@ -1,3 +1,14 @@ | |||
| 1 | 2012-04-22 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * configure.in (doug_lea_malloc): Check for __malloc_initialize_hook. | ||
| 4 | With glibc 2.14 or later, when compiled with GCC 4.7.0's | ||
| 5 | -Werror=deprecated-declarations flag, use of hooks like | ||
| 6 | __malloc_initialize_hook causes compilation to fail because these | ||
| 7 | hooks are deprecated. Modify 'configure' to check for these hooks too. | ||
| 8 | Simplify the 'configure' code to test for all the hooks at once. | ||
| 9 | (emacs_cv_var___after_morecore_hook): Remove, replacing with ... | ||
| 10 | (emacs_cv_var_doug_lea_malloc): ... this new var. | ||
| 11 | |||
| 1 | 2012-04-21 Paul Eggert <eggert@cs.ucla.edu> | 12 | 2012-04-21 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 13 | ||
| 3 | Sync from gnulib version 4f11d6bebc3098c64ffde27079ab0d0cecfd0cdc | 14 | Sync from gnulib version 4f11d6bebc3098c64ffde27079ab0d0cecfd0cdc |
diff --git a/configure.in b/configure.in index c9592921e75..e4e11bdf7b5 100644 --- a/configure.in +++ b/configure.in | |||
| @@ -1708,17 +1708,20 @@ esac | |||
| 1708 | # Do the opsystem or machine files prohibit the use of the GNU malloc? | 1708 | # Do the opsystem or machine files prohibit the use of the GNU malloc? |
| 1709 | # Assume not, until told otherwise. | 1709 | # Assume not, until told otherwise. |
| 1710 | GNU_MALLOC=yes | 1710 | GNU_MALLOC=yes |
| 1711 | doug_lea_malloc=yes | 1711 | |
| 1712 | AC_CHECK_FUNC(malloc_get_state, ,doug_lea_malloc=no) | 1712 | AC_CACHE_CHECK( |
| 1713 | AC_CHECK_FUNC(malloc_set_state, ,doug_lea_malloc=no) | 1713 | [whether malloc is Doug Lea style], |
| 1714 | AC_CACHE_CHECK(whether __after_morecore_hook exists, | 1714 | [emacs_cv_var_doug_lea_malloc], |
| 1715 | emacs_cv_var___after_morecore_hook, | 1715 | [AC_LINK_IFELSE( |
| 1716 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern void (* __after_morecore_hook)();]],[[__after_morecore_hook = 0]])], | 1716 | [AC_LANG_PROGRAM( |
| 1717 | emacs_cv_var___after_morecore_hook=yes, | 1717 | [[#include <malloc.h> |
| 1718 | emacs_cv_var___after_morecore_hook=no)]) | 1718 | static void hook (void) {}]], |
| 1719 | if test $emacs_cv_var___after_morecore_hook = no; then | 1719 | [[malloc_set_state (malloc_get_state ()); |
| 1720 | doug_lea_malloc=no | 1720 | __after_morecore_hook = hook; |
| 1721 | fi | 1721 | __malloc_initialize_hook = hook;]])], |
| 1722 | [emacs_cv_var_doug_lea_malloc=yes], | ||
| 1723 | [emacs_cv_var_doug_lea_malloc=no])]) | ||
| 1724 | doug_lea_malloc=$emacs_cv_var_doug_lea_malloc | ||
| 1722 | 1725 | ||
| 1723 | 1726 | ||
| 1724 | dnl See comments in aix4-2.h about maybe using system malloc there. | 1727 | dnl See comments in aix4-2.h about maybe using system malloc there. |