Merge branch 'add-illumos' of http://github.com/luka-devnull/kakoune into master
This commit is contained in:
commit
6a9b34e5c8
|
@ -80,6 +80,9 @@ else ifeq ($(os),OpenBSD)
|
|||
else ifneq (,$(findstring CYGWIN,$(os)))
|
||||
CPPFLAGS += -D_XOPEN_SOURCE=700
|
||||
LIBS += -lncursesw -ldbghelp
|
||||
else ifeq ($(os),SunOS)
|
||||
LIBS += -lncursesw
|
||||
LDFLAGS += -lsocket -rdynamic
|
||||
else
|
||||
ifeq ($(PKG_CONFIG),)
|
||||
$(error "pkg-config not found in PATH")
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
#include "flags.hh"
|
||||
#include "ranges.hh"
|
||||
|
||||
#if defined(__sun__)
|
||||
#include <cstring>
|
||||
#endif
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
namespace Kakoune
|
||||
|
|
|
@ -654,6 +654,11 @@ String get_kak_binary_path()
|
|||
return buffer;
|
||||
#elif defined(__OpenBSD__)
|
||||
return KAK_BIN_PATH;
|
||||
#elif defined(__sun__)
|
||||
ssize_t res = readlink("/proc/self/path/a.out", buffer, 2048);
|
||||
kak_assert(res != -1);
|
||||
buffer[res] = '\0';
|
||||
return buffer;
|
||||
#else
|
||||
# error "finding executable path is not implemented on this platform"
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user