Changeset 3195d9c in rtems
- Timestamp:
- 03/08/99 21:39:16 (24 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- b10f6e1
- Parents:
- 1bb17020
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/exec/libcsupport/src/libio.c
r1bb17020 r3195d9c 159 159 unsigned32 fcntl_flags = 0; 160 160 161 fcntl_flags = rtems_assoc_remote_by_local( access_modes_assoc, flags ); 162 fcntl_flags |= 163 rtems_assoc_remote_by_local_bitfield(status_flags_assoc, flags); 161 if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 162 fcntl_flags |= O_RDWR; 163 } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 164 fcntl_flags |= O_RDONLY; 165 } else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) { 166 fcntl_flags |= O_WRONLY; 167 } 168 169 if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) { 170 fcntl_flags |= O_NDELAY; 171 } 172 173 if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 174 fcntl_flags |= O_APPEND; 175 } 176 177 if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 178 fcntl_flags |= O_CREAT; 179 } 180 164 181 return fcntl_flags; 165 182 } -
c/src/lib/libc/libio.c
r1bb17020 r3195d9c 159 159 unsigned32 fcntl_flags = 0; 160 160 161 fcntl_flags = rtems_assoc_remote_by_local( access_modes_assoc, flags ); 162 fcntl_flags |= 163 rtems_assoc_remote_by_local_bitfield(status_flags_assoc, flags); 161 if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 162 fcntl_flags |= O_RDWR; 163 } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 164 fcntl_flags |= O_RDONLY; 165 } else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) { 166 fcntl_flags |= O_WRONLY; 167 } 168 169 if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) { 170 fcntl_flags |= O_NDELAY; 171 } 172 173 if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 174 fcntl_flags |= O_APPEND; 175 } 176 177 if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 178 fcntl_flags |= O_CREAT; 179 } 180 164 181 return fcntl_flags; 165 182 } -
cpukit/libcsupport/src/libio.c
r1bb17020 r3195d9c 159 159 unsigned32 fcntl_flags = 0; 160 160 161 fcntl_flags = rtems_assoc_remote_by_local( access_modes_assoc, flags ); 162 fcntl_flags |= 163 rtems_assoc_remote_by_local_bitfield(status_flags_assoc, flags); 161 if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 162 fcntl_flags |= O_RDWR; 163 } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 164 fcntl_flags |= O_RDONLY; 165 } else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) { 166 fcntl_flags |= O_WRONLY; 167 } 168 169 if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) { 170 fcntl_flags |= O_NDELAY; 171 } 172 173 if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 174 fcntl_flags |= O_APPEND; 175 } 176 177 if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 178 fcntl_flags |= O_CREAT; 179 } 180 164 181 return fcntl_flags; 165 182 }
Note: See TracChangeset
for help on using the changeset viewer.