+2001-06-15 Pavel Roskin <proski@gnu.org>
+
+ * acheaders.m4 (_AC_CHECK_HEADER_DIRENT): Instead of defining
+ an unused pointer use cast to this type and `if' statement to
+ avoid warnings from the compiler.
+ (AC_HEADER_TIME): Likewise.
+ * actypes.m4 (AC_CHECK_MEMBER): s/foo/ac_aggr/. Use the member
+ in `if' statement to avoid warnings from the compiler. Declare
+ ac_aggr static to avoid the need to initialize it.
+
2001-06-14 Akim Demaille <akim@epita.fr>
* doc/autoconf.texi (Portable Shell): Move after `Writing Macros'.
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
#include <$1>
],
- [DIR *dirp = 0;])],
+ [if ((DIR *) 0)
+return 0;])],
[AS_VAR_SET(ac_Header, yes)],
[AS_VAR_SET(ac_Header, no)])])
AS_IF([test AS_VAR_GET(ac_Header) = yes], [$2], [$3])[]dnl
#include <sys/time.h>
#include <time.h>
],
-[struct tm *tp;])],
+[if ((struct tm *) 0)
+return 0;])],
[ac_cv_header_time=yes],
[ac_cv_header_time=no])])
if test $ac_cv_header_time = yes; then
dnl Extract the aggregate name, and the member name
AC_CACHE_CHECK([for $1], ac_Member,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])],
-[dnl AGGREGATE foo;
-m4_patsubst([$1], [\..*]) foo;
-dnl foo.MEMBER;
-foo.m4_patsubst([$1], [^[^.]*\.]);])],
+[dnl AGGREGATE ac_aggr;
+static m4_patsubst([$1], [\..*]) ac_aggr;
+dnl ac_aggr.MEMBER;
+if (ac_aggr.m4_patsubst([$1], [^[^.]*\.]))
+return 0;])],
[AS_VAR_SET(ac_Member, yes)],
[AS_VAR_SET(ac_Member, no)])])
AS_IF([test AS_VAR_GET(ac_Member) = yes], [$2], [$3])dnl
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
#include <$1>
],
- [DIR *dirp = 0;])],
+ [if ((DIR *) 0)
+return 0;])],
[AS_VAR_SET(ac_Header, yes)],
[AS_VAR_SET(ac_Header, no)])])
AS_IF([test AS_VAR_GET(ac_Header) = yes], [$2], [$3])[]dnl
#include <sys/time.h>
#include <time.h>
],
-[struct tm *tp;])],
+[if ((struct tm *) 0)
+return 0;])],
[ac_cv_header_time=yes],
[ac_cv_header_time=no])])
if test $ac_cv_header_time = yes; then
dnl Extract the aggregate name, and the member name
AC_CACHE_CHECK([for $1], ac_Member,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])],
-[dnl AGGREGATE foo;
-m4_patsubst([$1], [\..*]) foo;
-dnl foo.MEMBER;
-foo.m4_patsubst([$1], [^[^.]*\.]);])],
+[dnl AGGREGATE ac_aggr;
+static m4_patsubst([$1], [\..*]) ac_aggr;
+dnl ac_aggr.MEMBER;
+if (ac_aggr.m4_patsubst([$1], [^[^.]*\.]))
+return 0;])],
[AS_VAR_SET(ac_Member, yes)],
[AS_VAR_SET(ac_Member, no)])])
AS_IF([test AS_VAR_GET(ac_Member) = yes], [$2], [$3])dnl