[
https://issues.apache.org/jira/browse/HDFS-16466?focusedWorklogId=787166&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-787166
]
ASF GitHub Bot logged work on HDFS-16466:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 01/Jul/22 17:03
Start Date: 01/Jul/22 17:03
Worklog Time Spent: 10m
Work Description: goiri commented on code in PR #4526:
URL: https://github.com/apache/hadoop/pull/4526#discussion_r912121851
##########
hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/x-platform/stat.h:
##########
@@ -0,0 +1,45 @@
+/**
+ * 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_STAT
+#define NATIVE_LIBHDFSPP_LIB_CROSS_PLATFORM_STAT
+
+#if defined(_WIN32)
+
+// Windows.
+// These macros are derived from POSIX sys/stat.h. Windows defines some of
+// these macros, but not all. Thus, we align with the bits defined by POSIX for
+// all of them to be consistent.
+#define S_IRUSR 0400
Review Comment:
I would expect for this to be fairly common for people to write compatible
code across Linux and Windows.
There is no public library with this sort of thing?
Issue Time Tracking
-------------------
Worklog Id: (was: 787166)
Time Spent: 20m (was: 10m)
> Implement Linux permission flags on Windows
> -------------------------------------------
>
> Key: HDFS-16466
> URL: https://issues.apache.org/jira/browse/HDFS-16466
> 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: 20m
> Remaining Estimate: 0h
>
> [statinfo.cc|https://github.com/apache/hadoop/blob/869317be0a1fdff23be5fc500dcd9ae4ecd7bc29/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/statinfo.cc#L41-L49]
> uses POSIX permission flags. These flags aren't available for Windows. We
> need to implement the equivalent flags on Windows to make this cross platform
> compatible.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]