On Fri, 13 Dec 2019, Steve Lhomme wrote:

On 2019-12-13 8:29, Martin Storsjö wrote:
On Fri, 13 Dec 2019, Steve Lhomme wrote:

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.

Ah, yes - as I'm ok with that patch as it is, I meant that that one could be included, as is, on top of the two I sent, but I was too lazy to include it in my set.

OK, I misread you the first time. Thanks for the clarification.

Pushed this one, and 1/2 out of the ones I sent (as 2/2 wasn't reviewed yet).

// Martin

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

Reply via email to