OSDN Git Service
(root)
/
uclinux-h8
/
uClibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
635c243
)
The main part of the C++ support is the definition of __BEGIN_DECLS
author
David McCullough
<davidm@snapgear.com>
Wed, 11 Jul 2001 13:33:21 +0000
(13:33 -0000)
committer
David McCullough
<davidm@snapgear.com>
Wed, 11 Jul 2001 13:33:21 +0000
(13:33 -0000)
and __END_DECLS in this file based on the __cplusplus define.
include/sys/cdefs.h
patch
|
blob
|
history
diff --git
a/include/sys/cdefs.h
b/include/sys/cdefs.h
index
877746e
..
7df9f1e
100644
(file)
--- a/
include/sys/cdefs.h
+++ b/
include/sys/cdefs.h
@@
-20,9
+20,14
@@
#endif
-/* No C++ */
-#define __BEGIN_DECLS
-#define __END_DECLS
+/* C++ needs to know that types and declarations are C, not C++. */
+#ifdef __cplusplus
+# define __BEGIN_DECLS extern "C" {
+# define __END_DECLS }
+#else
+# define __BEGIN_DECLS
+# define __END_DECLS
+#endif
/* GNUish things */
#define __CONSTVALUE