summaryrefslogtreecommitdiffstats
path: root/drivers/unix/os_unix.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit godotengine/godot@d09d82d433b03bb3773fd2a8cc8d6ccc2f8739ceSpartan3222024-11-261-1/+1
|\
| * Convert line breaks to `\n` and strip line break from the end of string ↵Pāvels Nadtočajevs2024-11-231-1/+1
| | | | | | | | returned by `OS::read_string_from_stdin`/`OS::get_stdin_string`.
* | Merge commit godotengine/godot@fd4c29a189e53a1e085df5b9b9a05cac9351b3efSpartan3222024-11-191-1/+1
|\|
| * Use `(r)find_char` instead of `(r)find` for single charactersA Thousand Ships2024-11-171-1/+1
| |
* | Merge commit godotengine/godot@6c05ec3d6732cac44cf85c91db7d3fd1075bcb23Spartan3222024-11-151-2/+6
|\|
| * [Net] Properly rename NetSocketPosix to NetSocketUnixFabio Alessandrelli2024-11-131-2/+6
| |
* | Merge commit godotengine/godot@cb411fa960f0b7fdbd97dcdb4c90f9346360ee0eSpartan3222024-11-121-4/+83
|\|
| * Merge pull request #91201 from bruvzg/con_typeThaddeus Crews2024-11-121-3/+82
| |\ | | | | | | | | | [OS] Add functions to determine standard I/O device type.
| | * [OS] Add functions to determine standard I/O device type.bruvzg2024-11-061-3/+82
| | |
| * | [Net] Split Unix/Windows NetSocket implementationFabio Alessandrelli2024-11-101-1/+1
| |/
* | Fix copyright headers referring to GodotSpartan3222024-10-271-2/+2
| |
* | Rebrand preambles to RedotDubhghlas McLaughlin2024-10-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Credits: Co-authored-by: Skogi <skogi.b@gmail.com> Co-authored-by: Spartan322 <Megacake1234@gmail.com> Co-authored-by: swashberry <swashdev@pm.me> Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: radenthefolf <radenthefolf@gmail.com> Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com> Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com> Co-authored-by: decryptedchaos <nixgod@gmail.com> Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com> Co-authored-by: Mister Puma <MisterPuma80@gmail.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: SingleError <isaaconeoneone@gmail.com> Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
* | Rebrand Godot to RedotRandolph W. Aarseth II2024-10-111-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Linux Editor tests workflow matrix Add Windows Editor w/ Mono workflow matrix Add Generate Glue Code job to Windows workflow Add Build GodotSharp job to Windows workflow Add godot compatibility version references Add Godot author info Add Godot version compatibility info Add Godot donor info Add Godot authors and donors to editor_about.cpp Credits: Co-authored-by: Skogi <skogi.b@gmail.com> Co-authored-by: Spartan322 <Megacake1234@gmail.com> Co-authored-by: swashberry <swashdev@pm.me> Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: radenthefolf <radenthefolf@gmail.com> Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com> Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com> Co-authored-by: decryptedchaos <nixgod@gmail.com> Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com> Co-authored-by: Mister Puma <MisterPuma80@gmail.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: SingleError <isaaconeoneone@gmail.com> Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
* Add support for non-blocking IO mode to `OS.execute_with_pipe`.bruvzg2024-09-061-3/+3
|
* Reduce and prevent unnecessary random-access to `List`A Thousand Ships2024-05-041-8/+8
| | | | | | | | | Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when accessing a single element) * Removed subscript operator, in favor of a more explicit `get` * Added conversion from `Iterator` to `ConstIterator` * Remade existing operations into other solutions when applicable
* Collapse the gdextension arguments into the `GDExtensionData` structFredia Huya-Kouadio2024-04-191-3/+3
| | | | This is used to reduce the number of arguments to `OS::open_dynamic_library(...)`.
* Fix loading GDExtension dependencies on AndroidFredia Huya-Kouadio2024-04-191-1/+1
|
* Add get_process_exit_code() methodkobewi2024-04-161-0/+43
|
* Add renaming of PDB files to avoid blocking themDmitriySalnikov2024-04-051-1/+1
|
* Implement `OS.execute_with_pipe` method to run process with redirected stdio.bruvzg2024-03-271-0/+102
| | | | Implement `pipe://*` path handling for creation of named pipes.
* Merge pull request #86936 from akx/env-utf-8Rémi Verschelde2024-03-111-3/+8
|\ | | | | | | Attempt parsing environment variables as UTF-8
| * Attempt to parse environment variables as UTF-8Aarni Koskela2024-01-071-3/+8
| |
* | Add const lvalue ref to core/* container parametersMuller-Castro2024-02-141-2/+2
| |
* | Add THREADS_ENABLED macro in order to compile Godot to run on the main threadAdam Scott2024-01-171-0/+2
|/
* Merge pull request #84469 from time-killer-games/patch-1Rémi Verschelde2024-01-041-1/+16
|\ | | | | | | Fix NetBSD executable path
| * Fix NetBSD Executable PathSamuel Venable2023-11-061-1/+16
| |
* | Distinguishs between dynamic library not found and can't be opened.Daylily-Zeleen2024-01-011-0/+2
|/
* Linux: Disable RTLD_DEEPBIND mode for dlopen() in sanitizer buildsDavid Snopek2023-10-301-1/+7
|
* On Linux, favor local symbols when loading a shared libraryDavid Snopek2023-10-071-1/+5
|
* [Drivers,Platform] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicableA Thousand Ships2023-09-121-2/+2
|
* Fix formatting of dlopen error message on WindowsKamil Brzoskowski2023-07-091-1/+1
| | | | | | And harmonize the format for all platforms. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
* Remove uses of `vformat()` with no placeholdersHugo Locurcio2023-06-281-1/+1
| | | | This is identical to passing the string directly.
* [OS] Implement and expose to scripting APIs `get_memory_info` method instead ↵bruvzg2023-04-241-1/+204
| | | | of old `get_free_static_memory`.
* OS: Add `unset_environment`, better validate inputRémi Verschelde2023-01-161-6/+13
| | | | | | | | | Instead of returning an undocumented boolean error code, we do the validation checks that should ensure a successful result. Based on: - https://linux.die.net/man/3/setenv - https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setenvironmentvariable
* Merge pull request #70714 from Calinou/doc-os-stdinRémi Verschelde2023-01-121-7/+3
|\ | | | | Improve documentation for `OS.read_string_from_stdin()`
| * Improve documentation for `OS.read_string_from_stdin()`Hugo Locurcio2023-01-111-7/+3
| | | | | | | | | | | | This makes it clearer that calls to this method are blocking. The unused method parameter was also removed.
* | One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
|/ | | | | | | | | | | | | | | | | | | | As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
* Fix reading Unicode from stdio.bruvzg2022-12-211-4/+2
|
* [iOS] Fix getting Unicode executable path, fix "!configured" and ↵bruvzg2022-11-161-1/+1
| | | | "!classes.has(ti.inherits)" error spam on start.
* Unify usage of GLOBAL/EDITOR_GETkobewi2022-10-181-3/+3
|
* Merge pull request #66102 from MJacred/feature/getvideoadapterdriverinfoRémi Verschelde2022-10-111-0/+4
|\ | | | | | | Fetch video adapter driver name and version from OS
| * Fetch video adapter driver name and version from OS on Linux/*BSD and WindowsMJacred2022-10-111-0/+4
| |
* | Merge pull request #64815 from RandomShaper/default_cpu_countRémi Verschelde2022-10-061-4/+0
|\ \ | | | | | | | | | Improve default `OS`'s CPU count getter
| * | Keep a single, portable implementation of `OS::get_processor_count()`Pedro J. Estébanez2022-10-051-4/+0
| | |
* | | Merge pull request #66807 from ↵Rémi Verschelde2022-10-041-2/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | akien-mga/core-unix-remove-NO_FCNTL-and-NO_STATVFS Unix: Remove now unnecessary I/O defines, cleanup
| * | | Unix: Remove now unnecessary I/O defines, cleanupRémi Verschelde2022-10-031-2/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - `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.
* / / Remove NO_THREADS fallback code, Godot 4 requires thread supportRémi Verschelde2022-10-031-2/+0
|/ / | | | | | | | | This also removes `OS::can_use_threads` from the public API since it's always true.
* / SCons: Cleanup `DEBUG`, `_DEBUG` and `NDEBUG` definesRémi Verschelde2022-09-231-5/+0
|/ | | | | | | | | | | | | | | | - `_DEBUG` is MSVC specific so it didn't make much sense to define for Android and iOS builds. - iOS was the only platform to define `DEBUG`. We don't use it anywhere outside thirdparty code, which we usually don't intend to debug, so it seems better to be consistent with other platforms. - Consistently define `NDEBUG` to disable assert behavior in both `release` and `release_debug` targets. This used to be set for `release` for all platforms, and `release_debug` for Android and iOS only. - Due to the above, I removed the only use we made of `assert()` in Godot code, which was only implemented for Unix anyway, should have been `DEV_ENABLED`, and is in PoolAllocator which we don't actually use. - The denoise and recast modules keep defining `NDEBUG` even for the `debug` target as we don't want OIDN and Embree asserting all over the place.
* Add get_distribution_name() and get_version() to OSMJacred2022-09-161-0/+8
| | | | | | supports: LinuxBSD, Windows, macOS, iOS, Android, UWP Co-authored-by: bruvzg
* Fixes #65377: get_datetime_* functions can return wrong valuesJames2022-09-101-17/+4
|