aboutsummaryrefslogtreecommitdiff
path: root/contrib/bc/include/vm.h
diff options
context:
space:
mode:
authorStefan Eßer <se@FreeBSD.org>2021-01-31 19:56:48 +0000
committerStefan Eßer <se@FreeBSD.org>2021-02-05 21:01:25 +0000
commit106efdb060ae523a88caf5ddc3516500cf5b1d64 (patch)
treee34ca4e157299d283098b5f309feb1da323e73b9 /contrib/bc/include/vm.h
parentbf77fadc22c4c73f5e300309551e07c48bbe3a86 (diff)
downloadsrc-106efdb060ae523a88caf5ddc3516500cf5b1d64.tar.gz
src-106efdb060ae523a88caf5ddc3516500cf5b1d64.zip
Vendor import of Gavin Howard's bc version 3.2.6
(cherry picked from commit 47a52dc4d48f259ab7d9f9ba6b65f4f2331a22dc) Second attempt after revert of a previous commit that affected files with similar names in unrelated directories. Thanks go to Martin Birgmaier for reporting the issue and identifying the cause of git getting confused: files from the root of the vendor files were associated with files in the FreeBSD base root directory. Martin Birgmaier points out that to make this cherry-pick succeed, the option -Xsubtree=contrib/bc has to be passed to prevent files outside that path to be considered.
Diffstat (limited to 'contrib/bc/include/vm.h')
-rw-r--r--contrib/bc/include/vm.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/contrib/bc/include/vm.h b/contrib/bc/include/vm.h
index 72a5150266a1..8b0babff4d81 100644
--- a/contrib/bc/include/vm.h
+++ b/contrib/bc/include/vm.h
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2018-2020 Gavin D. Howard and contributors.
+ * Copyright (c) 2018-2021 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -318,7 +318,7 @@ typedef struct BcVm {
#if !BC_ENABLE_LIBRARY
BcParse prs;
BcProgram prog;
-#endif // BC_ENABLE_LIBRARY
+#endif // !BC_ENABLE_LIBRARY
BcVec jmp_bufs;
@@ -343,7 +343,7 @@ typedef struct BcVm {
const char* file;
const char *sigmsg;
-#endif // BC_ENABLE_LIBRARY
+#endif // !BC_ENABLE_LIBRARY
volatile sig_atomic_t sig_lock;
volatile sig_atomic_t sig;
#if !BC_ENABLE_LIBRARY
@@ -357,7 +357,7 @@ typedef struct BcVm {
bool no_exit_exprs;
bool eof;
-#endif // BC_ENABLE_LIBRARY
+#endif // !BC_ENABLE_LIBRARY
BcBigDig maxes[BC_PROG_GLOBALS_LEN + BC_ENABLE_EXTRA_MATH];
@@ -382,7 +382,7 @@ typedef struct BcVm {
const char *err_msgs[BC_ERR_NELEMS];
const char *locale;
-#endif // BC_ENABLE_LIBRARY
+#endif // !BC_ENABLE_LIBRARY
BcBigDig last_base;
BcBigDig last_pow;
@@ -392,7 +392,7 @@ typedef struct BcVm {
#if !BC_ENABLE_LIBRARY
char *env_args_buffer;
BcVec env_args;
-#endif // BC_ENABLE_LIBRARY
+#endif // !BC_ENABLE_LIBRARY
BcNum max;
BcNum max2;
@@ -436,8 +436,15 @@ void bc_vm_jmp(void);
#if BC_ENABLE_LIBRARY
void bc_vm_handleError(BcErr e);
+void bc_vm_fatalError(BcErr e);
+void bc_vm_atexit(void);
#else // BC_ENABLE_LIBRARY
void bc_vm_handleError(BcErr e, size_t line, ...);
+#if !BC_ENABLE_LIBRARY && !BC_ENABLE_MEMCHECK
+BC_NORETURN
+#endif // !BC_ENABLE_LIBRARY && !BC_ENABLE_MEMCHECK
+void bc_vm_fatalError(BcErr e);
+int bc_vm_atexit(int status);
#endif // BC_ENABLE_LIBRARY
extern const char bc_copyright[];