diff options
Diffstat (limited to 'programs/util.h')
-rw-r--r-- | programs/util.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/programs/util.h b/programs/util.h index d6e5bb550ec7..1f524f2934ad 100644 --- a/programs/util.h +++ b/programs/util.h @@ -25,17 +25,21 @@ extern "C" { #include <stdio.h> /* fprintf */ #include <sys/types.h> /* stat, utime */ #include <sys/stat.h> /* stat, chmod */ -#if defined(_MSC_VER) +#if defined(_WIN32) # include <sys/utime.h> /* utime */ # include <io.h> /* _chmod */ #else # include <unistd.h> /* chown, stat */ +#if PLATFORM_POSIX_VERSION < 200809L # include <utime.h> /* utime */ +#else +# include <fcntl.h> /* AT_FDCWD */ +# include <sys/stat.h> /* utimensat */ +#endif #endif #include <time.h> /* clock_t, clock, CLOCKS_PER_SEC, nanosleep */ #include "mem.h" /* U32, U64 */ - /*-************************************************************ * Avoid fseek()'s 2GiB barrier with MSVC, macOS, *BSD, MinGW ***************************************************************/ @@ -129,7 +133,13 @@ int UTIL_setFileStat(const char* filename, stat_t* statbuf); U32 UTIL_isDirectory(const char* infilename); int UTIL_getFileStat(const char* infilename, stat_t* statbuf); int UTIL_isSameFile(const char* file1, const char* file2); +int UTIL_compareStr(const void *p1, const void *p2); +int UTIL_isCompressedFile(const char* infilename, const char *extensionList[]); +const char* UTIL_getFileExtension(const char* infilename); +#ifndef _MSC_VER +U32 UTIL_isFIFO(const char* infilename); +#endif U32 UTIL_isLink(const char* infilename); #define UTIL_FILESIZE_UNKNOWN ((U64)(-1)) U64 UTIL_getFileSize(const char* infilename); |