forked from mirrors/linphone-iphone
Fix build on bb10 (however iconv is now not used on bb10, so let's hope they are using UTF-8 locales).
This commit is contained in:
parent
29b35b0f92
commit
7cf7f503cf
2 changed files with 8 additions and 6 deletions
|
|
@ -29,10 +29,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
#ifndef _WIN32
|
||||
#if !defined(__QNXNTO__)
|
||||
# include <langinfo.h>
|
||||
# include <locale.h>
|
||||
# include <iconv.h>
|
||||
# include <string.h>
|
||||
#include <langinfo.h>
|
||||
#include <locale.h>
|
||||
#include <iconv.h>
|
||||
#include <string.h>
|
||||
#endif
|
||||
#else
|
||||
#include <Windows.h>
|
||||
|
|
@ -50,6 +50,8 @@ static char *utf8_convert(const char *filename){
|
|||
wchar_t db_file_utf16[MAX_PATH_SIZE]={0};
|
||||
MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, filename, -1, db_file_utf16, MAX_PATH_SIZE);
|
||||
WideCharToMultiByte(CP_UTF8, 0, db_file_utf16, -1, db_file_utf8, sizeof(db_file_utf8), NULL, NULL);
|
||||
#elif defined(__QNXNTO__)
|
||||
strncpy(db_file_utf8, filename, MAX_PATH_SIZE - 1);
|
||||
#else
|
||||
char db_file_locale[MAX_PATH_SIZE] = {'\0'};
|
||||
char *inbuf=db_file_locale, *outbuf=db_file_utf8;
|
||||
|
|
|
|||
|
|
@ -259,6 +259,8 @@ static char* ConvertFromUtf8Filename(const char* fName){
|
|||
}
|
||||
bctbx_free(wideFilename);
|
||||
return convertedFilename;
|
||||
#elif defined(__QNXNTO__)
|
||||
return bctbx_strdup(fName);
|
||||
#else
|
||||
#define MAX_PATH_SIZE 1024
|
||||
char db_file_utf8[MAX_PATH_SIZE] = {'\0'};
|
||||
|
|
@ -277,8 +279,6 @@ static char* ConvertFromUtf8Filename(const char* fName){
|
|||
}
|
||||
return bctbx_strdup(db_file_locale);
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
#endif
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue