Hi Hal

1. function mappings for stat, fstat and fileno
2. Currently no imp for log file truncation 

Thanks

Eitan

Signed-off-by:  Eitan Zahavi <[EMAIL PROTECTED]>

Index: opensm/osm_log.c
===================================================================
--- opensm/osm_log.c    (revision 9502)
+++ opensm/osm_log.c    (working copy)
@@ -60,6 +60,8 @@
 #include <sys/stat.h>
 #include <errno.h>
 
+static int log_exit_count = 0;
+
 #ifndef WIN32
 #include <sys/time.h>
 #include <unistd.h>
@@ -79,9 +81,6 @@ static char *month_str[] = {
   "Nov",
   "Dec"
 };
-#endif /* ndef WIN32 */
-
-static int log_exit_count = 0;
 
 static void truncate_log_file(osm_log_t* const p_log)
 {
@@ -95,6 +94,19 @@ static void truncate_log_file(osm_log_t*
        p_log->count = 0;
 }
 
+#else /* Windows */
+
+#define fstat _fstat
+#define stat _stat
+#define fileno _fileno
+static void truncate_log_file(osm_log_t* const p_log)
+{
+       fprintf(stderr, "truncate_log_file: cannot truncate on windows system 
(yet)\n");
+}
+
+#endif /* ndef WIN32 */
+
+
 void
 osm_log(
   IN osm_log_t* const p_log,


_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to