Github user nsuke commented on a diff in the pull request: https://github.com/apache/thrift/pull/628#discussion_r45577368 --- Diff: lib/cpp/test/TFileTransportTest.cpp --- @@ -91,19 +99,35 @@ class FsyncLog { class TempFile { public: TempFile(const char* directory, const char* prefix) { + #ifdef __MINGW32__ + size_t path_len = strlen(prefix) + 8; + path_ = new char[path_len]; + snprintf(path_, path_len, "%sXXXXXX", prefix); + if (_mktemp_s(path_,path_len) == 0) { + fd_ = open(path_,O_CREAT | O_RDWR | O_BINARY,S_IREAD | S_IWRITE); + if (fd_ < 0) { + throw apache::thrift::TException("_mktemp_s() failed"); + } + } else { + throw apache::thrift::TException("_mktemp_s() failed"); + } + #else --- End diff -- What is the purpose here ? mkstemp does not exist ? `directory` arg value being "/tmp" seems problematic though...
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---