FcBool
FcAtomicLock (FcAtomic *atomic)
+{
+ return FcAtomicLock2 (FcConfigGetCurrent (), atomic);
+}
+
+FcBool
+FcAtomicLock2 (FcConfig *config, FcAtomic *atomic)
{
int fd = -1;
FILE *f = 0;
* machines sharing the same filesystem will have clocks
* reasonably close to each other.
*/
- if (FcStat (atomic->lck, &lck_stat) >= 0)
+ if (FcStat (config, atomic->lck, &lck_stat) >= 0)
{
time_t now = time (0);
if ((long int) (now - lck_stat.st_mtime) > 10 * 60)
{
#ifdef HAVE_LINK
if (unlink ((char *) atomic->lck) == 0)
- return FcAtomicLock (atomic);
+ return FcAtomicLock2 (config, atomic);
#else
if (rmdir ((char *) atomic->lck) == 0)
- return FcAtomicLock (atomic);
+ return FcAtomicLock2 (config, atomic);
#endif
}
}