提交 9e51ad4a 编写于 作者: D dongdaxiang

fix io and fs compile on mac

test=develop
上级 6eca88ac
...@@ -32,7 +32,7 @@ limitations under the License. */ ...@@ -32,7 +32,7 @@ limitations under the License. */
#include "paddle/fluid/framework/variable_helper.h" #include "paddle/fluid/framework/variable_helper.h"
#include "paddle/fluid/operators/reader/blocking_queue.h" #include "paddle/fluid/operators/reader/blocking_queue.h"
#include "paddle/fluid/platform/place.h" #include "paddle/fluid/platform/place.h"
#includw "paddle/fluid/platform/port.h" #include "paddle/fluid/platform/port.h"
#include "paddle/fluid/platform/timer.h" #include "paddle/fluid/platform/timer.h"
namespace paddle { namespace paddle {
......
...@@ -242,7 +242,7 @@ static int shell_p2open_fork_internal(const char* real_cmd, int pipein_fds[2], ...@@ -242,7 +242,7 @@ static int shell_p2open_fork_internal(const char* real_cmd, int pipein_fds[2],
std::pair<std::shared_ptr<FILE>, std::shared_ptr<FILE>> shell_p2open( std::pair<std::shared_ptr<FILE>, std::shared_ptr<FILE>> shell_p2open(
const std::string& cmd) { const std::string& cmd) {
#if defined _WIN32 || defined __APPLE__ #if defined _WIN32 || defined __APPLE__
return nullptr; return {};
#else #else
if (shell_verbose()) { if (shell_verbose()) {
LOG(INFO) << "Opening bidirectional pipe[" << cmd << "]"; LOG(INFO) << "Opening bidirectional pipe[" << cmd << "]";
...@@ -315,7 +315,9 @@ std::string shell_get_command_output(const std::string& cmd) { ...@@ -315,7 +315,9 @@ std::string shell_get_command_output(const std::string& cmd) {
} }
} }
} while (err_no == -1); } while (err_no == -1);
return "";
#endif #endif
} }
} // end namespace framework } // end namespace framework
} // end namespace paddle } // end namespace paddle
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <string> #include <string>
#include <utility> #include <utility>
#include "glog/logging.h" #include "glog/logging.h"
#include "paddle/fluid/platform/port.h"
#include "paddle/fluid/string/string_helper.h" #include "paddle/fluid/string/string_helper.h"
namespace paddle { namespace paddle {
......
...@@ -25,12 +25,12 @@ limitations under the License. */ ...@@ -25,12 +25,12 @@ limitations under the License. */
#include "paddle/fluid/framework/data_set.h" #include "paddle/fluid/framework/data_set.h"
#include "paddle/fluid/framework/device_worker.h" #include "paddle/fluid/framework/device_worker.h"
#include "paddle/fluid/framework/lod_tensor.h" #include "paddle/fluid/framework/lod_tensor.h"
#includw "paddle/fluid/platform/port.h"
#include "paddle/fluid/framework/program_desc.h" #include "paddle/fluid/framework/program_desc.h"
#include "paddle/fluid/framework/reader.h" #include "paddle/fluid/framework/reader.h"
#include "paddle/fluid/framework/trainer_desc.pb.h" #include "paddle/fluid/framework/trainer_desc.pb.h"
#include "paddle/fluid/framework/variable_helper.h" #include "paddle/fluid/framework/variable_helper.h"
#include "paddle/fluid/operators/reader/blocking_queue.h" #include "paddle/fluid/operators/reader/blocking_queue.h"
#include "paddle/fluid/platform/port.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册