]> code.delx.au - gnu-emacs/blobdiff - src/unexelf.c
Prevent crashes on MS-Windows when w32-downcase-file-names is non-nil.
[gnu-emacs] / src / unexelf.c
index f35b53aeab3ec48e6cc8373ffa84828b699706be..b9f8e05e959bf06b16630ba35caad40ffb1ff452 100644 (file)
@@ -461,7 +461,7 @@ typedef struct {
 /*
  * NetBSD does not have normal-looking user-land ELF support.
  */
-# if defined __alpha__ || defined __sparc_v9__
+# if defined __alpha__ || defined __sparc_v9__ || defined _LP64
 #  define ELFSIZE      64
 # else
 #  define ELFSIZE      32
@@ -507,10 +507,12 @@ typedef struct {
 
 #ifndef ElfW
 # define ElfBitsW(bits, type) Elf##bits##_##type
-# ifdef _LP64
-#  define ELFSIZE 64
-# else
-#  define ELFSIZE 32
+# 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)