summaryrefslogtreecommitdiff
path: root/drivers/unix
AgeCommit message (Collapse)Author
2019-07-29Optimize DirAccessUnix::get_next() for some file systemsHadrien
On some file systems, like ext4 on Linux, readdir() gives enough information to determine the entry type in order to avoid doing a stat() system call. Use this information and call stat() only if necessary: for file systems that do not support this feature and for links.
2019-07-21Revert "Optimize DirAccessUnix::get_next() for some file systems"Geequlim
2019-07-17Optimize DirAccessUnix::get_next() for some file systemsHadrien
On some file systems, like ext4 on Linux, readdir() gives enough information to determine the entry type in order to avoid doing a stat() system call. Use this information and call stat() only if necessary.
2019-07-10Use reference to constant in functionsqarmin
2019-07-07Fixes minor issues found by static analyzerqarmin
2019-07-01Merge pull request #30126 from qarmin/remove_unnecessary_codeRémi Verschelde
Remove unnecessary code and add some error explanations
2019-07-01Remove unnecessary code and add some error explanationsqarmin
2019-07-01Merge pull request #29815 from NilsIrl/plus_file_1Rémi Verschelde
Replace ` + "/" + ` with `String::file_add()`
2019-06-28Fix ip_unix.cpp inclusion order for OpenBSD.Fabio Alessandrelli
2019-06-28Properly disable SIGPIPE on OSX network sockets.Fabio Alessandrelli
Disable SO_NOSIGPIPE socket option when avaiable. Use MSG_NOSIGNAL send flag on systems that support it.
2019-06-27Merge pull request #29941 from qarmin/redundant_code_and_othersRémi Verschelde
Remove redundant code, possible NULL pointers and others
2019-06-26Some code changed with Clang-Tidyqarmin
2019-06-23Replace ` + "/" + ` with `String::file_add()`Nils ANDRÉ-CHANG
2019-06-21Merge pull request #29935 from Faless/net/get_if_multicast_prRémi Verschelde
Multicast, more network interfaces info
2019-06-21Multicast support in NetSocket/PacketPeerUDPFabio Alessandrelli
2019-06-21Implement IP.get_local_interfaces.Fabio Alessandrelli
Allow getting interfaces names and assigned names. On UWP this is not supported, and the function will return one interface for each local address (with interface name the local address itself).
2019-06-20Merge pull request #29283 from qarmin/fix_some_always_same_valuesRémi Verschelde
Remove always true/false values
2019-06-20Fix always true/false valuesqarmin
2019-06-15Fix compilation warnings in JS and Windows buildsRémi Verschelde
Warnings raised by Emscripten 1.38.0 and MinGW64 5.0.4 / GCC 8.3.0. JS can now build with `werror=yes warnings=extra`. MinGW64 still has a few warnings to resolve with `warnings=extra`, and only one with `warnings=all`. Part of #29033 and #29801.
2019-05-21added a const keyword for a methods that return constant literal...hbina085
2019-05-02Ignore a warning in _get_socket_error (-Wlogical-op).marxin
drivers/unix/net_socket_posix.cpp: In member function 'NetSocketPosix::NetError NetSocketPosix::_get_socket_error()': drivers/unix/net_socket_posix.cpp:197:22: warning: logical 'or' of equal expressions [-Wlogical-op] 197 | if (errno == EAGAIN || errno == EWOULDBLOCK) | ^ and: modules/mono/utils/string_utils.cpp: In function 'int {anonymous}::sfind(const String&, int)': modules/mono/utils/string_utils.cpp:68:48: error: logical 'or' of collectively exhaustive tests is always true [-Werror=logical-op] found = src[read_pos] == 's' || (c >= '0' || c <= '4'); ~~~~~~~~~^~~~~~~~~~~
2019-04-07Add FileAccess::set_unix_permissions for Unix platformsJuan Linietsky
2019-04-07Remove SIGCHILD handle in OS_Unix, interferes with pclose()Juan Linietsky
2019-04-09Fix jump over uninitialized value in OS Unix/X11Fabio Alessandrelli
2019-03-20Revert accidental commitsPedro J. Estébanez
This reverts commit fb37284c027b494ed3ec21124001fcb729f42cc4. This reverts commit 4db0f51b9aa76cfc7649787fe1970af606ce8dab.
2019-03-20Create class for shared memory blocks [wip]Pedro J. Estébanez
2019-02-27Merge pull request #26159 from marxin/fix-Wsuggest-attribute=formatRémi Verschelde
Fix -Wsuggest-attribute=format warnings.
2019-02-27Fix -Wsign-compare warnings.marxin
I decided to modify code in a defensive way. Ideally functions like size() or length() should return an unsigned type.
2019-02-27Fix -Wsuggest-attribute=format warnings.marxin
2019-02-13Fix typos with codespellRémi Verschelde
Using codespell 1.14.0. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang doubleclick lod nd numer que te unselect EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
2019-02-04Fix OS_Unix::set_environmentIgnacio Etcheverry
2019-02-03Added set_environment to OS classIgnacio Etcheverry
2019-01-26Fix code style issuesRémi Verschelde
2019-01-25Improve custom thread numbering for POSIXIgnacio Etcheverry
We lazily assign new IDs to threads that do not have one. This is the case for threads not created by the Godot API.
2019-01-21Add function to obtain filesystem type from DirAccess.Juan Linietsky
Change EditorFileSystem to not use directory modification times on FAT32, fixes #20946
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-12-20Android: Better identify thirdparty C/C++ codeRémi Verschelde
- The `cpu-features.{c,h}` code was only used by chance by the webm (libvpx) code, so I moved it there. It was actually introduced before that and wasn't in use, and libvpx just happened to be able to compile thanks to it being bundled. It could potentially be compiled on the fly from the Android NDK, but since we plan to replace the webm module by a GDNative plugin in the near future, I went the bundling route. - `ifaddrs_android.h` is already provided in the Android NDK as `ifaddrs.h`, same as on other Unixes. Yet we cannot use it until we up the min API level to 24, where `getifaddrs` is first defined. I moved the files to `thirdparty/misc` and synced them with upstream WebRTC (only indentation changes and removal of `static` qualifiers). Also removes dropped thirdparty files from COPYRIGHT.txt after changes in #24105 and #24145.
2018-12-20Added OS.get_system_time_msecs()volzhs
2018-12-11Moved member variables to initializer listWilson E. Alvarez
2018-11-27Attempt to avoid breaking people's workflows on the change from ↵Juan Linietsky
8ba0d513fa0068a241a25fbb6db09315fa3309cc
2018-11-22Added missing path verification on Unix, closes #20762Juan Linietsky
2018-11-18Properly accept wildcard when binding IPv4 socket.Fabio Alessandrelli
Also never return null for is_ipv4 to avoid crashes due to engine bug. (better to get an error and a broken socket then seeing your game crash)
2018-10-29Merge pull request #23388 from eska014/html5-stubexecRémi Verschelde
Add proper stubs for OS_JavaScript::execute(), get_process_id(), kill()
2018-10-29Add proper stubs for OS_JavaScript::execute(), get_process_id(), kill()Leon Krause
Avoids linker warnings and errors about undefined references.
2018-10-29Server platform works on OS X tooMarcelo Fernandez
2018-10-07Safer getcwd in DirAccessFabio Alessandrelli
Fix [-Wunused-result]
2018-10-07Avoid possible overflow in OS_Unix readlinkFabio Alessandrelli
Also fix [-Wunused-result]
2018-10-06Fix warnings in HTML5 build outside platform filesLeon Krause
2018-10-04Fix some OSX and iOS Clang warningsRémi Verschelde
Fixes the following XCode 9.4.1 warnings: ``` core/os/memory.cpp:175:13: warning: unused variable 's' [-Wunused-variable] drivers/coremidi/core_midi.cpp:68:14: warning: comparison between NULL and non-pointer ('MIDIEndpointRef' (aka 'unsigned int') and NULL) [-Wnull-arithmetic] drivers/gles2/rasterizer_gles2.cpp:77:24: warning: unused function '_gl_debug_print' [-Wunused-function,34] drivers/unix/thread_posix.cpp:106:12: warning: unused variable 'running_thread' [-Wunused-variable,34] modules/gdnative/nativescript/nativescript.h:371:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] platform/iphone/gl_view.mm:56:14: warning: unused variable 'video_previous_volume' [-Wunused-variable,34] platform/iphone/gl_view.mm:251:12: warning: unused function 'get_first_id' [-Wunused-function,34] platform/iphone/main.m:45:15: warning: unused variable 'app' [-Wunused-variable,34] platform/osx/os_osx.mm:79:15: warning: unused function 'convertRectToBacking' [-Wunused-function] ```
2018-10-03Fix warnings in Android platformRémi Verschelde
Fixes the following Clang 7 warnings: ``` platform/android/os_android.h:240:16: warning: 'OS_Android::native_video_play' hides overloaded virtual function [-Woverloaded-virtual] platform/android/os_android.h:241:15: warning: 'OS_Android::native_video_is_playing' hides overloaded virtual function [-Woverloaded-virtual] platform/android/audio_driver_opensl.cpp:104:3: warning: suggest braces around initialization of subobject [-Wmissing-braces] platform/android/audio_driver_opensl.cpp:129:10: warning: unused variable 'numOutputs' [-Wunused-variable] platform/android/audio_driver_opensl.cpp:130:11: warning: unused variable 'deviceID' [-Wunused-variable] platform/android/java_glue.cpp:795:10: warning: unused variable 'clsio' [-Wunused-variable] platform/android/java_glue.cpp:890:12: warning: unused variable 'gob' [-Wunused-variable] platform/android/java_glue.cpp:592:13: warning: unused variable 'resized' [-Wunused-variable] platform/android/java_glue.cpp:593:13: warning: unused variable 'resized_reload' [-Wunused-variable] modules/mobile_vr/mobile_vr_interface.cpp:401:8: warning: unused variable 'aspect_ratio' [-Wunused-variable] drivers/unix/dir_access_unix.cpp:394:2: warning: THIS IS BROKEN [-W#warnings] ```