[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AC_CHECK_MEMBER and struct utmpx.ut_exit
From: |
Ralf Wildenhues |
Subject: |
AC_CHECK_MEMBER and struct utmpx.ut_exit |
Date: |
Fri, 22 Sep 2006 08:45:54 +0200 |
User-agent: |
Mutt/1.5.13 (2006-09-01) |
On my GNU/Linux system, /usr/include/bits/utmpx.h defines a struct utmpx
that has a member ut_exit that is a struct __exit_status.
This check in m4/readutmp.m4:gl_READUTMP:
AC_CHECK_MEMBERS([struct utmpx.ut_exit],,,[$utmp_includes])
detects that as nonexistent:
| configure:6940: checking for struct utmpx.ut_exit
| configure:6969: gcc -Wall -Werror -fno-builtin -c -g -O2 conftest.c >&5
| conftest.c: In function 'main':
| conftest.c:85: error: used struct type value where scalar is required
| configure:6975: $? = 1
because the test for members goes like this:
| int
| main ()
| {
| static struct utmp ac_aggr;
| if (ac_aggr.ut_exit)
| return 0;
| ;
| return 0;
| }
There are two issues with this:
1) I don't know whether Autoconf intended to not detect members of
structures that are themselves structures. Either the documentation
or the implementation of AC_CHECK_MEMBER need to be fixed.
2) I don't know whether the readutmp module is susceptible to this
behavior of the Autoconf macro (or whether it will misbehave once
AC_CHECK_MEMBER is fixed).
Cheers,
Ralf
- AC_CHECK_MEMBER and struct utmpx.ut_exit,
Ralf Wildenhues <=