From 6058495f50d0f65fbb6d2dcd31d24d0b2ada3194 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Sun, 10 Feb 2019 12:46:57 +0000 Subject: [PATCH] Use C locale when building gtktypefuncs.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We're using [a-z] ranges with sed and grep, and POSIX does not specify their behaviour in non-ASCII locales: In the POSIX locale, a range expression represents the set of collating elements that fall between two elements in the collation sequence, inclusive. In other locales, a range expression has unspecified behavior -- IEEE Std 1003.1-2017, ยง 9.3.5 (7) This can lead to no results, or invalid replacements, which in turn can lead to broken builds or broken build artifacts. Fixes: #1662 --- gtk/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gtk/Makefile.am b/gtk/Makefile.am index b27ddcc72a..bd20ae409d 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -1445,7 +1445,8 @@ gtkprivatetypebuiltins.c: $(gtk_private_type_h_sources) gtkprivatetypebuiltins. gtktypefuncs.c: stamp-gtktypebuiltins.h stamp-gtkprivatetypebuiltins.h $(top_srcdir)/gtk/*.h $(top_srcdir)/gtk/a11y/*.h $(top_srcdir)/gtk/deprecated/*.h $(top_srcdir)/gdk/*.h Makefile - $(AM_V_GEN) (echo '#undef GTK_COMPILATION' && echo '#include ') > xgen-gtfsrc.c && \ + $(AM_V_GEN) export LC_ALL=C ; \ + (echo '#undef GTK_COMPILATION' && echo '#include ') > xgen-gtfsrc.c && \ echo 'G_GNUC_BEGIN_IGNORE_DEPRECATIONS' > xgen-gtf && \ ${CPP} $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) xgen-gtfsrc.c | \ $(GREP) -o '\bg[td]k_[a-zA-Z0-9_]*_get_type\b' | \