blob: 8dd5c6a7971e422a99bad9df7a231c7a0f36044d [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">
Daniel Veillardd2190fa2010-09-30 13:58:22 +02005 <xsl:output method="text" encoding="UTF-8"/>
Daniel Veillarda2351322004-06-27 12:08:10 +00006
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
Nick Wellnhofer03a238f2017-09-29 13:00:50 +020021#ifdef __linux__
Daniel Veillard5d4644e2005-04-01 13:11:58 +000022#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"
Daniel Veillard5eee7672005-08-22 21:22:27 +000046#include "libxml/schematron.h"
Daniel Veillarda2351322004-06-27 12:08:10 +000047#include "libxml/threads.h"
48#include "libxml/tree.h"
49#include "libxml/uri.h"
50#include "libxml/valid.h"
51#include "libxml/xinclude.h"
52#include "libxml/xlink.h"
53#include "libxml/xmlautomata.h"
54#include "libxml/xmlerror.h"
55#include "libxml/xmlexports.h"
56#include "libxml/xmlIO.h"
57#include "libxml/xmlmemory.h"
58#include "libxml/xmlreader.h"
59#include "libxml/xmlregexp.h"
60#include "libxml/xmlsave.h"
61#include "libxml/xmlschemas.h"
62#include "libxml/xmlschemastypes.h"
63#include "libxml/xmlstring.h"
64#include "libxml/xmlunicode.h"
65#include "libxml/xmlversion.h"
66#include "libxml/xmlwriter.h"
67#include "libxml/xpath.h"
68#include "libxml/xpathInternals.h"
69#include "libxml/xpointer.h"
Daniel Veillardbe076e92005-01-04 20:18:14 +000070#include "libxml/xmlmodule.h"
Daniel Veillarda2351322004-06-27 12:08:10 +000071
72/* special hot spot not exported ones */
73
Daniel Veillard5d4644e2005-04-01 13:11:58 +000074#ifdef bottom_globals
75#undef __xmlGenericError
Daniel Veillarda2351322004-06-27 12:08:10 +000076extern __typeof (__xmlGenericError) __xmlGenericError __attribute((alias("__xmlGenericError__internal_alias")));
Daniel Veillard5d4644e2005-04-01 13:11:58 +000077#else
78#ifndef __xmlGenericError
79extern __typeof (__xmlGenericError) __xmlGenericError__internal_alias __attribute((visibility("hidden")));
Daniel Veillarda2351322004-06-27 12:08:10 +000080#define __xmlGenericError __xmlGenericError__internal_alias
Daniel Veillard5d4644e2005-04-01 13:11:58 +000081#endif
82#endif
Daniel Veillarda2351322004-06-27 12:08:10 +000083
Daniel Veillard5d4644e2005-04-01 13:11:58 +000084#ifdef bottom_globals
85#undef __xmlGenericErrorContext
Daniel Veillarda2351322004-06-27 12:08:10 +000086extern __typeof (__xmlGenericErrorContext) __xmlGenericErrorContext __attribute((alias("__xmlGenericErrorContext__internal_alias")));
Daniel Veillard5d4644e2005-04-01 13:11:58 +000087#else
88#ifndef __xmlGenericErrorContext
89extern __typeof (__xmlGenericErrorContext) __xmlGenericErrorContext__internal_alias __attribute((visibility("hidden")));
Daniel Veillarda2351322004-06-27 12:08:10 +000090#define __xmlGenericErrorContext __xmlGenericErrorContext__internal_alias
Daniel Veillard5d4644e2005-04-01 13:11:58 +000091#endif
92#endif
Daniel Veillarda2351322004-06-27 12:08:10 +000093
94/* list generated from libxml2-api.xml */
Daniel Veillarda2351322004-06-27 12:08:10 +000095</xsl:text>
96 <xsl:apply-templates select="/api/symbols/function"/>
Daniel Veillard5d4644e2005-04-01 13:11:58 +000097 <xsl:text>
98#endif
99#endif
100#endif
101#endif
102#endif
103
104</xsl:text>
Daniel Veillarda2351322004-06-27 12:08:10 +0000105 </xsl:template>
106
107 <xsl:template match="function">
108 <xsl:variable name="str" select="string(@name)"/>
Daniel Veillard68b6e022008-03-31 09:26:00 +0000109 <xsl:if test="(starts-with(@name, 'xml') or starts-with(@name, 'html') or contains(@name, 'Push') or contains(@name, 'Pop')) and (not(contains(@name, 'xmlDllMain')))">
Daniel Veillarda2351322004-06-27 12:08:10 +0000110 <xsl:variable name="alias" select="concat($str, '__internal_alias')"/>
111 <xsl:apply-templates select="cond"/>
Daniel Veillard5d4644e2005-04-01 13:11:58 +0000112 <xsl:text>#ifdef bottom_</xsl:text>
113 <xsl:value-of select="string(@module)"/>
114 <xsl:text>
115#undef </xsl:text>
Daniel Veillarda2351322004-06-27 12:08:10 +0000116 <xsl:value-of select="$str"/>
Daniel Veillard5d4644e2005-04-01 13:11:58 +0000117 <xsl:text>
118extern __typeof (</xsl:text>
Daniel Veillarda2351322004-06-27 12:08:10 +0000119 <xsl:value-of select="$str"/>
120 <xsl:text>) </xsl:text>
121 <xsl:value-of select="$str"/>
122 <xsl:text> __attribute((alias("</xsl:text>
123 <xsl:value-of select="$alias"/>
124 <xsl:text>")));
Daniel Veillard5d4644e2005-04-01 13:11:58 +0000125#else
126#ifndef </xsl:text>
127 <xsl:value-of select="$str"/>
128 <xsl:text>
129</xsl:text>
130 <xsl:text>extern __typeof (</xsl:text>
131 <xsl:value-of select="$str"/>
132 <xsl:text>) </xsl:text>
133 <xsl:value-of select="$alias"/>
134 <xsl:text> __attribute((visibility("hidden")));
Daniel Veillarda2351322004-06-27 12:08:10 +0000135</xsl:text>
136 <xsl:text>#define </xsl:text>
137 <xsl:value-of select="$str"/>
138 <xsl:text> </xsl:text>
139 <xsl:value-of select="$alias"/>
140 <xsl:text>
Daniel Veillard5d4644e2005-04-01 13:11:58 +0000141#endif
142#endif
Daniel Veillarda2351322004-06-27 12:08:10 +0000143</xsl:text>
144 <xsl:apply-templates select="cond" mode="end"/>
145 <xsl:text>
146</xsl:text>
147 </xsl:if>
148 </xsl:template>
149 <xsl:template match="cond">
William M. Brack21e4ef22005-01-02 09:53:13 +0000150 <xsl:text>#if </xsl:text>
Daniel Veillarda2351322004-06-27 12:08:10 +0000151 <xsl:value-of select="."/>
152 <xsl:text>
153</xsl:text>
154 </xsl:template>
155 <xsl:template match="cond" mode="end">
156 <xsl:text>#endif
157</xsl:text>
158 </xsl:template>
159</xsl:stylesheet>
160