diff dmd/Declaration.d @ 183:190ba98276b3

Several changes to make it build on posix systems. I've only tried to build on Mac OS X but it should build on Linux now as well. This should also fix ticket #9.
author Jacob Carlborg <doob@me.com>
date Mon, 25 Oct 2010 15:36:13 +0200
parents cd48cb899aee
children 9f4e5ac4f0a3
line wrap: on
line diff
--- a/dmd/Declaration.d	Mon Oct 18 00:36:44 2010 +0400
+++ b/dmd/Declaration.d	Mon Oct 25 15:36:13 2010 +0200
@@ -15,6 +15,12 @@
 import dmd.VarDeclaration;
 import dmd.OutBuffer;
 
+version (CPP_MANGLE)
+{
+	import dmd.backend.glue;
+	import std.conv : to;
+}
+
 import std.stdio : writef;
 
 import core.stdc.ctype;
@@ -246,7 +252,7 @@
 
 			case LINK.LINKcpp:
 version (CPP_MANGLE) {
-				return cpp_mangle(this);
+				return to!(string)(cpp_mangle(this));
 } else {
 				// Windows C++ mangling is done by C++ back end
 				return ident.toChars();