Implicitly include config.h in all files

The definitions in config.h should be available in all files an
implementation detail; it can be included through the build system
instead of having each file pull it every time.

This is especially helpful with AC_USE_SYSTEM_EXTENSIONS, as _GNU_SOURCE
and friends can have an effect by merely being defined, which can lead
to some confusion if its effective for only half the files.

And we don't really support a build _without_ config.h; so, one less
thing to worry about.

Signed-off-by: Ran Benita <ran234@gmail.com>
master
Ran Benita 2012-04-06 03:12:50 +03:00 committed by Daniel Stone
parent 5df53e4944
commit 8fbd44fde6
12 changed files with 2 additions and 41 deletions

View File

@ -22,7 +22,8 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/xkbcomp \
-Isrc/xkbcomp
-Isrc/xkbcomp/ \
-include $(top_srcdir)/src/config.h
AM_CFLAGS = \
$(BASE_CFLAGS) \

View File

@ -23,9 +23,6 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "utils.h"
#include "xkballoc.h"
#include "xkbcommon/xkbcommon.h"

View File

@ -70,9 +70,6 @@ SOFTWARE.
********************************************************/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "xkbmisc.h"
#include "xkbcommon/xkbcommon.h"
#include "XKBcommonint.h"

View File

@ -23,10 +23,6 @@
* Author: Daniel Stone <daniel@fooishbar.org>
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>

View File

@ -25,9 +25,6 @@ sale, use or other dealings in this Software without prior written
authorization from the authors.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

View File

@ -49,10 +49,6 @@
*
* ********************************************************/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "utils.h"
#include "xkbcommon/xkbcommon.h"
#include "XKBcommonint.h"

View File

@ -24,9 +24,6 @@
********************************************************/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "utils.h"
#include "xkbrules.h"
#include "xkbcommon/xkbcommon.h"

View File

@ -24,12 +24,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <X11/X.h>
#include "xkballoc.h"
#include "xkbmisc.h"
#include "xkbcommon/xkbcommon.h"

View File

@ -58,10 +58,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
* - messages (very unlikely)
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <assert.h>
#include "xkbcommon/xkbcommon.h"

View File

@ -24,9 +24,6 @@
********************************************************/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "xkbmisc.h"
#include "xkbcommon/xkbcommon.h"
#include "XKBcommonint.h"

View File

@ -33,10 +33,6 @@
#include <X11/Xdefs.h>
#include <X11/Xfuncproto.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
extern void *
recalloc(void *ptr, size_t old_size, size_t new_size);

View File

@ -24,9 +24,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include "xkbmisc.h"