nightmaremail

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

ndelay.c (210B)


      1 #include "ndelay.h"
      2 
      3 #include <sys/types.h>
      4 #include <fcntl.h>
      5 
      6 #ifndef O_NONBLOCK
      7 #define O_NONBLOCK O_NDELAY
      8 #endif
      9 
     10 int ndelay_on(fd)
     11 int fd;
     12 {
     13   return fcntl(fd,F_SETFL,fcntl(fd,F_GETFL,0) | O_NONBLOCK);
     14 }