logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

commit: r382 - trunk/daemon: msg#00026

Subject: commit: r382 - trunk/daemon
Author: jonathan
Date: 2006-11-20 16:08:13 -0500 (Mon, 20 Nov 2006)
New Revision: 382

Modified:
   trunk/daemon/Changelog
   trunk/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: trunk/daemon/Changelog
===================================================================
--- trunk/daemon/Changelog      2006-11-20 04:54:43 UTC (rev 381)
+++ trunk/daemon/Changelog      2006-11-20 21:08:13 UTC (rev 382)
@@ -1,3 +1,9 @@
+Mon Nov 20 16:06:45 2006  Jonathan Stanton  <jonathan@xxxxxxxxxxxx>
+
+       * 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.
+
 Sun Nov 19 16:58:13 2006  Jonathan Stanton  <jonathan@xxxxxxxxxxxx>
 
        * sp.c (SP_scat_receive):  Add missing Mutex_unlock() calls

Modified: trunk/daemon/arch.h
===================================================================
--- trunk/daemon/arch.h 2006-11-20 04:54:43 UTC (rev 381)
+++ trunk/daemon/arch.h 2006-11-20 21:08:13 UTC (rev 382)
@@ -162,10 +162,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
 char *soch_strerror(int err);  /* forward declare this func from the arch.c 
file (win32 only) */


<Prev in Thread] Current Thread [Next in Thread>