diff options
author | Igor Druzhinin <jaxbrigs@gmail.com> | 2010-08-19 16:27:12 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2010-08-19 20:46:42 -0400 |
commit | bf4f12113812ac5be76c5590c6f50c8346f784a4 (patch) | |
tree | d159876dddb3d53c0e2e68675b93610c85ba4e03 /fs/cifs/cifs_unicode.h | |
parent | fc87a40677bbe0937e2ff0642c7e83c9a4813f3d (diff) |
cifs: correction of unicode header files
This patch corrects a problem of compilation errors at removal of
UNIUPR_NOLOWER definition and adds include guards to cifs_unicode.h.
Signed-off-by: Igor Druzhinin <jaxbrigs@gmail.com>
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifs_unicode.h')
-rw-r--r-- | fs/cifs/cifs_unicode.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/fs/cifs/cifs_unicode.h b/fs/cifs/cifs_unicode.h index 650638275a6f..7fe6b52df507 100644 --- a/fs/cifs/cifs_unicode.h +++ b/fs/cifs/cifs_unicode.h | |||
@@ -30,6 +30,8 @@ | |||
30 | * This is a compressed table of upper and lower case conversion. | 30 | * This is a compressed table of upper and lower case conversion. |
31 | * | 31 | * |
32 | */ | 32 | */ |
33 | #ifndef _CIFS_UNICODE_H | ||
34 | #define _CIFS_UNICODE_H | ||
33 | 35 | ||
34 | #include <asm/byteorder.h> | 36 | #include <asm/byteorder.h> |
35 | #include <linux/types.h> | 37 | #include <linux/types.h> |
@@ -67,8 +69,8 @@ extern const struct UniCaseRange CifsUniUpperRange[]; | |||
67 | #endif /* UNIUPR_NOUPPER */ | 69 | #endif /* UNIUPR_NOUPPER */ |
68 | 70 | ||
69 | #ifndef UNIUPR_NOLOWER | 71 | #ifndef UNIUPR_NOLOWER |
70 | extern signed char UniLowerTable[512]; | 72 | extern signed char CifsUniLowerTable[512]; |
71 | extern struct UniCaseRange UniLowerRange[]; | 73 | extern const struct UniCaseRange CifsUniLowerRange[]; |
72 | #endif /* UNIUPR_NOLOWER */ | 74 | #endif /* UNIUPR_NOLOWER */ |
73 | 75 | ||
74 | #ifdef __KERNEL__ | 76 | #ifdef __KERNEL__ |
@@ -337,15 +339,15 @@ UniStrupr(register wchar_t *upin) | |||
337 | * UniTolower: Convert a unicode character to lower case | 339 | * UniTolower: Convert a unicode character to lower case |
338 | */ | 340 | */ |
339 | static inline wchar_t | 341 | static inline wchar_t |
340 | UniTolower(wchar_t uc) | 342 | UniTolower(register wchar_t uc) |
341 | { | 343 | { |
342 | register struct UniCaseRange *rp; | 344 | register const struct UniCaseRange *rp; |
343 | 345 | ||
344 | if (uc < sizeof(UniLowerTable)) { | 346 | if (uc < sizeof(CifsUniLowerTable)) { |
345 | /* Latin characters */ | 347 | /* Latin characters */ |
346 | return uc + UniLowerTable[uc]; /* Use base tables */ | 348 | return uc + CifsUniLowerTable[uc]; /* Use base tables */ |
347 | } else { | 349 | } else { |
348 | rp = UniLowerRange; /* Use range tables */ | 350 | rp = CifsUniLowerRange; /* Use range tables */ |
349 | while (rp->start) { | 351 | while (rp->start) { |
350 | if (uc < rp->start) /* Before start of range */ | 352 | if (uc < rp->start) /* Before start of range */ |
351 | return uc; /* Uppercase = input */ | 353 | return uc; /* Uppercase = input */ |
@@ -374,3 +376,5 @@ UniStrlwr(register wchar_t *upin) | |||
374 | } | 376 | } |
375 | 377 | ||
376 | #endif | 378 | #endif |
379 | |||
380 | #endif /* _CIFS_UNICODE_H */ | ||