diff dmd/root/root.c @ 1257:7af860e4f403

Changes for mingw to compile properly
author Kelly Wilson <wilsonk cpsc.ucalgary.ca>
date Wed, 22 Apr 2009 14:49:49 -0600
parents e961851fb8be
children c48dcf2e2c02
line wrap: on
line diff
--- a/dmd/root/root.c	Wed Apr 22 14:40:56 2009 -0600
+++ b/dmd/root/root.c	Wed Apr 22 14:49:49 2009 -0600
@@ -579,9 +579,6 @@
 	switch (*e)
 	{
 
-	    case '/':
-	       return e + 1;
-
 #if _WIN32
 	    case '/':
 	    case '\\':
@@ -594,6 +591,9 @@
 		 */
 		if (e == str + 1 || e == str + len - 1)
 		    return e + 1;
+#else
+	    case '/':
+	       return e + 1;
 #endif
 	    default:
 		if (e == str)
@@ -1672,12 +1672,7 @@
     psize = sizeof(buffer);
     for (;;)
     {
-#if _WIN32
-	count = _vsnprintf(p,psize,format,args);
-	if (count != -1)
-	    break;
-	psize *= 2;
-#elif POSIX
+#if POSIX || IN_LLVM
         va_list va;
         va_copy(va, args);
 /*
@@ -1697,6 +1692,11 @@
 	    psize = count + 1;
 	else
 	    break;
+#elif _WIN32
+	count = _vsnprintf(p,psize,format,args);
+	if (count != -1)
+	    break;
+	psize *= 2;
 #endif
 	p = (char *) alloca(psize);	// buffer too small, try again with larger size
     }