From owner-freebsd-current Tue Sep 24 14:39: 6 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3EB5637B401; Tue, 24 Sep 2002 14:39:05 -0700 (PDT) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0266743E7B; Tue, 24 Sep 2002 14:39:05 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by canning.wemm.org (Postfix) with ESMTP id 57E202A894; Tue, 24 Sep 2002 14:39:01 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Bill Fenner Cc: tjr@FreeBSD.ORG, sgk@troutmask.apl.washington.edu, phk@FreeBSD.ORG, current@FreeBSD.ORG Subject: Re: Who broke sort(1) ? In-Reply-To: <200209242043.NAA26380@windsor.research.att.com> Date: Tue, 24 Sep 2002 14:39:01 -0700 From: Peter Wemm Message-Id: <20020924213901.57E202A894@canning.wemm.org> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Bill Fenner wrote: > > Here's my suggested fix: > @@ -0,0 +1,8 @@ > +/* > + * Tell GNU sort(1) to implement the obsolete +1 -0 syntax even though > + * it has been removed from the version of POSIX that the rest of > + * the system conforms to. > + */ > +int posix2_version(void) { > + return 0; > +} Try something like this: #include #include int posix2_version(void) { if (getenv("POSIX_ME_HARDER") || getenv("POSIXLY_CORRECT")) return _POSIX2_VERSION; else return 0; } Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message