diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-03 11:43:20 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-03 12:33:41 +0200 |
commit | f501e4f665cac2f14cd43ae713283cf91ad03d09 (patch) | |
tree | 3538a55df768c4f658db81280e7466e6512d2c47 /platform/macos | |
parent | d331b803b8e63b0dab406a12c21805a17ee0a6a8 (diff) |
Unix: Remove now unnecessary I/O defines, cleanup
- `LIBC_FILEIO_ENABLED` wasn't defined anywhere, even in _other platforms_.
- `NO_NETWORK` is also never defined. It probably isn't enough anyway to
disable network APIs in the current codebase.
- `UNIX_SOCKET_UNAVAILABLE` is never defined in this code but used by some
other platforms, clarify that.
- `NO_STATVFS` can be removed as Android supports it since API level 19,
which is our current min SDK level. It's also only used for
`DirAccessUnix::get_space_left()` which is anyway overridden by
`DirAccessJAndroid::get_space_left()` so it shouldn't make a difference.
* Fixed documentation for `DirAccess.get_space_left()`.
- `NO_FCNTL` is likely also a remnant of early Android days, in current NDK
r23 it seems to be available. Also cleaned up unused `fcntl.h` includes.
- `NO_ALLOCA` is never defined, and we use alloca in many places now.
Diffstat (limited to 'platform/macos')
-rw-r--r-- | platform/macos/dir_access_macos.h | 10 | ||||
-rw-r--r-- | platform/macos/dir_access_macos.mm | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/platform/macos/dir_access_macos.h b/platform/macos/dir_access_macos.h index 920e69ef3e..c76b2835e8 100644 --- a/platform/macos/dir_access_macos.h +++ b/platform/macos/dir_access_macos.h @@ -31,16 +31,16 @@ #ifndef DIR_ACCESS_MACOS_H #define DIR_ACCESS_MACOS_H -#if defined(UNIX_ENABLED) || defined(LIBC_FILEIO_ENABLED) +#if defined(UNIX_ENABLED) + +#include "core/io/dir_access.h" +#include "drivers/unix/dir_access_unix.h" #include <dirent.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> -#include "core/io/dir_access.h" -#include "drivers/unix/dir_access_unix.h" - class DirAccessMacOS : public DirAccessUnix { protected: virtual String fix_unicode_name(const char *p_name) const override; @@ -51,6 +51,6 @@ protected: virtual bool is_hidden(const String &p_name) override; }; -#endif // UNIX ENABLED || LIBC_FILEIO_ENABLED +#endif // UNIX ENABLED #endif // DIR_ACCESS_MACOS_H diff --git a/platform/macos/dir_access_macos.mm b/platform/macos/dir_access_macos.mm index 3373cada1f..22ebac2db4 100644 --- a/platform/macos/dir_access_macos.mm +++ b/platform/macos/dir_access_macos.mm @@ -30,7 +30,7 @@ #include "dir_access_macos.h" -#if defined(UNIX_ENABLED) || defined(LIBC_FILEIO_ENABLED) +#if defined(UNIX_ENABLED) #include <errno.h> @@ -78,4 +78,4 @@ bool DirAccessMacOS::is_hidden(const String &p_name) { return [hidden boolValue]; } -#endif // UNIX_ENABLED || LIBC_FILEIO_ENABLED +#endif // UNIX_ENABLED |