Index: xmlIO.c
===================================================================
RCS file: /cvs/gnome/libxml2/xmlIO.c,v
retrieving revision 1.171
diff -u -r1.171 xmlIO.c
--- xmlIO.c	30 Aug 2006 13:11:36 -0000	1.171
+++ xmlIO.c	1 Sep 2006 00:41:26 -0000
@@ -255,12 +255,12 @@
 	{
 		if (msvcrt == INVALID_HANDLE_VALUE)
 		{
-			msvcrt = NULL; // ensure to enter this code just once
 			OSVERSIONINFOEX osvi;
+			msvcrt = NULL; // ensure to enter this code just once
 	 
 	    	ZeroMemory(&osvi,sizeof(OSVERSIONINFOEX));
 	   	osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
-	
+
 			// Get Operatingsystemversion. If something is wrong here, the system
 			// is heavily damaged. Refuse to deliver pointers in this case.
 	   	if (!GetVersionEx((OSVERSIONINFO *)&osvi))
@@ -841,7 +841,7 @@
     if (!xmlCheckFilename(path))
         return(NULL);
 
-#if defined(WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
+#if defined(WIN32) && !defined(__BORLANDC__) || defined (__DJGPP__) && !defined (__CYGWIN__)
 	{
 		// One-time autodetect presence of _wfopen. Not available for Win9x
 		static FILE *(*winwfopen)(const wchar_t *path,const wchar_t *mode) = INVALID_HANDLE_VALUE;
@@ -924,13 +924,13 @@
 #else
 	path = &filename[7];
 #endif
-    } else 
+    } else
 	path = filename;
 
     if (path == NULL)
 	return(NULL);
 
-#if defined(WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
+#if defined(WIN32) && !defined(__BORLANDC__) || defined (__DJGPP__) && !defined (__CYGWIN__)
 	{
 		// One-time autodetect presence of _wfopen. Not available for Win9x
 		static FILE *(*winwfopen)(const wchar_t *path,const wchar_t *mode) = INVALID_HANDLE_VALUE;
