#1753070: Enable that makensis and its related utilities can be built natively for 64-bit systems
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6040 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
b402798885
commit
8ab72b9ece
20 changed files with 133 additions and 73 deletions
|
@ -18,6 +18,17 @@
|
|||
|
||||
#include <nsis/pluginapi.h> // nsis plugin
|
||||
|
||||
#ifndef _countof
|
||||
#ifndef __cplusplus
|
||||
#define _countof(_Array) (sizeof(_Array) / sizeof(_Array[0]))
|
||||
#else
|
||||
extern "C++" {
|
||||
template <typename _CountofType,size_t _SizeOfArray> char (*__countof_helper(UNALIGNED _CountofType (&_Array)[_SizeOfArray]))[_SizeOfArray];
|
||||
#define _countof(_Array) sizeof(*__countof_helper(_Array))
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Use for functions only called from one place to possibly reduce some code
|
||||
// size. Allows the source code to remain readable by leaving the function
|
||||
// intact.
|
||||
|
|
|
@ -27,6 +27,17 @@ int GetTLBVersion(tstring& filepath, DWORD& high, DWORD & low)
|
|||
{
|
||||
#ifdef _WIN32
|
||||
|
||||
#ifndef _countof
|
||||
#ifndef __cplusplus
|
||||
#define _countof(_Array) (sizeof(_Array) / sizeof(_Array[0]))
|
||||
#else
|
||||
extern "C++" {
|
||||
template <typename _CountofType,size_t _SizeOfArray> char (*__countof_helper(UNALIGNED _CountofType (&_Array)[_SizeOfArray]))[_SizeOfArray];
|
||||
#define _countof(_Array) sizeof(*__countof_helper(_Array))
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
int found = 0;
|
||||
|
||||
TCHAR fullpath[1024];
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
#include <windows.h>
|
||||
#include "../../ExDll/nsis_tchar.h"
|
||||
#include <tchar.h>
|
||||
|
||||
#ifndef _CRT_STRINGIZE
|
||||
#define __CRT_STRINGIZE(_Value) #_Value
|
||||
#define _CRT_STRINGIZE(_Value) __CRT_STRINGIZE(_Value)
|
||||
#endif /* _CRT_STRINGIZE */
|
||||
|
||||
#define STR_SIZE 1024
|
||||
|
||||
|
|
|
@ -27,6 +27,17 @@
|
|||
#include "toolbar.h"
|
||||
#include "noclib.h"
|
||||
|
||||
#ifndef _countof
|
||||
#ifndef __cplusplus
|
||||
#define _countof(_Array) (sizeof(_Array) / sizeof(_Array[0]))
|
||||
#else
|
||||
extern "C++" {
|
||||
template <typename _CountofType,size_t _SizeOfArray> char (*__countof_helper(UNALIGNED _CountofType (&_Array)[_SizeOfArray]))[_SizeOfArray];
|
||||
#define _countof(_Array) sizeof(*__countof_helper(_Array))
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
NTOOLTIP g_tip;
|
||||
LRESULT CALLBACK TipHookProc(int nCode, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
|
|
|
@ -8,6 +8,17 @@
|
|||
|
||||
#include "defs.h"
|
||||
|
||||
#ifndef _countof
|
||||
#ifndef __cplusplus
|
||||
#define _countof(_Array) (sizeof(_Array) / sizeof(_Array[0]))
|
||||
#else
|
||||
extern "C++" {
|
||||
template <typename _CountofType,size_t _SizeOfArray> char (*__countof_helper(UNALIGNED _CountofType (&_Array)[_SizeOfArray]))[_SizeOfArray];
|
||||
#define _countof(_Array) sizeof(*__countof_helper(_Array))
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
int CALLBACK BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lp, LPARAM pData) {
|
||||
if (uMsg == BFFM_INITIALIZED)
|
||||
SendMessage(hwnd, BFFM_SETSELECTION, TRUE, pData);
|
||||
|
|
|
@ -1,8 +1,19 @@
|
|||
#include <windows.h>
|
||||
#include <tchar.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <commctrl.h>
|
||||
#include "..\ExDLL\nsis_tchar.h"
|
||||
|
||||
#ifndef _countof
|
||||
#ifndef __cplusplus
|
||||
#define _countof(_Array) (sizeof(_Array) / sizeof(_Array[0]))
|
||||
#else
|
||||
extern "C++" {
|
||||
template <typename _CountofType,size_t _SizeOfArray> char (*__countof_helper(UNALIGNED _CountofType (&_Array)[_SizeOfArray]))[_SizeOfArray];
|
||||
#define _countof(_Array) sizeof(*__countof_helper(_Array))
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
version 0.36
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue