X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Funexelf.c;h=9a1a7d92e8eb37c8986f7f82f4827430a3064e19;hb=ee102a7c4454cce25c4c4771b6bb5c24326f8091;hp=66d889cfecfd9c19eb0a139a42d589ab85f36575;hpb=0c693dc08f0794304711787b2eb47c144ea4bef1;p=chise%2Fxemacs-chise.git.1 diff --git a/src/unexelf.c b/src/unexelf.c index 66d889c..9a1a7d9 100644 --- a/src/unexelf.c +++ b/src/unexelf.c @@ -481,10 +481,20 @@ typedef struct { #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