diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake index 4313582dc..22b0066a0 100644 --- a/cmake/ConfigureChecks.cmake +++ b/cmake/ConfigureChecks.cmake @@ -19,11 +19,6 @@ if (CMAKE_HOST_SYSTEM_VERSION MATCHES ".*-Microsoft") SET(WSL 1) endif() -# Detect Cygwin. -if (CMAKE_SYSTEM_NAME MATCHES "CYGWIN_NT.*") - SET(CYGWIN 1) -endif() - # Set up the config.h file. SET(PACKAGE_NAME "fish") SET(PACKAGE_TARNAME "fish") diff --git a/config_cmake.h.in b/config_cmake.h.in index 2c6fde27d..8071546fd 100644 --- a/config_cmake.h.in +++ b/config_cmake.h.in @@ -4,9 +4,6 @@ /* Define to 1 if compiled on WSL */ #cmakedefine WSL 1 -/* Define to 1 if complied under Cygwin */ -#cmakedefine CYGWIN 1 - /* Define to 1 if you have the `clock_gettime' function. */ #cmakedefine HAVE_CLOCK_GETTIME 1 diff --git a/src/common.h b/src/common.h index d0436ff59..f0a4be570 100644 --- a/src/common.h +++ b/src/common.h @@ -978,7 +978,7 @@ constexpr bool is_windows_subsystem_for_linux() { /// Detect if we are running under Cygwin or Cgywin64 constexpr bool is_cygwin() { -#ifdef CYGWIN +#ifdef __CYGWIN__ return true; #else return false;