Skip to content

Commit 10d81b7

Browse files
HBeluscabinarymaster
authored andcommitted
[FREELDR:XBOX:PC98] Fix compilation dependencies and linking (reactos#8512)
Addendum to commit 9e64fa8 (PR reactos#8510) pcmem.c: Surround more PC-specific routines in `!SARCH_XBOX || !SARCH_PC98`, so that they aren't compiled for XBOX or PC98. pcat.cmake: Inform that pcmem.c is used by pc98mem.c
1 parent ddee472 commit 10d81b7

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

boot/freeldr/freeldr/arch/i386/pc/pcmem.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ DBG_DEFAULT_CHANNEL(MEMORY);
3737
BIOS_MEMORY_MAP PcBiosMemoryMap[MAX_BIOS_DESCRIPTORS];
3838
ULONG PcBiosMapCount;
3939

40-
FREELDR_MEMORY_DESCRIPTOR PcMemoryMap[MAX_BIOS_DESCRIPTORS + 1];
40+
#if !defined(SARCH_XBOX) && !defined(SARCH_PC98)
41+
static FREELDR_MEMORY_DESCRIPTOR PcMemoryMap[MAX_BIOS_DESCRIPTORS + 1];
42+
#endif
4143
ULONG PcMapCount;
4244

4345
ULONG
@@ -48,6 +50,9 @@ AddMemoryDescriptor(
4850
IN PFN_NUMBER PageCount,
4951
IN TYPE_OF_MEMORY MemoryType);
5052

53+
/* FIXME: Abstract things better so we don't need to place define here */
54+
#if !defined(SARCH_XBOX) && !defined(SARCH_PC98)
55+
5156
static
5257
BOOLEAN
5358
GetExtendedMemoryConfiguration(ULONG* pMemoryAtOneMB /* in KB */, ULONG* pMemoryAtSixteenMB /* in 64KB */)
@@ -480,6 +485,8 @@ PcMemGetBiosMemoryMap(PFREELDR_MEMORY_DESCRIPTOR MemoryMap, ULONG MaxMemoryMapSi
480485
return PcBiosMapCount;
481486
}
482487

488+
#endif // !SARCH_XBOX && !SARCH_PC98
489+
483490
VOID
484491
ReserveMemory(
485492
PFREELDR_MEMORY_DESCRIPTOR MemoryMap,
@@ -595,6 +602,9 @@ PcMemFinalizeMemoryMap(
595602
return PcMapCount;
596603
}
597604

605+
/* FIXME: Abstract things better so we don't need to place define here */
606+
#if !defined(SARCH_XBOX) && !defined(SARCH_PC98)
607+
598608
PFREELDR_MEMORY_DESCRIPTOR
599609
PcMemGetMemoryMap(ULONG *MemoryMapSize)
600610
{
@@ -661,5 +671,6 @@ PcMemGetMemoryMap(ULONG *MemoryMapSize)
661671
return PcMemoryMap;
662672
}
663673

674+
#endif // !SARCH_XBOX && !SARCH_PC98
664675

665676
/* EOF */

boot/freeldr/freeldr/arch/i386/xbox/xboxmem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ XboxMultibootMemoryType(ULONG Type)
222222
}
223223
}
224224

225-
FREELDR_MEMORY_DESCRIPTOR XboxMemoryMap[MAX_BIOS_DESCRIPTORS + 1];
225+
static FREELDR_MEMORY_DESCRIPTOR XboxMemoryMap[MAX_BIOS_DESCRIPTORS + 1];
226226

227227
PFREELDR_MEMORY_DESCRIPTOR
228228
XboxMemGetMemoryMap(ULONG *MemoryMapSize)

boot/freeldr/freeldr/pcat.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ if(ARCH STREQUAL "i386")
8989

9090
elseif(SARCH STREQUAL "pc98")
9191
list(APPEND PCATLDR_ARC_SOURCE
92-
arch/i386/pc/pcmem.c
92+
arch/i386/pc/pcmem.c # pc98mem.c depends on it
9393
arch/i386/pc98/machpc98.c
9494
arch/i386/pc98/pc98beep.c
9595
arch/i386/pc98/pc98cons.c

0 commit comments

Comments
 (0)