From f59ff6fcc2fc2a2006101838ff0cebd5b32d9886 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Thu, 21 Jun 2012 13:47:41 -0400 Subject: fix include order for off_t --- include/qpdf/Pl_Count.hh | 2 +- include/qpdf/QPDF.hh | 6 +++--- include/qpdf/QPDFExc.hh | 3 ++- include/qpdf/QPDFObjectHandle.hh | 6 +++--- include/qpdf/QPDFWriter.hh | 5 +++-- include/qpdf/QUtil.hh | 1 + include/qpdf/Types.h | 4 ++++ include/qpdf/qpdf-c.h | 2 +- libqpdf/qpdf/MD5.hh | 2 +- libqpdf/qpdf/PCRE.hh | 4 ++-- libqpdf/qpdf/QPDF_Stream.hh | 3 ++- 11 files changed, 23 insertions(+), 15 deletions(-) diff --git a/include/qpdf/Pl_Count.hh b/include/qpdf/Pl_Count.hh index e5b8939f..7e522455 100644 --- a/include/qpdf/Pl_Count.hh +++ b/include/qpdf/Pl_Count.hh @@ -11,8 +11,8 @@ // This pipeline is reusable; i.e., it is safe to call write() after // calling finish(). -#include #include +#include class Pl_Count: public Pipeline { diff --git a/include/qpdf/QPDF.hh b/include/qpdf/QPDF.hh index 26f9cdc9..a4a06c8f 100644 --- a/include/qpdf/QPDF.hh +++ b/include/qpdf/QPDF.hh @@ -8,15 +8,15 @@ #ifndef __QPDF_HH__ #define __QPDF_HH__ +#include +#include + #include #include #include #include #include -#include -#include - #include #include #include diff --git a/include/qpdf/QPDFExc.hh b/include/qpdf/QPDFExc.hh index 26d0a315..f8e23ffb 100644 --- a/include/qpdf/QPDFExc.hh +++ b/include/qpdf/QPDFExc.hh @@ -9,8 +9,9 @@ #define __QPDFEXC_HH__ #include -#include #include + +#include #include class QPDFExc: public std::runtime_error diff --git a/include/qpdf/QPDFObjectHandle.hh b/include/qpdf/QPDFObjectHandle.hh index 557ee869..c0a150ec 100644 --- a/include/qpdf/QPDFObjectHandle.hh +++ b/include/qpdf/QPDFObjectHandle.hh @@ -8,14 +8,14 @@ #ifndef __QPDFOBJECTHANDLE_HH__ #define __QPDFOBJECTHANDLE_HH__ +#include +#include + #include #include #include #include -#include -#include - #include #include diff --git a/include/qpdf/QPDFWriter.hh b/include/qpdf/QPDFWriter.hh index 6a1c23cf..72771f68 100644 --- a/include/qpdf/QPDFWriter.hh +++ b/include/qpdf/QPDFWriter.hh @@ -12,6 +12,9 @@ #ifndef __QPDFWRITER_HH__ #define __QPDFWRITER_HH__ +#include +#include + #include #include #include @@ -19,9 +22,7 @@ #include #include -#include #include -#include #include diff --git a/include/qpdf/QUtil.hh b/include/qpdf/QUtil.hh index 37307101..c253fde3 100644 --- a/include/qpdf/QUtil.hh +++ b/include/qpdf/QUtil.hh @@ -10,6 +10,7 @@ #include #include + #include #include #include diff --git a/include/qpdf/Types.h b/include/qpdf/Types.h index 4041ce3a..439e5c24 100644 --- a/include/qpdf/Types.h +++ b/include/qpdf/Types.h @@ -1,6 +1,10 @@ #ifndef __QPDFTYPES_H__ #define __QPDFTYPES_H__ +/* This file must be included before any system files. It should be + * included right after within the library. + */ + /* Attempt to provide off_t and size_t on any recent platform. To * make cross compilation easier and to be more portable across * platforms, QPDF avoids having any public header files use the diff --git a/include/qpdf/qpdf-c.h b/include/qpdf/qpdf-c.h index 77af4741..3103497c 100644 --- a/include/qpdf/qpdf-c.h +++ b/include/qpdf/qpdf-c.h @@ -70,8 +70,8 @@ */ #include -#include #include +#include #ifdef __cplusplus extern "C" { diff --git a/libqpdf/qpdf/MD5.hh b/libqpdf/qpdf/MD5.hh index ef454def..4cfe027e 100644 --- a/libqpdf/qpdf/MD5.hh +++ b/libqpdf/qpdf/MD5.hh @@ -1,7 +1,6 @@ #ifndef __MD5_HH__ #define __MD5_HH__ -#include #include #include #ifdef HAVE_INTTYPES_H @@ -10,6 +9,7 @@ #ifdef HAVE_STDINT_H # include #endif +#include class MD5 { diff --git a/libqpdf/qpdf/PCRE.hh b/libqpdf/qpdf/PCRE.hh index 5d1ae458..8f200655 100644 --- a/libqpdf/qpdf/PCRE.hh +++ b/libqpdf/qpdf/PCRE.hh @@ -5,6 +5,8 @@ #ifndef __PCRE_HH__ #define __PCRE_HH__ +#include + #ifdef _WIN32 # define PCRE_STATIC #endif @@ -12,8 +14,6 @@ #include #include -#include - // Note: this class does not encapsulate all features of the PCRE // package -- only those that I actually need right now are here. diff --git a/libqpdf/qpdf/QPDF_Stream.hh b/libqpdf/qpdf/QPDF_Stream.hh index f6886b62..49db4d47 100644 --- a/libqpdf/qpdf/QPDF_Stream.hh +++ b/libqpdf/qpdf/QPDF_Stream.hh @@ -1,8 +1,9 @@ #ifndef __QPDF_STREAM_HH__ #define __QPDF_STREAM_HH__ -#include +#include +#include #include class Pipeline; -- cgit v1.2.3-54-g00ecf