Skip to content

Commit

Permalink
Require C++-11
Browse files Browse the repository at this point in the history
Includes updates to m4/ax_cxx_compile_stdcxx.m4 to make it work with
msvc, which supports C++-11 with no flags but doesn't set __cplusplus
to a recent value.
  • Loading branch information
jberkenbilt committed Nov 9, 2019
1 parent a1fd00e commit 653ce35
Show file tree
Hide file tree
Showing 8 changed files with 386 additions and 23 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -27,9 +27,9 @@ Versions of qpdf prior to version 7 were released under the terms of version 2.0

# Prerequisites

QPDF depends on the external libraries [zlib](http://www.zlib.net/) and [jpeg](http://www.ijg.org/files/). The [libjpeg-turbo](https://libjpeg-turbo.org/) library is also known to work since it is compatible with the regular jpeg library, and QPDF doesn't use any interfaces that aren't present in the straight jpeg8 API. These are part of every Linux distribution and are readily available. Download information appears in the documentation. For Windows, you can download pre-built binary versions of these libraries for some compilers; see [README-windows.md](README-windows.md) for additional details.
QPDF requires a C++ compiler that supports C++-11.

QPDF requires a C++ compiler that works with STL. Your compiler must also support `long long`. Almost all modern compilers do. If you are trying to port qpdf to a compiler that doesn't support `long long`, you could change all occurrences of `long long` to `long` in the source code, noting that this would break binary compatibility with other builds of qpdf. Doing so would certainly prevent qpdf from working with files larger than 2 GB, but remaining functionality would most likely work fine. If you built qpdf this way and it passed its test suite with large file support disabled, you could be confident that you had an otherwise working qpdf.
QPDF depends on the external libraries [zlib](http://www.zlib.net/) and [jpeg](http://www.ijg.org/files/). The [libjpeg-turbo](https://libjpeg-turbo.org/) library is also known to work since it is compatible with the regular jpeg library, and QPDF doesn't use any interfaces that aren't present in the straight jpeg8 API. These are part of every Linux distribution and are readily available. Download information appears in the documentation. For Windows, you can download pre-built binary versions of these libraries for some compilers; see [README-windows.md](README-windows.md) for additional details.

# Licensing terms of embedded software

Expand Down
21 changes: 9 additions & 12 deletions TODO
Expand Up @@ -7,18 +7,15 @@ Fuzz Errors
* Problems inside the jpeg library: 15470, 15751, 18633
* Timeout: 17630

C++-11 (for qpdf 10)
====================

* Consider requiring C++-11 for qpdf 10.

* My c++11 branch adds autoconf tests to require C++-11 and
re-implements PointerHolder so that it is interchangeable with
std::shared_ptr. It is not actually possible to just replace
PointerHolder with std::shared_ptr for two reasons: there is no
automatic creation of std::shared_ptr<T> from T* like there is for
PointerHolder, which breaks some code, and also there is no
automatic conversion from something like
C++-11
======

* My c++11 branch adds re-implements PointerHolder so that it is
interchangeable with std::shared_ptr. It is not actually possible to
just replace PointerHolder with std::shared_ptr for two reasons:
there is no automatic creation of std::shared_ptr<T> from T* like
there is for PointerHolder, which breaks some code, and also there
is no automatic conversion from something like
std::vector<PointerHolder<T>> to std::vector<std::shared_ptr<T>>. It
may be a good idea to replace PointerHolder with std::shared_ptr in
the API even if it requires some work for the developer, but even if
Expand Down
1 change: 1 addition & 0 deletions aclocal.m4
Expand Up @@ -12,6 +12,7 @@
# PARTICULAR PURPOSE.

m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
m4_include([m4/ax_cxx_compile_stdcxx.m4])
m4_include([m4/ax_random_device.m4])
m4_include([m4/libtool.m4])
m4_include([m4/ltoptions.m4])
Expand Down
8 changes: 4 additions & 4 deletions autofiles.sums
@@ -1,7 +1,7 @@
098c86e890756ed699b0a31a8a92910bb65c88656b77f6aa986cd644fa7c7ab1 configure.ac
9c264dc3fac489fd0178d3fa9fd29d5b0ccd37d561e926ef449fa01d99abded7 aclocal.m4
79ee40c3867f4162a847c005a73a5e388e3882f71dd185d39d9ddf0312133086 libqpdf/qpdf/qpdf-config.h.in
8c8779c2182b0c4e85d5fc580024601e45b3a2ad95dd00234aaa63d62e491f0c m4/ax_cxx_compile_stdcxx.m4
384fa974656199e43cb904500c6013c3c53cb768b26eedb26440305960e07479 configure.ac
d3f9ee6f6f0846888d9a10fd3dad2e4b1258be84205426cf04d7cef02d61dad7 aclocal.m4
6bfabf45d5b7cee4160caacc34feed7c36207605c913d973b391ab13f637bc64 libqpdf/qpdf/qpdf-config.h.in
5297971a0ef90bcd5563eb3f7127a032bb76d3ae2af7258bf13479caf8983a60 m4/ax_cxx_compile_stdcxx.m4
35bc5c645dc42d47f2daeea06f8f3e767c8a1aee6a35eb2b4854fd2ce66c3413 m4/ax_random_device.m4
37f8897d5f68d7d484e5457832a8f190ddb7507fa2a467cb7ee2be40a4364643 m4/libtool.m4
e77ebba8361b36f14b4d0927173a034b98c5d05049697a9ded84d85eb99a7990 m4/ltoptions.m4
Expand Down

0 comments on commit 653ce35

Please sign in to comment.