summaryrefslogtreecommitdiffstats
path: root/libdwfl/dwfl_module_nextcu.c
diff options
context:
space:
mode:
authorUlf Hermann <[email protected]>2017-04-03 14:53:37 +0200
committerUlf Hermann <[email protected]>2017-04-26 10:01:29 +0000
commite80dfcbcc3807ba22109d40bc297c5c64c9cc266 (patch)
treee33d23a284b5b283c8d60321d89457be8ece2de4 /libdwfl/dwfl_module_nextcu.c
parentfc9596af615b96d73e15b26dc83da14e7bde73c5 (diff)
Avoid double-including config.h
config.h doesn't have include guards, so including it twice is bad. We deal with this by checking for PACKAGE_NAME, but only in some places. Once we start using gnulib, we will need to include config.h before any gnulib-generated headers. This is problematic if we include it transitively through our own private headers. In order to set a clear rule about inclusion of config.h, it is now included in every .c file as first header, but not in any header. This will definitely avoid double-inclusion and satisfy the condition that it has to be included before gnulib headers. It comes at the price of adding some redundancy, but there is no clean way to avoid this. Change-Id: Ib78dd7e058ef8ac93cd379dcd14a2ffbc86c1988 Reviewed-by: Christian Kandeler <[email protected]>
Diffstat (limited to 'libdwfl/dwfl_module_nextcu.c')
-rw-r--r--libdwfl/dwfl_module_nextcu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libdwfl/dwfl_module_nextcu.c b/libdwfl/dwfl_module_nextcu.c
index 6f81f4cc..32ee6bc2 100644
--- a/libdwfl/dwfl_module_nextcu.c
+++ b/libdwfl/dwfl_module_nextcu.c
@@ -26,6 +26,10 @@
the GNU Lesser General Public License along with this program. If
not, see <http://www.gnu.org/licenses/>. */
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include "libdwflP.h"
Dwarf_Die *