autoconf-patches
[Top][All Lists]
Advanced

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

FYI: #undef malloc in mmap test


From: Akim Demaille
Subject: FYI: #undef malloc in mmap test
Date: 21 Jan 2002 14:28:45 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp)

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * lib/autoconf/functions.m4 (AC_FUNC_MMAP): #Undef malloc.

Index: TODO
===================================================================
RCS file: /cvsroot/autoconf/autoconf/TODO,v
retrieving revision 1.117
diff -u -u -r1.117 TODO
--- TODO 25 Nov 2001 15:13:03 -0000 1.117
+++ TODO 21 Jan 2002 13:23:08 -0000
@@ -23,6 +23,16 @@
 ** autom4te and warnings.
 Decide what must be done.
 
+** AC_DEFINE(func, rpl_func)
+This scheme causes problems: if for instance, #define malloc
+rpl_malloc, then the rest of configure will use an undefined malloc.
+Hence some tests fail.  Up to now we simply #undef these functions
+where we had a problem (cf. AC_FUNC_MKTIME and AC_FUNC_MMAP for
+instance).  This is _bad_.  Maybe the #define func rpl_malloc should
+be performed in another file than confdefs.h, say confh.h, which is
+used for config.h generation, but not used in configure's own tests.
+
+
 ** Automake 1.6
 *** AC_LIBOBJ_DECL
 Decide with the Automake team whether this macro should list only `.c'
Index: lib/autoconf/functions.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/functions.m4,v
retrieving revision 1.54
diff -u -u -r1.54 functions.m4
--- lib/autoconf/functions.m4 11 Jan 2002 13:25:09 -0000 1.54
+++ lib/autoconf/functions.m4 21 Jan 2002 13:23:08 -0000
@@ -888,7 +888,10 @@
 AC_CHECK_FUNCS(getpagesize)
 AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped,
 [AC_RUN_IFELSE([AC_LANG_SOURCE([AC_INCLUDES_DEFAULT]
-[[/* Thanks to Mike Haertel and Jim Avera for this test.
+[[/* malloc might have been renamed as rpl_malloc. */
+#undef malloc
+
+/* Thanks to Mike Haertel and Jim Avera for this test.
    Here is a matrix of mmap possibilities:
        mmap private not fixed
        mmap private fixed at somewhere currently unmapped




reply via email to

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