comparison dep/animia/src/main.cpp @ 97:18979b066284

animia/unix: fix a bunch of stuff that breaks OS X things
author Paper <mrpapersonic@gmail.com>
date Thu, 02 Nov 2023 13:14:15 -0400
parents 4c6dd5999b39
children 582b2fca1561
comparison
equal deleted inserted replaced
96:bd68e4393e6f 97:18979b066284
1 #include "bsd.h" 1 #include "bsd.h"
2 #include "os.h"
2 #include "linux.h" 3 #include "linux.h"
3 #include "win32.h" 4 #include "win32.h"
4 #include <string> 5 #include <string>
5 #include <unordered_map> 6 #include <unordered_map>
6 #include <vector> 7 #include <vector>
7 #ifdef __linux__
8 # define ON_LINUX
9 #elif (defined(unix) || defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__)))
10 # define ON_UNIX
11 #elif defined(_WIN32)
12 # define ON_WINDOWS
13 #endif
14 8
15 namespace Animia { 9 namespace Animia {
16 10
17 std::vector<int> get_all_pids() { 11 std::vector<int> get_all_pids() {
18 #ifdef ON_UNIX 12 #ifdef ON_UNIX
51 } 45 }
52 46
53 std::vector<std::string> filter_system_files(const std::vector<std::string>& source) { 47 std::vector<std::string> filter_system_files(const std::vector<std::string>& source) {
54 #ifdef ON_WINDOWS 48 #ifdef ON_WINDOWS
55 return Windows::filter_system_files(source); 49 return Windows::filter_system_files(source);
50 #elif defined(ON_OSX)
51 return Unix::filter_system_files(source);
56 #else 52 #else
57 return source; 53 return source;
58 #endif 54 #endif
59 } 55 }
60 56