[PATCH mkfontscale] Prefer original file over symlink (v2)
Jon TURNEY
jon.turney at dronecode.org.uk
Fri Jan 11 07:14:10 PST 2013
On 03/01/2013 20:30, Egbert Eich wrote:
> +#define PRIO(x) ((x << 1) + tprio)
> +#ifdef DT_LNK
> + if (entry->d_type != DT_UNKNOWN) {
> + if (entry->d_type == DT_LNK)
> + tprio = 0;
> + } else
> +#endif
> + {
> + if (lstat(filename, &f_stat))
> + goto done;
> + if (S_ISLNK(f_stat.st_mode))
> + tprio = 0;
> + }
> if(doBitmaps)
> rc = bitmapIdentify(filename, &xlfd_name);
> else
Unfortunately, S_ISLNK isn't defined on MinGW (see [1]), so perhaps the
attached is needed.
[1] http://tinderbox.freedesktop.org/builds/2013-01-10-0020/logs/mkfontscale/
-------------- next part --------------
>From e4b2e45ec5e1e0e3ec44e6c5380ef3f2a2cee7d3 Mon Sep 17 00:00:00 2001
From: Jon TURNEY <jon.turney at dronecode.org.uk>
Date: Fri, 11 Jan 2013 15:10:00 +0000
Subject: [PATCH app/mkfontscale] Fix compilation for MinGW
Fix compilation for MinGW since 9cbe3256bc932b82f2435b23cda0931f4f5f5ba2
Unfortunately, MinGW doesn't define S_ISLNK, so check for that as well.
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
---
mkfontscale.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/mkfontscale.c b/mkfontscale.c
index b27bb6a..93d9b86 100644
--- a/mkfontscale.c
+++ b/mkfontscale.c
@@ -850,8 +850,10 @@ doDirectory(const char *dirname_given, int numEncodings, ListPtr encodingsToDo)
{
if (lstat(filename, &f_stat))
goto done;
+#ifdef S_ISLNK
if (S_ISLNK(f_stat.st_mode))
tprio = 0;
+#endif
}
if(doBitmaps)
rc = bitmapIdentify(filename, &xlfd_name);
--
1.7.9
More information about the xorg-devel
mailing list