소스 검색

do not rely on features.h so that elf.h can be used on non-elf systems (Darwin, Windows, etc...)

Mike Frysinger 17 년 전
부모
커밋
e0da861a29
1개의 변경된 파일7개의 추가작업 그리고 4개의 파일을 삭제
  1. 7 4
      include/elf.h

+ 7 - 4
include/elf.h

@@ -20,9 +20,10 @@
 #ifndef _ELF_H
 #define	_ELF_H 1
 
-#include <features.h>
-
-__BEGIN_DECLS
+/* Avoid features.h here for portability.  This stuff matches sys/cdefs.h.  */
+#ifdef	__cplusplus
+extern "C" {
+#endif
 
 /* Standard ELF types.  */
 
@@ -3061,6 +3062,8 @@ typedef Elf32_Addr Elf32_Conflict;
 /* Keep this the last entry.  */
 #define R_XTENSA_NUM		50
 
-__END_DECLS
+#ifdef	__cplusplus
+}
+#endif
 
 #endif	/* elf.h */