]> Kevux Git Server - fll/commitdiff
Feature: enable support default, protected, and hidden GCC visibility macros
authorKevin Day <thekevinday@gmail.com>
Sat, 25 Apr 2020 19:04:41 +0000 (14:04 -0500)
committerKevin Day <thekevinday@gmail.com>
Sat, 25 Apr 2020 19:04:41 +0000 (14:04 -0500)
level_0/f_type/c/type.h

index fc849bc147971320da83abfa4eac39fa3e159a19..2cbf88c71afefa9fa69bea9df9ceab2ff788ac00 100644 (file)
@@ -196,11 +196,12 @@ extern "C" {
  * Use these macros for GCC-specific tweaks so that if GCC is not supported then they can be easily disabled.
  *
  * f_gcc_attribute_visibility_internal provides a way to make some functions effectively private.
- *
- * @todo there is probably some sort of macro that GCC likely defines that can be utilized here to automatically enable/disable this.
  */
 #ifndef _di_f_gcc_specific_
-  #define f_gcc_attribute_visibility_internal __attribute__((visibility("internal")))
+  #define f_gcc_attribute_visibility_default   __attribute__((visibility("default")))
+  #define f_gcc_attribute_visibility_hidden    __attribute__((visibility("hidden")))
+  #define f_gcc_attribute_visibility_internal  __attribute__((visibility("internal")))
+  #define f_gcc_attribute_visibility_protected __attribute__((visibility("protected")))
 #endif // _di_f_gcc_specific_
 
 #ifdef __cplusplus