aboutsummaryrefslogtreecommitdiff
path: root/config.h.cmake
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2009-08-11 15:38:49 +0200
committerAndreas Schneider <mail@cynapses.org>2009-08-11 15:38:49 +0200
commit5e4bc6ec7947a403da3b1989c39accf16449f601 (patch)
tree7fe4acd3fcdc86a51664bdde4478fe5b534bc3e4 /config.h.cmake
parentf3612879a8c8ceabd4c1ed85839b8f58d11f9ed1 (diff)
downloadlibssh-5e4bc6ec7947a403da3b1989c39accf16449f601.tar.gz
libssh-5e4bc6ec7947a403da3b1989c39accf16449f601.tar.xz
libssh-5e4bc6ec7947a403da3b1989c39accf16449f601.zip
Fix compilation with MSVC and use declspec to export functions.
Thanks to Patrick Spendrin <ps_ml@gmx.de> for all the MSVC fixes.
Diffstat (limited to 'config.h.cmake')
-rw-r--r--config.h.cmake14
1 files changed, 14 insertions, 0 deletions
diff --git a/config.h.cmake b/config.h.cmake
index b49b2278..69863735 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -82,3 +82,17 @@
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#cmakedefine WORDS_BIGENDIAN 1
+
+/************************* MS Windows ***************************/
+
+#ifdef _WIN32
+# ifdef _MSC_VER
+/* On Microsoft compilers define inline to __inline on all others use inline */
+# undef inline
+# define inline __inline
+
+# undef strdup
+# define strdup _strdup
+# endif // _MSC_VER
+#endif /* _WIN32 */
+