Commit Graph

203 Commits

Author SHA1 Message Date
Serge van den Boom 1dd95fcb8b Correctly handle mmap() failure (#21062) 2009-06-24 13:52:10 -04:00
Behdad Esfahbod 3074a73b41 Replace 'KEITH PACKARD' with 'THE AUTHOR(S)' in license text in all files 2009-03-13 17:59:28 -04:00
Behdad Esfahbod b697fa2523 [cache] After writing cache to file, update the internal copy to reflect this
Only do it for small caches though.  For large cache we'd better off loading
the cache file again, mmap()ing it.

Based on patch from Diego Santa Cruz.
2009-02-15 13:40:25 -08:00
Behdad Esfahbod 6bb5d72fe7 [fccache] Make sure the cache is current when reusing from open caches
Reported by Diego Santa Cruz.
2009-02-15 13:40:25 -08:00
Behdad Esfahbod 8ae1e3d5dc Explicitly chmod() directories (bug #18934)
Two changes:

  - after mkdir(), we immediately chmod(), such that we are not affected
    by stupid umask's.

  - if a directory we want to use is not writable but exists, we try a
    chmod on it.  This is to recover from stupid umask's having affected
    us with older versions.
2009-02-13 16:54:03 -08:00
Behdad Esfahbod f69db8d49c Consistently use FcStat() over stat() in all places 2009-02-13 16:54:01 -08:00
Behdad Esfahbod 9e2ed2513b [fccache] Consistently use FcStat() over stat() (bug #18195) 2009-02-13 16:54:01 -08:00
Tor Lillqvist 8a3dc4880c Workaround for stat() brokenness in Microsoft's C library (bug 8526)
Fix a couple of longstanding problems with fontconfig on Windows that
manifest themselves especially in GIMP. The root cause to the problems is in
Microsoft's incredibly stupid stat() implementation. Basically, stat()
returns wrong timestamp fields for files on NTFS filesystems on machines
that use automatic DST switching.

See for instance http://bugzilla.gnome.org/show_bug.cgi?id=154968 and
http://www.codeproject.com/datetime/dstbugs.asp

As fccache.c now looks at more fields in the stat struct I fill in them all.
I noticed that fstat() is used only on a fd just after opening it, so on
Win32 I just call my stat() replacement before opening instead...
Implementing a good replacement for fstat() would be harder because the code
in fccache.c wants to compare inode numbers. There are no (readily
accessible) inode numbers on Win32, so I fake it with the hash of the full
file name, in the case as it is on disk. And fstat() doesn't know the full
file name, so it would be rather hard to come up with a inode number to
identify the file.

The patch also adds similar handling for the cache directory as for the fonts
directory: If a cachedir element in fonts.conf contains the magic string
"WINDOWSTEMPDIR_FONTCONFIG_CACHE" it is replaced at runtime with a path under
the machine's (or user's) temp folder as returned by GetTempPath(). I don't
want to hardcode any pathnames in a fonts.conf intended to be distributed to
end-users, most of which who wouldn't know how to edit it anyway. And
requiring an installer to edit it gets complicated.
2007-11-13 16:41:55 -08:00
Keith Packard e37d10fa74 Make file_stat argument to FcDirCacheLoadFile optional.
Allow file_stat to be NULL by using a local stat structure in that case.
2007-11-03 14:16:29 -07:00
Keith Packard bc5e8adb4d Must not insert cache into hash table before completely validating.
The cache was inserted into the hash table before the timestamps in the
cache were verified; if that verification failed, an extra pointer to the
now freed cache would be left in the hash table. FcFini would fail an
assertion as a result.
2007-10-18 09:41:00 -07:00
Keith Packard 238489030a Don't use X_OK bit when checking for writable directories (bug 12438)
Some mingw versions have broken X_OK checking; instead of trying to work
around this in a system-depedent manner, simply don't bother checking for
X_OK along with W_OK as such cases are expected to be mistakes, and not
sensible access control.
2007-10-18 05:04:39 -07:00
Keith Packard 144ca87831 Comment about mmaping cache files was misleading. 2007-10-18 04:29:13 -07:00
Keith Packard db6f19f13b Store font directory mtime in cache file.
Instead of relying on mtime ordering between a directory and its associated
cache file, write the directory mtime into the cache file itself. This makes
cache file checks more reliable across file systems.

This change is made in a way that old programs can use new cache files, but
new programs will need new cache files.
2007-10-18 04:13:51 -07:00
Keith Packard 3ae9258f9e Free temporary string in FcDirCacheUnlink (Bug #11758)
In FcDirCacheUnlink(), the line

  cache_hashed = FcStrPlus (cache_dir, cache_base);

allocates memory in cache_hashed that is never free()'d before the function
exits.

Reported by Ben Combee.
2007-08-05 12:31:03 -07:00
Kean Johnston c9c6875014 Don't use varargs CPP macros in fccache.c. (bug 8733)
src/fccache.c uses a trick to try and use a function name that is also a
macro name. It does this using the varargs args() macro. Replace that
with separate macros for each number of formals.
2006-12-02 13:36:56 -08:00
Han-Wen Nienhuys 0596d7296c More fixes for Win32 building (bug 8311)
Our build system barfs on autogen.sh, which ignores --noconfigure. Configure
needs a host of options to make the cross compile work in our case.

Fix typo in fccache.c
2006-09-17 17:03:33 -07:00
Han-Wen Nienhuys 1de7a4cc09 FcStrCanonFileName buggy for mingw. (bug 8311)
FcStrCanonFileName checks whether s[0] == '/', and recurses if not.

This only works on POSIX. On dos, this crashes with a stack overflow.

The patch attached splits this functionality in two functions
(FcStrCanonAbsoluteFilename) and uses GetFullPathName on windows to get an
absolute path.  It also fixes a number of other issues. With this patch,
LilyPond actually produces output on Windows.
2006-09-17 14:34:46 -07:00
Keith Packard cc104e6a91 Detect and use available random number generator (bug 8308)
Prefer random over lrand48 over rand
2006-09-17 14:20:18 -07:00
Keith Packard 49b44b277f Insert newly created caches into reference data structure.
All caches used in the application must be in the cache reference list so
internal references can be tracked correctly. Failing to have newly created
caches in the list would cause the cache to be deallocated while references
were still present.
2006-09-09 16:41:58 -07:00
Keith Packard 8d779ce4b3 Reference patterns in FcCacheCopySet.
As patterns are put into the font set copy, mark them as referenced so the
cache stays around while the font set is in use.
2006-09-07 14:22:16 -07:00
Keith Packard 23816bf9ac Eliminate .so PLT entries for local symbols. (thanks to Arjan van de Ven)
Using a simple shell script that processes the public headers, two header
files are constructed that map public symbols to hidden internal aliases
avoiding the assocated PLT entry for referring to a public symbol.

A few mistakes in the FcPrivate/FcPublic annotations were also discovered
through this process
2006-09-05 02:24:01 -07:00
Keith Packard 323ecd0cd3 Correct reference count when sharing cache file objects.
Multiple maps of the same cache file share the same mapped object; bump the
cache object reference count in this case
2006-09-04 23:19:59 -07:00
Keith Packard 17389539a0 Make cache reference counting more efficient.
Eliminate need to reference cache object once per cached font, instead
just count the number of fonts used from the cache and bump the reference
count once by that amount. I think this makes this refernece technique
efficient enough for use.
2006-09-04 22:26:24 -07:00
Keith Packard 9e612141df Reference count cache objects.
Caches contain patterns and character sets which are reference counted and
visible to applications. Reference count the underlying cache object so that
it stays around until all reference objects are no longer in use.

This is less efficient than just leaving all caches around forever, but does
avoid eternal size increases in case applications ever bother to actually
look for changes in the font configuration.
2006-09-04 22:20:25 -07:00
Keith Packard 8fe2104a1e Leave cache files mapped permanently.
Without reference counting on cache objects, there's no way to know when
an application is finished using objects pulled from the cache. Until some
kinf of cache reference counting can be done, leave all cache objects mapped
for the life of the library (until FcFini is called). To mitigate the cost
of this, ensure that each instance of a cache file is mapped only once.
2006-09-04 13:59:58 -07:00
Keith Packard 4984242e36 Hide private functions in shared library. Export functionality for utilities.
Borrowing header stuff written for cairo, fontconfig now exposes in the
shared library only the symbols which are included in the public header
files. All private symbols are hidden using suitable compiler directives.

A few new public functions were required for the fontconfig utility programs
(fc-cat and fc-cache) so those were added, bumping the .so minor version number
in the process.
2006-09-04 00:47:07 -07:00
Keith Packard 3b8a03c09d Allow font caches to contain newer version numbers
Use the version number inside the cache file to mark backward compatible
changes while continuing to reserve the filename number for incompatible
changes.
2006-09-02 14:54:14 -07:00
Keith Packard bc5e487f2a Pass directory information around in FcCache structure. Freeze charsets.
Instead of passing directory information around in separate variables,
collect it all in an FcCache structure. Numerous internal and tool
interfaces changed as a result of this.

Charsets are now pre-frozen before being serialized. This causes them to
share across multiple fonts in the same cache.
2006-09-01 01:15:14 -07:00
Keith Packard f57783d2e9 Revert ABI changes from version 2.3
Accidental ABI changes and additions were discovered by looking at the
differences in fontconfig.h. All of those have been reverted.
2006-08-31 14:38:18 -07:00
Keith Packard 0a87ce715e With no args, fc-cat now dumps all directories.
Automatically list all font directories when no arguments are given to
fc-cat. Also add -r option to recurse from specified cache directories.
fc-cat also now prints the cache filename in verbose mode, along with the
related directory name.
2006-08-31 11:56:43 -07:00
Keith Packard d8ab9e6c42 Automatically remove invalid cache files.
Cache files for missing or more recently modified directories are
automatically removed at the end of every fc-cache run.
2006-08-31 09:42:49 -07:00
Keith Packard 76abb77f26 Fix fc-cat again. Sigh.
Internal interfaces in cache management changed again...
2006-08-30 22:23:25 -07:00
Keith Packard 2d3387fd72 Skip broken caches. Cache files are auto-written, don't rewrite in fc-cache.
Validate cache contents and skip broken caches, looking down cache path for
valid ones.

Every time a directory is scanned, it will be written to a cache file if
possible, so fc-cache doesn't need to re-write the cache file. This makes
detecting when the cache was generated a bit tricky, so we guess that if the
cache wasn't valid before running and is valid afterwards, the cache file
was written.

Also, allow empty charsets to be serialized with null leaves/numbers.

Eliminate a leak in FcEdit by switching to FcObject sooner.

Call FcFini from fc-match to make valgrind happy.
2006-08-30 21:59:53 -07:00
Keith Packard c02886485b FcCharSetSerialize was using wrong offset for leaves. Make fc-cat work.
FcCharSetSerialize was computing the offset to the unserialized leaf,
which left it pointing at random data when the cache was reloaded.

fc-cat has been updated to work with the new cache structure.

Various debug messages extended to help diagnose serialization errors.
2006-08-30 13:51:03 -07:00
Keith Packard 7ce1967331 Rework cache files to use offsets for all data structures.
Replace all of the bank/id pairs with simple offsets, recode several
data structures to always use offsets inside the library to avoid
conditional paths. Exposed data structures use pointers to hold offsets,
setting the low bit to distinguish between offset and pointer.

Use offset-based data structures for lang charset encodings; eliminates
separate data structure format for that file.

Much testing will be needed; offsets are likely not detected everywhere in
the library yet.
2006-08-30 04:16:22 -07:00
Keith Packard af180c4037 Fix up fc-cache and fc-cat for no global cache changes.
fc-cache and fc-cat use internal (fcint.h) APIs that have
changed with the elimination of the global cache.
2006-08-27 22:24:39 -07:00
Keith Packard 00f059e930 Eliminate global cache. Eliminate multi-arch cache code.
With the removal of the in-directory cache files, and the addition of
per-user cache directories, there is no longer any reason to preserve the
giant global cache file. Eliminating of this unifies the cache structure
and simplifies the overall caching strategies greatly.
2006-08-27 21:53:48 -07:00
Keith Packard cf65c0557e Add architecture to cache filename.
Make cache filenames unique by inserting the architecture name into the
filename.
2006-08-27 18:29:51 -07:00
Keith Packard db50cbdaf5 Eliminate NormalizeDir. Eliminate gratuitous stat/access calls per dir.
Normalized directory names offer protection against looped directory trees
but cost enormous numbers of system calls (stat per file in the hierarchy).
Also, cache file directory name contents are validated each time the
directory is modified, don't re-validate every time the cache file is loaded
with an access and stat call.
2006-08-27 18:19:39 -07:00
Keith Packard d2f786849c Write caches to first directory with permission. Valid cache in FcDirCacheOpen.
Previous policy was to attempt to update the cache in place and bail if that
didn't work. Now, search for the first writable directory and place the
cache file there instead. Furthermore, on startup, search directory list for
valid cache files instead of bailing if the first found cache file wasn't
valid.
2006-08-27 17:04:01 -07:00
Patrick Lam 7410e40bd9 2006-08-04 Keith Packard (keithp@keithp.com) reviewed by: plam
Make cache directories configurable. Simplify and correct some code which
    deals with per-directory caches.
2006-08-04 16:13:00 +00:00
Patrick Lam 62a4a8459a 2006-07-19 Jon Burgess (jburgess@uklinux.net) reviewed by: plam
Fix file-descriptor leak in FcGlobalCacheDestroy.
2006-07-19 02:14:28 +00:00
Keith Packard c1c3ba06d5 Make path names in cache files absolute (NB, cache format change) Stop
permitting cache files to be stored in font dirs. Bump cache magic.
    Don't include /fonts.cache-2 in cache hash construction.
reviewed by: Patrick Lam <plam@mit.edu>
2006-04-27 07:11:44 +00:00
Patrick Lam f045376c08 Include $(top_srcdir), $(top_srcdir)/src before anything else.
Shuffle order of includes for building out of srcdir on win32.
reviewed by: plam
2006-04-25 05:57:41 +00:00
Patrick Lam 93f67dfc73 Dominic Lachowicz <cinamod@hotmail.com>
Implement mmap-like code for Windows using MapViewOfFile.
2006-04-19 16:53:50 +00:00
Patrick Lam c001a192af Bail gracefully if the cache file does not contain enough data. 2006-04-19 16:17:19 +00:00
Patrick Lam 5c90509c07 Don't crash if config is null (Coverity defect #984). 2006-04-12 02:38:28 +00:00
Patrick Lam 3ea92166a0 Fix string memory leak (Coverity defect #1823).
Fix memory leak with hash collision (Coverity defect #1824).
reviewed by: plam
2006-04-10 19:33:03 +00:00
Patrick Lam c814c301ee Don't leak header in non-error case (Coverity defect #1825).
reviewed by: plam
2006-04-10 16:12:55 +00:00
Patrick Lam ae2aafe602 Fix double free (spotted by Coverity, CID #1965).
Check if pattern is not null before using it (Coverity defect #1883).
Fix memory leak with hash collision (Coverity defect #1829).
Fix memory leak when bail cases (Coverity defect #1828).
Don't leak directory name (Coverity defect #1827).
reviewed by: plam
2006-04-10 15:46:34 +00:00
Patrick Lam d6217cc6bc Patrick Lam <plam@mit.edu>
Make fontconfig compile under MinGW:
1) remove unneeded #includes;
2) make use of mmap and sysconf conditional;
3) replace rand_r by srand/rand if needed;
4) use chsize instead of ftruncate; and
5) update libtool exports file
2006-04-07 04:42:32 +00:00
Patrick Lam 0d745819a9 Fix intel compiler warnings: make many variables static, eliminate
duplicate names, reduce variable scopes, unsigned/signed printf
    formatting.
reviewed by: plam
2006-04-06 04:33:11 +00:00
Patrick Lam b17cf498be Fix multiarch support (don't destroy multiarch files!)
Require pkg-config. (Thanks Behdad; better solution wanted for libxml2
    detection!)
reviewed by: plam
2006-03-24 15:21:10 +00:00
Patrick Lam bb6b19938e Get rid of C++-style comments. 2006-03-03 06:35:53 +00:00
Patrick Lam f2fb985c7a Eliminate redundancies.
reviewed by: plam
2006-02-21 15:50:19 +00:00
Patrick Lam 530e66b008 Fix the underlying cause of the below segfault (must usually call
FcDirCacheHasCurrentArch after FcDirCacheValid).
2006-02-18 18:18:07 +00:00
Patrick Lam a68ce9525d Fix segfault (reported by fcrozat) caused by incorrect input on cache
files.
2006-02-18 17:56:25 +00:00
Patrick Lam 8c0d692125 Deal correctly with changing FC_CACHE_MAGIC. 2006-02-16 17:50:04 +00:00
Patrick Lam 719f4b841f Don't bail if fontconfig can't remove a dir cache file. Skip the ID of a
cache file when copying. Eliminate 'source file too small' bug in
    FcDirCacheWrite.
2006-02-16 07:12:04 +00:00
Patrick Lam d00c3cb5e0 Try to open /var/cache/fontconfig/[hashed name] before fonts.cache-2 in a
directory, because /var/cache/fontconfig failures ought to be fixable,
    unlike fonts.cache-2 failures, which may leave you screwed.
reviewed by: plam
2006-02-11 05:01:32 +00:00
Patrick Lam 879af7060b Define and pass O_BINARY to open if appropriate, for those platforms that
need it. Reported by Doodle.
2006-02-09 18:44:14 +00:00
Patrick Lam c7490074c5 Fix attempt to close -1. Don't unboundedly grow bad caches (reported by
fcrozat).
2006-02-09 16:19:42 +00:00
Patrick Lam b10e77628c Fix warning. 2006-02-08 03:34:17 +00:00
Patrick Lam 5c3deb2985 Don't reject dirs that can't be normalized (fixes lilypond, and is correct
in the context of application font directories.)
Use normalized directory name exclusively in FcCacheReadDirs.
reviewed by: plam
2006-02-07 22:09:01 +00:00
Patrick Lam a81f23c0ce Fix hidden variable warning. 2006-02-07 03:53:32 +00:00
Patrick Lam 799157dbbf Remove de-escaping logic because FcCacheWriteString doesn't escape anyway.
Do blockwise reading instead of byte-wise for performance.
2006-02-07 02:33:57 +00:00
Patrick Lam 8b413bb62c Takashi Iwai <tiwai@suse.de>
Don't loop infinitely on recursive symlinks (client-side).
2006-02-07 02:22:50 +00:00
Patrick Lam fff5a5af30 Skip subdirs when skipping over stale bits of global cache. Introduce state
machine into FcGlobalCacheDir to avoid doing inappropriate operations
    on global dir entries, e.g. writing out an out-of-date cache entry.
reviewed by: plam
2006-02-06 22:44:02 +00:00
Patrick Lam 68355f3877 src/fccache.c (FcGlobalCacheLoad, FcGlobalCacheSave, FcDirCacheConsume,
FcDirCacheWrite)
Check I/O call return values and eliminate unused variable warnings.
reviewed by: plam
2006-02-05 02:57:21 +00:00
Patrick Lam 1af0f5741a Fix double free in error case. 2006-02-03 23:47:37 +00:00
Patrick Lam 28aefd013d Toast broken global cache files.
reviewed by: plam
2006-01-31 07:16:22 +00:00
Patrick Lam 3616cbe251 Actually use the directories that I added to the global cache. Fixes 'make
check'.
2006-01-31 04:42:20 +00:00
Patrick Lam 81d97094cf Make global cache work again after putting dir names into global cache (I
misplaced the recording of a file offset).
2006-01-30 16:31:56 +00:00
Patrick Lam 2c4e012497 Update fc-cat to handle subdir lists in global cache file.
Another FcCacheReadString return value check.
2006-01-30 15:59:17 +00:00
Patrick Lam c5411c4cae Make fccache more resilient to broken cache files by checking return value
of FcCacheReadString all the time.
reviewed by: plam
2006-01-30 15:44:13 +00:00
Patrick Lam 30c4189deb Fix global cache reads of subdirectories.
reviewed by: plam
2006-01-30 04:47:17 +00:00
Patrick Lam 971cf18018 Add documentation for FcConfigNormalizeFontDir.
Write directory information to global caches to fix make check (reported by
    Ronny V. Vindenes). This changes the global cache format again.
2006-01-30 04:27:53 +00:00
Patrick Lam 97293e07dd Move FcConfigNormalizeFontDir call so that it doesn't result in infinite
recursion (reported by Ronny V. Vindenes).
2006-01-27 05:47:59 +00:00
Patrick Lam 3cf9f5cec3 Add a couple of missing normalizations to make fc-cache work right; only
scan subdirectories once.
2006-01-27 00:27:37 +00:00
Patrick Lam 4073203deb Don't crash on non-existant directories in global cache.
reviewed by: plam
2006-01-26 16:11:41 +00:00
Patrick Lam f468f568b4 Stop trampling the directory name when writing out caches. (with Mike
Fabian:) Beef up FcConfigNormalizeFontDir to scan subdirs when
    necessary. Don't scan directories that can't be normalized.
2006-01-26 16:09:12 +00:00
Patrick Lam 575a37b797 Fix additional memory leaks reported by Ronny V. Vindenes: don't invoke
FcValueSave on hashed static strings in FcPatternAddWithBinding.
Add another st_dev check in FcDirCacheOpen.
2006-01-25 14:52:49 +00:00
Patrick Lam 6f9fcb5186 Fix memory leaks reported by Ronny V. Vindenes. 2006-01-25 02:33:46 +00:00
Patrick Lam eadadf489a Fix segfault when consuming zero-length caches in fc-cat (which has no
config, so FcConfigAddFontDir shouldn't be called.)
2006-01-15 05:31:58 +00:00
Patrick Lam 8a0b0ed6d0 Compare device numbers as well as inodes. Always normalize directory names
before comparing them.
Allocate extra space for appended '/' in directory name.
reviewed by: plam
2006-01-14 21:23:03 +00:00
Patrick Lam df3efc11a9 Explicitly add font dirs to config.fontDirs even if they're empty. Set
current config in fc-cache.c. Fix treatment of cache directory as read
    from cache file; don't use string equality to determine if we have the
    right file, use inode equality.
2006-01-10 13:15:05 +00:00
Patrick Lam cd9bca6970 Normalize font dirs by using the form, as given in fonts.conf, and recorded
in FcConfig's fontDirs string set, as canonical.
Actually update config.fontDirs as font directories are scanned.
2006-01-09 13:58:04 +00:00
Patrick Lam 05a98eaf4b Properly skip past dir caches that contain zero fonts (as occurs in global
caches.) Reported by Mike Fabian.
2006-01-08 10:50:51 +00:00
Patrick Lam c60ec7cc6d Add self to AUTHORS list.
Minor change to global cache file format to fix fc-cat bug reported by
    Frederic Crozat, and buglet with not globally caching directories with
    zero fonts cached.
2006-01-05 15:12:22 +00:00
Patrick Lam 3bfae75d44 Bump version to 2.3.93.
Use open instead of fopen (requested by Phil Race for Sun).
src/fccache.c (FcDirCacheWrite);
Fix GCC4 warning and Makefile brokenness for /var/cache/fontconfig dir.
2005-12-21 03:31:19 +00:00
Patrick Lam ec760b178a Read and write the original location as a fallback for the hashed cache
file locations. This is mostly for users to be able to have
    per-directory cache files.
2005-12-12 20:45:54 +00:00
Patrick Lam 83b6739035 Improve error message when fc-cache can't write the cache. Add missing
slash. Reported by Behdad. Incorporate Behdad's patch to create
    /var/cache/fontconfig when appropriate.
2005-12-12 13:46:45 +00:00
Patrick Lam ea44e21841 Migrate cache files from fonts directories to /var/cache/fontconfig. This
helps make fontconfig FHS-compliant, but requires that all caches get
    rebuilt.
Also, autogen.sh now needs the additional parameter
--localstatedir=/var.
2005-12-09 16:36:45 +00:00
Patrick Lam b8948e8542 Refactor FcCacheBankToIndex into an inlineable part (in fcint.h) which
checks the front of the list and a non-inlineable part which finds and
    moves the appropriate element to the front of the list.
reviewed by: plam
2005-11-29 14:57:10 +00:00
Patrick Lam 9fad72abaf Make the perf guys hate me a bit less: hoist the directory-name
FcConfigAcceptFont check for cached fonts up to directory cache read
    time, rather than running it for each font.
2005-11-29 06:23:00 +00:00
Patrick Lam 61571f3f2e Pass around FcCache *s to the Unserialize functions for extra consistency
(and less overhead, for what that's worth).
2005-11-25 15:50:34 +00:00
Patrick Lam 1c5b6345b9 Don't add current_arch_start more than once.
Fix ordering of ALIGN with respect to saving block_ptr; add another ALIGN
    to fcfs.c.
reviewed by: plam
2005-11-17 15:43:39 +00:00
Patrick Lam 8e351527bb src/fccache.c (FcDirCacheProduce)
Fix case where alignment bytes bumped up metadata->count causing
    unwarranted failures to write cache files. (Reported by Stephan Kulow).
2005-11-16 17:49:01 +00:00
Patrick Lam 7fd7221e68 Add *NeededBytesAlign(), which overestimates the padding which is later
added by the new ALIGN macro. Fix alignment problems on ia64 and s390
    by bumping up block_ptr appropriately. (Earlier version by Andreas
    Schwab).
Use sysconf to determine proper PAGESIZE value; this appears to be
    POSIX-compliant. (reported by Andreas Schwab)
reviewed by: plam
2005-11-16 15:55:17 +00:00
Patrick Lam 9090cb9ece Fix thinko: actually, the whole global cache is stale if the global cache
is older than the (newest) config file.
2005-11-02 06:39:23 +00:00