1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
|
// headers.h: Rcpp R/C++ interface class library -- R headers
//
// Copyright (C) 2008 - 2009 Dirk Eddelbuettel
// Copyright (C) 2009 - 2024 Dirk Eddelbuettel and Romain Francois
//
// This file is part of Rcpp.
//
// Rcpp is free software: you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 2 of the License, or
// (at your option) any later version.
//
// Rcpp is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
#ifndef RCPP__R__HEADERS__H
#define RCPP__R__HEADERS__H
// include R headers, but set R_NO_REMAP and access everything via Rf_ prefixes
#ifndef MAXELTSIZE
#define MAXELTSIZE 8192
#endif
#ifndef R_NO_REMAP
#define R_NO_REMAP
#endif
// define strict headers for R to not clash on ERROR, MESSGAGE, etc
#ifndef RCPP_NO_STRICT_R_HEADERS
# ifndef STRICT_R_HEADERS
# define STRICT_R_HEADERS
# endif
#endif
// no rtti implies no modules
#ifdef RCPP_NO_RTTI
# ifndef RCPP_NO_MODULES
# define RCPP_NO_MODULES
# endif
#endif
// prevent some macro pollution when including R headers
// in particular, on Linux, gcc 'leaks' the 'major',
// 'minor' and 'makedev' macros on Linux; we prevent
// letting those leak in after including any R headers
#ifdef major
# define RCPP_HAS_MAJOR_MACRO
# pragma push_macro("major")
#endif
#ifdef minor
# define RCPP_HAS_MINOR_MACRO
# pragma push_macro("minor")
#endif
#ifdef makedev
# define RCPP_HAS_MAKEDEV_MACRO
# pragma push_macro("makedev")
#endif
#include <Rcpp/platform/compiler.h>
#include <Rcpp/config.h>
#include <Rcpp/macros/macros.h>
#include <R.h>
#include <Rinternals.h>
#include <R_ext/Complex.h>
#include <R_ext/Parse.h>
#include <R_ext/Rdynload.h>
#include <Rversion.h>
/* Ensure NORET defined (normally provided by R headers with R >= 3.2.0) */
#ifndef NORET
# if defined(__GNUC__) && __GNUC__ >= 3
# define NORET __attribute__((noreturn))
# else
# define NORET
# endif
#endif
#undef major
#undef minor
#undef makedev
#ifdef RCPP_HAS_MAJOR_MACRO
# pragma pop_macro("major")
#endif
#ifdef RCPP_HAS_MINOR_MACRO
# pragma pop_macro("minor")
#endif
#ifdef RCPP_HAS_MAKEDEV_MACRO
# pragma pop_macro("makedev")
#endif
#if (!defined(RCPP_NO_UNWIND_PROTECT) && defined(R_VERSION) && R_VERSION >= R_Version(3, 5, 0))
# define RCPP_USING_UNWIND_PROTECT
#endif
#endif /* RCPP__R__HEADERS__H */
|