From 6d34466a6ad3c6ef932e6ea6bddbb7057003810a Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Tue, 2 Mar 1993 13:17:19 -0800 Subject: [PATCH] (do_include): Warn if find unreadable header file. (errno.h): Move outside VMS specific section. From-SVN: r3611 --- gcc/cccp.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/cccp.c b/gcc/cccp.c index 9f75cc0e188..3dcbf2abb1f 100644 --- a/gcc/cccp.c +++ b/gcc/cccp.c @@ -87,10 +87,12 @@ typedef unsigned char U_CHAR; #endif /* USG */ #endif /* not VMS */ +/* This defines "errno" properly for VMS, and gives us EACCES. */ +#include + /* VMS-specific definitions */ #ifdef VMS #include -#include /* This defines "errno" properly */ #include /* This defines sys_errlist/sys_nerr properly */ #include #define O_RDONLY 0 /* Open arg for Read/Only */ @@ -3957,6 +3959,10 @@ get_filename: f = open (fname, O_RDONLY, 0666); if (f == -2) return 0; /* Already included this file */ +#ifdef EACCES + else if (f == -1 && errno == EACCES) + warning ("Header file %s exists, but is not readable", fname); +#endif if (redundant_include_p (fname)) { close (f); return 0; -- 2.30.2