Use standard __CYGWIN__ define for Cygwin detection

(cherry picked from commit 462cb6044c)
This commit is contained in:
Mahmoud Al-Qudsi 2019-01-21 20:06:16 -06:00
parent 91ac0f1b18
commit a5ef1e395e
3 changed files with 1 additions and 9 deletions

View File

@ -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")

View File

@ -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

View File

@ -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;