Changeset d3490f27 in rtems
- Timestamp:
- 03/07/06 21:02:45 (18 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 75bf564
- Parents:
- f0ad529
- Location:
- cpukit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/ChangeLog
rf0ad529 rd3490f27 1 2006-03-07 Till Strauman <strauman@slac.stanford.edu> 2 3 PR 886/filesystem 4 * libcsupport/src/libio.c: fcntl(fd,F_GETFL) fails to set O_NONBLOCK if 5 the descriptor is in non-blocking mode. 6 1 7 2006-03-07 Joel Sherrill <joel@OARcorp.com> 2 8 -
cpukit/libcsupport/src/libio.c
rf0ad529 rd3490f27 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.