[
https://issues.apache.org/jira/browse/HDFS-16468?focusedWorklogId=762608&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-762608
]
ASF GitHub Bot logged work on HDFS-16468:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 26/Apr/22 22:42
Start Date: 26/Apr/22 22:42
Worklog Time Spent: 10m
Work Description: goiri commented on code in PR #4228:
URL: https://github.com/apache/hadoop/pull/4228#discussion_r859202738
##########
hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/x-platform/types.h:
##########
@@ -0,0 +1,39 @@
+/**
+ * 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.
+ */
+
+#ifndef NATIVE_LIBHDFSPP_LIB_CROSS_PLATFORM_TYPES
+#define NATIVE_LIBHDFSPP_LIB_CROSS_PLATFORM_TYPES
+
+#if _WIN32 || _WIN64
Review Comment:
It might be more readable to do something like:
```
#if _WIN64
typedef long int ssize_t;
#elif _WIN32
typedef int ssize_t;
#else
#include <sys/types.h>
#endif
```
With the comments and so on obviously.
Issue Time Tracking
-------------------
Worklog Id: (was: 762608)
Time Spent: 3h 20m (was: 3h 10m)
> Define ssize_t for Windows
> --------------------------
>
> Key: HDFS-16468
> URL: https://issues.apache.org/jira/browse/HDFS-16468
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: libhdfs++
> Affects Versions: 3.4.0
> Environment: Windows 10
> Reporter: Gautham Banasandra
> Assignee: Gautham Banasandra
> Priority: Major
> Labels: libhdfscpp, pull-request-available
> Time Spent: 3h 20m
> Remaining Estimate: 0h
>
> Some C/C++ files use *ssize_t* data type. This isn't available for Windows
> and we need to define an alias for this and set it to *long long* to make it
> cross platform compatible.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]