diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2014-04-03 19:03:49 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2014-04-03 19:03:49 +0100 |
| commit | c0e7975f62a08140af8b77991aaa2be105f17b49 (patch) | |
| tree | b757d30410cdd9122106e3d5b4291ef488c6ec4b /src | |
| parent | cc591f015fe6ac598fef2c52046f6b790c632910 (diff) | |
| parent | 43b395533fcf8ae34d702de6238b6039fe1fa821 (diff) | |
Merge remote-tracking branch 'jjthrash/osx-fixes'
Diffstat (limited to 'src')
| -rw-r--r-- | src/Makefile | 13 | ||||
| -rw-r--r-- | src/keys.cc | 2 | ||||
| -rw-r--r-- | src/ncurses.cc | 5 | ||||
| -rw-r--r-- | src/normal.cc | 2 |
4 files changed, 18 insertions, 4 deletions
diff --git a/src/Makefile b/src/Makefile index 40af3ce8..7ff4eb00 100644 --- a/src/Makefile +++ b/src/Makefile @@ -10,15 +10,24 @@ sharedir := $(DESTDIR)$(PREFIX)/share/kak docdir := $(DESTDIR)$(PREFIX)/share/doc/kak CXXFLAGS += -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -pedantic -LIBS += -lncursesw -os := $(shell uname -o) +os := $(shell uname) + +ifeq ($(os),Darwin) + LIBS += -lncurses +else + LIBS += -lncursesw +endif + ifeq ($(os),Cygwin) LIBS += -lboost_regex-mt +else ifeq ($(os),Darwin) + LIBS += -lboost_regex-mt else LIBS += -lboost_regex endif + debug ?= yes ifeq ($(debug),yes) CXXFLAGS += -DKAK_DEBUG diff --git a/src/keys.cc b/src/keys.cc index cecf9634..e3b2f111 100644 --- a/src/keys.cc +++ b/src/keys.cc @@ -17,7 +17,7 @@ Key canonicalize_ifn(Key key) } using KeyAndName = std::pair<const char*, Codepoint>; -static constexpr KeyAndName keynamemap[] = { +static const KeyAndName keynamemap[] = { { "ret", '\r' }, { "space", ' ' }, { "tab", '\t' }, diff --git a/src/ncurses.cc b/src/ncurses.cc index 4d59707a..4380c419 100644 --- a/src/ncurses.cc +++ b/src/ncurses.cc @@ -10,7 +10,12 @@ #define NCURSES_OPAQUE 0 #define NCURSES_INTERNALS +#ifdef __APPLE__ +#include <ncurses.h> +#else #include <ncursesw/ncurses.h> +#endif + #include <signal.h> #include <termios.h> #include <sys/ioctl.h> diff --git a/src/normal.cc b/src/normal.cc index 73346a75..b0794e8f 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -864,7 +864,7 @@ void select_object(Context& context, int param) return select<mode>(context, std::bind(sel.func, _1, _2, flags)); } - static constexpr struct + static const struct { CodepointPair pair; Codepoint name; |
