On 2019-12-12 22:47, Martin Storsjö wrote:
On Thu, 12 Dec 2019, Steve Lhomme wrote:
https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-gettemppathw
https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-gettemppatha
---
mingw-w64-headers/include/fileapi.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/mingw-w64-headers/include/fileapi.h
b/mingw-w64-headers/include/fileapi.h
index fc62d24f..c9d4b1db 100644
--- a/mingw-w64-headers/include/fileapi.h
+++ b/mingw-w64-headers/include/fileapi.h
@@ -99,8 +99,6 @@ WINBASEAPI DWORD WINAPI SetFilePointer (HANDLE
hFile, LONG lDistanceToMove, PLON
WINBASEAPI WINBOOL WINAPI WriteFileGather (HANDLE hFile,
FILE_SEGMENT_ELEMENT aSegmentArray[], DWORD nNumberOfBytesToWrite,
LPDWORD lpReserved, LPOVERLAPPED lpOverlapped);
WINBASEAPI WINBOOL WINAPI GetVolumeNameForVolumeMountPointW (LPCWSTR
lpszVolumeMountPoint, LPWSTR lpszVolumeName, DWORD cchBufferLength);
WINBASEAPI WINBOOL WINAPI GetVolumePathNamesForVolumeNameW (LPCWSTR
lpszVolumeName, LPWCH lpszVolumePathNames, DWORD cchBufferLength,
PDWORD lpcchReturnLength);
- WINBASEAPI DWORD WINAPI GetTempPathA (DWORD nBufferLength, LPSTR
lpBuffer);
- WINBASEAPI DWORD WINAPI GetTempPathW (DWORD nBufferLength, LPWSTR
lpBuffer);
#ifdef UNICODE
#define DefineDosDevice DefineDosDeviceW
@@ -121,7 +119,6 @@ WINBASEAPI DWORD WINAPI SetFilePointer (HANDLE
hFile, LONG lDistanceToMove, PLON
#define GetDriveType __MINGW_NAME_AW(GetDriveType)
#define GetFullPathName __MINGW_NAME_AW(GetFullPathName)
#define GetLongPathName __MINGW_NAME_AW(GetLongPathName)
-#define GetTempPath __MINGW_NAME_AW(GetTempPath)
#define GetTempFileName __MINGW_NAME_AW(GetTempFileName)
@@ -181,6 +178,8 @@ WINBASEAPI DWORD WINAPI SetFilePointer (HANDLE
hFile, LONG lDistanceToMove, PLON
WINBASEAPI WINBOOL WINAPI SetFilePointerEx (HANDLE hFile,
LARGE_INTEGER liDistanceToMove, PLARGE_INTEGER lpNewFilePointer, DWORD
dwMoveMethod);
WINBASEAPI WINBOOL WINAPI UnlockFileEx (HANDLE hFile, DWORD
dwReserved, DWORD nNumberOfBytesToUnlockLow, DWORD
nNumberOfBytesToUnlockHigh, LPOVERLAPPED lpOverlapped);
WINBASEAPI WINBOOL WINAPI WriteFile (HANDLE hFile, LPCVOID lpBuffer,
DWORD nNumberOfBytesToWrite, LPDWORD lpNumberOfBytesWritten,
LPOVERLAPPED lpOverlapped);
+ WINBASEAPI DWORD WINAPI GetTempPathA (DWORD nBufferLength, LPSTR
lpBuffer);
+ WINBASEAPI DWORD WINAPI GetTempPathW (DWORD nBufferLength, LPWSTR
lpBuffer);
#define CreateDirectory __MINGW_NAME_AW(CreateDirectory)
#define DeleteFile __MINGW_NAME_AW(DeleteFile)
@@ -190,6 +189,7 @@ WINBASEAPI DWORD WINAPI SetFilePointer (HANDLE
hFile, LONG lDistanceToMove, PLON
#define GetFileAttributesEx __MINGW_NAME_AW(GetFileAttributesEx)
#define RemoveDirectory __MINGW_NAME_AW(RemoveDirectory)
#define SetFileAttributes __MINGW_NAME_AW(SetFileAttributes)
+#define GetTempPath __MINGW_NAME_AW(GetTempPath)
#if _WIN32_WINNT >= 0x0600
WINBASEAPI WINBOOL WINAPI SetFileInformationByHandle (HANDLE hFile,
FILE_INFO_BY_HANDLE_CLASS FileInformationClass, LPVOID
lpFileInformation, DWORD dwBufferSize);
--
2.17.1
LGTM, but the block you're moving it into is a bit incorrectly flagged
at the moment, and the other patch you sent was wrong. But I'm sending
two other patches to fix this alrea.
In the 2 patches set, I don't see GetTempPath() moved to a section that
would allow it to be use for Winstore apps. It's still in the "#if
WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)" section.
When compiled with WINAPI_FAMILY=WINAPI_FAMILY_APP it gives:
((WINAPI_PARTITION_APP &
(WINAPI_PARTITION_DESKTOP|WINAPI_PARTITION_APP)) ==
(WINAPI_PARTITION_DESKTOP|WINAPI_PARTITION_APP))
Which is false.
Also regarding MSDN docs, apparently they only print "UWP apps" there
now, for functions that are available in the app partition right now.
They used to distinguish between things that became available in the app
partition in 10 by printing "UWP apps" while saying "Store apps" for
functions that were available for apps already in 8.
But checking against WinSDK 8, it does seem to always have been
available for apps, so this patch is right.
// Martin
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public