wine-1.9.6-cups.patch 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. This patch fixes
  2. info.c:779:13: error: ‘cupsGetPPD’ undeclared here (not in a function)
  3. DO_FUNC(cupsGetPPD); \
  4. ^
  5. info.c:787:34: note: in definition of macro ‘DO_FUNC’
  6. #define DO_FUNC(f) static typeof(f) *p##f
  7. ^
  8. info.c:788:1: note: in expansion of macro ‘CUPS_FUNCS’
  9. CUPS_FUNCS;
  10. ^
  11. info.c: In function ‘cupsGetPPD3_wrapper’:
  12. info.c:807:11: error: called object ‘pcupsGetPPD’ is not a function or function pointer
  13. ppd = pcupsGetPPD( name );
  14. ^
  15. info.c:787:38: note: declared here
  16. #define DO_FUNC(f) static typeof(f) *p##f
  17. ^
  18. info.c:779:5: note: in expansion of macro ‘DO_FUNC’
  19. DO_FUNC(cupsGetPPD); \
  20. ^
  21. info.c:788:1: note: in expansion of macro ‘CUPS_FUNCS’
  22. CUPS_FUNCS;
  23. See <https://www.winehq.org/pipermail/wine-bugs/2016-June/445574.html>
  24. and <https://bugs.winehq.org/show_bug.cgi?id=40851#c1>.
  25. --- a/configure
  26. +++ a/configure
  27. @@ -13067,6 +13067,18 @@ _ACEOF
  28. CUPS_CFLAGS="$ac_cups_cflags"
  29. fi
  30. + for ac_header in cups/ppd.h
  31. +do :
  32. + ac_fn_c_check_header_mongrel "$LINENO" "cups/ppd.h" "ac_cv_header_cups_ppd_h" "$ac_includes_default"
  33. +if test "x$ac_cv_header_cups_ppd_h" = xyes; then :
  34. + cat >>confdefs.h <<_ACEOF
  35. +#define HAVE_CUPS_PPD_H 1
  36. +_ACEOF
  37. +
  38. +fi
  39. +
  40. +done
  41. +
  42. fi
  43. done
  44. --- a/configure.ac
  45. +++ a/configure.ac
  46. @@ -1543,7 +1543,8 @@ then
  47. AC_CHECK_HEADERS(cups/cups.h,
  48. [WINE_CHECK_SONAME(cups,cupsGetDefault,
  49. [CUPS_CFLAGS="$ac_cups_cflags"],,
  50. - [$ac_cups_libs])])
  51. + [$ac_cups_libs])
  52. + AC_CHECK_HEADERS(cups/ppd.h)])
  53. CPPFLAGS="$ac_save_CPPFLAGS"
  54. fi
  55. WINE_NOTICE_WITH(cups,[test "x$ac_cv_lib_soname_cups" = "x"],
  56. --- a/dlls/winspool.drv/info.c
  57. +++ a/dlls/winspool.drv/info.c
  58. @@ -44,6 +44,9 @@
  59. #ifdef HAVE_CUPS_CUPS_H
  60. # include <cups/cups.h>
  61. #endif
  62. +#ifdef HAVE_CUPS_PPD_H
  63. +# include <cups/ppd.h>
  64. +#endif
  65. #ifdef HAVE_APPLICATIONSERVICES_APPLICATIONSERVICES_H
  66. #define GetCurrentProcess GetCurrentProcess_Mac
  67. --- a/include/config.h.in
  68. +++ a/include/config.h.in
  69. @@ -89,6 +89,9 @@
  70. /* Define to 1 if you have the <cups/cups.h> header file. */
  71. #undef HAVE_CUPS_CUPS_H
  72. +/* Define to 1 if you have the <cups/ppd.h> header file. */
  73. +#undef HAVE_CUPS_PPD_H
  74. +
  75. /* Define to 1 if you have the <curses.h> header file. */
  76. #undef HAVE_CURSES_H