Ticket #62: boost_1_57_0.diff

File boost_1_57_0.diff, 50.9 KB (added by psmedley, 10 years ago)
  • boost/asio/detail/config.hpp

    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
    old new  
    706706#  elif defined(UNDER_CE)
    707707#   define BOOST_ASIO_HAS_GETADDRINFO 1
    708708#  endif // defined(UNDER_CE)
    709 # elif !(defined(__MACH__) && defined(__APPLE__))
     709# elif !(defined(__MACH__) && defined(__APPLE__)) && !defined(__OS2__)
    710710#  define BOOST_ASIO_HAS_GETADDRINFO 1
    711711# endif // !(defined(__MACH__) && defined(__APPLE__))
    712712#endif // !defined(BOOST_ASIO_HAS_GETADDRINFO)
  • boost/asio/detail/impl/descriptor_ops.ipp

    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
    old new  
    401401    return -1;
    402402  }
    403403
     404#if defined(__OS2__)
     405  fd_set fds;
     406  FD_ZERO(&fds);
     407  FD_SET(d, &fds);
     408  int result = error_wrapper(::select(d, &fds, 0, 0, 0), ec);
     409#else
    404410  pollfd fds;
    405411  fds.fd = d;
    406412  fds.events = POLLIN;
     
    408414  int timeout = (state & user_set_non_blocking) ? 0 : -1;
    409415  errno = 0;
    410416  int result = error_wrapper(::poll(&fds, 1, timeout), ec);
     417#endif
    411418  if (result == 0)
    412419    ec = (state & user_set_non_blocking)
    413420      ? boost::asio::error::would_block : boost::system::error_code();
     
    424431    return -1;
    425432  }
    426433
     434#if defined(__OS2__)
     435  fd_set fds;
     436  FD_ZERO(&fds);
     437  FD_SET(d, &fds);
     438  int result = error_wrapper(::select(d, 0, &fds, 0, 0), ec);
     439#else
    427440  pollfd fds;
    428441  fds.fd = d;
    429442  fds.events = POLLOUT;
     
    431444  int timeout = (state & user_set_non_blocking) ? 0 : -1;
    432445  errno = 0;
    433446  int result = error_wrapper(::poll(&fds, 1, timeout), ec);
     447#endif
    434448  if (result == 0)
    435449    ec = (state & user_set_non_blocking)
    436450      ? boost::asio::error::would_block : boost::system::error_code();
  • boost/asio/detail/impl/reactive_serial_port_service.ipp

    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
    old new  
    7373  s = descriptor_ops::error_wrapper(::tcgetattr(fd, &ios), ec);
    7474  if (s >= 0)
    7575  {
    76 #if defined(_BSD_SOURCE)
     76#if defined(_BSD_SOURCE) && !defined(__OS2__)
    7777    ::cfmakeraw(&ios);
    7878#else
    7979    ios.c_iflag &= ~(IGNBRK | BRKINT | PARMRK
  • boost/asio/detail/impl/socket_ops.ipp

    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
    old new  
    9292inline socket_type call_accept(SockLenType msghdr::*,
    9393    socket_type s, socket_addr_type* addr, std::size_t* addrlen)
    9494{
     95#if defined(__OS2__)
     96  int tmp_addrlen = addrlen ? (int)*addrlen : 0;
     97#else
    9598  SockLenType tmp_addrlen = addrlen ? (SockLenType)*addrlen : 0;
     99#endif
    96100  socket_type result = ::accept(s, addr, addrlen ? &tmp_addrlen : 0);
    97101  if (addrlen)
    98102    *addrlen = (std::size_t)tmp_addrlen;
     
    14911495    socket_type s, int level, int optname,
    14921496    void* optval, std::size_t* optlen)
    14931497{
     1498#if defined(__OS2__)
     1499  int tmp_optlen = (int)*optlen;
     1500#else
    14941501  SockLenType tmp_optlen = (SockLenType)*optlen;
     1502#endif
    14951503  int result = ::getsockopt(s, level, optname, (char*)optval, &tmp_optlen);
    14961504  *optlen = (std::size_t)tmp_optlen;
    14971505  return result;
     
    16001608inline int call_getpeername(SockLenType msghdr::*,
    16011609    socket_type s, socket_addr_type* addr, std::size_t* addrlen)
    16021610{
     1611#if defined(__OS2__)
     1612  int tmp_addrlen = (int)*addrlen;
     1613#else
    16031614  SockLenType tmp_addrlen = (SockLenType)*addrlen;
     1615#endif
    16041616  int result = ::getpeername(s, addr, &tmp_addrlen);
    16051617  *addrlen = (std::size_t)tmp_addrlen;
    16061618  return result;
     
    16521664inline int call_getsockname(SockLenType msghdr::*,
    16531665    socket_type s, socket_addr_type* addr, std::size_t* addrlen)
    16541666{
     1667#if defined(__OS2__)
     1668  int tmp_addrlen = (int)*addrlen;
     1669#else
    16551670  SockLenType tmp_addrlen = (SockLenType)*addrlen;
     1671#endif
    16561672  int result = ::getsockname(s, addr, &tmp_addrlen);
    16571673  *addrlen = (std::size_t)tmp_addrlen;
    16581674  return result;
     
    17481764    timeout->tv_usec = 1000;
    17491765#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
    17501766
     1767#if defined(__OS2__)
     1768  // The select() call allows timeout values measured in microseconds, but the
     1769  // system clock (as wrapped by boost::posix_time::microsec_clock) typically
     1770  // has a resolution of 10 milliseconds. This can lead to a spinning select
     1771  // reactor, meaning increased CPU usage, when waiting for the earliest
     1772  // scheduled timeout if it's less than 10 milliseconds away. To avoid a tight
     1773  // spin we'll use a minimum timeout of 1 millisecond.
     1774  if (timeout && timeout->tv_sec == 0
     1775      && timeout->tv_usec > 0 && timeout->tv_usec < 1000)
     1776    timeout->tv_usec = 1000;
     1777#endif
     1778
    17511779#if defined(__hpux) && defined(__SELECT)
    17521780  timespec ts;
    17531781  ts.tv_sec = timeout ? timeout->tv_sec : 0;
     
    17731801
    17741802#if defined(BOOST_ASIO_WINDOWS) \
    17751803  || defined(__CYGWIN__) \
     1804  || defined(__OS2__) \
    17761805  || defined(__SYMBIAN32__)
     1806#if defined(__OS2__)
     1807  fd_set fds;
     1808#else
    17771809  fd_set fds;
     1810#endif
    17781811  FD_ZERO(&fds);
    17791812  FD_SET(s, &fds);
    17801813  timeval zero_timeout;
     
    18141847
    18151848#if defined(BOOST_ASIO_WINDOWS) \
    18161849  || defined(__CYGWIN__) \
     1850  || defined(__OS2__) \
    18171851  || defined(__SYMBIAN32__)
    18181852  fd_set fds;
    18191853  FD_ZERO(&fds);
     
    18551889
    18561890#if defined(BOOST_ASIO_WINDOWS) \
    18571891  || defined(__CYGWIN__) \
     1892  || defined(__OS2__) \
    18581893  || defined(__SYMBIAN32__)
    18591894  fd_set write_fds;
    18601895  FD_ZERO(&write_fds);
     
    19862021        af, src, dest, static_cast<int>(length)), ec);
    19872022  if (result == 0 && !ec)
    19882023    ec = boost::asio::error::invalid_argument;
     2024#ifndef __OS2__
    19892025  if (result != 0 && af == BOOST_ASIO_OS_DEF(AF_INET6) && scope_id != 0)
    19902026  {
    19912027    using namespace std; // For strcat and sprintf.
     
    20002036      sprintf(if_name + 1, "%lu", scope_id);
    20012037    strcat(dest, if_name);
    20022038  }
     2039#endif
    20032040  return result;
    20042041#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
    20052042}
     
    22162253  int result = error_wrapper(::inet_pton(af, src, dest), ec);
    22172254  if (result <= 0 && !ec)
    22182255    ec = boost::asio::error::invalid_argument;
     2256#ifndef __OS2__
    22192257  if (result > 0 && af == BOOST_ASIO_OS_DEF(AF_INET6) && scope_id)
    22202258  {
    22212259    using namespace std; // For strchr and atoi.
     
    22332271        *scope_id = atoi(if_name + 1);
    22342272    }
    22352273  }
     2274#endif
    22362275  return result;
    22372276#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
    22382277}
     
    22822321#if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
    22832322
    22842323#if !defined(BOOST_ASIO_HAS_GETADDRINFO)
    2285 
    22862324// The following functions are only needed for emulation of getaddrinfo and
    22872325// getnameinfo.
    22882326
     
    23102348    hostent* result, char* buffer, int buflength, boost::system::error_code& ec)
    23112349{
    23122350  clear_last_error();
    2313 #if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
     2351#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) || defined(__OS2__)
    23142352  (void)(buffer);
    23152353  (void)(buflength);
    23162354  hostent* retval = error_wrapper(::gethostbyaddr(addr, length, af), ec);
     
    23532391    char* buffer, int buflength, int ai_flags, boost::system::error_code& ec)
    23542392{
    23552393  clear_last_error();
    2356 #if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
     2394#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) || defined(__OS2__)
    23572395  (void)(buffer);
    23582396  (void)(buflength);
    23592397  (void)(ai_flags);
  • boost/asio/detail/impl/socket_select_interrupter.ipp

    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
    old new  
    2121
    2222#if defined(BOOST_ASIO_WINDOWS) \
    2323  || defined(__CYGWIN__) \
     24  || defined(__OS2__) \
    2425  || defined(__SYMBIAN32__)
    2526
    2627#include <cstdlib>
  • boost/asio/detail/old_win_sdk_compat.hpp

    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
    old new  
    1717
    1818#include <boost/asio/detail/config.hpp>
    1919
    20 #if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
     20#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) || defined(__OS2__)
    2121
    2222// Guess whether we are building against on old Platform SDK.
    2323#if !defined(IN6ADDR_ANY_INIT)
     
    2525#endif // !defined(IN6ADDR_ANY_INIT)
    2626
    2727#if defined(BOOST_ASIO_HAS_OLD_WIN_SDK)
    28 
     28#if defined(__OS2__)
     29#define __int64 __int64_t
     30#endif
    2931// Emulation of types that are missing from old Platform SDKs.
    3032//
    3133// N.B. this emulation is also used if building for a Windows 2000 target with
  • boost/asio/detail/select_interrupter.hpp

    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
    old new  
    1919
    2020#if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
    2121
    22 #if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) || defined(__SYMBIAN32__)
     22#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) || defined(__SYMBIAN32__) || defined(__OS2__)
    2323# include <boost/asio/detail/socket_select_interrupter.hpp>
    2424#elif defined(BOOST_ASIO_HAS_EVENTFD)
    2525# include <boost/asio/detail/eventfd_select_interrupter.hpp>
     
    3131namespace asio {
    3232namespace detail {
    3333
    34 #if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) || defined(__SYMBIAN32__)
     34#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) || defined(__SYMBIAN32__) || defined(__OS2__)
    3535typedef socket_select_interrupter select_interrupter;
    3636#elif defined(BOOST_ASIO_HAS_EVENTFD)
    3737typedef eventfd_select_interrupter select_interrupter;
  • boost/asio/detail/socket_ops.hpp

    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
    old new  
    2424
    2525#include <boost/asio/detail/push_options.hpp>
    2626
     27#if defined(BOOST_HAS_THREADS) && defined(BOOST_HAS_PTHREADS)
     28#include <pthread.h>
     29#endif
     30
    2731namespace boost {
    2832namespace asio {
    2933namespace detail {
  • boost/asio/detail/socket_select_interrupter.hpp

    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
    old new  
    2121
    2222#if defined(BOOST_ASIO_WINDOWS) \
    2323  || defined(__CYGWIN__) \
    24   || defined(__SYMBIAN32__)
     24  || defined(__SYMBIAN32__) \
     25  || defined(__OS2__)
    2526
    2627#include <boost/asio/detail/socket_types.hpp>
    2728
  • 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
    old new  
    8282# endif
    8383#endif
    8484
     85#if defined(__OS2__)
     86#include <boost/asio/detail/old_win_sdk_compat.hpp>
     87#endif
    8588#include <boost/asio/detail/push_options.hpp>
    8689
    8790namespace boost {
     
    279282const int invalid_socket = -1;
    280283const int socket_error_retval = -1;
    281284const int max_addr_v4_str_len = INET_ADDRSTRLEN;
     285#if defined(__OS2__)
     286#define SHUT_RD 0
     287#define SHUT_WR 1
     288#define SHUT_RDWR 2
     289# if defined(BOOST_ASIO_HAS_OLD_WIN_SDK)
     290typedef in6_addr_emulation in6_addr_type;
     291typedef ipv6_mreq_emulation in6_mreq_type;
     292typedef sockaddr_in6_emulation sockaddr_in6_type;
     293typedef sockaddr_storage_emulation sockaddr_storage_type;
     294typedef addrinfo_emulation addrinfo_type;
     295# endif
     296#endif
    282297#if defined(INET6_ADDRSTRLEN)
    283298const int max_addr_v6_str_len = INET6_ADDRSTRLEN + 1 + IF_NAMESIZE;
    284299#else // defined(INET6_ADDRSTRLEN)
     
    297312typedef ip_mreq in4_mreq_type;
    298313# endif
    299314typedef sockaddr_in sockaddr_in4_type;
     315#if !defined(__OS2__)
    300316typedef in6_addr in6_addr_type;
    301317typedef ipv6_mreq in6_mreq_type;
    302318typedef sockaddr_in6 sockaddr_in6_type;
    303319typedef sockaddr_storage sockaddr_storage_type;
     320#endif
    304321typedef sockaddr_un sockaddr_un_type;
     322#if !defined(__OS2__)
    305323typedef addrinfo addrinfo_type;
     324#endif
    306325typedef ::linger linger_type;
    307326typedef int ioctl_arg_type;
    308327typedef uint32_t u_long_type;
  • boost/asio/impl/serial_port_base.ipp

    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
    old new  
    250250  {
    251251  case none:
    252252    storage.c_iflag &= ~(IXOFF | IXON);
    253 # if defined(_BSD_SOURCE)
     253# if defined(_BSD_SOURCE) && !defined(__OS2__)
    254254    storage.c_cflag &= ~CRTSCTS;
    255255# elif defined(__QNXNTO__)
    256256    storage.c_cflag &= ~(IHFLOW | OHFLOW);
     
    258258    break;
    259259  case software:
    260260    storage.c_iflag |= IXOFF | IXON;
    261 # if defined(_BSD_SOURCE)
     261# if defined(_BSD_SOURCE) && !defined(__OS2__)
    262262    storage.c_cflag &= ~CRTSCTS;
    263263# elif defined(__QNXNTO__)
    264264    storage.c_cflag &= ~(IHFLOW | OHFLOW);
     
    267267  case hardware:
    268268# if defined(_BSD_SOURCE)
    269269    storage.c_iflag &= ~(IXOFF | IXON);
     270#if !defined(__OS2__)
    270271    storage.c_cflag |= CRTSCTS;
     272#endif
    271273    break;
    272274# elif defined(__QNXNTO__)
    273275    storage.c_iflag &= ~(IXOFF | IXON);
     
    306308  {
    307309    value_ = software;
    308310  }
    309 # if defined(_BSD_SOURCE)
     311# if defined(_BSD_SOURCE) && !defined(__OS2__)
    310312  else if (storage.c_cflag & CRTSCTS)
    311313  {
    312314    value_ = hardware;
  • boost/chrono/detail/inlined/posix/thread_clock.hpp

    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
    old new  
    3333        pthread_t pth=pthread_self();
    3434        // get the clock_id associated to the current thread
    3535        clockid_t clock_id;
     36#ifndef __OS2__
    3637        pthread_getcpuclockid(pth, &clock_id);
     38#endif
    3739        // get the timespec associated to the thread clock
    3840        if ( ::clock_gettime( clock_id, &ts ) )
    3941#endif
     
    5961        pthread_t pth=pthread_self();
    6062        // get the clock_id associated to the current thread
    6163        clockid_t clock_id;
     64#ifndef __OS2__
    6265        pthread_getcpuclockid(pth, &clock_id);
     66#endif
    6367        // get the timespec associated to the thread clock
    6468        if ( ::clock_gettime( clock_id, &ts ) )
    6569#endif
  • boost/chrono/system_clocks.hpp

    diff -ur boost_1_57_0-o/boost/chrono/system_clocks.hpp boost_1_57_0/boost/chrono/system_clocks.hpp
    old new  
    6767#include <ctime>
    6868
    6969# if defined( BOOST_CHRONO_POSIX_API )
    70 #   if ! defined(CLOCK_REALTIME) && ! defined (__hpux__)
     70#   if ! defined(CLOCK_REALTIME) && ! defined (__hpux__) && !defined(__OS2__)
    7171#     error <time.h> does not supply CLOCK_REALTIME
    7272#   endif
    7373# endif
  • boost/config/select_platform_config.hpp

    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
    old new  
    4545// BeOS
    4646#  define BOOST_PLATFORM_CONFIG "boost/config/platform/beos.hpp"
    4747
     48#elif defined(__OS2__)
     49// BeOS
     50#  define BOOST_PLATFORM_CONFIG "boost/config/platform/os2.hpp"
     51
    4852#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
    4953// MacOS
    5054#  define BOOST_PLATFORM_CONFIG "boost/config/platform/macos.hpp"
     
    113117#  include "boost/config/platform/cygwin.hpp"
    114118#  include "boost/config/platform/win32.hpp"
    115119#  include "boost/config/platform/beos.hpp"
     120#  include "boost/config/platform/os2.hpp"
    116121#  include "boost/config/platform/macos.hpp"
    117122#  include "boost/config/platform/aix.hpp"
    118123#  include "boost/config/platform/amigaos.hpp"
  • boost/config/stdlib/libstdcpp3.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
    old new  
    1717#define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCPP__)
    1818#endif
    1919
    20 #if !defined(_GLIBCPP_USE_WCHAR_T) && !defined(_GLIBCXX_USE_WCHAR_T)
     20#if !defined(_GLIBCPP_USE_WCHAR_T) && !defined(_GLIBCXX_USE_WCHAR_T) && !defined(__OS2__)
    2121#  define BOOST_NO_CWCHAR
    2222#  define BOOST_NO_CWCTYPE
    2323#  define BOOST_NO_STD_WSTRING
     
    3636        || defined(_GLIBCXX__PTHREADS) \
    3737        || defined(_GLIBCXX_HAS_GTHREADS) \
    3838        || defined(_WIN32) \
     39        || defined(__OS2__) \
    3940        || defined(_AIX)
    4041      //
    4142      // If the std lib has thread support turned on, then turn it on in Boost
  • boost/config/suffix.hpp

    diff -ur boost_1_57_0-o/boost/config/suffix.hpp boost_1_57_0/boost/config/suffix.hpp
    old new  
    247247// from here then add to the appropriate compiler section):
    248248//
    249249#if (defined(__MT__) || defined(_MT) || defined(_REENTRANT) \
    250     || defined(_PTHREADS) || defined(__APPLE__) || defined(__DragonFly__)) \
     250    || defined(_PTHREADS) || defined(__APPLE__) || defined(__DragonFly__) || defined(__OS2__))\
    251251    && !defined(BOOST_HAS_THREADS)
    252252#  define BOOST_HAS_THREADS
    253253#endif
  • boost/filesystem/config.hpp

    diff -ur boost_1_57_0-o/boost/filesystem/config.hpp boost_1_57_0/boost/filesystem/config.hpp
    old new  
    4545
    4646#define BOOST_FILESYSTEM_THROW(EX) throw EX
    4747
    48 # if defined( BOOST_NO_STD_WSTRING )
     48# if defined( BOOST_NO_STD_WSTRING ) && !defined(__OS2__)
    4949#   error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
    5050# endif
    5151
  • boost/filesystem/convenience.hpp

    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
    old new  
    1515
    1616#include <boost/config.hpp>
    1717
    18 # if defined( BOOST_NO_STD_WSTRING )
     18# if defined( BOOST_NO_STD_WSTRING ) && !defined(__OS2__)
    1919#   error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
    2020# endif
    2121
  • boost/filesystem/fstream.hpp

    diff -ur boost_1_57_0-o/boost/filesystem/fstream.hpp boost_1_57_0/boost/filesystem/fstream.hpp
    old new  
    1414
    1515#include <boost/config.hpp>
    1616
    17 # if defined( BOOST_NO_STD_WSTRING )
     17# if defined( BOOST_NO_STD_WSTRING ) && !defined(__OS2__)
    1818#   error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
    1919# endif
    2020
  • boost/filesystem/operations.hpp

    diff -ur boost_1_57_0-o/boost/filesystem/operations.hpp boost_1_57_0/boost/filesystem/operations.hpp
    old new  
    1717
    1818#include <boost/config.hpp>
    1919
    20 # if defined( BOOST_NO_STD_WSTRING )
     20# if defined( BOOST_NO_STD_WSTRING ) && !defined(__OS2__)
    2121#   error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
    2222# endif
    2323
  • boost/filesystem/path_traits.hpp

    diff -ur boost_1_57_0-o/boost/filesystem/path_traits.hpp boost_1_57_0/boost/filesystem/path_traits.hpp
    old new  
    1212
    1313#include <boost/config.hpp>
    1414
    15 # if defined( BOOST_NO_STD_WSTRING )
     15# if defined( BOOST_NO_STD_WSTRING ) && !defined(__OS2__)
    1616#   error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
    1717# endif
    1818
  • boost/filesystem/path.hpp

    diff -ur boost_1_57_0-o/boost/filesystem/path.hpp boost_1_57_0/boost/filesystem/path.hpp
    old new  
    1717
    1818#include <boost/config.hpp>
    1919
    20 # if defined( BOOST_NO_STD_WSTRING )
     20# if defined( BOOST_NO_STD_WSTRING ) && !defined(__OS2__)
    2121#   error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
    2222# endif
    2323
  • boost/integer_traits.hpp

    diff -ur boost_1_57_0-o/boost/integer_traits.hpp boost_1_57_0/boost/integer_traits.hpp
    old new  
    2323#include <limits.h>
    2424// we need wchar.h for WCHAR_MAX/MIN but not all platforms provide it,
    2525// and some may have <wchar.h> but not <cwchar> ...
    26 #if !defined(BOOST_NO_INTRINSIC_WCHAR_T) && (!defined(BOOST_NO_CWCHAR) || defined(sun) || defined(__sun) || defined(__QNX__))
     26#if !defined(BOOST_NO_INTRINSIC_WCHAR_T) && (!defined(BOOST_NO_CWCHAR) || defined(sun) || defined(__sun) || defined(__QNX__) || defined(__OS2__))
    2727#include <wchar.h>
    2828#endif
    2929
  • boost/lexical_cast/detail/converter_lexical_streams.hpp

    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
    old new  
    316316#endif
    317317
    318318
    319 #if !defined(BOOST_LCAST_NO_WCHAR_T) && !defined(BOOST_NO_SWPRINTF) && !defined(__MINGW32__)
     319#if !defined(BOOST_LCAST_NO_WCHAR_T) && !defined(BOOST_NO_SWPRINTF) && !defined(__MINGW32__) && !defined(__OS2__)
    320320            bool shl_real_type(float val, wchar_t* begin) {
    321321                using namespace std;
    322322                const double val_as_double = val;
  • boost/smart_ptr/detail/sp_has_sync.hpp

    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
    old new  
    3838#undef BOOST_SP_HAS_SYNC
    3939#endif
    4040
     41#if defined( __OS2__ )
     42#undef BOOST_SP_HAS_SYNC
     43#endif
     44
    4145#if defined( __hppa ) || defined( __hppa__ )
    4246#undef BOOST_SP_HAS_SYNC
    4347#endif
  • boost/smart_ptr/detail/yield_k.hpp

    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
    old new  
    9898
    9999#elif defined( BOOST_HAS_PTHREADS )
    100100
     101#ifndef __OS2__
    101102#ifndef _AIX
    102103#include <sched.h>
    103104#else
    104105   // AIX's sched.h defines ::var which sometimes conflicts with Lambda's var
    105106       extern "C" int sched_yield(void);
    106107#endif
    107 
     108#endif
    108109#include <time.h>
    109110
    110111namespace boost
     
    126127#endif
    127128    else if( k < 32 || k & 1 )
    128129    {
     130#ifndef __OS2__
    129131        sched_yield();
     132#endif
    130133    }
    131134    else
    132135    {
  • boost/thread/pthread/timespec.hpp

    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
    old new  
    2020#include <boost/chrono/duration.hpp>
    2121#endif
    2222
    23 #if defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
     23#if defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) || defined(__OS2__)
    2424#     define BOOST_THREAD_TIMESPEC_MAC_API
    2525#include <sys/time.h> //for gettimeofday and timeval
    2626#else
  • boost/token_functions.hpp

    diff -ur boost_1_57_0-o/boost/token_functions.hpp boost_1_57_0/boost/token_functions.hpp
    old new  
    6767namespace std{
    6868 using ::ispunct;
    6969 using ::isspace;
    70 #if !defined(BOOST_NO_CWCTYPE)
     70#if !defined(BOOST_NO_CWCTYPE) && !defined(__OS2__)
    7171 using ::iswpunct;
    7272 using ::iswspace;
    7373#endif
     
    210210  // implementations, argument types are not a problem since both forms of character classifiers
    211211  // expect an int.
    212212
    213 #if !defined(BOOST_NO_CWCTYPE)
     213#if !defined(BOOST_NO_CWCTYPE) && !defined(__OS2__)
    214214  template<typename traits, int N>
    215215  struct traits_extension_details : public traits {
    216216    typedef typename traits::char_type char_type;
  • boost/wave/token_ids.hpp

    diff -ur boost_1_57_0-o/boost/wave/token_ids.hpp boost_1_57_0/boost/wave/token_ids.hpp
    old new  
    2727#if !defined(BOOST_WAVE_TOKEN_IDS_DEFINED)
    2828#define BOOST_WAVE_TOKEN_IDS_DEFINED
    2929
    30 #if (defined (__FreeBSD__) || defined (__DragonFly__) || defined (__OpenBSD__)) && defined (T_DIVIDE)
     30#if (defined (__FreeBSD__) || defined (__DragonFly__) || defined(__OS2__) || defined (__OpenBSD__)) && defined (T_DIVIDE)
    3131#undef T_DIVIDE
    3232#endif
    3333
  • bootstrap.sh

    Only in boost_1_57_0: bootstrap.log
    diff -ur boost_1_57_0-o/bootstrap.sh boost_1_57_0/bootstrap.sh
    old new  
    2626flag_icu=
    2727flag_show_libraries=
    2828
     29# Check that the OS name, as returned by "uname", is as given.
     30test_uname ()
     31{
     32    test `uname` = $*
     33}
     34
    2935for option
    3036do
    3137    case $option in
     
    226232  arch=`cd $my_dir/tools/build/src/engine && ./bootstrap/jam0 -d0 -f build.jam --toolset=$TOOLSET --toolset-root= --show-locate-target && cd ..`
    227233  BJAM="$my_dir/tools/build/src/engine/$arch/b2"
    228234  echo "tools/build/src/engine/$arch/b2"
     235  if test_uname OS/2 ; then
     236  cp "$BJAM.exe" .
     237  else
    229238  cp "$BJAM" .
     239  fi
    230240  cp "$my_dir/tools/build/src/engine/$arch/bjam" .
    231241
    232242fi
  • libs/container/src/dlmalloc_2_8_6.c

    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
    old new  
    565565#endif /*MMAP_CLEARS */
    566566#endif  /* WIN32 */
    567567
     568#ifdef __OS2__
     569#define LACKS_SCHED_H
     570#endif
     571
    568572#if defined(DARWIN) || defined(_DARWIN)
    569573/* Mac OSX docs advise not to use sbrk; it seems better to use mmap */
    570574#ifndef HAVE_MORECORE
  • libs/filesystem/src/path.cpp

    diff -ur boost_1_57_0-o/libs/filesystem/src/path.cpp boost_1_57_0/libs/filesystem/src/path.cpp
    old new  
    1010//  Old standard library configurations, particularly MingGW, don't support wide strings.
    1111//  Report this with an explicit error message.
    1212#include <boost/config.hpp>
    13 # if defined( BOOST_NO_STD_WSTRING )
     13# if defined( BOOST_NO_STD_WSTRING ) && !defined(__OS2__)
    1414#   error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
    1515# endif
    1616
  • libs/filesystem/test/convenience_test.cpp

    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
    old new  
    2121#include <boost/filesystem/convenience.hpp>
    2222
    2323#include <boost/config.hpp>
    24 # if defined( BOOST_NO_STD_WSTRING )
     24# if defined( BOOST_NO_STD_WSTRING ) && !defined(__OS2__)
    2525#   error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
    2626# endif
    2727
  • libs/filesystem/test/deprecated_test.cpp

    diff -ur boost_1_57_0-o/libs/filesystem/test/deprecated_test.cpp boost_1_57_0/libs/filesystem/test/deprecated_test.cpp
    old new  
    1616#include <boost/filesystem.hpp>
    1717
    1818#include <boost/config.hpp>
    19 # if defined( BOOST_NO_STD_WSTRING )
     19# if defined( BOOST_NO_STD_WSTRING ) && !defined(__OS2__)
    2020#   error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
    2121# endif
    2222
  • libs/filesystem/test/fstream_test.cpp

    diff -ur boost_1_57_0-o/libs/filesystem/test/fstream_test.cpp boost_1_57_0/libs/filesystem/test/fstream_test.cpp
    old new  
    2020#include <boost/filesystem/fstream.hpp>
    2121
    2222#include <boost/config.hpp>
    23 # if defined( BOOST_NO_STD_WSTRING )
     23# if defined( BOOST_NO_STD_WSTRING ) && !defined(__OS2__)
    2424#   error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
    2525# endif
    2626
  • libs/filesystem/test/issues/recurse_dir_iter_5403.cpp

    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
    old new  
    2020#include <boost/filesystem/operations.hpp>
    2121
    2222#include <boost/config.hpp>
    23 # if defined( BOOST_NO_STD_WSTRING )
     23# if defined( BOOST_NO_STD_WSTRING ) && !defined(__OS2__)
    2424#   error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
    2525# endif
    2626
  • tools/build/src/build/type.jam

    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
    old new  
    354354#
    355355rule type ( filename )
    356356{
    357     if [ os.name ] in NT CYGWIN
     357    if [ os.name ] in NT CYGWIN OS2
    358358    {
    359359        filename = $(filename:L) ;
    360360    }
  • tools/build/src/build-system.jam

    diff -ur boost_1_57_0-o/tools/build/src/build-system.jam boost_1_57_0/tools/build/src/build-system.jam
    old new  
    334334
    335335    local user-path = [ os.home-directories ] [ os.environ BOOST_BUILD_PATH ] ;
    336336    local site-path = /etc $(user-path) ;
    337     if [ os.name ] in NT CYGWIN
     337    if [ os.name ] in NT CYGWIN OS2
    338338    {
    339339        site-path = [ modules.peek : SystemRoot ] $(user-path) ;
    340340    }
  • tools/build/src/engine/build.jam

    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
    old new  
    572572if $(OS) = NT { actions piecemeal together existing [DELETE] {
    573573    del /F /Q "$(>)"
    574574} }
     575if $(OS) = OS2 { actions piecemeal together existing [DELETE] {
     576    rm -f "$(>)"
     577} }
    575578if $(UNIX) = true { actions piecemeal together existing [DELETE] {
    576579    rm -f "$(>)"
    577580} }
     
    591594if $(OS) = NT { actions [MKDIR] {
    592595    md "$(<)"
    593596} }
     597if $(OS2) = true { actions [MKDIR] {
     598    md "$(<)"
     599} }
    594600if $(UNIX) = true { actions [MKDIR] {
    595601    mkdir "$(<)"
    596602} }
  • tools/build/src/engine/build.sh

    diff -ur boost_1_57_0-o/tools/build/src/engine/build.sh boost_1_57_0/tools/build/src/engine/build.sh
    old new  
    130130    ;;
    131131
    132132    gcc)
     133    if test_uname OS/2 ; then
     134    BOOST_JAM_OPT_JAM="-Zomf $BOOST_JAM_OPT_JAM -D__OS2__ -D__EMX__"
     135    fi
    133136    BOOST_JAM_CC=gcc
    134137    ;;
    135138
     
    258261    ;;
    259262
    260263    *)
     264#    if test_uname OS/2 ; then
     265#    BJAM_SOURCES="${BJAM_SOURCES} execos2.c fileunix.c pathunix.c"
     266#    else
    261267    BJAM_SOURCES="${BJAM_SOURCES} execunix.c fileunix.c pathunix.c"
     268#    fi
    262269    ;;
    263270esac
    264271
  • tools/build/src/engine/builtins.c

    diff -ur boost_1_57_0-o/tools/build/src/engine/builtins.c boost_1_57_0/tools/build/src/engine/builtins.c
    old new  
    726726    globbing.patterns = r;
    727727
    728728    globbing.case_insensitive =
    729 # if defined( OS_NT ) || defined( OS_CYGWIN )
     729# if defined( OS_NT ) || defined( OS_CYGWIN ) || defined( OS_OS2 )
    730730       l;  /* Always case-insensitive if any files can be found. */
    731731# else
    732732       lol_get( frame->args, 2 );
     
    774774    globbing.patterns = plist;
    775775
    776776    globbing.case_insensitive
    777 # if defined( OS_NT ) || defined( OS_CYGWIN )
     777# if defined( OS_NT ) || defined( OS_CYGWIN ) || defined( OS_OS2 )
    778778       = plist;  /* always case-insensitive if any files can be found */
    779779# else
    780780       = L0;
  • tools/build/src/engine/execunix.c

    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
    old new  
    2121#include <sys/times.h>
    2222#include <sys/wait.h>
    2323
     24#ifdef __OS2__
     25#include <sys/socket.h>
     26#endif
     27
    2428#if defined(sun) || defined(__sun)
    2529    #include <wait.h>
    2630#endif
    2731
    2832#ifdef USE_EXECUNIX
    29 
    3033#include <sys/times.h>
    3134
    3235#if defined(__APPLE__)
     
    169172    }
    170173
    171174    /* Create pipes for collecting child output. */
     175#ifndef __OS2__
    172176    if ( pipe( out ) < 0 || ( globs.pipe_action && pipe( err ) < 0 ) )
     177#else
     178    if ( socketpair(AF_UNIX, SOCK_STREAM,0,  out ) < 0 || ( globs.pipe_action && pipe( err ) < 0 ) )
     179#endif
    173180    {
    174181        perror( "pipe" );
    175182        exit( EXITBAD );
  • tools/build/src/engine/jam.h

    diff -ur boost_1_57_0-o/tools/build/src/engine/jam.h boost_1_57_0/tools/build/src/engine/jam.h
    old new  
    9898
    9999
    100100/*
     101 * OS2
     102 */
     103
     104#ifdef __OS2__
     105
     106#include <fcntl.h>
     107#include <stdlib.h>
     108#include <stdio.h>
     109#include <ctype.h>
     110#include <malloc.h>
     111#include <signal.h>
     112#include <string.h>
     113#include <time.h>
     114
     115#define OSMAJOR "OS2=true"
     116#define OSMINOR "OS=OS2"
     117#define OS_OS2
     118#define SPLITPATH ';'
     119#define MAXLINE 996    /* longest 'together' actions */
     120/*#define USE_EXECOS2*/
     121#define USE_EXECUNIX
     122#define USE_PATHUNIX
     123#define PATH_DELIM '\\'
     124#define DOWNSHIFT_PATHS
     125
     126#define NO_VFORK
     127
     128#ifdef __EMX__
     129    #define USE_FILEUNIX
     130#endif
     131
     132#endif
     133
     134/*
    101135 * God fearing UNIX.
    102136 */
    103137
  • tools/build/src/engine/pathunix.c

    diff -ur boost_1_57_0-o/tools/build/src/engine/pathunix.c boost_1_57_0/tools/build/src/engine/pathunix.c
    old new  
    2222#include <unistd.h>  /* needed for getpid() */
    2323
    2424
     25#ifdef OS_OS2
     26char* short_path_to_long_path(char* short_path)  /* converts any "/" to "\" */
     27{
     28
     29    int i = 0;
     30    int len = 0;
     31    len = strlen(short_path);
     32    for (i=0;i<len;++i) {
     33        if (short_path[i] == '/')
     34           short_path[i] = '\\';
     35    }
     36    return short_path;
     37}
     38#endif
     39
    2540/*
    2641 * path_get_process_id_()
    2742 */
     
    3954void path_get_temp_path_( string * buffer )
    4055{
    4156    char const * t = getenv( "TMPDIR" );
     57#ifdef OS_OS2
     58        if (!t)
     59        {
     60           const char * t = getenv("TEMP");
     61        }
     62#endif
    4263    string_append( buffer, t ? t : "/tmp" );
    4364}
    4465
  • tools/build/src/tools/builtin.jam

    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
    old new  
    4141
    4242
    4343.os-names = aix android bsd cygwin darwin freebsd hpux iphone linux netbsd openbsd osf
    44     qnx qnxnto sgi solaris unix unixware windows
     44    qnx qnxnto sgi solaris unix unixware windows os2
    4545    elf  # Not actually an OS -- used for targeting bare metal where object
    4646         # format is ELF.  This catches both -elf and -eabi gcc targets and well
    4747         # as other compilers targeting ELF. It is not clear how often we need
  • tools/build/src/tools/common.jam

    diff -ur boost_1_57_0-o/tools/build/src/tools/common.jam boost_1_57_0/tools/build/src/tools/common.jam
    old new  
    383383            # Only NT will run .bat & .cmd files by their unqualified names.
    384384            || ( ( [ os.name ] = NT ) && ( [ path.exists $(command).bat ] ||
    385385                [ path.exists $(command).cmd ] ) )
     386            || ( ( [ os.name ] = OS2 ) && ( [ path.exists $(command).bat ] ||
     387                [ path.exists $(command).cmd ] || [ path.exists $(command).exe ] ) )
     388
    386389        {
    387390            return $(command) ;
    388391        }
     
    521524#
    522525rule variable-setting-command ( variable : value )
    523526{
    524     if [ os.name ] = NT
     527    if [ os.name ] = NT || [ os.name ] = OS2
    525528    {
    526529        return "set $(variable)=$(value)$(nl)" ;
    527530    }
     
    629632        # recurse until root.
    630633
    631634        local s = $(<:P) ;
    632         if [ os.name ] = NT
     635        if [ os.name ] = NT || [ os.name ] = OS2
    633636        {
    634637            switch $(s)
    635638            {
     
    664667# up to the same filesystem target and triggers their build action only once.
    665668#                                             (todo) (04.07.2008.) (Jurko)
    666669
    667 if [ os.name ] = NT
     670if [ os.name ] = NT || [ os.name ] = OS2
    668671{
    669672    actions mkdir
    670673    {
  • tools/build/src/tools/gcc.jam

    diff -ur boost_1_57_0-o/tools/build/src/tools/gcc.jam boost_1_57_0/tools/build/src/tools/gcc.jam
    old new  
    4747type.set-generated-target-suffix OBJ : <toolset>gcc : o ;
    4848type.set-generated-target-suffix OBJ : <toolset>gcc <target-os>windows : o ;
    4949type.set-generated-target-suffix OBJ : <toolset>gcc <target-os>cygwin : o ;
     50type.set-generated-target-suffix OBJ : <toolset>gcc <target-os>os2 : o ;
    5051
    5152
    5253# Initializes the gcc toolset for the given version. If necessary, command may
     
    201202            case HPUX    : linker = hpux ;
    202203            case AIX     : linker = aix ;
    203204            case SOLARIS : linker = sun ;
     205            case OS2     : linker = os2 ;
    204206            case *       : linker = gnu ;
    205207        }
    206208    }
     
    412414
    413415        # On Windows, fPIC is the default, and specifying -fPIC explicitly leads
    414416        # to a warning.
    415         if ! $(target) in cygwin windows
     417        if ! $(target) in cygwin windows os2
    416418        {
    417419            OPTIONS on $(targets) += -fPIC ;
    418420        }
     
    471473
    472474
    473475# FIXME: this should not use os.name.
    474 if ! [ os.name ] in NT OSF HPUX AIX
     476if ! [ os.name ] in NT OSF HPUX AIX OS2
    475477{
    476478    # OSF does have an option called -soname but it does not seem to work as
    477479    # expected, therefore it has been disabled.
     
    802804        toolset.flags $(toolset).link OPTIONS : -Wl,-brtl -Wl,-bnoipath -Wl,-bbigtoc
    803805            : unchecked ;
    804806
     807    case os2 :
     808        {
     809        # on os2 we use native linker
     810        toolset.flags $(toolset).link OPTIONS : -Zomf : unchecked ;
     811        toolset.flags $(toolset).link.dll OPTIONS : -Zdll -Zomf : unchecked ;
     812        }
     813
    805814    case darwin :
    806815        # On Darwin, the -s option to ld does not work unless we pass -static,
    807816        # and passing -static unconditionally is a bad idea. So, do not pass -s
     
    10371046            case *bsd    : option = -pthread ;  # There is no -lrt on BSD.
    10381047            case sgi     : # gcc on IRIX does not support multi-threading.
    10391048            case darwin  : # No threading options.
     1049            case os2     : # not available right now
    10401050            case *       : option = -pthread ; libs = rt ;
    10411051        }
    10421052
  • tools/build/src/tools/python.jam

    diff -ur boost_1_57_0-o/tools/build/src/tools/python.jam boost_1_57_0/tools/build/src/tools/python.jam
    old new  
    324324    {
    325325        path = [ cygwin-to-windows-path $(path) ] ;
    326326    }
     327    else if [ os.name ] = OS2
     328    {
     329        return path.native $(path) ;
     330    }
    327331    return $(path) ;
    328332}
    329333
     
    506510{
    507511    exec-prefix ?= $(prefix) ;
    508512
    509     if $(target-os) = windows
     513    if $(target-os) = windows || $(target-os) = OS2
    510514    {
    511515        # The exec_prefix is where you're supposed to look for machine-specific
    512516        # libraries.
     
    587591        # Search relative to the prefix, or if none supplied, in PATH.
    588592        local unversioned = $(:E=python:R=$(bin-path:E=)) ;
    589593
     594    if $(target-os) = os2
     595    {
     596        return $(:E=python:R=$(prefix)) $(unversioned) $(unversioned)$(version) ;
     597    }
     598    else
     599    {
    590600        # If a version was specified, look for a python with that specific
    591601        # version appended before looking for one called, simply, "python"
    592602        return $(unversioned)$(version) $(unversioned) ;
    593603    }
     604    }
    594605}
    595606
    596607
     
    639650        case qnx* : return ;
    640651        case darwin : return ;
    641652        case windows : return ;
     653        case os2 : return ;
    642654
    643655        case hpux : return  <library>rt ;
    644656        case *bsd : return  <library>pthread <toolset>gcc:<library>util ;
     
    874886    local dll-path = $(libraries) ;
    875887
    876888    # Make sure that we can find the Python DLL on Windows.
    877     if ( $(target-os) = windows ) && $(exec-prefix)
     889    if ( $(target-os) = windows || $(target-os) = os2 ) && $(exec-prefix)
    878890    {
    879891        dll-path += $(exec-prefix) ;
    880892    }
  • tools/build/src/tools/symlink.jam

    diff -ur boost_1_57_0-o/tools/build/src/tools/symlink.jam boost_1_57_0/tools/build/src/tools/symlink.jam
    old new  
    137137    copy "$(>)" "$(<)" $(NULL_OUT)
    138138}
    139139
     140actions ln-OS2
     141{
     142    copy "$(>)" "$(<)" $(NULL_OUT)
     143}
     144
    140145IMPORT $(__name__) : symlink : : symlink ;
  • tools/build/src/tools/types/exe.jam

    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
    old new  
    77type.register EXE ;
    88type.set-generated-target-suffix EXE : <target-os>windows : "exe" ;
    99type.set-generated-target-suffix EXE : <target-os>cygwin : "exe" ;
     10type.set-generated-target-suffix EXE : <target-os>os2 : "exe" ;
  • tools/build/src/tools/types/lib.jam

    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
    old new  
    3434
    3535# The 'lib' prefix is used everywhere
    3636type.set-generated-target-prefix STATIC_LIB : : lib ;
     37type.set-generated-target-prefix STATIC_LIB : <target-os>os2 : "" ;
    3738
    3839# Use '.lib' suffix for windows
    3940type.set-generated-target-suffix STATIC_LIB : <target-os>windows : lib ;
     41type.set-generated-target-suffix STATIC_LIB : <target-os>os2    : a ;
    4042
    4143# Except with gcc.
    4244type.set-generated-target-suffix STATIC_LIB : <toolset>gcc <target-os>windows : a ;
     
    6668type.set-generated-target-suffix SHARED_LIB : <target-os>windows : dll ;
    6769type.set-generated-target-suffix SHARED_LIB : <target-os>cygwin : dll ;
    6870type.set-generated-target-suffix SHARED_LIB : <target-os>darwin : dylib ;
     71type.set-generated-target-suffix SHARED_LIB : <target-os>os2    : dll ;
    6972
    7073type SEARCHED_LIB : : LIB ;
    7174# This is needed so that when we create a target of SEARCHED_LIB
  • tools/build/src/tools/types/register.jam

    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
    old new  
    2121}
    2222
    2323.this-module's-file = [ modules.binding $(__name__) ] ;
     24if ! [os.name] = OS2
     25{
    2426.this-module's-dir = [ path.parent $(.this-module's-file) ] ;
     27}
     28# on os2 we need to normalize the path also.
     29else
     30{
     31.this-module's-dir = [ path.make $(.this-module's-file) ] ;
     32.this-module's-dir = [ path.parent $(.this-module's-dir) ] ;
     33}
     34
    2535.sibling-jamfiles =  [ path.glob $(.this-module's-dir) : *.jam ] ;
    2636.sibling-modules = [ MATCH ^(.*)\.jam$ : $(.sibling-jamfiles) ] ;
    2737
  • tools/build/src/util/os.jam

    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
    old new  
    6868.expand-variable-prefix-NT = % ;
    6969.expand-variable-suffix-NT = % ;
    7070.executable-suffix-NT = .exe ;
     71.executable-suffix-OS2 = .exe ;
     72.path-separator-OS2 = ";" ;
     73.expand-variable-prefix-OS2 = % ;
     74.expand-variable-suffix-OS2 = % ;
    7175
    7276.shared-library-path-variable-CYGWIN = PATH ;
    7377
  • tools/build/src/util/path.jam

    diff -ur boost_1_57_0-o/tools/build/src/util/path.jam boost_1_57_0/tools/build/src/util/path.jam
    old new  
    502502}
    503503
    504504
     505rule make-OS2 ( native )
     506{
     507    local result ;
     508
     509        result = [ NORMALIZE_PATH $(native) ] ;
     510
     511    # We need to add an extra '/' in front in case this is a rooted Windows path
     512    # starting with a drive letter and not a path separator character since the
     513    # builtin NORMALIZE_PATH rule has no knowledge of this leading drive letter
     514    # and treats it as a regular folder name.
     515    if [ regex.match "(^.:)" : $(native) ]
     516    {
     517        result = /$(result) ;
     518    }
     519
     520    return $(result) ;
     521}
     522
     523
     524rule native-OS2 ( path )
     525{
     526    local result ;
     527    if [ is-rooted $(path) ] && ! [ regex.match "^/(.:)" : $(path) ]
     528    {
     529        result = $(path) ;
     530    }
     531    else
     532    {
     533        result = [ MATCH "^/?(.*)" : $(path) ] ;
     534    }
     535    result = [ sequence.join [ regex.split $(result) "/" ] : "\\" ] ;
     536    return $(result) ;
     537}
     538
    505539rule make-UNIX ( native )
    506540{
    507541    # VP: I have no idea now 'native' can be empty here! But it can!