[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: autoconf 2.5, 2.13, and Vim
From: |
Paul Eggert |
Subject: |
Re: autoconf 2.5, 2.13, and Vim |
Date: |
Tue, 12 Jun 2001 07:20:23 -0700 (PDT) |
> From: Akim Demaille <address@hidden>
> Date: 12 Jun 2001 15:37:47 +0200
>
> Well, too late, here is a proto monster patch.
Unfortunately, if you wrap every include of sys/types.h, even for
checks that apply only to POSIX-like systems, then you'll end up
raising other questions. For example, in your proposed change to
AC_FUNC_CHOWN one can see code like this:
#if SYS_TYPES_H
# include <sys/types.h>
#endif
#if HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#include <fcntl.h>
It seems strange for the code to wrap sys/stat.h but not fcntl.h,
particularly since ancient hosts have the former but not the latter.
(These hosts have chown, so the test is relevant to them.) People
reading the resulting code will be confused as to why some headers are
wrapped inside #if but others are not.
One could address this issue by wrapping _every_ include, but this
will make the code harder to read, and it won't help portability on
any plausible host. So I wouldn't bother wrapping headers inside #if
except for tests where wrapping plausibly adds to portability.
In other words, I would omit all the changes to acfunctions.m4 and
acspecific.m4, as well as the changes to _AC_CHECK_HEADER_DIRENT,
AC_HEADER_DIRENT, AC_HEADER_STAT, AC_HEADER_SYS_WAIT, AC_HEADER_TIME,
_AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H,
_AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL, AC_TYPE_GETGROUPS, and
AC_C_BIGENDIAN. The last macro is the most interesting case, as the
bigendianness test should apply to non-POSIX hosts, but the test as
coded works only on some POSIX hosts so there's little point to
wrapping the headers.
Admittedly this is a judgment call. It's not incorrect to wrap every
include; it's more of a style/maintenance issue.
PS. Also, it seems to me that _AC_CHECK_TYPE_OLD's reference to
sys/types.h (in the generated comment) needs to be fixed.
- Re: autoconf 2.5, 2.13, and Vim, (continued)
- Re: autoconf 2.5, 2.13, and Vim, Charles E. Campbell, 2001/06/11
- Re: autoconf 2.5, 2.13, and Vim, Akim Demaille, 2001/06/11
- Re: autoconf 2.5, 2.13, and Vim, Charles E. Campbell, 2001/06/11
- Re: autoconf 2.5, 2.13, and Vim, Russ Allbery, 2001/06/11
- Re: autoconf 2.5, 2.13, and Vim, Akim Demaille, 2001/06/11
- Re: autoconf 2.5, 2.13, and Vim, Akim Demaille, 2001/06/11
- Re: autoconf 2.5, 2.13, and Vim, Paul Eggert, 2001/06/11
- Re: autoconf 2.5, 2.13, and Vim, Akim Demaille, 2001/06/12
- Re: autoconf 2.5, 2.13, and Vim, Paul Eggert, 2001/06/12
- Re: autoconf 2.5, 2.13, and Vim, Akim Demaille, 2001/06/12
- Re: autoconf 2.5, 2.13, and Vim,
Paul Eggert <=
- Re: autoconf 2.5, 2.13, and Vim, Akim Demaille, 2001/06/12
- Re: autoconf 2.5, 2.13, and Vim, Paul Eggert, 2001/06/12
- Re: autoconf 2.5, 2.13, and Vim, Akim Demaille, 2001/06/12
- Re: autoconf 2.5, 2.13, and Vim, Akim Demaille, 2001/06/12
- Modernizing the handling of headers (was: autoconf 2.5, 2.13, and Vim), Akim Demaille, 2001/06/13
- Incremental default includes (Was: Modernizing the handling of headers), Akim Demaille, 2001/06/13
- One step towards includes normalization (Was: Incremental default includes), Akim Demaille, 2001/06/13
- Re: One step towards includes normalization (Was: Incremental default includes), Akim Demaille, 2001/06/14
- Re: One step towards includes normalization (Was: Incremental default includes), Alexandre Oliva, 2001/06/17
- Re: One step towards includes normalization (Was: Incremental default includes), Akim Demaille, 2001/06/18