--- a/src/unexelf.c Tue Nov 02 20:19:39 2010 +0100
+++ b/src/unexelf.c Tue Nov 16 21:40:23 2010 +0100
@@ -491,10 +491,18 @@
#endif
#ifndef ElfW
-# ifdef __STDC__
-# define ElfW(type) Elf32_##type
+# ifdef _LP64
+# ifdef __STDC__
+# define ElfW(type) Elf64_##type
+# else
+# define ElfW(type) Elf64_/**/type
+# endif
# else
-# define ElfW(type) Elf32_/**/type
+# ifdef __STDC__
+# define ElfW(type) Elf32_##type
+# else
+# define ElfW(type) Elf32_/**/type
+# endif
# endif
#endif
This looks horribly duplicative and fragile to me, and prompts the
question: do we support compiling XEmacs with any compiler for which
__STDC__ is *not* defined? Either way, I'd be tempted to create a
separate 32/64 define, and use something like:
# define ElfW(type) Elf##size##_##type
to reduced the number of nested ifs.
Regards
Robert
PS FWIW Gnu Emacs does essentially the same thing, with an extra layer
of macros.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches