Commit a8fca630 authored by Albert Astals Cid's avatar Albert Astals Cid

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
parent 214322f3
......@@ -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>
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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>
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -33,6 +33,8 @@
#pragma interface
#endif
#include "poppler-config.h"
#include "goo/gtypes.h"
#include "Object.h"
#include "Function.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"
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment