What should be in <sys/param.h>?
H. J. Lu
hjl@lucon.org
Mon Jul 18 16:23:00 GMT 2005
On Sun, Jul 17, 2005 at 08:57:46PM -0700, Roland McGrath wrote:
> <sys/param.h> only exists for compatibility with old applications that have
> usage predating the better ways now available to get such information. So
> all that matters is that it has what was there in the past when that
> application could be compiled on that platform. If you are compiling a
> program someplace it was never compiled in the past, then you should fix it
> to use the modern interfaces.
The problem is <sys/param.h> doesn't compile on ia64 due to
# define HZ sysconf(_SC_CLK_TCK)
in <asm/param.h> on RHEL 4. RHEL 3 has
#ifdef CONFIG_IA64_HP_SIM
/*
* Yeah, simulating stuff is slow, so let us catch some breath between
* timer interrupts...
*/
# define HZ 32
#else
# define HZ 1024
#endif
and it is OK. You can argue that <asm/param.h> doesn't come from glibc.
But the old application only includes <sys/param.h>, which should work.
If glibc provides <sys/param.h>, it should at least compile when it is
used.
H.J.
More information about the Libc-alpha
mailing list