Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports
Path: blob/main/devel/R-cran-Rcpp/files/patch-inst_include_Rcpp_exceptions__impl.h
46590 views
1
--- inst/include/Rcpp/exceptions_impl.h.orig 2026-04-23 14:10:21 UTC
2
+++ inst/include/Rcpp/exceptions_impl.h
3
@@ -2,7 +2,7 @@
4
//
5
// Copyright (C) 2012 - 2019 Dirk Eddelbuettel and Romain Francois
6
// Copyright (C) 2020 - 2024 Dirk Eddelbuettel, Romain Francois, and Joshua N. Pritikin
7
-// Copyright (C) 2025 Dirk Eddelbuettel, Romain Francois, Joshua N. Pritikin, and Iñaki Ucar
8
+// Copyright (C) 2025 - 2026 Dirk Eddelbuettel, Romain Francois, Joshua N. Pritikin, and Iñaki Ucar
9
//
10
// This file is part of Rcpp.
11
//
12
@@ -23,15 +23,33 @@
13
#define Rcpp__exceptions_impl__h
14
15
// enable demangler on platforms where execinfo.h is present
16
+// and that are not actively blacklisted
17
#ifndef RCPP_DEMANGLER_ENABLED
18
-# define RCPP_DEMANGLER_ENABLED 0
19
-# if defined __has_include
20
-# if __has_include (<execinfo.h>)
21
-# include <execinfo.h>
22
-# undef RCPP_DEMANGLER_ENABLED
23
-# define RCPP_DEMANGLER_ENABLED 1
24
+// set a fallback default
25
+#define RCPP_DEMANGLER_ENABLED 0
26
+# if defined(_WIN32) || \
27
+ defined(__FreeBSD__) || \
28
+ defined(__NetBSD__) || \
29
+ defined(__OpenBSD__) || \
30
+ defined(__DragonFly__) || \
31
+ defined(__CYGWIN__) || \
32
+ defined(__sun) || \
33
+ defined(_AIX) || \
34
+ defined(__MUSL__) || \
35
+ defined(__HAIKU__) || \
36
+ defined(__ANDROID__)
37
+// nothing to do here so just redefining
38
+# undef RCPP_DEMANGLER_ENABLED
39
+# define RCPP_DEMANGLER_ENABLED 0
40
+# elif defined __has_include
41
+// if we can test for headers
42
+# if __has_include (<execinfo.h>)
43
+// if we have the header, include and use it
44
+# include <execinfo.h>
45
+# undef RCPP_DEMANGLER_ENABLED
46
+# define RCPP_DEMANGLER_ENABLED 1
47
+# endif
48
# endif
49
-# endif
50
#endif
51
52
namespace Rcpp {
53
54