[Win32utils-devel] Windows platform detection
luislavena at gmail.com
Tue Jan 18 06:44:15 EST 2011
On Tue, Jan 18, 2011 at 1:01 AM, Daniel Berger <djberg96 at gmail.com> wrote:
> Is there any reason we can't use this to detect Windows?
> File::PATH_SEPARATOR == ';'
> Is there any other platform that uses ';' as a path separator?
If you're doing cross-compilation, that can't be used as is not been set.
mkmf extensions that contain code that depends on the platform will
not be able to be cross compiled if you use that.
RUBY_PLATFORM and File::ALT_SEPARATOR are the only ones been set.
Normally ALT_SEPARATOR is nil on every platform except Windows.
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry
More information about the win32utils-devel