free AC_HEADER_STAT
This commit is contained in:
45
aclocal.m4
vendored
45
aclocal.m4
vendored
@ -1173,51 +1173,6 @@ fi
|
|||||||
])
|
])
|
||||||
dnl
|
dnl
|
||||||
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 Need to change to check for ndir
|
||||||
dnl
|
dnl
|
||||||
undefine([AC_HEADER_DIRENT])dnl
|
undefine([AC_HEADER_DIRENT])dnl
|
||||||
|
@ -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 */
|
/* Wrapper around the ugly sys/stat includes/ifdefs */
|
||||||
|
|
||||||
@ -9,6 +10,12 @@
|
|||||||
# define lstat(path, buf) stat(path, buf)
|
# define lstat(path, buf) stat(path, buf)
|
||||||
#endif /* HAVE_LSTAT */
|
#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
|
#ifdef STAT_MACROS_BROKEN
|
||||||
# undef S_ISREG
|
# undef S_ISREG
|
||||||
# undef S_ISDIR
|
# undef S_ISDIR
|
||||||
|
Reference in New Issue
Block a user