NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/43063: Please delete __NetBSD_Prereq__() from <sys/param.h>



The following reply was made to PR kern/43063; it has been noted by GNATS.

From: Robert Elz <kre%munnari.OZ.AU@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: kern/43063: Please delete __NetBSD_Prereq__() from <sys/param.h>
Date: Mon, 29 Mar 2010 09:33:09 +0700

     Date:        Sun, 28 Mar 2010 19:05:03 +0000 (UTC)
     From:        David Holland <dholland-bugs%NetBSD.org@localhost>
     Message-ID:  <20100328190503.6480563B11D%www.NetBSD.org@localhost>
 
 
   |  Well... if you install a sys/param.h that says 5.99.* into
   |  /usr/include (and presumably other kernel headers)
 
 I generally don't, not that param.h should do much harm, but types.h
 certainly would, and as you imply, updatig bits of /usr/include/sys
 would be dangerous at best.
 
   |  Checking what's in sys/param.h (as opposed to calling uname()) is in
   |  fact the best way to test the version of the userland libs you have...
 
 Perhaps, though I'd have thought /etc/release should be even better.   But
 unfortunately, much build stuff (like anything using autoconf for this kind
 of test, I believe, including pkgsrc's system version tests) doesn't go
 looking in sys/param.h, it does "uname -m" instead - that's exactly why
 libkver works for doing pkg_comp builds (or why it is needed, param.h
 should have the same info, but isn't usually used).
 
   |  Well, I just ran into a case; emacs20 broke on -current because of the
   |  terminfo merge. It can't probe whether it's using terminfo; it has to
   |  be told, and so I needed a test for NetBSD < 5.99.24.
 
 You really needed a test whether the terminfo functions are in libc.
 
   |  (Patching in a configure test is the *right* way, but quite a bit too
   |  involved.)
 
 Exactly ...   because you're getting the version from pkgsrc, you're
 getting uname output, which will tell you precisely nothing about whether
 or not the system's libc happens to be the version with terminfo in it or
 not...   I could boot such a kernel (briefly) and try building emacs
 (outside of pkg_comp) just to demonstrate it if needed...
 
 kre
 
 


Home | Main Index | Thread Index | Old Index