-
-
Notifications
You must be signed in to change notification settings - Fork 662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: Update mangled third-party libraries to use MANGLE_PREFIX CMake variable #4102
Merged
thewtex
merged 1 commit into
InsightSoftwareConsortium:master
from
jcfr:update-thirdparty-libraries-to-use-MANGLE_PREFIX
Jul 12, 2023
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
122 changes: 122 additions & 0 deletions
122
Modules/ThirdParty/Expat/src/expat/itk_expat_mangle.h.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
/*========================================================================= | ||
* | ||
* Copyright NumFOCUS | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0.txt | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*=========================================================================*/ | ||
#ifndef itk_expat_mangle_h | ||
#define itk_expat_mangle_h | ||
|
||
/* | ||
|
||
This header file mangles all symbols exported from the expat library. | ||
It is included in all files while building the expat library. Due to | ||
namespace pollution, no expat headers should be included in .h files in | ||
ITK. | ||
|
||
The following command was used to obtain the symbol list: | ||
|
||
nm libITKEXPAT-5.3.a | grep " [TRD] " | awk '{ print $3 }' | sort -df | awk '{ print "#define "$1" @MANGLE_PREFIX@_ "$1 }' | ||
|
||
*/ | ||
|
||
#define _INTERNAL_trim_to_complete_utf8_characters @MANGLE_PREFIX@__INTERNAL_trim_to_complete_utf8_characters | ||
#define testingAccountingGetCountBytesDirect @MANGLE_PREFIX@_testingAccountingGetCountBytesDirect | ||
#define testingAccountingGetCountBytesIndirect @MANGLE_PREFIX@_testingAccountingGetCountBytesIndirect | ||
#define unsignedCharToPrintable @MANGLE_PREFIX@_unsignedCharToPrintable | ||
#define XML_DefaultCurrent @MANGLE_PREFIX@_XML_DefaultCurrent | ||
#define XML_ErrorString @MANGLE_PREFIX@_XML_ErrorString | ||
#define XML_ExpatVersion @MANGLE_PREFIX@_XML_ExpatVersion | ||
#define XML_ExpatVersionInfo @MANGLE_PREFIX@_XML_ExpatVersionInfo | ||
#define XML_ExternalEntityParserCreate @MANGLE_PREFIX@_XML_ExternalEntityParserCreate | ||
#define XML_FreeContentModel @MANGLE_PREFIX@_XML_FreeContentModel | ||
#define XML_GetBase @MANGLE_PREFIX@_XML_GetBase | ||
#define XML_GetBuffer @MANGLE_PREFIX@_XML_GetBuffer | ||
#define XML_GetCurrentByteCount @MANGLE_PREFIX@_XML_GetCurrentByteCount | ||
#define XML_GetCurrentByteIndex @MANGLE_PREFIX@_XML_GetCurrentByteIndex | ||
#define XML_GetCurrentColumnNumber @MANGLE_PREFIX@_XML_GetCurrentColumnNumber | ||
#define XML_GetCurrentLineNumber @MANGLE_PREFIX@_XML_GetCurrentLineNumber | ||
#define XML_GetErrorCode @MANGLE_PREFIX@_XML_GetErrorCode | ||
#define XML_GetFeatureList @MANGLE_PREFIX@_XML_GetFeatureList | ||
#define XML_GetIdAttributeIndex @MANGLE_PREFIX@_XML_GetIdAttributeIndex | ||
#define XML_GetInputContext @MANGLE_PREFIX@_XML_GetInputContext | ||
#define XML_GetParsingStatus @MANGLE_PREFIX@_XML_GetParsingStatus | ||
#define XML_GetSpecifiedAttributeCount @MANGLE_PREFIX@_XML_GetSpecifiedAttributeCount | ||
#define XmlGetUtf16InternalEncoding @MANGLE_PREFIX@_XmlGetUtf16InternalEncoding | ||
#define XmlGetUtf16InternalEncodingNS @MANGLE_PREFIX@_XmlGetUtf16InternalEncodingNS | ||
#define XmlGetUtf8InternalEncoding @MANGLE_PREFIX@_XmlGetUtf8InternalEncoding | ||
#define XmlGetUtf8InternalEncodingNS @MANGLE_PREFIX@_XmlGetUtf8InternalEncodingNS | ||
#define XmlInitEncoding @MANGLE_PREFIX@_XmlInitEncoding | ||
#define XmlInitEncodingNS @MANGLE_PREFIX@_XmlInitEncodingNS | ||
#define XmlInitUnknownEncoding @MANGLE_PREFIX@_XmlInitUnknownEncoding | ||
#define XmlInitUnknownEncodingNS @MANGLE_PREFIX@_XmlInitUnknownEncodingNS | ||
#define XML_MemFree @MANGLE_PREFIX@_XML_MemFree | ||
#define XML_MemMalloc @MANGLE_PREFIX@_XML_MemMalloc | ||
#define XML_MemRealloc @MANGLE_PREFIX@_XML_MemRealloc | ||
#define XML_Parse @MANGLE_PREFIX@_XML_Parse | ||
#define XML_ParseBuffer @MANGLE_PREFIX@_XML_ParseBuffer | ||
#define XML_ParserCreate @MANGLE_PREFIX@_XML_ParserCreate | ||
#define XML_ParserCreate_MM @MANGLE_PREFIX@_XML_ParserCreate_MM | ||
#define XML_ParserCreateNS @MANGLE_PREFIX@_XML_ParserCreateNS | ||
#define XML_ParserFree @MANGLE_PREFIX@_XML_ParserFree | ||
#define XML_ParserReset @MANGLE_PREFIX@_XML_ParserReset | ||
#define XmlParseXmlDecl @MANGLE_PREFIX@_XmlParseXmlDecl | ||
#define XmlParseXmlDeclNS @MANGLE_PREFIX@_XmlParseXmlDeclNS | ||
#define XmlPrologStateInit @MANGLE_PREFIX@_XmlPrologStateInit | ||
#define XmlPrologStateInitExternalEntity @MANGLE_PREFIX@_XmlPrologStateInitExternalEntity | ||
#define XML_ResumeParser @MANGLE_PREFIX@_XML_ResumeParser | ||
#define XML_SetAttlistDeclHandler @MANGLE_PREFIX@_XML_SetAttlistDeclHandler | ||
#define XML_SetBase @MANGLE_PREFIX@_XML_SetBase | ||
#define XML_SetBillionLaughsAttackProtectionActivationThreshold @MANGLE_PREFIX@_XML_SetBillionLaughsAttackProtectionActivationThreshold | ||
#define XML_SetBillionLaughsAttackProtectionMaximumAmplification @MANGLE_PREFIX@_XML_SetBillionLaughsAttackProtectionMaximumAmplification | ||
#define XML_SetCdataSectionHandler @MANGLE_PREFIX@_XML_SetCdataSectionHandler | ||
#define XML_SetCharacterDataHandler @MANGLE_PREFIX@_XML_SetCharacterDataHandler | ||
#define XML_SetCommentHandler @MANGLE_PREFIX@_XML_SetCommentHandler | ||
#define XML_SetDefaultHandler @MANGLE_PREFIX@_XML_SetDefaultHandler | ||
#define XML_SetDefaultHandlerExpand @MANGLE_PREFIX@_XML_SetDefaultHandlerExpand | ||
#define XML_SetDoctypeDeclHandler @MANGLE_PREFIX@_XML_SetDoctypeDeclHandler | ||
#define XML_SetElementDeclHandler @MANGLE_PREFIX@_XML_SetElementDeclHandler | ||
#define XML_SetElementHandler @MANGLE_PREFIX@_XML_SetElementHandler | ||
#define XML_SetEncoding @MANGLE_PREFIX@_XML_SetEncoding | ||
#define XML_SetEndCdataSectionHandler @MANGLE_PREFIX@_XML_SetEndCdataSectionHandler | ||
#define XML_SetEndDoctypeDeclHandler @MANGLE_PREFIX@_XML_SetEndDoctypeDeclHandler | ||
#define XML_SetEndElementHandler @MANGLE_PREFIX@_XML_SetEndElementHandler | ||
#define XML_SetEndNamespaceDeclHandler @MANGLE_PREFIX@_XML_SetEndNamespaceDeclHandler | ||
#define XML_SetEntityDeclHandler @MANGLE_PREFIX@_XML_SetEntityDeclHandler | ||
#define XML_SetExternalEntityRefHandler @MANGLE_PREFIX@_XML_SetExternalEntityRefHandler | ||
#define XML_SetExternalEntityRefHandlerArg @MANGLE_PREFIX@_XML_SetExternalEntityRefHandlerArg | ||
#define XML_SetHashSalt @MANGLE_PREFIX@_XML_SetHashSalt | ||
#define XML_SetNamespaceDeclHandler @MANGLE_PREFIX@_XML_SetNamespaceDeclHandler | ||
#define XML_SetNotationDeclHandler @MANGLE_PREFIX@_XML_SetNotationDeclHandler | ||
#define XML_SetNotStandaloneHandler @MANGLE_PREFIX@_XML_SetNotStandaloneHandler | ||
#define XML_SetParamEntityParsing @MANGLE_PREFIX@_XML_SetParamEntityParsing | ||
#define XML_SetProcessingInstructionHandler @MANGLE_PREFIX@_XML_SetProcessingInstructionHandler | ||
#define XML_SetReturnNSTriplet @MANGLE_PREFIX@_XML_SetReturnNSTriplet | ||
#define XML_SetSkippedEntityHandler @MANGLE_PREFIX@_XML_SetSkippedEntityHandler | ||
#define XML_SetStartCdataSectionHandler @MANGLE_PREFIX@_XML_SetStartCdataSectionHandler | ||
#define XML_SetStartDoctypeDeclHandler @MANGLE_PREFIX@_XML_SetStartDoctypeDeclHandler | ||
#define XML_SetStartElementHandler @MANGLE_PREFIX@_XML_SetStartElementHandler | ||
#define XML_SetStartNamespaceDeclHandler @MANGLE_PREFIX@_XML_SetStartNamespaceDeclHandler | ||
#define XML_SetUnknownEncodingHandler @MANGLE_PREFIX@_XML_SetUnknownEncodingHandler | ||
#define XML_SetUnparsedEntityDeclHandler @MANGLE_PREFIX@_XML_SetUnparsedEntityDeclHandler | ||
#define XML_SetUserData @MANGLE_PREFIX@_XML_SetUserData | ||
#define XML_SetXmlDeclHandler @MANGLE_PREFIX@_XML_SetXmlDeclHandler | ||
#define XmlSizeOfUnknownEncoding @MANGLE_PREFIX@_XmlSizeOfUnknownEncoding | ||
#define XML_StopParser @MANGLE_PREFIX@_XML_StopParser | ||
#define XML_UseForeignDTD @MANGLE_PREFIX@_XML_UseForeignDTD | ||
#define XML_UseParserAsHandlerArg @MANGLE_PREFIX@_XML_UseParserAsHandlerArg | ||
#define XmlUtf16Encode @MANGLE_PREFIX@_XmlUtf16Encode | ||
#define XmlUtf8Encode @MANGLE_PREFIX@_XmlUtf8Encode | ||
|
||
#endif /* itk_expat_mangle_h */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this respect cache? If the calling code has
set(MANGLE_PREFIX slicer_expat)
, will this line not override that?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are local variables not intended to allow customization.
Customization of mangling will be done in a follow-up pull request introducing code like:
or
based on the third-party library mangling requirements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Purpose of these changes it to introduce a uniform mangling interface for all third-parties.