From 8146aea8ef59b2096d17b37dc4924dec0bd2e7cb Mon Sep 17 00:00:00 2001 From: Edd Barrett Date: Wed, 1 Jan 2014 23:14:36 +0000 Subject: [PATCH 1/4] malloc.h is obsolete. --- unix/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unix/main.c b/unix/main.c index 79fe1b5153..376dbc0c04 100644 --- a/unix/main.c +++ b/unix/main.c @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include "nlr.h" #include "misc.h" From 67ab5ee779afe6f493c019890160e2716f1debe1 Mon Sep 17 00:00:00 2001 From: Edd Barrett Date: Wed, 1 Jan 2014 23:16:27 +0000 Subject: [PATCH 2/4] On OpenBSD MAP_ANONYMOUS is called MAP_ANON. --- py/asmx64.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/py/asmx64.c b/py/asmx64.c index 2c56f35c99..c542df5089 100644 --- a/py/asmx64.c +++ b/py/asmx64.c @@ -7,6 +7,10 @@ #include "misc.h" #include "asmx64.h" +#if defined(__OpenBSD__) +#define MAP_ANONYMOUS MAP_ANON +#endif + /* all offsets are measured in multiples of 8 bytes */ #define WORD_SIZE (8) From 0d02eb178afde12e681e68126f5c9b1bb217f472 Mon Sep 17 00:00:00 2001 From: Edd Barrett Date: Wed, 1 Jan 2014 23:26:36 +0000 Subject: [PATCH 3/4] Fix undefined termcap symbols on OpenBSD. E.g.: /usr/lib/libreadline.so.4.0: undefined reference to `tgetnum' /usr/lib/libreadline.so.4.0: undefined reference to `tgoto' /usr/lib/libreadline.so.4.0: undefined reference to `tgetflag' /usr/lib/libreadline.so.4.0: undefined reference to `tputs' /usr/lib/libreadline.so.4.0: undefined reference to `tgetent' /usr/lib/libreadline.so.4.0: undefined reference to `tgetstr' Tested on linux too, works. --- unix/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unix/Makefile b/unix/Makefile index 17a680a13b..3ff32cd85c 100644 --- a/unix/Makefile +++ b/unix/Makefile @@ -3,7 +3,7 @@ BUILD=build CC = gcc CFLAGS = -I. -I$(PYSRC) -Wall -Werror -ansi -std=gnu99 -Os -DUSE_READLINE #-DNDEBUG -LDFLAGS = -lm +LDFLAGS = -lm -ltermcap SRC_C = \ main.c \ From 33fefc74a57bf974e052cf8035fe81fdd2df8087 Mon Sep 17 00:00:00 2001 From: Edd Barrett Date: Wed, 1 Jan 2014 23:30:15 +0000 Subject: [PATCH 4/4] Mention that GNU make is required. Does not build with BSD make. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fc334a22ea..487c03f6d7 100644 --- a/README.md +++ b/README.md @@ -28,9 +28,9 @@ Additional components: The Unix version ---------------- -The "unix" part requires a standard Unix environment with gcc. It works -only for 64-bit machines due to a small piece of x86-64 assembler for -the exception handling. +The "unix" part requires a standard Unix environment with gcc and GNU make. +It works only for 64-bit machines due to a small piece of x86-64 assembler +for the exception handling. To build: