[jira] [Commented] (HDFS-7574) Make cmake work in Windows Visual Studio 2010
[ https://issues.apache.org/jira/browse/HDFS-7574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14271739#comment-14271739 ] Colin Patrick McCabe commented on HDFS-7574: +1. Thanks, Thanh. Make cmake work in Windows Visual Studio 2010 - Key: HDFS-7574 URL: https://issues.apache.org/jira/browse/HDFS-7574 Project: Hadoop HDFS Issue Type: Sub-task Components: hdfs-client Environment: Windows Visual Studio 2010 Reporter: Thanh Do Assignee: Thanh Do Attachments: HDFS-7574-branch-HDFS-6994-1.patch, HDFS-7574-branch-HDFS-6994-2.patch Cmake should be able to generate a solution file in Windows Visual Studio 2010. This is the first step in a series of steps making libhdfs3 built successfully in Windows. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HDFS-7574) Make cmake work in Windows Visual Studio 2010
[ https://issues.apache.org/jira/browse/HDFS-7574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14266247#comment-14266247 ] Thanh Do commented on HDFS-7574: Hi [~cmccabe]. In Windows, the existing test (in {{CMakeTestCompileStrerror.cpp}}) won't work because {{strerror}} has different signature. Specifically, Windows does not have {{strerror_r(errorno, buf, len)}}. The equivalence is {{strerror_s(buf, len, errorno)}}, with different parameter order. This make the test fails and {{STRERROR_R_RETURN_INT}} is always equal {{NO}}. A cleaner fix may be put a few lines in {{CMakeTestCompileStrerror}}: {code} #ifdef _WIN32 #define strerror_r(errnum, buf, buflen) strerror_s((buf), (buflen), (errnum)) #endif {code} Thoughts? Make cmake work in Windows Visual Studio 2010 - Key: HDFS-7574 URL: https://issues.apache.org/jira/browse/HDFS-7574 Project: Hadoop HDFS Issue Type: Sub-task Components: hdfs-client Environment: Windows Visual Studio 2010 Reporter: Thanh Do Assignee: Thanh Do Attachments: HDFS-7574-branch-HDFS-6994-1.patch Cmake should be able to generate a solution file in Windows Visual Studio 2010. This is the first step in a series of steps making libhdfs3 built successfully in Windows. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HDFS-7574) Make cmake work in Windows Visual Studio 2010
[ https://issues.apache.org/jira/browse/HDFS-7574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14264778#comment-14264778 ] Colin Patrick McCabe commented on HDFS-7574: {code} -TRY_COMPILE(STRERROR_R_RETURN_INT - ${CMAKE_BINARY_DIR} - ${CMAKE_SOURCE_DIR}/CMake/CMakeTestCompileStrerror.cpp - OUTPUT_VARIABLE OUTPUT) - -MESSAGE(STATUS Checking whether strerror_r returns an int) - -IF(STRERROR_R_RETURN_INT) - MESSAGE(STATUS Checking whether strerror_r returns an int -- yes) -ELSE(STRERROR_R_RETURN_INT) - MESSAGE(STATUS Checking whether strerror_r returns an int -- no) -ENDIF(STRERROR_R_RETURN_INT) +IF(MSVC) +# strerror_s, the equivalent of strerror_r in Windows, always return an int. +SET(STRERROR_R_RETURN_INT TRUE CACHE INTERNAL strerror_r returns int in Windows) +ELSE(IF) +TRY_COMPILE(STRERROR_R_RETURN_INT +${CMAKE_BINARY_DIR} +${CMAKE_SOURCE_DIR}/CMake/CMakeTestCompileStrerror.cpp +OUTPUT_VARIABLE OUTPUT) + +MESSAGE(STATUS Checking whether strerror_r returns an int) + +IF(STRERROR_R_RETURN_INT) +MESSAGE(STATUS Checking whether strerror_r returns an int -- yes) +ELSE(STRERROR_R_RETURN_INT) +MESSAGE(STATUS Checking whether strerror_r returns an int -- no) +ENDIF(STRERROR_R_RETURN_INT) +ENDIF(MSVC) {code} Do we need this? Shouldn't the existing test just pick this up? +1 once that's addressed Make cmake work in Windows Visual Studio 2010 - Key: HDFS-7574 URL: https://issues.apache.org/jira/browse/HDFS-7574 Project: Hadoop HDFS Issue Type: Sub-task Components: hdfs-client Environment: Windows Visual Studio 2010 Reporter: Thanh Do Assignee: Thanh Do Attachments: HDFS-7574-branch-HDFS-6994-1.patch Cmake should be able to generate a solution file in Windows Visual Studio 2010. This is the first step in a series of steps making libhdfs3 built successfully in Windows. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HDFS-7574) Make cmake work in Windows Visual Studio 2010
[ https://issues.apache.org/jira/browse/HDFS-7574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14261233#comment-14261233 ] Thanh Do commented on HDFS-7574: Could somebody please review this patch? Once it gets in, I can start submitting subsequent patches for issues such as HDFS-7577. Thanks! Make cmake work in Windows Visual Studio 2010 - Key: HDFS-7574 URL: https://issues.apache.org/jira/browse/HDFS-7574 Project: Hadoop HDFS Issue Type: Sub-task Components: hdfs-client Environment: Windows Visual Studio 2010 Reporter: Thanh Do Assignee: Thanh Do Attachments: HDFS-7574-branch-HDFS-6994-0.patch Cmake should be able to generate a solution file in Windows Visual Studio 2010. This is the first step in a series of steps making libhdfs3 built successfully in Windows. -- This message was sent by Atlassian JIRA (v6.3.4#6332)