in reply to A clean way to account for machine word sizes in XS code?

After getting my other code out the door I came back to this problem and I think I have a solution that works. I basically took the typemap file mentioned by tonyc and the $Config{foo} method mentioned by syphilis. I only had one other problem relating to my top-level Makefile.PL not passing the -D defines through to the make in the subdirectory (I need them both for the library in the subdir and the Perl XS code in the toplevel that was going to link against it). I managed to solve this with a bit of custom make action:
sub MY::postamble { '$(MYEXTLIB): clib/Makefile cd clib && perl Makefile.PL DEFINE="' . (join ' ', @defines) . '" && $(MAKE) $(PASSTHRU) ...

I also mentioned the possibility raised by DrHyde of using stdint.h in the comments in the library header file, and gave the user the option of using their own custom typedefs when calling the top-level Makefile.PL. All in all, thanks to your help it wasn't too difficult, and I think the code should be easy enough to understand too. Just what I wanted: simple and clean.

Thanks again,

dec