mirror of
https://github.com/protobuf-c/protobuf-c.git
synced 2024-12-27 13:31:02 +08:00
protobuf-c: always define PROTOBUF_C__DEPRECATED
If we are not building on gcc, PROTOBUF_C__DEPRECATED needs to be defined but empty. Previously we were not defining it at all in certain situations, which would cause build failures. Based on a patch from alex85k (#167).
This commit is contained in:
parent
3ba170ccc7
commit
7e5c09ea6b
@ -205,10 +205,9 @@ PROTOBUF_C__BEGIN_DECLS
|
||||
# define PROTOBUF_C__API
|
||||
#endif
|
||||
|
||||
#if !defined(PROTOBUF_C__NO_DEPRECATED)
|
||||
# if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
|
||||
# define PROTOBUF_C__DEPRECATED __attribute__((__deprecated__))
|
||||
# endif
|
||||
#if !defined(PROTOBUF_C__NO_DEPRECATED) && \
|
||||
((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
|
||||
# define PROTOBUF_C__DEPRECATED __attribute__((__deprecated__))
|
||||
#else
|
||||
# define PROTOBUF_C__DEPRECATED
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user