Do not show the deprecation warning if it is a symlink
This commit is contained in:
parent
2442d61157
commit
9231545c6b
|
@ -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 -->
|
||||
|
|
|
@ -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.
|
||||
|
|
14
src/fcdir.c
14
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,
|
||||
|
|
|
@ -763,6 +763,9 @@ FcGetDefaultLang (void);
|
|||
|
||||
/* fcdir.c */
|
||||
|
||||
FcPrivate FcBool
|
||||
FcFileIsLink (const FcChar8 *file);
|
||||
|
||||
FcPrivate FcBool
|
||||
FcFileScanConfig (FcFontSet *set,
|
||||
FcStrSet *dirs,
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue