From 40f8a19bcbc34c91d7be1806760ac0e530285f46 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 19 Jun 2017 17:09:30 +0200 Subject: [PATCH] classpath: Avoid including config.h twice, as it produces warnings. Reported by John E. Malmberg . * lib/classpath.h: Conditionalize the include of config.h. --- ChangeLog | 6 ++++++ lib/classpath.c | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 15da773b35..14991f1262 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2017-06-19 Bruno Haible + + classpath: Avoid including config.h twice, as it produces warnings. + Reported by John E. Malmberg . + * lib/classpath.h: Conditionalize the include of config.h. + 2017-06-19 Bruno Haible John E. Malmberg (tiny change) diff --git a/lib/classpath.c b/lib/classpath.c index e56f23fce2..c7868f6dc9 100644 --- a/lib/classpath.c +++ b/lib/classpath.c @@ -15,7 +15,11 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include +/* If CLASSPATHVAR is defined, this file is being #included, and config.h is + therefore already included. */ +#if !defined CLASSPATHVAR +# include +#endif /* Specification. */ #include "classpath.h" -- 2.39.5