From 6598373615ff7218e21e00ba07251a7264768219 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); ^ --- CMakeLists.txt | 1 + configure.ac | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4025a800..80fc45a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,7 @@ set(POPPLER_VERSION "${POPPLER_MAJOR_VERSION}.${POPPLER_MINOR_VERSION}.${POPPLER set (CMAKE_CXX_STANDARD 11) set (CMAKE_CXX_EXTENSIONS OFF) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_DEFAULT_SOURCE") # command line switches option(ENABLE_XPDF_HEADERS "Install unsupported xpdf headers." OFF) 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