Boost logo

Threads-Devel :

Subject: Re: [Threads-devel] Use of errno.h
From: Anthony Williams (anthony_at_[hidden])
Date: 2008-10-08 12:17:03

At Wed 08 Oct 2008 16:06:54 BST, "J. van der Wulp" <jwulp_at_[hidden]> wrote:

> I'm running into trouble with STLport 5.1.6 when errno.h is included
> after cerrno. The problem occurs for instance when including
> boost::asio header files before those of boost::thread. The problem is
> that it checks whether or not errno is already defined. I think that
> this should be considered an STLport feature/bug more than it is a
> boost::thread issue. But still I was wondering if there is a reason
> that boost::thread includes errno.h instead of cerrno (or even
> boost/cerrno.hpp).

In the past I've had problems with the <cxxx> headers not being as
portable as the corresponding <xxx.h> headers, so I tend to include
<xxx.h> by preference out of habit.

> When I substitute cerrno for errno.h my compile problems disappear. Is
> it possible to make this change to pthread/mutex.hpp and
> pthread/recursive_mutex.hpp?

Sure, assuming it still passes all the tests.


Anthony Williams            | Just Software Solutions Ltd
Custom Software Development |
Registered in England, Company Number 5478976.
Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL

Threads-Devel list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at