diff options
author | Keith Packard <keithp@neko.keithp.com> | 2006-08-27 18:29:51 -0700 |
---|---|---|
committer | Keith Packard <keithp@neko.keithp.com> | 2006-08-27 18:29:51 -0700 |
commit | cf65c0557e9fa1b86003d1ec8643f44f4344ebd2 (patch) | |
tree | 437835e859105b780fb87bd59c83f726de0f871f | |
parent | db50cbdaf592349c204ab0af0e7061ea72237044 (diff) |
Add architecture to cache filename.
Make cache filenames unique by inserting the architecture name into the
filename.
-rw-r--r-- | src/fccache.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fccache.c b/src/fccache.c index 135cd29..020230e 100644 --- a/src/fccache.c +++ b/src/fccache.c @@ -24,6 +24,7 @@ */ #include "fcint.h" +#include "../fc-arch/fcarch.h" #include <fcntl.h> #include <dirent.h> #include <string.h> @@ -791,7 +792,7 @@ FcDirCacheHasCurrentArch (const FcChar8 *dir, FcConfig *config) 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', @@ -819,7 +820,7 @@ FcDirCacheBasename (const FcChar8 * dir, FcChar8 cache_base[CACHEBASE_LEN]) 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; } |