In working on some demo code I discovered that a simple platform discovery routine will crash unless -DROUTING_EP is passed to the compiler.
This is tested in a few headers like so: #if defined (ROUTING_GATEWAY) || defined (ROUTING_EP) ... do sth ... #endif For example in resource/csdk/connectivity/api/cacommon.h and resource/csdk/stack/include/octypes.h But the build system defaults to ROUTING_EP, if I'm not mistaken. Shouldn't the headers also pick a default? It seems the logic should be: #if defined (ROUTING_GATEWAY) ... do GW stuff ... #else # default to ROUTING_EP ... do EP stuff #endif Either that or a compile that does not define one of the two should fail, sth like #if not (GW or EP) then #error #endif. Would it ever make sense to be neither a GW nor an EP, at least with the current version? Thanks, -Gregg -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160627/a1be9d83/attachment.html>
