Boost logo

Boost Users :

From: John Maddock (john_at_[hidden])
Date: 2005-01-31 12:05:37


>>I want to use boost on HP-UX together with gcc-3.3.2. As I figured out
>>that thread-support is disabled (BOOST_DISABLE_THREADS is defined in file
>>boost/config/platform/hpux.hpp). Up gcc-3.3 posix-threads are supported on
>>HP-UX-plattform
>>(http://gcc.gnu.org/install/specific.html#hppa*-hp-hpux11). Is it then
>>save to remove #define BOOST_DISABLE_THREADS in
>>boost/config/platform/hpux.hpp?
>>with best regards,
>>Oliver
>>
>>
> You have to remove
>
> #define BOOST_DISABLE_THREADS
>
> and insert:
>
> # define BOOST_HAS_THREADS
> # define BOOST_HAS_PTHREADS

Thanks for the info, the patches below are going into cvs now, one thing to
note: you must have built the compiler with --enable-threads, otherwise
Boost threading support will still be forced off (if the std lib isn't
thread safe, neither will Boost be whatever you do), but of course you knew
that anyway :-)

John.

Index: platform/hpux.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/config/platform/hpux.hpp,v
retrieving revision 1.13
diff -r1.13 hpux.hpp
24,26c24,32
< #ifdef __GNUC__
< // GNU C on HP-UX does not support threads (checked up to gcc 3.3)
< # define BOOST_DISABLE_THREADS

---
> #if defined(__GNUC__)
> #  if (__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ < 3))
>       // GNU C on HP-UX does not support threads (checked up to gcc 3.3)
> #     define BOOST_DISABLE_THREADS
> #  elif !defined(BOOST_DISABLE_THREADS)
>       // threads supported from gcc-3.3 onwards:
> #     define BOOST_HAS_THREADS
> #     define BOOST_HAS_PTHREADS
> #  endif
cvs diff: Diffing stdlib
Index: stdlib/libstdcpp3.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/config/stdlib/libstdcpp3.hpp,v
retrieving revision 1.10
diff -r1.10 libstdcpp3.hpp
41a42,44
> #elif defined(__GLIBCPP__) && !defined(_GLIBCPP_HAVE_GTHR_DEFAULT)
>    // disable thread support if the std lib was built single threaded:
> #  define BOOST_DISABLE_THREADS

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net