[parted-devel] [PATCH] Don't include config.h from internal headers

Jim Meyering jim at meyering.net
Tue Jul 3 08:51:22 UTC 2007


Bob Proulx reported the new build failures at
http://buildbot.proulx.com:9001/.  They arise from
changes in GnuLib that are pulled in automatically
via bootstrap.  Those changes exposed the unnecessary
multiple inclusion of config.h.


     Don't include config.h from internal headers.
     This avoids redefinition errors (on the new symbol,
     __STDC_LIMIT_MACROS_TRIGGER) when config.h is included twice.


Signed-off-by: Jim Meyering <jim at meyering.net>
---
 include/parted/debug.h           |    2 --
 include/parted/endian.h          |    3 +--
 libparted/fs/ext2/ext2.h         |    4 +---
 libparted/fs/fat/fat.h           |    4 +---
 libparted/fs/reiserfs/geom_dal.h |    4 +---
 parted/strlist.h                 |    2 --
 parted/table.h                   |    2 --
 7 files changed, 4 insertions(+), 17 deletions(-)

diff --git a/include/parted/debug.h b/include/parted/debug.h
index dfa7082..494dba5 100644
--- a/include/parted/debug.h
+++ b/include/parted/debug.h
@@ -20,8 +20,6 @@
 #ifndef PED_DEBUG_H_INCLUDED
 #define PED_DEBUG_H_INCLUDED

-#include <config.h>
-
 #include <stdarg.h>

 #ifdef DEBUG
diff --git a/include/parted/endian.h b/include/parted/endian.h
index c11b187..2f0d1ba 100644
--- a/include/parted/endian.h
+++ b/include/parted/endian.h
@@ -1,6 +1,6 @@
 /*
     libparted - a library for manipulating disk partitions
-    Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+    Copyright (C) 1998-2002, 2007 Free Software Foundation, Inc.

     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -22,7 +22,6 @@
 #ifndef PED_ENDIAN_H_INCLUDED
 #define PED_ENDIAN_H_INCLUDED

-#include <config.h>
 #include <stdint.h>

 /* returns the n'th least significant byte */
diff --git a/libparted/fs/ext2/ext2.h b/libparted/fs/ext2/ext2.h
index e6cbfc3..5614366 100644
--- a/libparted/fs/ext2/ext2.h
+++ b/libparted/fs/ext2/ext2.h
@@ -1,6 +1,6 @@
 /*
     ext2.h -- ext2 header
-    Copyright (C) 1998-2000 Free Software Foundation, Inc.
+    Copyright (C) 1998-2000, 2007 Free Software Foundation, Inc.

     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
 #ifndef _EXT2_H
 #define _EXT2_H

-#include <config.h>
-
 #include <parted/parted.h>
 #include <parted/debug.h>
 #include <sys/types.h>
diff --git a/libparted/fs/fat/fat.h b/libparted/fs/fat/fat.h
index f101328..9f928bb 100644
--- a/libparted/fs/fat/fat.h
+++ b/libparted/fs/fat/fat.h
@@ -1,6 +1,6 @@
 /*
     libparted
-    Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+    Copyright (C) 1998-2001, 2007 Free Software Foundation, Inc.

     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
 #ifndef FAT_H_INCLUDED
 #define FAT_H_INCLUDED

-#include <config.h>
-
 #include <parted/parted.h>
 #include <parted/endian.h>
 #include <parted/debug.h>
diff --git a/libparted/fs/reiserfs/geom_dal.h b/libparted/fs/reiserfs/geom_dal.h
index 99d0a06..1582a1c 100644
--- a/libparted/fs/reiserfs/geom_dal.h
+++ b/libparted/fs/reiserfs/geom_dal.h
@@ -1,6 +1,6 @@
 /*
     geom_dal.h -- parted device abstraction layer
-    Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+    Copyright (C) 2001, 2002, 2007 Free Software Foundation, Inc.

     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@
 #ifndef GEOM_DAL_H
 #define GEOM_DAL_H

-#include <config.h>
-
 #include <parted/parted.h>

 #if DYNAMIC_LOADING || !DISCOVER_ONLY
diff --git a/parted/strlist.h b/parted/strlist.h
index 39efb4b..b985979 100644
--- a/parted/strlist.h
+++ b/parted/strlist.h
@@ -20,8 +20,6 @@
 #ifndef STRLIST_H_INCLUDED
 #define STRLIST_H_INCLUDED

-#include <config.h>
-
 #include <wchar.h>

 #ifndef ENABLE_NLS
diff --git a/parted/table.h b/parted/table.h
index b423a9e..22366d3 100644
--- a/parted/table.h
+++ b/parted/table.h
@@ -26,8 +26,6 @@

 #include "strlist.h"

-#include <config.h>
-
 #ifdef ENABLE_NLS
 #       include <wchar.h>
 #else
--
1.5.2.2.646.g71e55-dirty



More information about the parted-devel mailing list