-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Bruno Haible on 9/9/2007 7:14 AM: > I take this as an OK to the proposal, so I'm committing the change, likewise > for malloc and realloc, without the renaming of modules (for now). > > # Test whether malloc, realloc, calloc are POSIX compliant, > # Set gl_cv_func_malloc_posix to yes or no accordingly. > AC_DEFUN([gl_CHECK_MALLOC_POSIX], > [ > AC_CACHE_CHECK([whether malloc, realloc, calloc are POSIX compliant], > [gl_cv_func_malloc_posix], > [ > dnl It is too dangerous to try to allocate a large amount of memory: > dnl some systems go to their knees when you do that. So assume that > dnl all Unix implementations of the function are POSIX compliant. > AC_TRY_COMPILE([], > [#if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) > choke me > #endif > ], [gl_cv_func_malloc_posix=yes], [gl_cv_func_malloc_posix=no])
It looks like you got this backwards. It is setting gl_cv_func_malloc_posix=yes on mingw, no on cygwin, whereas it is only mingw that is not posix-compliant. > --- lib/malloc.c 9 Sep 2007 13:01:44 -0000 1.11 > --- 16,54 ---- > along with this program; if not, write to the Free Software Foundation, > Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ > > ! /* written by Jim Meyering and Bruno Haible */ > > #include <config.h> > ! /* Only the AC_FUNC_MALLOC macro defines 'malloc' already in config.h. */ > ! #ifdef malloc > ! # define NEED_MALLOC_GNU > ! # undef malloc > ! #endif With the result that on cygwin, rpl_malloc ended up being instantiated, and calling itself in infinite recursion, making it impossible to malloc anything. - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG5Tgy84KuGfSFAYARAosUAJsEJ6XztfDHj51uSir31xOHL0NZigCfZRym t/9BgTLXYsFGoWhcwv+qfLk= =Mw4j -----END PGP SIGNATURE-----