diff --git a/paddle/fluid/inference/analysis/helper.h b/paddle/fluid/inference/analysis/helper.h index 5151e2b69ac199dea136535ba445e890596f6227..ea568a581d99692f69016ae7a9902f0bd22c4606 100644 --- a/paddle/fluid/inference/analysis/helper.h +++ b/paddle/fluid/inference/analysis/helper.h @@ -26,6 +26,7 @@ limitations under the License. */ #include "paddle/fluid/framework/scope.h" #include "paddle/fluid/framework/variable.h" #include "paddle/fluid/platform/enforce.h" +#include "paddle/fluid/platform/port.h" namespace paddle { namespace inference { diff --git a/paddle/fluid/platform/init.cc b/paddle/fluid/platform/init.cc index 4910baec6ae1be3d9e5c0d7750b86632e2bac0fe..092585ed2a39133ca831544f22a5d69591caa07d 100644 --- a/paddle/fluid/platform/init.cc +++ b/paddle/fluid/platform/init.cc @@ -175,7 +175,9 @@ void InitGLOG(const std::string &prog_name) { // glog will not hold the ARGV[0] inside. // Use strdup to alloc a new string. google::InitGoogleLogging(strdup(prog_name.c_str())); +#ifndef _WIN32 google::InstallFailureSignalHandler(); +#endif } } // namespace framework diff --git a/paddle/fluid/platform/port.h b/paddle/fluid/platform/port.h index cf9f4aa95bc1cb79d95b79331fbc09e11af64194..4ff07edc19567e27f29ac6614783909e7e55d331 100644 --- a/paddle/fluid/platform/port.h +++ b/paddle/fluid/platform/port.h @@ -30,11 +30,10 @@ #include #include // std::accumulate #else +#include #include // _popen, _pclose #include -#if defined(_WIN32) #include // std::accumulate in msvc -#endif // windows version of __attribute__((unused)) #define UNUSED __pragma(warning(suppress : 4100))