parser: Enable existing codepath for OSX
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 5s

The Unix functions/headers used in parser for getting files/dirs from
the given positional arguments are also available in OSX
(theoretically), so they are now enabled for OSX platforms.

TODO: Add getting files/dirs code for the Windows platform.
This commit is contained in:
Stephen Seo 2024-07-04 11:54:15 +09:00
parent 6ee347da12
commit 518ac3ebe1

View file

@ -24,6 +24,7 @@
#include "platforms.h"
#if SIMPLE_ARCHIVER_PLATFORM == SIMPLE_ARCHIVER_PLATFORM_LINUX || \
SIMPLE_ARCHIVER_PLATFORM == SIMPLE_ARCHIVER_PLATFORM_MAC || \
SIMPLE_ARCHIVER_PLATFORM == SIMPLE_ARCHIVER_PLATFORM_COSMOPOLITAN
#include <dirent.h>
#include <fcntl.h>
@ -251,6 +252,7 @@ SDArchiverLinkedList *simple_archiver_parsed_to_filenames(
SDArchiverHashMap *hash_map = simple_archiver_hash_map_init();
int hash_map_sentinel = 1;
#if SIMPLE_ARCHIVER_PLATFORM == SIMPLE_ARCHIVER_PLATFORM_COSMOPOLITAN || \
SIMPLE_ARCHIVER_PLATFORM == SIMPLE_ARCHIVER_PLATFORM_MAC || \
SIMPLE_ARCHIVER_PLATFORM == SIMPLE_ARCHIVER_PLATFORM_LINUX
for (char **iter = parsed->working_files; iter && *iter; ++iter) {
struct stat st;