First part of fix for bug 8310 - toupper_ascii() is broken on big-endian systems
[ira/wip.git] / source3 / smbd / mangle_hash.c
index a51ea6b208e27be9db22b6b9823a92c13149f27f..0238083e38c19bf29878bad6635096c9f24a7933 100644 (file)
@@ -424,8 +424,8 @@ static bool is_mangled(const char *s, const struct share_params *p)
        magic = strchr_m( s, magic_char );
        while( magic && magic[1] && magic[2] ) {         /* 3 chars, 1st is magic. */
                if( ('.' == magic[3] || '/' == magic[3] || !(magic[3]))          /* Ends with '.' or nul or '/' ?  */
-                               && isbasechar( toupper_ascii(magic[1]) )           /* is 2nd char basechar?  */
-                               && isbasechar( toupper_ascii(magic[2]) ) )         /* is 3rd char basechar?  */
+                               && isbasechar( toupper_m(magic[1]) )           /* is 2nd char basechar?  */
+                               && isbasechar( toupper_m(magic[2]) ) )         /* is 3rd char basechar?  */
                        return( True );                           /* If all above, then true, */
                magic = strchr_m( magic+1, magic_char );      /*    else seek next magic. */
        }
@@ -479,7 +479,7 @@ static void cache_mangled_name( const char mangled_name[13],
        s1 = strrchr( mangled_name_key, '.' );
        if( s1 && (s2 = strrchr( raw_name, '.' )) ) {
                size_t i = 1;
-               while( s1[i] && (tolower_ascii( s1[i] ) == s2[i]) )
+               while( s1[i] && (tolower_m( s1[i] ) == s2[i]) )
                        i++;
                if( !s1[i] && !s2[i] ) {
                        /* Truncate at the '.' */