Mercurial > minori
comparison dep/animia/src/fd.cc @ 146:d8a61e7e2a36
dep/animia: move fd stuff to a new fd.cc, don't force the user
to include windows.h
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Mon, 13 Nov 2023 13:52:58 -0500 |
parents | |
children | ffa535b6d630 |
comparison
equal
deleted
inserted
replaced
145:8e9b71970bda | 146:d8a61e7e2a36 |
---|---|
1 #include "animia/fd.h" | |
2 | |
3 #ifdef ANIMIA_ON_WIN32 | |
4 # include "animia/fd/win32.h" | |
5 #elif defined(ANIMIA_ON_LINUX) | |
6 # include "animia/fd/linux.h" | |
7 #elif defined(ANIMIA_ON_UNIX) | |
8 # include "animia/fd/bsd.h" | |
9 #endif | |
10 | |
11 namespace animia::internal { | |
12 | |
13 /* really stupid hack to get fd to point to the right | |
14 thing */ | |
15 #ifdef ANIMIA_ON_WIN32 | |
16 win32::Win32FdTools os_fd; | |
17 #elif defined(ANIMIA_ON_LINUX) | |
18 linux::LinuxFdTools os_fd; | |
19 #elif defined(ANIMIA_ON_UNIX) | |
20 unix::UnixFdTools os_fd; | |
21 #else | |
22 BaseFdTools os_fd; | |
23 #endif | |
24 | |
25 BaseFdTools& fd = os_fd; | |
26 | |
27 } |