Use autoconf glue around new my_is_symlink to avoid stat(2) and friends

being used on systems which don't support that interface.
This commit is contained in:
Jonathan Perkin 2008-08-04 11:39:05 +02:00 committed by mysqldev
parent 4c78c6f7bf
commit 403c3e6f2e

View File

@ -109,8 +109,12 @@ int my_symlink(const char *content, const char *linkname, myf MyFlags)
int my_is_symlink(const char *filename __attribute__((unused)))
{
#if defined(HAVE_REALPATH) && !defined(HAVE_purify) && !defined(HAVE_BROKEN_REALPATH)
struct stat stat_buff;
return !lstat(filename, &stat_buff) && S_ISLNK(stat_buff.st_mode);
#else
return 0;
#endif
}