Daniel Stenberg wrote:
>> I find it ridiculous for our examples to depend on configuration
>> information for the library.
>
> I don't. Well, to be specific: it doesn't depend on "configuration
> information for the library", the examples depend on "configuration
> information" period.
It's a bad idea for more reasons.. The examples make no attempt at
dealing with systems where some particular functionality that the
example needs is missing, and neither should it. I don't think the
point is to have ultra portable examples if that is not trivially
possible. The primary point should be to demonstrate how to use the
library, even if that means that a few of the examples will not build
on every platform.
But in any case I actually don't think there is a big problem with
portability in the examples. They are all simple, and hopefully it's
enough to cover Windows vs. the rest of the supported systems.
> If you can write a full set of *portable* examples without the use of
> configure -- or something configure-like -- then please go ahead and show
> us
direct_tcpip.c builds for Windows and Linux. I would very much
appreciate to hear if it builds also on other platforms that people
have access to.
> as that's not how our code is currently done. Right now the examples
> need something that tells them a bit about what's working and what
> isn't working in the environment where the examples are built/run.
Are you sure? Where do the examples handle the case where stuff isn't
working? And finally do you consider it important that they *do*
handle those cases?
> Doing "grep HAVE_ example/*.c" should give a quick idea of what I'm
> talking about.
Sure, I've looked a lot at the examples. There are many other ways
they can be improved too IMO.
//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-06-02