Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r53483 - sandbox/task/libs/task/examples
From: oliver.kowalke_at_[hidden]
Date: 2009-05-31 04:07:48


Author: olli
Date: 2009-05-31 04:07:44 EDT (Sun, 31 May 2009)
New Revision: 53483
URL: http://svn.boost.org/trac/boost/changeset/53483

Log:
* example fixed
Text files modified:
   sandbox/task/libs/task/examples/reschedule_until.cpp | 9 +++++++++
   1 files changed, 9 insertions(+), 0 deletions(-)

Modified: sandbox/task/libs/task/examples/reschedule_until.cpp
==============================================================================
--- sandbox/task/libs/task/examples/reschedule_until.cpp (original)
+++ sandbox/task/libs/task/examples/reschedule_until.cpp 2009-05-31 04:07:44 EDT (Sun, 31 May 2009)
@@ -12,12 +12,16 @@
 #include <stdexcept>
 #include <string>
 
+#include "boost/task/detail/config.hpp"
+
+# if defined(BOOST_POSIX_API)
 extern "C"
 {
 #include <sys/socket.h>
 #include <sys/types.h>
 #include <unistd.h>
 }
+# endif
 
 #include <boost/assert.hpp>
 #include <boost/bind.hpp>
@@ -78,6 +82,7 @@
         printf("fibonacci(%d) == %ld\n", n, a.execute( n) );
 }
 
+# if defined(BOOST_POSIX_API)
 bool has_bytes( int fd)
 {
         char buffer[1];
@@ -136,9 +141,11 @@
                 ::exit( 1);
         }
 }
+# endif
 
 int main( int argc, char *argv[])
 {
+# if defined(BOOST_POSIX_API)
         try
         {
                 int fd[2];
@@ -169,5 +176,7 @@
         catch ( ... )
         { std::cerr << "unhandled" << std::endl; }
 
+# endif
+
         return EXIT_FAILURE;
 }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk