Guard #inclusion of config.h in examples.
authorJim Meyering <meyering@redhat.com>
Mon, 3 Aug 2009 13:21:44 +0000 (15:21 +0200)
committerJim Meyering <meyering@redhat.com>
Mon, 3 Aug 2009 13:21:44 +0000 (15:21 +0200)
* examples/hello.c [HAVE_CONFIG_H]: Include <config.h> conditionally.
* examples/to-xml.c: Likewise.

examples/hello.c
examples/to-xml.c

index a8649f3..1c12f8e 100644 (file)
@@ -4,7 +4,9 @@
  *   hello guest.img /dev/VolGroup00/LogVol00
  */
 
  *   hello guest.img /dev/VolGroup00/LogVol00
  */
 
-#include <config.h>
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
index 5b75244..a62660c 100644 (file)
@@ -7,7 +7,9 @@
  *   to-xml guest.img [guest.img ...]
  */
 
  *   to-xml guest.img [guest.img ...]
  */
 
-#include <config.h>
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>