Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | identification: Only use either , or / to separate RDNs | Tobias Brunner | 2014-06-18 | 1 | -3/+13 | |
| | | | | | If a DN starts with a slash (or whitespace and a slash) slashes will be used, otherwise commas. | |||||
* | windows: Declare strerror_s() | Martin Willi | 2014-06-17 | 1 | -0/+5 | |
| | | | | | Older MinGW versions seem to miss this function declaration. Fixes build on Travis using Ubuntu 12.04. | |||||
* | windows: Extend strerror_r/s by extended POSIX errno strings | Martin Willi | 2014-06-17 | 2 | -0/+66 | |
| | ||||||
* | windows: Implement strerror_r using strerror_s | Martin Willi | 2014-06-17 | 1 | -0/+9 | |
| | ||||||
* | windows: Wrap most Winsock2 Posix functions to set errno | Martin Willi | 2014-06-17 | 2 | -65/+198 | |
| | | | | | | While Winsock provides many Posix compatibility functions, they do not set errno, but use WSAGetLastError() for error reporting. The wrapped functions derive an errno from WSAGetLastError() on failure. | |||||
* | backtrace: Use GetModuleInformation/GetModuleFileNameEx directly on Win32 | Martin Willi | 2014-06-06 | 1 | -2/+10 | |
| | | | | The K32 variants are actually needed on 64-bit only. | |||||
* | windows: Use WINAPI call convention for Windows API callbacks | Martin Willi | 2014-06-06 | 2 | -3/+3 | |
| | | | | | For x86_64 it does not actually matter, but for i686 builds the call convention is different with WINAPI. | |||||
* | windows: Provide POSIX supplement errno values missing in MinGW | Martin Willi | 2014-06-04 | 2 | -23/+147 | |
| | | | | | MinGW headers do not define these values, but Windows system headers do. Windows defines them for POSIX compatibility, we do the same locally. | |||||
* | windows: Provide shutdown(2) operation aliases mapping to those on Windows | Martin Willi | 2014-06-04 | 1 | -0/+7 | |
| | ||||||
* | unit-tests: Support testable functions on Windows, avoid weak GCC symbols | Martin Willi | 2014-06-04 | 2 | -33/+56 | |
| | | | | | | | Instead of using weak symbols, we use dlsym() on Windows to find an arbitrary symbol in libtest to detect its linkage. Instead of creating the associated hashtable in the test runner, we maintain it in libstrongswan, making it significantly simpler. | |||||
* | unit-tests: Seed chunk_hash() only once, but before creating any hashtables | Martin Willi | 2014-06-04 | 2 | -1/+10 | |
| | | | | | | | Due to the removal of pthread_once, we manually create the seed for chunk_hash(). With the new testable functions interface, this won't work for the hashtable initiated using __attribute__((constructor)). Enforce seeding before creating that hashtable. | |||||
* | utils: Add a wait_sigint() function to wait for SIGINT or equivalent | Martin Willi | 2014-06-04 | 2 | -0/+88 | |
| | ||||||
* | chunk: On Windows, use binary mode in chunk_write() | Martin Willi | 2014-06-04 | 1 | -1/+8 | |
| | ||||||
* | parser-helper: Detect absolute pathnames and concatenate paths on Windows | Martin Willi | 2014-06-04 | 1 | -2/+3 | |
| | ||||||
* | utils: Provide a path_absolute() function to check path for non-relativeness | Martin Willi | 2014-06-04 | 2 | -0/+35 | |
| | | | | The usually used trivial '/' check won't work on Windows platforms. | |||||
* | utils: Return plain drive letter as base/pathname for drive letters on Windows | Martin Willi | 2014-06-04 | 1 | -0/+9 | |
| | ||||||
* | utils: Support Windows path separators in path_basename/dirname | Martin Willi | 2014-06-04 | 1 | -9/+9 | |
| | ||||||
* | utils: Define a platform directory separator character used in paths | Martin Willi | 2014-06-04 | 1 | -0/+9 | |
| | ||||||
* | windows: Provide a getpass() implementation | Martin Willi | 2014-06-04 | 2 | -0/+65 | |
| | ||||||
* | chunk: On Windows, chunk_map() opens files in binary mode | Martin Willi | 2014-06-04 | 1 | -2/+7 | |
| | ||||||
* | windows: Don't redeclare inet_ntop/pton if already defined | Martin Willi | 2014-06-04 | 1 | -0/+4 | |
| | ||||||
* | windows: Check for existence of error codes before defining them | Martin Willi | 2014-06-04 | 1 | -0/+4 | |
| | ||||||
* | windows: Overload sleep() cancellable when it is defined in <unistd.h> | Martin Willi | 2014-06-04 | 1 | -1/+3 | |
| | ||||||
* | windows: Provide a close(2) that can close both file handles and sockets | Martin Willi | 2014-06-04 | 2 | -0/+22 | |
| | ||||||
* | chunk: Fallback to recv() on Windows chunk_from_fd() when operating on socket | Martin Willi | 2014-06-04 | 1 | -0/+6 | |
| | ||||||
* | windows: Don't use function macros to overload send/recv() and friends | Martin Willi | 2014-06-04 | 1 | -4/+4 | |
| | | | | | While the macro versions would not catch non-function invocations, we actually have to use catch all to support the sender_t.send() function. | |||||
* | windows: Provide a strndup(3) replacement | Martin Willi | 2014-06-04 | 2 | -0/+20 | |
| | ||||||
* | 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. | |||||
* | 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 | 2 | -0/+10 | |
| | ||||||
* | windows: Provide a time_monotonic() based on GetTickCount64() | Martin Willi | 2014-06-04 | 1 | -0/+21 | |
| | ||||||
* | chunk: Don't depend on pthread directly | Martin Willi | 2014-06-04 | 2 | -13/+13 | |
| | ||||||
* | 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 | |
| | ||||||
* | stream: Separate TCP/Unix stream helpers from stream/service implementations | Martin Willi | 2014-06-04 | 1 | -0/+6 | |
| | | | | | | 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. | |||||
* | 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 | 4 | -0/+75 | |
| | ||||||
* | windows: Provide a setenv() wrapper | Martin Willi | 2014-06-04 | 1 | -0/+12 | |
| | ||||||
* | 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. | |||||
* | 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 | 1 | -12/+195 | |
| | ||||||
* | printf-hook-builtin: Support Windows console colors using TTY escape codes | Martin Willi | 2014-06-04 | 2 | -1/+128 | |
| | ||||||
* | 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. |