#12 namespace __gnu_cxx undeclared in thread.h

Common_Libraries
closed
Library (32)
5
2005-10-20
2005-10-19
No

version: commoncpp2-1.3.19
file: thread.h
functon: none
platform: debian x86 unstable?

symptom:
/usr/include/cc++/thread.h:98: Error: error: namespace
`__gnu_cxx' undeclared

problem:
In this configuration thread.h does not directly or
indirectly include any header containing
'__gnu_cxx::_Atomic_word' even though this namespace
and type are used!!!

I suspect this is usually overlocked since many other
header files will ultimately include the correct file.

work around:
Add "#include <ios>" before including thread.h.

Discussion

  • David Sugar

    David Sugar - 2005-10-19

    Logged In: YES
    user_id=217

    Any header included there must be one that is not platform specific. Is this one
    that is?

     
  • Scott Bailey

    Scott Bailey - 2005-10-19

    Logged In: YES
    user_id=72684

    The above work around is a suggestion for developers on the
    same platform as I am who error out at compile and is *not*
    intended as a work around within thread.h.

    The actual file we need on my debian box is
    'bits/atomic_word.h', but 'ios' indirectly includes this,
    and felt like a safe bet.

    I suspect the actual change to 'thread.h' is to add the
    following:

    #ifdef HAVE_GCC_CXX_BITS_ATOMIC
    #include <ios>
    #endif

    I think that if you have the gcc atomic bits, then you
    should have ios. This should be a generic enough solution.

    SB

     
  • David Sugar

    David Sugar - 2005-10-20
    • status: open --> closed
    • labels: --> Library
     
  • David Sugar

    David Sugar - 2005-10-20
    • assigned_to: nobody --> dyfet
     
  • David Sugar

    David Sugar - 2005-10-20

    Logged In: YES
    user_id=217

    I like your suggestion for the conditional include. This is in cvs for 1.3.21.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks