* 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.
This commit is contained in:
Pavel Roskin 2001-06-15 15:53:18 +00:00
parent ccc11f345b
commit c23aa050c1
5 changed files with 28 additions and 12 deletions

View File

@ -1,3 +1,13 @@
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'.

View File

@ -119,7 +119,8 @@ AC_CACHE_CHECK([for $1 that defines DIR], ac_Header,
[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
@ -310,7 +311,8 @@ AC_DEFUN([AC_HEADER_TIME],
#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

View File

@ -423,10 +423,11 @@ AS_VAR_PUSHDEF([ac_Member], [ac_cv_member_$1])dnl
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

View File

@ -119,7 +119,8 @@ AC_CACHE_CHECK([for $1 that defines DIR], ac_Header,
[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
@ -310,7 +311,8 @@ AC_DEFUN([AC_HEADER_TIME],
#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

View File

@ -423,10 +423,11 @@ AS_VAR_PUSHDEF([ac_Member], [ac_cv_member_$1])dnl
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