better linux / g++ support ; diff() fn