From 137ded75167602de99bdab6bc690e1f0020f137d Mon Sep 17 00:00:00 2001 From: "Bruno G. Albuquerque" Date: Wed, 15 Jul 2009 15:39:09 +0000 Subject: [PATCH] - Use ntfschar instead of wchar_t where applicable. libntfs assumed that the size of wchar was 16 bits, which was not true anymore after recent changes. - Considering the changes were inside libntfs, which is 3rd party code, I am not sure this is the correct way to apply this fix (if you have a better idea, let me know. - This fixes bug #4075. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31589 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../kernel/file_systems/ntfs/libntfs/unistr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/add-ons/kernel/file_systems/ntfs/libntfs/unistr.c b/src/add-ons/kernel/file_systems/ntfs/libntfs/unistr.c index c0703197c4..20029aec8e 100644 --- a/src/add-ons/kernel/file_systems/ntfs/libntfs/unistr.c +++ b/src/add-ons/kernel/file_systems/ntfs/libntfs/unistr.c @@ -740,7 +740,7 @@ ntfs_wc_to_utf8(wchar_t c,unsigned char* buf) * Returns the number of bytes consumed, or 0 on error. */ static int -ntfs_wc_from_utf8(const unsigned char* str,wchar_t *c) +ntfs_wc_from_utf8(const unsigned char* str, ntfschar* c) { int l=0,i; @@ -779,7 +779,7 @@ ntfs_wc_from_utf8(const unsigned char* str,wchar_t *c) * The caller has to free the result string. * There is no support for UTF-16, yet */ -static inline int ntfs_dupuni2utf8(wchar_t* in, int in_len,char **out,int *out_len) +static inline int ntfs_dupuni2utf8(const ntfschar* in, int in_len,char **out,int *out_len) { int i,tmp; int len8; @@ -807,13 +807,13 @@ static inline int ntfs_dupuni2utf8(wchar_t* in, int in_len,char **out,int *out_l /* Converts an UTF-8 sequence to a wide string. Same conventions as the * previous function */ -static inline int ntfs_duputf82uni(unsigned char* in, int in_len,wchar_t** out,int *out_len) +static inline int ntfs_duputf82uni(unsigned char* in, int in_len,ntfschar** out,int *out_len) { int i,tmp; int len16; - wchar_t* result; - wchar_t wtmp; + ntfschar* result; + ntfschar wtmp; for(i=len16=0;i