From f9729fd0cf8e194e30dec34ae75cb99293c00dca Mon Sep 17 00:00:00 2001 From: uz Date: Sun, 1 Apr 2012 17:01:05 +0000 Subject: [PATCH] Use the new FileStat function to get correct file modification times under Windows. git-svn-id: svn://svn.cc65.org/cc65/trunk@5633 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/ar65/objfile.c | 6 +++--- src/ca65/pseudo.c | 7 +++---- src/ca65/scanner.c | 5 ++--- src/cc65/input.c | 7 +++---- 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/src/ar65/objfile.c b/src/ar65/objfile.c index 43862cb93..c197b0c91 100644 --- a/src/ar65/objfile.c +++ b/src/ar65/objfile.c @@ -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 */ @@ -43,11 +43,11 @@ # include #endif #include -#include /* 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)); } diff --git a/src/ca65/pseudo.c b/src/ca65/pseudo.c index 3bd853081..3318628ad 100644 --- a/src/ca65/pseudo.c +++ b/src/ca65/pseudo.c @@ -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 #include #include -#include /* EMX needs this */ -#include /* 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)); } diff --git a/src/ca65/scanner.c b/src/ca65/scanner.c index 94f517483..1ce48fa8a 100644 --- a/src/ca65/scanner.c +++ b/src/ca65/scanner.c @@ -38,14 +38,13 @@ #include #include #include -#include /* EMX needs this */ -#include /* 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)); } diff --git a/src/cc65/input.c b/src/cc65/input.c index 2a2b8d5b5..a1ef9ec98 100644 --- a/src/cc65/input.c +++ b/src/cc65/input.c @@ -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 */ @@ -36,12 +36,11 @@ #include #include #include -#include -#include /* 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)); } -- 2.39.5