started portability code.
not useful now, except for testing that it still works with linux...