]> git.sur5r.net Git - cc65/blobdiff - src/cc65/incpath.c
Better error messages when opening include files
[cc65] / src / cc65 / incpath.c
index 2776099b867c7ab1fdcafe1ed0620cc2ba9ccb4d..d0ba1f073cd04664703d3902a4eca64bfe7c0a90 100644 (file)
@@ -38,7 +38,6 @@
 #if defined(_MSC_VER)
 /* Microsoft compiler */
 #  include <io.h>
-#  define R_OK 4
 #else
 /* Anyone else */
 #  include <unistd.h>
@@ -138,7 +137,7 @@ static char* Find (const char* Path, const char* File)
        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);
        }