[libssh2] suggestion: libssh2_version()

2009-02-23 Thread Daniel Stenberg
Hey I'd like to suggest that we add a libssh2_version() function that returns information about the lib. I just noticed how debian unstable got a fresh libssh2 1.0, but curl is still thinking it is 0.18 since it got the version number at build-time instead of run-time. So I would like to see a

Re: [libssh2] suggestion: libssh2_version()

2009-02-23 Thread Simon Josefsson
Daniel Stenberg writes: > Hey > > I'd like to suggest that we add a libssh2_version() function that returns > information about the lib. I just noticed how debian unstable got a fresh > libssh2 1.0, but curl is still thinking it is 0.18 since it got the version > number at build-time instead o

Re: [libssh2] suggestion: libssh2_version()

2009-02-23 Thread Tor Arntsen
On Mon, Feb 23, 2009 at 12:08, Simon Josefsson wrote: > Do we need to use a struct here? If we ever need to change the struct > (which may happen if we support some other TLS library or some other > compression, or similar), it seems we'd need to bump the ABI of the > library? > > How about some

Re: [libssh2] suggestion: libssh2_version()

2009-02-23 Thread Daniel Stenberg
On Mon, 23 Feb 2009, Simon Josefsson wrote: > const char *libssh2_check_version (int req_version_num); > > Which could be used by applications like this: > > if (!libssh2_check_version (LIBSSH2_VERSION_NUM)) { > fprintf (stderr, "Runtime libssh2 version too old!\n"); > exit(1); > } Right, that'

[libssh2] [ Bugs #2476770 ] Win32, static lib (using MinGW in MSYS shell) (fwd)

2009-02-23 Thread Daniel Stenberg
Hi friends, Can anyone who actually uses mingw to build libssh2 help me out with some feedback on this. I know we've poked a bit on these files lately, so I don't like to just blindly commit this contributed patch and I just don't have any windows setup nearby to test it on. So please tell me:

Re: [libssh2] [ Bugs #2476770 ] Win32, static lib (using MinGW in MSYS shell) (fwd)

2009-02-23 Thread Simon Josefsson
Daniel Stenberg writes: > Hi friends, > > Can anyone who actually uses mingw to build libssh2 help me out with some > feedback on this. I know we've poked a bit on these files lately, so I don't > like to just blindly commit this contributed patch and I just don't have any > windows setup near

Re: [libssh2] suggestion: libssh2_version()

2009-02-23 Thread Simon Josefsson
Daniel Stenberg writes: > On Mon, 23 Feb 2009, Simon Josefsson wrote: > >> const char *libssh2_check_version (int req_version_num); >> >> Which could be used by applications like this: >> >> if (!libssh2_check_version (LIBSSH2_VERSION_NUM)) { >> fprintf (stderr, "Runtime libssh2 version too old!

Re: [libssh2] suggestion: libssh2_version()

2009-02-23 Thread Daniel Stenberg
On Mon, 23 Feb 2009, Simon Josefsson wrote: > Yup. Or just skip the 'extra' parameter completely. People who care about > that kind of details can run ldd on the application or library, can't they? You're right. I ditched it and committed an intial version just now together with a man page fo