gethostbyname_r() takes a buffer in which it puts the return data.  That
data is usually 100 bytes or less, but it can be several kbytes.  That's
easy enough to deal with on systems with plenty of memory:
    char buf[32768];
But automatic variables that big can cause problems on systems with limited
memory (sudden program death).

An alternative is to start with a small (1k?) Malloc'ed buffer and grow it
and repeat the system call if necessary.  But that's wasted effort for big
systems.

Which way is best for openssl library functions?

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to