Multiplatform test

This commit is contained in:
2026-07-05 14:29:50 +01:00
parent 09eec850fa
commit fda56686a0
9 changed files with 82 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
// vim:fileencoding=utf-8:foldmethod=marker
#ifndef API_H
#define API_H
void prSayHello(void);
#endif // !API_H
+9
View File
@@ -0,0 +1,9 @@
// vim:fileencoding=utf-8:foldmethod=marker
#include "api.h"
#ifdef WP_PLATFORM_LINUX
#include "../linux/api.c"
#elif defined(WP_PLATFORM_MACOS)
#include "../macos/api.c"
#endif
+17
View File
@@ -0,0 +1,17 @@
// vim:fileencoding=utf-8:foldmethod=marker
#ifndef API_H
#define API_H
#include "../../../src/wapp/wapp.h"
#include "../api.h"
#ifdef WP_PLATFORM_LINUX
#include "../linux/aliases.h"
#include "../linux/api.h"
#elif defined(WP_PLATFORM_MACOS)
#include "../macos/aliases.h"
#include "../macos/api.h"
#endif
#endif // !API_H
+8
View File
@@ -0,0 +1,8 @@
// vim:fileencoding=utf-8:foldmethod=marker
#ifndef LINUX_ALIASES_H
#define LINUX_ALIASES_H
#define prSayHello prSayHelloLinux
#endif // !LINUX_ALIASES_H
+7
View File
@@ -0,0 +1,7 @@
// vim:fileencoding=utf-8:foldmethod=marker
#include <stdio.h>
void prSayHelloLinux(void) {
printf("Hello from Linux\n");
}
+8
View File
@@ -0,0 +1,8 @@
// vim:fileencoding=utf-8:foldmethod=marker
#ifndef LINUX_API_H
#define LINUX_API_H
void prSayHelloLinux(void);
#endif // !LINUX_API_H
+8
View File
@@ -0,0 +1,8 @@
// vim:fileencoding=utf-8:foldmethod=marker
#ifndef MACOS_ALIASES_H
#define MACOS_ALIASES_H
#define prSayHello prSayHelloMac
#endif // !MACOS_ALIASES_H
+7
View File
@@ -0,0 +1,7 @@
// vim:fileencoding=utf-8:foldmethod=marker
#include <stdio.h>
void prSayHelloMac(void) {
printf("Hello from macOS\n");
}
+10
View File
@@ -0,0 +1,10 @@
// vim:fileencoding=utf-8:foldmethod=marker
#ifndef MACOS_API_H
#define MACOS_API_H
#define prSayHello prSayHelloMac
void prSayHelloMac(void);
#endif // !MACOS_API_H