Commit Graph

32 Commits

Author SHA1 Message Date
Tobias Brunner 149d1bbb05 memory: Use explicit_bzero() as memwipe() if available 2019-08-22 15:04:45 +02:00
Tobias Brunner 2afdb92dd0 atomics: Use type of destination in CAS implementation
The type of the value was incorrect (void**) if NULL was passed to cas_ptr()
as expected value, which caused a compiler warning with Clang because
__atomic_compare_exchange_n() expects the types of the first two arguments
to be the same.
2018-07-03 11:31:31 +02:00
Tobias Brunner 942599b623 atomics: Define HAVE_GCC_ATOMIC_OPERATIONS when building with clang
We should probably check for stdatomic.h and use the c11 functions if
available.
2018-07-03 11:31:31 +02:00
Tobias Brunner 89bd016ef4 Fixed some typos, courtesy of codespell 2018-05-23 16:33:02 +02:00
Tobias Brunner 1b67166921 Unify format of HSR copyright statements 2018-05-23 16:32:53 +02:00
Tobias Brunner b93ebb4ea9 utils: Add helper function to parse time spans from strings 2017-11-02 10:04:03 +01:00
Tobias Brunner 7004a59a4c utils: Make second argument to memxor() const 2017-07-05 10:02:05 +02:00
Andreas Steffen 8993cb556e utils: Defined uletoh16() and htole16() 2016-08-06 12:09:05 +02:00
Tobias Brunner 85597f2983 string: Gracefully handle NULL in str*eq() macros 2016-04-04 10:43:46 +02:00
Tobias Brunner 90c8cf6819 byteorder: Explicitly check for htoXeXX macros
Some platforms have XetohXX macros instead of XeXXtoh macros, in which
case we'd redefine the htoXeXX macros.
2016-03-31 19:47:31 +02:00
Tobias Brunner c545688788 utils: Remove nonsensical typedefs for standard uint types 2016-03-31 09:25:11 +02:00
Andreas Steffen b12c53ce77 Use standard unsigned integer types 2016-03-24 18:52:48 +01:00
Tobias Brunner 755d076fec Fix some Doxygen issues 2016-03-11 12:25:14 +01:00
Tobias Brunner fac9fd7368 byteorder: Simplify htoun64/untoh64 functions 2016-03-04 18:43:26 +01:00
Tobias Brunner 14de79604a byteorder: Always define be64toh/htobe64 macros 2016-03-04 18:43:26 +01:00
Martin Willi 057e6cc524 byteorder: Provide a fallback for le32toh/htole32()
Some older toolchains don't provide these macros, so implement them using
the gcc builtins. We also provide 64-bit variants as used by chapoly.
2015-12-04 10:29:09 +01:00
Martin Willi 8fa0c7bc77 byteorder: Add 32-bit unaligned little-endian conversion functions 2015-12-04 10:29:09 +01:00
Tobias Brunner 6967948241 Initialize variables that some compilers seem to warn about 2015-08-13 15:12:38 +02:00
Martin Willi b3811cfd52 strerror: Move to its own Doxygen subgroup 2015-04-16 14:50:41 +02:00
Martin Willi 04f12ecd29 align: Move min/max/padding/alignment functions to separate files 2015-04-16 14:50:40 +02:00
Martin Willi eaa02bc925 time: Move time related functions to separate files 2015-04-16 14:50:24 +02:00
Martin Willi 1f2326ce58 object: Move OO programming helper macros to a separate header file 2015-04-16 14:50:05 +02:00
Martin Willi 1e02eddb72 status: Move status_t type and functions to separate files 2015-04-16 14:50:05 +02:00
Martin Willi 001a22e2c1 path: Move path related utility functions to separate files 2015-04-16 14:50:04 +02:00
Martin Willi 7585a85f1a tty: Move tty related functions to separate files 2015-04-16 14:50:04 +02:00
Martin Willi 7802ab88a1 memory: Move memory manipulation related functions to separate files 2015-04-16 14:50:02 +02:00
Martin Willi bbfe7a80b1 string: Move string related utility functions to separate files 2015-04-16 14:49:19 +02:00
Martin Willi 03cf888277 byteorder: Move byte order related functions to separate header file 2015-04-16 14:49:19 +02:00
Martin Willi 95726f7617 types: Use generic type definitions to separate header file 2015-04-16 14:49:19 +02:00
Martin Willi 717313c542 atomics: Move atomics/recounting support to separate files 2015-04-16 14:49:19 +02:00
Martin Willi eb94f58595 strerror: Don't directly depend on pthread 2014-06-04 15:53:00 +02:00
Tobias Brunner ba10cd3c7f utils: Move thread-safe strerror replacement to a separate file
For some utils _GNU_SOURCE might be needed but that conflicts with the
signature of strerror_r(3).
2014-02-24 12:04:10 +01:00