in reply to Splitting an extension based on OS

I'd say that splitting XS in two parts really depends on the amount of the ifdef'd code. If it is small, do not split, otherwise do. You might even want to create win32.c and unix.c with common API that is called from the single XS.

There's one thing more: cygwin and mingw environments. These two are curious mixes of pure win32 and unix APIs, and before attempting the separation I'd recommend to run your code on these first.

Replies are listed 'Best First'.
Re^2: Splitting an extension based on OS
by syphilis (Archbishop) on Nov 07, 2007 at 07:20 UTC
    Thanks for the thoughts, guys. The idea of having the XS file simply load the relevant file looks like a particularly good one to me - mainly because it *does* lend itself so readily to the inclusion of additional files for other operating systems (should the need arise).

    Cheers,
    Rob