summaryrefslogtreecommitdiffstats
path: root/include/osmocom/core/utils.h
Commit message (Collapse)AuthorAgeFilesLines
...
* utils.h: we need to include utils.h for osmo_generate_backtrace()Harald Welte2013-07-061-0/+2
| | | | | this causes compiler warnings in user code ever since commit 55cf02221f0654a3f48888f3b13766b671a120f0
* misc: Fix compiler warnings about the static_assert macro with gcc 4.8Holger Hans Peter Freyther2013-07-011-1/+1
| | | | | | | | | | | | | The modified macro is still working on a gcc 4.7 and gcc 4.8 after the removal of the typedef and addition of the unused attribute. include/osmocom/core/msgb.h: In function ‘msgb_alloc_headroom’: include/osmocom/core/utils.h:40:51: warning: typedef ‘dummyheadroom_bigger’ locally defined but not used [-Wunused-local-typedefs] #define osmo_static_assert(exp, name) typedef int dummy##name [(exp) ? 1 : -1]; ^ include/osmocom/core/msgb.h:386:2: note: in expansion of macro ‘osmo_static_assert’ osmo_static_assert(size > headroom, headroom_bigger); ^
* utils: Use fprintf to print the assertion and generate a backtraceKaterina Barone-Adesi2013-03-251-1/+2
| | | | | | | | | This is changing the semantic of the assert. The regression tests now either need to check the stderr result, the exit status or print a message when all tests are completed. This is not that bad as the osmo_generate_backtrace is printing to the stdout right now.
* utils: Introduce OSMO_ASSERT in the utils and use it in the unit testsKaterina Barone-Adesi2013-03-091-0/+7
| | | | | The tests should unconditionally assert, regardless of debug settings. This uses the OSMO_ prefix as it's in the global namespace.
* utils: Change semantic of OSMO_MAX/OSMO_MIN to match semantic of a functionHolger Hans Peter Freyther2012-08-151-2/+2
| | | | | | | Add parentheses around the OSMO_MAX and OSMO_MIN macro to match the behaviour of calling a function. The current version does not evaluate to what is expected. (OSMO_MAX(3, 2) + 13) currently results in 3 and not 16.
* doc: Fix the Doxygen section endingsSylvain Munaut2012-04-181-1/+1
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* utils: Add declaration back for osmo_osmo_hexdump_nospcSylvain Munaut2011-11-131-0/+1
| | | | | | | | As it turns out, if a project uses the old name but without a declaration, it'll causes a segfault on 64 bits platform (because of the implicit int return type which doesn't apply since here it's a pointer). Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* utils: Fix a bad double osmo_ prefix for osmo_hexdump_nospcSylvain Munaut2011-11-101-1/+1
| | | | | | Hopefully no project where using them it seems Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* doxygen: add doxygen module 'utils'Harald Welte2011-08-171-54/+7
|
* start to add doxygen documentation to libosmocore headersHarald Welte2011-08-161-2/+63
|
* add definition of OSMO_MIN macro, similar to OSMO_MAXHarald Welte2011-07-271-0/+1
|
* add MAX() macro as OSMO_MAXHarald Welte2011-06-261-0/+1
|
* utils: use namespace prefix osmo_*Pablo Neira Ayuso2011-05-071-7/+7
| | | | | | | | | | | | Summary of changes: s/bcd2char/osmo_bcd2char/g s/char2bcd/osmo_char2bcd/g s/hexparse/osmo_hexparse/g s/hexdump/osmo_hexdump/g s/hexdump_nospc/osmo_hexdump_nospc/g s/ubit_dump/osmo_ubit_dump/g s/static_assert/osmo_static_assert/g
* utils: move OSMO_SNPRINT_RET() macro definition to osmocom/core/utils.hPablo Neira Ayuso2011-03-281-0/+9
| | | | | This is used by the logging to vty conversion functions by now, but it may be of help for other functions that plan to use snprintf().
* include: reorganize headers file to include/osmocom/[gsm|core]Pablo Neira Ayuso2011-03-231-0/+30
This patch moves all GSM-specific definitions to include/osmocom/gsm. Moreover, the headers in include/osmocore/ have been moved to include/osmocom/core. This has been proposed by Harald Welte and Sylvain Munaunt. Tested with `make distcheck'. Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>