Browse Source

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

Mike Frysinger 15 years ago
parent
commit
e0da861a29
1 changed files with 7 additions and 4 deletions
  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 */