/*
- * $RCSId: xc/lib/fontconfig/src/fcatomic.c,v 1.2 2002/03/04 21:15:28 tsi Exp $
+ * fontconfig/src/fcatomic.c
*
- * Copyright © 2002 Keith Packard
+ * Copyright © 2002 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* machines sharing the same filesystem will have clocks
* reasonably close to each other.
*/
- if (stat ((char *) atomic->lck, &lck_stat) >= 0)
+ if (FcStat ((char *) atomic->lck, &lck_stat) >= 0)
{
time_t now = time (0);
if ((long int) (now - lck_stat.st_mtime) > 10 * 60)
FcBool
FcAtomicReplaceOrig (FcAtomic *atomic)
{
+#ifdef _WIN32
+ unlink (atomic->file);
+#endif
if (rename ((char *) atomic->new, (char *) atomic->file) < 0)
return FcFalse;
return FcTrue;
FcAtomicDestroy (FcAtomic *atomic)
{
FcMemFree (FC_MEM_ATOMIC, sizeof (FcAtomic) +
- strlen ((char *) atomic->file) * 4 + 1 +
+ strlen ((char *) atomic->file) * 4 + 4 +
sizeof (NEW_NAME) + sizeof (LCK_NAME) +
sizeof (TMP_NAME));
free (atomic);
}
+#define __fcatomic__
+#include "fcaliastail.h"
+#undef __fcatomic__