Make cache filenames unique by inserting the architecture name into the
filename.
*/
#include "fcint.h"
+#include "../fc-arch/fcarch.h"
#include <fcntl.h>
#include <dirent.h>
#include <string.h>
return FcFalse;
}
-#define CACHEBASE_LEN (1 + 32 + sizeof (FC_CACHE_SUFFIX))
+#define CACHEBASE_LEN (1 + 32 + 1 + sizeof (FC_ARCHITECTURE) + sizeof (FC_CACHE_SUFFIX))
static const char bin2hex[] = { '0', '1', '2', '3',
'4', '5', '6', '7',
hex_hash[2*cnt+1] = bin2hex[hash[cnt] & 0xf];
}
hex_hash[2*cnt] = 0;
- strcat ((char *) cache_base, FC_CACHE_SUFFIX);
+ strcat ((char *) cache_base, "-" FC_ARCHITECTURE FC_CACHE_SUFFIX);
return cache_base;
}