Explorar el Código

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 hace 10 años
padre
commit
a68e70f3c8
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  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