[commit: ghc] master: Don't redefine typedef names (a6675a9)
git at git.haskell.org
git at git.haskell.org
Mon Mar 27 12:41:37 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/a6675a93efe7cae2f206508047a39e73ce4e92a5/ghc
>---------------------------------------------------------------
commit a6675a93efe7cae2f206508047a39e73ce4e92a5
Author: Gabor Greif <ggreif at gmail.com>
Date: Mon Mar 27 13:33:49 2017 +0200
Don't redefine typedef names
instead define the structs referred to by
- SectionFormatInfo
- ObjectCodeFormatInfo
that were only forward-declared earlier.
This fixes redefinition errors with gcc4.4
>---------------------------------------------------------------
a6675a93efe7cae2f206508047a39e73ce4e92a5
rts/LinkerInternals.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/rts/LinkerInternals.h b/rts/LinkerInternals.h
index 2217c5e..16fbab2 100644
--- a/rts/LinkerInternals.h
+++ b/rts/LinkerInternals.h
@@ -318,12 +318,12 @@ char *cstring_from_section_name(
|| defined(dragonfly_HOST_OS) || defined(netbsd_HOST_OS) \
|| defined(openbsd_HOST_OS) || defined(gnu_HOST_OS)
# define OBJFORMAT_ELF
-typedef struct _ObjectCodeFormatInfo { void* placeholder;} ObjectCodeFormatInfo;
-typedef struct _SectionFormatInfo { void* placeholder; } SectionFormatInfo;
+struct _SectionFormatInfo { void* placeholder; };
+struct _ObjectCodeFormatInfo { void* placeholder; };
#elif defined (mingw32_HOST_OS)
# define OBJFORMAT_PEi386
-typedef struct _ObjectCodeFormatInfo { void* placeholder;} ObjectCodeFormatInfo;
-typedef struct _SectionFormatInfo { void* placeholder; } SectionFormatInfo;
+struct _SectionFormatInfo { void* placeholder; };
+struct _ObjectCodeFormatInfo { void* placeholder; };
#elif defined(darwin_HOST_OS) || defined(ios_HOST_OS)
# define OBJFORMAT_MACHO
# include "linker/MachOTypes.h"
More information about the ghc-commits
mailing list