POSIX fixes for native and crossplatform utils

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6427 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2014-01-21 14:13:00 +00:00
parent 859b5d3d07
commit 52a8b320ef
16 changed files with 66 additions and 46 deletions

View file

@ -41,7 +41,8 @@ int GetTLBVersion(tstring& filepath, DWORD& high, DWORD & low)
hr = LoadTypeLib(fullpath, &typeLib);
#else
// If built without UNICODE, we still need to convert this string to a Unicode string.
WCHAR *ole_filename = wcsdup_fromTchar(fullpath, CP_ACP);
WCHAR *ole_filename = WinWStrDupFromTChar(fullpath);
if (!ole_filename) return 0;
hr = LoadTypeLib(ole_filename, &typeLib);
free(ole_filename);
#endif

View file

@ -20,5 +20,5 @@ libs = Split("""
Import('BuildUtil')
BuildUtil(target, files, libs, res = res, resources = resources, entry = 'NSISWinMainNOCRT')
BuildUtil(target, files, libs, res = res, resources = resources, entry = 'NSISWinMainNOCRT', nodeflib = True)

View file

@ -27,6 +27,9 @@
#include "resource.h"
#include "toolbar.h"
#ifdef COUNTOF
#undef COUNTOF
#endif
#define COUNTOF(a) (sizeof(a)/sizeof(a[0]))
#define MRU_LIST_SIZE 5

View file

@ -672,7 +672,7 @@ SystemProc *PrepareProc(BOOL NeedForCall)
// Numeric inline
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" // temp3 is set to 0 when we start parsing a new parameter
#pragma GCC diagnostic ignored "-Wuninitialized" // temp3 is set to 0 when we start parsing a new parameter
#endif
if (temp3 == 0)
#ifdef __GNUC__
@ -748,7 +748,7 @@ SystemProc *PrepareProc(BOOL NeedForCall)
// Next parameter is output or something else
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#pragma GCC diagnostic ignored "-Wuninitialized"
#endif
temp3++;
#ifdef __GNUC__

View file

@ -21,7 +21,11 @@
# define terr cerr
# define _T(x) x
# define _tmain main
# ifdef _WIN32
# define _tunlink _unlink
# else
# define _tunlink unlink
# endif
# define FOPEN fopen
typedef std::string tstring;