[Gc] Minor fix for Cygwin enabling GC_LOG_FILE env var

Ivan Maidanski ivmai at mail.ru
Sun Oct 19 15:17:04 PDT 2008


Hi!

With this patch, "GC_LOG_FILE" environment variable is recognized on Cygwin targets.

Bye.

-------------- next part --------------
diff -ru bdwgc/misc.c updated/bdwgc/misc.c
--- bdwgc/misc.c	2008-10-16 18:58:00.000000000 +0400
+++ updated/bdwgc/misc.c	2008-10-20 00:59:26.000000000 +0400
@@ -35,7 +35,7 @@
 # include <tchar.h>
 #endif
 
-#ifdef UNIX_LIKE
+#if defined(UNIX_LIKE) || defined(CYGWIN32)
 # include <fcntl.h>
 # include <sys/types.h>
 # include <sys/stat.h>
@@ -501,7 +501,7 @@
       if (0 != GETENV("GC_PRINT_VERBOSE_STATS")) {
         GC_print_stats = VERBOSE;
       } 
-#     if defined(UNIX_LIKE)
+#     if defined(UNIX_LIKE) || defined(CYGWIN32)
         {
 	  char * file_name = GETENV("GC_LOG_FILE");
           if (0 != file_name) {


More information about the Gc mailing list