diff --git a/CMakeLists.txt b/CMakeLists.txt index 4ca288a..f21a130 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -134,6 +134,9 @@ add_definitions(-DHAVE_CONFIG_H=1) if(FONTCONFIG_FOUND) add_definitions(${FONTCONFIG_DEFINITIONS}) endif(FONTCONFIG_FOUND) +if(MINGW) + add_definitions(-D_WIN32_IE=0x0500) +endif(MINGW) include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/fofi diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake index 3651562..7e4dbc1 100644 --- a/cmake/modules/PopplerMacros.cmake +++ b/cmake/modules/PopplerMacros.cmake @@ -101,8 +101,8 @@ endif(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) if(CMAKE_COMPILER_IS_GNUCXX) # set the default compile warnings set(DEFAULT_COMPILE_WARNINGS_NO) - set(DEFAULT_COMPILE_WARNINGS_YES "-ansi -Wall -Wno-write-strings") - set(DEFAULT_COMPILE_WARNINGS_KDE "-Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -O2 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common") + set(DEFAULT_COMPILE_WARNINGS_YES "-Wall -Wno-write-strings") + set(DEFAULT_COMPILE_WARNINGS_KDE "-Wno-long-long -Wundef -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -O2 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common") set(CMAKE_CXX_FLAGS "-Wnon-virtual-dtor -Woverloaded-virtual") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g") diff --git a/goo/gfile.cc b/goo/gfile.cc index e875630..ff23aae 100644 --- a/goo/gfile.cc +++ b/goo/gfile.cc @@ -376,11 +376,11 @@ GooString *makePathAbsolute(GooString *path) { #elif defined(_WIN32) //---------- Win32 ---------- - char buf[_MAX_PATH]; + char buf[MAX_PATH]; char *fp; buf[0] = '\0'; - if (!GetFullPathName(path->getCString(), _MAX_PATH, buf, &fp)) { + if (!GetFullPathName(path->getCString(), MAX_PATH, buf, &fp)) { path->clear(); return path; }