#if defined(_MSC_VER)
/* Microsoft compiler */
# include <io.h>
-# define R_OK 4
#else
/* Anyone else */
# include <unistd.h>
strcpy (PathName + Count, File);
/* Check if this file exists */
- if (access (PathName, R_OK) == 0) {
+ if (access (PathName, 0) == 0) {
/* The file exists */
return xstrdup (PathName);
- }
+ }
/* Skip a list separator if we have one */
if (*P == ';') {
"`\"' or `<' expected",
"Missing terminator or name too long",
"Include file `%s' not found",
- "Open failure on include file `%s'",
+ "Cannot open include file `%s': %s",
"Invalid #error directive",
"#error: %s",
"Unexpected `#endif'",
#if defined(_MSC_VER)
/* Microsoft compiler */
# include <io.h>
-# define R_OK 4
#else
/* Anyone else */
# include <unistd.h>
strcpy (PathName + Count, File);
/* Check if this file exists */
- if (access (PathName, R_OK) == 0) {
+ if (access (PathName, 0) == 0) {
/* The file exists */
return xstrdup (PathName);
}
F = fopen (N, "r");
if (F == 0) {
/* Error opening the file */
- PPError (ERR_INCLUDE_OPEN_FAILURE, N);
+ PPError (ERR_INCLUDE_OPEN_FAILURE, N, strerror (errno));
xfree (N);
return;
}