* machines sharing the same filesystem will have clocks
* reasonably close to each other.
*/
- if (FcStat ((char *) atomic->lck, &lck_stat) >= 0)
+ if (FcStat (atomic->lck, &lck_stat) >= 0)
{
time_t now = time (0);
if ((long int) (now - lck_stat.st_mtime) > 10 * 60)
return 0;
}
+
+#else
+
+int
+FcStat (const char *file, struct stat *statb)
+{
+ return stat ((char *) file, statb);
+}
+
#endif
static const char bin2hex[] = { '0', '1', '2', '3',
struct stat file_stat, dir_stat;
FcBool ret = FcFalse;
- if (FcStat ((char *) dir, &dir_stat) < 0)
+ if (FcStat (dir, &dir_stat) < 0)
return FcFalse;
FcDirCacheBasename (dir, cache_base);
if (!dir_stat)
{
- if (FcStat ((const char *) FcCacheDir (cache), &dir_static) < 0)
+ if (FcStat (FcCacheDir (cache), &dir_static) < 0)
return FcFalse;
dir_stat = &dir_static;
}
if (list)
{
while ((file = FcStrListNext (list)))
- if (FcStat ((char *) file, &statb) == 0)
+ if (FcStat (file, &statb) == 0)
if (!newest.set || statb.st_mtime - newest.time > 0)
{
newest.set = FcTrue;
{
struct stat statb;
- if (FcStat ((const char *) file, &statb) != 0)
+ if (FcStat (file, &statb) != 0)
return FcFalse;
return S_ISDIR(statb.st_mode);
}
if (FcDebug () & FC_DBG_FONTSET)
printf ("cache scan dir %s\n", dir);
- if (FcStat ((char *) dir, &dir_stat) < 0)
+ if (FcStat (dir, &dir_stat) < 0)
{
if (errno != ENOENT)
ret = FcFalse;
FcPrivate void
FcDirCacheReference (FcCache *cache, int nref);
-#ifdef _WIN32
FcPrivate int
FcStat (const char *file, struct stat *statb);
-#else
-#define FcStat stat
-#endif
/* fccfg.c */