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"> |
Daniel Veillard | d2190fa | 2010-09-30 13:58:22 +0200 | [diff] [blame] | 5 | <xsl:output method="text" encoding="UTF-8"/> |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 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" |
Daniel Veillard | 5eee767 | 2005-08-22 21:22:27 +0000 | [diff] [blame] | 46 | #include "libxml/schematron.h" |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 47 | #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 Veillard | be076e9 | 2005-01-04 20:18:14 +0000 | [diff] [blame] | 70 | #include "libxml/xmlmodule.h" |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 71 | |
| 72 | /* special hot spot not exported ones */ |
| 73 | |
Daniel Veillard | 5d4644e | 2005-04-01 13:11:58 +0000 | [diff] [blame] | 74 | #ifdef bottom_globals |
| 75 | #undef __xmlGenericError |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 76 | extern __typeof (__xmlGenericError) __xmlGenericError __attribute((alias("__xmlGenericError__internal_alias"))); |
Daniel Veillard | 5d4644e | 2005-04-01 13:11:58 +0000 | [diff] [blame] | 77 | #else |
| 78 | #ifndef __xmlGenericError |
| 79 | extern __typeof (__xmlGenericError) __xmlGenericError__internal_alias __attribute((visibility("hidden"))); |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 80 | #define __xmlGenericError __xmlGenericError__internal_alias |
Daniel Veillard | 5d4644e | 2005-04-01 13:11:58 +0000 | [diff] [blame] | 81 | #endif |
| 82 | #endif |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 83 | |
Daniel Veillard | 5d4644e | 2005-04-01 13:11:58 +0000 | [diff] [blame] | 84 | #ifdef bottom_globals |
| 85 | #undef __xmlGenericErrorContext |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 86 | extern __typeof (__xmlGenericErrorContext) __xmlGenericErrorContext __attribute((alias("__xmlGenericErrorContext__internal_alias"))); |
Daniel Veillard | 5d4644e | 2005-04-01 13:11:58 +0000 | [diff] [blame] | 87 | #else |
| 88 | #ifndef __xmlGenericErrorContext |
| 89 | extern __typeof (__xmlGenericErrorContext) __xmlGenericErrorContext__internal_alias __attribute((visibility("hidden"))); |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 90 | #define __xmlGenericErrorContext __xmlGenericErrorContext__internal_alias |
Daniel Veillard | 5d4644e | 2005-04-01 13:11:58 +0000 | [diff] [blame] | 91 | #endif |
| 92 | #endif |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 93 | |
| 94 | /* list generated from libxml2-api.xml */ |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 95 | </xsl:text> |
| 96 | <xsl:apply-templates select="/api/symbols/function"/> |
Daniel Veillard | 5d4644e | 2005-04-01 13:11:58 +0000 | [diff] [blame] | 97 | <xsl:text> |
| 98 | #endif |
| 99 | #endif |
| 100 | #endif |
| 101 | #endif |
| 102 | #endif |
| 103 | |
| 104 | </xsl:text> |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 105 | </xsl:template> |
| 106 | |
| 107 | <xsl:template match="function"> |
| 108 | <xsl:variable name="str" select="string(@name)"/> |
Daniel Veillard | 68b6e02 | 2008-03-31 09:26:00 +0000 | [diff] [blame] | 109 | <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 Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 110 | <xsl:variable name="alias" select="concat($str, '__internal_alias')"/> |
| 111 | <xsl:apply-templates select="cond"/> |
Daniel Veillard | 5d4644e | 2005-04-01 13:11:58 +0000 | [diff] [blame] | 112 | <xsl:text>#ifdef bottom_</xsl:text> |
| 113 | <xsl:value-of select="string(@module)"/> |
| 114 | <xsl:text> |
| 115 | #undef </xsl:text> |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 116 | <xsl:value-of select="$str"/> |
Daniel Veillard | 5d4644e | 2005-04-01 13:11:58 +0000 | [diff] [blame] | 117 | <xsl:text> |
| 118 | extern __typeof (</xsl:text> |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 119 | <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 Veillard | 5d4644e | 2005-04-01 13:11:58 +0000 | [diff] [blame] | 125 | #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 Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 135 | </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 Veillard | 5d4644e | 2005-04-01 13:11:58 +0000 | [diff] [blame] | 141 | #endif |
| 142 | #endif |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 143 | </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. Brack | 21e4ef2 | 2005-01-02 09:53:13 +0000 | [diff] [blame] | 150 | <xsl:text>#if </xsl:text> |
Daniel Veillard | a235132 | 2004-06-27 12:08:10 +0000 | [diff] [blame] | 151 | <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 | |