Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | windows: Use WINAPI call convention for Windows API callbacks | Martin Willi | 2014-06-06 | 1 | -1/+1 |
| | | | | | For x86_64 it does not actually matter, but for i686 builds the call convention is different with WINAPI. | ||||
* | utils: Add a wait_sigint() function to wait for SIGINT or equivalent | Martin Willi | 2014-06-04 | 1 | -0/+83 |
| | |||||
* | utils: Provide a path_absolute() function to check path for non-relativeness | Martin Willi | 2014-06-04 | 1 | -0/+27 |
| | | | | 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 |
| | |||||
* | windows: Provide a time_monotonic() based on GetTickCount64() | Martin Willi | 2014-06-04 | 1 | -0/+21 |
| | |||||
* | 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 | 1 | -0/+2 |
| | |||||
* | windows: Add utils_init/deinit functions to initialize Winsock2 | Martin Willi | 2014-06-04 | 1 | -0/+20 |
| | |||||
* | utils: Printf() defined time output should gmtime/localtime_r() fail | Martin Willi | 2014-06-04 | 1 | -10/+13 |
| | |||||
* | printf-hook-builtin: Support Windows console colors using TTY escape codes | Martin Willi | 2014-06-04 | 1 | -1/+4 |
| | |||||
* | 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 |
| | |||||
* | utils: Use GCC's __atomic built-ins if available | Tobias Brunner | 2014-04-24 | 1 | -2/+2 |
| | | | | | | | | These are available since GCC 4.7 and will eventually replace the __sync operations. They support the memory model defined by C++11. For instance, by using __ATOMIC_RELAXED for some operations on the reference counters we can avoid memory barriers, which are required by __sync operations (whose memory model essentially is __ATOMIC_SEQ_CST). | ||||
* | utils: Add ref_cur() to retrieve the current value of a reference counter | Tobias Brunner | 2014-04-24 | 1 | -1/+13 |
| | | | | | | | | | | On many architectures it is safe to read the value directly (those using cache coherency protocols, and with atomic loads for 32-bit values) but it is not if that's not the case or if we ever decide to make refcount_t 64-bit (load not atomic on x86). So make sure the operation is actually atomic and that users do not have to care about the size of refcount_t. | ||||
* | utils: Add memrchr(3) replacement for platforms that don't support it | Tobias Brunner | 2014-02-26 | 1 | -1/+23 |
| | | | | For instance, on Mac OS X memrchr(3) is not provided by the C library. | ||||
* | utils: Add thread-safe variants of dirname(3) and basename(3) | Tobias Brunner | 2014-02-24 | 1 | -3/+61 |
| | |||||
* | utils: Move thread-safe strerror replacement to a separate file | Tobias Brunner | 2014-02-24 | 1 | -78/+0 |
| | | | | | For some utils _GNU_SOURCE might be needed but that conflicts with the signature of strerror_r(3). | ||||
* | utils: Add strreplace function | Tobias Brunner | 2014-01-23 | 1 | -1/+53 |
| | |||||
* | utils: Fix %T printf hook on big-endian systems | Tobias Brunner | 2014-01-06 | 1 | -1/+1 |
| | | | | | | | | The cast to a bool* cut of the actual value on big-endian systems if bool was shorter than int because the bool argument to printf gets promoted to an int. Fixes #479. | ||||
* | utils: Fix check for fmemopen() fallback implementation | Martin Willi | 2013-10-24 | 1 | -1/+1 |
| | |||||
* | utils: Provide a fmemopen(3) fallback using BSD funopen() | Martin Willi | 2013-10-24 | 1 | -0/+46 |
| | |||||
* | utils: ref_get() returns the new value of the reference counter | Martin Willi | 2013-06-11 | 1 | -2/+6 |
| | | | | This allows us to use ref_get() for getting unique values. | ||||
* | Allow memstr() to be called with NULL arguments | Tobias Brunner | 2013-06-11 | 1 | -1/+6 |
| | |||||
* | Removed unused clalloc() function | Tobias Brunner | 2013-06-11 | 1 | -13/+0 |
| | |||||
* | Add a utility function to resolve TTY color escape codes dynamically | Martin Willi | 2013-03-04 | 1 | -0/+63 |
| | |||||
* | Add a global return_success() method implementation | Martin Willi | 2013-02-14 | 1 | -0/+8 |
| | |||||
* | time is a time_t pointer | Andreas Steffen | 2013-02-04 | 1 | -1/+1 |
| | |||||
* | Moved utils.[ch] to utils folder | Tobias Brunner | 2012-10-24 | 1 | -0/+570 |