summaryrefslogtreecommitdiff
path: root/source3/smbd/mangle_hash2.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-07-19 13:19:29 -0700
committerJeremy Allison <jra@samba.org>2011-07-19 13:19:29 -0700
commitee34c25c8a989b5a7c0ad59d71bb39f8efff045c (patch)
tree25d8f09ed1c36ad18c8c54d596efeeb6c1aa66b2 /source3/smbd/mangle_hash2.c
parent2052c2d6fa830b94a6b6cf8dd48b56f62de4e5ac (diff)
downloadsamba-ee34c25c8a989b5a7c0ad59d71bb39f8efff045c.tar.gz
samba-ee34c25c8a989b5a7c0ad59d71bb39f8efff045c.tar.bz2
samba-ee34c25c8a989b5a7c0ad59d71bb39f8efff045c.zip
First part of fix for bug 8310 - toupper_ascii() is broken on big-endian systems
Remove int toupper_ascii(int c); int tolower_ascii(int c); int isupper_ascii(int c); int islower_ascii(int c); and replace with their _m equivalents, as they are identical.
Diffstat (limited to 'source3/smbd/mangle_hash2.c')
-rw-r--r--source3/smbd/mangle_hash2.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/smbd/mangle_hash2.c b/source3/smbd/mangle_hash2.c
index 4de80cbe31..09cd44d5af 100644
--- a/source3/smbd/mangle_hash2.c
+++ b/source3/smbd/mangle_hash2.c
@@ -173,10 +173,10 @@ static void init_tables(void)
char_flags[c2] |= FLAG_POSSIBLE2;
char_flags[c3] |= FLAG_POSSIBLE3;
char_flags[c4] |= FLAG_POSSIBLE4;
- char_flags[tolower_ascii(c1)] |= FLAG_POSSIBLE1;
- char_flags[tolower_ascii(c2)] |= FLAG_POSSIBLE2;
- char_flags[tolower_ascii(c3)] |= FLAG_POSSIBLE3;
- char_flags[tolower_ascii(c4)] |= FLAG_POSSIBLE4;
+ char_flags[tolower_m(c1)] |= FLAG_POSSIBLE1;
+ char_flags[tolower_m(c2)] |= FLAG_POSSIBLE2;
+ char_flags[tolower_m(c3)] |= FLAG_POSSIBLE3;
+ char_flags[tolower_m(c4)] |= FLAG_POSSIBLE4;
char_flags[(unsigned char)'.'] |= FLAG_POSSIBLE4;
}
@@ -737,7 +737,7 @@ static bool hash2_name_to_8_3(const char *name,
if (! FLAG_CHECK(lead_chars[i], FLAG_ASCII)) {
lead_chars[i] = '_';
}
- lead_chars[i] = toupper_ascii(lead_chars[i]);
+ lead_chars[i] = toupper_m(lead_chars[i]);
}
for (;i<mangle_prefix;i++) {
lead_chars[i] = '_';
@@ -758,7 +758,7 @@ static bool hash2_name_to_8_3(const char *name,
char c = dot_p[i];
if (FLAG_CHECK(c, FLAG_ASCII)) {
extension[extension_length++] =
- toupper_ascii(c);
+ toupper_m(c);
}
}
}