This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] Adjust open flags in gdb.base/fileio.c
- From: Mark Kettenis <kettenis at chello dot nl>
- To: gdb-patches at sources dot redhat dot com
- Date: Sun, 1 Feb 2004 19:51:33 +0100 (CET)
- Subject: [PATCH] Adjust open flags in gdb.base/fileio.c
OpenBSD doesn't accept the particular combination of O_... flags
chosen here. This fixes the problem as discussed before.
Committed,
Mark
Index: testsuite/ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* gdb.base/fileio.c (test_open): Replace O_RDONLY with O_RDWR such
that opening the file succeeds on OpenBSD.
Index: testsuite/gdb.base/fileio.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/fileio.c,v
retrieving revision 1.6
diff -u -p -r1.6 fileio.c
--- testsuite/gdb.base/fileio.c 7 Jan 2004 16:39:02 -0000 1.6
+++ testsuite/gdb.base/fileio.c 1 Feb 2004 18:48:18 -0000
@@ -75,7 +75,7 @@ test_open ()
/* Test opening */
errno = 0;
- ret = open (FILENAME, O_CREAT | O_TRUNC | O_RDONLY, S_IWUSR | S_IRUSR);
+ ret = open (FILENAME, O_CREAT | O_TRUNC | O_RDWR, S_IWUSR | S_IRUSR);
printf ("open 1: ret = %d, errno = %d %s\n", ret, errno,
ret >= 0 ? "OK" : "");
if (ret >= 0)