Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | unit-tests: Uninline dlopen() and friends, make more dynamic, fix dlerror() | Martin Willi | 2014-06-04 | 2 | -58/+136 | |
| | | | | | As the error string contains a newline, we have to remove that before returning the string. | |||||
* | thread-value: Immediately cleanup all Windows TLS values on destroy | Martin Willi | 2014-06-04 | 3 | -14/+46 | |
| | ||||||
* | windows: Prevent queueing of multiple thread cancel APCs | Martin Willi | 2014-06-04 | 1 | -4/+13 | |
| | | | | | This avoids any races during cleanup invocation if multiple cancel() requests come in. | |||||
* | windows: Provide a complete native Windows threading backend | Martin Willi | 2014-06-04 | 8 | -4/+1509 | |
| | ||||||
* | windows: Provide a cancellable usleep(), but with ms resolution only | Martin Willi | 2014-06-04 | 2 | -0/+18 | |
| | ||||||
* | windows: Add a sleep function acting as cancellation point | Martin Willi | 2014-06-04 | 1 | -0/+9 | |
| | ||||||
* | windows: Provide a sched_yield() implementation | Martin Willi | 2014-06-04 | 5 | -3/+10 | |
| | ||||||
* | windows: Provide a time_monotonic() based on GetTickCount64() | Martin Willi | 2014-06-04 | 1 | -0/+21 | |
| | ||||||
* | library: Change init/deinit order to allow utils to depend on threading | Martin Willi | 2014-06-04 | 2 | -4/+8 | |
| | ||||||
* | chunk: Don't depend on pthread directly | Martin Willi | 2014-06-04 | 3 | -13/+22 | |
| | ||||||
* | utils: Don't directly depend on pthread | Martin Willi | 2014-06-04 | 1 | -40/+53 | |
| | ||||||
* | strerror: Don't directly depend on pthread | Martin Willi | 2014-06-04 | 3 | -36/+98 | |
| | ||||||
* | windows: Provide a strdup variant safe when passing zero-length strings | Martin Willi | 2014-06-04 | 1 | -0/+15 | |
| | ||||||
* | unit-tests: Don't test Unix socket stream/services on Windows | Martin Willi | 2014-06-04 | 1 | -1/+2 | |
| | ||||||
* | unit-tests: Use send/recv on socket in watcher tests | Martin Willi | 2014-06-04 | 1 | -4/+4 | |
| | | | | Windows does not support read/write on sockets. | |||||
* | stream: Separate TCP/Unix stream helpers from stream/service implementations | Martin Willi | 2014-06-04 | 16 | -304/+524 | |
| | | | | | | This allows us to disable Unix sockets cleanly on Windows. Replaces some read/write calls with recv/send counterparts, as Winsock does not like read/writes. | |||||
* | watcher: Add Windows support | Martin Willi | 2014-06-04 | 1 | -16/+80 | |
| | | | | | | | | | | Instead of a pipe we use a TCP socketpair (can't select() a _pipe()), and Windsock2 send/recv functions instead of read/write. Currently supported (and required) are file descriptors provided by Winsock only; we might use a separate mechanism for traditional file handles if required (or switch to Windows events and WaitForMultipleObjects) for a future version. | |||||
* | windows: Map WSAGetLastError() to errno failures in wrapped send/recv/from/to | Martin Willi | 2014-06-04 | 1 | -12/+80 | |
| | ||||||
* | windows: Add send/recv and sendto/recvfrom wrappers supporting MSG_DONTWAIT | Martin Willi | 2014-06-04 | 2 | -0/+135 | |
| | ||||||
* | windows: Implement socketpair() using TCP sockets | Martin Willi | 2014-06-04 | 2 | -0/+69 | |
| | ||||||
* | windows: Add utils_init/deinit functions to initialize Winsock2 | Martin Willi | 2014-06-04 | 6 | -0/+79 | |
| | ||||||
* | windows: Provide a setenv() wrapper | Martin Willi | 2014-06-04 | 1 | -0/+12 | |
| | ||||||
* | unit-tests: Use Windows path for chunk tests, and socket functions if required | Martin Willi | 2014-06-04 | 1 | -2/+10 | |
| | ||||||
* | unit-tests: Don't depend on sockaddr_un to test invalid host_t family | Martin Willi | 2014-06-04 | 1 | -2/+2 | |
| | ||||||
* | unit-tests: Add support for Windows build | Martin Willi | 2014-06-04 | 2 | -27/+198 | |
| | | | | | Instead of signals we catch Windows exceptions. Currently not supported are timers, which is more a convenience thing anyway. | |||||
* | windows: Fix up PRI* printf formatters when building against own backend | Martin Willi | 2014-06-04 | 1 | -0/+71 | |
| | ||||||
* | windows: Use localtime/gmtime to implement _r variants | Martin Willi | 2014-06-04 | 1 | -26/+18 | |
| | | | | The _s variants and friends do not seem to work on Windows 7 and always fail. | |||||
* | asn1: Return a zeroed ASN1 time if gmtime_r() conversion fails | Martin Willi | 2014-06-04 | 1 | -1/+1 | |
| | ||||||
* | utils: Printf() defined time output should gmtime/localtime_r() fail | Martin Willi | 2014-06-04 | 1 | -10/+13 | |
| | ||||||
* | backtrace: Inline esc() helper, making it available to all build variants | Martin Willi | 2014-06-04 | 1 | -12/+12 | |
| | ||||||
* | backtrace: Support backtraces on Windows without DbgHelp | Martin Willi | 2014-06-04 | 1 | -27/+61 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | While DbgHelp provides a convenient API to create backtraces, any executable linking against DbgHelp gets a more than a significant slow down. Further, it can only lookup global symbols, as it expects PDB files we can't produce with a MinGW build. With some core Kernel32.dll functionality, we can capture stack traces much faster. Together with the optional libbfd, we can print very fine backtraces. When --enable-bfd-backtraces is used on Windows, a libbfd.dll is required for the build. Such a DLL can be created from the binutils sources using: # build binutils with mingw... # extract archive members from binutils libraries x86_64-w64-mingw32-ar x $BINUTILS/bfd/.libs/libbfd.a x86_64-w64-mingw32-ar x $BINUTILS/intl/libintl.a x86_64-w64-mingw32-ar x $BINUTILS/libiberty/libiberty.a # create self-contained libbfd.a, with index x86_64-w64-mingw32-ar qs libbfd.a *.o # create DLL from static library x86_64-w64-mingw32-dlltool -e libbfd.o -l libbfd.lib libbfd.a x86_64-w64-mingw32-gcc -shared libbfd.a libbfd.o -o libbfd.dll | |||||
* | backtrace: Add DbgHelp based Windows support for creating/printing backtraces | Martin Willi | 2014-06-04 | 2 | -12/+200 | |
| | ||||||
* | printf-hook-builtin: Support Windows console colors using TTY escape codes | Martin Willi | 2014-06-04 | 2 | -1/+128 | |
| | ||||||
* | windows: Link libstrongswan against ws2_32.dll | Martin Willi | 2014-06-04 | 1 | -0/+4 | |
| | ||||||
* | capabilities: Add build support for Windows | Martin Willi | 2014-06-04 | 1 | -3/+37 | |
| | | | | We might extend it in the future using some Windows rights management. | |||||
* | windows: Use _getmaxstdio as replacement for syscall(_SC_OPEN_MAX) | Martin Willi | 2014-06-03 | 1 | -0/+4 | |
| | ||||||
* | windows: replace mkdir() with Windows _mkdir() variant | Martin Willi | 2014-06-03 | 1 | -0/+4 | |
| | ||||||
* | thread: Add a Windows pthread variant to print thread identifiers | Martin Willi | 2014-06-03 | 1 | -0/+3 | |
| | ||||||
* | windows: Provide wrappers for dlopen() function family | Martin Willi | 2014-06-03 | 2 | -0/+83 | |
| | ||||||
* | crl: Undefine <wincrypt.h>'s CRL_REASON_* and use our enum values instead | Martin Willi | 2014-06-03 | 1 | -8/+20 | |
| | ||||||
* | tun-device: Rearrange headers to build properly when tun devices not supported | Martin Willi | 2014-06-03 | 1 | -19/+13 | |
| | ||||||
* | windows: Add a common Windows header for platform specific wrappers | Martin Willi | 2014-06-03 | 11 | -24/+180 | |
| | | | | | Include some more basic system headers in utils.h, so we can use that common header on the different platforms. | |||||
* | curl: Don't set CURLOPT_FAILONERROR | Tobias Brunner | 2014-05-31 | 1 | -14/+5 | |
| | | | | | With the strongTNC REST API some errors will actually be accompanied by a response we want to receive completely. | |||||
* | unit-tests: Sync threads with main thread in test_cleanup_cancel() | Tobias Brunner | 2014-05-19 | 1 | -0/+5 | |
| | | | | | Without synchronization threads could get canceled before they could disable their cancelability. | |||||
* | soup: Add support to retrieve the response code | Tobias Brunner | 2014-05-19 | 1 | -2/+14 | |
| | ||||||
* | unit-tests: Allow some HTTP write operations to fail | Tobias Brunner | 2014-05-19 | 1 | -7/+12 | |
| | | | | | | Because CURLOPT_FAILONERROR is enabled in the curl plugin an error code will often (not always) cause the client to close the TCP connection before the server has written the complete response. | |||||
* | curl: Add support to return the response code | Tobias Brunner | 2014-05-19 | 1 | -1/+27 | |
| | ||||||
* | unit-tests: Add a test case for HTTP response codes | Tobias Brunner | 2014-05-19 | 1 | -8/+57 | |
| | ||||||
* | fetcher: Add option to retrieve response code from a fetcher | Tobias Brunner | 2014-05-19 | 2 | -0/+10 | |
| | ||||||
* | unit-tests: Defer failures by worker threads | Tobias Brunner | 2014-05-19 | 2 | -5/+36 | |
| | | | | | | | | | | | In some cases the main thread is not ready to immediately call siglongjmp(), e.g. if it currently holds a mutex that is later required during shutdown. Therefore, we delay handling errors in worker threads until the main thread performs the next check itself (or the test function ends). The same issue remains with SIGALRM. |