Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions cpp/src/arrow/flight/transport/grpc/util_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,23 @@

#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"

#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)))))

#if GRPC_CPP_VERSION_CHECK(1, 80, 0)
# include <absl/status/status.h>
#endif

namespace grpc {

class Status;
Expand All @@ -34,12 +46,6 @@ class Status;

namespace flight {

#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)))))

#define GRPC_RETURN_NOT_OK(expr) \
do { \
::arrow::Status _s = (expr); \
Expand Down
Loading