> > IIRC I tried but gcc then complained I have two case statements in my > > switch with the same value. > > Yes, that's correct. You'd probably need to add something along the lines > of: > > #ifndef __GNUC__ > EWOULDBLOCK: > #else > EAGAIN: > #endif > Why not #if EWOULDBLOCK != EAGAIN case EAGAIN: #endif case EWOULDBLOCK: -andrey