Skip to content

Commit

Permalink
* macOS: fix SYSTEM.* for Clang 15.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleg-N-Cher committed Nov 21, 2023
1 parent 7f0ecf4 commit ef97ae9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
16 changes: 8 additions & 8 deletions Mod/Lib/SYSTEM.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,36 +164,36 @@ void SYSTEM_INHERIT(SYSTEM_ADRINT *t, SYSTEM_ADRINT *t0)
}


void SYSTEM_ENUMP(void *adr, SYSTEM_ADRINT n, void (*P)())
void SYSTEM_ENUMP(void *adr, SYSTEM_ADRINT n, void (*P)(void*))
{
while (n > 0) {
P((SYSTEM_ADRINT)(*((void**)(adr))));
P((void*)(*((void**)(adr))));
adr = ((void**)adr) + 1;
n--;
}
}

void SYSTEM_ENUMR(void *adr, SYSTEM_ADRINT *typ, SYSTEM_ADRINT size, SYSTEM_ADRINT n, void (*P)())
void SYSTEM_ENUMR(void *adr, SYSTEM_ADRINT *typ, SYSTEM_ADRINT size, SYSTEM_ADRINT n, void (*P)(void*))
{
SYSTEM_ADRINT *t, off;
if (typ == 0) return; // not yet initialized
typ++;
while (n > 0) {
t = typ;
off = *t;
while (off >= 0) {P(*(SYSTEM_ADRINT*)((char*)adr+off)); t++; off = *t;}
while (off >= 0) {P(*(void**)((char*)adr+off)); t++; off = *t;}
adr = ((char*)adr) + size;
n--;
}
}

extern void Heap_Lock();
extern void Heap_Unlock();
extern void Heap_Lock (void);
extern void Heap_Unlock (void);


// Program startup

extern void Heap_InitHeap();
extern void Heap_InitHeap (void);

void SYSTEM_INIT (void *stktop)
{
Expand Down Expand Up @@ -347,7 +347,7 @@ typedef void (*SystemSignalHandler)(INTEGER); // = Platform_SignalHandler
return FALSE;
}

void EnsureConsoleCtrlHandler() {
void EnsureConsoleCtrlHandler (void) {
if (!ConsoleCtrlHandlerSet) {
SetConsoleCtrlHandler(SystemConsoleCtrlHandler, TRUE);
ConsoleCtrlHandlerSet = TRUE;
Expand Down
6 changes: 3 additions & 3 deletions Mod/Lib/SYSTEM.oh
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ extern void Heap_INCREF();
// Main module initialization, registration and finalization

extern void SYSTEM_INIT (void *stktop);
extern void Heap_FINALL();
extern void Heap_FINALL (void);

#define __INIT(argc, argv) static void *m; SYSTEM_INIT(stktop)
#define __REGMAIN(name, enum) m = Heap_REGMOD((CHAR*)name, 32, (void*)enum)
Expand All @@ -454,8 +454,8 @@ extern SYSTEM_PTR SYSTEM_NEWARR(SYSTEM_ADRINT*, SYSTEM_ARRLEN, int, int, int, ..
/* Type handling */

extern void SYSTEM_INHERIT(SYSTEM_ADRINT *t, SYSTEM_ADRINT *t0);
extern void SYSTEM_ENUMP (void *adr, SYSTEM_ADRINT n, void (*P)());
extern void SYSTEM_ENUMR (void *adr, SYSTEM_ADRINT *typ, SYSTEM_ADRINT size, SYSTEM_ADRINT n, void (*P)());
extern void SYSTEM_ENUMP (void *adr, SYSTEM_ADRINT n, void (*P)(void*));
extern void SYSTEM_ENUMR (void *adr, SYSTEM_ADRINT *typ, SYSTEM_ADRINT size, SYSTEM_ADRINT n, void (*P)(void*));

#define __TDESC(t__desc, m, n) \
static struct t__desc { \
Expand Down

0 comments on commit ef97ae9

Please sign in to comment.