changeset 7685:5fbc009f3dc3

*** empty log message ***
author Roland McGrath <roland@gnu.org>
date Wed, 25 May 1994 23:06:05 +0000
parents ec7caebc4a1d
children 814e18e2d3d4
files src/termcap.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/termcap.c	Wed May 25 22:09:47 1994 +0000
+++ b/src/termcap.c	Wed May 25 23:06:05 1994 +0000
@@ -46,6 +46,10 @@
 #define NULL (char *) 0
 #endif
 
+#ifndef O_RDONLY
+#define O_RDONLY 0
+#endif
+
 /* BUFSIZE is the initial size allocated for the buffer
    for reading the termcap file.
    It is not a limit.
@@ -459,9 +463,9 @@
   /* Here we know we must search a file and termcap_name has its name.  */
 
 #ifdef MSDOS
-  fd = open (termcap_name, O_TEXT, 0);
+  fd = open (termcap_name, O_RDONLY|O_TEXT, 0);
 #else
-  fd = open (termcap_name, 0, 0);
+  fd = open (termcap_name, O_RDONLY, 0);
 #endif
   if (fd < 0)
     return -1;