From owner-freebsd-questions Thu Oct 26 17: 4:50 2000 Delivered-To: freebsd-questions@freebsd.org Received: from imo-r14.mail.aol.com (imo-r14.mx.aol.com [152.163.225.68]) by hub.freebsd.org (Postfix) with ESMTP id 8989737B479 for ; Thu, 26 Oct 2000 17:04:47 -0700 (PDT) Received: from froekjaerf@netscape.net by imo-r14.mx.aol.com (mail_out_v28.32.) id k.7.13d3cf (16232); Thu, 26 Oct 2000 20:04:38 -0400 (EDT) Received: from netscape.com (aimmail11.aim.aol.com [205.188.144.203]) by air-in02.mx.aol.com (v76_r1.8) with ESMTP; Thu, 26 Oct 2000 20:04:37 -0400 Date: Thu, 26 Oct 2000 20:04:37 -0400 From: froekjaerf@netscape.net (Flemming Froekjaer) To: dnelson@emsphone.com Cc: freebsd-questions@freebsd.org Subject: Re: What's the deal with _THREAD_SAFE? Mime-Version: 1.0 Message-ID: <5236E726.3D526C4F.0F2A144B@netscape.net> References: <0E205B64.7BDA2B7E.0F2A144B@netscape.net> <20001026164517.A11415@dan.emsphone.com> <34FF0427.420B3885.0F2A144B@netscape.net> <20001026182543.A29079@dan.emsphone.com> X-Mailer: Franklin Webmailer 1.0 Content-Type: text/plain; charset="ISO-8859-1" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Sorry, my misspelling. I of course ment ... I know that there's only the one reference to _THREAD_SAFE in the include directory, but in lib/libc_r (which holds the code you include with the -pthread switch) there's references to _THREAD_SAFE in basically all the uthread_*.c source files. I had a pretty hard time figuring that out myself. :o) Here's the beginning of a list of files where _THREAD_SAFE is mentioned: http://www.greystork.com/list.gif I'm coding against FreeBSD 4.1.1-STABLE #0: Thu Oct 12 17:38:38 PDT 2000 Would my using g++ have anything to do with the problem? Hopefully not... \Flemming Dan Nelson wrote: > > In the last episode (Oct 26), Flemming Froekjaer said: > > Dan Nelson wrote: > > > In the last episode (Oct 26), Flemming Froekjaer said: > > > > I'm trying to use the functions in , but after much > > > > aggavation I've found that I can't unless _THREAD_SAFE is defined. > > > > Now, do I have to define it in my own header file, or do I include > > > > some other header file where it's defined, and if so, which one? > > > > > > Compiling with the -pthread gcc switch should be sufficient. > > > > I couldn't find the -pthread option in the GCC Command Options manual, but > > tried it anyway. Didn't do the trick, unfortunately... > > It's in the pthread manpage. > > Actually, I should have read your first message more carefully.  First, > it's , not , and second, the only reference to > _THREAD_SAFE is in stdio.h, where it doesn't add any new function > prototypes. > > What version of FreeBSD is this? > > -- >     Dan Nelson >     dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message