From 462cb6044c5c2f78cf7e23c52af495c6f5e33d91 Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Mon, 21 Jan 2019 20:06:16 -0600 Subject: [PATCH] Use standard __CYGWIN__ define for Cygwin detection --- cmake/ConfigureChecks.cmake | 5 ----- config_cmake.h.in | 3 --- src/common.h | 2 +- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake index c53be74ae..a13dbdbd5 100644 --- a/cmake/ConfigureChecks.cmake +++ b/cmake/ConfigureChecks.cmake @@ -43,11 +43,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 d52204929..8b45a808c 100644 --- a/src/common.h +++ b/src/common.h @@ -949,7 +949,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;