From: Klaus Treichel Date: Thu, 7 Aug 2008 12:51:47 +0000 (+0000) Subject: Fix build on NetBSD to get the correct declaration of alloca. X-Git-Tag: before.move.to.git~58 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=e08fa89b4a719c9eaceeb0785190a8eefcb54246;p=francis%2Flibjit.git Fix build on NetBSD to get the correct declaration of alloca. This makes pnet work with libjit on NetBSD. --- diff --git a/ChangeLog b/ChangeLog index f731667..9ed8920 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-08-07 Klaus Treichel + + * jit/jit-apply.c jit/jit-insn.c, jit/jit-interp.c, + tools/gen-apply.c: Include stdlib.h if available to pick up the + declaration of alloca on NetBSD. + 2008-07-26 Klaus Treichel * jit/jit-rules-x86-64.c (xmm_cmp_reg_imm, xmm_cmp_setcc_reg_imm, diff --git a/jit/jit-apply.c b/jit/jit-apply.c index 91c8c67..95d44d9 100644 --- a/jit/jit-apply.c +++ b/jit/jit-apply.c @@ -25,6 +25,9 @@ #include "jit-apply-rules.h" #include "jit-apply-func.h" #include "jit-cache.h" +#if HAVE_STDLIB_H + #include +#endif #if HAVE_ALLOCA_H #include #endif diff --git a/jit/jit-insn.c b/jit/jit-insn.c index 80e58dd..4bdc434 100644 --- a/jit/jit-insn.c +++ b/jit/jit-insn.c @@ -24,6 +24,9 @@ #include "jit-rules.h" #include "jit-setjmp.h" #include +#if HAVE_STDLIB_H + #include +#endif #if HAVE_ALLOCA_H #include #endif diff --git a/jit/jit-interp.c b/jit/jit-interp.c index 70be8e4..4a7c8ad 100644 --- a/jit/jit-interp.c +++ b/jit/jit-interp.c @@ -32,6 +32,9 @@ straight vanilla ANSI C. #include "jit-rules.h" #include "jit-memory.h" #include +#if HAVE_STDLIB_H + #include +#endif #if HAVE_ALLOCA_H #include #endif diff --git a/tools/gen-apply.c b/tools/gen-apply.c index d8fc6d6..b469e98 100644 --- a/tools/gen-apply.c +++ b/tools/gen-apply.c @@ -26,6 +26,9 @@ #include "jit-apply-func.h" #include #include +#if HAVE_STDLIB_H + #include +#endif #if HAVE_ALLOCA_H #include #endif