From owner-freebsd-bugs Thu Mar 21 9: 0: 9 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 28A1437B417 for ; Thu, 21 Mar 2002 09:00:03 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g2LH03T76075; Thu, 21 Mar 2002 09:00:03 -0800 (PST) (envelope-from gnats) Received: from Daffy.timing.com (daffy.timing.com [206.168.13.218]) by hub.freebsd.org (Postfix) with ESMTP id 26A4F37B417 for ; Thu, 21 Mar 2002 08:52:36 -0800 (PST) Received: from Elmer.timing.com (elmer.timing.com [206.168.13.187]) by Daffy.timing.com (8.11.3/8.11.3) with ESMTP id g2LGqZW81691 for ; Thu, 21 Mar 2002 09:52:35 -0700 (MST) (envelope-from jhein@timing.com) Received: (from jhein@localhost) by Elmer.timing.com (8.11.6/8.11.6) id g2LGqZH50416; Thu, 21 Mar 2002 09:52:35 -0700 (MST) (envelope-from jhein) Message-Id: <200203211652.g2LGqZH50416@Elmer.timing.com> Date: Thu, 21 Mar 2002 09:52:35 -0700 (MST) From: "John E. Hein" Reply-To: "John E. Hein" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/36167: _THREAD_SAFE & _REENTRANT used inconsistently Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 36167 >Category: bin >Synopsis: _THREAD_SAFE & _REENTRANT used inconsistently >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Mar 21 09:00:02 PST 2002 >Closed-Date: >Last-Modified: >Originator: John E. Hein >Release: FreeBSD 4.5-RELEASE >Organization: Timing Solutions Corporation >Environment: System: -STABLE & -CURRENT >Description: stdio.h uses _THREAD_SAFE math.h & openssl/e_os.h use _REENTRANT On linux, _THREAD_SAFE & _REENTRANT are documented to be synonymous (in /usr/include/features.h). I don't know what POSIX has to say on the issue (although it looks like they use _POSIX_THREAD_SAFE_FUNCTIONS - see comment in unistd.h). Of course, _REENTRANT is not mentioned in gcc(1) whereas _THREAD_SAFE is. >How-To-Repeat: egrep -r '_REENTRANT|_THREAD_SAFE' /usr/include >Fix: Until a possibly better, more posix compliant, solution comes along, either: - Have headers use just _THREAD_SAFE or _REENTRANT or - Have headers use treat _THREAD_SAFE or _REENTRANT the same. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message