1
0
mirror of https://github.com/facebook/zstd.git synced 2025-07-30 22:23:13 +03:00

Merge pull request #1839 from bimbashrestha/named_pipes

Allowing named pipes to go through in zstdcli
This commit is contained in:
Yann Collet
2019-10-24 10:53:12 -07:00
committed by GitHub
5 changed files with 26 additions and 2 deletions

View File

@ -126,6 +126,19 @@ int UTIL_isSameFile(const char* fName1, const char* fName2)
#endif
}
U32 UTIL_isFIFO(const char* infilename)
{
/* macro guards, as defined in : https://linux.die.net/man/2/lstat */
#if PLATFORM_POSIX_VERSION >= 200112L
stat_t statbuf;
int r = UTIL_getFileStat(infilename, &statbuf);
if (!r && S_ISFIFO(statbuf.st_mode)) return 1;
#endif
(void)infilename;
return 0;
}
U32 UTIL_isLink(const char* infilename)
{
/* macro guards, as defined in : https://linux.die.net/man/2/lstat */