Source/Platform.h contains definitions that used to be
Instead, they ARE platform dependent. That leads to
For example, DWORD is supposed to be 32bit long (it's
widely used in file headers, where width of a field
MUST BE fixed).
But it is declared as unsigned long, that is 64bit on
x86_64 Linux platform. This leads to file header
corruption when reading.
There is also UINT_PTR (which I suppose, can contain
pointer to void without loss of precision).
It is declared as unsigned int (which is 32bits wide).
But on 64bit systems, pointer is 64bit, and when it is
cast to UINT_PTR, upper 32bits are lost.
I suggest declaring UINT_PTR as unsigned long as
quick-and-dirty hack (until you wish to port NSIS to
Windows x64, where long is still 32bit).
I suggest that DWORD and *LPDWORD types declared in
Source/Platform.h must be UINT32 or unsigned int.
UINT_PTR type must be unsigned long.