https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0e4dd0fcbc3df08e1528b4...
commit 0e4dd0fcbc3df08e1528b4540650751e18a69408 Author: Eric Kohl eric.kohl@reactos.org AuthorDate: Thu Sep 19 15:25:23 2019 +0200 Commit: Eric Kohl eric.kohl@reactos.org CommitDate: Thu Sep 19 15:25:23 2019 +0200
[CABMAN] Second addendum to 7afc888: Use the old code to make Linux happy.
Sorry for the noise, but I do not have a Linux machine to test the build. :-/ --- sdk/tools/cabman/CCFDATAStorage.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/sdk/tools/cabman/CCFDATAStorage.cxx b/sdk/tools/cabman/CCFDATAStorage.cxx index c827a6e87f5..eecb6b5b4d6 100644 --- a/sdk/tools/cabman/CCFDATAStorage.cxx +++ b/sdk/tools/cabman/CCFDATAStorage.cxx @@ -55,6 +55,7 @@ CCFDATAStorage::~CCFDATAStorage() */ ULONG CCFDATAStorage::Create() { +#if defined(_WIN32) char TmpName[PATH_MAX]; char *pName; int length; @@ -77,7 +78,10 @@ ULONG CCFDATAStorage::Create() FileHandle = fopen(FullName, "w+b"); if (FileHandle == NULL) return CAB_STATUS_CANNOT_CREATE; - +#else + if ((FileHandle = tmpfile()) == NULL) + return CAB_STATUS_CANNOT_CREATE; +#endif return CAB_STATUS_SUCCESS; }
@@ -98,7 +102,9 @@ ULONG CCFDATAStorage::Destroy()
FileHandle = NULL;
+#if defined(_WIN32) remove(FullName); +#endif
return CAB_STATUS_SUCCESS; }