Author: greg.ercolano
Date: 2011-01-03 18:05:56 -0800 (Mon, 03 Jan 2011)
New Revision: 8177
Log:
Mods to allow building on Windows.


Modified:
   branches/branch-1.3/examples/howto-add_fd-and-popen.cxx

Modified: branches/branch-1.3/examples/howto-add_fd-and-popen.cxx
===================================================================
--- branches/branch-1.3/examples/howto-add_fd-and-popen.cxx     2011-01-04 
00:53:13 UTC (rev 8176)
+++ branches/branch-1.3/examples/howto-add_fd-and-popen.cxx     2011-01-04 
02:05:56 UTC (rev 8177)
@@ -32,12 +32,22 @@
 //     http://www.fltk.org/str.php
 //
 #include <stdio.h>
+#ifdef _WIN32
+#define PING_CMD "ping -n 10 localhost"                // 'slow command' under 
windows
+#ifdef _MSC_VER
+#define popen _popen
+#define pclose _pclose
+#else /*_MSC_VER*/
+#include <unistd.h>                            // non-MS win32 compilers 
(untested)
+#endif /*_MSC_VER*/
+#else
 #include <unistd.h>
+#define PING_CMD "ping -i 2 -c 10 localhost"   // 'slow command' under unix
+#endif
 #include <FL/Fl.H>
 #include <FL/Fl_Window.H>
 #include <FL/Fl_Multi_Browser.H>
 
-#define PING_CMD "ping -i 2 -c 10 localhost"   // 'slow command' under unix
 
 // GLOBALS
 FILE *G_fp = NULL;

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to