Commit 76bf91765e0b25066a47cbd52df07645239c5a78
1 parent
0ceb79cf
missing header files for gcc 4.3
git-svn-id: svn+q:///qpdf/trunk@607 71b93d88-0707-0410-a8cf-f5a4172ac649
Showing
23 changed files
with
33 additions
and
7 deletions
ChangeLog
examples/pdf-bookmarks.cc
examples/pdf-npages.cc
libqpdf/PCRE.cc
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | #include <qpdf/QUtil.hh> | 3 | #include <qpdf/QUtil.hh> |
| 4 | 4 | ||
| 5 | #include <iostream> | 5 | #include <iostream> |
| 6 | -#include <strlen.h> | 6 | +#include <string.h> |
| 7 | 7 | ||
| 8 | PCRE::Exception::Exception(std::string const& message) | 8 | PCRE::Exception::Exception(std::string const& message) |
| 9 | { | 9 | { |
libqpdf/Pl_Buffer.cc
| @@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
| 2 | #include <qpdf/Pl_Buffer.hh> | 2 | #include <qpdf/Pl_Buffer.hh> |
| 3 | #include <qpdf/QEXC.hh> | 3 | #include <qpdf/QEXC.hh> |
| 4 | #include <assert.h> | 4 | #include <assert.h> |
| 5 | +#include <string.h> | ||
| 5 | 6 | ||
| 6 | Pl_Buffer::Pl_Buffer(char const* identifier, Pipeline* next) : | 7 | Pl_Buffer::Pl_Buffer(char const* identifier, Pipeline* next) : |
| 7 | Pipeline(identifier, next), | 8 | Pipeline(identifier, next), |
libqpdf/Pl_QPDFTokenizer.cc
| @@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
| 2 | #include <qpdf/Pl_QPDFTokenizer.hh> | 2 | #include <qpdf/Pl_QPDFTokenizer.hh> |
| 3 | #include <qpdf/QPDF_String.hh> | 3 | #include <qpdf/QPDF_String.hh> |
| 4 | #include <qpdf/QPDF_Name.hh> | 4 | #include <qpdf/QPDF_Name.hh> |
| 5 | +#include <string.h> | ||
| 5 | 6 | ||
| 6 | Pl_QPDFTokenizer::Pl_QPDFTokenizer(char const* identifier, Pipeline* next) : | 7 | Pl_QPDFTokenizer::Pl_QPDFTokenizer(char const* identifier, Pipeline* next) : |
| 7 | Pipeline(identifier, next), | 8 | Pipeline(identifier, next), |
libqpdf/QPDFObjectHandle.cc
| @@ -16,6 +16,8 @@ | @@ -16,6 +16,8 @@ | ||
| 16 | #include <qpdf/QEXC.hh> | 16 | #include <qpdf/QEXC.hh> |
| 17 | #include <qpdf/QUtil.hh> | 17 | #include <qpdf/QUtil.hh> |
| 18 | 18 | ||
| 19 | +#include <stdlib.h> | ||
| 20 | + | ||
| 19 | QPDFObjectHandle::QPDFObjectHandle() : | 21 | QPDFObjectHandle::QPDFObjectHandle() : |
| 20 | initialized(false), | 22 | initialized(false), |
| 21 | objid(0), | 23 | objid(0), |
libqpdf/QPDFTokenizer.cc
| @@ -9,6 +9,8 @@ | @@ -9,6 +9,8 @@ | ||
| 9 | #include <qpdf/QEXC.hh> | 9 | #include <qpdf/QEXC.hh> |
| 10 | #include <qpdf/QTC.hh> | 10 | #include <qpdf/QTC.hh> |
| 11 | 11 | ||
| 12 | +#include <string.h> | ||
| 13 | + | ||
| 12 | // See note above about ctype. | 14 | // See note above about ctype. |
| 13 | static bool is_hex_digit(char ch) | 15 | static bool is_hex_digit(char ch) |
| 14 | { | 16 | { |
libqpdf/QPDFWriter.cc
| @@ -19,6 +19,8 @@ | @@ -19,6 +19,8 @@ | ||
| 19 | #include <qpdf/QPDF_Name.hh> | 19 | #include <qpdf/QPDF_Name.hh> |
| 20 | #include <qpdf/QPDF_String.hh> | 20 | #include <qpdf/QPDF_String.hh> |
| 21 | 21 | ||
| 22 | +#include <stdlib.h> | ||
| 23 | + | ||
| 22 | QPDFWriter::QPDFWriter(QPDF& pdf, char const* filename) : | 24 | QPDFWriter::QPDFWriter(QPDF& pdf, char const* filename) : |
| 23 | pdf(pdf), | 25 | pdf(pdf), |
| 24 | filename(filename), | 26 | filename(filename), |
| @@ -233,7 +235,7 @@ QPDFWriter::setEncryptionParameters( | @@ -233,7 +235,7 @@ QPDFWriter::setEncryptionParameters( | ||
| 233 | for (std::set<int>::iterator iter = bits_to_clear.begin(); | 235 | for (std::set<int>::iterator iter = bits_to_clear.begin(); |
| 234 | iter != bits_to_clear.end(); ++iter) | 236 | iter != bits_to_clear.end(); ++iter) |
| 235 | { | 237 | { |
| 236 | - P |= (1 << (*iter) - 1); | 238 | + P |= ((1 << (*iter)) - 1); |
| 237 | } | 239 | } |
| 238 | P = ~P; | 240 | P = ~P; |
| 239 | 241 |
libqpdf/QPDF_Name.cc
libqpdf/QPDF_encryption.cc
| @@ -10,6 +10,8 @@ | @@ -10,6 +10,8 @@ | ||
| 10 | #include <qpdf/RC4.hh> | 10 | #include <qpdf/RC4.hh> |
| 11 | #include <qpdf/MD5.hh> | 11 | #include <qpdf/MD5.hh> |
| 12 | 12 | ||
| 13 | +#include <string.h> | ||
| 14 | + | ||
| 13 | static char const padding_string[] = { | 15 | static char const padding_string[] = { |
| 14 | 0x28, 0xbf, 0x4e, 0x5e, 0x4e, 0x75, 0x8a, 0x41, | 16 | 0x28, 0xbf, 0x4e, 0x5e, 0x4e, 0x75, 0x8a, 0x41, |
| 15 | 0x64, 0x00, 0x4e, 0x56, 0xff, 0xfa, 0x01, 0x08, | 17 | 0x64, 0x00, 0x4e, 0x56, 0xff, 0xfa, 0x01, 0x08, |
libqpdf/QPDF_linearization.cc
libqpdf/QUtil.cc
| @@ -4,6 +4,7 @@ | @@ -4,6 +4,7 @@ | ||
| 4 | #include <errno.h> | 4 | #include <errno.h> |
| 5 | #include <ctype.h> | 5 | #include <ctype.h> |
| 6 | #include <stdlib.h> | 6 | #include <stdlib.h> |
| 7 | +#include <string.h> | ||
| 7 | #ifdef _WIN32 | 8 | #ifdef _WIN32 |
| 8 | #include <Windows.h> | 9 | #include <Windows.h> |
| 9 | #include <direct.h> | 10 | #include <direct.h> |
libtests/ascii85.cc
libtests/buffer.cc
| @@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
| 2 | #include <qpdf/Pl_Buffer.hh> | 2 | #include <qpdf/Pl_Buffer.hh> |
| 3 | #include <qpdf/Pl_Count.hh> | 3 | #include <qpdf/Pl_Count.hh> |
| 4 | #include <qpdf/Pl_Discard.hh> | 4 | #include <qpdf/Pl_Discard.hh> |
| 5 | +#include <stdlib.h> | ||
| 5 | 6 | ||
| 6 | typedef unsigned char* uc; | 7 | typedef unsigned char* uc; |
| 7 | 8 |
libtests/flate.cc
| @@ -5,6 +5,8 @@ | @@ -5,6 +5,8 @@ | ||
| 5 | 5 | ||
| 6 | #include <iostream> | 6 | #include <iostream> |
| 7 | #include <errno.h> | 7 | #include <errno.h> |
| 8 | +#include <string.h> | ||
| 9 | +#include <stdlib.h> | ||
| 8 | 10 | ||
| 9 | FILE* safe_fopen(char const* filename, char const* mode) | 11 | FILE* safe_fopen(char const* filename, char const* mode) |
| 10 | { | 12 | { |
libtests/hex.cc
| @@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
| 2 | 2 | ||
| 3 | #include <qpdf/Pl_StdioFile.hh> | 3 | #include <qpdf/Pl_StdioFile.hh> |
| 4 | #include <iostream> | 4 | #include <iostream> |
| 5 | +#include <stdlib.h> | ||
| 5 | 6 | ||
| 6 | int main() | 7 | int main() |
| 7 | { | 8 | { |
| @@ -29,7 +30,7 @@ int main() | @@ -29,7 +30,7 @@ int main() | ||
| 29 | catch (std::exception& e) | 30 | catch (std::exception& e) |
| 30 | { | 31 | { |
| 31 | std::cerr << e.what() << std::endl; | 32 | std::cerr << e.what() << std::endl; |
| 32 | - exit(2); | 33 | + exit(2); |
| 33 | } | 34 | } |
| 34 | 35 | ||
| 35 | return 0; | 36 | return 0; |
libtests/lzw.cc
libtests/pcre.cc
libtests/png_filter.cc
| @@ -5,6 +5,8 @@ | @@ -5,6 +5,8 @@ | ||
| 5 | #include <iostream> | 5 | #include <iostream> |
| 6 | #include <errno.h> | 6 | #include <errno.h> |
| 7 | #include <assert.h> | 7 | #include <assert.h> |
| 8 | +#include <string.h> | ||
| 9 | +#include <stdlib.h> | ||
| 8 | 10 | ||
| 9 | FILE* safe_fopen(char const* filename, char const* mode) | 11 | FILE* safe_fopen(char const* filename, char const* mode) |
| 10 | { | 12 | { |
libtests/qexc.cc
libtests/qutil.cc
qpdf/test_driver.cc
| @@ -9,6 +9,7 @@ | @@ -9,6 +9,7 @@ | ||
| 9 | #include <qpdf/QPDFWriter.hh> | 9 | #include <qpdf/QPDFWriter.hh> |
| 10 | #include <iostream> | 10 | #include <iostream> |
| 11 | #include <string.h> | 11 | #include <string.h> |
| 12 | +#include <stdlib.h> | ||
| 12 | #include <map> | 13 | #include <map> |
| 13 | 14 | ||
| 14 | static char const* whoami = 0; | 15 | static char const* whoami = 0; |