From f0741698fa45be21a137cdf297daad1ae948ca54 Mon Sep 17 00:00:00 2001 From: Robert Ou Date: Mon, 17 Jul 2017 12:36:43 -0700 Subject: [PATCH 1/2] Fix build warnings for win64 Win64 has a 32-bit long. Use intptr_t to work on any data model. --- kernel/hashlib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/hashlib.h b/kernel/hashlib.h index 3c824b8c3..4199e6f3a 100644 --- a/kernel/hashlib.h +++ b/kernel/hashlib.h @@ -147,7 +147,7 @@ struct hash_ptr_ops { return a == b; } static inline unsigned int hash(const void *a) { - return (unsigned long)a; + return (intptr_t)a; } }; From 85d667ca08d53c4869c8212bd79155422941aa2d Mon Sep 17 00:00:00 2001 From: Robert Ou Date: Mon, 17 Jul 2017 14:21:59 -0700 Subject: [PATCH 2/2] makefile: Add the option to use libtermcap --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index ffb5db823..81d718430 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,7 @@ ENABLE_LIBYOSYS := 0 ENABLE_GPROF := 0 ENABLE_NDEBUG := 0 LINK_CURSES := 0 +LINK_TERMCAP := 0 # clang sanitizers SANITIZER = @@ -213,6 +214,10 @@ ifeq ($(LINK_CURSES),1) LDLIBS += -lcurses ABCMKARGS += "ABC_READLINE_LIBRARIES=-lcurses -lreadline" endif +ifeq ($(LINK_TERMCAP),1) +LDLIBS += -ltermcap +ABCMKARGS += "ABC_READLINE_LIBRARIES=-lreadline -ltermcap" +endif ifeq ($(CONFIG),mxe) LDLIBS += -ltermcap endif