On Jul 21, 2007, at 9:03 AM, Daniel Stenberg wrote:
> On Fri, 20 Jul 2007, James Housley wrote:
>
>>> But how would you fix the existing one? We should at least make
>>> it C89...
>>
>> That I don't know. Is there a nice constant for the max file
>> descriptors we could use? It seems unlikely that libssh2 would
>> have more then a couple open at a time, unlike cURL.
>
> The poll function allows the caller to check multiple ssh
> connections so it could actually use a larger number of connections.
>
> But I thought some more about this problem and I think we should
> rather not introduce a new function but instead do two things:
>
> 1) for pre-C99 compilers we set a fixed max amount of file
> descriptors (like
> 256 or so)
>
> 2) for C99 compilers we use the existing method
>
> (the compiler compliance check would of course have to be made by
> configure)
>
> This has the advantage that it maintains the exact same API but
> only introduces a limit for older compilers, but one that shouldn't
> cause much trouble to anyone.
That does sound like a better solution, we could even make the pre-
C99 value a constant in config.h so it would be easy for a author to
up the value from our default.
Jim
--
/"\ ASCII Ribbon Campaign .
\ / - NO HTML/RTF in e-mail .
X - NO Word docs in e-mail .
/ \ -----------------------------------------------------------------
http://www.FreeBSD.org The Power to Serve
jim@TheHousleys.Net http://www.TheHousleys.net
---------------------------------------------------------------------
A: Yes.
| Q: Are you sure?
| | A: Because it reverses the logical flow of conversation.
| | | Q: Why is top posting frowned upon?
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
libssh2-devel mailing list
libssh2-devel_at_lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel
Received on 2007-07-21