Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Mar 1998 16:01:59 -0500 (EST)
From:      Peter Dufault <dufault@hda.com>
To:        steve@igor.haunt.com (Steven Jorgensen)
Cc:        current@FreeBSD.ORG
Subject:   Re: Posix level?
Message-ID:  <199803272102.QAA24520@hda.hda.com>
In-Reply-To: <199803272043.NAA28899@igor.haunt.com> from Steven Jorgensen at "Mar 27, 98 01:43:12 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
> 	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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199803272102.QAA24520>