You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
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.
This commit is contained in:
@@ -137,10 +137,8 @@ void OS_Unix::initialize_core() {
|
||||
DirAccess::make_default<DirAccessUnix>(DirAccess::ACCESS_USERDATA);
|
||||
DirAccess::make_default<DirAccessUnix>(DirAccess::ACCESS_FILESYSTEM);
|
||||
|
||||
#ifndef NO_NETWORK
|
||||
NetSocketPosix::make_default();
|
||||
IPUnix::make_default();
|
||||
#endif
|
||||
|
||||
_setup_clock();
|
||||
}
|
||||
@@ -170,6 +168,7 @@ Error OS_Unix::get_entropy(uint8_t *r_buffer, int p_bytes) {
|
||||
left -= chunk;
|
||||
ofs += chunk;
|
||||
} while (left > 0);
|
||||
// Define this yourself if you don't want to fall back to /dev/urandom.
|
||||
#elif !defined(NO_URANDOM)
|
||||
int r = open("/dev/urandom", O_RDONLY);
|
||||
ERR_FAIL_COND_V(r < 0, FAILED);
|
||||
|
||||
Reference in New Issue
Block a user