> # include <fcntl.h> > # ifdef FNDELAY > # define BSD > # else > # define SYS5 > # endif This should work on 4.2BSD and all UNIX System III and V releases. It would be a compile-time error on older UNIXes. I still prefer writing code for ONE environment rather than having to juggle two at the same time.