scope of header files
john at repetae.net
Thu Mar 6 22:47:25 EST 2008
On Fri, Mar 07, 2008 at 03:04:46AM +0000, Duncan Coutts wrote:
> > Though, if there were a way to figure that stuff out without a c
> > compiler in a portable way, that would be cool.
> It is specified by the platform C ABI. So it varies from one platform to
> another, but it is specified for most platforms, that's what allows you
> to link code compiled by different C compilers and have it work.
Yeah, I was thinking about a potentially unknown platform, so you can
distribute portable code that is only localized when it is finally
compiled for the given platform.
Though, I should look at that code for calculating the offsets in c2hs,
those could come in handy. I have some code in jhc to take a generic jhc
library and specialize it for a given architecture, adding the ability
to figure out structure offsets would be useful too. The idea is that to
install a jhc library all you need to do is grab a single 'hl' file and
drop it somewhere, but you can optionally re-optimize it specifically
for your platform, (presumably after pulling it down from the web or
hackage or somewhere..)
John Meacham - ⑆repetae.net⑆john⑈
More information about the Glasgow-haskell-users