Fix Windows build failure in cmitls 95/4995/1
authorEvan Ramos <evan@hpccharm.com>
Fri, 1 Mar 2019 22:15:37 +0000 (16:15 -0600)
committerEvan Ramos <evan@hpccharm.com>
Fri, 1 Mar 2019 22:23:14 +0000 (16:23 -0600)
Change-Id: Ia656d85ee82472b2ed2855c78817bfa1fa862389

src/conv-core/threads.c
src/util/cmitls.C
src/util/cmitls.h

index 9a67b56..08765ba 100644 (file)
@@ -701,7 +701,7 @@ void CthPupBase(pup_er p,CthThreadBase *t,int useMigratable)
 
   pup_int(p, &t->magic);
 
-#if CMK_THREADS_BUILD_TLS && CMK_HAS_ELF_H && CMK_HAS_TLS_VARIABLES
+#if CMK_THREADS_BUILD_TLS && CMK_HAS_TLS_VARIABLES
   {
     void* aux;
     pup_bytes(p, &t->tlsseg, sizeof(tlsseg_t));
index cfa2c42..4779c92 100644 (file)
@@ -3,6 +3,13 @@
 
 #include "converse.h"
 #include "cmitls.h"
+
+#include <string.h>
+#include <stdlib.h>
+#if CMK_HAS_MALLOC_H
+#include <malloc.h>
+#endif
+
 #include "memory-isomalloc.h"
 
 #if CMK_HAS_TLS_VARIABLES
index ac57767..1c487d0 100644 (file)
@@ -9,11 +9,6 @@
     && ((CMK_DLL_USE_DLOPEN && CMK_HAS_RTLD_DEFAULT) || CMK_HAS_DL_ITERATE_PHDR)
 
 #include <elf.h>
-#include <string.h>
-#include <stdlib.h>
-#if CMK_HAS_MALLOC_H
-#include <malloc.h>
-#endif
 
 #if ( defined(__LP64__) || defined(_LP64) )
 #define ELF64
 #define ELF32
 #endif
 
-#ifdef ELF32
+#endif
+
+#endif
+
+#if defined ELF32
 typedef Elf32_Addr Addr;
 typedef Elf32_Ehdr Ehdr;
 typedef Elf32_Phdr Phdr;
-#else
+#elif defined ELF64
 typedef Elf64_Addr Addr;
 typedef Elf64_Ehdr Ehdr;
 typedef Elf64_Phdr Phdr;
-#endif
-
 #else
-
 typedef void * Addr;
-
-#endif
-
 #endif
 
 typedef struct tlsseg {