lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master d5d71f8 08/10: Refactor for simplicity


From: Greg Chicares
Subject: [lmi-commits] [lmi] master d5d71f8 08/10: Refactor for simplicity
Date: Sat, 11 Mar 2017 17:24:21 -0500 (EST)

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

    Refactor for simplicity
---
 so_attributes.hpp | 34 ++++++++++++++++------------------
 1 file changed, 16 insertions(+), 18 deletions(-)

diff --git a/so_attributes.hpp b/so_attributes.hpp
index 59630d7..37d4585 100644
--- a/so_attributes.hpp
+++ b/so_attributes.hpp
@@ -73,30 +73,28 @@
 
 #if defined LMI_USE_SO_ATTRIBUTES
 #
-#   if defined LMI_BUILD_SO && defined LMI_USE_SO
-#       error Both LMI_BUILD_SO and LMI_USE_SO defined.
-#   endif // defined LMI_BUILD_SO && defined LMI_USE_SO
-#
 #   if defined LMI_MSW
-#       if defined LMI_BUILD_SO
-#           define LMI_SO __declspec(dllexport)
-#       elif defined LMI_USE_SO
-#           define LMI_SO __declspec(dllimport)
-#       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
+#       define LMI_EXPORT __declspec(dllexport)
+#       define LMI_IMPORT __declspec(dllimport)
 #   elif defined __GNUC__
-#       if defined LMI_BUILD_SO
-#           define LMI_SO __attribute__((visibility("default")))
-#       elif defined LMI_USE_SO
-#           define LMI_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
+#       define LMI_EXPORT __attribute__((visibility("default")))
+#       define LMI_IMPORT
 #   else  // !defined LMI_MSW && !defined __GNUC__
 #       error Unknown platform. Consider contributing support.
 #   endif // !defined LMI_MSW && !defined __GNUC__
 #
+#   if defined LMI_BUILD_SO && defined LMI_USE_SO
+#       error Both LMI_BUILD_SO and LMI_USE_SO defined.
+#   endif // defined LMI_BUILD_SO && defined LMI_USE_SO
+#
+#   if defined LMI_BUILD_SO
+#       define LMI_SO LMI_EXPORT
+#   elif defined LMI_USE_SO
+#       define LMI_SO LMI_IMPORT
+#   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_USE_SO_ATTRIBUTES
 #   define LMI_SO
 #endif // !defined LMI_USE_SO_ATTRIBUTES



reply via email to

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