[openib-general] [PATCH 2/13] osm: port to WinIB stack : opensm/osm_subnet.c

Eitan Zahavi eitan at mellanox.co.il
Sun Sep 17 08:59:13 PDT 2006


Hi Hal

No need for stdio.h but do need stdlib.h ...
Also map snprintf to _snprintf in windows case

Thanks

Eitan

Signed-off-by:  Eitan Zahavi <eitan at mellanox.co.il>

Index: opensm/osm_subnet.c
===================================================================
--- opensm/osm_subnet.c	(revision 9502)
+++ opensm/osm_subnet.c	(working copy)
@@ -53,6 +53,7 @@
 
 #include <stdlib.h>
 #include <string.h>
+#include <stdio.h>
 #include <complib/cl_debug.h>
 #include <opensm/osm_subnet.h>
 #include <opensm/osm_opensm.h>
@@ -65,7 +66,6 @@
 #include <opensm/osm_node.h>
 #include <opensm/osm_multicast.h>
 #include <opensm/osm_inform.h>
-#include <stdlib.h>
 
 /**********************************************************************
  **********************************************************************/
@@ -659,6 +659,9 @@ __osm_subn_opts_unpack_charp(
   }
 }
 
+#ifdef WIN32
+#define snprintf _snprintf
+#endif
 /**********************************************************************
  **********************************************************************/
 static void





More information about the general mailing list