[Geany] Geany and malloc on AIX 5.3

Harri Koskinen geany_fi at xxxxx
Mon Jun 4 07:21:38 UTC 2007


Hi all,

I just finished compiling Geany on AIX v5.3 and it now works
after little tinkering.

The problem I encountered was that AIX doesn't have a 'malloc'
conforming to 'GNU malloc', so configure defines 'malloc' as
'rpl_malloc'. Geany doesn't provide this replacement
function so the compiling fails at link time.

I bypassed this by editing config.h and Geany seems to work
fine with native AIX malloc. But I think the right solution is
to provide the replacement function as autoconf documentation
suggests. Here's a sample, copy-pasted from the autoconf manual:

###snip###

#if HAVE_CONFIG_H
# include <config.h>
#endif
#undef malloc

#include <sys/types.h>

void *malloc (size_t);

/* Allocate an N-byte block of memory from the heap.
   If N is zero, allocate a 1-byte block.  */

void *
rpl_malloc (size_t n)
{
	if (n == 0)
		n = 1;
	return malloc (n);
}

###snip###

Best regards,
-Harri



More information about the Users mailing list