return NULL;
}
+#ifdef _MSC_VER
+
+ if (!UTIL_isRegularFile(srcFileName)) {
+ DISPLAYLEVEL(1, "zstd: %s is not a regular file -- ignored \n",
+ srcFileName);
+ return NULL;
+ }
+
+#else
+
if (!UTIL_isRegularFile(srcFileName) && !UTIL_isFIFO(srcFileName)) {
DISPLAYLEVEL(1, "zstd: %s is not a regular file -- ignored \n",
srcFileName);
return NULL;
}
+#endif /* _MSC_VER */
+
{ FILE* const f = fopen(srcFileName, "rb");
if (f == NULL)
DISPLAYLEVEL(1, "zstd: %s: %s \n", srcFileName, strerror(errno));
if (!followLinks) {
unsigned u;
for (u=0, fileNamesNb=0; u<filenameIdx; u++) {
+
+#ifdef _MSC_VER
+
+ if (UTIL_isLink(filenameTable[u])) {
+ DISPLAYLEVEL(2, "Warning : %s is a symbolic link, ignoring\n", filenameTable[u]);
+ } else {
+ filenameTable[fileNamesNb++] = filenameTable[u];
+ }
+
+#else
+
if (UTIL_isLink(filenameTable[u]) && !UTIL_isFIFO(filenameTable[u])) {
DISPLAYLEVEL(2, "Warning : %s is a symbolic link, ignoring\n", filenameTable[u]);
} else {
filenameTable[fileNamesNb++] = filenameTable[u];
}
+
+#endif /* _MSC_VER */
+
}
if (fileNamesNb == 0 && filenameIdx > 0)
CLEAN_RETURN(1);
rm -f tmp* dictionary
+if [ "$isWindows" = false ] ; then
+
println "\n===> zstd fifo named pipe test "
head -c 10 /dev/zero > tmp_original
mkfifo named_pipe
rm -rf tmp*
rm -rf named_pipe
+fi
+
rm -f tmp*