From owner-freebsd-hackers Fri Oct 27 13:21:31 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id NAA18066 for hackers-outgoing; Fri, 27 Oct 1995 13:21:31 -0700 Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id NAA18046 for ; Fri, 27 Oct 1995 13:21:19 -0700 Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id NAA23822; Fri, 27 Oct 1995 13:11:18 -0700 From: Terry Lambert Message-Id: <199510272011.NAA23822@phaeton.artisoft.com> Subject: Re: _SC_PAGESIZE patch to sysconf(3) To: bde@zeta.org.au (Bruce Evans) Date: Fri, 27 Oct 1995 13:11:18 -0700 (MST) Cc: julian@ref.tfs.com, vcapuano@esoc.esa.de, freebsd-hackers@FreeBSD.ORG In-Reply-To: <199510271929.FAA25371@godzilla.zeta.org.au> from "Bruce Evans" at Oct 28, 95 05:29:30 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 823 Sender: owner-hackers@FreeBSD.ORG Precedence: bulk > >if this is not POSIX standard it should be hidden behind a > >#ifndef _POSIX_SOURCE > >> > >> I was porting a program I developed on Solaris to FreeBSD when I got into a > >> missing call: sysconf(_SC_PAGESIZE). I know I could use getpagesize(3), but > >> I then had to ifdef my code. > > It's already hidden by using an identifier in implementation's namespace. > An application that is careful enough to define _POSIX_SOURCE should be > careful enough not to reference nonstandard indentifiers. Disagree. Non-standard system features should be diked out so that code portability can be determined with a compilation attempt. SunOS did this with their _POSIX_SOURCE as well. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.