]> Savannah Git Hosting - gnulib.git/commitdiff
classpath: Avoid including config.h twice, as it produces warnings.
authorBruno Haible <bruno@clisp.org>
Mon, 19 Jun 2017 15:09:30 +0000 (17:09 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 19 Jun 2017 15:09:30 +0000 (17:09 +0200)
Reported by John E. Malmberg <wb8tyw@gmail.com>.

* lib/classpath.h: Conditionalize the include of config.h.

ChangeLog
lib/classpath.c

index 15da773b35f6180617c9673e1ac6cc6ff1fbcee4..14991f1262cae012ae746f7a643f72b19fa391b9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-06-19  Bruno Haible  <bruno@clisp.org>
+
+       classpath: Avoid including config.h twice, as it produces warnings.
+       Reported by John E. Malmberg <wb8tyw@gmail.com>.
+       * lib/classpath.h: Conditionalize the include of config.h.
+
 2017-06-19  Bruno Haible  <bruno@clisp.org>
             John E. Malmberg  <wb8tyw@gmail.com>  (tiny change)
 
index e56f23fce2b6c7b02e9942c01fc7788854274194..c7868f6dc9c69c9451507e1e57bcf68b6e9357b0 100644 (file)
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#include <config.h>
+/* If CLASSPATHVAR is defined, this file is being #included, and config.h is
+   therefore already included.  */
+#if !defined CLASSPATHVAR
+# include <config.h>
+#endif
 
 /* Specification.  */
 #include "classpath.h"