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
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* (C) 1998-2011, Ullrich von Bassewitz */
|
/* (C) 1998-2012, Ullrich von Bassewitz */
|
||||||
/* Roemerstrasse 52 */
|
/* Roemerstrasse 52 */
|
||||||
/* D-70794 Filderstadt */
|
/* D-70794 Filderstadt */
|
||||||
/* EMail: uz@cc65.org */
|
/* EMail: uz@cc65.org */
|
||||||
@@ -43,11 +43,11 @@
|
|||||||
# include <utime.h>
|
# include <utime.h>
|
||||||
#endif
|
#endif
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <sys/stat.h>
|
|
||||||
|
|
||||||
/* common */
|
/* common */
|
||||||
#include "cddefs.h"
|
#include "cddefs.h"
|
||||||
#include "exprdefs.h"
|
#include "exprdefs.h"
|
||||||
|
#include "filestat.h"
|
||||||
#include "fname.h"
|
#include "fname.h"
|
||||||
#include "symdefs.h"
|
#include "symdefs.h"
|
||||||
#include "xmalloc.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
|
* if a file has changed in the debugger, we will ignore this problem
|
||||||
* here.
|
* here.
|
||||||
*/
|
*/
|
||||||
if (stat (Name, &StatBuf) != 0) {
|
if (FileStat (Name, &StatBuf) != 0) {
|
||||||
Error ("Cannot stat object file `%s': %s", Name, strerror (errno));
|
Error ("Cannot stat object file `%s': %s", Name, strerror (errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* (C) 1998-2011, Ullrich von Bassewitz */
|
/* (C) 1998-2012, Ullrich von Bassewitz */
|
||||||
/* Roemerstrasse 52 */
|
/* Roemerstrasse 52 */
|
||||||
/* D-70794 Filderstadt */
|
/* D-70794 Filderstadt */
|
||||||
/* EMail: uz@cc65.org */
|
/* EMail: uz@cc65.org */
|
||||||
@@ -38,8 +38,6 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <sys/types.h> /* EMX needs this */
|
|
||||||
#include <sys/stat.h>
|
|
||||||
|
|
||||||
/* common */
|
/* common */
|
||||||
#include "alignment.h"
|
#include "alignment.h"
|
||||||
@@ -47,6 +45,7 @@
|
|||||||
#include "bitops.h"
|
#include "bitops.h"
|
||||||
#include "cddefs.h"
|
#include "cddefs.h"
|
||||||
#include "coll.h"
|
#include "coll.h"
|
||||||
|
#include "filestat.h"
|
||||||
#include "gentype.h"
|
#include "gentype.h"
|
||||||
#include "intstack.h"
|
#include "intstack.h"
|
||||||
#include "scopedefs.h"
|
#include "scopedefs.h"
|
||||||
@@ -1264,7 +1263,7 @@ static void DoIncBin (void)
|
|||||||
* here.
|
* here.
|
||||||
*/
|
*/
|
||||||
SB_Terminate (&Name);
|
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));
|
Fatal ("Cannot stat input file `%m%p': %s", &Name, strerror (errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,14 +38,13 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <sys/types.h> /* EMX needs this */
|
|
||||||
#include <sys/stat.h>
|
|
||||||
|
|
||||||
/* common */
|
/* common */
|
||||||
#include "addrsize.h"
|
#include "addrsize.h"
|
||||||
#include "attrib.h"
|
#include "attrib.h"
|
||||||
#include "chartype.h"
|
#include "chartype.h"
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
|
#include "filestat.h"
|
||||||
#include "fname.h"
|
#include "fname.h"
|
||||||
#include "xmalloc.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
|
* if a file has changed in the debugger, we will ignore this problem
|
||||||
* here.
|
* here.
|
||||||
*/
|
*/
|
||||||
if (stat (Name, &Buf) != 0) {
|
if (FileStat (Name, &Buf) != 0) {
|
||||||
Fatal ("Cannot stat input file `%s': %s", Name, strerror (errno));
|
Fatal ("Cannot stat input file `%s': %s", Name, strerror (errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* (C) 2000-2010, Ullrich von Bassewitz */
|
/* (C) 2000-2012, Ullrich von Bassewitz */
|
||||||
/* Roemerstrasse 52 */
|
/* Roemerstrasse 52 */
|
||||||
/* D-70794 Filderstadt */
|
/* D-70794 Filderstadt */
|
||||||
/* EMail: uz@cc65.org */
|
/* EMail: uz@cc65.org */
|
||||||
@@ -36,12 +36,11 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
|
|
||||||
/* common */
|
/* common */
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
#include "coll.h"
|
#include "coll.h"
|
||||||
|
#include "filestat.h"
|
||||||
#include "fname.h"
|
#include "fname.h"
|
||||||
#include "print.h"
|
#include "print.h"
|
||||||
#include "strbuf.h"
|
#include "strbuf.h"
|
||||||
@@ -173,7 +172,7 @@ static AFile* NewAFile (IFile* IF, FILE* F)
|
|||||||
* here.
|
* here.
|
||||||
*/
|
*/
|
||||||
struct stat Buf;
|
struct stat Buf;
|
||||||
if (stat (IF->Name, &Buf) != 0) {
|
if (FileStat (IF->Name, &Buf) != 0) {
|
||||||
/* Error */
|
/* Error */
|
||||||
Fatal ("Cannot stat `%s': %s", IF->Name, strerror (errno));
|
Fatal ("Cannot stat `%s': %s", IF->Name, strerror (errno));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user