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:
86cffec
)
Added definition of __THROW
author
David Schleef
<ds@schleef.org>
Sat, 26 May 2001 01:50:21 +0000
(
01:50
-0000)
committer
David Schleef
<ds@schleef.org>
Sat, 26 May 2001 01:50:21 +0000
(
01:50
-0000)
include/sys/cdefs.h
patch
|
blob
|
history
diff --git
a/include/sys/cdefs.h
b/include/sys/cdefs.h
index
4acb72b
..
877746e
100644
(file)
--- a/
include/sys/cdefs.h
+++ b/
include/sys/cdefs.h
@@
-28,4
+28,17
@@
#define __CONSTVALUE
#define __CONSTVALUE2
+#ifdef __GNUC__
+/* GCC can always grok prototypes. For C++ programs we add throw()
+ to help it optimize the function calls. But this works only with
+ gcc 2.8.x and egcs. */
+#if defined __cplusplus && __GNUC_PREREQ (2,8)
+#define __THROW throw()
+#else
+#define __THROW
+#endif
+#else /* GCC */
+#define __THROW
+#endif
+
#endif