소스 검색

Added definition of __THROW

David Schleef 23 년 전
부모
커밋
c08da01578
1개의 변경된 파일13개의 추가작업 그리고 0개의 파일을 삭제
  1. 13 0
      include/sys/cdefs.h

+ 13 - 0
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