asjo(a)koldfront.dk (Adam Sjøgren) suggests one of the following
patches. See the thread starting at
http://list-archive.xemacs.org/pipermail/xemacs-beta/2010-November/020395...
2010-11-16 Adam Sjøgren <asjo(a)koldfront.dk>
* unexelf.c (ElfW): Use 64-bits on OpenBSD when _LP64 is true.
------------------------------------------------------------------------
On Thu, 11 Nov 2010 21:26:40 +0100, Adam wrote:
> Notice that is "Elf32" instead of "Elf64".
Somehow, we managed to get
> the wrong word size in our definition of ElfW. Is sys/exec_elf.h
> supposed to provide that definition? See lines 477 to 499 in
> unexelf.c.
_LP64 is 1, so perhaps OpenBSD should be somehow included in lines
481-487, to take care of it?
Maybe something like this:
--- a/src/unexelf.c Tue Nov 02 20:19:39 2010 +0100
+++ b/src/unexelf.c Thu Nov 11 23:00:20 2010 +0100
@@ -478,7 +478,7 @@
# include <sys/exec_elf.h>
#endif
-#if defined(__FreeBSD__) && (defined(__alpha__) || defined(_LP64))
+#if (defined(__FreeBSD__) && (defined(__alpha__) || defined(_LP64))) ||
(defined(__OpenBSD__) && defined(_LP64))
# ifdef __STDC__
# define ElfW(type) Elf64_##type
# else
(I am merely guessing; I have no clue, so don't hesitate to hit me with
a cluebat.)
------------------------------------------------------------------------
Didn't quite gather any comments. So maybe this is more like it:
--- 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
------------------------------------------------------------------------
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches