Date: Tue, 24 Sep 2002 14:39:01 -0700 From: Peter Wemm <peter@wemm.org> To: Bill Fenner <fenner@research.att.com> Cc: tjr@FreeBSD.ORG, sgk@troutmask.apl.washington.edu, phk@FreeBSD.ORG, current@FreeBSD.ORG Subject: Re: Who broke sort(1) ? Message-ID: <20020924213901.57E202A894@canning.wemm.org> In-Reply-To: <200209242043.NAA26380@windsor.research.att.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <stdlib.h> #include <unistd.h> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020924213901.57E202A894>