Made SOCKET signed for backward compatibility.
Protect definition of assert by ifndef clause.



git-svn-id: svn+ssh://svn.code.sf.net/p/mingw-w64/code/trunk@104 4407c894-4637-0410-b4f5-ada5f102cad1
diff --git a/mingw-w64-headers/include/ChangeLog b/mingw-w64-headers/include/ChangeLog
index f7df03c..31c958e 100755
--- a/mingw-w64-headers/include/ChangeLog
+++ b/mingw-w64-headers/include/ChangeLog
@@ -1,3 +1,8 @@
+2007-10-08  Kai Tietz  <kai.tietz@onevision.com>
+
+	* winsock.h, winsock2.h: Make SOCKET definition signed.
+	* assert.h: Protect define of assert by additional clause.
+
 2007-10-04  Kai Tietz  <kai.tietz@onevision.com>
 
 	* process.h: Make exec(??) and spawn(??) as posix functions
diff --git a/mingw-w64-headers/include/assert.h b/mingw-w64-headers/include/assert.h
index 22dcaf2..e88f4a3 100755
--- a/mingw-w64-headers/include/assert.h
+++ b/mingw-w64-headers/include/assert.h
@@ -11,10 +11,10 @@
 #include <stdlib.h>
 #endif
 
-#undef assert
-
 #ifdef NDEBUG
+#ifndef assert
 #define assert(_Expression) ((void)0)
+#endif
 #else
 
 #ifndef _CRT_TERMINATE_DEFINED
@@ -40,8 +40,9 @@
 }
 #endif
 
+#ifndef assert
 #define assert(_Expression) (void)((!!(_Expression)) || (_wassert(_CRT_WIDE(#_Expression),_CRT_WIDE(__FILE__),__LINE__),0))
-
+#endif
 
 #endif
 
diff --git a/mingw-w64-headers/include/winsock.h b/mingw-w64-headers/include/winsock.h
index 2d10920..3947b0f 100755
--- a/mingw-w64-headers/include/winsock.h
+++ b/mingw-w64-headers/include/winsock.h
@@ -15,7 +15,7 @@
 typedef unsigned int u_int;
 typedef unsigned long u_long;
 
-typedef UINT_PTR SOCKET;
+typedef INT_PTR SOCKET;
 
 #ifndef FD_SETSIZE
 #define FD_SETSIZE 64
diff --git a/mingw-w64-headers/include/winsock2.h b/mingw-w64-headers/include/winsock2.h
index eaeb9f4..0232084 100755
--- a/mingw-w64-headers/include/winsock2.h
+++ b/mingw-w64-headers/include/winsock2.h
@@ -40,7 +40,7 @@
   typedef unsigned int u_int;
   typedef unsigned long u_long;
   typedef unsigned __int64 u_int64;
-  typedef UINT_PTR SOCKET;
+  typedef INT_PTR SOCKET;
 
 #ifndef FD_SETSIZE
 #define FD_SETSIZE 64