From owner-freebsd-standards@FreeBSD.ORG Thu Mar 18 15:07:10 2004 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 345C916A4CE for ; Thu, 18 Mar 2004 15:07:10 -0800 (PST) Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [128.30.28.20]) by mx1.FreeBSD.org (Postfix) with ESMTP id E490943D1D for ; Thu, 18 Mar 2004 15:07:09 -0800 (PST) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: from khavrinen.lcs.mit.edu (localhost [IPv6:::1]) by khavrinen.lcs.mit.edu (8.12.9/8.12.9) with ESMTP id i2IN74tx029019 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK CN=khavrinen.lcs.mit.edu issuer=SSL+20Client+20CA); Thu, 18 Mar 2004 18:07:05 -0500 (EST) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.12.9/8.12.9/Submit) id i2IN7403029016; Thu, 18 Mar 2004 18:07:04 -0500 (EST) (envelope-from wollman) Date: Thu, 18 Mar 2004 18:07:04 -0500 (EST) From: Garrett Wollman Message-Id: <200403182307.i2IN7403029016@khavrinen.lcs.mit.edu> To: Archie Cobbs In-Reply-To: <200403182233.i2IMXPuJ002724@arch20m.dellroad.org> References: <200403182233.i2IMXPuJ002724@arch20m.dellroad.org> X-Spam-Score: -19.8 () IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,REPLY_WITH_QUOTES X-Scanned-By: MIMEDefang 2.37 cc: freebsd-standards@freebsd.org Subject: _BSD_SOURCE vs. __BSD_VISIBLE X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Mar 2004 23:07:10 -0000 < said: > On FreeBSD, _BSD_SOURCE is not recognized, but _POSIX_C_SOURCE is and > it actually causes the BSD functions to be hidden. So I have to manually > add __BSD_VISIBLE to get them on FreeBSD. Then your code is wrong. If you don't want POSIX namespace, then you shouldn't be defining _POSIX_C_SOURCE. Application code has no business defining __BSD_VISIBLE. > Q1: Why does Linux require _BSD_SOURCE but FreeBSD requires __BSD_VISIBLE? Because Linux (or more likely, glibc) made a bad decision. > Q3: What is the right and portable set of flags to use? None, unless your application is prepared to live within the limitations of the namespaces it requests. Don't ask for POSIX and then expect something else. -GAWollman