Merge remote-tracking branch 'jjthrash/osx-fixes'

This commit is contained in:
Maxime Coste 2014-04-03 19:03:49 +01:00
commit c0e7975f62
4 changed files with 18 additions and 4 deletions

View File

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

View File

@ -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' },

View File

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

View File

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