Mkmf & checking for a struct

In an extconf.rb, f I check for the existence of a struct type with:

have_type(‘struct toto’, [‘blah.h’])

it will define the constant HAVE_TYPE_STRUCT TOTO (notice the space).
That seems broken to me.

Shouldn’t the line, in have_type:

$defs.push(format("-DHAVE_TYPE_%s", type.upcase))

be replaced by:

$defs.push(format("-DHAVE_TYPE_%s", type.upcase.join("_")))

?

Guillaume.

Sorry to reply to myself. I actually meant:

$defs.push(format(“-DHAVE_TYPE_%s”, type.upcase.split.join(“_”)))

Guillaume.

···

On Mon, 2004-05-10 at 16:10, Guillaume Marcais wrote:

be replaced by:

$defs.push(format(“-DHAVE_TYPE_%s”, type.upcase.join(“_”)))