[commit: ghc] master: rts: Fix lingering #ifs (ff267f3)

git at git.haskell.org git at git.haskell.org
Tue Apr 4 20:57:26 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/ff267f37788eb47e1d9da15bf396eccec4297bf6/ghc

>---------------------------------------------------------------

commit ff267f37788eb47e1d9da15bf396eccec4297bf6
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Tue Apr 4 16:15:32 2017 -0400

    rts: Fix lingering #ifs
    
    These were missed in D3278.


>---------------------------------------------------------------

ff267f37788eb47e1d9da15bf396eccec4297bf6
 includes/rts/storage/InfoTables.h | 2 +-
 rts/Linker.c                      | 6 +++---
 rts/LinkerInternals.h             | 2 +-
 rts/linker/Elf.c                  | 4 ++--
 rts/linker/SymbolExtras.c         | 2 +-
 rts/linker/SymbolExtras.h         | 2 +-
 6 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/includes/rts/storage/InfoTables.h b/includes/rts/storage/InfoTables.h
index 87d0410..307aac3 100644
--- a/includes/rts/storage/InfoTables.h
+++ b/includes/rts/storage/InfoTables.h
@@ -28,7 +28,7 @@
    hackery can go away sometime.
    ------------------------------------------------------------------------- */
 
-#if x86_64_TARGET_ARCH
+#ifdef x86_64_TARGET_ARCH
 #define OFFSET_FIELD(n) StgHalfInt n; StgHalfWord __pad_##n
 #else
 #define OFFSET_FIELD(n) StgInt n
diff --git a/rts/Linker.c b/rts/Linker.c
index 529af9a..7366904 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -1174,7 +1174,7 @@ void freeObjectCode (ObjectCode *oc)
 
     /* Free symbol_extras.  On x86_64 Windows, symbol_extras are allocated
      * alongside the image, so we don't need to free. */
-#if NEED_SYMBOL_EXTRAS && (!defined(x86_64_HOST_ARCH) || !defined(mingw32_HOST_OS))
+#if defined(NEED_SYMBOL_EXTRAS) && (!defined(x86_64_HOST_ARCH) || !defined(mingw32_HOST_OS))
     if (RTS_LINKER_USE_MMAP) {
         if (!USE_CONTIGUOUS_MMAP && oc->symbol_extras != NULL) {
             m32_free(oc->symbol_extras,
@@ -1244,7 +1244,7 @@ mkOc( pathchar *path, char *image, int imageSize,
    oc->sections          = NULL;
    oc->proddables        = NULL;
    oc->stable_ptrs       = NULL;
-#if NEED_SYMBOL_EXTRAS
+#if defined(NEED_SYMBOL_EXTRAS)
    oc->symbol_extras     = NULL;
 #endif
    oc->imageMapped       = mapped;
@@ -1467,7 +1467,7 @@ HsInt loadOc (ObjectCode* oc)
        return r;
    }
 
-#if NEED_SYMBOL_EXTRAS
+#if defined(NEED_SYMBOL_EXTRAS)
 #  if defined(OBJFORMAT_MACHO)
    r = ocAllocateSymbolExtras_MachO ( oc );
    if (!r) {
diff --git a/rts/LinkerInternals.h b/rts/LinkerInternals.h
index a04db77..02fe167 100644
--- a/rts/LinkerInternals.h
+++ b/rts/LinkerInternals.h
@@ -175,7 +175,7 @@ typedef struct _ObjectCode {
     unsigned int pltIndex;
 #endif
 
-#if NEED_SYMBOL_EXTRAS
+#if defined(NEED_SYMBOL_EXTRAS)
     SymbolExtra    *symbol_extras;
     unsigned long   first_symbol_extra;
     unsigned long   n_symbol_extras;
diff --git a/rts/linker/Elf.c b/rts/linker/Elf.c
index 73e34d3..77107a7 100644
--- a/rts/linker/Elf.c
+++ b/rts/linker/Elf.c
@@ -1445,7 +1445,7 @@ do_Elf_Rela_relocations ( ObjectCode* oc, char* ehdrC,
             break;
 #        endif
 
-#if x86_64_HOST_ARCH
+#if defined(x86_64_HOST_ARCH)
       case R_X86_64_64:
           *(Elf64_Xword *)P = value;
           break;
@@ -1673,7 +1673,7 @@ int ocRunInit_ELF( ObjectCode *oc )
  * PowerPC & X86_64 ELF specifics
  */
 
-#if NEED_SYMBOL_EXTRAS
+#if defined(NEED_SYMBOL_EXTRAS)
 
 int ocAllocateSymbolExtras_ELF( ObjectCode *oc )
 {
diff --git a/rts/linker/SymbolExtras.c b/rts/linker/SymbolExtras.c
index 73f219f..0700033 100644
--- a/rts/linker/SymbolExtras.c
+++ b/rts/linker/SymbolExtras.c
@@ -11,7 +11,7 @@
 
 #include "LinkerInternals.h"
 
-#if NEED_SYMBOL_EXTRAS
+#if defined(NEED_SYMBOL_EXTRAS)
 #if !defined(x86_64_HOST_ARCH) || !defined(mingw32_HOST_OS)
 
 #include "RtsUtils.h"
diff --git a/rts/linker/SymbolExtras.h b/rts/linker/SymbolExtras.h
index 5e2a6d0..25cb022 100644
--- a/rts/linker/SymbolExtras.h
+++ b/rts/linker/SymbolExtras.h
@@ -6,7 +6,7 @@
 
 #include "BeginPrivate.h"
 
-#if NEED_SYMBOL_EXTRAS
+#if defined(NEED_SYMBOL_EXTRAS)
 
 int ocAllocateSymbolExtras( ObjectCode* oc, int count, int first );
 



More information about the ghc-commits mailing list