From 0f834b91a4768673833ab4917e87d86c237bb1a6 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 23 Mar 2012 10:05:55 +0100 Subject: libX11 xserver fontconfig mesa pixman xkbcomp xkeyboard-config git update 23 Mar 2012 --- fontconfig/src/Makefile.am | 10 +++++----- fontconfig/src/fcarch.c | 4 ++-- fontconfig/src/fcarch.h | 23 +++++++++++++++++++++-- fontconfig/src/fcmatch.c | 19 ++++++++++++++----- 4 files changed, 42 insertions(+), 14 deletions(-) (limited to 'fontconfig/src') diff --git a/fontconfig/src/Makefile.am b/fontconfig/src/Makefile.am index a7bb73ce2..fb30cd596 100644 --- a/fontconfig/src/Makefile.am +++ b/fontconfig/src/Makefile.am @@ -34,7 +34,7 @@ install-libtool-import-lib: $(INSTALL) fontconfig.def $(DESTDIR)$(libdir)/fontconfig.def uninstall-libtool-import-lib: - -rm $(DESTDIR)$(libdir)/libfontconfig.dll.a $(DESTDIR)$(libdir)/fontconfig.def + $(RM) $(DESTDIR)$(libdir)/libfontconfig.dll.a $(DESTDIR)$(libdir)/fontconfig.def else @@ -58,7 +58,7 @@ install-ms-import-lib: $(INSTALL) fontconfig.lib $(DESTDIR)$(libdir) uninstall-ms-import-lib: - -rm $(DESTDIR)$(libdir)/fontconfig.lib + $(RM) $(DESTDIR)$(libdir)/fontconfig.lib else @@ -147,12 +147,12 @@ PUBLIC_FT_FILES = \ fcaliastail.h: fcalias.h fcalias.h: $(top_srcdir)/src/makealias $(PUBLIC_FILES) - sh $(top_srcdir)/src/makealias "$(top_srcdir)/src" fcalias.h fcaliastail.h $(PUBLIC_FILES) + $(AM_V_GEN) sh $(top_srcdir)/src/makealias "$(top_srcdir)/src" fcalias.h fcaliastail.h $(PUBLIC_FILES) fcftaliastail.h: fcftalias.h fcftalias.h: $(top_srcdir)/src/makealias $(PUBLIC_FT_FILES) - sh $(top_srcdir)/src/makealias "$(top_srcdir)/src" fcftalias.h fcftaliastail.h $(PUBLIC_FT_FILES) + $(AM_V_GEN) sh $(top_srcdir)/src/makealias "$(top_srcdir)/src" fcftalias.h fcftaliastail.h $(PUBLIC_FT_FILES) CLEANFILES = $(ALIAS_FILES) @@ -164,4 +164,4 @@ fontconfig.def: $(PUBLIC_FILES) $(PUBLIC_FT_FILES) sort; \ echo LIBRARY libfontconfig-@LIBT_CURRENT_MINUS_AGE@.dll; \ echo VERSION @LIBT_CURRENT@.@LIBT_REVISION@) >$@ - @ ! grep -q FcERROR $@ || (rm $@; false) + @ ! grep -q FcERROR $@ || ($(RM) $@; false) diff --git a/fontconfig/src/fcarch.c b/fontconfig/src/fcarch.c index c69397e18..09d24b31b 100644 --- a/fontconfig/src/fcarch.c +++ b/fontconfig/src/fcarch.c @@ -31,12 +31,12 @@ #ifndef FC_ARCHITECTURE -#include "fcarch.h" - /* Make sure the cache structure is consistent with what we expect */ #include "fcint.h" +#include "fcarch.h" + FC_ASSERT_STATIC (1 == sizeof (char)); FC_ASSERT_STATIC (2 == sizeof (FcChar16)); FC_ASSERT_STATIC (4 == sizeof (int)); diff --git a/fontconfig/src/fcarch.h b/fontconfig/src/fcarch.h index 9cabf0450..22e6f8e13 100644 --- a/fontconfig/src/fcarch.h +++ b/fontconfig/src/fcarch.h @@ -46,9 +46,28 @@ * be64 1234 8 8 */ -#if defined(WORDS_BIGENDIAN) && WORDS_BIGENDIAN +#ifdef __APPLE__ +# include +# undef SIZEOF_VOID_P +# undef ALIGNOF_DOUBLE +# ifdef __LP64__ +# define SIZEOF_VOID_P 8 +# define ALIGNOF_DOUBLE 8 +# else +# define SIZEOF_VOID_P 4 +# define ALIGNOF_DOUBLE 4 +# endif +#endif + +#if defined(__DARWIN_BYTE_ORDER) && __DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN +# define FC_ARCH_ENDIAN "le" +#elif defined(__DARWIN_BYTE_ORDER) && __DARWIN_BYTE_ORDER == __DARWIN_BIG_ENDIAN +# define FC_ARCH_ENDIAN "be" +#elif defined(__DARWIN_BYTE_ORDER) && __DARWIN_BYTE_ORDER == __DARWIN_PDP_ENDIAN +# define FC_ARCH_ENDIAN "pe" +#elif defined(WORDS_BIGENDIAN) && WORDS_BIGENDIAN # define FC_ARCH_ENDIAN "be" -#else /* !WORDS_BIGENDIAN */ +#else # define FC_ARCH_ENDIAN "le" #endif diff --git a/fontconfig/src/fcmatch.c b/fontconfig/src/fcmatch.c index 422bc384d..92e4a6668 100644 --- a/fontconfig/src/fcmatch.c +++ b/fontconfig/src/fcmatch.c @@ -501,11 +501,11 @@ FcFontSetMatchInternal (FcConfig *config, printf ("\n"); FcPatternPrint (best); } - if (!best) - { - *result = FcResultNoMatch; - return 0; - } + /* assuming that 'result' is initialized with FcResultNoMatch + * outside this function */ + if (best) + *result = FcResultMatch; + return best; } @@ -522,6 +522,8 @@ FcFontSetMatch (FcConfig *config, assert (p != NULL); assert (result != NULL); + *result = FcResultNoMatch; + if (!config) { config = FcConfigGetCurrent (); @@ -547,6 +549,8 @@ FcFontMatch (FcConfig *config, assert (p != NULL); assert (result != NULL); + *result = FcResultNoMatch; + if (!config) { config = FcConfigGetCurrent (); @@ -826,6 +830,9 @@ FcFontSetSort (FcConfig *config, printf ("First font "); FcPatternPrint (ret->fonts[0]); } + if (ret->nfont > 0) + *result = FcResultMatch; + return ret; bail2: @@ -849,6 +856,8 @@ FcFontSort (FcConfig *config, assert (p != NULL); assert (result != NULL); + *result = FcResultNoMatch; + if (!config) { config = FcConfigGetCurrent (); -- cgit v1.2.3