Blame src/internal/treebnf_visibility_impl.h

02e59c
#ifndef TREEBNF_VISIBILITY_IMPL_H
02e59c
#define TREEBNF_VISIBILITY_IMPL_H
02e59c
02e59c
/**********************************************************************/
02e59c
/* PE targets: __dllexport suffices for the purpose of exporting only */
02e59c
/* the desired subset of global symbols; this makes the visibility    */
02e59c
/* attribute not only redundant, but also tricky if not properly      */
02e59c
/* supported by the toolchain.                                        */
02e59c
/*                                                                    */
39a772
/* When targeting Midipix hosts, where elf-like visibility is fully   */
39a772
/* supported and may be detected via the __PE_VISIBILITY__ macro,     */
39a772
/* we utilize the attribute to render private symbols invisibile      */
39a772
/* to dlsym(), as well as reduce the size of the .gotstrs section.    */
02e59c
/**********************************************************************/
02e59c
39a772
#if defined(__PE_VISIBILITY__)
39a772
#define tbnf_hidden _ATTR_VISIBILITY_HIDDEN
39a772
#elif defined(__PE__)
02e59c
#define tbnf_hidden
39a772
#elif defined(_ATTR_VISIBILITY_HIDDEN)
02e59c
#define tbnf_hidden _ATTR_VISIBILITY_HIDDEN
02e59c
#else
02e59c
#define tbnf_hidden
02e59c
#endif
02e59c
02e59c
#endif