Only in boost_1_57_0: b2.exe
Only in boost_1_57_0: bin.v2
diff -ur boost_1_57_0-o/boost/asio/detail/config.hpp boost_1_57_0/boost/asio/detail/config.hpp
--- boost_1_57_0-o/boost/asio/detail/config.hpp	2014-10-18 09:19:08.000000000 +1030
+++ boost_1_57_0/boost/asio/detail/config.hpp	2015-03-22 15:36:20.000000000 +1030
@@ -706,7 +706,7 @@
 #  elif defined(UNDER_CE)
 #   define BOOST_ASIO_HAS_GETADDRINFO 1
 #  endif // defined(UNDER_CE)
-# elif !(defined(__MACH__) && defined(__APPLE__))
+# elif !(defined(__MACH__) && defined(__APPLE__)) && !defined(__OS2__)
 #  define BOOST_ASIO_HAS_GETADDRINFO 1
 # endif // !(defined(__MACH__) && defined(__APPLE__))
 #endif // !defined(BOOST_ASIO_HAS_GETADDRINFO)
Only in boost_1_57_0/boost/asio/detail: descriptor_ops.hpp.orig
Only in boost_1_57_0/boost/asio/detail: descriptor_ops.hpp.rej
diff -ur boost_1_57_0-o/boost/asio/detail/impl/descriptor_ops.ipp boost_1_57_0/boost/asio/detail/impl/descriptor_ops.ipp
--- boost_1_57_0-o/boost/asio/detail/impl/descriptor_ops.ipp	2014-10-18 09:19:08.000000000 +1030
+++ boost_1_57_0/boost/asio/detail/impl/descriptor_ops.ipp	2015-03-22 15:21:34.000000000 +1030
@@ -401,6 +401,12 @@
     return -1;
   }
 
+#if defined(__OS2__)
+  fd_set fds;
+  FD_ZERO(&fds);
+  FD_SET(d, &fds);
+  int result = error_wrapper(::select(d, &fds, 0, 0, 0), ec);
+#else
   pollfd fds;
   fds.fd = d;
   fds.events = POLLIN;
@@ -408,6 +414,7 @@
   int timeout = (state & user_set_non_blocking) ? 0 : -1;
   errno = 0;
   int result = error_wrapper(::poll(&fds, 1, timeout), ec);
+#endif
   if (result == 0)
     ec = (state & user_set_non_blocking)
       ? boost::asio::error::would_block : boost::system::error_code();
@@ -424,6 +431,12 @@
     return -1;
   }
 
+#if defined(__OS2__)
+  fd_set fds;
+  FD_ZERO(&fds);
+  FD_SET(d, &fds);
+  int result = error_wrapper(::select(d, 0, &fds, 0, 0), ec);
+#else
   pollfd fds;
   fds.fd = d;
   fds.events = POLLOUT;
@@ -431,6 +444,7 @@
   int timeout = (state & user_set_non_blocking) ? 0 : -1;
   errno = 0;
   int result = error_wrapper(::poll(&fds, 1, timeout), ec);
+#endif
   if (result == 0)
     ec = (state & user_set_non_blocking)
       ? boost::asio::error::would_block : boost::system::error_code();
diff -ur boost_1_57_0-o/boost/asio/detail/impl/reactive_serial_port_service.ipp boost_1_57_0/boost/asio/detail/impl/reactive_serial_port_service.ipp
--- boost_1_57_0-o/boost/asio/detail/impl/reactive_serial_port_service.ipp	2014-10-18 09:19:08.000000000 +1030
+++ boost_1_57_0/boost/asio/detail/impl/reactive_serial_port_service.ipp	2015-03-21 16:09:16.000000000 +1030
@@ -73,7 +73,7 @@
   s = descriptor_ops::error_wrapper(::tcgetattr(fd, &ios), ec);
   if (s >= 0)
   {
-#if defined(_BSD_SOURCE)
+#if defined(_BSD_SOURCE) && !defined(__OS2__)
     ::cfmakeraw(&ios);
 #else
     ios.c_iflag &= ~(IGNBRK | BRKINT | PARMRK
diff -ur boost_1_57_0-o/boost/asio/detail/impl/socket_ops.ipp boost_1_57_0/boost/asio/detail/impl/socket_ops.ipp
--- boost_1_57_0-o/boost/asio/detail/impl/socket_ops.ipp	2014-10-18 09:19:08.000000000 +1030
+++ boost_1_57_0/boost/asio/detail/impl/socket_ops.ipp	2015-03-22 15:37:42.000000000 +1030
@@ -92,7 +92,11 @@
 inline socket_type call_accept(SockLenType msghdr::*,
     socket_type s, socket_addr_type* addr, std::size_t* addrlen)
 {
+#if defined(__OS2__)
+  int tmp_addrlen = addrlen ? (int)*addrlen : 0;
+#else
   SockLenType tmp_addrlen = addrlen ? (SockLenType)*addrlen : 0;
+#endif
   socket_type result = ::accept(s, addr, addrlen ? &tmp_addrlen : 0);
   if (addrlen)
     *addrlen = (std::size_t)tmp_addrlen;
@@ -1491,7 +1495,11 @@
     socket_type s, int level, int optname,
     void* optval, std::size_t* optlen)
 {
+#if defined(__OS2__)
+  int tmp_optlen = (int)*optlen;
+#else
   SockLenType tmp_optlen = (SockLenType)*optlen;
+#endif
   int result = ::getsockopt(s, level, optname, (char*)optval, &tmp_optlen);
   *optlen = (std::size_t)tmp_optlen;
   return result;
@@ -1600,7 +1608,11 @@
 inline int call_getpeername(SockLenType msghdr::*,
     socket_type s, socket_addr_type* addr, std::size_t* addrlen)
 {
+#if defined(__OS2__)
+  int tmp_addrlen = (int)*addrlen;
+#else
   SockLenType tmp_addrlen = (SockLenType)*addrlen;
+#endif
   int result = ::getpeername(s, addr, &tmp_addrlen);
   *addrlen = (std::size_t)tmp_addrlen;
   return result;
@@ -1652,7 +1664,11 @@
 inline int call_getsockname(SockLenType msghdr::*,
     socket_type s, socket_addr_type* addr, std::size_t* addrlen)
 {
+#if defined(__OS2__)
+  int tmp_addrlen = (int)*addrlen;
+#else
   SockLenType tmp_addrlen = (SockLenType)*addrlen;
+#endif
   int result = ::getsockname(s, addr, &tmp_addrlen);
   *addrlen = (std::size_t)tmp_addrlen;
   return result;
@@ -1748,6 +1764,18 @@
     timeout->tv_usec = 1000;
 #endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
 
+#if defined(__OS2__)
+  // The select() call allows timeout values measured in microseconds, but the
+  // system clock (as wrapped by boost::posix_time::microsec_clock) typically
+  // has a resolution of 10 milliseconds. This can lead to a spinning select
+  // reactor, meaning increased CPU usage, when waiting for the earliest
+  // scheduled timeout if it's less than 10 milliseconds away. To avoid a tight
+  // spin we'll use a minimum timeout of 1 millisecond.
+  if (timeout && timeout->tv_sec == 0
+      && timeout->tv_usec > 0 && timeout->tv_usec < 1000)
+    timeout->tv_usec = 1000;
+#endif
+
 #if defined(__hpux) && defined(__SELECT)
   timespec ts;
   ts.tv_sec = timeout ? timeout->tv_sec : 0;
@@ -1773,8 +1801,13 @@
 
 #if defined(BOOST_ASIO_WINDOWS) \
   || defined(__CYGWIN__) \
+  || defined(__OS2__) \
   || defined(__SYMBIAN32__)
+#if defined(__OS2__)
+  fd_set fds;
+#else
   fd_set fds;
+#endif
   FD_ZERO(&fds);
   FD_SET(s, &fds);
   timeval zero_timeout;
@@ -1814,6 +1847,7 @@
 
 #if defined(BOOST_ASIO_WINDOWS) \
   || defined(__CYGWIN__) \
+  || defined(__OS2__) \
   || defined(__SYMBIAN32__)
   fd_set fds;
   FD_ZERO(&fds);
@@ -1855,6 +1889,7 @@
 
 #if defined(BOOST_ASIO_WINDOWS) \
   || defined(__CYGWIN__) \
+  || defined(__OS2__) \
   || defined(__SYMBIAN32__)
   fd_set write_fds;
   FD_ZERO(&write_fds);
@@ -1986,6 +2021,7 @@
         af, src, dest, static_cast<int>(length)), ec);
   if (result == 0 && !ec)
     ec = boost::asio::error::invalid_argument;
+#ifndef __OS2__
   if (result != 0 && af == BOOST_ASIO_OS_DEF(AF_INET6) && scope_id != 0)
   {
     using namespace std; // For strcat and sprintf.
@@ -2000,6 +2036,7 @@
       sprintf(if_name + 1, "%lu", scope_id);
     strcat(dest, if_name);
   }
+#endif
   return result;
 #endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
 }
@@ -2216,6 +2253,7 @@
   int result = error_wrapper(::inet_pton(af, src, dest), ec);
   if (result <= 0 && !ec)
     ec = boost::asio::error::invalid_argument;
+#ifndef __OS2__
   if (result > 0 && af == BOOST_ASIO_OS_DEF(AF_INET6) && scope_id)
   {
     using namespace std; // For strchr and atoi.
@@ -2233,6 +2271,7 @@
         *scope_id = atoi(if_name + 1);
     }
   }
+#endif
   return result;
 #endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
 }
