[MLton] a better c-types.h?

Stephen Weeks sweeks@sweeks.com
Sun, 25 Jun 2006 16:54:31 -0700


> It seems to me that c-types.h could be platform dependent, if instead
> of automatically generating a typedef like
> 
>   typedef /* dev_t */ Word64_t C_Dev_t;
> 
> we simply generated
> 
>   typedef dev_t C_Dev_t;
> 
> Are there any problems with this?

Unfortunately this isn't a good idea, because c-types.h is included in
c-chunk.h, which we want to keep as clean as possible for reasons
discussed earlier.  I think the way to go is to have platform-specific
includes in the build directory, with c-types.h being our first such
include.  I've committed a change along those lines.  Now, for each
target, the file layout looks like:

  build/lib/<target>/
    constants
    include/
      c-types.h
    libgdtoa.a
    libmlton.a
    libmlton-gdb.a

I wonder if a more sensible layout is:

  build/<target>/
    constants
    include/
      c-types.h
    lib/
      libgdtoa.a
      libmlton.a
      libmlton-gdb.a