X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=src%2Funexelf.c;h=6ac98448082a95c88b2618b8f7d9cea017cc88dc;hp=66d889cfecfd9c19eb0a139a42d589ab85f36575;hb=414b512c0774e67ba8e160b605447d862d3be166;hpb=0c693dc08f0794304711787b2eb47c144ea4bef1 diff --git a/src/unexelf.c b/src/unexelf.c index 66d889c..6ac9844 100644 --- a/src/unexelf.c +++ b/src/unexelf.c @@ -475,16 +475,34 @@ typedef struct { # include #endif +#if defined(__FreeBSD__) && (defined(__alpha__) || defined(_LP64)) +# ifdef __STDC__ +# define ElfW(type) Elf64_##type +# else +# define ElfW(type) Elf64_/**/type +# endif +#endif + #if __GNU_LIBRARY__ - 0 >= 6 # include /* get ElfW etc */ #endif #ifndef ElfW # ifdef __STDC__ -# define ElfW(type) Elf32_##type +# define ElfBitsW(bits, type) Elf##bits##_##type # else -# define ElfW(type) Elf32_/**/type +# define ElfBitsW(bits, type) Elf/**/bits/**/_/**/type +# endif +# ifndef ELFSIZE +# ifdef _LP64 +# define ELFSIZE 64 +# else +# define ELFSIZE 32 +# endif # endif + /* This macro expands `bits' before invoking ElfBitsW. */ +# define ElfExpandBitsW(bits, type) ElfBitsW (bits, type) +# define ElfW(type) ElfExpandBitsW (ELFSIZE, type) #endif #ifndef ELF_BSS_SECTION_NAME