@@ -2282,7 +2321,6 @@
 #if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
 
 #if !defined(BOOST_ASIO_HAS_GETADDRINFO)
-
 // The following functions are only needed for emulation of getaddrinfo and
 // getnameinfo.
 
@@ -2310,7 +2348,7 @@
     hostent* result, char* buffer, int buflength, boost::system::error_code& ec)
 {
   clear_last_error();
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) || defined(__OS2__)
   (void)(buffer);
   (void)(buflength);
   hostent* retval = error_wrapper(::gethostbyaddr(addr, length, af), ec);
@@ -2353,7 +2391,7 @@
     char* buffer, int buflength, int ai_flags, boost::system::error_code& ec)
 {
   clear_last_error();
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) || defined(__OS2__)
   (void)(buffer);
   (void)(buflength);
   (void)(ai_flags);
diff -ur boost_1_57_0-o/boost/asio/detail/impl/socket_select_interrupter.ipp boost_1_57_0/boost/asio/detail/impl/socket_select_interrupter.ipp
--- boost_1_57_0-o/boost/asio/detail/impl/socket_select_interrupter.ipp	2014-10-18 09:19:08.000000000 +1030
+++ boost_1_57_0/boost/asio/detail/impl/socket_select_interrupter.ipp	2015-03-22 18:42:06.000000000 +1030
@@ -21,6 +21,7 @@
 
 #if defined(BOOST_ASIO_WINDOWS) \
   || defined(__CYGWIN__) \
+  || defined(__OS2__) \
   || defined(__SYMBIAN32__)
 
 #include <cstdlib>
diff -ur boost_1_57_0-o/boost/asio/detail/old_win_sdk_compat.hpp boost_1_57_0/boost/asio/detail/old_win_sdk_compat.hpp
--- boost_1_57_0-o/boost/asio/detail/old_win_sdk_compat.hpp	2014-10-18 09:19:08.000000000 +1030
+++ boost_1_57_0/boost/asio/detail/old_win_sdk_compat.hpp	2015-03-20 19:27:34.000000000 +1030
@@ -17,7 +17,7 @@
 
 #include <boost/asio/detail/config.hpp>
 
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) || defined(__OS2__)
 
 // Guess whether we are building against on old Platform SDK.
 #if !defined(IN6ADDR_ANY_INIT)
@@ -25,7 +25,9 @@
 #endif // !defined(IN6ADDR_ANY_INIT)
 
 #if defined(BOOST_ASIO_HAS_OLD_WIN_SDK)
-
+#if defined(__OS2__)
+#define __int64 __int64_t
+#endif
 // Emulation of types that are missing from old Platform SDKs.
 //
 // N.B. this emulation is also used if building for a Windows 2000 target with
Only in boost_1_57_0/boost/asio/detail: old_win_sdk_compat.hpp.orig
Only in boost_1_57_0/boost/asio/detail: old_win_sdk_compat.hpp.rej
Only in boost_1_57_0/boost/asio/detail: reactive_serial_port_service.hpp.orig
Only in boost_1_57_0/boost/asio/detail: reactive_serial_port_service.hpp.rej
diff -ur boost_1_57_0-o/boost/asio/detail/select_interrupter.hpp boost_1_57_0/boost/asio/detail/select_interrupter.hpp
--- boost_1_57_0-o/boost/asio/detail/select_interrupter.hpp	2014-10-18 09:19:08.000000000 +1030
+++ boost_1_57_0/boost/asio/detail/select_interrupter.hpp	2015-03-22 15:09:06.000000000 +1030
@@ -19,7 +19,7 @@
 
 #if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
 
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) || defined(__SYMBIAN32__)
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) || defined(__SYMBIAN32__) || defined(__OS2__)
 # include <boost/asio/detail/socket_select_interrupter.hpp>
 #elif defined(BOOST_ASIO_HAS_EVENTFD)
 # include <boost/asio/detail/eventfd_select_interrupter.hpp>
@@ -31,7 +31,7 @@
 namespace asio {
 namespace detail {
 
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) || defined(__SYMBIAN32__)
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) || defined(__SYMBIAN32__) || defined(__OS2__)
 typedef socket_select_interrupter select_interrupter;
 #elif defined(BOOST_ASIO_HAS_EVENTFD)
 typedef eventfd_select_interrupter select_interrupter;
Only in boost_1_57_0/boost/asio/detail: select_interrupter.hpp.orig
Only in boost_1_57_0/boost/asio/detail: select_interrupter.hpp.rej
diff -ur boost_1_57_0-o/boost/asio/detail/socket_ops.hpp boost_1_57_0/boost/asio/detail/socket_ops.hpp
--- boost_1_57_0-o/boost/asio/detail/socket_ops.hpp	2014-10-18 09:19:08.000000000 +1030
+++ boost_1_57_0/boost/asio/detail/socket_ops.hpp	2015-03-20 19:20:14.000000000 +1030
@@ -24,6 +24,10 @@
 
 #include <boost/asio/detail/push_options.hpp>
 
