diff options
Diffstat (limited to 'src/os')
| -rw-r--r-- | src/os/Makefile.am | 11 | ||||
| -rw-r--r-- | src/os/os.c | 24 | ||||
| -rw-r--r-- | src/os/os_main.c | 24 | ||||
| -rw-r--r-- | src/os/windows.c | 25 | ||||
| -rw-r--r-- | src/os/windows_main.c | 26 |
5 files changed, 110 insertions, 0 deletions
diff --git a/src/os/Makefile.am b/src/os/Makefile.am new file mode 100644 index 0000000..46d9edf --- /dev/null +++ b/src/os/Makefile.am @@ -0,0 +1,11 @@ +noinst_LTLIBRARIES = libos.la libosmain.la + +libos_la_SOURCES = src/os/os.c +libos_la_LDFLAGS = -static + +libosmain_la_SOURCES = src/os/os_main.c +libosmain_la_LDFLAGS = -static + +src/os/os.c: src/os/windows.c + +src/os/os_main.c: src/os/windows_main.c diff --git a/src/os/os.c b/src/os/os.c new file mode 100644 index 0000000..2c4fcc6 --- /dev/null +++ b/src/os/os.c @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2026 Peter Mikkelsen <petermikkelsen10@gmail.com> + * + * This file is part of aplwc. + * + * Aplwc is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Aplwc is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with aplwc. If not, see <https://www.gnu.org/licenses/>. + */ + +#include <os.h> + +#if OS == OS_Windows +#include "windows.c" +#endif diff --git a/src/os/os_main.c b/src/os/os_main.c new file mode 100644 index 0000000..1d35a78 --- /dev/null +++ b/src/os/os_main.c @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2026 Peter Mikkelsen <petermikkelsen10@gmail.com> + * + * This file is part of aplwc. + * + * Aplwc is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Aplwc is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with aplwc. If not, see <https://www.gnu.org/licenses/>. + */ + +#include <os_main.h> + +#if OS == OS_Windows +#include "windows_main.c" +#endif diff --git a/src/os/windows.c b/src/os/windows.c new file mode 100644 index 0000000..88d8b27 --- /dev/null +++ b/src/os/windows.c @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2026 Peter Mikkelsen <petermikkelsen10@gmail.com> + * + * This file is part of aplwc. + * + * Aplwc is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Aplwc is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with aplwc. If not, see <https://www.gnu.org/licenses/>. + */ + +#include <os.h> + +int getline(char **, size_t *, void *) +{ + return -1; +} diff --git a/src/os/windows_main.c b/src/os/windows_main.c new file mode 100644 index 0000000..dc30750 --- /dev/null +++ b/src/os/windows_main.c @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2026 Peter Mikkelsen <petermikkelsen10@gmail.com> + * + * This file is part of aplwc. + * + * Aplwc is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Aplwc is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with aplwc. If not, see <https://www.gnu.org/licenses/>. + */ + +#include <os.h> + +int +main(int argc, char **argv) +{ + return portable_main(argc, argv); +} |