applied patch #2497172 - Fixes for POSIX build on Solaris, plus a regression
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5907 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
5199b3bd65
commit
a8d988b5c0
4 changed files with 9 additions and 6 deletions
|
@ -312,7 +312,7 @@ void MMapFile::release()
|
|||
#ifdef _WIN32
|
||||
UnmapViewOfFile(m_pView);
|
||||
#else
|
||||
munmap(m_pView, m_iMappedSize);
|
||||
munmap((char *)m_pView, m_iMappedSize);
|
||||
#endif
|
||||
m_pView = NULL;
|
||||
}
|
||||
|
@ -328,7 +328,7 @@ void MMapFile::release(void *pView, int size)
|
|||
#ifdef _WIN32
|
||||
UnmapViewOfFile(pView);
|
||||
#else
|
||||
munmap(pView, size);
|
||||
munmap((char *)pView, size);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -338,7 +338,7 @@ void MMapFile::flush(int num)
|
|||
#ifdef _WIN32
|
||||
FlushViewOfFile(m_pView, num);
|
||||
#else
|
||||
msync(m_pView, num, MS_SYNC);
|
||||
msync((char *)m_pView, num, MS_SYNC);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#ifndef _WIN32
|
||||
#include <cstdio> // for FILE*
|
||||
#include <fstream> // (some systems have FILE* in here)
|
||||
#endif
|
||||
|
||||
class IMMap
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#include "Platform.h"
|
||||
#include <cstdio>
|
||||
#include <fstream>
|
||||
#include "growbuf.h"
|
||||
|
||||
class StringList
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
# include <unistd.h> // for close(2)
|
||||
# include <fcntl.h> // for open(2)
|
||||
# include <iconv.h>
|
||||
# include <locale.h>
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
|
@ -179,7 +180,7 @@ int wsprintf(char *s, const char *format, ...) {
|
|||
|
||||
// iconv const inconsistency workaround by Alexandre Oliva
|
||||
template <typename T>
|
||||
inline size_t __iconv_adaptor
|
||||
inline size_t nsis_iconv_adaptor
|
||||
(size_t (*iconv_func)(iconv_t, T, size_t *, char**,size_t*),
|
||||
iconv_t cd, char **inbuf, size_t *inbytesleft,
|
||||
char **outbuf, size_t *outbytesleft)
|
||||
|
@ -221,7 +222,7 @@ int WideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr,
|
|||
size_t inbytes = cchWideChar * sizeof(WCHAR);
|
||||
size_t outbytes = cbMultiByte;
|
||||
|
||||
if (__iconv_adaptor(iconv, cd, &in, &inbytes, &out, &outbytes) == (size_t) -1) {
|
||||
if (nsis_iconv_adaptor(iconv, cd, &in, &inbytes, &out, &outbytes) == (size_t) -1) {
|
||||
iconv_close(cd);
|
||||
return 0;
|
||||
}
|
||||
|
@ -257,7 +258,7 @@ int MultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr,
|
|||
size_t inbytes = cbMultiByte;
|
||||
size_t outbytes = cchWideChar * sizeof(WCHAR);
|
||||
|
||||
if (__iconv_adaptor(iconv, cd, &in, &inbytes, &out, &outbytes) == (size_t) -1) {
|
||||
if (nsis_iconv_adaptor(iconv, cd, &in, &inbytes, &out, &outbytes) == (size_t) -1) {
|
||||
iconv_close(cd);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue