free AC_HEADER_STAT

This commit is contained in:
tg 2004-05-24 17:25:43 +00:00
parent 165d1927be
commit aff9c430e6
2 changed files with 8 additions and 46 deletions

45
aclocal.m4 vendored
View File

@ -1173,51 +1173,6 @@ fi
])
dnl
dnl
dnl Modified test from autoconf's acspecific.m4(AC_HEADER_STAT) test: need
dnl to check if S_ISSOCK == S_ISFIFO (FreeBSD).
undefine([AC_HEADER_STAT])dnl
AC_DEFUN(AC_HEADER_STAT,
[AC_CACHE_CHECK(whether stat file-mode macros are broken,
ac_cv_header_stat_broken,
[AC_EGREP_CPP([You lose], [#include <sys/types.h>
#include <sys/stat.h>
#if defined(S_ISBLK) && defined(S_IFDIR)
# if S_ISBLK (S_IFDIR)
You lose.
# endif
#endif
#if defined(S_ISBLK) && defined(S_IFCHR)
# if S_ISBLK (S_IFCHR)
You lose.
# endif
#endif
#if defined(S_ISLNK) && defined(S_IFREG)
# if S_ISLNK (S_IFREG)
You lose.
# endif
#endif
#if defined(S_ISSOCK) && defined(S_IFREG)
# if S_ISSOCK (S_IFREG)
You lose.
# endif
#endif
#if defined(S_ISSOCK) && defined(S_IFIFO)
# if S_ISSOCK (S_IFIFO)
You lose.
# endif
#endif
], ac_cv_header_stat_broken=yes, ac_cv_header_stat_broken=no)])
if test $ac_cv_header_stat_broken = yes; then
AC_DEFINE(STAT_MACROS_BROKEN)
fi
])
dnl
dnl
dnl Need to change to check for ndir
dnl
undefine([AC_HEADER_DIRENT])dnl

View File

@ -1,4 +1,5 @@
/* $OpenBSD: ksh_stat.h,v 1.3 1996/10/01 02:05:39 downsj Exp $ */
/* $MirBSD: ksh_stat.h,v 1.2 2004/05/24 17:25:43 tg Exp $ */
/* $OpenBSD: ksh_stat.h,v 1.3 1996/10/01 02:05:39 downsj Exp $ */
/* Wrapper around the ugly sys/stat includes/ifdefs */
@ -9,6 +10,12 @@
# define lstat(path, buf) stat(path, buf)
#endif /* HAVE_LSTAT */
#if defined(S_ISSOCK) && defined(S_IFIFO)
# if S_ISSOCK (S_IFIFO)
# define STAT_MACROS_BROKEN
# endif
#endif
#ifdef STAT_MACROS_BROKEN
# undef S_ISREG
# undef S_ISDIR