diff options
-rw-r--r-- | backends/cxxrtl/cxxrtl.h | 4 | ||||
-rw-r--r-- | kernel/log.h | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/backends/cxxrtl/cxxrtl.h b/backends/cxxrtl/cxxrtl.h index 0e2e27ed4..166b4896f 100644 --- a/backends/cxxrtl/cxxrtl.h +++ b/backends/cxxrtl/cxxrtl.h @@ -185,8 +185,8 @@ struct value : public expr_base<value<Bits>> { carry = (shift_bits == 0) ? 0 : data[n] >> (chunk::bits - shift_bits); } - if (carry != 0) - result.data[result.chunks - 1] = carry; + if (shift_chunks + chunks < result.chunks) + result.data[shift_chunks + chunks] = carry; return result; } diff --git a/kernel/log.h b/kernel/log.h index 516744b50..63590c489 100644 --- a/kernel/log.h +++ b/kernel/log.h @@ -55,7 +55,9 @@ #else # include <sys/time.h> # include <sys/resource.h> -# include <signal.h> +# if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) +# include <signal.h> +# endif #endif #if defined(_MSC_VER) |