conf.d/50-user.conf | 7 ++++++- configure.ac | 2 +- src/fcdir.c | 14 ++++++++++++++ src/fcint.h | 3 +++ src/fcxml.c | 6 ++++-- 5 files changed, 28 insertions(+), 4 deletions(-) New commits: commit 9231545c6bb775460702d8a615f1649bd8632f00 Author: Akira TAGOH <akira@xxxxxxxxx> Date: Wed Dec 5 18:13:25 2012 +0900 Do not show the deprecation warning if it is a symlink diff --git a/conf.d/50-user.conf b/conf.d/50-user.conf index 2f10408..07c9182 100644 --- a/conf.d/50-user.conf +++ b/conf.d/50-user.conf @@ -1,7 +1,12 @@ <?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> - <!-- Load per-user customization file --> + <!-- + Load per-user customization files where stored on XDG Base Directory + specification compliant places. it should be usually: + $HOME/.config/fontconfig/conf.d + $HOME/.config/fontconfig/fonts.conf + --> <include ignore_missing="yes" prefix="xdg">fontconfig/conf.d</include> <include ignore_missing="yes" prefix="xdg">fontconfig/fonts.conf</include> <!-- the following elements will be removed in the future --> diff --git a/configure.ac b/configure.ac index 6d5ce7e..5657bb5 100644 --- a/configure.ac +++ b/configure.ac @@ -137,7 +137,7 @@ AC_TYPE_PID_T # Checks for library functions. AC_FUNC_VPRINTF AC_FUNC_MMAP -AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr strtol getopt getopt_long sysconf ftruncate chsize rand random lrand48 random_r rand_r regcomp regerror regexec regfree fstatvfs fstatfs]) +AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr strtol getopt getopt_long sysconf ftruncate chsize rand random lrand48 random_r rand_r regcomp regerror regexec regfree fstatvfs fstatfs lstat]) dnl AC_CHECK_FUNCS doesn't check for header files. dnl posix_fadvise() may be not available in older libc. diff --git a/src/fcdir.c b/src/fcdir.c index 2b476e8..f86db19 100644 --- a/src/fcdir.c +++ b/src/fcdir.c @@ -35,6 +35,20 @@ FcFileIsDir (const FcChar8 *file) return S_ISDIR(statb.st_mode); } +FcBool +FcFileIsLink (const FcChar8 *file) +{ +#if HAVE_LSTAT + struct stat statb; + + if (lstat (file, &statb) != 0) + return FcFalse; + return S_ISLNK (statb.st_mode); +#else + return FcFalse; +#endif +} + static FcBool FcFileScanFontConfig (FcFontSet *set, FcBlanks *blanks, diff --git a/src/fcint.h b/src/fcint.h index 7125f2e..87c7b9a 100644 --- a/src/fcint.h +++ b/src/fcint.h @@ -764,6 +764,9 @@ FcGetDefaultLang (void); /* fcdir.c */ FcPrivate FcBool +FcFileIsLink (const FcChar8 *file); + +FcPrivate FcBool FcFileScanConfig (FcFontSet *set, FcStrSet *dirs, FcBlanks *blanks, diff --git a/src/fcxml.c b/src/fcxml.c index 5edc867..72e9eaf 100644 --- a/src/fcxml.c +++ b/src/fcxml.c @@ -2085,8 +2085,10 @@ FcParseInclude (FcConfigParse *parse) FcChar8 *filename; filename = FcConfigFilename(s); - if ((deprecated == FcTrue) && filename) - { + if (deprecated == FcTrue && + filename != NULL && + !FcFileIsLink (filename)) + { FcConfigMessage (parse, FcSevereWarning, "reading configurations from %s is deprecated.", s); } if(filename) _______________________________________________ Fontconfig mailing list Fontconfig@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/fontconfig