romuloceccon / lightmqtt

MQTT 3.1.1 client library written in pure C, fully asynchronous, supporting QoS 0, 1 and 2 messages and large payloads
MIT License
14 stars 6 forks source link

include file name add a prefix #5

Closed skyformat99 closed 7 years ago

skyformat99 commented 7 years ago

As a small suggestion, include file name add a prefix: as: lmqtt_client.h ,lmqtt_time.h etc.

Special files "time.h types.h" can easily conflict with system files "time.h types.h " when compile.

thanks.

romuloceccon commented 7 years ago

You're supposed to add the parent of the directory containing those include files to the include path, so that in your application you'd do:

#include <lightmqtt/types.h>
#include <lightmqtt/time.h>
/* ... */

That should be enough to avoid any conflicts.

skyformat99 commented 7 years ago

Thank you for your reply. You're right. This method is ok. However, if you add prefixes, you may be more consistent with the general solution.

romuloceccon commented 7 years ago

I believe that's a matter of taste. libevent provides the header event2/thread.h, and curl provides curl/system.h, for example.

skyformat99 commented 7 years ago

agree, It's only a matter of taste. close it.