From 91105178932b4a7535855181c0aecd66e20498c2 Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Mon, 19 Jul 2004 16:54:37 +0000 Subject: [PATCH] Check for .NET (win32/net) files. committer: mfx 1090256077 +0000 --- src/p_w32pe.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/p_w32pe.cpp b/src/p_w32pe.cpp index 45269811..d54384ce 100644 --- a/src/p_w32pe.cpp +++ b/src/p_w32pe.cpp @@ -75,6 +75,7 @@ static unsigned my_strlen(const unsigned char *s) { size_t l = strlen((const char*)s); assert((unsigned) l == l); return (unsigned) l; } +#undef strlen #define strlen my_strlen #endif @@ -1624,17 +1625,18 @@ void PackW32Pe::pack(OutputFile *fo) || ih.ddirsentries != 16 || IDSIZE(PEDIR_EXCEPTION) // is this used on i386? // || IDSIZE(PEDIR_COPYRIGHT) - || IDSIZE(PEDIR_COMRT) )) throwCantPack("unexpected value in PE header (try --force)"); + if (IDSIZE(PEDIR_SEC)) + throwCantPack("compressing certificate info is not supported"); + if (IDSIZE(PEDIR_COMRT)) + throwCantPack(".NET files (win32/net) are not yet supported"); + // Structured Exception Handling if (!opt->win32_pe.strip_loadconf && IDSIZE(PEDIR_LOADCONF)) throwCantPack("Structured Exception Handling present (try --strip-loadconf)"); - if (IDSIZE(PEDIR_SEC)) - throwCantPack("compressing certificate info is not supported"); - if (isdll) opt->win32_pe.strip_relocs = false; else if (opt->win32_pe.strip_relocs < 0)