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:
Robert Edmonds 2014-09-05 16:05:45 -04:00
parent 3ba170ccc7
commit 7e5c09ea6b

View File

@ -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