configure-Move-all-includes-to-the-first-argument-of-AC_T.patch 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From: Ting-Wei Lan <lantw@src.gnome.org>
  2. Date: Sat, 20 Jan 2018 17:52:33 +0800
  3. Subject: configure: Move all includes to the first argument of AC_TRY_LINK
  4. Putting includes in the second argument of AC_TRY_LINK is not safe. If
  5. a header having inline functions is included inside the main function,
  6. it becomes a nested function. This is not supported by clang.
  7. Bug: https://bugzilla.gnome.org/show_bug.cgi?id=792720
  8. Origin: upstream, 2.24.33, commit:c3ededb119405c26c684cef569177b73255b7a22
  9. ---
  10. configure.ac | 4 ++--
  11. 1 file changed, 2 insertions(+), 2 deletions(-)
  12. diff --git a/configure.ac b/configure.ac
  13. index b75f9c6..44d3056 100644
  14. --- a/configure.ac
  15. +++ b/configure.ac
  16. @@ -715,7 +715,7 @@ oLIBS="$LIBS"
  17. LIBS="$LIBS $GDK_WLIBS"
  18. # The following is necessary for Linux libc-5.4.38
  19. AC_MSG_CHECKING(if iswalnum() and friends are properly defined)
  20. -AC_TRY_LINK([#include <stdlib.h>],[
  21. +AC_TRY_LINK([#include <stdlib.h>
  22. #if (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H))
  23. # ifdef HAVE_WCTYPE_H
  24. # include <wctype.h>
  25. @@ -726,7 +726,7 @@ AC_TRY_LINK([#include <stdlib.h>],[
  26. # endif
  27. #else
  28. # define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c))
  29. -#endif
  30. +#endif],[
  31. iswalnum((wchar_t) 0);
  32. ], gdk_working_wctype=yes, gdk_working_wctype=no)
  33. LIBS="$oLIBS"