aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt3
-rw-r--r--config/config.h.in2
-rw-r--r--src/nvim/os_unix_defs.h19
3 files changed, 4 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c56e883f24..a026af7a1a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,6 +27,9 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem ")
endif()
+
+ # Enable fixing case-insensitive filenames for Mac.
+ set(USE_FNAME_CASE TRUE)
endif()
# Set available build types for CMake GUIs.
diff --git a/config/config.h.in b/config/config.h.in
index 8f3d154553..382b5c653d 100644
--- a/config/config.h.in
+++ b/config/config.h.in
@@ -15,7 +15,6 @@
#cmakedefine HAVE__NSGETENVIRON
#cmakedefine HAVE_CRT_EXTERNS_H
-#cmakedefine HAVE_DIRENT_H
#cmakedefine HAVE_FCNTL_H
#cmakedefine HAVE_FD_CLOEXEC
#cmakedefine HAVE_FSEEKO
@@ -60,6 +59,7 @@
#define SIGRETURN return
#define TIME_WITH_SYS_TIME 1
#cmakedefine UNIX
+#cmakedefine USE_FNAME_CASE
#define USEMAN_S 1
#define FEAT_BROWSE
diff --git a/src/nvim/os_unix_defs.h b/src/nvim/os_unix_defs.h
index 4ffd23aa25..24b069b090 100644
--- a/src/nvim/os_unix_defs.h
+++ b/src/nvim/os_unix_defs.h
@@ -44,25 +44,6 @@
# define SIGDUMMYARG
#endif
-#ifdef HAVE_DIRENT_H
-# include <dirent.h>
-# ifndef NAMLEN
-# define NAMLEN(dirent) strlen((dirent)->d_name)
-# endif
-#else
-# define dirent direct
-# define NAMLEN(dirent) (dirent)->d_namlen
-# if HAVE_SYS_NDIR_H
-# include <sys/ndir.h>
-# endif
-# if HAVE_SYS_DIR_H
-# include <sys/dir.h>
-# endif
-# if HAVE_NDIR_H
-# include <ndir.h>
-# endif
-#endif
-
#if !defined(HAVE_SYS_TIME_H) || defined(TIME_WITH_SYS_TIME)
# include <time.h> /* on some systems time.h should not be
included together with sys/time.h */