summaryrefslogtreecommitdiffstats
path: root/programs
diff options
context:
space:
mode:
authorPrzemyslaw Skibinski <inikep@gmail.com>2016-12-22 09:58:58 (GMT)
committerPrzemyslaw Skibinski <inikep@gmail.com>2016-12-22 09:58:58 (GMT)
commitfea95c156761ee10d32a4f12105ebd90c67d4f47 (patch)
treeec2cffd748088b15927b85282444baef5b243fc5 /programs
parente6af952f8495de3a9e3cabb9a21e0ba4d7d28ff0 (diff)
downloadlz4-fea95c156761ee10d32a4f12105ebd90c67d4f47.zip
lz4-fea95c156761ee10d32a4f12105ebd90c67d4f47.tar.gz
lz4-fea95c156761ee10d32a4f12105ebd90c67d4f47.tar.bz2
use FindFirstFileA and FindNextFileA on Windows
Diffstat (limited to 'programs')
-rw-r--r--programs/lz4io.c2
-rw-r--r--programs/util.h6
2 files changed, 4 insertions, 4 deletions
diff --git a/programs/lz4io.c b/programs/lz4io.c
index e8370ea..640c76d 100644
--- a/programs/lz4io.c
+++ b/programs/lz4io.c
@@ -49,7 +49,7 @@
#include "util.h" /* UTIL_getFileStat, UTIL_setFileStat */
#include <stdio.h> /* fprintf, fopen, fread, stdin, stdout, fflush, getchar */
#include <stdlib.h> /* malloc, free */
-#include <string.h> /* strcmp, strlen */
+#include <string.h> /* strerror, strcmp, strlen */
#include <time.h> /* clock */
#include <sys/types.h> /* stat64 */
#include <sys/stat.h> /* stat64 */
diff --git a/programs/util.h b/programs/util.h
index c670c20..f3ff1b2 100644
--- a/programs/util.h
+++ b/programs/util.h
@@ -283,7 +283,7 @@ UTIL_STATIC int UTIL_prepareFileList(const char *dirName, char** bufStart, size_
{
char* path;
int dirLength, fnameLength, pathLength, nbFiles = 0;
- WIN32_FIND_DATA cFile;
+ WIN32_FIND_DATAA cFile;
HANDLE hFile;
dirLength = (int)strlen(dirName);
@@ -295,7 +295,7 @@ UTIL_STATIC int UTIL_prepareFileList(const char *dirName, char** bufStart, size_
path[dirLength+1] = '*';
path[dirLength+2] = 0;
- hFile=FindFirstFile(path, &cFile);
+ hFile=FindFirstFileA(path, &cFile);
if (hFile == INVALID_HANDLE_VALUE) {
fprintf(stderr, "Cannot open directory '%s'\n", dirName);
return 0;
@@ -332,7 +332,7 @@ UTIL_STATIC int UTIL_prepareFileList(const char *dirName, char** bufStart, size_
}
}
free(path);
- } while (FindNextFile(hFile, &cFile));
+ } while (FindNextFileA(hFile, &cFile));
FindClose(hFile);
return nbFiles;