GetLongPathName - not on NT40
authorClaus Gittinger <cg@exept.de>
Fri, 12 Mar 2004 15:58:50 +0100
changeset 8174 299fb336ad5b
parent 8173 a9bf47d88fa6
child 8175 3548845d3c09
GetLongPathName - not on NT40
Win32OperatingSystem.st
--- a/Win32OperatingSystem.st	Fri Mar 12 15:35:09 2004 +0100
+++ b/Win32OperatingSystem.st	Fri Mar 12 15:58:50 2004 +0100
@@ -4426,18 +4426,26 @@
 	    __threadErrno = 0;
 	    rslt = STX_API_CALL4( "GetFullPathName", GetFullPathName, _aPathName, sizeof(nameBuffer), nameBuffer, &pFinal);
 	} while ((rslt < 0) && (__threadErrno == EINTR));
+#else
+	rslt = GetFullPathName(__stringVal(aPathName), sizeof(nameBuffer), nameBuffer, &pFinal);
+#endif
+
+#if WINVER > 0x0400
+	/*
+	 * Attention: GetLongPathName is not available on old NT4.0/W95/W98
+	 */
 	if (rslt > 0) {
+# ifdef DO_WRAP_CALLS
 	    do {
 		__threadErrno = 0;
 		rslt = STX_API_CALL3( "GetLongPathName", GetLongPathName, nameBuffer, nameBuffer, sizeof(nameBuffer));
 	    } while ((rslt < 0) && (__threadErrno == EINTR));
-	}
-#else
-	rslt = GetFullPathName(__stringVal(aPathName), sizeof(nameBuffer), nameBuffer, &pFinal);
-	if (rslt > 0) {
+# else
 	    rslt = GetLongPathName(nameBuffer, nameBuffer, sizeof(nameBuffer));
 	}
-#endif
+# endif
+#endif
+
 	if (rslt > 0) {
 	    RETURN ( __MKSTRING(nameBuffer) );
 	}
@@ -9008,7 +9016,7 @@
 !
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.150 2004-03-12 14:35:09 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.151 2004-03-12 14:58:50 cg Exp $'
 ! !
 
 !Win32OperatingSystem::Win32FILEHandle methodsFor:'release'!
@@ -9035,7 +9043,7 @@
 !
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.150 2004-03-12 14:35:09 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.151 2004-03-12 14:58:50 cg Exp $'
 ! !
 
 !Win32OperatingSystem::Win32Handle methodsFor:'io'!
@@ -9414,7 +9422,7 @@
 !Win32OperatingSystem class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.150 2004-03-12 14:35:09 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.151 2004-03-12 14:58:50 cg Exp $'
 ! !
 
 Win32OperatingSystem initialize!