This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl.h: #include locale_table.h even if NO_LOCALE
authorKarl Williamson <khw@cpan.org>
Wed, 3 Jan 2024 17:04:19 +0000 (10:04 -0700)
committerKarl Williamson <khw@cpan.org>
Thu, 4 Jan 2024 15:29:16 +0000 (08:29 -0700)
It defines some symbols which help in this circumstance, and others
which would otherwise have to be #ifdef'd against in order to compile.

perl.h

diff --git a/perl.h b/perl.h
index 4cf6529..d1f3c37 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -1159,6 +1159,15 @@ violations are fatal.
                                    #define */
 #endif
 
+/* Even if not using locales, this header should be #included so as to #define
+ * some symbols which avoid #ifdefs to get things to compile.  But make sure
+ * the macro it calls does nothing */
+#ifndef USE_LOCALE
+#    undef PERL_LOCALE_TABLE_ENTRY
+#    define PERL_LOCALE_TABLE_ENTRY(name, call_back)
+#    include "locale_table.h"
+#endif
+
 /* XXX The Configure probe for categories must be updated when adding new
  * categories here */