Changeset 5b78cd6 in rtems
- Timestamp:
- 03/07/06 21:02:00 (18 years ago)
- Children:
- 79eb6e21
- Parents:
- ec24e126
- Location:
- cpukit/libcsupport
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/libcsupport/ChangeLog
rec24e126 r5b78cd6 1 2006-03-07 Till Strauman <strauman@slac.stanford.edu> 2 3 PR 886/filesystem 4 * src/libio.c: fcntl(fd,F_GETFL) fails to set O_NONBLOCK if the 5 descriptor is in non-blocking mode. 6 1 7 2005-08-31 Ralf Corsepius <ralf.corsepius@rtems.org> 2 8 -
cpukit/libcsupport/src/libio.c
rec24e126 r5b78cd6 27 27 #include <errno.h> 28 28 29 #if ! defined(O_NDELAY) 30 # if defined(solaris2) 31 # define O_NDELAY O_NONBLOCK 32 # elif defined(__CYGWIN__) 33 # define O_NDELAY _FNBIO 34 # elif defined(RTEMS_NEWLIB) 35 # define O_NDELAY _FNBIO 36 # endif 37 #endif 38 29 /* define this to alias O_NDELAY to O_NONBLOCK, i.e., 30 * O_NDELAY is accepted on input but fcntl(F_GETFL) returns 31 * O_NONBLOCK. This is because rtems has no distinction 32 * between the two (but some systems have). 33 * Note that accepting this alias creates a problem: 34 * an application trying to clear the non-blocking flag 35 * using a 36 * 37 * fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) & ~O_NDELAY); 38 * 39 * does (silently) ignore the operation. 40 */ 41 #undef ACCEPT_O_NDELAY_ALIAS 39 42 40 43 #include <errno.h> … … 115 118 116 119 rtems_assoc_t status_flags_assoc[] = { 120 #ifdef ACCEPT_O_NDELAY_ALIAS 117 121 { "NO DELAY", LIBIO_FLAGS_NO_DELAY, O_NDELAY }, 122 #endif 118 123 { "NONBLOCK", LIBIO_FLAGS_NO_DELAY, O_NONBLOCK }, 119 124 { "APPEND", LIBIO_FLAGS_APPEND, O_APPEND }, … … 167 172 168 173 if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) { 169 fcntl_flags |= O_N DELAY;174 fcntl_flags |= O_NONBLOCK; 170 175 } 171 176
Note: See TracChangeset
for help on using the changeset viewer.