summaryrefslogtreecommitdiff
path: root/src/termcap.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1994-05-25 23:06:05 +0000
committerRoland McGrath <roland@gnu.org>1994-05-25 23:06:05 +0000
commite2497b699f0cd6526084f38ecf736f683e5313aa (patch)
tree50e8428123f5f3b9902f3d544b47b7a254a3a5fc /src/termcap.c
parent93c14ff48f3ebf1b7efc42248239b764d1a2628a (diff)
downloademacs-e2497b699f0cd6526084f38ecf736f683e5313aa.tar.gz
*** empty log message ***
Diffstat (limited to 'src/termcap.c')
-rw-r--r--src/termcap.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/termcap.c b/src/termcap.c
index 6261a1fb16e..a1bbab2d9d9 100644
--- a/src/termcap.c
+++ b/src/termcap.c
@@ -46,6 +46,10 @@ char *realloc ();
#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 @@ tgetent (bp, name)
/* 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;