diff --git a/a/apps/apps.c b/b/apps/apps.c
index 3e18289..c523a10 100644
--- a/a/apps/apps.c
+++ b/b/apps/apps.c
@@ -125,6 +125,11 @@
 #include <ctype.h>
 #include <errno.h>
 #include <assert.h>
+
+#define NON_MAIN
+#include "apps.h"
+#undef NON_MAIN
+
 #include <openssl/err.h>
 #include <openssl/x509.h>
 #include <openssl/x509v3.h>
@@ -143,10 +148,6 @@
 #include <openssl/jpake.h>
 #endif
 
-#define NON_MAIN
-#include "apps.h"
-#undef NON_MAIN
-
 #ifdef _WIN32
 static int WIN32_rename(const char *from, const char *to);
 #define rename(from,to) WIN32_rename((from),(to))
diff --git a/a/crypto/rand/randtest.c b/b/crypto/rand/randtest.c
index 9e92a70..1c8eda8 100644
--- a/a/crypto/rand/randtest.c
+++ b/b/crypto/rand/randtest.c
@@ -58,9 +58,9 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <openssl/rand.h>
 
 #include "../e_os.h"
+#include <openssl/rand.h>
 
 /* some FIPS 140-1 random number test */
 /* some simple tests */
diff --git a/a/ssl/ssl_ciph.c b/b/ssl/ssl_ciph.c
index 8188ff5..d19d437 100644
--- a/a/ssl/ssl_ciph.c
+++ b/b/ssl/ssl_ciph.c
@@ -140,6 +140,7 @@
  * OTHERWISE.
  */
 
+#include "ssl_locl.h"
 #include <stdio.h>
 #include <openssl/objects.h>
 #ifndef OPENSSL_NO_COMP
@@ -148,7 +149,6 @@
 #ifndef OPENSSL_NO_ENGINE
 #include <openssl/engine.h>
 #endif
-#include "ssl_locl.h"
 
 #define SSL_ENC_DES_IDX		0
 #define SSL_ENC_3DES_IDX	1
diff --git a/a/ssl/ssl_sess.c b/b/ssl/ssl_sess.c
index ad40fad..fac0fee 100644
--- a/a/ssl/ssl_sess.c
+++ b/b/ssl/ssl_sess.c
@@ -135,13 +135,13 @@
  * OTHERWISE.
  */
 
+#include "ssl_locl.h"
 #include <stdio.h>
 #include <openssl/lhash.h>
 #include <openssl/rand.h>
 #ifndef OPENSSL_NO_ENGINE
 #include <openssl/engine.h>
 #endif
-#include "ssl_locl.h"
 
 static void SSL_SESSION_list_remove(SSL_CTX *ctx, SSL_SESSION *s);
 static void SSL_SESSION_list_add(SSL_CTX *ctx,SSL_SESSION *s);
diff --git a/a/ssl/t1_lib.c b/b/ssl/t1_lib.c
index 022a4fb..44303ef 100644
--- a/a/ssl/t1_lib.c
+++ b/b/ssl/t1_lib.c
@@ -109,13 +109,13 @@
  *
  */
 
+#include "ssl_locl.h"
 #include <stdio.h>
 #include <openssl/objects.h>
 #include <openssl/evp.h>
 #include <openssl/hmac.h>
 #include <openssl/ocsp.h>
 #include <openssl/rand.h>
-#include "ssl_locl.h"
 
 const char tls1_version_str[]="TLSv1" OPENSSL_VERSION_PTEXT;
diff --git a/a/util/pl/Mingw32.pl b/b/util/pl/Mingw32.pl
index fe3fb27..3bc5e71 100644
--- a/a/util/pl/Mingw32.pl
+++ b/b/util/pl/Mingw32.pl
@@ -19,7 +19,7 @@ $cc='gcc';
 if ($debug)
 	{ $cflags="-DL_ENDIAN -DDSO_WIN32 -g2 -ggdb"; }
 else
-	{ $cflags="-DL_ENDIAN -DDSO_WIN32 -fomit-frame-pointer -O3 -mcpu=i486 -Wall"; }
+	{ $cflags="-DL_ENDIAN -DDSO_WIN32 -fomit-frame-pointer -O3 -march=i486 -Wall"; }
 
 if ($gaswin and !$no_asm)
 	{
@@ -66,6 +66,7 @@ $libp=".a";
 $shlibp=".a";
 $lfile='';
 
+$asmtype='coff';
 $asm='as';
 $afile='-o ';
 #$bn_asm_obj="";
 
