On Wed, 5 Sep 2001, Ruslan Ermilov wrote:
> On Wed, Sep 05, 2001 at 09:44:05PM +1000, Bruce Evans wrote:
> [...]
> > > Index: Makefile
> > > ===================================================================
> > > RCS file: /home/ncvs/src/usr.bin/xinstall/Makefile,v
> > > retrieving revision 1.15
> > > diff -u -r1.15 Makefile
> > > --- Makefile 2001/04/02 11:54:59 1.15
> > > +++ Makefile 2001/09/04 08:11:52
> > > @@ -3,6 +3,22 @@
> > >
> > > PROG= xinstall
> > > PROGNAME= install
> > > +SRCS= xinstall.c
> > > MAN= install.1
> > > +
> > > +# Get __FreeBSD_version
> > > +.if !defined(OSVERSION)
> > > +.if exists(/sbin/sysctl)
> > > +OSVERSION!= /sbin/sysctl -n kern.osreldate
> > > +.else
> > > +OSVERSION!= /usr/sbin/sysctl -n kern.osreldate
> > > +.endif
> > > +.endif
> > > +
> > > +.if ${OSVERSION} < 400021 || \
> > > + ${OSVERSION} >= 500000 && ${OSVERSION} < 500007
> > > +.PATH: ${.CURDIR}/../../lib/libc/gen
> > > +SRCS+= strtofflags.c
> > > +.endif
> > >
> > > .include <bsd.prog.mk>
> >
> > Ugh. This is even worse than using __FreeBSD_version. It is broken
> > for non-FreeBSD hosts. Hmm, this case is broken in my version too.
> > Non-FreeBSD hosts might not have have FreeBSD file flags, so they might
> > not have the definitions of the magic numbers necessary for strtofflags.c
> > to compile; they might not even have the necessary headers.
> >
> What do I hear?! Are we required to support non-FreeBSD hosts at the
> Makefile level? That would be too conservative, and is already broken
> in many other ways.
>
> > It is unreasonable to expect the target source strtofflags.c to be
> > compilable in the host environment.
> >
> But we can at least try (with high probability of success) -- this is
> better than the current breakage Jordan observes.
I think it's easier to make a fairly general case work than fix special
cases as they turn up.
> > The correct fix is to not support file flags in the bootstrap
> > version of install.
> >
> But we now always bootstrap install(1). Not including support for
> file flags here would mean "no support for file flags during the
> installworld".
That's certainly a problem. I still don't see the point of the runtime
test to avoid using strtofflags.c. strttofflags.c is just as portable as
the xinstall sources (modulo the dependency on <unistd.h> declaring the
things in it, if WARNS is turned on).
Bruce
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message