aboutsummaryrefslogtreecommitdiff
path: root/libxml2-2.9.10/doc/elfgcchack.xsl
blob: 8dd5c6a7971e422a99bad9df7a231c7a0f36044d (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:xhtml="http://www.w3.org/1999/xhtml"
                version="1.0">
  <xsl:output method="text" encoding="UTF-8"/>

  <xsl:template match="/">
    <xsl:text>/*
 * elfgcchack.h: hack by Arjan van de Ven &lt;arjanv@redhat.com&gt; to speed
 *               up the code when using gcc for call within the library.
 *
 * Based on the analysis http://people.redhat.com/drepper/dsohowto.pdf
 * from Ulrich drepper. Rewritten to be generated from the XML description
 * file for libxml2 API
 * autogenerated with xsltproc doc/elfgcchack.xsl doc/libxml2-api.xml
 */

#ifdef IN_LIBXML
#ifdef __GNUC__
#ifdef PIC
#ifdef __linux__
#if (__GNUC__ == 3 &amp;&amp; __GNUC_MINOR__ >= 3) || (__GNUC__ > 3)

#include "libxml/c14n.h"
#include "libxml/catalog.h"
#include "libxml/chvalid.h"
#include "libxml/debugXML.h"
#include "libxml/dict.h"
#include "libxml/DOCBparser.h"
#include "libxml/encoding.h"
#include "libxml/entities.h"
#include "libxml/globals.h"
#include "libxml/hash.h"
#include "libxml/HTMLparser.h"
#include "libxml/HTMLtree.h"
#include "libxml/list.h"
#include "libxml/nanoftp.h"
#include "libxml/nanohttp.h"
#include "libxml/parser.h"
#include "libxml/parserInternals.h"
#include "libxml/pattern.h"
#include "libxml/relaxng.h"
#include "libxml/SAX2.h"
#include "libxml/SAX.h"
#include "libxml/schemasInternals.h"
#include "libxml/schematron.h"
#include "libxml/threads.h"
#include "libxml/tree.h"
#include "libxml/uri.h"
#include "libxml/valid.h"
#include "libxml/xinclude.h"
#include "libxml/xlink.h"
#include "libxml/xmlautomata.h"
#include "libxml/xmlerror.h"
#include "libxml/xmlexports.h"
#include "libxml/xmlIO.h"
#include "libxml/xmlmemory.h"
#include "libxml/xmlreader.h"
#include "libxml/xmlregexp.h"
#include "libxml/xmlsave.h"
#include "libxml/xmlschemas.h"
#include "libxml/xmlschemastypes.h"
#include "libxml/xmlstring.h"
#include "libxml/xmlunicode.h"
#include "libxml/xmlversion.h"
#include "libxml/xmlwriter.h"
#include "libxml/xpath.h"
#include "libxml/xpathInternals.h"
#include "libxml/xpointer.h"
#include "libxml/xmlmodule.h"

/* special hot spot not exported ones */

#ifdef bottom_globals
#undef __xmlGenericError
extern __typeof (__xmlGenericError) __xmlGenericError __attribute((alias("__xmlGenericError__internal_alias")));
#else
#ifndef __xmlGenericError
extern __typeof (__xmlGenericError) __xmlGenericError__internal_alias __attribute((visibility("hidden")));
#define __xmlGenericError __xmlGenericError__internal_alias
#endif
#endif

#ifdef bottom_globals
#undef __xmlGenericErrorContext
extern __typeof (__xmlGenericErrorContext) __xmlGenericErrorContext __attribute((alias("__xmlGenericErrorContext__internal_alias")));
#else
#ifndef __xmlGenericErrorContext
extern __typeof (__xmlGenericErrorContext) __xmlGenericErrorContext__internal_alias __attribute((visibility("hidden")));
#define __xmlGenericErrorContext __xmlGenericErrorContext__internal_alias
#endif
#endif

/* list generated from libxml2-api.xml */
</xsl:text>
    <xsl:apply-templates select="/api/symbols/function"/>
    <xsl:text>
#endif
#endif
#endif
#endif
#endif

</xsl:text>
  </xsl:template>

  <xsl:template match="function">
    <xsl:variable name="str" select="string(@name)"/>
    <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')))">
      <xsl:variable name="alias" select="concat($str, '__internal_alias')"/>
      <xsl:apply-templates select="cond"/>
      <xsl:text>#ifdef bottom_</xsl:text>
      <xsl:value-of select="string(@module)"/>
      <xsl:text>
#undef </xsl:text>
      <xsl:value-of select="$str"/>
      <xsl:text>
extern __typeof (</xsl:text>
      <xsl:value-of select="$str"/>
      <xsl:text>) </xsl:text>
      <xsl:value-of select="$str"/>
      <xsl:text> __attribute((alias("</xsl:text>
      <xsl:value-of select="$alias"/>
      <xsl:text>")));
#else
#ifndef </xsl:text>
      <xsl:value-of select="$str"/>
      <xsl:text>
</xsl:text>
      <xsl:text>extern __typeof (</xsl:text>
      <xsl:value-of select="$str"/>
      <xsl:text>) </xsl:text>
      <xsl:value-of select="$alias"/>
      <xsl:text> __attribute((visibility("hidden")));
</xsl:text>
      <xsl:text>#define </xsl:text>
      <xsl:value-of select="$str"/>
      <xsl:text> </xsl:text>
      <xsl:value-of select="$alias"/>
      <xsl:text>
#endif
#endif
</xsl:text>
      <xsl:apply-templates select="cond" mode="end"/>
      <xsl:text>
</xsl:text>
    </xsl:if>
  </xsl:template>
  <xsl:template match="cond">
    <xsl:text>#if </xsl:text>
    <xsl:value-of select="."/>
    <xsl:text>
</xsl:text>
  </xsl:template>
  <xsl:template match="cond" mode="end">
    <xsl:text>#endif
</xsl:text>
  </xsl:template>
</xsl:stylesheet>