*/
#include "fcint.h"
-#include "../fc-arch/fcarch.h"
+#include "fcarch.h"
#include <stdio.h>
#include <fcntl.h>
#include <dirent.h>
#define O_BINARY 0
#endif
+
struct MD5Context {
FcChar32 buf[4];
FcChar32 bits[2];
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;
}
MD5Transform(ctx->buf, (FcChar32 *) ctx->in);
byteReverse((unsigned char *) ctx->buf, 4);
memcpy(digest, ctx->buf, 16);
- memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */
+ memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */
}