[ 
https://issues.apache.org/jira/browse/HDFS-16468?focusedWorklogId=761965&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-761965
 ]

ASF GitHub Bot logged work on HDFS-16468:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 25/Apr/22 18:32
            Start Date: 25/Apr/22 18:32
    Worklog Time Spent: 10m 
      Work Description: GauthamBanasandra commented on code in PR #4228:
URL: https://github.com/apache/hadoop/pull/4228#discussion_r857913849


##########
hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs/jni_helper.c:
##########
@@ -487,10 +488,10 @@ static ssize_t wildcard_expandPath(const char* path, 
char* expanded)
  * allocated after using this function with expandedClasspath=NULL to get the
  * right size.
  */
-static ssize_t getClassPath_helper(const char *classpath, char* 
expandedClasspath)
+static x_platform_ssize_t getClassPath_helper(const char *classpath, char* 
expandedClasspath)
 {
-    ssize_t length;
-    ssize_t retval;
+    x_platform_ssize_t length;

Review Comment:
   I put the `x_platform_` prefix to avoid any possible future conflicts with 
ssize_t. Like, if someone were to include a third-party library header that 
defines its own version of ssize_t, it shouldn't affect these parts.
   That's just my view. However, I don't mind just using the ssize_t typedef 
instead of x_platform_ssize_t if you prefer that.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 761965)
    Time Spent: 2h 10m  (was: 2h)

> 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: 2h 10m
>  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]

Reply via email to