From owner-freebsd-current Fri Mar 27 13:04:00 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA11765 for freebsd-current-outgoing; Fri, 27 Mar 1998 13:04:00 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from hda.hda.com (hda-bicnet.bicnet.net [208.220.66.37]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA11723 for ; Fri, 27 Mar 1998 13:03:53 -0800 (PST) (envelope-from dufault@hda.hda.com) Received: (from dufault@localhost) by hda.hda.com (8.8.5/8.8.5) id QAA24520; Fri, 27 Mar 1998 16:02:00 -0500 (EST) From: Peter Dufault Message-Id: <199803272102.QAA24520@hda.hda.com> Subject: Re: Posix level? In-Reply-To: <199803272043.NAA28899@igor.haunt.com> from Steven Jorgensen at "Mar 27, 98 01:43:12 pm" To: steve@igor.haunt.com (Steven Jorgensen) Date: Fri, 27 Mar 1998 16:01:59 -0500 (EST) Cc: current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL25 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Just recently, March 8th accoring to the rcsid, a > file _posix.h was added to the current tree to setup > proper defines for your current POSIX level. > > In this file, I noticed that the value of _POSIX_VERSION > is set to 199009L which is the value set for the version > of POSIX defined in 1990. Is this correct? It seems > like a pretty old version of the standard to be compliant > to. Yes, that is the version FreeBSD is compliant to. If you wait another day you can set it to 199309L in /etc/make.conf with some degree of honesty because the feature test macros and sysconf variables are present. > Anyway, the reason I am mailing is that I'm trying to port > the next version of Advanced Khoros to FreeBSD current. > I maintain the Khoros port to FreeBSD because I don't like > linux, and I work from home fairly often. ^:) Anyway, the > next version is in beta testing and I'm trying to port it > to current, and the following code in _posix.h is preventing > me from getting anywhere on it. In the new version, we've > upgraded our compliance to 199309L, so #if evaluates to > true causing it to error out before even trying to compile: > > /* I'm not sure if I'm allowed to do this, but at least initially > * it may catch some teething problems: > */ > > #if defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE > _POSIX_VERSION) > #error _POSIX_C_SOURCE > _POSIX_VERSION > #endif > > The comment above the #if, even indicates that it may > not be legal to error out there. We can handle any > parts of POSIX 199309L not supported by FreeBSD current > by working around them (we do work fine under 2.x) , but > only it if allows our compiles to continue. > > Is this really the way the _posix.h file should work? I did this to catch when I screwed up my testing because I set _POSIX_VERSION to 199309L and rebuild the tree, and wanted to catch when I was doing what I didn't mean to. I have this taken out in the patches I'm committing, but this means you're specifying an interface (_POSIX_C_SOURCE 199309L) that you know the system doesn't support (_POSIX_VERSION 199009L). Shouldn't Khoros limit _POSIX_C_SOURCE to at most _POSIX_VERSION? For now kill that "#error" off locally and watch for the commits. Peter -- Peter Dufault (dufault@hda.com) Realtime development, Machine control, HD Associates, Inc. Safety critical systems, Agency approval To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message