diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1993-03-02 13:17:19 -0800 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1993-03-02 13:17:19 -0800 |
commit | 6d34466a6ad3c6ef932e6ea6bddbb7057003810a (patch) | |
tree | d8e6eb98c252ddd538b7da606490141d66068bcc /gcc/cccp.c | |
parent | b3b1e8bd9c49e29c496d178bb69e42f04859a9a0 (diff) | |
download | gcc-6d34466a6ad3c6ef932e6ea6bddbb7057003810a.zip gcc-6d34466a6ad3c6ef932e6ea6bddbb7057003810a.tar.gz gcc-6d34466a6ad3c6ef932e6ea6bddbb7057003810a.tar.bz2 |
(do_include): Warn if find unreadable header file.
(errno.h): Move outside VMS specific section.
From-SVN: r3611
Diffstat (limited to 'gcc/cccp.c')
-rw-r--r-- | gcc/cccp.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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 <errno.h> + /* VMS-specific definitions */ #ifdef VMS #include <time.h> -#include <errno.h> /* This defines "errno" properly */ #include <perror.h> /* This defines sys_errlist/sys_nerr properly */ #include <descrip.h> #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; |