@@ -774,37 +774,37 @@ Perl_upg_version(pTHX_ SV *ver, bool qv)
774774 Perl_croak (aTHX_ "panic: Unexpectedly didn't find a dot radix"
775775 " character in '%s'" , buf );
776776# else
777- const char * locale_name_on_entry = NULL ;
777+ const char * locale_name_on_entry = NULL ;
778778
779- /* In windows, or not threaded, or not thread-safe, if it isn't C,
780- * set it to C. */
779+ /* In windows, or not threaded, or not thread-safe, if it isn't
780+ * C, set it to C. */
781781
782- POSIX_SETLOCALE_LOCK ; /* Start critical section */
782+ POSIX_SETLOCALE_LOCK ; /* Start critical section */
783783
784- locale_name_on_entry = setlocale (LC_NUMERIC , NULL );
785- if ( strEQ (locale_name_on_entry , "C" )
786- || strEQ (locale_name_on_entry , "C.UTF-8" )
787- || strEQ (locale_name_on_entry , "POSIX" ))
788- {
789- /* No need to change the locale, since these all are known to
790- * have a dot radix. Change the variable to indicate to the
791- * restore code that nothing needs to be done */
792- locale_name_on_entry = NULL ;
793- }
794- else {
795- /* The setlocale() call might free or overwrite the name */
796- locale_name_on_entry = savepv (locale_name_on_entry );
797- setlocale (LC_NUMERIC , "C" );
798- }
784+ locale_name_on_entry = setlocale (LC_NUMERIC , NULL );
785+ if ( strEQ (locale_name_on_entry , "C" )
786+ || strEQ (locale_name_on_entry , "C.UTF-8" )
787+ || strEQ (locale_name_on_entry , "POSIX" ))
788+ {
789+ /* No need to change the locale, since these all are known
790+ * to have a dot radix. Change the variable to indicate to
791+ * the restore code that nothing needs to be done */
792+ locale_name_on_entry = NULL ;
793+ }
794+ else {
795+ /* The setlocale() call might free or overwrite the name */
796+ locale_name_on_entry = savepv (locale_name_on_entry );
797+ setlocale (LC_NUMERIC , "C" );
798+ }
799799
800- GET_NUMERIC_VERSION (ver , sv , tbuf , buf , len );
800+ GET_NUMERIC_VERSION (ver , sv , tbuf , buf , len );
801801
802- if (locale_name_on_entry ) {
803- setlocale (LC_NUMERIC , locale_name_on_entry );
804- Safefree (locale_name_on_entry );
805- }
802+ if (locale_name_on_entry ) {
803+ setlocale (LC_NUMERIC , locale_name_on_entry );
804+ Safefree (locale_name_on_entry );
805+ }
806806
807- POSIX_SETLOCALE_UNLOCK ; /* End critical section */
807+ POSIX_SETLOCALE_UNLOCK ; /* End critical section */
808808# endif
809809 }
810810#endif
0 commit comments