Skip to content

Commit 0ca124a

Browse files
committed
R: Fix building extensions with C++.
1 parent a7b61fc commit 0ca124a

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

math/R/distinfo

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
$NetBSD: distinfo,v 1.103 2024/02/15 07:48:50 markd Exp $
1+
$NetBSD: distinfo,v 1.104 2024/03/05 16:12:33 jperkin Exp $
22

33
BLAKE2s (R-4.3.2.tar.gz) = a79080d65222ec6698175c037390e666385567b1e123acf6ce1e33ee3f122005
44
SHA512 (R-4.3.2.tar.gz) = 125114357f20d4a3248aee86727768d1dc15e07e44353f8a68fe2ef1fedae508e85d944301d00c0edd61e8b012b0b3cdcde53ac60be903713f96542d83ad5b1d
55
Size (R-4.3.2.tar.gz) = 35039225 bytes
66
SHA1 (patch-configure.ac) = 3cd063c424b7b9674f434d49c771b76dde73ac5c
77
SHA1 (patch-m4_R.m4) = 48a1d38b5505cbb87bd2c156f262680156c07a02
8+
SHA1 (patch-src_include_R__ext_Error.h) = bc55a8bba6bf931e3f6794577e63bfafdfc740cf
89
SHA1 (patch-src_library_stats_src_Makefile.in) = 4eb93292858392792c37a706399e2cef91821bbe
910
SHA1 (patch-src_main_character.c) = c1be2cae404ecbdd547343b70e9d072e9e1d5549
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
$NetBSD: patch-src_include_R__ext_Error.h,v 1.1 2024/03/05 16:12:33 jperkin Exp $
2+
3+
Fix building with C++.
4+
5+
--- src/include/R_ext/Error.h.orig 2024-03-05 16:09:06.557665563 +0000
6+
+++ src/include/R_ext/Error.h
7+
@@ -35,7 +35,8 @@ extern "C" {
8+
* In C11 there is _Noreturn * (or noreturn in header <stdnoreturn.h>).
9+
*/
10+
#if defined NORET
11+
-#elif (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202301L)
12+
+#elif (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202301L) || \
13+
+ (defined(__cplusplus) && __cplusplus >= 201103L)
14+
# define NORET [[noreturn]]
15+
#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201102L
16+
# define NORET _Noreturn

0 commit comments

Comments
 (0)