diff -u -r -N --unidirectional-new-file mldonkey-main/src/config/mingw/os_stubs_c.c mldonkey-work/src/config/mingw/os_stubs_c.c
--- mldonkey-main/src/config/mingw/os_stubs_c.c	2005-09-08 14:44:53.000000000 +0200
+++ mldonkey-work/src/config/mingw/os_stubs_c.c	2005-10-06 19:54:18.660209600 +0200
@@ -11,10 +11,6 @@
 #include <signals.h>
 #endif
 
-#ifndef INVALID_SET_FILE_POINTER
-#define INVALID_SET_FILE_POINTER (-1)
-#endif
-
 #define UNIX_BUFFER_SIZE 16384
 
 extern void enter_blocking_section(); 
@@ -97,6 +93,7 @@
 	win32_maperr(err);
 	uerror("os_getfilesize", Nothing);
     }
+    return 0;
   }
 }
 
@@ -108,7 +105,7 @@
   long err;
 
   ret = SetFilePointer(fd, ofs_low, &ofs_high, cmd);
-  if (ret == INVALID_SET_FILE_POINTER) {
+  if ((unsigned long)ret == INVALID_SET_FILE_POINTER) {
     err = GetLastError();
     if (err != NO_ERROR) {
       win32_maperr(err);
@@ -155,6 +152,7 @@
 {
    OSVERSIONINFOEX osvi;
    BOOL bOsVersionInfoEx;
+   char binull='\0';
 
    // Try calling GetVersionEx using the OSVERSIONINFOEX structure.
    // If that fails, try using the OSVERSIONINFO structure.
@@ -257,13 +255,12 @@
             strcat(buf, "Server \0" );
          if ( lstrcmpi( "SERVERNT", szProductType) == 0 )
             strcat(buf, "Advanced Server \0" );
-         printf( "%d.%d ", osvi.dwMajorVersion, osvi.dwMinorVersion );
+         printf( "%d.%d", (int)osvi.dwMajorVersion, (int)osvi.dwMinorVersion );
       }
 
       // Display service pack (if any) and build number.
 			char tbuf[4096];
-      if( osvi.dwMajorVersion == 4 && 
-          lstrcmpi( osvi.szCSDVersion, "Service Pack 6" ) == 0 )
+      if( osvi.dwMajorVersion == 4 && lstrcmpi( osvi.szCSDVersion, "Service Pack 6" ) == 0 )
       { 
          HKEY hKey;
          LONG lRet;
@@ -274,18 +271,16 @@
             0, KEY_QUERY_VALUE, &hKey );
          if( lRet == ERROR_SUCCESS )
 								 
-            sprintf(tbuf, "Service Pack 6a (Build %d)\0", osvi.dwBuildNumber & 0xFFFF );         
+            sprintf(tbuf, "Service Pack 6a (Build %lu)%c", osvi.dwBuildNumber & 0xFFFF, binull );         
          else // Windows NT 4.0 prior to SP6a
          {
-            sprintf(tbuf, "%s (Build %d)\0",
-               osvi.szCSDVersion,
-               osvi.dwBuildNumber & 0xFFFF);
+            sprintf(tbuf, "%s (Build %lu)%c",osvi.szCSDVersion, osvi.dwBuildNumber & 0xFFFF, binull);
          }
          RegCloseKey( hKey );
       }
       else // not Windows NT 4.0 
       {
-         sprintf(tbuf, "%s (Build %d)\0", osvi.szCSDVersion, osvi.dwBuildNumber & 0xFFFF);
+         sprintf(tbuf, "%s (Build %lu)%c", osvi.szCSDVersion, osvi.dwBuildNumber & 0xFFFF, binull);
       }
 
       strcat(buf, tbuf);
diff -u -r -N --unidirectional-new-file mldonkey-main/src/utils/cdk/gdstubs.c mldonkey-work/src/utils/cdk/gdstubs.c
--- mldonkey-main/src/utils/cdk/gdstubs.c	2005-08-01 22:09:13.000000000 +0200
+++ mldonkey-work/src/utils/cdk/gdstubs.c	2005-10-06 19:22:01.845206400 +0200
@@ -466,13 +466,14 @@
   return Val_unit;
 }
 
+#include <png.h>
+
 int ml_image_pngversion(void)
 {
   CAMLparam0 ();
   CAMLlocal1 (v);
 #ifdef HAVE_PNGVERSION
-  void* w = png_access_version_number();
-  v = copy_int32 ((int32)w);
+  v = copy_int32 ((int32)png_access_version_number());
   CAMLreturn (v);
 #else
   raise_constant(*(value *)caml_named_value("gd type not supported"));
diff -u -r -N --unidirectional-new-file mldonkey-main/src/utils/lib/md4.c mldonkey-work/src/utils/lib/md4.c
--- mldonkey-main/src/utils/lib/md4.c	2003-04-23 00:33:40.000000000 +0200
+++ mldonkey-work/src/utils/lib/md4.c	2005-10-06 19:54:18.670224000 +0200
@@ -17,6 +17,7 @@
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 #include "md4.h"
+#include <memory.h>
 
 /* Constants for MD4Transform routine.
  */
@@ -34,10 +35,8 @@
 #define S34 15
 
 static void MD4Transform PROTO_LIST ((UINT4 [4], unsigned char [64]));
-static void Encode PROTO_LIST
-  ((unsigned char *, UINT4 *, unsigned int));
-static void Decode PROTO_LIST
-  ((UINT4 *, unsigned char *, unsigned int));
+static void Encode PROTO_LIST ((unsigned char *, UINT4 *, unsigned int));
+static void Decode PROTO_LIST ((UINT4 *, unsigned char *, unsigned int));
 
 
 static unsigned char PADDING[64] = {
@@ -91,6 +90,7 @@
      operation, processing another message block, and updating the
      context.
  */
+ 
 void MD4Update (context, input, inputLen)
 MD4_CTX *context;                                        /* context */
 unsigned char *input;                                /* input block */
@@ -111,8 +111,7 @@
   /* Transform as many times as possible.
    */
   if (inputLen >= partLen) {
-    memcpy
-      ((POINTER)&context->buffer[index], (POINTER)input, partLen);
+    memcpy ((POINTER)&context->buffer[index], (POINTER)input, partLen);
     MD4Transform (context->state, context->buffer);
 
     for (i = partLen; i + 63 < inputLen; i += 64)
@@ -124,9 +123,7 @@
     i = 0;
 
   /* Buffer remaining input */
-  memcpy
-    ((POINTER)&context->buffer[index], (POINTER)&input[i],
-     inputLen-i);
+  memcpy ((POINTER)&context->buffer[index], (POINTER)&input[i], inputLen-i);
 }
 
 /* MD4 finalization. Ends an MD4 message-digest operation, writing the
@@ -156,7 +153,6 @@
   /* Zeroize sensitive information.
    */
   memset ((POINTER)context, 0, sizeof (*context));
-
 }
 
 /* MD4 basic transformation. Transforms state based on block.
@@ -253,10 +249,8 @@
 
 /* Decodes input (unsigned char) into output (UINT4). Assumes len is
      a multiple of 4.
-
  */
 static void Decode (output, input, len)
-
 UINT4 *output;
 unsigned char *input;
 unsigned int len;
diff -u -r -N --unidirectional-new-file mldonkey-main/src/utils/lib/os_stubs.h mldonkey-work/src/utils/lib/os_stubs.h
--- mldonkey-main/src/utils/lib/os_stubs.h	2005-09-08 14:44:53.000000000 +0200
+++ mldonkey-work/src/utils/lib/os_stubs.h	2005-10-06 19:54:18.680238400 +0200
@@ -79,9 +79,17 @@
 
 #ifdef HAS_UNISTD
 #include <unistd.h>
-#else
+#endif
+
+#ifndef SEEK_SET
 #define SEEK_SET 0
+#endif
+
+#ifndef SEEK_CUR
 #define SEEK_CUR 1
+#endif
+
+#ifndef SEEK_END
 #define SEEK_END 2
 #endif
 
