]> git.notmuchmail.org Git - apitrace/blobdiff - os.hpp
Set FunctionSig's id.
[apitrace] / os.hpp
diff --git a/os.hpp b/os.hpp
index eaf571db0926f0097c5ccbae6f22c450b8be5bb5..0716784ec939e0ef29ba7563b54a9f7166ef9d2c 100644 (file)
--- a/os.hpp
+++ b/os.hpp
@@ -61,6 +61,24 @@ bool GetCurrentDir(char *str, size_t size);
 
 void DebugMessage(const char *format, ...);
 
+#if defined _WIN32 || defined __CYGWIN__
+  /* We always use .def files on windows for now */
+  #if 0
+  #define PUBLIC __declspec(dllexport)
+  #else
+  #define PUBLIC
+  #endif
+  #define PRIVATE
+#else
+  #if __GNUC__ >= 4
+    #define PUBLIC __attribute__ ((visibility("default")))
+    #define PRIVATE __attribute__ ((visibility("hidden")))
+  #else
+    #define PUBLIC
+    #define PRIVATE
+  #endif
+#endif
+
 /**
  * Get the current time in microseconds from an unknown base.
  */