Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/create-test-plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class SdlPlatform(Enum):
Haiku = "haiku"
LoongArch64 = "loongarch64"
Msys2 = "msys2"
Cygwin = "cygwin"
Linux = "linux"
MacOS = "macos"
Ios = "ios"
Expand Down Expand Up @@ -111,6 +112,7 @@ class JobSpec:
"msys2-mingw64": JobSpec(name="Windows (msys2, mingw64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msys2, artifact="SDL-mingw64", msys2_platform=Msys2Platform.Mingw64, ),
"msys2-clang64": JobSpec(name="Windows (msys2, clang64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msys2, artifact="SDL-mingw64-clang", msys2_platform=Msys2Platform.Clang64, ),
"msys2-ucrt64": JobSpec(name="Windows (msys2, ucrt64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msys2, artifact="SDL-mingw64-ucrt", msys2_platform=Msys2Platform.Ucrt64, ),
"cygwin": JobSpec(name="Cygwin", os=JobOs.WindowsLatest, platform=SdlPlatform.Cygwin, artifact="SDL-cygwin", ),
"msvc-x64": JobSpec(name="Windows (MSVC, x64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-x64", msvc_arch=MsvcArch.X64, msvc_project="VisualC/SDL.sln", ),
"msvc-x86": JobSpec(name="Windows (MSVC, x86)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-VC-x86", msvc_arch=MsvcArch.X86, msvc_project="VisualC/SDL.sln", ),
"msvc-clang-x64": JobSpec(name="Windows (MSVC, clang-cl x64)", os=JobOs.WindowsLatest, platform=SdlPlatform.Msvc, artifact="SDL-clang-cl-x64", msvc_arch=MsvcArch.X64, clang_cl=True, ),
Expand Down Expand Up @@ -162,6 +164,7 @@ class StaticLibType(Enum):

class SharedLibType(Enum):
WIN32 = "SDL3.dll"
CYGDLL = "cygSDL3.dll"
SO_0 = "libSDL3.so.0"
SO = "libSDL3.so"
DYLIB = "libSDL3.0.dylib"
Expand Down Expand Up @@ -217,6 +220,7 @@ class JobDetails:
intel: bool = False
msys2_msystem: str = ""
msys2_packages: list[str] = dataclasses.field(default_factory=list)
cygwin_packages: list[str] = dataclasses.field(default_factory=list)
werror: bool = True
microsoft_gameinput_version: str = ""
msvc_vcvars_arch: str = ""
Expand Down Expand Up @@ -254,6 +258,7 @@ def to_workflow(self, enable_artifacts: bool) -> dict[str, str|bool]:
"shell": self.shell,
"msys2-msystem": self.msys2_msystem,
"msys2-packages": my_shlex_join(self.msys2_packages),
"cygwin-packages": my_shlex_join(self.cygwin_packages),
"android-ndk": self.android_ndk,
"java": self.java,
"intel": self.intel,
Expand Down Expand Up @@ -773,6 +778,24 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool, ctest_args
job.microsoft_gameinput_version = WINDOWS_GAMEINPUT_VERSION
job.cflags.append("-I$GAMEINPUT_INCLUDE")
job.cxxflags.append("-I$GAMEINPUT_INCLUDE")
case SdlPlatform.Cygwin:
job.ccache = False # Missing evict-older-than option
job.clang_tidy = False # error finding files [clang-diagnostic-error] cause might be space in command path
job.test_pkg_config = False # Linefeed issue in test_pkgconfig.sh
job.shell = "bash --noprofile --norc -eo pipefail -o igncr {0}"
job.shared_lib = SharedLibType.CYGDLL
job.static_lib = StaticLibType.A
job.cmake_arguments.append("-DSDLTEST_GDB=ON")
job.cygwin_packages.extend([
"cmake",
"gcc-core",
"gcc-g++",
"gdb",
"ninja",
"pkg-config",
"perl",
"python",
])
case SdlPlatform.Riscos:
job.ccache = False # FIXME: enable when container gets upgrade
# FIXME: Enable SDL_WERROR
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/generic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ jobs:
with:
msystem: ${{ matrix.platform.msys2-msystem }}
install: ${{ matrix.platform.msys2-packages }}
- name: 'Set up Cygwin'
if: ${{ matrix.platform.platform == 'cygwin' }}
uses: cygwin/cygwin-install-action@master
with:
packages: ${{ matrix.platform.cygwin-packages }}
- name: 'About this job'
run: |
echo "key=${{ matrix.platform.key }}"
Expand Down
35 changes: 11 additions & 24 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -369,9 +369,9 @@ dep_option(SDL_WAYLAND_LIBDECOR_SHARED "Dynamically load libdecor support" O
dep_option(SDL_RPI "Use Raspberry Pi video driver" ON "SDL_VIDEO;UNIX_SYS;SDL_CPU_ARM32 OR SDL_CPU_ARM64" OFF)
dep_option(SDL_ROCKCHIP "Use ROCKCHIP Hardware Acceleration video driver" ON "SDL_VIDEO;UNIX_SYS;SDL_CPU_ARM32 OR SDL_CPU_ARM64" OFF)
dep_option(SDL_COCOA "Use Cocoa video driver" ON "APPLE" OFF)
dep_option(SDL_DIRECTX "Use DirectX for Windows audio/video" ON "SDL_AUDIO OR SDL_VIDEO;WINDOWS" OFF)
dep_option(SDL_XINPUT "Use Xinput for Windows" ON "WINDOWS" OFF)
dep_option(SDL_WASAPI "Use the Windows WASAPI audio driver" ON "WINDOWS;SDL_AUDIO" OFF)
dep_option(SDL_DIRECTX "Use DirectX for Windows audio/video" ON "SDL_AUDIO OR SDL_VIDEO;WINDOWS OR CYGWIN" OFF)
dep_option(SDL_XINPUT "Use Xinput for Windows" ON "WINDOWS OR CYGWIN" OFF)
dep_option(SDL_WASAPI "Use the Windows WASAPI audio driver" ON "WINDOWS OR CYGWIN;SDL_AUDIO" OFF)
dep_option(SDL_RENDER_D3D "Enable the Direct3D 9 render driver" ON "SDL_RENDER;SDL_DIRECTX" OFF)
dep_option(SDL_RENDER_D3D11 "Enable the Direct3D 11 render driver" ON "SDL_RENDER;SDL_DIRECTX" OFF)
dep_option(SDL_RENDER_D3D12 "Enable the Direct3D 12 render driver" ON "SDL_RENDER;SDL_DIRECTX" OFF)
Expand Down Expand Up @@ -565,19 +565,6 @@ else()
endif()
endif()

if(CYGWIN)
# We build SDL on cygwin without the UNIX emulation layer
sdl_include_directories(PUBLIC SYSTEM "/usr/include/mingw")
cmake_push_check_state()
string(APPEND CMAKE_REQUIRED_FLAGS " -mno-cygwin")
check_c_source_compiles("int main(int argc, char **argv) { return 0; }"
HAVE_GCC_NO_CYGWIN)
cmake_pop_check_state()
if(HAVE_GCC_NO_CYGWIN)
sdl_shared_link_options("-mno-cygwin")
endif()
endif()

# General includes
sdl_compile_definitions(PRIVATE "USING_GENERATED_CONFIG_H")
sdl_include_directories(
Expand Down Expand Up @@ -1165,7 +1152,7 @@ if(SDL_LIBC)
vsnprintf vsscanf
wcsnlen wcscmp wcsdup wcslcat wcslcpy wcslen wcsncmp wcsstr wcstol
)
if(WINDOWS)
if(WINDOWS OR CYGWIN)
list(APPEND symbols_to_check
_copysign _fseeki64 _strrev _ui64toa _uitoa _ultoa _wcsdup
)
Expand Down Expand Up @@ -1444,7 +1431,7 @@ if(SDL_CAMERA)
#endif()
endif()

if(UNIX OR APPLE)
if((UNIX OR APPLE) AND NOT CYGWIN)
# Relevant for Unix/Darwin only
set(DYNAPI_NEEDS_DLOPEN 1)
CheckDLOPEN()
Expand Down Expand Up @@ -1843,7 +1830,7 @@ elseif(EMSCRIPTEN)
CheckPTHREAD()
CheckLibUnwind()

elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
elseif(UNIX AND NOT (APPLE OR RISCOS OR HAIKU OR CYGWIN))

set(SDL_DISABLE_DLOPEN_NOTES TRUE)
if(SDL_DLOPEN_NOTES)
Expand Down Expand Up @@ -2234,7 +2221,7 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
set (HAVE_VSNPRINTF 0)
set (USE_POSIX_SPAWN 1)
endif()
elseif(WINDOWS)
elseif(WINDOWS OR CYGWIN)
enable_language(CXX)
check_c_source_compiles("
#include <windows.h>
Expand Down Expand Up @@ -2268,7 +2255,7 @@ elseif(WINDOWS)
if(DEFINED MSVC_VERSION AND NOT ${MSVC_VERSION} LESS 1700)
set(USE_WINSDK_DIRECTX TRUE)
endif()
if(NOT MINGW AND NOT USE_WINSDK_DIRECTX)
if(NOT (MINGW OR CYGWIN) AND NOT USE_WINSDK_DIRECTX)
if("$ENV{DXSDK_DIR}" STREQUAL "")
message(FATAL_ERROR "DIRECTX requires the \$DXSDK_DIR environment variable to be set")
endif()
Expand All @@ -2287,7 +2274,7 @@ elseif(WINDOWS)
cmake_pop_check_state()
if(HAVE_D3D9_H OR HAVE_D3D11_H OR HAVE_DDRAW_H OR HAVE_DSOUND_H OR HAVE_DINPUT_H)
set(HAVE_DIRECTX TRUE)
if(NOT MINGW AND NOT USE_WINSDK_DIRECTX)
if(NOT (MINGW OR CYGWIN) AND NOT USE_WINSDK_DIRECTX)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(PROCESSOR_ARCH "x64")
else()
Expand Down Expand Up @@ -4104,13 +4091,13 @@ if(SDL_SHARED)
RESOURCE "${SDL_FRAMEWORK_RESOURCES}"
)
endif()
elseif(UNIX AND NOT ANDROID)
elseif(UNIX AND NOT (ANDROID OR CYGWIN))
set_target_properties(SDL3-shared PROPERTIES
VERSION "${SDL_SO_VERSION}"
SOVERSION "${SDL_SO_VERSION_MAJOR}"
)
else()
if(WINDOWS OR CYGWIN)
if(WINDOWS)
set_target_properties(SDL3-shared PROPERTIES
PREFIX ""
)
Expand Down
2 changes: 1 addition & 1 deletion cmake/macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ function(SDL_PrintSummary)
message(STATUS "")
endif()

if(UNIX AND NOT (ANDROID OR APPLE OR EMSCRIPTEN OR HAIKU OR RISCOS OR DJGPP))
if(UNIX AND NOT (ANDROID OR APPLE OR EMSCRIPTEN OR HAIKU OR RISCOS OR DJGPP OR CYGWIN))
if(NOT (HAVE_X11 OR HAVE_WAYLAND))
if(NOT SDL_UNIX_CONSOLE_BUILD)
message(FATAL_ERROR
Expand Down
4 changes: 4 additions & 0 deletions cmake/sdlplatform.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ function(SDL_DetectCMakePlatform)
set(sdl_cmake_platform Windows)
elseif(PSP)
set(sdl_cmake_platform psp)
elseif(CYGWIN AND NOT MSYS)
set(sdl_cmake_platform Cygwin)
elseif(MSYS)
set(sdl_cmake_platform Msys)
elseif(APPLE)
if(CMAKE_SYSTEM_NAME MATCHES ".*(Darwin|MacOS).*")
set(sdl_cmake_platform macOS)
Expand Down
2 changes: 1 addition & 1 deletion include/SDL3/SDL_opengl.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
# else
# define GLAPIENTRY __stdcall
# endif
#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */
#elif defined(__CYGWIN__) /* && defined(USE_OPENGL32) */ /* use native windows opengl32 */
# define GLAPI extern
# define GLAPIENTRY __stdcall
#elif (defined(__GNUC__) && __GNUC__ >= 4) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
Expand Down
4 changes: 2 additions & 2 deletions include/SDL3/SDL_platform_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@
#define SDL_PLATFORM_CYGWIN 1
#endif

#if (defined(_WIN32) || defined(SDL_PLATFORM_CYGWIN)) && !defined(__NGAGE__)
#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(__NGAGE__)

/**
* A preprocessor macro that is only defined if compiling for Windows.
Expand Down Expand Up @@ -417,7 +417,7 @@
#define SDL_PLATFORM_WIN32 1

#endif
#endif /* defined(_WIN32) || defined(SDL_PLATFORM_CYGWIN) */
#endif /* (defined(_WIN32) || defined(__CYGWIN__)) && !defined(__NGAGE__) */


/* This is to support generic "any GDK" separate from a platform-specific GDK */
Expand Down
10 changes: 5 additions & 5 deletions include/SDL3/SDL_stdinc.h
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ typedef Sint64 SDL_Time;
* <inttypes.h> should define these but this is not true all platforms.
* (for example win32) */
#ifndef SDL_PRIs64
#if defined(SDL_PLATFORM_WINDOWS)
#if defined(SDL_PLATFORM_WINDOWS) && !defined(SDL_PLATFORM_CYGWIN)
#define SDL_PRIs64 "I64d"
#elif defined(PRId64)
#define SDL_PRIs64 PRId64
Expand All @@ -750,7 +750,7 @@ typedef Sint64 SDL_Time;
#endif
#endif
#ifndef SDL_PRIu64
#if defined(SDL_PLATFORM_WINDOWS)
#if defined(SDL_PLATFORM_WINDOWS) && !defined(SDL_PLATFORM_CYGWIN)
#define SDL_PRIu64 "I64u"
#elif defined(PRIu64)
#define SDL_PRIu64 PRIu64
Expand All @@ -761,7 +761,7 @@ typedef Sint64 SDL_Time;
#endif
#endif
#ifndef SDL_PRIx64
#if defined(SDL_PLATFORM_WINDOWS)
#if defined(SDL_PLATFORM_WINDOWS) && !defined(SDL_PLATFORM_CYGWIN)
#define SDL_PRIx64 "I64x"
#elif defined(PRIx64)
#define SDL_PRIx64 PRIx64
Expand All @@ -772,7 +772,7 @@ typedef Sint64 SDL_Time;
#endif
#endif
#ifndef SDL_PRIX64
#if defined(SDL_PLATFORM_WINDOWS)
#if defined(SDL_PLATFORM_WINDOWS) && !defined(SDL_PLATFORM_CYGWIN)
#define SDL_PRIX64 "I64X"
#elif defined(PRIX64)
#define SDL_PRIX64 PRIX64
Expand Down Expand Up @@ -811,7 +811,7 @@ typedef Sint64 SDL_Time;
#endif
#endif
/* Specifically for the `long long` -- SDL-specific. */
#ifdef SDL_PLATFORM_WINDOWS
#if defined(SDL_PLATFORM_WINDOWS) && !defined(SDL_PLATFORM_CYGWIN)
#ifndef SDL_NOLONGLONG
SDL_COMPILE_TIME_ASSERT(longlong_size64, sizeof(long long) == 8); /* using I64 for windows - make sure `long long` is 64 bits. */
#endif
Expand Down
4 changes: 2 additions & 2 deletions include/SDL3/SDL_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
/* Thread synchronization primitives */
#include <SDL3/SDL_atomic.h>

#if defined(SDL_PLATFORM_WINDOWS)
#if defined(SDL_PLATFORM_WINDOWS) && !defined(SDL_PLATFORM_CYGWIN)
#include <process.h> /* _beginthreadex() and _endthreadex() */
#endif

Expand Down Expand Up @@ -296,7 +296,7 @@ extern SDL_DECLSPEC SDL_Thread * SDLCALL SDL_CreateThreadWithProperties(SDL_Prop

/* The real implementation, hidden from the wiki, so it can show this as real functions that don't have macro magic. */
#ifndef SDL_WIKI_DOCUMENTATION_SECTION
# if defined(SDL_PLATFORM_WINDOWS)
# if defined(SDL_PLATFORM_WINDOWS) && !defined(SDL_PLATFORM_CYGWIN)
# ifndef SDL_BeginThreadFunction
# define SDL_BeginThreadFunction _beginthreadex
# endif
Expand Down
2 changes: 2 additions & 0 deletions src/SDL.c
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,8 @@ const char *SDL_GetPlatform(void)
return "Solaris";
#elif defined(SDL_PLATFORM_WIN32)
return "Windows";
#elif defined(SDL_PLATFORM_CYGWIN)
return "Cygwin";
#elif defined(SDL_PLATFORM_WINGDK)
return "WinGDK";
#elif defined(SDL_PLATFORM_XBOXONE)
Expand Down
2 changes: 1 addition & 1 deletion src/audio/wasapi/SDL_wasapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ static bool mgmtthrtask_PrepDevice(void *userdata)
ret = IAudioClient2_SetClientProperties(client2, &audioProps);
if (FAILED(ret)) {
// This isn't fatal, let's log it instead of failing
SDL_LogWarn(SDL_LOG_CATEGORY_AUDIO, "IAudioClient2_SetClientProperties failed: 0x%lx", ret);
SDL_LogWarn(SDL_LOG_CATEGORY_AUDIO, "IAudioClient2_SetClientProperties failed: 0x%" SDL_PRIxSLONG, ret);
}
IAudioClient2_Release(client2);
}
Expand Down
10 changes: 10 additions & 0 deletions src/core/windows/SDL_windows.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,16 @@
#define SDL_tcsstr SDL_strstr
#endif

#if defined(__LP64__)
#define SDL_PRIdSLONG "d"
#define SDL_PRIuULONG "u"
#define SDL_PRIxSLONG "x"
#else
#define SDL_PRIdSLONG "ld"
#define SDL_PRIuULONG "lu"
#define SDL_PRIxSLONG "lx"
#endif
Comment thread
stahta01 marked this conversation as resolved.

// Set up for C function definitions, even when using C++
#ifdef __cplusplus
extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion src/dialog/windows/SDL_windowsdialog.c
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ void windows_ShowFileDialog(void *ptr)
const char *opts[1] = { NULL };
callback(userdata, opts, getFilterIndex(dialog.nFilterIndex));
} else {
SDL_SetError("Windows error, CommDlgExtendedError: %ld", pCommDlgExtendedError());
SDL_SetError("Windows error, CommDlgExtendedError: %" SDL_PRIuULONG, pCommDlgExtendedError());
callback(userdata, NULL, -1);
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/dynapi/SDL_dynapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
// These headers have system specific definitions, so aren't included above
#include <SDL3/SDL_vulkan.h>

#if defined(WIN32) || defined(_WIN32) || defined(SDL_PLATFORM_CYGWIN)
#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN 1
#endif
Expand Down Expand Up @@ -451,7 +451,7 @@ Sint32 SDL_DYNAPI_entry(Uint32 apiver, void *table, Uint32 tablesize)

// Obviously we can't use SDL_LoadObject() to load SDL. :)
// Also obviously, we never close the loaded library, once we accept it.
#if defined(WIN32) || defined(_WIN32) || defined(SDL_PLATFORM_CYGWIN)
#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
static HMODULE sdlapi_lib = NULL; // The handle to the other SDL library, loaded with SDL_DYNAMIC_API_ENVVAR

static SDL_INLINE void unload_sdlapi_library(void)
Expand Down Expand Up @@ -509,7 +509,7 @@ static void dynapi_warn(const char *msg)
const char *caption = "SDL Dynamic API Failure!";
(void)caption;
// SDL_ShowSimpleMessageBox() is a too heavy for here.
#if (defined(WIN32) || defined(_WIN32) || defined(SDL_PLATFORM_CYGWIN)) && !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
#if (defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)) && !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
MessageBoxA(NULL, msg, caption, MB_OK | MB_ICONERROR);
#elif defined(HAVE_STDIO_H)
fprintf(stderr, "\n\n%s\n%s\n\n", caption, msg);
Expand Down
4 changes: 2 additions & 2 deletions src/gpu/d3d12/SDL_gpu_d3d12.c
Original file line number Diff line number Diff line change
Expand Up @@ -9036,15 +9036,15 @@ static bool D3D12_INTERNAL_GetAdapterByLuid(LUID luid, IDXGIFactory1 *factory, I
IDXGIAdapter1 *adapter;
res = IDXGIFactory1_EnumAdapters1(factory, adapterIndex, &adapter);
if (FAILED(res)) {
SDL_LogError(SDL_LOG_CATEGORY_GPU, "Failed to get an adapter when iterating, i: %d, res: %ld", adapterIndex, res);
SDL_LogError(SDL_LOG_CATEGORY_GPU, "Failed to get an adapter when iterating, i: %d, res: %" SDL_PRIdSLONG, adapterIndex, res);
return false;
}

DXGI_ADAPTER_DESC1 adapterDesc;
res = IDXGIAdapter1_GetDesc1(adapter, &adapterDesc);
if (FAILED(res)) {
IDXGIAdapter1_Release(adapter);
SDL_LogError(SDL_LOG_CATEGORY_GPU, "Failed to get description of adapter, i: %d, res %ld", adapterIndex, res);
SDL_LogError(SDL_LOG_CATEGORY_GPU, "Failed to get description of adapter, i: %d, res %" SDL_PRIdSLONG, adapterIndex, res);
return false;
}
if (SDL_memcmp(&adapterDesc.AdapterLuid, &luid, sizeof(luid)) == 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/hidapi/windows/hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ typedef LONG NTSTATUS;
#define _WIN32_WINNT_WIN8 0x0602
#endif

#ifdef __CYGWIN__
#if defined(__CYGWIN__) && !defined(HIDAPI_USING_SDL_RUNTIME)
#include <ntdef.h>
#include <wctype.h>
#define _wcsdup wcsdup
Expand Down
Loading