[gtk/issue-1662] Use C locale when building gtktypefuncs.c



commit 5f8684fdeb00759d8d2e8c1b655bf04f880a1c61
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Sun Feb 10 12:46:57 2019 +0000

    Use C locale when building gtktypefuncs.c
    
    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..0198e8db0a 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 <gtk/gtkx.h>') > xgen-gtfsrc.c && \
+       $(AM_V_GEN) export LC_COLLATE=C ; \
+         (echo '#undef GTK_COMPILATION' && echo '#include <gtk/gtkx.h>') > 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' | \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]