You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@orc.apache.org by GitBox <gi...@apache.org> on 2021/12/29 09:17:40 UTC

[GitHub] [orc] dongjoon-hyun commented on a change in pull request #980: ORC-1068: [C++] Stabilize HAS_POST_2038 test

dongjoon-hyun commented on a change in pull request #980:
URL: https://github.com/apache/orc/pull/980#discussion_r776225445



##########
File path: c++/src/CMakeLists.txt
##########
@@ -157,7 +157,7 @@ CHECK_CXX_SOURCE_RUNS("
       struct tm time2038;
       strptime(\"2037-05-05 12:34:56\", \"%Y-%m-%d %H:%M:%S\", &time2037);
       strptime(\"2038-05-05 12:34:56\", \"%Y-%m-%d %H:%M:%S\", &time2038);
-      return mktime(&time2038) - mktime(&time2037) != 31536000;
+      return (mktime(&time2038) - mktime(&time2037)) <= 31500000;

Review comment:
       Does this fail on a system who has YEAR 2038 problem? I'm wondering if `(mktime(&time2038) - mktime(&time2037))` becomes negative and satisfies `<= 31500000` condition even in that system.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@orc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org