Ver Fonte

Use the visibility attribute for newer GCC versions

In newer versions of GCC the exporting of symbols can be controlled with
an attribute if -fvisibility=hidden is used. This patch allows the
CIVETWEB_API macro to work with this flag.
Matt Clarkson há 10 anos atrás
pai
commit
a68e70f3c8
1 ficheiros alterados com 2 adições e 0 exclusões
  1. 2 0
      include/civetweb.h

+ 2 - 0
include/civetweb.h

@@ -34,6 +34,8 @@
 #else
 #define CIVETWEB_API
 #endif
+#elif __GNUC__ >= 4
+#define CIVETWEB_API __attribute__((visibility ("default")))
 #else
 #define CIVETWEB_API
 #endif