gettext-Fix-building-with-MSVC.patch 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. diff --git a/gettext-tools/config.h.in b/gettext-tools/config.h.in
  2. index 6818a4d..9842a71 100644
  3. --- a/gettext-tools/config.h.in
  4. +++ b/gettext-tools/config.h.in
  5. @@ -3147,7 +3147,7 @@
  6. #define PAGE_WIDTH 79
  7. /* On Windows, variables that may be in a DLL must be marked specially. */
  8. -#if ((defined _MSC_VER && defined _DLL) || defined WOE32DLL) && !defined IN_RELOCWRAPPER
  9. +#if ((defined _MSC_VER && defined DLL_IMPORT) || defined WOE32DLL) && !defined IN_RELOCWRAPPER
  10. # define DLL_VARIABLE __declspec (dllimport)
  11. #else
  12. # define DLL_VARIABLE
  13. diff --git a/gettext-tools/gnulib-lib/javaversion.c b/gettext-tools/gnulib-lib/javaversion.c
  14. index d760c32..4867fda 100644
  15. --- a/gettext-tools/gnulib-lib/javaversion.c
  16. +++ b/gettext-tools/gnulib-lib/javaversion.c
  17. @@ -39,7 +39,7 @@
  18. #define _(str) gettext (str)
  19. /* Get PKGDATADIR. */
  20. -#include "configmake.h"
  21. +#define PKGDATADIR ""
  22. struct locals
  23. diff --git a/gettext-tools/libgettextpo/xalloc.h b/gettext-tools/libgettextpo/xalloc.h
  24. index f4a329e..a38dcf1 100644
  25. --- a/gettext-tools/libgettextpo/xalloc.h
  26. +++ b/gettext-tools/libgettextpo/xalloc.h
  27. @@ -60,7 +60,7 @@ extern "C" {
  28. in charge of honoring the three previous items. This is the
  29. function to call when one wants the program to die because of a
  30. memory allocation failure. */
  31. -extern void xalloc_die (void)
  32. +extern _Noreturn void xalloc_die (void)
  33. #if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5)) && !__STRICT_ANSI__
  34. __attribute__ ((__noreturn__))
  35. #endif
  36. diff --git a/gettext-tools/src/plural-exp.c b/gettext-tools/src/plural-exp.c
  37. index d5b9deb..e2c6bc4 100644
  38. --- a/gettext-tools/src/plural-exp.c
  39. +++ b/gettext-tools/src/plural-exp.c
  40. @@ -17,5 +17,5 @@
  41. /* Include the expression parsing code from libintl, with different function
  42. names. */
  43. -#include "../intl/pluralx.c"
  44. +#include "../intl/plural.c"
  45. #include "../../gettext-runtime/intl/plural-exp.c"