diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/termcap.c | 8 |
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 (); | |||
| 46 | #define NULL (char *) 0 | 46 | #define NULL (char *) 0 |
| 47 | #endif | 47 | #endif |
| 48 | 48 | ||
| 49 | #ifndef O_RDONLY | ||
| 50 | #define O_RDONLY 0 | ||
| 51 | #endif | ||
| 52 | |||
| 49 | /* BUFSIZE is the initial size allocated for the buffer | 53 | /* BUFSIZE is the initial size allocated for the buffer |
| 50 | for reading the termcap file. | 54 | for reading the termcap file. |
| 51 | It is not a limit. | 55 | It is not a limit. |
| @@ -459,9 +463,9 @@ tgetent (bp, name) | |||
| 459 | /* Here we know we must search a file and termcap_name has its name. */ | 463 | /* Here we know we must search a file and termcap_name has its name. */ |
| 460 | 464 | ||
| 461 | #ifdef MSDOS | 465 | #ifdef MSDOS |
| 462 | fd = open (termcap_name, O_TEXT, 0); | 466 | fd = open (termcap_name, O_RDONLY|O_TEXT, 0); |
| 463 | #else | 467 | #else |
| 464 | fd = open (termcap_name, 0, 0); | 468 | fd = open (termcap_name, O_RDONLY, 0); |
| 465 | #endif | 469 | #endif |
| 466 | if (fd < 0) | 470 | if (fd < 0) |
| 467 | return -1; | 471 | return -1; |