zhangyue1818 commented on code in PR #1357:
URL: https://github.com/apache/cloudberry/pull/1357#discussion_r2432400782


##########
contrib/udp2/ic_common/ic_utility.hpp:
##########
@@ -0,0 +1,175 @@
+/*-------------------------------------------------------------------------
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ * ic_utility.hpp
+ *
+ * IDENTIFICATION
+ *    contrib/udp2/ic_common/ic_utility.hpp
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef IC_UTILITY_HPP
+#define IC_UTILITY_HPP
+
+#include <atomic>
+#include <mutex>
+#include <sstream>
+#include <vector>
+
+#include <stdarg.h>
+#include <sys/time.h>
+#include <unistd.h>
+
+/* Define this if you want tons of logs! */
+#undef AMS_VERBOSE_LOGGING
+
+#ifndef NDEBUG
+#define USE_ASSERT_CHECKING 1
+#endif
+
+#define Assert(p) assert(p)
+#define closesocket close
+
+#define IC_DEBUG5              10
+#define IC_DEBUG4              11
+#define IC_DEBUG3              12
+#define IC_DEBUG2              13
+#define IC_DEBUG1              14
+#define IC_LOG                 15
+#define IC_WARNING             19
+
+/* tupchunk.h */
+#define ANY_ROUTE -100
+
+/* cdbvars.h */
+#define DEFAULT_PACKET_SIZE 8192
+#define MIN_PACKET_SIZE 512
+#define MAX_PACKET_SIZE 65507 /* Max payload for IPv4/UDP (subtract 20 more 
for IPv6 without extensions) */
+#define UNDEF_SEGMENT -2
+
+/* c.h */
+#define Max(x, y)              ((x) > (y) ? (x) : (y))
+#define Min(x, y)              ((x) < (y) ? (x) : (y))
+
+/* cdbinterconnect.h */
+#define CTS_INITIAL_SIZE (10)
+
+/* pg_list.h */
+#define NIL                                            ((List *) NULL)
+
+/* transam.h */
+#define InvalidTransactionId           (0)
+
+#define INVALID_SOCKET (-1)
+
+/*
+ * CONTAINER_OF
+ */
+#define CONTAINER_OF(ptr, type, member) \

Review Comment:
   fix in 
[94428f1](https://github.com/apache/cloudberry/pull/1357/commits/94428f12b58a72c537d6c7bd7c79ea8fa42f2877)



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to