[
https://issues.apache.org/jira/browse/HDFS-16466?focusedWorklogId=788050&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-788050
]
ASF GitHub Bot logged work on HDFS-16466:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 05/Jul/22 21:24
Start Date: 05/Jul/22 21:24
Worklog Time Spent: 10m
Work Description: goiri commented on code in PR #4526:
URL: https://github.com/apache/hadoop/pull/4526#discussion_r914215786
##########
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 was just wondering if there was some library to already define a cross
platform set of values.
Issue Time Tracking
-------------------
Worklog Id: (was: 788050)
Time Spent: 2h (was: 1h 50m)
> 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: 2h
> 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]