From f4d21c5c16defef5a901e160c93991765b5fbc9d Mon Sep 17 00:00:00 2001 From: Michael Bushnell Date: Wed, 5 Oct 1994 01:52:40 +0000 Subject: [PATCH] Define O_RDONLY if not already defined and use it in read_specs's call to open. From-SVN: r8217 --- gcc/gcc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/gcc.c b/gcc/gcc.c index e1e870e6423..db9c49af7ef 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -100,6 +100,11 @@ compilation is specified by a string called a "spec". */ #define NULL 0 #endif +/* Define O_RDONLY if the system hasn't defined it for us. */ +#ifndef O_RDONLY +#define O_RDONLY 0 +#endif + #ifndef GENERIC_PTR #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined (__STDC__) #define GENERIC_PTR void * @@ -1045,7 +1050,7 @@ read_specs (filename) fprintf (stderr, "Reading specs from %s\n", filename); /* Open and stat the file. */ - desc = open (filename, 0, 0); + desc = open (filename, O_RDONLY, 0); if (desc < 0) pfatal_with_name (filename); if (stat (filename, &statbuf) < 0) -- 2.30.2