lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master b1c6af9 07/10: Use similar logic for ELF and


From: Greg Chicares
Subject: [lmi-commits] [lmi] master b1c6af9 07/10: Use similar logic for ELF and PE-COFF
Date: Sat, 11 Mar 2017 17:24:21 -0500 (EST)

branch: master
commit b1c6af966bf333143d19d0865e0a5d1dceef39ef
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Use similar logic for ELF and PE-COFF
    
    Even though the macros selected are quite different, selecting them
    with similar logic makes the series of conditionals easier to refactor
    along the lines suggested by the original author of the gcc visibility
    patch here:
      http://www.nedprod.com/programs/gccvisibility.html#quickstart
---
 so_attributes.hpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/so_attributes.hpp b/so_attributes.hpp
index accb13f..59630d7 100644
--- a/so_attributes.hpp
+++ b/so_attributes.hpp
@@ -88,9 +88,11 @@
 #   elif defined __GNUC__
 #       if defined LMI_BUILD_SO
 #           define LMI_SO __attribute__((visibility("default")))
-#       else  // !defined LMI_BUILD_SO
+#       elif defined LMI_USE_SO
 #           define LMI_SO
-#       endif // !defined LMI_BUILD_SO
+#       else  // !defined LMI_BUILD_SO && !defined LMI_USE_SO
+#           error Neither LMI_BUILD_SO nor LMI_USE_SO defined.
+#       endif // !defined LMI_BUILD_SO && !defined LMI_USE_SO
 #   else  // !defined LMI_MSW && !defined __GNUC__
 #       error Unknown platform. Consider contributing support.
 #   endif // !defined LMI_MSW && !defined __GNUC__



reply via email to

[Prev in Thread] Current Thread [Next in Thread]