This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl.h: Make macro do nothing when LC_CTYPE not available
authorKarl Williamson <khw@cpan.org>
Mon, 9 Mar 2015 04:24:12 +0000 (22:24 -0600)
committerKarl Williamson <khw@cpan.org>
Mon, 9 Mar 2015 15:37:08 +0000 (09:37 -0600)
Otherwise things won't compile.

perl.h

diff --git a/perl.h b/perl.h
index 109ab6a..b6b232f 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -5809,12 +5809,16 @@ typedef struct am_table_short AMTS;
          * this will so rarely  be true, there is no point to optimize for
          * time; instead it makes sense to minimize space used and do all the
          * work in the rarely called function */
-#       define _CHECK_AND_WARN_PROBLEMATIC_LOCALE                           \
-       STMT_START {                                                        \
-            if (UNLIKELY(PL_warn_locale)) {                                 \
-                _warn_problematic_locale();                                 \
-            }                                                               \
-        }  STMT_END
+#       ifdef USE_LOCALE_CTYPE
+#           define _CHECK_AND_WARN_PROBLEMATIC_LOCALE                         \
+                STMT_START {                                                  \
+                    if (UNLIKELY(PL_warn_locale)) {                           \
+                        _warn_problematic_locale();                           \
+                    }                                                         \
+                }  STMT_END
+#       else
+#           define _CHECK_AND_WARN_PROBLEMATIC_LOCALE
+#       endif
 
 
     /* These two internal macros are called when a warning should be raised,