summaryrefslogtreecommitdiffstats
path: root/patches/libxml2-2.6.32/generic/libxml2-2.6.32-reader3-output.diff
blob: 6e983c7f17bb2a4b9cdb99c7c5f0e68ae48b51f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From: Robert Schwebel <r.schwebel@pengutronix.de>
Subject: libxml2: reader3 example needs LIBXML_OUTPUT_ENABLED

When compiling --without-output, reader3 fails like this:

reader3.o: In function `main':
/home/rsc/svn/oselas/bsp/pengutronix/OSELAS.BSP-Pengutronix-AllYes-trunk/platform-phyCORE-PXA270/build-target/libxml2-2.6.32/doc/examples/reader3.c:95: undefined reference to `xmlDocDump'
collect2: ld returned 1 exit status
make[4]: *** [reader3] Error 1
make[4]: Leaving directory `/home/rsc/svn/oselas/bsp/pengutronix/OSELAS.BSP-Pengutronix-AllYes-trunk/platform-phyCORE-PXA270/build-target/libxml2-2.6.32/doc/examples'

This patch makes the content of the example dependend on
LIBXML_OUTPUT_ENABLED.

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>

--

This bug was fixed in r2885 in the libxml2 svn repository:
http://svn.gnome.org/viewvc/libxml2/trunk/doc/examples/reader3.c?r1=2885&r2=3785

---
--- trunk/doc/examples/reader3.c	2004/11/09 16:17:02	2885
+++ trunk/doc/examples/reader3.c	2008/08/29 19:58:23	3785
@@ -15,7 +15,8 @@
 #include <stdio.h>
 #include <libxml/xmlreader.h>
 
-#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_PATTERN_ENABLED)
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_PATTERN_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+
 
 /**
  * streamFile:
@@ -113,7 +114,7 @@
 
 #else
 int main(void) {
-    fprintf(stderr, "Reader or Pattern support not compiled in\n");
+    fprintf(stderr, "Reader, Pattern or output support not compiled in\n");
     exit(1);
 }
 #endif