]> git.seodisparate.com - SimpleArchiver/commitdiff
parser: Enable existing codepath for OSX
authorStephen Seo <seo.disparate@gmail.com>
Thu, 4 Jul 2024 02:54:15 +0000 (11:54 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Thu, 4 Jul 2024 02:54:15 +0000 (11:54 +0900)
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.

src/parser.c

index b54bcdd9e4dc6b02d447016fd21381793611fb48..5d0b2e4abaab1b030e835a58fe0416ebc0fa409a 100644 (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;