[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patch for coreutils 4.5.7 on Mac OS X
From: |
Petter Reinholdtsen |
Subject: |
Re: Patch for coreutils 4.5.7 on Mac OS X |
Date: |
22 Feb 2003 16:28:08 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2 |
[Paul Eggert]
> Petter Reinholdtsen <address@hidden> 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.