1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-26 08:32:00 +00:00

Use FileStat instead of stat.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5640 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz 2012-04-03 13:28:33 +00:00
parent 2cd0b5ae91
commit 31e0666087

View File

@ -37,14 +37,13 @@
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <errno.h> #include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h> #include <dirent.h>
#include <unistd.h> #include <unistd.h>
/* common */ /* common */
#include "abend.h" #include "abend.h"
#include "cmdline.h" #include "cmdline.h"
#include "filestat.h"
#include "print.h" #include "print.h"
#include "version.h" #include "version.h"
#include "xmalloc.h" #include "xmalloc.h"
@ -128,7 +127,7 @@ static void OptChipDir (const char* Opt attribute ((unused)), const char* Arg)
strcpy (Name + DirLen + 1, E->d_name); strcpy (Name + DirLen + 1, E->d_name);
/* Stat the file */ /* Stat the file */
if (stat (Name, &S) != 0) { if (FileStat (Name, &S) != 0) {
Warning ("Cannot stat `%s': %s", Name, strerror (errno)); Warning ("Cannot stat `%s': %s", Name, strerror (errno));
xfree (Name); xfree (Name);
continue; continue;