Skip to content

Commit ee2a526

Browse files
committed
Update gettext to fix upstream conflicts (#6)
1 parent 281ab51 commit ee2a526

File tree

6 files changed

+237
-205
lines changed

6 files changed

+237
-205
lines changed

.github/workflows/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
exit 0
4343
shell: cmd
4444

45-
- uses: msys2/setup-msys2@v2
45+
- uses: msys2/setup-msys2@v2.21.1
4646
with:
4747
msystem: ${{ matrix.msystem }}
4848
install: git patch make unzip pactoys
+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Do not replace names of asprintf and vasprintf while including a header
2+
that pulls in stdio.h which also declares functions with that names.
3+
These function declarations would conflict with the declarations from
4+
this library.
5+
6+
diff -urN gettext-0.22.3/gettext-runtime/libasprintf/vasprintf.c.orig gettext-0.22.3/gettext-runtime/libasprintf/vasprintf.c
7+
--- gettext-0.22.3/gettext-runtime/libasprintf/vasprintf.c.orig 2019-05-11 13:29:32.000000000 +0200
8+
+++ gettext-0.22.3/gettext-runtime/libasprintf/vasprintf.c 2023-10-27 18:58:18.838760500 +0200
9+
@@ -27,8 +27,19 @@
10+
#include <limits.h>
11+
#include <stdlib.h>
12+
13+
+#undef asprintf
14+
+#undef vasprintf
15+
+
16+
#include "vasnprintf.h"
17+
18+
+#if !(HAVE_VASPRINTF && HAVE_POSIX_PRINTF)
19+
+
20+
+/* Define to the same symbols as in lib-asprintf.h. */
21+
+#define asprintf libasprintf_asprintf
22+
+#define vasprintf libasprintf_vasprintf
23+
+
24+
+#endif
25+
+
26+
/* Some systems, like OSF/1 4.0 and Woe32, don't have EOVERFLOW. */
27+
#ifndef EOVERFLOW
28+
# define EOVERFLOW E2BIG

mingw-w64-gettext/0023-gnulib.patch

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Do not include two directories with generated gnulib headers in -I flags,
2+
or #include_next directive for error.h fails.
3+
4+
diff -urN gettext-0.22.3/gettext-tools/src/Makefile.am.orig gettext-0.22.3/gettext-tools/src/Makefile.am
5+
--- gettext-0.22.3/gettext-tools/src/Makefile.am.orig 2023-10-27 20:04:58.982538600 +0200
6+
+++ gettext-0.22.3/gettext-tools/src/Makefile.am 2023-10-27 20:40:13.497536600 +0200
7+
@@ -307,7 +307,7 @@
8+
9+
# Use the dummy libtextstyle from gnulib, as libgettextpo does.
10+
LT_LIBTEXTSTYLE =
11+
-AM_CPPFLAGS += -I../libgettextpo -I$(top_srcdir)/libgettextpo
12+
+AM_CPPFLAGS += -I$(top_srcdir)/libgettextpo
13+
14+
# How to build libgettextsrc.la.
15+
# Need ../gnulib-lib/libgettextlib.la.
16+
diff -urN gettext-0.22.3/gettext-tools/libgettextpo/Makefile.gnulib.orig gettext-0.22.3/gettext-tools/libgettextpo/Makefile.gnulib
17+
--- gettext-0.22.3/gettext-tools/libgettextpo/Makefile.gnulib.orig 2023-10-02 23:07:33.000000000 +0200
18+
+++ gettext-0.22.3/gettext-tools/libgettextpo/Makefile.gnulib 2023-10-27 21:08:15.039903500 +0200
19+
@@ -751,11 +751,12 @@
20+
# We need the following in order to create a dummy placeholder for
21+
# <textstyle.h>.
22+
textstyle.h: textstyle.in.h $(top_builddir)/config.status
23+
- $(AM_V_GEN)rm -f $@-t $@ && \
24+
+ $(AM_V_GEN)rm -f $@-t $@ ../gnulib-lib/$@ && \
25+
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
26+
cat $(srcdir)/textstyle.in.h; \
27+
} > $@-t && \
28+
- mv $@-t $@
29+
+ mv $@-t $@ && \
30+
+ cp $@ ../gnulib-lib/$@
31+
MOSTLYCLEANFILES += textstyle.h textstyle.h-t
32+
33+
EXTRA_DIST += textstyle.in.h

mingw-w64-gettext/0030-fix-wbindtextdomain-backport.patch

-121
This file was deleted.

0 commit comments

Comments
 (0)