Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 1 | <?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 <arjanv@redhat.com> 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 Veillard | 5d4644e | 2005-04-01 13:11:58 +0000 | [diff] [blame] | 18 | #ifdef IN_LIBXML |
| 19 | #ifdef __GNUC__ |
| 20 | #ifdef PIC |
| 21 | #ifdef linux |
| 22 | #if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (__GNUC__ > 3) |
| 23 | |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 24 | #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 Veillard | be076e9 | 2005-01-04 20:18:14 +0000 | [diff] [blame] | 69 | #include "libxml/xmlmodule.h" |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 70 | |
| 71 | /* special hot spot not exported ones */ |
| 72 | |
Daniel Veillard | 5d4644e | 2005-04-01 13:11:58 +0000 | [diff] [blame] | 73 | #ifdef bottom_globals |
| 74 | #undef __xmlGenericError |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 75 | extern __typeof (__xmlGenericError) __xmlGenericError __attribute((alias("__xmlGenericError__internal_alias"))); |
Daniel Veillard | 5d4644e | 2005-04-01 13:11:58 +0000 | [diff] [blame] | 76 | #else |
| 77 | #ifndef __xmlGenericError |
| 78 | extern __typeof (__xmlGenericError) __xmlGenericError__internal_alias __attribute((visibility("hidden"))); |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 79 | #define __xmlGenericError __xmlGenericError__internal_alias |
Daniel Veillard | 5d4644e | 2005-04-01 13:11:58 +0000 | [diff] [blame] | 80 | #endif |
| 81 | #endif |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 82 | |
Daniel Veillard | 5d4644e | 2005-04-01 13:11:58 +0000 | [diff] [blame] | 83 | #ifdef bottom_globals |
| 84 | #undef __xmlGenericErrorContext |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 85 | extern __typeof (__xmlGenericErrorContext) __xmlGenericErrorContext __attribute((alias("__xmlGenericErrorContext__internal_alias"))); |
Daniel Veillard | 5d4644e | 2005-04-01 13:11:58 +0000 | [diff] [blame] | 86 | #else |
| 87 | #ifndef __xmlGenericErrorContext |
| 88 | extern __typeof (__xmlGenericErrorContext) __xmlGenericErrorContext__internal_alias __attribute((visibility("hidden"))); |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 89 | #define __xmlGenericErrorContext __xmlGenericErrorContext__internal_alias |
Daniel Veillard | 5d4644e | 2005-04-01 13:11:58 +0000 | [diff] [blame] | 90 | #endif |
| 91 | #endif |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 92 | |
| 93 | /* list generated from libxml2-api.xml */ |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 94 | </xsl:text> |
| 95 | <xsl:apply-templates select="/api/symbols/function"/> |
Daniel Veillard | 5d4644e | 2005-04-01 13:11:58 +0000 | [diff] [blame] | 96 | <xsl:text> |
| 97 | #endif |
| 98 | #endif |
| 99 | #endif |
| 100 | #endif |
| 101 | #endif |
| 102 | |
| 103 | </xsl:text> |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 104 | </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 Veillard | 5d4644e | 2005-04-01 13:11:58 +0000 | [diff] [blame] | 111 | <xsl:text>#ifdef bottom_</xsl:text> |
| 112 | <xsl:value-of select="string(@module)"/> |
| 113 | <xsl:text> |
| 114 | #undef </xsl:text> |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 115 | <xsl:value-of select="$str"/> |
Daniel Veillard | 5d4644e | 2005-04-01 13:11:58 +0000 | [diff] [blame] | 116 | <xsl:text> |
| 117 | extern __typeof (</xsl:text> |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 118 | <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 Veillard | 5d4644e | 2005-04-01 13:11:58 +0000 | [diff] [blame] | 124 | #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 Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 134 | </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 Veillard | 5d4644e | 2005-04-01 13:11:58 +0000 | [diff] [blame] | 140 | #endif |
| 141 | #endif |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 142 | </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. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 149 | <xsl:text>#if </xsl:text> |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 150 | <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 | |