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:
Kyle Evans 2024-03-17 18:29:42 -05:00 committed by Rachael Alexanderson
parent 458d81cede
commit b1f53e7eb5

View file

@ -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;