summaryrefslogtreecommitdiff
path: root/drivers/unix
AgeCommit message (Collapse)Author
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] ```
2018-09-30Fix OS X get_ticks_usec return value after #22424Marcelo Fernandez
2018-09-29Use monotonic clock for get_ticks_usecFabio Alessandrelli
Static _clock_start and _clock_setup function. Use clock_gettime on Unix, mach_absolute_time on Mac.
2018-09-28SCons: Build thirdparty code in own env, disable warningsRémi Verschelde
Also remove unnecessary `Export('env')` in other SCsubs, Export should only be used when exporting *new* objects.
2018-09-28Remove socket_helper.h after NetSocket refactorFabio Alessandrelli
2018-09-27Fix invalid comparison warnings: [-Wbool-compare] and [-Wenum-compare]Rémi Verschelde
Fixes the following GCC 5 warnings and actual bugs: ``` drivers/unix/net_socket_posix.cpp:562:28: warning: comparison between 'enum IP::Type' and 'enum NetSocket::Type' [-Wenum-compare] modules/gdscript/gdscript_function.cpp:792:26: warning: comparison of constant '17' with boolean expression is always true [-Wbool-compare] modules/gdscript/gdscript_function.cpp:792:26: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] modules/gdscript/gdscript_parser.cpp:5082:58: warning: comparison of constant '6' with boolean expression is always false [-Wbool-compare] modules/gdscript/gdscript_parser.cpp:5082:58: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] modules/mbedtls/stream_peer_mbed_tls.cpp:286:45: warning: comparison between 'enum StreamPeerTCP::Status' and 'enum StreamPeerSSL::Status' [-Wenum-compare] modules/mbedtls/stream_peer_mbed_tls.cpp:313:45: warning: comparison between 'enum StreamPeerTCP::Status' and 'enum StreamPeerSSL::Status' [-Wenum-compare] ```
2018-09-22Fix Winsock UDP ECONNRESET/ENETRESET bugFabio Alessandrelli
Since Windows 2000: Calling recv/recvfrom when an ICMP reply was received from a previous send/sendto, may result in a WSAECONNRESET error. Since Windows Vista(?)/Windows Server 2008: Calling recv/recvfrom when an ICMP reply was received from a previous send/sendto, may also result in a WSAENETRESET error. Both those features are disabled by this commit using disabling SIO_UDP_CONNRESET and SIO_UDP_NETRESET on newly created UDP sockets.
2018-09-22Detect POLLERR revents too in NetSocketPosix.Fabio Alessandrelli
Usually indicate an RST was received by a TCP socket.
2018-09-22Use select instead of WSAPoll on Windows.Fabio Alessandrelli
WSAPoll is broken by design. It was announced as the new way to introduce compatibility to posix sockets, their implementation was broken, and they decided not to fix it. You can read the full story here: https://daniel.haxx.se/blog/2012/10/10/wsapoll-is-broken/
2018-09-13Properly initialize Winsock on startupFabio Alessandrelli
Also fix typo in _get_last_error which caused Winsock connect to fail.
2018-09-13Merge pull request #21982 from luzpaz/misc-typosRémi Verschelde
Misc. typos
2018-09-12Misc. typosluz.paz
Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`
2018-09-12Unify StreamPeerTCP/TCP_Server with NetSocket APIFabio Alessandrelli
2018-09-12Unify PacketPeerUDP using NetSocketFabio Alessandrelli
2018-09-12New NetSocket interface, BSD/Win implementationFabio Alessandrelli
Unified BSD and Winsock sockets into a single implementation of a generic NetSocket interface. This is some ground work for few network improvements: - Reuse as much code as possible between Posix and Windows. - Provide a single point of implementation for exotic sdks (consoles). - Provide platform agnostic StreamPeerTCP and PacketPeerUDP in core. - Implement connect for UDP allowing for DTLS implementation.
2018-09-12ENet wrapper properly detect disconnect on pollFabio Alessandrelli
Now PacketPeerUDP.get_available_packet_count() return -1 if the socket is in error state.
2018-09-12Properly reset socket blocking state on closeFabio Alessandrelli
2018-09-12Make core/ includes absolute, remove subfolders from include pathRémi Verschelde
This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
2018-08-27Revert "Try closing gracefully before terminating process"Rémi Verschelde
2018-08-24Add print_verbose to print to stdout only in verbose modeRémi Verschelde
Equivalent of the cumbersome: if (OS::get_singleton()->is_stdout_verbose()) print_line(msg);
2018-08-20Try closing gracefully before terminating processMarcin Zawiejski
Use a Microsoft recommended way of process termination for the project process run from the editor. This allows loaded DLLs to receive and handle DLL_PROCESS_DETACH notification and cleanup any global state before the process actually exits.
2018-08-10Revert "added get_creation_time function for gdscript"Juan Linietsky
2018-08-10Merge pull request #18914 from notwarp/masterJuan Linietsky
added get_creation_time function for gdscript
2018-06-05Set SO_BROADCAST socket option for UDP sockets.Fabio Alessandrelli
2018-05-26Merge pull request #18279 from RandomShaper/allow-naive-httpMax Hilbrunner
Allow body-up-to-EOF HTTP responses
2018-05-22Allow body-up-to-EOF HTTP responsesPedro J. Estébanez
Implements the same heuristic as Curl (and web browsers): if no `Content-Length`, no `Connection: keep-alive` and no chunked transfer encoding, assume th rest of the data until EOF is the body, gracefully setting the HTTP client back to the disconnected state. Theoretically, this is not compliant with HTTP 1.1, by which `keep-alive` is the default, but in practice, an explicit header is sent by servers.
2018-05-16added get_creation_time function for gdscriptDaniele Giuliani
2018-05-11Fix Linux/X11 build on ARMs.bruvzg
2018-05-07Local debugger fixes and extensionsBlazej Floch
- Adds q/quit option to console debugging - Adds options (variable_prefix) - Breaks into debugger with Ctrl-C in local debug mode (Unix/Windows) - Added option to list all breakpoints - Fixes add/remove breakpoint bug (invalid path parsing) - Minor cleanup
2018-05-03Merge pull request #18372 from Gamblify/largePckFixRémi Verschelde
Fix for large .pck files