* block_header::offset is now pointer sized in exehead

* Wininet.h -> wininet.h for POSIX


git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6608 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2015-09-18 15:55:56 +00:00
parent 286edd20c4
commit 940277d9d8
10 changed files with 83 additions and 41 deletions

View file

@ -43,19 +43,20 @@
#define DECLARE_PLATFORMITEMWRITER(x) class x##_writer : public writer \
{ public: \
x##_writer(writer_sink *sink) : writer(sink) {} \
void writeplatformitem(const void *data, bool wide, bool x64); \
static void write_block(IGrowBuf *pGB, writer_sink *pS, bool wide, bool x64) \
void write(const x *data, const writer_target_info&ti); \
static void write_block(IGrowBuf *pGB, writer_sink *pS, const writer_target_info *pTI = 0) \
{ \
x##_writer writer(pS); \
if (!pTI) pTI = &pS->get_target_info(); /* Defaults to TI from sink */ \
for (size_t l = pGB->getlen() / sizeof(x), i = 0; i < l; i++) \
writer.writeplatformitem(&(((x*)pGB->get())[i]), wide, x64); \
writer.write(&(((x*)pGB->get())[i]), *pTI); \
} \
}
DECLARE_WRITER(firstheader);
DECLARE_WRITER(block_header);
DECLARE_WRITER(header);
DECLARE_PLATFORMITEMWRITER(block_header);
DECLARE_PLATFORMITEMWRITER(header); // Platform specific because it writes block_headers
DECLARE_WRITER(section);
DECLARE_WRITER(entry);
DECLARE_WRITER(page);