blob: 8f24aede879380876387d0e7843ab75bd8b116c5 [file] [log] [blame]
Daniel Veillarda2351322004-06-27 12:08:10 +00001<?xml version="1.0"?>
2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:xhtml="http://www.w3.org/1999/xhtml"
4 version="1.0">
5 <xsl:output method="text" encoding="ISO-8859-1"/>
6
7 <xsl:template match="/">
8 <xsl:text>/*
9 * elfgcchack.h: hack by Arjan van de Ven &lt;arjanv@redhat.com&gt; to speed
10 * up the code when using gcc for call within the library.
11 *
12 * Based on the analysis http://people.redhat.com/drepper/dsohowto.pdf
13 * from Ulrich drepper. Rewritten to be generated from the XML description
14 * file for libxml2 API
15 * autogenerated with xsltproc doc/elfgcchack.xsl doc/libxml2-api.xml
16 */
17
Daniel Veillard5d4644e2005-04-01 13:11:58 +000018#ifdef IN_LIBXML
19#ifdef __GNUC__
20#ifdef PIC
21#ifdef linux
22#if (__GNUC__ == 3 &amp;&amp; __GNUC_MINOR__ >= 3) || (__GNUC__ > 3)
23
Daniel Veillarda2351322004-06-27 12:08:10 +000024#include "libxml/c14n.h"
25#include "libxml/catalog.h"
26#include "libxml/chvalid.h"
27#include "libxml/debugXML.h"
28#include "libxml/dict.h"
29#include "libxml/DOCBparser.h"
30#include "libxml/encoding.h"
31#include "libxml/entities.h"
32#include "libxml/globals.h"
33#include "libxml/hash.h"
34#include "libxml/HTMLparser.h"
35#include "libxml/HTMLtree.h"
36#include "libxml/list.h"
37#include "libxml/nanoftp.h"
38#include "libxml/nanohttp.h"
39#include "libxml/parser.h"
40#include "libxml/parserInternals.h"
41#include "libxml/pattern.h"
42#include "libxml/relaxng.h"
43#include "libxml/SAX2.h"
44#include "libxml/SAX.h"
45#include "libxml/schemasInternals.h"
46#include "libxml/threads.h"
47#include "libxml/tree.h"
48#include "libxml/uri.h"
49#include "libxml/valid.h"
50#include "libxml/xinclude.h"
51#include "libxml/xlink.h"
52#include "libxml/xmlautomata.h"
53#include "libxml/xmlerror.h"
54#include "libxml/xmlexports.h"
55#include "libxml/xmlIO.h"
56#include "libxml/xmlmemory.h"
57#include "libxml/xmlreader.h"
58#include "libxml/xmlregexp.h"
59#include "libxml/xmlsave.h"
60#include "libxml/xmlschemas.h"
61#include "libxml/xmlschemastypes.h"
62#include "libxml/xmlstring.h"
63#include "libxml/xmlunicode.h"
64#include "libxml/xmlversion.h"
65#include "libxml/xmlwriter.h"
66#include "libxml/xpath.h"
67#include "libxml/xpathInternals.h"
68#include "libxml/xpointer.h"
Daniel Veillardbe076e92005-01-04 20:18:14 +000069#include "libxml/xmlmodule.h"
Daniel Veillarda2351322004-06-27 12:08:10 +000070
71/* special hot spot not exported ones */
72
Daniel Veillard5d4644e2005-04-01 13:11:58 +000073#ifdef bottom_globals
74#undef __xmlGenericError
Daniel Veillarda2351322004-06-27 12:08:10 +000075extern __typeof (__xmlGenericError) __xmlGenericError __attribute((alias("__xmlGenericError__internal_alias")));
Daniel Veillard5d4644e2005-04-01 13:11:58 +000076#else
77#ifndef __xmlGenericError
78extern __typeof (__xmlGenericError) __xmlGenericError__internal_alias __attribute((visibility("hidden")));
Daniel Veillarda2351322004-06-27 12:08:10 +000079#define __xmlGenericError __xmlGenericError__internal_alias
Daniel Veillard5d4644e2005-04-01 13:11:58 +000080#endif
81#endif
Daniel Veillarda2351322004-06-27 12:08:10 +000082
Daniel Veillard5d4644e2005-04-01 13:11:58 +000083#ifdef bottom_globals
84#undef __xmlGenericErrorContext
Daniel Veillarda2351322004-06-27 12:08:10 +000085extern __typeof (__xmlGenericErrorContext) __xmlGenericErrorContext __attribute((alias("__xmlGenericErrorContext__internal_alias")));
Daniel Veillard5d4644e2005-04-01 13:11:58 +000086#else
87#ifndef __xmlGenericErrorContext
88extern __typeof (__xmlGenericErrorContext) __xmlGenericErrorContext__internal_alias __attribute((visibility("hidden")));
Daniel Veillarda2351322004-06-27 12:08:10 +000089#define __xmlGenericErrorContext __xmlGenericErrorContext__internal_alias
Daniel Veillard5d4644e2005-04-01 13:11:58 +000090#endif
91#endif
Daniel Veillarda2351322004-06-27 12:08:10 +000092
93/* list generated from libxml2-api.xml */
Daniel Veillarda2351322004-06-27 12:08:10 +000094</xsl:text>
95 <xsl:apply-templates select="/api/symbols/function"/>
Daniel Veillard5d4644e2005-04-01 13:11:58 +000096 <xsl:text>
97#endif
98#endif
99#endif
100#endif
101#endif
102
103</xsl:text>
Daniel Veillarda2351322004-06-27 12:08:10 +0000104 </xsl:template>
105
106 <xsl:template match="function">
107 <xsl:variable name="str" select="string(@name)"/>
108 <xsl:if test="starts-with(@name, 'xml') or starts-with(@name, 'html') or contains(@name, 'Push') or contains(@name, 'Pop')">
109 <xsl:variable name="alias" select="concat($str, '__internal_alias')"/>
110 <xsl:apply-templates select="cond"/>
Daniel Veillard5d4644e2005-04-01 13:11:58 +0000111 <xsl:text>#ifdef bottom_</xsl:text>
112 <xsl:value-of select="string(@module)"/>
113 <xsl:text>
114#undef </xsl:text>
Daniel Veillarda2351322004-06-27 12:08:10 +0000115 <xsl:value-of select="$str"/>
Daniel Veillard5d4644e2005-04-01 13:11:58 +0000116 <xsl:text>
117extern __typeof (</xsl:text>
Daniel Veillarda2351322004-06-27 12:08:10 +0000118 <xsl:value-of select="$str"/>
119 <xsl:text>) </xsl:text>
120 <xsl:value-of select="$str"/>
121 <xsl:text> __attribute((alias("</xsl:text>
122 <xsl:value-of select="$alias"/>
123 <xsl:text>")));
Daniel Veillard5d4644e2005-04-01 13:11:58 +0000124#else
125#ifndef </xsl:text>
126 <xsl:value-of select="$str"/>
127 <xsl:text>
128</xsl:text>
129 <xsl:text>extern __typeof (</xsl:text>
130 <xsl:value-of select="$str"/>
131 <xsl:text>) </xsl:text>
132 <xsl:value-of select="$alias"/>
133 <xsl:text> __attribute((visibility("hidden")));
Daniel Veillarda2351322004-06-27 12:08:10 +0000134</xsl:text>
135 <xsl:text>#define </xsl:text>
136 <xsl:value-of select="$str"/>
137 <xsl:text> </xsl:text>
138 <xsl:value-of select="$alias"/>
139 <xsl:text>
Daniel Veillard5d4644e2005-04-01 13:11:58 +0000140#endif
141#endif
Daniel Veillarda2351322004-06-27 12:08:10 +0000142</xsl:text>
143 <xsl:apply-templates select="cond" mode="end"/>
144 <xsl:text>
145</xsl:text>
146 </xsl:if>
147 </xsl:template>
148 <xsl:template match="cond">
William M. Brack21e4ef22005-01-02 09:53:13 +0000149 <xsl:text>#if </xsl:text>
Daniel Veillarda2351322004-06-27 12:08:10 +0000150 <xsl:value-of select="."/>
151 <xsl:text>
152</xsl:text>
153 </xsl:template>
154 <xsl:template match="cond" mode="end">
155 <xsl:text>#endif
156</xsl:text>
157 </xsl:template>
158</xsl:stylesheet>
159