1
mirror of https://code.videolan.org/videolan/vlc synced 2024-09-28 23:09:59 +02:00

vlc_fixups: add some fixups for the official Windows SDK

Only used with clan-cl for now.

dirent.h support is disabled. In the end it's never used by code compiled
for Windows.
This commit is contained in:
Steve Lhomme 2023-01-02 17:10:55 +01:00
parent ebb6292915
commit 9c863ef17d

View File

@ -26,6 +26,28 @@
#ifndef LIBVLC_FIXUPS_H
# define LIBVLC_FIXUPS_H 1
#if defined(_MSC_VER)
// disable common warnings when compiling POSIX code
#define _CRT_NONSTDC_NO_WARNINGS 1
#define _CRT_SECURE_NO_WARNINGS 1
// sys/stat.h values
#define S_IWUSR _S_IWRITE
#define S_IRUSR _S_IREAD
#define S_IFIFO _S_IFIFO
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#define S_ISBLK(m) (0)
// same type as statXXX structures st_mode field
typedef unsigned short mode_t;
// no compat, but there's an MSVC equivalent
#define strncasecmp _strnicmp
#define snwprintf _snwprintf
#endif // _MSC_VER
#ifdef _WIN32
// avoid collision between numeric_limits::max() and max define
#define NOMINMAX