Commit 7e5c09ea authored by Robert Edmonds's avatar Robert Edmonds

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).
parent 3ba170cc
...@@ -205,10 +205,9 @@ PROTOBUF_C__BEGIN_DECLS ...@@ -205,10 +205,9 @@ PROTOBUF_C__BEGIN_DECLS
# define PROTOBUF_C__API # define PROTOBUF_C__API
#endif #endif
#if !defined(PROTOBUF_C__NO_DEPRECATED) #if !defined(PROTOBUF_C__NO_DEPRECATED) && \
# if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) ((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
# define PROTOBUF_C__DEPRECATED __attribute__((__deprecated__)) # define PROTOBUF_C__DEPRECATED __attribute__((__deprecated__))
# endif
#else #else
# define PROTOBUF_C__DEPRECATED # define PROTOBUF_C__DEPRECATED
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment