From 6e4c6a17bba065b4ba5250fdc71529c48c561d86 Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Sat, 2 Sep 2017 17:50:35 +0930 Subject: [PATCH 1/2] Fix cygwin 32-bit compile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit poppler/goo/gfile.cc: In function ‘GBool openTempFile(GooString**, FILE**, const char*)’: poppler/goo/gfile.cc:409:37: error: ‘mkstemp’ was not declared in this scope fd = mkstemp((*name)->getCString()); ^ poppler/goo/gfile.cc:417:39: error: ‘fdopen’ was not declared in this scope if (fd < 0 || !(*f = fdopen(fd, mode))) { ^ poppler/goo/gfile.cc: In function ‘int Gfseek(FILE*, Goffset, int)’: poppler/goo/gfile.cc:558:34: error: ‘fseeko’ was not declared in this scope return fseeko(f, offset, whence); ^ poppler/goo/gfile.cc: In function ‘Goffset Gftell(FILE*)’: poppler/goo/gfile.cc:572:18: error: ‘ftello’ was not declared in this scope return ftello(f); ^ --- cmake/modules/PopplerMacros.cmake | 2 +- configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake index 8e3ef399..408e6dca 100644 --- a/cmake/modules/PopplerMacros.cmake +++ b/cmake/modules/PopplerMacros.cmake @@ -108,7 +108,7 @@ if(CMAKE_COMPILER_IS_GNUCXX) set(DEFAULT_COMPILE_WARNINGS_YES "-Wall -Wcast-align -fno-exceptions -fno-check-new -fno-common") set(DEFAULT_COMPILE_WARNINGS_KDE "-Wno-long-long -Wundef -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -Wcast-align -Wconversion -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common") - set(CMAKE_CXX_FLAGS "-Wnon-virtual-dtor -Woverloaded-virtual ${CMAKE_CXX_FLAGS}") + set(CMAKE_CXX_FLAGS "-Wnon-virtual-dtor -Woverloaded-virtual -D_DEFAULT_SOURCE ${CMAKE_CXX_FLAGS}") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g") set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG") set(CMAKE_CXX_FLAGS_DEBUG "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline") diff --git a/configure.ac b/configure.ac index e511e8ba..e1b00fb7 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,7 @@ AC_PROG_CC_STDC #fi AC_PROG_CXX AC_PROG_INSTALL -CXXFLAGS="$CXXFLAGS -std=c++11" +CXXFLAGS="$CXXFLAGS -std=c++11 -D_DEFAULT_SOURCE" dnl ##### Check for pkgconfig PKG_PROG_PKG_CONFIG -- 2.11.0