#22 patch set on github to fix various problems

v1.0_(example)
open
nobody
None
5
2013-09-22
2013-09-22
Peter A. Bigot
No

I've got a fork of libcoap on github, in which I've fixed a few issues to make the compiles and tests cleaner (and fix a couple bugs).

Some of what's in there:

  • Changes to the build infrastructure to support cross-compiling, non-GCC compilers, and consistent flags between configure and make. One change does require that autoconf-archive be installed on the host.

  • Removed all compile-time warnings except for one due to use of strnlen in debug.c. autoconf assumes it's present because references to it link, but the declaration is excluded as a consequence of using -std=c99.

  • Cleaned up static/nonstatic definitions so the only symbols that appear in libcoap.a have the coap_ prefix. This means "match" and some other functions are either static, or have had coap_ prepended and a declaration placed in the corresponding header.

  • Fixed all unit tests so there are no failures. This included a missed correction to the expected value in t_encode_pdu5_pdu, disabling t_error_response8 when COAP_MAX_OPTS is set so it can't possibly pass, and fixing t_parse_uri12 which has never worked.

That last one is probably worth a serious consideration, since fixing the path parsing allowed the next part of the test to run, which revealed that coap_split_query() was returning the wrong length.

Feel free to cherry-pick from among these as you wish.

Discussion