+#if defined(BOOST_HAS_THREADS) && defined(BOOST_HAS_PTHREADS)
+#include <pthread.h>
+#endif
+
 namespace boost {
 namespace asio {
 namespace detail {
Only in boost_1_57_0/boost/asio/detail: socket_ops.hpp.orig
Only in boost_1_57_0/boost/asio/detail: socket_ops.hpp.rej
diff -ur boost_1_57_0-o/boost/asio/detail/socket_select_interrupter.hpp boost_1_57_0/boost/asio/detail/socket_select_interrupter.hpp
--- boost_1_57_0-o/boost/asio/detail/socket_select_interrupter.hpp	2014-10-18 09:19:08.000000000 +1030
+++ boost_1_57_0/boost/asio/detail/socket_select_interrupter.hpp	2015-03-22 15:11:20.000000000 +1030
@@ -21,7 +21,8 @@
 
 #if defined(BOOST_ASIO_WINDOWS) \
   || defined(__CYGWIN__) \
-  || defined(__SYMBIAN32__)
+  || defined(__SYMBIAN32__) \
+  || defined(__OS2__)
 
 #include <boost/asio/detail/socket_types.hpp>
 
diff -ur boost_1_57_0-o/boost/asio/detail/socket_types.hpp boost_1_57_0/boost/asio/detail/socket_types.hpp
--- boost_1_57_0-o/boost/asio/detail/socket_types.hpp	2014-10-18 09:19:08.000000000 +1030
+++ boost_1_57_0/boost/asio/detail/socket_types.hpp	2015-03-22 18:26:40.000000000 +1030
@@ -82,6 +82,9 @@
 # endif
 #endif
 
+#if defined(__OS2__)
+#include <boost/asio/detail/old_win_sdk_compat.hpp>
+#endif
 #include <boost/asio/detail/push_options.hpp>
 
 namespace boost {
@@ -279,6 +282,18 @@
 const int invalid_socket = -1;
 const int socket_error_retval = -1;
 const int max_addr_v4_str_len = INET_ADDRSTRLEN;
+#if defined(__OS2__)
+#define SHUT_RD 0
+#define SHUT_WR 1
+#define SHUT_RDWR 2
+# if defined(BOOST_ASIO_HAS_OLD_WIN_SDK)
+typedef in6_addr_emulation in6_addr_type;
+typedef ipv6_mreq_emulation in6_mreq_type;
+typedef sockaddr_in6_emulation sockaddr_in6_type;
+typedef sockaddr_storage_emulation sockaddr_storage_type;
+typedef addrinfo_emulation addrinfo_type;
+# endif
+#endif
 #if defined(INET6_ADDRSTRLEN)
 const int max_addr_v6_str_len = INET6_ADDRSTRLEN + 1 + IF_NAMESIZE;
 #else // defined(INET6_ADDRSTRLEN)
@@ -297,12 +312,16 @@
 typedef ip_mreq in4_mreq_type;
 # endif
 typedef sockaddr_in sockaddr_in4_type;
+#if !defined(__OS2__)
 typedef in6_addr in6_addr_type;
 typedef ipv6_mreq in6_mreq_type;
 typedef sockaddr_in6 sockaddr_in6_type;
 typedef sockaddr_storage sockaddr_storage_type;
+#endif
 typedef sockaddr_un sockaddr_un_type;
+#if !defined(__OS2__)
 typedef addrinfo addrinfo_type;
+#endif
 typedef ::linger linger_type;
 typedef int ioctl_arg_type;
 typedef uint32_t u_long_type;
Only in boost_1_57_0/boost/asio/detail: socket_types.hpp.orig
Only in boost_1_57_0/boost/asio/detail: socket_types.hpp.rej
diff -ur boost_1_57_0-o/boost/asio/impl/serial_port_base.ipp boost_1_57_0/boost/asio/impl/serial_port_base.ipp
--- boost_1_57_0-o/boost/asio/impl/serial_port_base.ipp	2014-10-18 09:19:08.000000000 +1030
+++ boost_1_57_0/boost/asio/impl/serial_port_base.ipp	2015-03-22 10:01:34.000000000 +1030
@@ -250,7 +250,7 @@
   {
   case none:
     storage.c_iflag &= ~(IXOFF | IXON);
-# if defined(_BSD_SOURCE)
+# if defined(_BSD_SOURCE) && !defined(__OS2__)
     storage.c_cflag &= ~CRTSCTS;
 # elif defined(__QNXNTO__)
     storage.c_cflag &= ~(IHFLOW | OHFLOW);
@@ -258,7 +258,7 @@
     break;
   case software:
     storage.c_iflag |= IXOFF | IXON;
-# if defined(_BSD_SOURCE)
+# if defined(_BSD_SOURCE) && !defined(__OS2__)
     storage.c_cflag &= ~CRTSCTS;
 # elif defined(__QNXNTO__)
     storage.c_cflag &= ~(IHFLOW | OHFLOW);
@@ -267,7 +267,9 @@
   case hardware:
 # if defined(_BSD_SOURCE)
     storage.c_iflag &= ~(IXOFF | IXON);
+#if !defined(__OS2__)
     storage.c_cflag |= CRTSCTS;
+#endif
     break;
 # elif defined(__QNXNTO__)
     storage.c_iflag &= ~(IXOFF | IXON);
@@ -306,7 +308,7 @@
   {
     value_ = software;
   }
-# if defined(_BSD_SOURCE)
+# if defined(_BSD_SOURCE) && !defined(__OS2__)
   else if (storage.c_cflag & CRTSCTS)
   {
     value_ = hardware;
Only in boost_1_57_0/boost/asio/impl: serial_port_base.ipp.orig
Only in boost_1_57_0/boost/asio/impl: serial_port_base.ipp.rej
diff -ur boost_1_57_0-o/boost/chrono/detail/inlined/posix/thread_clock.hpp boost_1_57_0/boost/chrono/detail/inlined/posix/thread_clock.hpp
--- boost_1_57_0-o/boost/chrono/detail/inlined/posix/thread_clock.hpp	2014-09-20 23:38:26.000000000 +0930
+++ boost_1_57_0/boost/chrono/detail/inlined/posix/thread_clock.hpp	2015-03-22 15:41:18.000000000 +1030
@@ -33,7 +33,9 @@
         pthread_t pth=pthread_self();
         // get the clock_id associated to the current thread
         clockid_t clock_id;
+#ifndef __OS2__
         pthread_getcpuclockid(pth, &clock_id);
+#endif
         // get the timespec associated to the thread clock
         if ( ::clock_gettime( clock_id, &ts ) )
 #endif
@@ -59,7 +61,9 @@
         pthread_t pth=pthread_self();
         // get the clock_id associated to the current thread
         clockid_t clock_id;
+#ifndef __OS2__
         pthread_getcpuclockid(pth, &clock_id);
+#endif
         // get the timespec associated to the thread clock
         if ( ::clock_gettime( clock_id, &ts ) )
 #endif
diff -ur boost_1_57_0-o/boost/chrono/system_clocks.hpp boost_1_57_0/boost/chrono/system_clocks.hpp
--- boost_1_57_0-o/boost/chrono/system_clocks.hpp	2014-09-20 23:38:26.000000000 +0930
+++ boost_1_57_0/boost/chrono/system_clocks.hpp	2015-03-22 14:38:56.000000000 +1030
@@ -67,7 +67,7 @@
 #include <ctime>
 
 # if defined( BOOST_CHRONO_POSIX_API )
-#   if ! defined(CLOCK_REALTIME) && ! defined (__hpux__)
+#   if ! defined(CLOCK_REALTIME) && ! defined (__hpux__) && !defined(__OS2__)
 #     error <time.h> does not supply CLOCK_REALTIME
 #   endif
 # endif
Only in boost_1_57_0/boost/config/platform: os2.hpp
diff -ur boost_1_57_0-o/boost/config/select_platform_config.hpp boost_1_57_0/boost/config/select_platform_config.hpp
--- boost_1_57_0-o/boost/config/select_platform_config.hpp	2014-10-26 23:06:42.000000000 +1030
+++ boost_1_57_0/boost/config/select_platform_config.hpp	2015-03-21 17:08:28.000000000 +1030
@@ -45,6 +45,10 @@
 // BeOS
 #  define BOOST_PLATFORM_CONFIG "boost/config/platform/beos.hpp"
 
+#elif defined(__OS2__)
+// BeOS
+#  define BOOST_PLATFORM_CONFIG "boost/config/platform/os2.hpp"
+
 #elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
 // MacOS
 #  define BOOST_PLATFORM_CONFIG "boost/config/platform/macos.hpp"
@@ -113,6 +117,7 @@
 #  include "boost/config/platform/cygwin.hpp"
 #  include "boost/config/platform/win32.hpp"
 #  include "boost/config/platform/beos.hpp"
+#  include "boost/config/platform/os2.hpp"
 #  include "boost/config/platform/macos.hpp"
 #  include "boost/config/platform/aix.hpp"
 #  include "boost/config/platform/amigaos.hpp"
Only in boost_1_57_0/boost/config: select_platform_config.hpp.orig
Only in boost_1_57_0/boost/config: select_platform_config.hpp.rej
diff -ur boost_1_57_0-o/boost/config/stdlib/libstdcpp3.hpp boost_1_57_0/boost/config/stdlib/libstdcpp3.hpp
--- boost_1_57_0-o/boost/config/stdlib/libstdcpp3.hpp	2014-10-26 23:06:42.000000000 +1030
+++ boost_1_57_0/boost/config/stdlib/libstdcpp3.hpp	2015-03-22 11:26:12.000000000 +1030
@@ -17,7 +17,7 @@
 #define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCPP__)
 #endif
 
-#if !defined(_GLIBCPP_USE_WCHAR_T) && !defined(_GLIBCXX_USE_WCHAR_T)
+#if !defined(_GLIBCPP_USE_WCHAR_T) && !defined(_GLIBCXX_USE_WCHAR_T) && !defined(__OS2__)
 #  define BOOST_NO_CWCHAR
 #  define BOOST_NO_CWCTYPE
 #  define BOOST_NO_STD_WSTRING
@@ -36,6 +36,7 @@
         || defined(_GLIBCXX__PTHREADS) \
         || defined(_GLIBCXX_HAS_GTHREADS) \
         || defined(_WIN32) \
+	|| defined(__OS2__) \
         || defined(_AIX)
       //
       // If the std lib has thread support turned on, then turn it on in Boost
diff -ur boost_1_57_0-o/boost/config/suffix.hpp boost_1_57_0/boost/config/suffix.hpp
--- boost_1_57_0-o/boost/config/suffix.hpp	2014-10-26 23:06:42.000000000 +1030
+++ boost_1_57_0/boost/config/suffix.hpp	2015-03-21 16:51:48.000000000 +1030
@@ -247,7 +247,7 @@
 // from here then add to the appropriate compiler section):
 //
 #if (defined(__MT__) || defined(_MT) || defined(_REENTRANT) \
-    || defined(_PTHREADS) || defined(__APPLE__) || defined(__DragonFly__)) \
+    || defined(_PTHREADS) || defined(__APPLE__) || defined(__DragonFly__) || defined(__OS2__))\
     && !defined(BOOST_HAS_THREADS)
 #  define BOOST_HAS_THREADS
 #endif
diff -ur boost_1_57_0-o/boost/filesystem/config.hpp boost_1_57_0/boost/filesystem/config.hpp
--- boost_1_57_0-o/boost/filesystem/config.hpp	2014-10-30 02:04:00.000000000 +1030
+++ boost_1_57_0/boost/filesystem/config.hpp	2015-03-23 21:31:06.000000000 +1030
@@ -45,7 +45,7 @@
 
 #define BOOST_FILESYSTEM_THROW(EX) throw EX
 
-# if defined( BOOST_NO_STD_WSTRING )
+# if defined( BOOST_NO_STD_WSTRING ) && !defined(__OS2__)
 #   error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
 # endif
 
Only in boost_1_57_0/boost/filesystem: config.hpp.orig
Only in boost_1_57_0/boost/filesystem: config.hpp.rej
diff -ur boost_1_57_0-o/boost/filesystem/convenience.hpp boost_1_57_0/boost/filesystem/convenience.hpp
--- boost_1_57_0-o/boost/filesystem/convenience.hpp	2014-10-30 02:04:00.000000000 +1030
+++ boost_1_57_0/boost/filesystem/convenience.hpp	2015-03-23 21:31:24.000000000 +1030
@@ -15,7 +15,7 @@
 
 #include <boost/config.hpp>
 
-# if defined( BOOST_NO_STD_WSTRING )
+# if defined( BOOST_NO_STD_WSTRING ) && !defined(__OS2__)
 #   error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
 # endif
 
diff -ur boost_1_57_0-o/boost/filesystem/fstream.hpp boost_1_57_0/boost/filesystem/fstream.hpp
--- boost_1_57_0-o/boost/filesystem/fstream.hpp	2014-10-30 02:04:00.000000000 +1030
+++ boost_1_57_0/boost/filesystem/fstream.hpp	2015-03-23 21:31:32.000000000 +1030
@@ -14,7 +14,7 @@
 
 #include <boost/config.hpp>
 
-# if defined( BOOST_NO_STD_WSTRING )
+# if defined( BOOST_NO_STD_WSTRING ) && !defined(__OS2__)
 #   error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
 # endif
 
diff -ur boost_1_57_0-o/boost/filesystem/operations.hpp boost_1_57_0/boost/filesystem/operations.hpp
--- boost_1_57_0-o/boost/filesystem/operations.hpp	2014-10-30 02:04:00.000000000 +1030
+++ boost_1_57_0/boost/filesystem/operations.hpp	2015-03-23 21:31:38.000000000 +1030
@@ -17,7 +17,7 @@
 
 #include <boost/config.hpp>
 
-# if defined( BOOST_NO_STD_WSTRING )
+# if defined( BOOST_NO_STD_WSTRING ) && !defined(__OS2__)
 #   error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
 # endif
 
diff -ur boost_1_57_0-o/boost/filesystem/path_traits.hpp boost_1_57_0/boost/filesystem/path_traits.hpp
--- boost_1_57_0-o/boost/filesystem/path_traits.hpp	2014-10-30 02:04:00.000000000 +1030
+++ boost_1_57_0/boost/filesystem/path_traits.hpp	2015-03-23 21:31:52.000000000 +1030
@@ -12,7 +12,7 @@
 
 #include <boost/config.hpp>
 
-# if defined( BOOST_NO_STD_WSTRING )
+# if defined( BOOST_NO_STD_WSTRING ) && !defined(__OS2__)
 #   error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
 # endif
 
diff -ur boost_1_57_0-o/boost/filesystem/path.hpp boost_1_57_0/boost/filesystem/path.hpp
--- boost_1_57_0-o/boost/filesystem/path.hpp	2014-10-30 02:04:00.000000000 +1030
+++ boost_1_57_0/boost/filesystem/path.hpp	2015-03-23 21:31:42.000000000 +1030
@@ -17,7 +17,7 @@
 
 #include <boost/config.hpp>
 
-# if defined( BOOST_NO_STD_WSTRING )
+# if defined( BOOST_NO_STD_WSTRING ) && !defined(__OS2__)
 #   error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
 # endif
 
diff -ur boost_1_57_0-o/boost/integer_traits.hpp boost_1_57_0/boost/integer_traits.hpp
--- boost_1_57_0-o/boost/integer_traits.hpp	2014-06-08 08:08:20.000000000 +0930
+++ boost_1_57_0/boost/integer_traits.hpp	2015-03-20 19:20:14.000000000 +1030
@@ -23,7 +23,7 @@
 #include <limits.h>
 // we need wchar.h for WCHAR_MAX/MIN but not all platforms provide it,
 // and some may have <wchar.h> but not <cwchar> ...
-#if !defined(BOOST_NO_INTRINSIC_WCHAR_T) && (!defined(BOOST_NO_CWCHAR) || defined(sun) || defined(__sun) || defined(__QNX__))
+#if !defined(BOOST_NO_INTRINSIC_WCHAR_T) && (!defined(BOOST_NO_CWCHAR) || defined(sun) || defined(__sun) || defined(__QNX__) || defined(__OS2__))
 #include <wchar.h>
 #endif
 
diff -ur boost_1_57_0-o/boost/lexical_cast/detail/converter_lexical_streams.hpp boost_1_57_0/boost/lexical_cast/detail/converter_lexical_streams.hpp
--- boost_1_57_0-o/boost/lexical_cast/detail/converter_lexical_streams.hpp	2014-09-02 03:34:38.000000000 +0930
+++ boost_1_57_0/boost/lexical_cast/detail/converter_lexical_streams.hpp	2015-03-22 12:02:42.000000000 +1030
@@ -316,7 +316,7 @@
 #endif
 
 
-#if !defined(BOOST_LCAST_NO_WCHAR_T) && !defined(BOOST_NO_SWPRINTF) && !defined(__MINGW32__)
+#if !defined(BOOST_LCAST_NO_WCHAR_T) && !defined(BOOST_NO_SWPRINTF) && !defined(__MINGW32__) && !defined(__OS2__)
             bool shl_real_type(float val, wchar_t* begin) {
                 using namespace std;
                 const double val_as_double = val;
diff -ur boost_1_57_0-o/boost/smart_ptr/detail/sp_has_sync.hpp boost_1_57_0/boost/smart_ptr/detail/sp_has_sync.hpp
--- boost_1_57_0-o/boost/smart_ptr/detail/sp_has_sync.hpp	2014-08-22 06:18:32.000000000 +0930
+++ boost_1_57_0/boost/smart_ptr/detail/sp_has_sync.hpp	2015-03-22 10:03:54.000000000 +1030
@@ -38,6 +38,10 @@
 #undef BOOST_SP_HAS_SYNC
 #endif
 
+#if defined( __OS2__ )
+#undef BOOST_SP_HAS_SYNC
+#endif
+
 #if defined( __hppa ) || defined( __hppa__ )
 #undef BOOST_SP_HAS_SYNC
 #endif
Only in boost_1_57_0/boost/smart_ptr/detail: sp_has_sync.hpp.orig
Only in boost_1_57_0/boost/smart_ptr/detail: sp_has_sync.hpp.rej
diff -ur boost_1_57_0-o/boost/smart_ptr/detail/yield_k.hpp boost_1_57_0/boost/smart_ptr/detail/yield_k.hpp
--- boost_1_57_0-o/boost/smart_ptr/detail/yield_k.hpp	2014-08-22 06:18:32.000000000 +0930
+++ boost_1_57_0/boost/smart_ptr/detail/yield_k.hpp	2015-03-22 15:04:56.000000000 +1030
@@ -98,13 +98,14 @@
 
 #elif defined( BOOST_HAS_PTHREADS )
 
+#ifndef __OS2__
 #ifndef _AIX
 #include <sched.h>
 #else
    // AIX's sched.h defines ::var which sometimes conflicts with Lambda's var
        extern "C" int sched_yield(void);
 #endif
-
+#endif
 #include <time.h>
 
 namespace boost
@@ -126,7 +127,9 @@
 #endif
     else if( k < 32 || k & 1 )
     {
+#ifndef __OS2__
         sched_yield();
+#endif
     }
     else
     {
Only in boost_1_57_0/boost/thread/pthread: condition_variable.hpp.orig
Only in boost_1_57_0/boost/thread/pthread: condition_variable.hpp.rej
Only in boost_1_57_0/boost/thread/pthread: mutex.hpp.orig
Only in boost_1_57_0/boost/thread/pthread: mutex.hpp.rej
diff -ur boost_1_57_0-o/boost/thread/pthread/timespec.hpp boost_1_57_0/boost/thread/pthread/timespec.hpp
--- boost_1_57_0-o/boost/thread/pthread/timespec.hpp	2014-10-25 03:13:26.000000000 +1030
+++ boost_1_57_0/boost/thread/pthread/timespec.hpp	2015-03-22 19:29:18.000000000 +1030
@@ -20,7 +20,7 @@
 #include <boost/chrono/duration.hpp>
 #endif
 
-#if defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
+#if defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) || defined(__OS2__)
 #     define BOOST_THREAD_TIMESPEC_MAC_API
 #include <sys/time.h> //for gettimeofday and timeval
 #else
diff -ur boost_1_57_0-o/boost/token_functions.hpp boost_1_57_0/boost/token_functions.hpp
--- boost_1_57_0-o/boost/token_functions.hpp	2014-04-28 08:05:20.000000000 +0930
+++ boost_1_57_0/boost/token_functions.hpp	2015-03-22 12:03:48.000000000 +1030
@@ -67,7 +67,7 @@
 namespace std{
  using ::ispunct;
  using ::isspace;
-#if !defined(BOOST_NO_CWCTYPE)
+#if !defined(BOOST_NO_CWCTYPE) && !defined(__OS2__)
  using ::iswpunct;
  using ::iswspace;
 #endif
@@ -210,7 +210,7 @@
   // implementations, argument types are not a problem since both forms of character classifiers
   // expect an int.
 
-#if !defined(BOOST_NO_CWCTYPE)
+#if !defined(BOOST_NO_CWCTYPE) && !defined(__OS2__)
   template<typename traits, int N>
   struct traits_extension_details : public traits {
     typedef typename traits::char_type char_type;
diff -ur boost_1_57_0-o/boost/wave/token_ids.hpp boost_1_57_0/boost/wave/token_ids.hpp
--- boost_1_57_0-o/boost/wave/token_ids.hpp	2014-06-07 20:00:04.000000000 +0930
+++ boost_1_57_0/boost/wave/token_ids.hpp	2015-03-22 11:27:42.000000000 +1030
@@ -27,7 +27,7 @@
 #if !defined(BOOST_WAVE_TOKEN_IDS_DEFINED)
 #define BOOST_WAVE_TOKEN_IDS_DEFINED
 
-#if (defined (__FreeBSD__) || defined (__DragonFly__) || defined (__OpenBSD__)) && defined (T_DIVIDE) 
+#if (defined (__FreeBSD__) || defined (__DragonFly__) || defined(__OS2__) || defined (__OpenBSD__)) && defined (T_DIVIDE) 
 #undef T_DIVIDE
 #endif
 
Only in boost_1_57_0: bootstrap.log
diff -ur boost_1_57_0-o/bootstrap.sh boost_1_57_0/bootstrap.sh
--- boost_1_57_0-o/bootstrap.sh	2014-10-30 22:30:14.000000000 +1030
+++ boost_1_57_0/bootstrap.sh	2015-03-20 19:29:32.000000000 +1030
@@ -26,6 +26,12 @@
 flag_icu=
 flag_show_libraries=
 
+# Check that the OS name, as returned by "uname", is as given.
+test_uname ()
+{
+    test `uname` = $*
+}
+
 for option
 do
     case $option in
@@ -226,7 +232,11 @@
   arch=`cd $my_dir/tools/build/src/engine && ./bootstrap/jam0 -d0 -f build.jam --toolset=$TOOLSET --toolset-root= --show-locate-target && cd ..`
   BJAM="$my_dir/tools/build/src/engine/$arch/b2"
   echo "tools/build/src/engine/$arch/b2"
+  if test_uname OS/2 ; then
+  cp "$BJAM.exe" .
+  else
   cp "$BJAM" .
+  fi
   cp "$my_dir/tools/build/src/engine/$arch/bjam" .
 
 fi
Only in boost_1_57_0: bootstrap.sh.orig
Only in boost_1_57_0: bootstrap.sh.rej
Only in boost_1_57_0: build
Only in boost_1_57_0: build.cmd
Only in boost_1_57_0: build.log
diff -ur boost_1_57_0-o/libs/container/src/dlmalloc_2_8_6.c boost_1_57_0/libs/container/src/dlmalloc_2_8_6.c
--- boost_1_57_0-o/libs/container/src/dlmalloc_2_8_6.c	2014-10-18 05:08:02.000000000 +1030
+++ boost_1_57_0/libs/container/src/dlmalloc_2_8_6.c	2015-03-22 10:56:44.000000000 +1030
@@ -565,6 +565,10 @@
 #endif /*MMAP_CLEARS */
 #endif  /* WIN32 */
 
+#ifdef __OS2__
+#define LACKS_SCHED_H
+#endif
+
 #if defined(DARWIN) || defined(_DARWIN)
 /* Mac OSX docs advise not to use sbrk; it seems better to use mmap */
 #ifndef HAVE_MORECORE
diff -ur boost_1_57_0-o/libs/filesystem/src/path.cpp boost_1_57_0/libs/filesystem/src/path.cpp
--- boost_1_57_0-o/libs/filesystem/src/path.cpp	2014-10-30 02:04:00.000000000 +1030
+++ boost_1_57_0/libs/filesystem/src/path.cpp	2015-03-23 21:34:34.000000000 +1030
@@ -10,7 +10,7 @@
 //  Old standard library configurations, particularly MingGW, don't support wide strings.
 //  Report this with an explicit error message.
 #include <boost/config.hpp>
-# if defined( BOOST_NO_STD_WSTRING )
+# if defined( BOOST_NO_STD_WSTRING ) && !defined(__OS2__)
 #   error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
 # endif
 
Only in boost_1_57_0/libs/filesystem/src: portability.cpp.orig
Only in boost_1_57_0/libs/filesystem/src: portability.cpp.rej
diff -ur boost_1_57_0-o/libs/filesystem/test/convenience_test.cpp boost_1_57_0/libs/filesystem/test/convenience_test.cpp
--- boost_1_57_0-o/libs/filesystem/test/convenience_test.cpp	2014-10-30 02:04:00.000000000 +1030
+++ boost_1_57_0/libs/filesystem/test/convenience_test.cpp	2015-03-23 21:34:46.000000000 +1030
@@ -21,7 +21,7 @@
 #include <boost/filesystem/convenience.hpp>
 
 #include <boost/config.hpp>
-# if defined( BOOST_NO_STD_WSTRING )
+# if defined( BOOST_NO_STD_WSTRING ) && !defined(__OS2__)
 #   error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
 # endif
 
diff -ur boost_1_57_0-o/libs/filesystem/test/deprecated_test.cpp boost_1_57_0/libs/filesystem/test/deprecated_test.cpp
--- boost_1_57_0-o/libs/filesystem/test/deprecated_test.cpp	2014-10-30 02:04:00.000000000 +1030
+++ boost_1_57_0/libs/filesystem/test/deprecated_test.cpp	2015-03-23 21:34:52.000000000 +1030
@@ -16,7 +16,7 @@
 #include <boost/filesystem.hpp>
 
 #include <boost/config.hpp>
-# if defined( BOOST_NO_STD_WSTRING )
+# if defined( BOOST_NO_STD_WSTRING ) && !defined(__OS2__)
 #   error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
 # endif
 
diff -ur boost_1_57_0-o/libs/filesystem/test/fstream_test.cpp boost_1_57_0/libs/filesystem/test/fstream_test.cpp
--- boost_1_57_0-o/libs/filesystem/test/fstream_test.cpp	2014-10-30 02:04:00.000000000 +1030
+++ boost_1_57_0/libs/filesystem/test/fstream_test.cpp	2015-03-23 21:34:56.000000000 +1030
@@ -20,7 +20,7 @@
 #include <boost/filesystem/fstream.hpp>
 
 #include <boost/config.hpp>
-# if defined( BOOST_NO_STD_WSTRING )
+# if defined( BOOST_NO_STD_WSTRING ) && !defined(__OS2__)
 #   error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
 # endif
 
diff -ur boost_1_57_0-o/libs/filesystem/test/issues/recurse_dir_iter_5403.cpp boost_1_57_0/libs/filesystem/test/issues/recurse_dir_iter_5403.cpp
--- boost_1_57_0-o/libs/filesystem/test/issues/recurse_dir_iter_5403.cpp	2014-10-30 02:04:00.000000000 +1030
+++ boost_1_57_0/libs/filesystem/test/issues/recurse_dir_iter_5403.cpp	2015-03-23 21:34:40.000000000 +1030
@@ -20,7 +20,7 @@
 #include <boost/filesystem/operations.hpp>
 
 #include <boost/config.hpp>
-# if defined( BOOST_NO_STD_WSTRING )
+# if defined( BOOST_NO_STD_WSTRING ) && !defined(__OS2__)
 #   error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
 # endif
 
Only in boost_1_57_0: patch.log
Only in boost_1_57_0: project-config.jam
Only in boost_1_57_0: project-config.jam.1
Only in boost_1_57_0: project-config.jam.2
Only in boost_1_57_0: project-config.jam.3
Only in boost_1_57_0: project-config.jam.4
Only in boost_1_57_0: project-config.jam.5
Only in boost_1_57_0: project-config.jam.6
Only in boost_1_57_0: stage
Only in boost_1_57_0: t.sh
Only in boost_1_57_0/tools/build: bootstrap.log
Only in boost_1_57_0/tools/build/src: bin.os2x86
diff -ur boost_1_57_0-o/tools/build/src/build/type.jam boost_1_57_0/tools/build/src/build/type.jam
--- boost_1_57_0-o/tools/build/src/build/type.jam	2014-10-25 05:36:58.000000000 +1030
+++ boost_1_57_0/tools/build/src/build/type.jam	2015-03-20 19:31:26.000000000 +1030
@@ -354,7 +354,7 @@
 #
 rule type ( filename )
 {
-    if [ os.name ] in NT CYGWIN
+    if [ os.name ] in NT CYGWIN OS2
     {
         filename = $(filename:L) ;
     }
diff -ur boost_1_57_0-o/tools/build/src/build-system.jam boost_1_57_0/tools/build/src/build-system.jam
--- boost_1_57_0-o/tools/build/src/build-system.jam	2014-10-25 05:36:58.000000000 +1030
+++ boost_1_57_0/tools/build/src/build-system.jam	2015-03-21 06:12:08.000000000 +1030
@@ -334,7 +334,7 @@
 
     local user-path = [ os.home-directories ] [ os.environ BOOST_BUILD_PATH ] ;
     local site-path = /etc $(user-path) ;
-    if [ os.name ] in NT CYGWIN
+    if [ os.name ] in NT CYGWIN OS2
     {
         site-path = [ modules.peek : SystemRoot ] $(user-path) ;
     }
Only in boost_1_57_0/tools/build/src/engine: b2.exe
Only in boost_1_57_0/tools/build/src/engine: bin.os2x86
Only in boost_1_57_0/tools/build/src/engine: bin.os2x86b2.exe
Only in boost_1_57_0/tools/build/src/engine: bootstrap
diff -ur boost_1_57_0-o/tools/build/src/engine/build.jam boost_1_57_0/tools/build/src/engine/build.jam
--- boost_1_57_0-o/tools/build/src/engine/build.jam	2014-10-25 05:36:58.000000000 +1030
+++ boost_1_57_0/tools/build/src/engine/build.jam	2015-03-21 10:11:22.000000000 +1030
@@ -572,6 +572,9 @@
 if $(OS) = NT { actions piecemeal together existing [DELETE] {
     del /F /Q "$(>)"
 } }
+if $(OS) = OS2 { actions piecemeal together existing [DELETE] {
+    rm -f "$(>)"
+} }
 if $(UNIX) = true { actions piecemeal together existing [DELETE] {
     rm -f "$(>)"
 } }
@@ -591,6 +594,9 @@
 if $(OS) = NT { actions [MKDIR] {
     md "$(<)"
 } }
+if $(OS2) = true { actions [MKDIR] {
+    md "$(<)"
+} }
 if $(UNIX) = true { actions [MKDIR] {
     mkdir "$(<)"
 } }
diff -ur boost_1_57_0-o/tools/build/src/engine/build.sh boost_1_57_0/tools/build/src/engine/build.sh
--- boost_1_57_0-o/tools/build/src/engine/build.sh	2014-10-25 05:36:58.000000000 +1030
+++ boost_1_57_0/tools/build/src/engine/build.sh	2015-03-21 08:58:32.000000000 +1030
@@ -130,6 +130,9 @@
     ;;
 
     gcc)
+    if test_uname OS/2 ; then
+    BOOST_JAM_OPT_JAM="-Zomf $BOOST_JAM_OPT_JAM -D__OS2__ -D__EMX__"
+    fi
     BOOST_JAM_CC=gcc
     ;;
 
@@ -258,7 +261,11 @@
     ;;
 
     *)
+#    if test_uname OS/2 ; then
+#    BJAM_SOURCES="${BJAM_SOURCES} execos2.c fileunix.c pathunix.c"
+#    else
     BJAM_SOURCES="${BJAM_SOURCES} execunix.c fileunix.c pathunix.c"
+#    fi
     ;;
 esac
 
diff -ur boost_1_57_0-o/tools/build/src/engine/builtins.c boost_1_57_0/tools/build/src/engine/builtins.c
--- boost_1_57_0-o/tools/build/src/engine/builtins.c	2014-10-25 05:36:58.000000000 +1030
+++ boost_1_57_0/tools/build/src/engine/builtins.c	2015-03-21 08:30:40.000000000 +1030
@@ -726,7 +726,7 @@
     globbing.patterns = r;
 
     globbing.case_insensitive =
-# if defined( OS_NT ) || defined( OS_CYGWIN )
+# if defined( OS_NT ) || defined( OS_CYGWIN ) || defined( OS_OS2 )
        l;  /* Always case-insensitive if any files can be found. */
 # else
        lol_get( frame->args, 2 );
@@ -774,7 +774,7 @@
     globbing.patterns = plist;
 
     globbing.case_insensitive
-# if defined( OS_NT ) || defined( OS_CYGWIN )
+# if defined( OS_NT ) || defined( OS_CYGWIN ) || defined( OS_OS2 )
        = plist;  /* always case-insensitive if any files can be found */
 # else
        = L0;
Only in boost_1_57_0/tools/build/src/engine: execos2.c
diff -ur boost_1_57_0-o/tools/build/src/engine/execunix.c boost_1_57_0/tools/build/src/engine/execunix.c
--- boost_1_57_0-o/tools/build/src/engine/execunix.c	2014-10-25 05:36:58.000000000 +1030
+++ boost_1_57_0/tools/build/src/engine/execunix.c	2015-03-21 09:00:26.000000000 +1030
@@ -21,12 +21,15 @@
 #include <sys/times.h>
 #include <sys/wait.h>
 
+#ifdef __OS2__
+#include <sys/socket.h>
+#endif
+
 #if defined(sun) || defined(__sun)
     #include <wait.h>
 #endif
 
 #ifdef USE_EXECUNIX
-
 #include <sys/times.h>
 
 #if defined(__APPLE__)
@@ -169,7 +172,11 @@
     }
 
     /* Create pipes for collecting child output. */
+#ifndef __OS2__
     if ( pipe( out ) < 0 || ( globs.pipe_action && pipe( err ) < 0 ) )
+#else
+    if ( socketpair(AF_UNIX, SOCK_STREAM,0,  out ) < 0 || ( globs.pipe_action && pipe( err ) < 0 ) )
+#endif
     {
         perror( "pipe" );
         exit( EXITBAD );
diff -ur boost_1_57_0-o/tools/build/src/engine/jam.h boost_1_57_0/tools/build/src/engine/jam.h
--- boost_1_57_0-o/tools/build/src/engine/jam.h	2014-10-25 05:36:58.000000000 +1030
+++ boost_1_57_0/tools/build/src/engine/jam.h	2015-03-21 08:58:48.000000000 +1030
@@ -98,6 +98,40 @@
 
 
 /*
+ * OS2
+ */
+
+#ifdef __OS2__
+
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <malloc.h>
+#include <signal.h>
+#include <string.h>
+#include <time.h>
+
+#define OSMAJOR "OS2=true"
+#define OSMINOR "OS=OS2"
+#define OS_OS2
+#define SPLITPATH ';'
+#define MAXLINE 996    /* longest 'together' actions */
+/*#define USE_EXECOS2*/
+#define USE_EXECUNIX
+#define USE_PATHUNIX
+#define PATH_DELIM '\\'
+#define DOWNSHIFT_PATHS
+
+#define NO_VFORK
+
+#ifdef __EMX__
+    #define USE_FILEUNIX
+#endif
+
+#endif
+
+/*
  * God fearing UNIX.
  */
 
diff -ur boost_1_57_0-o/tools/build/src/engine/pathunix.c boost_1_57_0/tools/build/src/engine/pathunix.c
--- boost_1_57_0-o/tools/build/src/engine/pathunix.c	2014-10-25 05:36:58.000000000 +1030
+++ boost_1_57_0/tools/build/src/engine/pathunix.c	2015-03-21 08:38:36.000000000 +1030
@@ -22,6 +22,21 @@
 #include <unistd.h>  /* needed for getpid() */
 
 
+#ifdef OS_OS2
+char* short_path_to_long_path(char* short_path)  /* converts any "/" to "\" */
+{
+
+    int i = 0;
+    int len = 0;
+    len = strlen(short_path);
+    for (i=0;i<len;++i) {
+        if (short_path[i] == '/')
+           short_path[i] = '\\';
+    }
+    return short_path;
+}
+#endif
+
 /*
  * path_get_process_id_()
  */
@@ -39,6 +54,12 @@
 void path_get_temp_path_( string * buffer )
 {
     char const * t = getenv( "TMPDIR" );
+#ifdef OS_OS2
+        if (!t)
+        {
+           const char * t = getenv("TEMP");
+        }
+#endif
     string_append( buffer, t ? t : "/tmp" );
 }
 
Only in boost_1_57_0/tools/build/src/engine: t
Only in boost_1_57_0/tools/build/src/engine: t.sh
diff -ur boost_1_57_0-o/tools/build/src/tools/builtin.jam boost_1_57_0/tools/build/src/tools/builtin.jam
--- boost_1_57_0-o/tools/build/src/tools/builtin.jam	2014-10-25 05:36:58.000000000 +1030
+++ boost_1_57_0/tools/build/src/tools/builtin.jam	2015-03-21 06:14:14.000000000 +1030
@@ -41,7 +41,7 @@
 
 
 .os-names = aix android bsd cygwin darwin freebsd hpux iphone linux netbsd openbsd osf
-    qnx qnxnto sgi solaris unix unixware windows
+    qnx qnxnto sgi solaris unix unixware windows os2
     elf  # Not actually an OS -- used for targeting bare metal where object
          # format is ELF.  This catches both -elf and -eabi gcc targets and well
          # as other compilers targeting ELF. It is not clear how often we need
diff -ur boost_1_57_0-o/tools/build/src/tools/common.jam boost_1_57_0/tools/build/src/tools/common.jam
--- boost_1_57_0-o/tools/build/src/tools/common.jam	2014-10-25 05:36:58.000000000 +1030
+++ boost_1_57_0/tools/build/src/tools/common.jam	2015-03-21 06:18:48.000000000 +1030
@@ -383,6 +383,9 @@
             # Only NT will run .bat & .cmd files by their unqualified names.
             || ( ( [ os.name ] = NT ) && ( [ path.exists $(command).bat ] ||
                 [ path.exists $(command).cmd ] ) )
+	    || ( ( [ os.name ] = OS2 ) && ( [ path.exists $(command).bat ] ||
+                [ path.exists $(command).cmd ] || [ path.exists $(command).exe ] ) )
+
         {
             return $(command) ;
         }
@@ -521,7 +524,7 @@
 #
 rule variable-setting-command ( variable : value )
 {
-    if [ os.name ] = NT
+    if [ os.name ] = NT || [ os.name ] = OS2
     {
         return "set $(variable)=$(value)$(nl)" ;
     }
@@ -629,7 +632,7 @@
         # recurse until root.
 
         local s = $(<:P) ;
-        if [ os.name ] = NT
+        if [ os.name ] = NT || [ os.name ] = OS2
         {
             switch $(s)
             {
@@ -664,7 +667,7 @@
 # up to the same filesystem target and triggers their build action only once.
 #                                             (todo) (04.07.2008.) (Jurko)
 
-if [ os.name ] = NT
+if [ os.name ] = NT || [ os.name ] = OS2
 {
     actions mkdir
     {
diff -ur boost_1_57_0-o/tools/build/src/tools/gcc.jam boost_1_57_0/tools/build/src/tools/gcc.jam
--- boost_1_57_0-o/tools/build/src/tools/gcc.jam	2014-10-25 05:36:58.000000000 +1030
+++ boost_1_57_0/tools/build/src/tools/gcc.jam	2015-03-21 06:26:10.000000000 +1030
@@ -47,6 +47,7 @@
 type.set-generated-target-suffix OBJ : <toolset>gcc : o ;
 type.set-generated-target-suffix OBJ : <toolset>gcc <target-os>windows : o ;
 type.set-generated-target-suffix OBJ : <toolset>gcc <target-os>cygwin : o ;
+type.set-generated-target-suffix OBJ : <toolset>gcc <target-os>os2 : o ;
 
 
 # Initializes the gcc toolset for the given version. If necessary, command may
@@ -201,6 +202,7 @@
             case HPUX    : linker = hpux ;
             case AIX     : linker = aix ;
             case SOLARIS : linker = sun ;
+            case OS2	 : linker = os2 ;
             case *       : linker = gnu ;
         }
     }
@@ -412,7 +414,7 @@
 
         # On Windows, fPIC is the default, and specifying -fPIC explicitly leads
         # to a warning.
-        if ! $(target) in cygwin windows
+        if ! $(target) in cygwin windows os2
         {
             OPTIONS on $(targets) += -fPIC ;
         }
@@ -471,7 +473,7 @@
 
 
 # FIXME: this should not use os.name.
-if ! [ os.name ] in NT OSF HPUX AIX
+if ! [ os.name ] in NT OSF HPUX AIX OS2
 {
     # OSF does have an option called -soname but it does not seem to work as
     # expected, therefore it has been disabled.
@@ -802,6 +804,13 @@
         toolset.flags $(toolset).link OPTIONS : -Wl,-brtl -Wl,-bnoipath -Wl,-bbigtoc
             : unchecked ;
 
+    case os2 :
+	{
+	# on os2 we use native linker
+	toolset.flags $(toolset).link OPTIONS : -Zomf : unchecked ;
+	toolset.flags $(toolset).link.dll OPTIONS : -Zdll -Zomf : unchecked ;
+	}
+
     case darwin :
         # On Darwin, the -s option to ld does not work unless we pass -static,
         # and passing -static unconditionally is a bad idea. So, do not pass -s
@@ -1037,6 +1046,7 @@
             case *bsd    : option = -pthread ;  # There is no -lrt on BSD.
             case sgi     : # gcc on IRIX does not support multi-threading.
             case darwin  : # No threading options.
+	    case os2	 : # not available right now
             case *       : option = -pthread ; libs = rt ;
         }
 
diff -ur boost_1_57_0-o/tools/build/src/tools/python.jam boost_1_57_0/tools/build/src/tools/python.jam
--- boost_1_57_0-o/tools/build/src/tools/python.jam	2014-10-25 05:36:58.000000000 +1030
+++ boost_1_57_0/tools/build/src/tools/python.jam	2015-03-21 06:32:26.000000000 +1030
@@ -324,6 +324,10 @@
     {
         path = [ cygwin-to-windows-path $(path) ] ;
     }
+    else if [ os.name ] = OS2
+    {
+        return path.native $(path) ;
+    }
     return $(path) ;
 }
 
@@ -506,7 +510,7 @@
 {
     exec-prefix ?= $(prefix) ;
 
-    if $(target-os) = windows
+    if $(target-os) = windows || $(target-os) = OS2
     {
         # The exec_prefix is where you're supposed to look for machine-specific
         # libraries.
@@ -587,10 +591,17 @@
         # Search relative to the prefix, or if none supplied, in PATH.
         local unversioned = $(:E=python:R=$(bin-path:E=)) ;
 
+    if $(target-os) = os2
+    {
+        return $(:E=python:R=$(prefix)) $(unversioned) $(unversioned)$(version) ;
+    }
+    else
+    { 
         # If a version was specified, look for a python with that specific
         # version appended before looking for one called, simply, "python"
         return $(unversioned)$(version) $(unversioned) ;
     }
+    }
 }
 
 
@@ -639,6 +650,7 @@
         case qnx* : return ;
         case darwin : return ;
         case windows : return ;
+        case os2 : return ;
 
         case hpux : return  <library>rt ;
         case *bsd : return  <library>pthread <toolset>gcc:<library>util ;
@@ -874,7 +886,7 @@
     local dll-path = $(libraries) ;
 
     # Make sure that we can find the Python DLL on Windows.
-    if ( $(target-os) = windows ) && $(exec-prefix)
+    if ( $(target-os) = windows || $(target-os) = os2 ) && $(exec-prefix)
     {
         dll-path += $(exec-prefix) ;
     }
diff -ur boost_1_57_0-o/tools/build/src/tools/symlink.jam boost_1_57_0/tools/build/src/tools/symlink.jam
--- boost_1_57_0-o/tools/build/src/tools/symlink.jam	2014-10-25 05:36:58.000000000 +1030
+++ boost_1_57_0/tools/build/src/tools/symlink.jam	2015-03-21 06:37:06.000000000 +1030
@@ -137,4 +137,9 @@
     copy "$(>)" "$(<)" $(NULL_OUT)
 }
 
+actions ln-OS2
+{
+    copy "$(>)" "$(<)" $(NULL_OUT)
+}
+
 IMPORT $(__name__) : symlink : : symlink ;
diff -ur boost_1_57_0-o/tools/build/src/tools/types/exe.jam boost_1_57_0/tools/build/src/tools/types/exe.jam
--- boost_1_57_0-o/tools/build/src/tools/types/exe.jam	2014-10-25 05:36:58.000000000 +1030
+++ boost_1_57_0/tools/build/src/tools/types/exe.jam	2015-03-21 06:38:14.000000000 +1030
@@ -7,3 +7,4 @@
 type.register EXE ;
 type.set-generated-target-suffix EXE : <target-os>windows : "exe" ;
 type.set-generated-target-suffix EXE : <target-os>cygwin : "exe" ;
+type.set-generated-target-suffix EXE : <target-os>os2 : "exe" ;
diff -ur boost_1_57_0-o/tools/build/src/tools/types/lib.jam boost_1_57_0/tools/build/src/tools/types/lib.jam
--- boost_1_57_0-o/tools/build/src/tools/types/lib.jam	2014-10-25 05:36:58.000000000 +1030
+++ boost_1_57_0/tools/build/src/tools/types/lib.jam	2015-03-21 06:43:20.000000000 +1030
@@ -34,9 +34,11 @@
 
 # The 'lib' prefix is used everywhere
 type.set-generated-target-prefix STATIC_LIB : : lib ;
+type.set-generated-target-prefix STATIC_LIB : <target-os>os2 : "" ;
 
 # Use '.lib' suffix for windows
 type.set-generated-target-suffix STATIC_LIB : <target-os>windows : lib ;
+type.set-generated-target-suffix STATIC_LIB : <target-os>os2    : a ;
 
 # Except with gcc.
 type.set-generated-target-suffix STATIC_LIB : <toolset>gcc <target-os>windows : a ;
@@ -66,6 +68,7 @@
 type.set-generated-target-suffix SHARED_LIB : <target-os>windows : dll ;
 type.set-generated-target-suffix SHARED_LIB : <target-os>cygwin : dll ;
 type.set-generated-target-suffix SHARED_LIB : <target-os>darwin : dylib ;
+type.set-generated-target-suffix SHARED_LIB : <target-os>os2    : dll ;
 
 type SEARCHED_LIB : : LIB ;
 # This is needed so that when we create a target of SEARCHED_LIB
diff -ur boost_1_57_0-o/tools/build/src/tools/types/register.jam boost_1_57_0/tools/build/src/tools/types/register.jam
--- boost_1_57_0-o/tools/build/src/tools/types/register.jam	2014-10-25 05:36:58.000000000 +1030
+++ boost_1_57_0/tools/build/src/tools/types/register.jam	2015-03-21 06:45:56.000000000 +1030
@@ -21,7 +21,17 @@
 }
 
 .this-module's-file = [ modules.binding $(__name__) ] ;
+if ! [os.name] = OS2
+{
 .this-module's-dir = [ path.parent $(.this-module's-file) ] ;
+}
+# on os2 we need to normalize the path also. 
+else
+{
+.this-module's-dir = [ path.make $(.this-module's-file) ] ;
+.this-module's-dir = [ path.parent $(.this-module's-dir) ] ;
+}
+
 .sibling-jamfiles =  [ path.glob $(.this-module's-dir) : *.jam ] ;
 .sibling-modules = [ MATCH ^(.*)\.jam$ : $(.sibling-jamfiles) ] ;
 
Only in boost_1_57_0/tools/build/src: TOP.LOG
diff -ur boost_1_57_0-o/tools/build/src/util/os.jam boost_1_57_0/tools/build/src/util/os.jam
--- boost_1_57_0-o/tools/build/src/util/os.jam	2014-10-25 05:36:58.000000000 +1030
+++ boost_1_57_0/tools/build/src/util/os.jam	2015-03-21 06:48:18.000000000 +1030
@@ -68,6 +68,10 @@
 .expand-variable-prefix-NT = % ;
 .expand-variable-suffix-NT = % ;
 .executable-suffix-NT = .exe ;
+.executable-suffix-OS2 = .exe ;
+.path-separator-OS2 = ";" ;
+.expand-variable-prefix-OS2 = % ;
+.expand-variable-suffix-OS2 = % ;
 
 .shared-library-path-variable-CYGWIN = PATH ;
 
diff -ur boost_1_57_0-o/tools/build/src/util/path.jam boost_1_57_0/tools/build/src/util/path.jam
--- boost_1_57_0-o/tools/build/src/util/path.jam	2014-10-25 05:36:58.000000000 +1030
+++ boost_1_57_0/tools/build/src/util/path.jam	2015-03-21 08:43:34.000000000 +1030
@@ -502,6 +502,40 @@
 }
 
 
+rule make-OS2 ( native )
+{
+    local result ;
+
+        result = [ NORMALIZE_PATH $(native) ] ;
+
+    # We need to add an extra '/' in front in case this is a rooted Windows path
+    # starting with a drive letter and not a path separator character since the
+    # builtin NORMALIZE_PATH rule has no knowledge of this leading drive letter
+    # and treats it as a regular folder name.
+    if [ regex.match "(^.:)" : $(native) ]
+    {
+        result = /$(result) ;
+    }
+
+    return $(result) ;
+}
+
+
+rule native-OS2 ( path )
+{
+    local result ;
+    if [ is-rooted $(path) ] && ! [ regex.match "^/(.:)" : $(path) ]
+    {
+        result = $(path) ;
+    }
+    else
+    {
+        result = [ MATCH "^/?(.*)" : $(path) ] ;
+    }
+    result = [ sequence.join [ regex.split $(result) "/" ] : "\\" ] ;
+    return $(result) ;
+}
+
 rule make-UNIX ( native )
 {
     # VP: I have no idea now 'native' can be empty here! But it can!
