This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]