aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/grpc/include/grpc/impl/codegen/port_platform.h
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/grpc/include/grpc/impl/codegen/port_platform.h')
-rw-r--r--third_party/grpc/include/grpc/impl/codegen/port_platform.h40
1 files changed, 39 insertions, 1 deletions
diff --git a/third_party/grpc/include/grpc/impl/codegen/port_platform.h b/third_party/grpc/include/grpc/impl/codegen/port_platform.h
index d265e9b392..d22bffb0b8 100644
--- a/third_party/grpc/include/grpc/impl/codegen/port_platform.h
+++ b/third_party/grpc/include/grpc/impl/codegen/port_platform.h
@@ -74,7 +74,45 @@
things. */
#if !defined(GPR_NO_AUTODETECT_PLATFORM)
-#if defined(_WIN64) || defined(WIN64)
+
+#if defined(__MSYS__)
+#define GPR_PLATFORM_STRING "msys2"
+#define GPR_POSIX_CRASH_HANDLER 1
+#ifndef _BSD_SOURCE
+#define _BSD_SOURCE
+#endif
+#ifndef _DEFAULT_SOURCE
+#define _DEFAULT_SOURCE
+#endif
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+#include <features.h>
+#define GPR_CPU_POSIX 1
+#define GPR_GCC_ATOMIC 1
+#define GPR_GCC_TLS 1
+#define GPR_POSIX_MULTIPOLL_WITH_POLL
+#define GPR_POSIX_WAKEUP_FD 1
+#define GPR_POSIX_SOCKET 1
+#define GPR_POSIX_SOCKETADDR 1
+#define GPR_POSIX_ENV 1
+#define GPR_POSIX_NO_SPECIAL_WAKEUP_FD 1
+#define GPR_POSIX_SOCKETUTILS
+#define GPR_POSIX_FILE 1
+#define GPR_POSIX_STRING 1
+#define GPR_POSIX_SUBPROCESS 1
+#define GPR_POSIX_SYNC 1
+#define GPR_POSIX_TIME 1
+#define GPR_POSIX_LOG 1
+#define GPR_GETPID_IN_UNISTD_H 1
+#define GPR_HAVE_MSG_NOSIGNAL 1
+#ifdef _LP64
+#define GPR_ARCH_64 1
+#else /* _LP64 */
+#define GPR_ARCH_32 1
+#endif /* _LP64 */
+
+#elif defined(_WIN64) || defined(WIN64)
#define GPR_PLATFORM_STRING "windows"
#define GPR_WIN32 1
#define GPR_ARCH_64 1