This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
locale.c: Add compile check for unimplemented behavior
authorKarl Williamson <khw@cpan.org>
Tue, 2 Jan 2018 03:41:21 +0000 (20:41 -0700)
committerKarl Williamson <khw@cpan.org>
Wed, 31 Jan 2018 05:27:25 +0000 (22:27 -0700)
Instead of silently not working.

locale.c

index c6fc6e1..7182fe8 100644 (file)
--- a/locale.c
+++ b/locale.c
@@ -1980,7 +1980,9 @@ Perl_init_i18nl10n(pTHX_ int printwarn)
 
                 trial_locale = system_default_locale;
             }
-#    endif /* WIN32 */
+#    else
+#      error SYSTEM_DEFAULT_LOCALE only implemented for Win32
+#    endif
 #  endif /* SYSTEM_DEFAULT_LOCALE */
 
         }   /* For i > 0 */