Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2025-10-21 Iñaki Ucar <iucar@fedoraproject.org>

* inst/include/Rcpp/exceptions_impl.h: use __has_include to simplify checks
to enable demangling, making them robust for more platforms

2025-10-13 Dirk Eddelbuettel <edd@debian.org>

* DESCRIPTION (Version, Date): Roll micro version and date
Expand Down
29 changes: 10 additions & 19 deletions inst/include/Rcpp/exceptions_impl.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// exceptions_impl.h: Rcpp R/C++ interface class library -- exceptions
//
// Copyright (C) 2012 - 2019 Dirk Eddelbuettel and Romain Francois
// Copyright (C) 2020 Dirk Eddelbuettel, Romain Francois, and Joshua N. Pritikin
// Copyright (C) 2020 - 2024 Dirk Eddelbuettel, Romain Francois, and Joshua N. Pritikin
// Copyright (C) 2025 Dirk Eddelbuettel, Romain Francois, Joshua N. Pritikin, and Iñaki Ucar
//
// This file is part of Rcpp.
//
Expand All @@ -21,25 +22,15 @@
#ifndef Rcpp__exceptions_impl__h
#define Rcpp__exceptions_impl__h

// disable demangler on platforms where we have no support
// enable demangler on platforms where execinfo.h is present
#ifndef RCPP_DEMANGLER_ENABLED
# if defined(_WIN32) || \
defined(__FreeBSD__) || \
defined(__NetBSD__) || \
defined(__OpenBSD__) || \
defined(__DragonFly__) || \
defined(__CYGWIN__) || \
defined(__sun) || \
defined(_AIX) || \
defined(__MUSL__) || \
defined(__HAIKU__) || \
defined(__ANDROID__)
# define RCPP_DEMANGLER_ENABLED 0
# elif defined(__GNUC__) || defined(__clang__)
# include <execinfo.h>
# define RCPP_DEMANGLER_ENABLED 1
# else
# define RCPP_DEMANGLER_ENABLED 0
# define RCPP_DEMANGLER_ENABLED 0
# if defined __has_include
# if __has_include (<execinfo.h>)
# include <execinfo.h>
# undef RCPP_DEMANGLER_ENABLED
# define RCPP_DEMANGLER_ENABLED 1
# endif
# endif
#endif

Expand Down