Fix COAP_DEPRECATED for Windows C++ builds

include/coap2/libcoap.h:

Simplify COAP_DEPRECATED definition to generically handle Windows
or other builds when setting the define for COAP_DEPRECATED.

Fixes #363
This commit is contained in:
Jon Shallow committed 2019-06-21 09:47:24 +01:00
1 parent a5ffdf323d
commit da33226631
1 file changed
+3 -7
+3 -7
View File
@@ -40,14 +40,10 @@ typedef USHORT in_port_t;
# endif
#endif
#ifndef COAP_DEPRECATED
# if defined(__cplusplus)
# define COAP_DEPRECATED __attribute__ ((deprecated))
# if defined(_MSC_VER)
# define COAP_DEPRECATED __declspec(deprecated)
# else
# if defined(_MSC_VER)
# define COAP_DEPRECATED __declspec(deprecated)
# else
# define COAP_DEPRECATED __attribute__ ((deprecated))
# endif
# define COAP_DEPRECATED __attribute__ ((deprecated))
# endif
#endif