[Paul Eggert]
> Petter Reinholdtsen <[EMAIL PROTECTED]> writes:
> 
> > Why does the code read '#if HAVE_SYSCTL_H then #include
> > <sys/param.h>'?  This do not make sense.
> 
> It's a bit of a hack, but we don't know of any system where it breaks,
> and the <sys/param.h> is certainly needed on some BSD systems.  Does
> the code break on your system?  Your patch indicates that MacOS X has
> sys/param.h so I don't see anything wrong about including it for your
> host.

I propose to change the #ifdef to match the #include.  This would
improve the behavior on Mac OS X without affecting other systems
negatively.  Why not change the '#if HAVE_SYSCTL_H' to '#if
HAVE_SYS_PARAM_H' to make it test for the thing actually being done in
the #if block?

> For the record, here's what happens on OpenBSD 3.0 if you omit the
> <sys/param.h> include from src/uname.c.  The man page for sysctl(3)
> says that you have to include <sys/param.h> before including
> <sys/sysctl.h>.

I do not propose removing <sys/param.h>, I propose to change
HAVE_SYSCTL_H with HAVE_SYS_PARAM_H.

I do not doubt that <sys/param.h> is required.


_______________________________________________
Bug-coreutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to