#include <limits.h>
+/* in 0.10.0 or later, ignore deprecated warnings */
+#include <libssh/libssh_version.h>
+#if (LIBSSH_VERSION_MINOR >= 10) || (LIBSSH_VERSION_MAJOR > 0)
+#define SSH_SUPPRESS_DEPRECATED
+#endif
#include <libssh/libssh.h>
#include <libssh/sftp.h>
#include "curl_memory.h"
#include "memdebug.h"
-/* in 0.10.0 or later, ignore deprecated warnings */
-#if defined(__GNUC__) && \
- (LIBSSH_VERSION_MINOR >= 10) || \
- (LIBSSH_VERSION_MAJOR > 0)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-#endif
-
/* A recent macro provided by libssh. Or make our own. */
#ifndef SSH_STRING_FREE_CHAR
#define SSH_STRING_FREE_CHAR(x) \
(void)msnprintf(buffer, buflen, "libssh/%s", ssh_version(0));
}
-#if defined(__GNUC__) && \
- (LIBSSH_VERSION_MINOR >= 10) || \
- (LIBSSH_VERSION_MAJOR > 0)
-#pragma GCC diagnostic pop
-#endif
-
#endif /* USE_LIBSSH */