kou commented on code in PR #49990:
URL: https://github.com/apache/arrow/pull/49990#discussion_r3270994496
##########
cpp/src/arrow/flight/transport/grpc/util_internal.h:
##########
@@ -17,11 +17,28 @@
#pragma once
+#include <grpcpp/version_info.h>
+
#include "arrow/flight/transport/grpc/protocol_grpc_internal.h"
#include "arrow/flight/types.h"
#include "arrow/flight/visibility.h"
#include "arrow/util/macros.h"
+#if defined(GRPC_CPP_VERSION_MAJOR) && defined(GRPC_CPP_VERSION_MINOR) && \
+ defined(GRPC_CPP_VERSION_PATCH)
+# define GRPC_CPP_VERSION_CHECK(major, minor, patch)
\
+ ((GRPC_CPP_VERSION_MAJOR > (major) ||
\
+ (GRPC_CPP_VERSION_MAJOR == (major) && GRPC_CPP_VERSION_MINOR > (minor))
|| \
+ ((GRPC_CPP_VERSION_MAJOR == (major) && GRPC_CPP_VERSION_MINOR == (minor)
&& \
+ GRPC_CPP_VERSION_PATCH >= (patch)))))
+#else
+# define GRPC_CPP_VERSION_CHECK(major, minor, patch) 0
+#endif
Review Comment:
```suggestion
#define GRPC_CPP_VERSION_CHECK(major, minor, patch)
\
((GRPC_CPP_VERSION_MAJOR > (major) ||
\
(GRPC_CPP_VERSION_MAJOR == (major) && GRPC_CPP_VERSION_MINOR > (minor))
|| \
((GRPC_CPP_VERSION_MAJOR == (major) && GRPC_CPP_VERSION_MINOR == (minor)
&& \
GRPC_CPP_VERSION_PATCH >= (patch)))))
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]