https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bff31569e60101936426f…
commit bff31569e60101936426f0bdb0eecdbd7b8f795c
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Sat Dec 23 18:45:59 2023 +0100
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Thu Feb 8 19:08:39 2024 +0100
[USETUP] Make the "SpApiSup" files usable from e.g. the GUI setup.
---
base/setup/usetup/spapisup/cabinet.c | 6 ++++++
base/setup/usetup/spapisup/fileqsup.c | 2 ++
base/setup/usetup/spapisup/infsupp.c | 2 ++
3 files changed, 10 insertions(+)
diff --git a/base/setup/usetup/spapisup/cabinet.c b/base/setup/usetup/spapisup/cabinet.c
index c9efdbc5431..414008163a5 100644
--- a/base/setup/usetup/spapisup/cabinet.c
+++ b/base/setup/usetup/spapisup/cabinet.c
@@ -8,7 +8,9 @@
* CSH 15/08-2003 Created
*/
+#ifndef _USETUP_PCH_
#include "usetup.h"
+#endif
#define Z_SOLO
#include <zlib.h>
@@ -136,6 +138,8 @@ typedef struct _CFDATA
/* FUNCTIONS ****************************************************************/
+#if !defined(_INC_MALLOC) && !defined(_INC_STDLIB)
+
/* Needed by zlib, but we don't want the dependency on the CRT */
void *__cdecl
malloc(size_t size)
@@ -155,6 +159,8 @@ calloc(size_t nmemb, size_t size)
return (void *)RtlAllocateHeap(ProcessHeap, HEAP_ZERO_MEMORY, nmemb * size);
}
+#endif // !_INC_MALLOC && !_INC_STDLIB
+
/* Codecs */
diff --git a/base/setup/usetup/spapisup/fileqsup.c
b/base/setup/usetup/spapisup/fileqsup.c
index d6846881d96..10fc5d335ac 100644
--- a/base/setup/usetup/spapisup/fileqsup.c
+++ b/base/setup/usetup/spapisup/fileqsup.c
@@ -27,7 +27,9 @@
/* INCLUDES *****************************************************************/
+#ifndef _USETUP_PCH_
#include "usetup.h"
+#endif
#define NDEBUG
#include <debug.h>
diff --git a/base/setup/usetup/spapisup/infsupp.c b/base/setup/usetup/spapisup/infsupp.c
index 98212975cb4..012b29b9e63 100644
--- a/base/setup/usetup/spapisup/infsupp.c
+++ b/base/setup/usetup/spapisup/infsupp.c
@@ -27,7 +27,9 @@
/* INCLUDES ******************************************************************/
+#ifndef _USETUP_PCH_
#include "usetup.h"
+#endif
#define NDEBUG
#include <debug.h>