Do not make exported symbols different between release and debug builds, this breaks the ABI of the DLL.

Do not make reference to NDEBUG in public headers to modify the ABI. This macro is defined automatically in all windows projects and will create a lot of confusion.
This commit is contained in:
jcmichelou committed 2017-05-07 18:18:33 +02:00
1 parent 95d8e2c8e0
commit ba68ba85c0
2 files changed
-17

No files matched your search

-13
View File
@@ -58,8 +58,6 @@ void coap_log_impl(coap_log_t level, const char *format, ...);
#define coap_log(...) coap_log_impl(__VA_ARGS__)
#endif
#ifndef NDEBUG
/* A set of convenience macros for common log levels. */
#define info(...) coap_log(LOG_INFO, __VA_ARGS__)
#define warn(...) coap_log(LOG_WARNING, __VA_ARGS__)
@@ -71,15 +69,4 @@ void coap_show_pdu(const coap_pdu_t *);
struct coap_address_t;
size_t coap_print_addr(const struct coap_address_t *, unsigned char *, size_t);
#else
#define debug(...)
#define info(...)
#define warn(...)
#define coap_show_pdu(x)
#define coap_print_addr(...)
#endif /* NDEBUG */
#endif /* _COAP_DEBUG_H_ */
-4
View File
@@ -101,8 +101,6 @@ print_timestamp(char *s, size_t len, coap_tick_t t) {
#endif /* HAVE_TIME_H */
#ifndef NDEBUG
#ifndef HAVE_STRNLEN
/**
* A length-safe strlen() fake.
@@ -483,8 +481,6 @@ coap_show_pdu(const coap_pdu_t *pdu) {
}
#endif /* NDEBUG */
void
coap_log_impl(coap_log_t level, const char *format, ...) {
char timebuf[32];