diff options
author | midipix <writeonce@midipix.org> | 2024-05-25 15:39:09 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-05-25 17:46:48 +0000 |
commit | 538329318964e4bfb420b6787f0f30c39ec3394c (patch) | |
tree | 72e5b015482bba2a48b84518039f327a15872834 /src/internal/tpax_visibility_impl.h | |
parent | 1e49c7f2662513c72ddb63215519417b169ad75d (diff) | |
download | tpax-538329318964e4bfb420b6787f0f30c39ec3394c.tar.bz2 tpax-538329318964e4bfb420b6787f0f30c39ec3394c.tar.xz |
code base: set the visilbity of internal library interfaces to hidden.
Diffstat (limited to 'src/internal/tpax_visibility_impl.h')
-rw-r--r-- | src/internal/tpax_visibility_impl.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/internal/tpax_visibility_impl.h b/src/internal/tpax_visibility_impl.h new file mode 100644 index 0000000..6812494 --- /dev/null +++ b/src/internal/tpax_visibility_impl.h @@ -0,0 +1,26 @@ +#ifndef TPAX_VISIBILITY_IMPL_H +#define TPAX_VISIBILITY_IMPL_H + +/**********************************************************************/ +/* PE targets: __dllexport suffices for the purpose of exporting only */ +/* the desired subset of global symbols; this makes the visibility */ +/* attribute not only redundant, but also tricky if not properly */ +/* supported by the toolchain. */ +/* */ +/* When targeting Midipix, __PE__, __dllexport and __dllimport are */ +/* always defined by the toolchain. Otherwise, the absnece of these */ +/* macros has been detected by sofort's ccenv.sh during ./configure, */ +/* and they have accordingly been added to CFLAGS_OS. */ +/**********************************************************************/ + +#ifdef __PE__ +#define tpax_hidden +#else +#ifdef _ATTR_VISIBILITY_HIDDEN +#define tpax_hidden _ATTR_VISIBILITY_HIDDEN +#else +#define tpax_hidden +#endif +#endif + +#endif |