summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-03-08 21:38:56 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-03-08 21:38:56 +0000
commit1bb170208b975bf062b0487fa0431750aa2ff127 (patch)
tree109b45a028e76a1934871b95d025c4dcec423015
parent550b6da6600ff599b3652004379cf7f964992c4a (diff)
downloadrtems-1bb170208b975bf062b0487fa0431750aa2ff127.tar.bz2
Added support for F_GETFL and F_SETFL.
-rw-r--r--c/src/exec/libcsupport/src/fcntl.c5
-rw-r--r--c/src/lib/libc/fcntl.c5
-rw-r--r--cpukit/libcsupport/src/fcntl.c5
3 files changed, 9 insertions, 6 deletions
diff --git a/c/src/exec/libcsupport/src/fcntl.c b/c/src/exec/libcsupport/src/fcntl.c
index 9359575e51..381df45f26 100644
--- a/c/src/exec/libcsupport/src/fcntl.c
+++ b/c/src/exec/libcsupport/src/fcntl.c
@@ -95,13 +95,14 @@ int fcntl(
* XXX man page, only these flags can be added.
*/
- flags &= ~(O_APPEND | O_NONBLOCK);
+ flags = (iop->flags & ~(O_APPEND|O_NONBLOCK)) |
+ (flags & (O_APPEND|O_NONBLOCK));
/*
* XXX If we are turning on append, should we seek to the end?
*/
- iop->flags |= flags;
+ iop->flags = flags;
return 0;
case F_GETLK:
diff --git a/c/src/lib/libc/fcntl.c b/c/src/lib/libc/fcntl.c
index 9359575e51..381df45f26 100644
--- a/c/src/lib/libc/fcntl.c
+++ b/c/src/lib/libc/fcntl.c
@@ -95,13 +95,14 @@ int fcntl(
* XXX man page, only these flags can be added.
*/
- flags &= ~(O_APPEND | O_NONBLOCK);
+ flags = (iop->flags & ~(O_APPEND|O_NONBLOCK)) |
+ (flags & (O_APPEND|O_NONBLOCK));
/*
* XXX If we are turning on append, should we seek to the end?
*/
- iop->flags |= flags;
+ iop->flags = flags;
return 0;
case F_GETLK:
diff --git a/cpukit/libcsupport/src/fcntl.c b/cpukit/libcsupport/src/fcntl.c
index 9359575e51..381df45f26 100644
--- a/cpukit/libcsupport/src/fcntl.c
+++ b/cpukit/libcsupport/src/fcntl.c
@@ -95,13 +95,14 @@ int fcntl(
* XXX man page, only these flags can be added.
*/
- flags &= ~(O_APPEND | O_NONBLOCK);
+ flags = (iop->flags & ~(O_APPEND|O_NONBLOCK)) |
+ (flags & (O_APPEND|O_NONBLOCK));
/*
* XXX If we are turning on append, should we seek to the end?
*/
- iop->flags |= flags;
+ iop->flags = flags;
return 0;
case F_GETLK: