From: Fabian Groffen Date: Mon, 15 Oct 2007 08:23:25 +0000 (-0000) Subject: Show that we are checking things, and add check for S_ISWHT to allow for compilation... X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=0e4a588bfc2823b70e728f1d52788e19dea42241;p=portage.git Show that we are checking things, and add check for S_ISWHT to allow for compilation on Linux svn path=/main/branches/prefix/; revision=8127 --- diff --git a/configure.in b/configure.in index c23cc011b..eb5ba8321 100644 --- a/configure.in +++ b/configure.in @@ -53,10 +53,8 @@ AC_CHECK_HEADERS([sys/stat.h sys/types.h dirent.h sys/time.h alloca.h]) AC_CHECK_HEADERS([fcntl.h]) AC_CHECK_LIB([c], [readdir]) -AC_CHECK_LIB([c], [strcpy]) -AC_CHECK_LIB([c], [strstr]) -AC_CHECK_LIB([c], [memcpy]) +AC_MSG_CHECKING([for the *time fields in struct stat]) AC_TRY_LINK([ #include #include @@ -70,6 +68,7 @@ AC_TRY_LINK([ ], [ AC_DEFINE(ATIMESPEC, st_atimespec, [atime for this platform]) AC_DEFINE(MTIMESPEC, st_mtimespec, [mtime for this platform]) + AC_MSG_RESULT([st_*timespec]) ], [ AC_TRY_LINK([ #include @@ -84,8 +83,29 @@ AC_TRY_LINK([ ], [ AC_DEFINE(ATIMESPEC, st_atim, [atime for this platform]) AC_DEFINE(MTIMESPEC, st_mtim, [mtime for this platform]) + AC_MSG_RESULT([st_*tim]) ] ) + ], [ + AC_MSG_ERROR([cannot determine]) + ] +) + +AC_MSG_CHECKING([if S_ISWHT can be used]) +AC_TRY_LINK([ + #include + #include + #ifdef HAVE_FCNTL_H + #include + #endif + ], [ + struct stat s; + if (S_ISWHT(s.st_mode)) {} + ], [ + AC_DEFINE(HAVE_S_ISWHT, 1, [defined when S_ISWHT exists]) + AC_MSG_RESULT([yes]) + ], [ + AC_MSG_RESULT([no]) ] ) diff --git a/src/chpathtool.c b/src/chpathtool.c index 032032def..b1295af04 100644 --- a/src/chpathtool.c +++ b/src/chpathtool.c @@ -211,7 +211,7 @@ int dirwalk(char *src, char *srcp, char *trg, char *trgp) { S_ISBLK(s.st_mode) || S_ISCHR(s.st_mode) || S_ISFIFO(s.st_mode) || -#ifdef _POSIX_C_SOURCE +#ifdef HAVE_S_ISWHT S_ISWHT(s.st_mode) || #endif S_ISSOCK(s.st_mode)