apio
185757e2a7
1. Update the bc patch to remove an unnecessary line. 2. Update README.md to mention the port system. 3. Improve the port system!!
61 lines
1.2 KiB
Diff
61 lines
1.2 KiB
Diff
diff --color -rN -u bc-vanilla/include/library.h bc-6.0.4/include/library.h
|
|
--- a/bc-6.0.4/include/library.h 2022-09-26 19:34:34.000000000 +0200
|
|
+++ b/bc-6.0.4/include/library.h 2022-10-15 14:59:11.413415573 +0200
|
|
@@ -36,7 +36,7 @@
|
|
#ifndef LIBBC_PRIVATE_H
|
|
#define LIBBC_PRIVATE_H
|
|
|
|
-#ifndef _WIN32
|
|
+#if !defined(_WIN32) && !defined(__luna__)
|
|
|
|
#include <pthread.h>
|
|
|
|
@@ -236,13 +236,17 @@
|
|
BcVm*
|
|
bcl_getspecific(void);
|
|
|
|
-#ifndef _WIN32
|
|
+#if !defined(_WIN32) && !defined(__luna__)
|
|
|
|
typedef pthread_key_t BclTls;
|
|
|
|
#else // _WIN32
|
|
|
|
+#ifdef __luna__
|
|
+typedef int BclTls;
|
|
+#else
|
|
typedef DWORD BclTls;
|
|
+#endif
|
|
|
|
#endif // _WIN32
|
|
|
|
diff --color -rN -u bc-vanilla/src/vm.c bc-6.0.4/src/vm.c
|
|
--- a/bc-6.0.4/src/vm.c 2022-09-26 19:34:35.000000000 +0200
|
|
+++ b/bc-6.0.4/src/vm.c 2022-10-21 17:29:13.511229371 +0200
|
|
@@ -193,7 +193,7 @@
|
|
static void
|
|
bc_vm_sigaction(void)
|
|
{
|
|
-#ifndef _WIN32
|
|
+#if !defined(_WIN32) && !defined(__luna__)
|
|
|
|
struct sigaction sa;
|
|
|
|
@@ -223,11 +223,15 @@
|
|
if (BC_TTY) sigaction(SIGHUP, &sa, NULL);
|
|
#endif // BC_ENABLE_HISTORY
|
|
|
|
-#else // _WIN32
|
|
+#else
|
|
+
|
|
+#ifndef __luna__
|
|
|
|
signal(SIGTERM, bc_vm_sig);
|
|
signal(SIGINT, bc_vm_sig);
|
|
|
|
+#endif
|
|
+
|
|
#endif // _WIN32
|
|
}
|
|
|