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

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

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


##########
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've defined `ssize_t ` type under the `XPlatform::` namespace in C++ files. 
Since C lacks namespaces, I had to resort to adding `x_platform_` prefix.
    
   But no worries, even I had some reservations with this approach. I'll just 
rewrite this PR to use a common `ssize_t` typedef in a header file. We'll worry 
about the future possible conflicts with `ssize_t` if/whenever it happens.





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

    Worklog Id:     (was: 762089)
    Time Spent: 2h 40m  (was: 2.5h)

> 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 40m
>  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