diff options
author | Thorsten Schöning <6223655+ams-tschoening@users.noreply.github.com> | 2019-03-12 15:05:29 +0100 |
---|---|---|
committer | Jay Berkenbilt <jberkenbilt@users.noreply.github.com> | 2019-03-12 15:05:29 +0100 |
commit | 2c704b99a100728e35f1c78a37d686c5e2149b08 (patch) | |
tree | fefa89eaff0d4621eae2fe0d1adb9138f04a1451 | |
parent | 2efec4ce7bb31524d55596051adfe9fc3d6dacb1 (diff) | |
download | qpdf-2c704b99a100728e35f1c78a37d686c5e2149b08.tar.zst |
Undefined functions because of missing std:: or header. (#295)
* [bcc32 Error] QPDF.cc(375): E2268 Call to undefined function 'atof'
Full parser context
QPDF.cc(358): parsing: void QPDF::parse(const char *)
* [bcc32 Error] QPDFTokenizer.cc(183): E2268 Call to undefined function 'strtol'
Full parser context
QPDFTokenizer.cc(163): parsing: void QPDFTokenizer::resolveLiteral()
* [bcc32 Error] pdf-split-pages.cc(52): E2268 Call to undefined function 'exit'
Full parser context
pdf-split-pages.cc(50): parsing: void usage()
* PR #295: Including "cstdlib" should be replaced with "stdlib.h" to be more consistent. At the same time I changed the order of the surrounding includes to reflect alphabetical order, because at some files this already have been the case.
-rw-r--r-- | examples/pdf-split-pages.cc | 5 | ||||
-rw-r--r-- | ispell-words | 1 | ||||
-rw-r--r-- | libqpdf/Pl_DCT.cc | 5 | ||||
-rw-r--r-- | libqpdf/QPDF.cc | 1 | ||||
-rw-r--r-- | libqpdf/QPDFTokenizer.cc | 2 |
5 files changed, 8 insertions, 6 deletions
diff --git a/examples/pdf-split-pages.cc b/examples/pdf-split-pages.cc index aa089e5a..b6dd701b 100644 --- a/examples/pdf-split-pages.cc +++ b/examples/pdf-split-pages.cc @@ -8,9 +8,10 @@ #include <qpdf/QPDFPageDocumentHelper.hh> #include <qpdf/QPDFWriter.hh> #include <qpdf/QUtil.hh> -#include <string> + #include <iostream> -#include <cstdlib> +#include <stdlib.h> +#include <string> static char const* whoami = 0; static bool static_id = false; diff --git a/ispell-words b/ispell-words index 9d60b74d..ff0f3120 100644 --- a/ispell-words +++ b/ispell-words @@ -400,7 +400,6 @@ cso csoe css cstdio -cstdlib cstr cstring ctest diff --git a/libqpdf/Pl_DCT.cc b/libqpdf/Pl_DCT.cc index 8e1a5177..ceecc518 100644 --- a/libqpdf/Pl_DCT.cc +++ b/libqpdf/Pl_DCT.cc @@ -2,10 +2,11 @@ #include <qpdf/QUtil.hh> #include <qpdf/QTC.hh> + #include <setjmp.h> -#include <string> #include <stdexcept> -#include <cstdlib> +#include <stdlib.h> +#include <string> #if BITS_IN_JSAMPLE != 8 # error "qpdf does not support libjpeg built with BITS_IN_JSAMPLE != 8" diff --git a/libqpdf/QPDF.cc b/libqpdf/QPDF.cc index e9d0b77a..61fd7920 100644 --- a/libqpdf/QPDF.cc +++ b/libqpdf/QPDF.cc @@ -4,6 +4,7 @@ #include <vector> #include <map> #include <algorithm> +#include <stdlib.h> #include <string.h> #include <memory.h> diff --git a/libqpdf/QPDFTokenizer.cc b/libqpdf/QPDFTokenizer.cc index 80fcf347..ff5ebe15 100644 --- a/libqpdf/QPDFTokenizer.cc +++ b/libqpdf/QPDFTokenizer.cc @@ -10,8 +10,8 @@ #include <qpdf/QPDFObjectHandle.hh> #include <stdexcept> +#include <stdlib.h> #include <string.h> -#include <cstdlib> static bool is_delimiter(char ch) { |