diff options
author | Michael Bushnell <mib@gnu.org> | 1994-10-05 01:52:40 +0000 |
---|---|---|
committer | Michael Bushnell <mib@gnu.org> | 1994-10-05 01:52:40 +0000 |
commit | f4d21c5c16defef5a901e160c93991765b5fbc9d (patch) | |
tree | 5a430b6e990ccdb8b8a7a1068a99c3ca8bd6be26 | |
parent | 0c85e387f59ea6b88f831eb2986697f94790a51a (diff) | |
download | gcc-f4d21c5c16defef5a901e160c93991765b5fbc9d.zip gcc-f4d21c5c16defef5a901e160c93991765b5fbc9d.tar.gz gcc-f4d21c5c16defef5a901e160c93991765b5fbc9d.tar.bz2 |
Define O_RDONLY if not already defined and use it in read_specs's call
to open.
From-SVN: r8217
-rw-r--r-- | gcc/gcc.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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) |