From 82c36970b8bc31ef1c0b18031f59c80e759303da Mon Sep 17 00:00:00 2001 From: Rui Abreu Ferreira Date: Tue, 1 Jul 2014 10:25:51 +0100 Subject: [PATCH 1/2] Dont require setenv() in non Unix systems config/CMakeLists.txt failed with a fatal error if the functions setenv could not be found, however this functions only exist in Unix systems. --- config/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/CMakeLists.txt b/config/CMakeLists.txt index cdf31a8966..fc36389df4 100644 --- a/config/CMakeLists.txt +++ b/config/CMakeLists.txt @@ -59,7 +59,7 @@ check_function_exists(putenv HAVE_PUTENV) check_function_exists(opendir HAVE_OPENDIR) check_function_exists(readlink HAVE_READLINK) check_function_exists(setenv HAVE_SETENV) -if(NOT HAVE_SETENV) +if(UNIX AND NOT HAVE_SETENV) message(SEND_ERROR "setenv() function not found on your system.") endif() check_function_exists(unsetenv HAVE_UNSETENV) From 99aacb142909c8a3d57e9ebe4c3c1fc9e203e210 Mon Sep 17 00:00:00 2001 From: Rui Abreu Ferreira Date: Wed, 20 May 2015 21:24:58 +0100 Subject: [PATCH 2/2] cmake: Remove unneeded platform checks Removed unneeded platform checks from config/config.h.in and config/CMakeLists.txt - HAVE_OSPEED and HAVE_UP_BC_PC were used by the old UI, and are no longer needed. - sigvec() was used as part of the signal handling code in os_unix.c, but it is no longer used in Neovim. - The function lstat() is no longer used, replaced with libuv. --- config/CMakeLists.txt | 6 ------ config/config.h.in | 4 ---- 2 files changed, 10 deletions(-) diff --git a/config/CMakeLists.txt b/config/CMakeLists.txt index fc36389df4..19977e5916 100644 --- a/config/CMakeLists.txt +++ b/config/CMakeLists.txt @@ -50,11 +50,6 @@ if(JEMALLOC_FOUND) set(HAVE_JEMALLOC 1) endif() -check_function_exists(lstat HAVE_LSTAT) -if(NOT HAVE_LSTAT) - # os_unix.c uses lstat.c - message(SEND_ERROR "lstat() function not found on your system.") -endif() check_function_exists(putenv HAVE_PUTENV) check_function_exists(opendir HAVE_OPENDIR) check_function_exists(readlink HAVE_READLINK) @@ -66,7 +61,6 @@ check_function_exists(unsetenv HAVE_UNSETENV) check_function_exists(setpgid HAVE_SETPGID) check_function_exists(setsid HAVE_SETSID) check_function_exists(sigaction HAVE_SIGACTION) -check_function_exists(sigvec HAVE_SIGVEC) check_function_exists(strcasecmp HAVE_STRCASECMP) check_function_exists(strncasecmp HAVE_STRNCASECMP) check_function_exists(utime HAVE_UTIME) diff --git a/config/config.h.in b/config/config.h.in index d7f3913e27..920173f737 100644 --- a/config/config.h.in +++ b/config/config.h.in @@ -27,10 +27,8 @@ #cmakedefine HAVE_LANGINFO_H #cmakedefine HAVE_LIBGEN_H #cmakedefine HAVE_LOCALE_H -#cmakedefine HAVE_LSTAT #cmakedefine HAVE_NL_LANGINFO_CODESET #cmakedefine HAVE_NL_MSG_CAT_CNTR -#define HAVE_OSPEED 1 #cmakedefine HAVE_PUTENV #cmakedefine HAVE_PWD_H #cmakedefine HAVE_READLINK @@ -41,7 +39,6 @@ #cmakedefine HAVE_SETPGID #cmakedefine HAVE_SETSID #cmakedefine HAVE_SIGACTION -#cmakedefine HAVE_SIGVEC #cmakedefine HAVE_STRCASECMP #cmakedefine HAVE_STRINGS_H #cmakedefine HAVE_STRNCASECMP @@ -51,7 +48,6 @@ #cmakedefine HAVE_SYS_UTSNAME_H #cmakedefine HAVE_SYS_WAIT_H #cmakedefine HAVE_UNISTD_H -#define HAVE_UP_BC_PC 1 #cmakedefine HAVE_UTIME #cmakedefine HAVE_UTIME_H #cmakedefine HAVE_UTIMES