diff --git a/CMakeLists.txt b/CMakeLists.txt index f7c88b0..bd90490 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +1,5 @@ +set(CMAKE_LEGACY_CYGWIN_WIN32 0) + # 3.0.2 preferred, but we can often get by with 2.8. cmake_minimum_required(VERSION 2.8) if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} LESS 3.0.2) @@ -73,7 +75,7 @@ if (APPLE) endif() endif() -if (WIN32 OR APPLE) +if (CYGWIN OR WIN32 OR APPLE) set(DEFAULT_CASE_INSENSITIVE TRUE) else() set(DEFAULT_CASE_INSENSITIVE FALSE) @@ -83,6 +85,10 @@ endif() find_package (FUSE REQUIRED) include_directories (SYSTEM ${FUSE_INCLUDE_DIR}) add_definitions (-D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=29) +if (CYGWIN) + # Cygwin build is intended to use WinFsp + add_definitions(-DCYGFUSE) +endif() # Check for OpenSSL. find_package (OpenSSL REQUIRED) diff --git a/encfs/FileUtils.cpp b/encfs/FileUtils.cpp index 8f067f2..87a0ed4 100644 --- a/encfs/FileUtils.cpp +++ b/encfs/FileUtils.cpp @@ -1089,7 +1089,7 @@ RootPtr createV6Config(EncFS_Context *ctx, alg = findCipherAlgorithm("AES", keySize); // If case-insensitive system, opt for Block32 filename encoding -#if defined(__APPLE__) || defined(WIN32) +#if defined(DEFAULT_CASE_INSENSITIVE) nameIOIface = BlockNameIO::CurrentInterface(true); #else nameIOIface = BlockNameIO::CurrentInterface();