<fcntl.h> doesn't seem to define fcntl()...nor does <sys/fcntl.h> Specifically I need it for this function: void nonblock(socket_t s) { int flags; flags = fcntl(s, F_GETFL, 0); flags |= O_NONBLOCK; if (fcntl(s, F_SETFL, flags) < 0) { perror("Fatal error executing nonblock (comm.c)"); exit(1); } } What is the correct way to make a socket non-blocking? (If no way I'll use my current work-around #define POSIX_NONBLOCKING_BROKEN) And also, where is gettimeofday()? Not <sys/time.h>, <time.h>... I've cheated by prototyping it at 'int gettimeofday()' but as I have not linked it yet I do not know it it will work. PS - Pico always says it can unjustify after doing a search. The search options for UNIX include ^Y and ^V to go to the top and bottom of the file respectively, which Pico on the VAX doesn't. (I also hate typing 'ls' and getting an editor, but that's OS differences) :) -- [log in to unmask] \ Genius may have its limitations, but stupidity http://www.van.ml.org/~greerga \ is not thus handicapped. -- Elbert Hubbard