[Spread-cvs] commit: r384 - branches/branch_3_17/daemon

jonathan at spread.org jonathan at spread.org
Tue Nov 21 16:28:11 EST 2006


Author: jonathan
Date: 2006-11-21 16:28:11 -0500 (Tue, 21 Nov 2006)
New Revision: 384

Modified:
   branches/branch_3_17/daemon/Changelog
   branches/branch_3_17/daemon/arch.h
Log:
Windows portability. Do not define byte, as it
already exists as typedef. Do define MAXHOSTNAMELEN as 
windows does not include it. Report and fix by Jacob Green.



Modified: branches/branch_3_17/daemon/Changelog
===================================================================
--- branches/branch_3_17/daemon/Changelog	2006-11-20 21:17:29 UTC (rev 383)
+++ branches/branch_3_17/daemon/Changelog	2006-11-21 21:28:11 UTC (rev 384)
@@ -1,3 +1,9 @@
+Tue Nov 21 16:27:18 2006  Jonathan Stanton  <jonathan at cnds.jhu.edu>
+
+        * arch.h: Windows portability. Do not define byte, as it
+        already exists as typedef. Do define MAXHOSTNAMELEN as 
+        windows does not include it. Report and fix by Jacob Green.
+
 Mon Nov 20 16:16:45 2006  Jonathan Stanton  <jonathan at cnds.jhu.edu>
 
 	* protocol.c, membership.c, prot_body.h, spread_params.h 

Modified: branches/branch_3_17/daemon/arch.h
===================================================================
--- branches/branch_3_17/daemon/arch.h	2006-11-20 21:17:29 UTC (rev 383)
+++ branches/branch_3_17/daemon/arch.h	2006-11-21 21:28:11 UTC (rev 384)
@@ -155,10 +155,15 @@
 #define EAGAIN      WSAEWOULDBLOCK
 #define EINPROGRESS WSAEINPROGRESS
 
-#ifndef byte
-#define byte unsigned char
-#endif
+/* Windows does not define MAXHOSTNAMELEN, so we define it here to a reasonable host name limit */
+#define MAXHOSTNAMELEN 128
 
+/* byte is already defined as a typedef to unsigned char on Windows XP (and probably earlier) so do not define 
+ * #ifndef byte
+ * #define byte unsigned char
+ * #endif
+ */
+
 #ifndef int16
 #define int16 short
 #endif




More information about the Spread-cvs mailing list