diff options
author | Albert Astals Cid <aacid@kde.org> | 2011-07-11 14:57:33 +0100 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2011-07-11 14:57:33 +0100 |
commit | a8fca630d592941c033ca6a380bf46b6e733a748 (patch) | |
tree | 1798a2ab2c88817dcb4dbe8d455530e3646139e3 | |
parent | 214322f3c66a9aad4e2a46f6e305a3dacaa4f8b1 (diff) |
Sanitize headers a big
* Remove includes to config.h as that file does not exist
* Add to poppler-config.h all the defines we define in the
configure/cmake process and are used in headers
* Include poppker-config.h where needed
-rwxr-xr-x | goo/GooTimer.h | 2 | ||||
-rw-r--r-- | goo/ImgWriter.h | 3 | ||||
-rw-r--r-- | goo/JpegWriter.h | 3 | ||||
-rw-r--r-- | goo/PNGWriter.h | 4 | ||||
-rw-r--r-- | goo/TiffWriter.h | 3 | ||||
-rw-r--r-- | goo/gfile.h | 3 | ||||
-rw-r--r-- | poppler/DCTStream.h | 5 | ||||
-rw-r--r-- | poppler/FlateStream.h | 5 | ||||
-rw-r--r-- | poppler/Gfx.h | 3 | ||||
-rw-r--r-- | poppler/GfxState.h | 2 | ||||
-rw-r--r-- | poppler/Stream.h | 3 | ||||
-rw-r--r-- | poppler/poppler-config.h.cmake | 63 | ||||
-rw-r--r-- | poppler/poppler-config.h.in | 63 | ||||
-rw-r--r-- | splash/SplashFTFont.h | 4 | ||||
-rw-r--r-- | splash/SplashMath.h | 4 |
15 files changed, 153 insertions, 17 deletions
diff --git a/goo/GooTimer.h b/goo/GooTimer.h index f55ffcce..d700e501 100755 --- a/goo/GooTimer.h +++ b/goo/GooTimer.h @@ -7,6 +7,7 @@ // Copyright 2005 Jonathan Blandford <jrb@redhat.com> // Copyright 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com> // Copyright 2010 Hib Eris <hib@hiberis.nl> +// Copyright 2011 Albert Astals cid <aacid@kde.org> // Inspired by gtimer.c in glib, which is Copyright 2000 by the GLib Team // //======================================================================== @@ -18,6 +19,7 @@ #pragma interface #endif +#include "poppler/poppler-config.h" #include "gtypes.h" #ifdef HAVE_GETTIMEOFDAY #include <sys/time.h> diff --git a/goo/ImgWriter.h b/goo/ImgWriter.h index f44c85dc..50fe9d7d 100644 --- a/goo/ImgWriter.h +++ b/goo/ImgWriter.h @@ -5,7 +5,7 @@ // This file is licensed under the GPLv2 or later // // Copyright (C) 2009 Stefan Thomas <thomas@eload24.com> -// Copyright (C) 2009 Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2009, 2011 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2010 Adrian Johnson <ajohnson@redneon.com> // Copyright (C) 2010 Brian Cameron <brian.cameron@oracle.com> // @@ -14,7 +14,6 @@ #ifndef IMGWRITER_H #define IMGWRITER_H -#include <config.h> #include <stdio.h> class ImgWriter diff --git a/goo/JpegWriter.h b/goo/JpegWriter.h index 1f7a7387..cd2a0357 100644 --- a/goo/JpegWriter.h +++ b/goo/JpegWriter.h @@ -9,13 +9,14 @@ // Copyright (C) 2010 Jürg Billeter <j@bitron.ch> // Copyright (C) 2010 Harry Roberts <harry.roberts@midnight-labs.org> // Copyright (C) 2010 Brian Cameron <brian.cameron@oracle.com> +// Copyright (C) 2011 Albert Astals Cid <aacid@kde.org> // //======================================================================== #ifndef JPEGWRITER_H #define JPEGWRITER_H -#include <config.h> +#include "poppler/poppler-config.h" #ifdef ENABLE_LIBJPEG diff --git a/goo/PNGWriter.h b/goo/PNGWriter.h index 64ffc675..0f79bf95 100644 --- a/goo/PNGWriter.h +++ b/goo/PNGWriter.h @@ -6,7 +6,7 @@ // // Copyright (C) 2009 Warren Toomey <wkt@tuhs.org> // Copyright (C) 2009 Shen Liang <shenzhuxi@gmail.com> -// Copyright (C) 2009 Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2009, 2011 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2009 Stefan Thomas <thomas@eload24.com> // Copyright (C) 2010 Adrian Johnson <ajohnson@redneon.com> // @@ -15,7 +15,7 @@ #ifndef PNGWRITER_H #define PNGWRITER_H -#include <config.h> +#include "poppler/poppler-config.h" #ifdef ENABLE_LIBPNG diff --git a/goo/TiffWriter.h b/goo/TiffWriter.h index 8c9e04ac..b2b0ea99 100644 --- a/goo/TiffWriter.h +++ b/goo/TiffWriter.h @@ -5,13 +5,14 @@ // This file is licensed under the GPLv2 or later // // Copyright (C) 2010 William Bader <williambader@hotmail.com> +// Copyright (C) 2011 Albert Astals Cid <aacid@kde.org> // //======================================================================== #ifndef TIFFWRITER_H #define TIFFWRITER_H -#include <config.h> +#include "poppler/poppler-config.h" #ifdef ENABLE_LIBTIFF diff --git a/goo/gfile.h b/goo/gfile.h index 17aea024..0bc010e7 100644 --- a/goo/gfile.h +++ b/goo/gfile.h @@ -16,7 +16,7 @@ // under GPL version 2 or later // // Copyright (C) 2006 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2009 Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2009, 2011 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net> // // To see a description of the changes please see the Changelog file that @@ -27,6 +27,7 @@ #ifndef GFILE_H #define GFILE_H +#include "poppler/poppler-config.h" #include <stdio.h> #include <stdlib.h> #include <stddef.h> diff --git a/poppler/DCTStream.h b/poppler/DCTStream.h index fb85e5ff..8f1fc85b 100644 --- a/poppler/DCTStream.h +++ b/poppler/DCTStream.h @@ -6,7 +6,7 @@ // // Copyright 2005 Jeff Muizelaar <jeff@infidigm.net> // Copyright 2005 Martin Kretzschmar <martink@gnome.org> -// Copyright 2005-2007, 2009, 2010 Albert Astals Cid <aacid@kde.org> +// Copyright 2005-2007, 2009-2011 Albert Astals Cid <aacid@kde.org> // Copyright 2010 Carlos Garcia Campos <carlosgc@gnome.org> // Copyright 2011 Daiki Ueno <ueno@unixuser.org> // @@ -14,7 +14,6 @@ #ifndef DCTSTREAM_H #define DCTSTREAM_H -#include <config.h> #ifdef USE_GCC_PRAGMAS #pragma interface @@ -25,6 +24,7 @@ #pragma implementation #endif +#include "poppler-config.h" #include <stdio.h> #include <stdlib.h> #include <stddef.h> @@ -36,7 +36,6 @@ #include <ctype.h> #include "goo/gmem.h" #include "goo/gfile.h" -#include "poppler-config.h" #include "Error.h" #include "Object.h" #include "Decrypt.h" diff --git a/poppler/FlateStream.h b/poppler/FlateStream.h index 99b3d0a2..dba00d0a 100644 --- a/poppler/FlateStream.h +++ b/poppler/FlateStream.h @@ -3,7 +3,7 @@ // FlateStream.h // // Copyright (C) 2005, Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2010, Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2010, 2011, Albert Astals Cid <aacid@kde.org> // // This file is under the GPLv2 or later license // @@ -11,7 +11,6 @@ #ifndef FLATESTREAM_H #define FLATESTREAM_H -#include <config.h> #ifdef USE_GCC_PRAGMAS #pragma interface @@ -22,6 +21,7 @@ #pragma implementation #endif +#include "poppler-config.h" #include <stdio.h> #include <stdlib.h> #include <stddef.h> @@ -32,7 +32,6 @@ #include <ctype.h> #include "goo/gmem.h" #include "goo/gfile.h" -#include "poppler-config.h" #include "Error.h" #include "Object.h" #include "Decrypt.h" diff --git a/poppler/Gfx.h b/poppler/Gfx.h index d88b8d84..ce7b2d87 100644 --- a/poppler/Gfx.h +++ b/poppler/Gfx.h @@ -17,7 +17,7 @@ // Copyright (C) 2007 Iñigo Martínez <inigomartinez@gmail.com> // Copyright (C) 2008 Brad Hards <bradh@kde.org> // Copyright (C) 2008, 2010 Carlos Garcia Campos <carlosgc@gnome.org> -// Copyright (C) 2009, 2010 Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2009-2011 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2009, 2010 Thomas Freitag <Thomas.Freitag@alfa.de> // Copyright (C) 2010 David Benjamin <davidben@mit.edu> // Copyright (C) 2010 Christian Feuersänger <cfeuersaenger@googlemail.com> @@ -34,6 +34,7 @@ #pragma interface #endif +#include "poppler-config.h" #include "goo/gtypes.h" #include "goo/GooList.h" #include "GfxState.h" diff --git a/poppler/GfxState.h b/poppler/GfxState.h index 099b41cb..b7f94cd1 100644 --- a/poppler/GfxState.h +++ b/poppler/GfxState.h @@ -33,6 +33,8 @@ #pragma interface #endif +#include "poppler-config.h" + #include "goo/gtypes.h" #include "Object.h" #include "Function.h" diff --git a/poppler/Stream.h b/poppler/Stream.h index fce65907..4f2a08bd 100644 --- a/poppler/Stream.h +++ b/poppler/Stream.h @@ -15,7 +15,7 @@ // // Copyright (C) 2005 Jeff Muizelaar <jeff@infidigm.net> // Copyright (C) 2008 Julien Rebetez <julien@fhtagn.net> -// Copyright (C) 2008, 2010 Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2008, 2010, 2011 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org> // Copyright (C) 2009 Stefan Thomas <thomas@eload24.com> // Copyright (C) 2010 Hib Eris <hib@hiberis.nl> @@ -33,6 +33,7 @@ #pragma interface #endif +#include "poppler-config.h" #include <stdio.h> #include "goo/gtypes.h" #include "Object.h" diff --git a/poppler/poppler-config.h.cmake b/poppler/poppler-config.h.cmake index 2c47ab3f..066111cc 100644 --- a/poppler/poppler-config.h.cmake +++ b/poppler/poppler-config.h.cmake @@ -24,6 +24,11 @@ #cmakedefine USE_FIXEDPOINT 1 #endif +/* Use single precision arithmetic in the Splash backend */ +#ifndef USE_FLOAT +#cmakedefine USE_FLOAT 1 +#endif + /* Include support for OPI comments. */ #ifndef OPI_SUPPORT #cmakedefine OPI_SUPPORT 1 @@ -49,6 +54,64 @@ #cmakedefine POPPLER_HAS_CURL_SUPPORT 1 #endif +/* Use libjpeg instead of builtin jpeg decoder. */ +#ifndef ENABLE_LIBJPEG +#cmakedefine ENABLE_LIBJPEG 1 +#endif + +/* Build against libtiff. */ +#ifndef ENABLE_LIBTIFF +#cmakedefine ENABLE_LIBTIFF 1 +#endif + +/* Build against libpng. */ +#ifndef ENABLE_LIBPNG +#cmakedefine ENABLE_LIBPNG 1 +#endif + +/* Use zlib instead of builtin zlib decoder. */ +#ifndef ENABLE_ZLIB +#cmakedefine ENABLE_ZLIB 1 +#endif + +/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. + */ +#ifndef HAVE_DIRENT_H +#cmakedefine HAVE_DIRENT_H 1 +#endif + +/* Defines if gettimeofday is available on your system */ +#ifndef HAVE_GETTIMEOFDAY +#cmakedefine HAVE_GETTIMEOFDAY 1 +#endif + +/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ +#ifndef HAVE_NDIR_H +#cmakedefine HAVE_NDIR_H 1 +#endif + +/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. + */ +#ifndef HAVE_SYS_DIR_H +#cmakedefine HAVE_SYS_DIR_H 1 +#endif + +/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. + */ +#ifndef HAVE_SYS_NDIR_H +#cmakedefine HAVE_SYS_NDIR_H 1 +#endif + +/* Have FreeType2 include files */ +#ifndef HAVE_FREETYPE_H +#cmakedefine HAVE_FREETYPE_H 1 +#endif + +/* Defines if use cms */ +#ifndef USE_CMS +#cmakedefine USE_CMS 1 +#endif + // Also, there's a couple of preprocessor symbols in the header files // that are used but never defined: DISABLE_OUTLINE, DEBUG_MEM and diff --git a/poppler/poppler-config.h.in b/poppler/poppler-config.h.in index f2b70cce..81edac56 100644 --- a/poppler/poppler-config.h.in +++ b/poppler/poppler-config.h.in @@ -24,6 +24,11 @@ #undef USE_FIXEDPOINT #endif +/* Use single precision arithmetic in the Splash backend */ +#ifndef USE_FLOAT +#undef USE_FLOAT +#endif + /* Include support for OPI comments. */ #ifndef OPI_SUPPORT #undef OPI_SUPPORT @@ -49,6 +54,64 @@ #undef POPPLER_HAS_CURL_SUPPORT #endif +/* Use libjpeg instead of builtin jpeg decoder. */ +#ifndef ENABLE_LIBJPEG +#undef ENABLE_LIBJPEG +#endif + +/* Build against libtiff. */ +#ifndef ENABLE_LIBTIFF +#undef ENABLE_LIBTIFF +#endif + +/* Build against libpng. */ +#ifndef ENABLE_LIBPNG +#undef ENABLE_LIBPNG +#endif + +/* Use zlib instead of builtin zlib decoder. */ +#ifndef ENABLE_ZLIB +#undef ENABLE_ZLIB +#endif + +/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. + */ +#ifndef HAVE_DIRENT_H +#undef HAVE_DIRENT_H +#endif + +/* Defines if gettimeofday is available on your system */ +#ifndef HAVE_GETTIMEOFDAY +#undef HAVE_GETTIMEOFDAY +#endif + +/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ +#ifndef HAVE_NDIR_H +#undef HAVE_NDIR_H +#endif + +/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. + */ +#ifndef HAVE_SYS_DIR_H +#undef HAVE_SYS_DIR_H +#endif + +/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. + */ +#ifndef HAVE_SYS_NDIR_H +#undef HAVE_SYS_NDIR_H +#endif + +/* Have FreeType2 include files */ +#ifndef HAVE_FREETYPE_H +#undef HAVE_FREETYPE_H +#endif + +/* Defines if use cms */ +#ifndef USE_CMS +#undef USE_CMS +#endif + // Also, there's a couple of preprocessor symbols in the header files // that are used but never defined: DISABLE_OUTLINE, DEBUG_MEM and diff --git a/splash/SplashFTFont.h b/splash/SplashFTFont.h index 8311907c..157eff33 100644 --- a/splash/SplashFTFont.h +++ b/splash/SplashFTFont.h @@ -11,7 +11,7 @@ // All changes made under the Poppler project to this file are licensed // under GPL version 2 or later // -// Copyright (C) 2007-2009 Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2007-2009, 2011 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2009 Petr Gajdos <pgajdos@novell.com> // Copyright (C) 2011 Andreas Hartmetz <ahartmetz@gmail.com> // @@ -23,6 +23,8 @@ #ifndef SPLASHFTFONT_H #define SPLASHFTFONT_H +#include "poppler/poppler-config.h" + #if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H #ifdef USE_GCC_PRAGMAS diff --git a/splash/SplashMath.h b/splash/SplashMath.h index 0b07567c..924af6aa 100644 --- a/splash/SplashMath.h +++ b/splash/SplashMath.h @@ -11,7 +11,7 @@ // All changes made under the Poppler project to this file are licensed // under GPL version 2 or later // -// Copyright (C) 2009, 2010 Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2009-2011 Albert Astals Cid <aacid@kde.org> // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -21,6 +21,8 @@ #ifndef SPLASHMATH_H #define SPLASHMATH_H +#include "poppler/poppler-config.h" + #if USE_FIXEDPOINT #include "goo/FixedPoint.h" #else |