- Lots of minimal changes to better support WINCE as a build target

diff --git a/programs/aes/crypt_and_hash.c b/programs/aes/crypt_and_hash.c
index 7a0e454..9fa0fb1 100644
--- a/programs/aes/crypt_and_hash.c
+++ b/programs/aes/crypt_and_hash.c
@@ -2,7 +2,7 @@
  *  \brief  Generic file encryption program using generic wrappers for configured
  *          security.
  *
- *  Copyright (C) 2006-2010, Brainspark B.V.
+ *  Copyright (C) 2006-2011, Brainspark B.V.
  *
  *  This file is part of PolarSSL (http://www.polarssl.org)
  *  Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
@@ -30,7 +30,9 @@
 
 #if defined(_WIN32)
 #include <windows.h>
+#if !defined(_WIN32_WCE)
 #include <io.h>
+#endif
 #else
 #include <sys/types.h>
 #include <unistd.h>
@@ -56,8 +58,11 @@
     "\n"
 
 #if !defined(POLARSSL_CIPHER_C) || !defined(POLARSSL_MD_C)
-int main( void )
+int main( int argc, char *argv[] )
 {
+    ((void) argc);
+    ((void) argv);
+
     printf("POLARSSL_CIPHER_C and/or POLARSSL_MD_C not defined.\n");
     return( 0 );
 }
@@ -80,7 +85,9 @@
     const md_info_t *md_info;
     cipher_context_t cipher_ctx;
     md_context_t md_ctx;
-#if defined(WIN32)
+#if defined(_WIN32_WCE)
+    long filesize, offset;
+#elif defined(_WIN32)
        LARGE_INTEGER li_size;
     __int64 filesize, offset;
 #else
@@ -117,7 +124,7 @@
             list++;
         }
 
-#if defined(WIN32)
+#if defined(_WIN32)
         printf( "\n  Press Enter to exit this program.\n" );
         fflush( stdout ); getchar();
 #endif
@@ -205,7 +212,10 @@
 
     memset( argv[6], 0, strlen( argv[6] ) );
 
-#if defined(WIN32)
+#if defined(_WIN32_WCE)
+    filesize = fseek( fin, 0L, SEEK_END );
+#else
+#if defined(_WIN32)
     /*
      * Support large files (> 2Gb) on Win32
      */
@@ -228,6 +238,7 @@
         goto exit;
     }
 #endif
+#endif
 
     if( fseek( fin, 0, SEEK_SET ) < 0 )
     {