Commit graph

10 commits

Author SHA1 Message Date
Felix Fietkau
bd47d85d38 utils: make le16 endian conversion functions work with arguments that have side effects
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-02-14 23:39:57 +01:00
Felix Fietkau
fcd5ba8fbd utils.h: make 16-bit little endian conversion robust against pointer subtraction arguments
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-02-14 22:02:56 +01:00
Felix Fietkau
d01922625d utils: add little-endian swap helpers
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-02-13 12:35:19 +01:00
Felix Fietkau
e5a40544ec utils: prefer using gccs builtin swapping functions which support constant folding
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-02-11 22:08:07 +01:00
Felix Fietkau
5ad190fccf utils: move endian swap helpers and __packed definition to utils.h
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-02-11 21:46:41 +01:00
Felix Fietkau
aa4f3bde06 uloop: add a clock_gettime() implementation for mac os x
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-06 02:42:58 +01:00
Felix Fietkau
7157c3a4df utils: add BUILD_BUG_ON (similar to the one in the linux kernel)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-01 16:10:44 +01:00
Felix Fietkau
59000546c0 utils: make it unnecessary to specify the last NULL argument for calloc_a
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2012-12-31 15:40:12 +01:00
Felix Fietkau
9c8ab5d64c utils: move ARRAY_SIZE from uloop to utils.h
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2012-12-31 15:24:27 +01:00
Felix Fietkau
d03a6a27c7 add utils.c, containing a calloc-like function to allocate multiple chunks with different sizes in one block and return pointers
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2012-12-31 15:24:26 +01:00