8 /* If this doesn't exist, it's not needed, so noop */
9 __UNDEFINED__ switch_to_global_locale()
11 /* Originally, this didn't return a value, but in perls like that, the value
12 * should always be TRUE. Add a return to Perl_sync_locale() when it's
13 * available. And actually do a sync when its not, if locales are available on
16 # if { VERSION < 5.27.9 }
17 # if { VERSION >= 5.21.3 }
19 # define sync_locale() (Perl_sync_locale(aTHX), 1)
20 # elif defined(new_ctype) && defined(LC_CTYPE)
21 # define sync_locale() (new_ctype(setlocale(LC_CTYPE, NULL)), 1)
28 __UNDEFINED__ sync_locale() 1
35 RETVAL = sync_locale();
44 # We don't know for sure that we are in the global locale for testing. But
45 # if this is unthreaded, it almost certainly is. But Configure can be called
46 # to force POSIX locales on unthreaded systems. If this becomes a problem
47 # this check could be beefed up.
48 if ($Config{usethreads}) {
52 ok(&Devel::PPPort::sync_locale());