summaryrefslogtreecommitdiffstats
path: root/drivers/unix
Commit message (Collapse)AuthorAgeFilesLines
* Rename String::is_rel_path to String::is_relative_pathWilson E. Alvarez2021-08-292-14/+14
|
* Use const references where possible for List range iteratorsRémi Verschelde2021-07-251-1/+1
|
* Merge pull request #50786 from reduz/implement-resource-uidsRémi Verschelde2021-07-241-1/+1
|\ | | | | Implement Resource UIDs
| * Implement Resource UIDsreduz2021-07-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Most resource types now have unique identifiers. * Applies to text, binary and imported resources. * File formats reference both by text and UID (when available). UID always has priority. * Resource UIDs are 64 bits for better compatibility with the engine. * Can be represented and used textually, example `uuid://dapwmgsmnl28u`. * A special binary cache file is used and exported, containing the mappings. Example of how it looks: ```GDScript [gd_scene load_steps=2 format=3 uid="uid://dw86wq31afig2"] [ext_resource type="PackedScene" uid="uid://bt36ojelx8q6c" path="res://subscene.scn" id="1_t56hs"] ``` GDScript, shaders and other special resource files can't currently provide UIDs, but this should be doable with special keywords on the files. This will be reserved for future PRs.
* | Use C++ iterators for Lists in many situationsAaron Franke2021-07-231-3/+3
|/
* Move `alert` function from `DisplayServer` to `OS`.bruvzg2021-07-222-5/+0
|
* Remove unused code related to Travis CIHugo Locurcio2021-07-011-12/+0
|
* Merge pull request #49123 from aaronfranke/it-is-timeRémi Verschelde2021-06-121-2/+2
|\ | | | | Add a Time singleton
| * Add Time singletonAaron Franke2021-06-111-2/+2
| |
* | Core: Move DirAccess and FileAccess to `core/io`Rémi Verschelde2021-06-112-2/+2
|/ | | | | File handling APIs are typically considered part of I/O, and we did have most `FileAccess` implementations in `core/io` already.
* FileAccess: Don't err in `store_buffer` with buffer of size 0Rémi Verschelde2021-06-071-1/+1
| | | | | | | | | | | The error check was added for `FileAccessUnix` but it's not an error when both `p_src` and `p_length` are zero. Added correct error checks to all implementations to prevent the actual erroneous case: `p_src` is nullptr but `p_length > 0` (risk of null pointer indexing). Fixes #33564.
* Style: Cleanup uses of double spaces between wordsRémi Verschelde2021-06-071-1/+1
| | | | | Or after punctuation. Tried to leave third-party stuff alone, unless it has been heavily modified for Godot.
* Merge pull request #49026 from sarchar/multiple-dns-resolvesRémi Verschelde2021-06-012-7/+17
|\
| * Support multiple address resolution in DNS requestsChuck2021-06-012-7/+17
| | | | | | | | | | | | | | | | Add two new functions to the IP class that returns all addresses/aliases associated with a given address. This is a cherry-pick merge from 010a3433df43a94fee95474360ffa6662c7441b9 which was merged in 2.1, and has been updated to build with the latest code. This merge adds two new methods IP.resolve_hostname_addresses and IP.get_resolve_item_addresses that returns a List of all addresses returned from the DNS request.
* | Fix `Directory::get_space_left()` result on macOS and Linux.bruvzg2021-05-311-1/+1
| |
* | Rename File::get_len() get_length()Marcel Admiraal2021-05-252-2/+2
| |
* | Add symlink API to the DirAccess (on macOS and Linux).bruvzg2021-05-222-0/+51
|/
* Make all file access 64-bit (uint64_t)Pedro J. Estébanez2021-05-174-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the types of a big number of variables. General rules: - Using `uint64_t` in general. We also considered `int64_t` but eventually settled on keeping it unsigned, which is also closer to what one would expect with `size_t`/`off_t`. - We only keep `int64_t` for `seek_end` (takes a negative offset from the end) and for the `Variant` bindings, since `Variant::INT` is `int64_t`. This means we only need to guard against passing negative values in `core_bind.cpp`. - Using `uint32_t` integers for concepts not needing such a huge range, like pages, blocks, etc. In addition: - Improve usage of integer types in some related places; namely, `DirAccess`, core binds. Note: - On Windows, `_ftelli64` reports invalid values when using 32-bit MinGW with version < 8.0. This was an upstream bug fixed in 8.0. It breaks support for big files on 32-bit Windows builds made with that toolchain. We might add a workaround. Fixes #44363. Fixes godotengine/godot-proposals#400. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
* Rename `IP_Unix`, `IP_Address` and `TCP_Server` to remove underscoresHugo Locurcio2021-05-065-45/+45
|
* Fix `url_decode` with mixed percent-encoding/Unicode strings. Treat Unix ↵bruvzg2021-04-301-5/+7
| | | | drive names as UTF-8 encoded.
* Core: Drop custom `copymem`/`zeromem` definesRémi Verschelde2021-04-271-5/+5
| | | | | | | | We've been using standard C library functions `memcpy`/`memset` for these since 2016 with 67f65f66391327b2967a20a89c3627e1dd6e84eb. There was still the possibility for third-party platform ports to override the definitions with a custom header, but this doesn't seem useful anymore.
* Merge pull request #47398 from Faless/feature/network-local-port-salvagedRémi Verschelde2021-04-272-17/+53
|\
| * Allow local port control on net_socket connectionsdam2021-04-122-17/+53
| |
* | [Net] Fix socket poll timeout on Windows.Fabio Alessandrelli2021-04-261-1/+1
|/ | | | Now correctly computes the timeout value in milliseconds.
* FileDialog: add Back/Forward buttons, add message for inaccessible folders.bruvzg2021-03-232-0/+24
|
* Allow nullptr with zero length in FileAccess get_bufferAlex Hirsch2021-03-161-1/+1
| | | | fix #47071
* Thread: Re-add pthread_np.h include for FreeBSD/OpenBSDRémi Verschelde2021-03-141-0/+4
| | | | | | Was a regression from #45315. Fixes #46998.
* Add parameter checkes to FileAccess get_buffer functionsAlex Hirsch2021-03-091-0/+2
| | | | fix #46540
* Merge pull request #45315 from RandomShaper/modernize_threadRémi Verschelde2021-01-313-131/+12
|\ | | | | Modernize Thread
| * Modernize ThreadPedro J. Estébanez2021-01-293-131/+12
| | | | | | | | | | | | | | | | | | - Based on C++11's `thread` and `thread_local` - No more need to allocate-deallocate or check for null - No pointer anymore, just a member variable - Platform-specific implementations no longer needed (except for the few cases of non-portable functions) - Simpler for `NO_THREADS` - Thread ids are now the same across platforms (main is 1; others follow)
* | Unify URI encoding/decoding and add to C#Aaron Franke2021-01-281-1/+1
|/ | | | http_escape and percent_encode have been unified into uri_encode, and http_unescape and percent_decode have been unified into uri_decode.
* Modernize RWLockPedro J. Estébanez2021-01-193-158/+0
| | | | | | | | - Based on C++14's `shared_time_mutex` - No more need to allocate-deallocate or check for null - No pointer anymore, just a member variable - Platform-specific implementations no longer needed - Simpler for `NO_THREADS`
* Merge pull request #45157 from madmiraal/fix-44514Rémi Verschelde2021-01-131-2/+4
|\ | | | | Raise SIGKILL instead of CRASH_NOW in child process when fork fails
| * Raise SIGKILL instead of CRASH_NOW in child process when fork failsMarcel Admiraal2021-01-131-2/+4
| |
* | Fix OS::execute() and OS::create_process() command line argument CharStrings ↵bruvzg2021-01-131-6/+16
|/ | | | freed before use.
* Merge pull request #44514 from madmiraal/split-os-executeRémi Verschelde2021-01-122-43/+52
|\ | | | | Split OS::execute into two methods
| * Split OS::execute into two methodsMarcel Admiraal2021-01-092-43/+52
| | | | | | | | | | 1. execute(): Executes a command and returns the results. 2. create_process(): Creates a new process and returns the new process' id.
* | Merge pull request #42740 from lolleko/fix-nanosleep-usageRémi Verschelde2021-01-111-2/+5
|\ \ | |/ |/| Fix nanosleep usage
| * Fix nanosleep usageLorenz Junglas2020-10-121-2/+5
| | | | | | | | | | | | | | | | | | nanosleep returns 0 or -1 not the error code. The error code "EINTR" (if encountered) is placed in errno, in which case nanosleep can be safely recalled with the remaining time. This is required, so that nanosleep continues if the calling thread is interrupted by a signal. See manpage nanosleep(2) for additional details.
* | Update copyright statements to 2021Rémi Verschelde2021-01-0116-32/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
* | Add override keywords to core/os.h derived classes.Marcel Admiraal2020-12-171-25/+25
| |
* | Remove now unused FileAccessBuffered.Fabio Alessandrelli2020-12-061-1/+0
| |
* | Initialize class/struct variables with default values in core/ and drivers/Rafał Mikrut2020-11-231-1/+1
| |
* | doc: Warn about using Node internal processingRémi Verschelde2020-11-201-2/+2
| | | | | | | | | | | | | | | | See #43689. Also 'fixed' some spelling for behavior in publicly visible strings. (Sorry en_GB, en_CA, en_AU, and more... Silicon Valley won the tech spelling war.)
* | Reorganized core/ directory, it was too fatty alreadyreduz2020-11-076-8/+8
| | | | | | | | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* | Fix wrong exit code being returnedEv1lbl0w2020-10-241-1/+1
|/
* Hides special folders in FileDialog for macOSHaoyu Qiu2020-09-282-1/+6
|
* NetBSD: Implement OS_Unix::get_executable_path()Rémi Verschelde2020-09-181-2/+2
| | | | Same implementation as OpenBSD seems to work fine.
* Linux/BSD: Fix support for NetBSDRémi Verschelde2020-09-181-4/+6
| | | | | | | | | Add __NetBSD__ to `platform_config.h` so that it can find `alloca` and use the proper `pthread_setname_np` format. Rename RANDOM_MAX to avoid conflict with NetBSD stdlib. Fixes #42145.
* Replace calls to gmtime with gmtime_r and localtime with localtime_r.Marcel Admiraal2020-09-041-17/+18
|