This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] HPUX: fix dlmalloc build


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]