Re: RTLD_NOW [FreeBSD]; libgnome/gnome-parse.c patch



> Or is it that <malloc.h> loses by printing a warning?

Josh> The latter.

Josh> Dan McGuirk has suggested a solution involving a HAVE_MALLOC_H
Josh> define.  This might not work, but I have yet had time [it's
Josh> finals time at UC Berkeley] to try it...

Yeah, this will work.  There's a trick, though.  See below.

Josh> If you can deal with it, so much the better. :) But since it's
Josh> just a warning, and FreeBSD-specific, I can play with it later
Josh> while you spend your time on more pressing issues...

Yeah -- as if I've been doing anything except sending email lately.
Bleah.


The trick is that detecting warnings isn't something autoconf usually
does.  Here's one way to approach it.  This will only work if you
always use gcc on FreeBSD; if you use a different compiler then it
will erroneously detect that you have <malloc.h>.  This is untested.
Try putting this into your gnome-libs/configure.in (near other header
tests) and see if it detects things properly.

    save_CC="$CC"
    if test "$GCC" = yes; then
      CC="$CC -Werror"
    fi
    AC_CHECK_HEADERS(malloc.h)
    CC="$save_CC"


I have to say I'm not especially thrilled with FreeBSD's <malloc.h>.
I wonder why they did it that way, instead of just making it empty, or
removing it.


If you try this, and it works, send me a patch and a ChangeLog entry,
and I'll check it in.

Tom



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]