diff dmd/lexer.c @ 1103:b30fe7e1dbb9

- Updated to DMD frontend 1.041. - Removed dmd/inifile.c , it's not under a free license, replaced with libconfig based config file.
author Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
date Thu, 12 Mar 2009 20:37:27 +0100
parents aa953cc960b6
children 226c07c71967
line wrap: on
line diff
--- a/dmd/lexer.c	Thu Mar 12 14:08:57 2009 +0100
+++ b/dmd/lexer.c	Thu Mar 12 20:37:27 2009 +0100
@@ -20,28 +20,21 @@
 #include <wchar.h>
 #include <stdlib.h>
 #include <assert.h>
+#include <math.h>
+
+#if _MSC_VER
+#include <time.h>
+#else
 #include <sys/time.h>
-#include <math.h>
+#endif
 
 #ifdef IN_GCC
-
 #include <time.h>
-#include "mem.h"
-
-#else
-
-#if __GNUC__
+#elif __GNUC__
 #include <time.h>
 #endif
 
-#if IN_LLVM
-#include "mem.h"
-#elif _WIN32
-#include "..\root\mem.h"
-#else
-#include "../root/mem.h"
-#endif
-#endif
+#include "rmem.h"
 
 #include "stringtable.h"
 
@@ -56,6 +49,10 @@
 extern "C" char * __cdecl __locale_decpoint;
 #endif
 
+#if _MSC_VER // workaround VC++ bug, labels and types should be in separate namespaces
+#define Lstring Lstr
+#endif
+
 extern int HtmlNamedEntity(unsigned char *p, int length);
 
 #define LS 0x2028	// UTF line separator
@@ -140,11 +137,11 @@
 	    break;
 
 	case TOKint64v:
-	    sprintf(buffer,"%lldL",(long long)int64value);
+	    sprintf(buffer,"%jdL",int64value);
 	    break;
 
 	case TOKuns64v:
-	    sprintf(buffer,"%lluUL",(unsigned long long)uns64value);
+	    sprintf(buffer,"%juUL",uns64value);
 	    break;
 
 #if IN_GCC