[
https://issues.apache.org/jira/browse/HDFS-5642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13843391#comment-13843391
]
Colin Patrick McCabe commented on HDFS-5642:
--------------------------------------------
I would prefer putting the Windows or Linux specific parts in separate files,
rather than using #ifdefs, if possible.
I agree that we should probably get rid of the C99 stuff like declaring
variables in places other than the start of a block.
There was a suggestion to use a library like uthash rather than the glibc hash
table functions, since Windows doesn't have those. That could be a good idea.
Alternately, we could just create our own hash table, since that is just not a
very complex data structure. Having a statically sized hash table would
probably be ok, since we should know roughly how many entries it should have
based on looking at the code.
> libhdfs Windows compatibility.
> ------------------------------
>
> Key: HDFS-5642
> URL: https://issues.apache.org/jira/browse/HDFS-5642
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: libhdfs
> Affects Versions: 3.0.0, 2.2.0
> Reporter: Chris Nauroth
>
> Currently, the libhdfs codebase does not compile on Windows due to use of
> several Linux-specific functions, lack of build script support, and use of
> C99 constructs. The scope of this issue includes converting those function
> calls to cross-platform equivalents (or use {{#ifdef}} if necessary), setting
> up build support, and some code clean-ups to follow the C89 rules.
--
This message was sent by Atlassian JIRA
(v6.1.4#6159)