www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: Re: INVALID_SOCKET symbol conflict

Re: INVALID_SOCKET symbol conflict

From: Peter Stuge <peter_at_stuge.se>
Date: Fri, 2 Mar 2012 17:26:26 +0100

Lawson wrote:
> I notice that nearly all the defines in libssh2.h use the LIBSSH2_
> prefix, except for INVALID_SOCKET. It seems to be on purpose but I
> don't understand why. Is it a Windows thing?

Yep.

> My issue is that I'm writing an application (on Linux) which
> includes headers from multiple libraries, and some of them also set
> this symbol to a conflicting value.

They can't work on Windows then.

The fix is of course to use LIBSSH2_INVALID_SOCKET. Please send a
git patch which does the change, including the neccessary autoconf
goo.

//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-03-02

the libssh2 team