parser/expat/expat_config.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #ifndef __expat_config_h__
     7 #define __expat_config_h__
     9 #define MOZ_UNICODE
    10 #include "nspr.h"
    12 #ifdef IS_LITTLE_ENDIAN
    13 #define BYTEORDER 1234
    14 #else 
    15 #define BYTEORDER 4321
    16 #endif /* IS_LITTLE_ENDIAN */
    18 #if PR_BYTES_PER_INT != 4
    19 #define int int32_t
    20 #endif /* PR_BYTES_PER_INT != 4 */
    22 /* Other Mozilla code relies on memmove already, so we assume it's available */
    23 #define HAVE_MEMMOVE 1
    25 #define XMLCALL
    26 #define XML_STATIC
    27 #define XMLIMPORT
    29 #define XML_UNICODE
    30 typedef char XML_LChar;
    31 /*
    32  * The char16_t type is only usable in C++ code, so we need this ugly hack to
    33  * select a binary compatible C type for the expat C code to use.
    34  */
    35 #ifdef __cplusplus
    36 typedef char16_t XML_Char;
    37 #define XML_T(x) (char16_t)x
    38 #else
    39 #include <stdint.h>
    40 typedef uint16_t XML_Char;
    41 #define XML_T(x) (uint16_t)x
    42 #endif
    44 #define XML_DTD
    45 #define XML_NS
    47 /* avoid conflicts with system version of libexpat */
    49 /* expat.h */
    50 #define XML_SetElementDeclHandler MOZ_XML_SetElementDeclHandler
    51 #define XML_SetAttlistDeclHandler MOZ_XML_SetAttlistDeclHandler
    52 #define XML_SetXmlDeclHandler MOZ_XML_SetXmlDeclHandler
    53 #define XML_ParserCreate MOZ_XML_ParserCreate
    54 #define XML_ParserCreateNS MOZ_XML_ParserCreateNS
    55 #define XML_ParserCreate_MM MOZ_XML_ParserCreate_MM
    56 #define XML_ParserReset MOZ_XML_ParserReset
    57 #define XML_SetEntityDeclHandler MOZ_XML_SetEntityDeclHandler
    58 #define XML_SetElementHandler MOZ_XML_SetElementHandler
    59 #define XML_SetStartElementHandler MOZ_XML_SetStartElementHandler
    60 #define XML_SetEndElementHandler MOZ_XML_SetEndElementHandler
    61 #define XML_SetCharacterDataHandler MOZ_XML_SetCharacterDataHandler
    62 #ifndef __VMS
    63 #define XML_SetProcessingInstructionHandler MOZ_XML_SetProcessingInstructionHandler
    64 #else
    65 #define XML_SetProcessingInstrHandler MOZ_XML_SetProcessingInstrHandler
    66 #endif
    67 #define XML_SetCommentHandler MOZ_XML_SetCommentHandler
    68 #define XML_SetCdataSectionHandler MOZ_XML_SetCdataSectionHandler
    69 #define XML_SetStartCdataSectionHandler MOZ_XML_SetStartCdataSectionHandler
    70 #define XML_SetEndCdataSectionHandler MOZ_XML_SetEndCdataSectionHandler
    71 #define XML_SetDefaultHandler MOZ_XML_SetDefaultHandler
    72 #define XML_SetDefaultHandlerExpand MOZ_XML_SetDefaultHandlerExpand
    73 #define XML_SetDoctypeDeclHandler MOZ_XML_SetDoctypeDeclHandler
    74 #define XML_SetStartDoctypeDeclHandler MOZ_XML_SetStartDoctypeDeclHandler
    75 #define XML_SetEndDoctypeDeclHandler MOZ_XML_SetEndDoctypeDeclHandler
    76 #ifndef __VMS
    77 #define XML_SetUnparsedEntityDeclHandler MOZ_XML_SetUnparsedEntityDeclHandler
    78 #else
    79 #define XML_SetUnparsedEntDeclHandler MOZ_XML_SetUnparsedEntDeclHandler
    80 #endif
    81 #define XML_SetNotationDeclHandler MOZ_XML_SetNotationDeclHandler
    82 #define XML_SetNamespaceDeclHandler MOZ_XML_SetNamespaceDeclHandler
    83 #ifndef __VMS
    84 #define XML_SetStartNamespaceDeclHandler MOZ_XML_SetStartNamespaceDeclHandler
    85 #else
    86 #define XML_SetStartNamespcDeclHandler MOZ_XML_SetStartNamespcDeclHandler
    87 #endif
    88 #define XML_SetEndNamespaceDeclHandler MOZ_XML_SetEndNamespaceDeclHandler
    89 #define XML_SetNotStandaloneHandler MOZ_XML_SetNotStandaloneHandler
    90 #define XML_SetExternalEntityRefHandler MOZ_XML_SetExternalEntityRefHandler
    91 #ifndef __VMS
    92 #define XML_SetExternalEntityRefHandlerArg MOZ_XML_SetExternalEntityRefHandlerArg
    93 #else
    94 #define XML_SetExternalEntRefHandlerArg MOZ_XML_SetExternalEntRefHandlerArg
    95 #endif
    96 #define XML_SetSkippedEntityHandler MOZ_XML_SetSkippedEntityHandler
    97 #define XML_SetUnknownEncodingHandler MOZ_XML_SetUnknownEncodingHandler
    98 #define XML_DefaultCurrent MOZ_XML_DefaultCurrent
    99 #define XML_SetReturnNSTriplet MOZ_XML_SetReturnNSTriplet
   100 #define XML_SetUserData MOZ_XML_SetUserData
   101 #define XML_SetEncoding MOZ_XML_SetEncoding
   102 #define XML_UseParserAsHandlerArg MOZ_XML_UseParserAsHandlerArg
   103 #define XML_UseForeignDTD MOZ_XML_UseForeignDTD
   104 #define XML_SetBase MOZ_XML_SetBase
   105 #define XML_GetBase MOZ_XML_GetBase
   106 #define XML_GetSpecifiedAttributeCount MOZ_XML_GetSpecifiedAttributeCount
   107 #define XML_GetIdAttributeIndex MOZ_XML_GetIdAttributeIndex
   108 #define XML_Parse MOZ_XML_Parse
   109 #define XML_GetBuffer MOZ_XML_GetBuffer
   110 #define XML_ParseBuffer MOZ_XML_ParseBuffer
   111 #define XML_StopParser MOZ_XML_StopParser
   112 #define XML_ResumeParser MOZ_XML_ResumeParser
   113 #define XML_GetParsingStatus MOZ_XML_GetParsingStatus
   114 #define XML_ExternalEntityParserCreate MOZ_XML_ExternalEntityParserCreate
   115 #define XML_SetParamEntityParsing MOZ_XML_SetParamEntityParsing
   116 #define XML_GetErrorCode MOZ_XML_GetErrorCode
   117 #define XML_GetCurrentLineNumber MOZ_XML_GetCurrentLineNumber
   118 #define XML_GetCurrentColumnNumber MOZ_XML_GetCurrentColumnNumber
   119 #define XML_GetCurrentByteIndex MOZ_XML_GetCurrentByteIndex
   120 #define XML_GetCurrentByteCount MOZ_XML_GetCurrentByteCount
   121 #define XML_GetInputContext MOZ_XML_GetInputContext
   122 #define XML_FreeContentModel MOZ_XML_FreeContentModel
   123 #define XML_MemMalloc MOZ_XML_MemMalloc
   124 #define XML_MemRealloc MOZ_XML_MemRealloc
   125 #define XML_MemFree MOZ_XML_MemFree
   126 #define XML_ParserFree MOZ_XML_ParserFree
   127 #define XML_ErrorString MOZ_XML_ErrorString
   128 #define XML_ExpatVersion MOZ_XML_ExpatVersion
   129 #define XML_ExpatVersionInfo MOZ_XML_ExpatVersionInfo
   130 #define XML_GetFeatureList MOZ_XML_GetFeatureList
   132 /* xmlrole.h */
   133 #define XmlPrologStateInit MOZ_XmlPrologStateInit
   134 #ifndef __VMS
   135 #define XmlPrologStateInitExternalEntity MOZ_XmlPrologStateInitExternalEntity
   136 #else
   137 #define XmlPrologStateInitExternalEnt MOZ_XmlPrologStateInitExternalEnt
   138 #endif
   140 /* xmltok.h */
   141 #define XmlParseXmlDecl MOZ_XmlParseXmlDecl
   142 #define XmlParseXmlDeclNS MOZ_XmlParseXmlDeclNS
   143 #define XmlInitEncoding MOZ_XmlInitEncoding
   144 #define XmlInitEncodingNS MOZ_XmlInitEncodingNS
   145 #define XmlGetUtf8InternalEncoding MOZ_XmlGetUtf8InternalEncoding
   146 #define XmlGetUtf16InternalEncoding MOZ_XmlGetUtf16InternalEncoding
   147 #define XmlGetUtf8InternalEncodingNS MOZ_XmlGetUtf8InternalEncodingNS
   148 #define XmlGetUtf16InternalEncodingNS MOZ_XmlGetUtf16InternalEncodingNS
   149 #define XmlUtf8Encode MOZ_XmlUtf8Encode
   150 #define XmlUtf16Encode MOZ_XmlUtf16Encode
   151 #define XmlSizeOfUnknownEncoding MOZ_XmlSizeOfUnknownEncoding
   152 #define XmlInitUnknownEncoding MOZ_XmlInitUnknownEncoding
   153 #define XmlInitUnknownEncodingNS MOZ_XmlInitUnknownEncodingNS
   155 #endif /* __expat_config_h__ */

mercurial