Boost logo

Boost :

From: Caleb Epstein (caleb.epstein_at_[hidden])
Date: 2005-06-20 12:35:16


On 6/20/05, Toon Knapen <toon.knapen_at_[hidden]> wrote:

> Does anybody now any other flag that might influence this? Is it normal
> (never used readdir_r myself) that it is only defined in
> multi-threading-mode? Should we instruct bbv1 to compile the

Yes that seems eminently reasonable (that readdir_r only be
prototyped/available if -mt is supplied).

> boost.filesystem always with the -mt flag on hpux ?

Well, there is code in
libs/filesystem/src/operations_posix_windows.cpp that attempts to
detect if it is being compiled with multi-threading enabled:

# if defined(_POSIX_THREAD_SAFE_FUNCTIONS) \
      && defined(_SC_THREAD_SAFE_FUNCTIONS) \
      && (_POSIX_THREAD_SAFE_FUNCTIONS+0 >= 0)

Presumably aCC sets these macros incorrectly, or this code is not
correct. Maybe the check should be for >0?

Perhaps you can check what _POSIX_THREAD_SAFE_FUNCTIONS is defined to
on aCC both with and without -mt? On Linux 2.4.21 + gcc 3.3.4, I get
200112 both with -pthread and without.

#include <pthread.h>
#include <iostream>
int main () { std::cout << _POSIX_THREAD_SAFE_FUNCTIONS << std::endl; }

-- 
Caleb Epstein
caleb dot epstein at gmail dot com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk