]> git.sur5r.net Git - cc65/commitdiff
Use the new FileStat function to get correct file modification times under
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 1 Apr 2012 17:01:05 +0000 (17:01 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 1 Apr 2012 17:01:05 +0000 (17:01 +0000)
Windows.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5633 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/ar65/objfile.c
src/ca65/pseudo.c
src/ca65/scanner.c
src/cc65/input.c

index 43862cb93f5cf3f7e81bf5d51a4f7f3b4ee6a2a4..c197b0c919510436c5f8558be35a85e7c953d41a 100644 (file)
@@ -6,7 +6,7 @@
 /*                                                                          */
 /*                                                                          */
 /*                                                                          */
-/* (C) 1998-2011, Ullrich von Bassewitz                                      */
+/* (C) 1998-2012, Ullrich von Bassewitz                                      */
 /*                Roemerstrasse 52                                           */
 /*                D-70794 Filderstadt                                        */
 /* EMail:         uz@cc65.org                                                */
 #  include <utime.h>
 #endif
 #include <time.h>
-#include <sys/stat.h>
 
 /* common */
 #include "cddefs.h"
 #include "exprdefs.h"
+#include "filestat.h"
 #include "fname.h"
 #include "symdefs.h"
 #include "xmalloc.h"
@@ -254,7 +254,7 @@ void ObjAdd (const char* Name)
      * if a file has changed in the debugger, we will ignore this problem
      * here.
      */
-    if (stat (Name, &StatBuf) != 0) {
+    if (FileStat (Name, &StatBuf) != 0) {
        Error ("Cannot stat object file `%s': %s", Name, strerror (errno));
     }
 
index 3bd8530819ff56b4944ee1c96cdc01f996e64623..3318628ad0d90fcd5fa92266e3901e6e33fdce18 100644 (file)
@@ -6,7 +6,7 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 1998-2011, Ullrich von Bassewitz                                      */
+/* (C) 1998-2012, Ullrich von Bassewitz                                      */
 /*                Roemerstrasse 52                                           */
 /*                D-70794 Filderstadt                                        */
 /* EMail:         uz@cc65.org                                                */
@@ -38,8 +38,6 @@
 #include <string.h>
 #include <ctype.h>
 #include <errno.h>
-#include <sys/types.h>         /* EMX needs this */
-#include <sys/stat.h>
 
 /* common */
 #include "alignment.h"
@@ -47,6 +45,7 @@
 #include "bitops.h"
 #include "cddefs.h"
 #include "coll.h"
+#include "filestat.h"
 #include "gentype.h"
 #include "intstack.h"
 #include "scopedefs.h"
@@ -1264,7 +1263,7 @@ static void DoIncBin (void)
      * here.
      */
     SB_Terminate (&Name);
-    if (stat (SB_GetConstBuf (&Name), &StatBuf) != 0) {
+    if (FileStat (SB_GetConstBuf (&Name), &StatBuf) != 0) {
         Fatal ("Cannot stat input file `%m%p': %s", &Name, strerror (errno));
     }
 
index 94f517483db338d74bb0176c872b24ac581fca1a..1ce48fa8ac134e8a41a9f9fbb621bd72887d5638 100644 (file)
 #include <string.h>
 #include <ctype.h>
 #include <errno.h>
-#include <sys/types.h>         /* EMX needs this */
-#include <sys/stat.h>
 
 /* common */
 #include "addrsize.h"
 #include "attrib.h"
 #include "chartype.h"
 #include "check.h"
+#include "filestat.h"
 #include "fname.h"
 #include "xmalloc.h"
 
@@ -520,7 +519,7 @@ int NewInputFile (const char* Name)
      * if a file has changed in the debugger, we will ignore this problem
      * here.
      */
-    if (stat (Name, &Buf) != 0) {
+    if (FileStat (Name, &Buf) != 0) {
         Fatal ("Cannot stat input file `%s': %s", Name, strerror (errno));
     }
 
index 2a2b8d5b51e7d9aeca9324bf5c6552c0678fc9f1..a1ef9ec9839621c94fa8314e0cff74ae2092d008 100644 (file)
@@ -6,7 +6,7 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2000-2010, Ullrich von Bassewitz                                      */
+/* (C) 2000-2012, Ullrich von Bassewitz                                      */
 /*                Roemerstrasse 52                                           */
 /*                D-70794 Filderstadt                                        */
 /* EMail:         uz@cc65.org                                                */
 #include <stdio.h>
 #include <string.h>
 #include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
 
 /* common */
 #include "check.h"
 #include "coll.h"
+#include "filestat.h"
 #include "fname.h"
 #include "print.h"
 #include "strbuf.h"
@@ -173,7 +172,7 @@ static AFile* NewAFile (IFile* IF, FILE* F)
          * here.
          */
        struct stat Buf;
-       if (stat (IF->Name, &Buf) != 0) {
+       if (FileStat (IF->Name, &Buf) != 0) {
            /* Error */
            Fatal ("Cannot stat `%s': %s", IF->Name, strerror (errno));
        }