Re: [PATCH] define own version of PRIdPTR on platform where its not available
Erik de Castro Lopo <[email protected]>
| Newsgroups | gmane.comp.lang.haskell.cvs.ghc |
|---|---|
| Organization | Erik Conspiracy Secret Labs |
| Message-ID | <[email protected]> |
Gabor Greif wrote:
> +1. A configure script will run (almost) till the heat death of the universe.
>
> I have a solution on the cross-compiler-alienless branch which does exactly
> what you propose: feed the relevant headers into the cross-gcc, obtain
> the offsets/sizes back
> by 'nm', and massage stuff to obtain all as macros then feed those
> into mkDerivedConstants.c.
Doesn't the offsetof macro do the right thing for get the offset of
fields within a struct?
http://en.wikipedia.org/wiki/Offsetof
Erik
--
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/