diff options
author | David Schleef <ds@schleef.org> | 2001-05-26 01:50:21 +0000 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2001-05-26 01:50:21 +0000 |
commit | c08da01578b2519d121cbff7ec22c8b22e2bb1bf (patch) | |
tree | b7099452f32862e6c6cefad6748e29d4ad1e5c61 | |
parent | 86cffec4d5a8aa8c54bb3653cd289f4b92bfa3e1 (diff) |
Added definition of __THROW
-rw-r--r-- | include/sys/cdefs.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/sys/cdefs.h b/include/sys/cdefs.h index 4acb72b70..877746e47 100644 --- 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 |