SHGetFolderPathA(CSIDL_PERSONAL) returns personal profile directory.
For temporary test files use directory returned by GetTempPathA().

This avoids linking t_fseeko64 test with shell32.dll library.
And avoid using SHGetFolderPathA() function which is not available on older
WinNT systems.
---
 mingw-w64-crt/testcases/t_fseeko64.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/mingw-w64-crt/testcases/t_fseeko64.c 
b/mingw-w64-crt/testcases/t_fseeko64.c
index 0e68e7399473..702fe42d3d2b 100644
--- a/mingw-w64-crt/testcases/t_fseeko64.c
+++ b/mingw-w64-crt/testcases/t_fseeko64.c
@@ -3,7 +3,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <windows.h>
-#include <shlobj.h>
 
 static const char *writebuf = "TESTVECTORSTRING";
 static char szPath[MAX_PATH];
@@ -66,7 +65,10 @@ static int testread(const char *path){
 int main(int argc, char **argv){
   int check;
   char *path;
-  SHGetFolderPathA(NULL,CSIDL_PERSONAL,NULL,0,szPath);
+  if (GetTempPathA(MAX_PATH, szPath) == 0) return 1;
+#ifdef debugtest
+  printf("tmp: %s\n", szPath);
+#endif
   path = tempnam(szPath, "mingw-w64-lfs64-test-");
 #ifdef debugtest
   printf("Path: %s\n", path);
-- 
2.20.1



_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to