Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/rump/include/rump Fix header compatibility with C++



details:   https://anonhg.NetBSD.org/src/rev/310aeec1970f
branches:  trunk
changeset: 1011005:310aeec1970f
user:      kamil <kamil%NetBSD.org@localhost>
date:      Sun Jun 14 22:12:58 2020 +0000

description:
Fix header compatibility with C++

This file is OS-agnostic and cannot include OS specific headers.

The fallback for NetBSD specific symbol __BEGIN_DECLS didn't work as it was
misspelled as _BEGIN_DECLS.

diffstat:

 sys/rump/include/rump/rump.h |  11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diffs (32 lines):

diff -r 15753f0eca38 -r 310aeec1970f sys/rump/include/rump/rump.h
--- a/sys/rump/include/rump/rump.h      Sun Jun 14 21:47:14 2020 +0000
+++ b/sys/rump/include/rump/rump.h      Sun Jun 14 22:12:58 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rump.h,v 1.70 2017/05/11 18:16:00 christos Exp $       */
+/*     $NetBSD: rump.h,v 1.71 2020/06/14 22:12:58 kamil Exp $  */
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -86,9 +86,8 @@
        RUMP_ETFS_DIR_SUBDIRS   /* dir + subdirectories (recursive) */
 };
 
-/* um, what's the point ?-) */
-#ifdef _BEGIN_DECLS
-_BEGIN_DECLS
+#if defined(__cplusplus)
+extern "C" {
 #endif
 
 int    rump_getversion(void);
@@ -130,8 +129,8 @@
 #include <rump/rumpnet_if_pub.h>
 #endif
 
-#ifdef _END_DECLS
-_END_DECLS
+#if defined(__cplusplus)
+}
 #endif
 
 /*



Home | Main Index | Thread Index | Old Index