mirror of https://github.com/kiwix/libkiwix.git
Merge branch 'master' of ssh://git.code.sf.net/p/kiwix/kiwix
This commit is contained in:
commit
7d3d54d01e
|
@ -30,7 +30,12 @@ const char *nsStringToCString(const nsAString &str) {
|
|||
#endif
|
||||
|
||||
NS_CStringGetData(tmpStr, &cStr);
|
||||
|
||||
#ifdef _WIN32
|
||||
return _strdup(cStr);
|
||||
#else
|
||||
return strdup(cStr);
|
||||
#endif
|
||||
}
|
||||
|
||||
std::string nsStringToString(const nsEmbedString &str) {
|
||||
|
@ -70,5 +75,10 @@ const char *nsStringToUTF8(const nsAString &str) {
|
|||
nsCString tmpStr;
|
||||
CopyUTF16toUTF8(str, tmpStr);
|
||||
NS_CStringGetData(tmpStr, &cStr);
|
||||
|
||||
#ifdef _WIN32
|
||||
return _strdup(cStr);
|
||||
#else
|
||||
return strdup(cStr);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -20,6 +20,10 @@
|
|||
#ifndef KIWIX_COMPONENTTOOLS_H
|
||||
#define KIWIX_COMPONENTTOOLS_H
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <mozilla/Char16.h>
|
||||
#endif
|
||||
|
||||
#include<string>
|
||||
|
||||
#ifdef __APPLE__
|
||||
|
|
Loading…
Reference in New Issue