bin/1289: errno breaks in thread-safe c++ compiles

[ Available lists | Index of freebsd-bugs | Month of Jun 1996 | Week of 3 Jun 1996 | Raw email | View thread | Wrap long lines | Reply ]
From
<smp@csn.net>
Date
3 Jun 1996 17:20:03
Subject
bin/1289: errno breaks in thread-safe c++ compiles
Message-ID
199606040012.SAA27142@rick.systemsix.com


[ Hide this part ]
 
>Number: 1289
>Category: bin
>Synopsis: errno breaks in thread-safe c++ compiles
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Jun 3 17:20:01 PDT 1996
>Last-Modified:
>Originator: Steve Passe
>Organization:
New Ideas
>Release: FreeBSD 2.2-960501-SNAP i386
>Environment:

FreeBSD 2.2-960501-SNAP, thread safe libc_r

>Description:

In the thread-safe libc, specifically errno.h, there is a
mechanism for using a unique copy of errno for each thread.
This mechanism breaks when a progam compliled under c++
uses errno (includes errno.h)

>How-To-Repeat:

foo.cc:
#include <errno.h>
cerr << "problem: " << errno << '\n';
g++ foo.cc:
(mumbles about unresolvedfunction "__error__Fv")

>Fix:

RCS file: RCS/errno.h,v
retrieving revision 1.1
diff -r1.1 errno.h
47c47,49
< extern int * __error();
---
> __BEGIN_DECLS
> int * __error __P((void));
> __END_DECLS

>Audit-Trail:
>Unformatted:


Elapsed time: 0.063 seconds