|
Boost Users : |
From: Jeff Garland (jeff_at_[hidden])
Date: 2005-09-10 21:20:40
On Sat, 10 Sep 2005 07:43:07 +0200, Michael Haubenwallner wrote
> damn, forget it, my fault, sorry:
>
> as i said, i built boost with -pthread.
> But the application using boost was built without -pthread.
> Then i added "std::" to the localtime_r/gmtime_r calls in c_time.hpp.
> So, the error-message that localtime_r/gmtime_r are not found in
> namespace 'std' is incorrect. The error-message i got first was:
>
> /tools/snapshot/toolsbox-3.5.0.16rc.20050904/HP-
> UX/boost/include/boost/date_time/c_time.hpp:52: error: `
> localtime_r' undeclared (first use this function)
>
> Then i had to add '-pthread' to my application-build, and it worked.
>
> Can't say if a missing '-pthread' flag at application side should be
> handled in boost when boost is built with '-pthread'.
Looks like we might need to do some work on the platform config for hpux.
Basically, if BOOST_HAS_THREADS is set date-time 'assumes' the platform has
the _r functions available. Looking at the config for hpux it looks like it
doesn't really setup BOOST_HAD_THREADS correctly. Looks like maybe the
config/platform/hpux.hpp should include the posix_features.hpp file like
solarias does. So you might try adding
#include <boost/config/posix_features.hpp>
to the end of the file above. I'm cc'ing John Maddock since he's the config
guru -- John any thoughts?
Jeff
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