mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-21 00:51:12 +00:00
src: filesystem: move includes out of the FileSys namespace
The previous situation is unfortunately not sustainable; header pollution isn't consistent across all non-Windows platforms. As a result, some of the earlier includes may pull functions/types into the global namespace too soon, and the later includes will have no visibility of them because they're in a different namespace. Re-including the necessary one doesn't work because include guards will prevent their re-inclusion, and it's not a good idea to try and #undefine include guards now that we're in a new namespace. This fixes the build on FreeBSD, and likely some other systems as well.
This commit is contained in:
parent
458d81cede
commit
b1f53e7eb5
1 changed files with 12 additions and 8 deletions
|
@ -36,6 +36,18 @@
|
|||
#include <string.h>
|
||||
#include <vector>
|
||||
|
||||
#ifndef _WIN32
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <fnmatch.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <dirent.h>
|
||||
|
||||
#endif
|
||||
|
||||
namespace FileSys {
|
||||
|
||||
enum
|
||||
|
@ -63,14 +75,6 @@ enum
|
|||
|
||||
#ifndef _WIN32
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <fnmatch.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <dirent.h>
|
||||
|
||||
struct findstate_t
|
||||
{
|
||||
std::string path;
|
||||
|
|
Loading…
Reference in a new issue