This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
Re: [PATCH] HPUX: fix dlmalloc build
- From: Anthony Green <green at redhat dot com>
- To: Oren Held <orenhe at il dot ibm dot com>
- Cc: libffi-discuss at sourceware dot org
- Date: Tue, 08 Feb 2011 10:51:56 -0500
- Subject: Re: [PATCH] HPUX: fix dlmalloc build
- References: <1293707067-16085-1-git-send-email-orenhe@il.ibm.com> <4D1CBA42.4090909@il.ibm.com>
Oren Held <orenhe@il.ibm.com> writes:
> I can think of three options, but not sure what's the smartest way:
> 1. If we prefer the OS native mallinfo declaration: have autoconf add
> #define HAVE_USR_INCLUDE_MALLOC_H if it's an HP that has 'struct
> malloc' in its /usr/include/stdlib.h
>
> 2. If we prefer the libffi (dlmalloc.c) mallinfo decleration:
> 2.a. Simply add #define _STRUCT_MALLINFO inside dlmalloc.c, in the block
> that declares the mallinfo struct. There's a very low risk that this
> constant would affect other OSes badly and cause the problem.
> 2.b. Do the above only for HPUX - probably needs an autoconf change.
>
> The previously attached patch is the #2.a. solution. I'm not familiar
> with autoconf, and I'm not very sure which 'struct mallinfo'
> impementation to prefer, thus I didn't implement solution #1 or #2.b.
I went with 2.a for now. I'll make a smarter patch if we discover any
problems while testing the next release.
Thanks!
AG