0001-Avoid-conflicts-with-integer-width-macros-from-TS-1866.patch 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. From 1ab5258f7c2abfafcd63a760ca08bf93591912da Mon Sep 17 00:00:00 2001
  2. From: Khem Raj <raj.khem@gmail.com>
  3. Date: Wed, 14 Dec 2016 16:11:05 -0800
  4. Subject: [PATCH] Avoid conflicts with integer width macros from TS
  5. 18661-1:2014
  6. glibc 2.25+ has now defined these macros in <limits.h>
  7. https://sourceware.org/git/?p=glibc.git;a=commit;h=5b17fd0da62bf923cb61d1bb7b08cf2e1f1f9c1a
  8. Create an alias for FC_CHAR_WIDTH for ABI compatibility
  9. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  10. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
  11. ---
  12. Patch status: upstream
  13. fontconfig/fontconfig.h | 3 ++-
  14. src/fcobjs.h | 2 +-
  15. 2 files changed, 3 insertions(+), 2 deletions(-)
  16. diff --git a/fontconfig/fontconfig.h b/fontconfig/fontconfig.h
  17. index 5c72b22..070a557 100644
  18. --- a/fontconfig/fontconfig.h
  19. +++ b/fontconfig/fontconfig.h
  20. @@ -128,7 +128,8 @@ typedef int FcBool;
  21. #define FC_USER_CACHE_FILE ".fonts.cache-" FC_CACHE_VERSION
  22. /* Adjust outline rasterizer */
  23. -#define FC_CHAR_WIDTH "charwidth" /* Int */
  24. +#define FC_CHARWIDTH "charwidth" /* Int */
  25. +#define FC_CHAR_WIDTH FC_CHARWIDTH
  26. #define FC_CHAR_HEIGHT "charheight"/* Int */
  27. #define FC_MATRIX "matrix" /* FcMatrix */
  28. diff --git a/src/fcobjs.h b/src/fcobjs.h
  29. index 1fc4f65..d27864b 100644
  30. --- a/src/fcobjs.h
  31. +++ b/src/fcobjs.h
  32. @@ -51,7 +51,7 @@ FC_OBJECT (DPI, FcTypeDouble, NULL)
  33. FC_OBJECT (RGBA, FcTypeInteger, NULL)
  34. FC_OBJECT (SCALE, FcTypeDouble, NULL)
  35. FC_OBJECT (MINSPACE, FcTypeBool, NULL)
  36. -FC_OBJECT (CHAR_WIDTH, FcTypeInteger, NULL)
  37. +FC_OBJECT (CHARWIDTH, FcTypeInteger, NULL)
  38. FC_OBJECT (CHAR_HEIGHT, FcTypeInteger, NULL)
  39. FC_OBJECT (MATRIX, FcTypeMatrix, NULL)
  40. FC_OBJECT (CHARSET, FcTypeCharSet, FcCompareCharSet)
  41. --
  42. 2.10.2