OSDN Git Service

Define O_RDONLY if not already defined and use it in read_specs's call
authormib <mib@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 5 Oct 1994 01:52:40 +0000 (01:52 +0000)
committermib <mib@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 5 Oct 1994 01:52:40 +0000 (01:52 +0000)
to open.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@8217 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/gcc.c

index e1e870e..db9c49a 100644 (file)
--- 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)