[Gllug] continuing the autoconf saga... AC_FUNC_MALLOC

Stig Brautaset stigbrau at start.no
Sat Jun 29 14:43:26 UTC 2002


Hi again,

I've got another problem with autoconf...

The documentation for the AC_FUNC_MALLOC this:

 - Macro: AC_FUNC_MALLOC
	If the `malloc' works correctly (`malloc (0)' returns a valid
	pointer), define `HAVE_MALLOC'.

I've checked, on my platform malloc() does indeed return a valid
pointer. The program to test this:

#include <stdlib.h>
#include <stdio.h>

int main(void)
{
	char *s;
	s = malloc(0);
	if (s) puts("malloc returned pointer");
	else puts("malloc returned NULL");
	return 0;
}

Regardless, the HAVE_MALLOC persists undefined in my config.h. Can
anyone shed any light on this?

stig at arwen:/etc$ uname -a && cat /etc/debian_version 
Linux arwen 2.4.18 #1 Mon Jun 10 17:19:58 BST 2002 i686 unknown
3.0


Stig

-- 
brautaset.org


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list